From e406fd0d8d47acc3e69bc8934ceed30d52d6b833 Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Wed, 30 Apr 2025 18:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E5=A4=B4bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WelderSkillExamController.java | 7 ++++--- .../baotou/entity/WelderSkillExam.java | 6 ++++++ .../plan/controller/PlanRecordController.java | 21 ++++++++++++------- ...ctSupervisionMonthlyReportServiceImpl.java | 9 -------- .../WelderAssessmentRequestServiceImpl.java | 8 +++++++ 5 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/WelderSkillExamController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/WelderSkillExamController.java index 1010c812f..4b9105a96 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/WelderSkillExamController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/WelderSkillExamController.java @@ -65,9 +65,10 @@ public class WelderSkillExamController { @OperLog(operModul = "焊工技能考核评定登记表管理", operType = "分页查询", operDesc = "分页列表查询焊工技能考核评定登记表信息") @ApiOperation(value = "分页列表查询焊工技能考核评定登记表信息", notes = "分页列表查询焊工技能考核评定登记表信息", httpMethod="GET") @ApiImplicitParams({ - @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), - @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), - }) + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "workerId", value = "劳务人员id", paramType = "query", required = false, dataType = "Integer"), + }) @GetMapping(value = "/page") public Result> queryPageList(@ApiIgnore @RequestParam HashMap param) { return Result.success(welderSkillExamService.queryPageList(param)); diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/WelderSkillExam.java b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/WelderSkillExam.java index 2b23e3192..c16af4608 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/WelderSkillExam.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/WelderSkillExam.java @@ -79,4 +79,10 @@ public class WelderSkillExam implements Serializable { private java.util.Date updateTime; @ApiModelProperty(value = "焊工考核申请id") private java.lang.Long requestId; + @ApiModelProperty(value = "焊接作业证") + private java.lang.String welderWorkPermit; + @ApiModelProperty(value = "试件类别json:[碳钢,不锈钢]") + private java.lang.String testType; + @ApiModelProperty(value = "劳务人员id") + private java.lang.Long workerId; } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java index db5a8265f..39db87ce6 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.MapUtils; +import org.apache.commons.collections.list.PredicatedList; import org.simpleframework.xml.core.Validate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; @@ -557,6 +558,7 @@ public class PlanRecordController { public Result importWork(@RequestParam("file") MultipartFile file, @RequestParam HashMap param) { List> list = null; String zyCodeName = null; + List errList = new ArrayList<>(); try { list = ExcelUtils.jxlExlToList(file.getInputStream(), 0); if (list == null || list.size() == 0) { @@ -587,10 +589,13 @@ public class PlanRecordController { record.setWorkType(1); PlanRecord parent = codeNameMap.get(zyCodeName); if (parent == null) { - throw new OpenAlertException(zyCodeName + "不存在"); + errList.add(zyCodeName + "不存在"); + continue; + } + if (parent != null) { + record.setParentId(parent.getId()); + record.setAncestors(parent.getAncestors() + "," + parent.getId()); } - record.setParentId(parent.getId()); - record.setAncestors(parent.getAncestors() + "," + parent.getId()); record.setPbsId(pbsId); record.setSort(sort); codeNameMap.compute(record.getCode() + ":" + record.getJobName(), (key, val) -> { @@ -612,9 +617,9 @@ public class PlanRecordController { } } catch (Exception e) { e.printStackTrace(); - return Result.error(zyCodeName + e.getMessage()); + return Result.error(e.getMessage()); } - return Result.ok(); + return Result.success(StrUtil.join(",", errList)); } @@ -677,13 +682,13 @@ public class PlanRecordController { } if (CollUtil.isNotEmpty(addList)) { planRecordService.saveBatch(addList); - } - if (CollUtil.isNotEmpty(updateList)) { + importProfession(file, param); + } else if (CollUtil.isNotEmpty(updateList)) { planRecordService.updateBatchById(updateList); } } catch (Exception e) { e.printStackTrace(); - throw new OpenAlertException(); + throw new OpenAlertException(e.getMessage()); } return Result.ok(); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ProjectSupervisionMonthlyReportServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ProjectSupervisionMonthlyReportServiceImpl.java index 697f5ba7e..b4f7a527e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ProjectSupervisionMonthlyReportServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ProjectSupervisionMonthlyReportServiceImpl.java @@ -66,15 +66,6 @@ public class ProjectSupervisionMonthlyReportServiceImpl extends ServiceImpl implements IWelderAssessmentRequestService { @Lazy @@ -111,6 +113,9 @@ public class WelderAssessmentRequestServiceImpl extends ServiceImpl