src/main/java/org/springblade/modules/accreditation/controller/AccreditationRecordsController.java
@@ -112,11 +112,19 @@ * @param accreditationRecords 制证记录信息对象 */ @PostMapping("/securityApply") @ApiOperation(value = "新增", notes = "传入accreditationRecords") public R securityApply(@RequestBody AccreditationRecordsVo accreditationRecords){ return R.data(accreditationRecordsService.securityApply(accreditationRecords)); } /** * 批量修改为已制证 * @param accreditationRecords 制证记录信息对象 */ @PostMapping("/batchAccreditation") public R batchAccreditation(@RequestBody AccreditationRecordsVo accreditationRecords){ return R.data(accreditationRecordsService.batchAccreditation(accreditationRecords)); } /** * 审核 src/main/java/org/springblade/modules/accreditation/service/AccreditationRecordsService.java
@@ -54,4 +54,10 @@ * 导出证书制证信息(包含照片) */ List<AccreditationRecordsVo> exportSecurityBookPapers(AccreditationRecordsVo accreditationRecords); /** * 批量修改为已制证 * @param accreditationRecords 制证记录信息对象 */ boolean batchAccreditation(AccreditationRecordsVo accreditationRecords); } src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java
@@ -197,4 +197,29 @@ // System.out.println("accreditationRecordsVos = " + accreditationRecordsVos.size()); return accreditationRecordsVos; } /** * 批量修改为已制证 * @param accreditationRecords 制证记录信息对象 */ @Override public boolean batchAccreditation(AccreditationRecordsVo accreditationRecords) { //读取ids List<String> list = Arrays.asList(accreditationRecords.getIds().split(",")); //遍历 list.forEach(id->{ AccreditationRecords records = new AccreditationRecords(); records.setStatus(2); records.setId(Long.parseLong(id)); //更新 this.updateById(records); //内网同步 String s = "update sys_accreditation_records set status = " + accreditationRecords.getStatus() + "" + "where id = " + "'" + accreditationRecords.getId() + "'"; FtpUtil.sqlFileUpload(s); }); return true; } }