From b30dc1636ac96daf7da29efcce536f7500cd684f Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 18 May 2022 16:18:38 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E7=9A=84=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 3 + jero-web/src/common/lang/zh-cn.js | 5 +- .../components/listEditModel.vue | 50 ++++----- .../projectStatusBoard/index.vue | 105 ++++++++++++++---- 4 files changed, 115 insertions(+), 48 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index d32548eaa..8bb2e75d2 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -836,4 +836,7 @@ module.exports = { newlyAdded: 'Newly Added', applicableSupplement: 'Applicable Supplement', taskDescription:'Task description', + descriptionDeliverables:'Description of deliverables', + startMonth:'Start Month', + endMonth:'End Month', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index b8d6ef037..960b2e1f0 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -840,5 +840,8 @@ module.exports = { verificationComplianceConfirmationProgress: '验证符合性确认进度', totalTable: '总数', applicableSupplement: '适用增补件', - taskDescription: '任务说明' + taskDescription: '任务说明', + descriptionDeliverables:'交付物说明', + startMonth:'开始日期', + endMonth:'结束日期', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index cc570b7f4..f35dc32b1 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -433,21 +433,21 @@ - -
-
+ +
+
{{$t('remarks')}} + :title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}} +
+ + +
- - - -
- +
 {{$t('PrehomoConfirmation')}} @@ -576,12 +576,12 @@
{{$t('remarks')}} + :title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}}
@@ -713,12 +713,12 @@
{{$t('remarks')}} + :title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}}
@@ -784,27 +784,27 @@ trigger: 'blur' } ], - designRemark:[ + designRemark: [ { max: 300, - message: this.$t('remarks') + this.$t('cannotExceed') + 300 + this.$t('Characters'), + message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 300 + this.$t('Characters'), trigger: 'blur' } ], - verifyRemark:[ + verifyRemark: [ { max: 300, - message: this.$t('remarks') + this.$t('cannotExceed') + 300 + this.$t('Characters'), + message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 300 + this.$t('Characters'), trigger: 'blur' } ], - prehomoRemark:[ + prehomoRemark: [ { max: 300, - message: this.$t('remarks') + this.$t('cannotExceed') + 300 + this.$t('Characters'), + message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 300 + this.$t('Characters'), trigger: 'blur' } - ], + ] }, formInline: {}, regulatoryEngineerList: [], @@ -1312,7 +1312,7 @@ position: absolute; bottom: 0; width: 100%; - z-index:100; + z-index: 100; border-top: 1px solid #e8e8e8; padding: 10px 16px; text-align: right; diff --git a/jero-web/src/views/projectManagement/projectStatusBoard/index.vue b/jero-web/src/views/projectManagement/projectStatusBoard/index.vue index d8e0d7211..2bc35db56 100644 --- a/jero-web/src/views/projectManagement/projectStatusBoard/index.vue +++ b/jero-web/src/views/projectManagement/projectStatusBoard/index.vue @@ -32,6 +32,21 @@
{{$t('regulatoryCertificationTaskPlan')}} + + +
@@ -86,6 +101,7 @@ - + \ No newline at end of file From f4dec0c456e33070d94ba6924d67388f8a933817 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Wed, 18 May 2022 16:28:05 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95--?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BD=BF=E7=94=A8=E5=A2=9E=E8=A1=A5=E4=BB=B6?= =?UTF-8?q?=E5=92=8C=E4=BA=A4=E4=BB=98=E7=89=A9=E6=A8=A1=E6=9D=BF=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=20=20=20=20=20=20=20=20=20=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/ProjectLawsInventoryEO.java | 25 ++-- .../ProjectLawsInventoryEOServiceImpl.java | 122 ++++++++++-------- .../ProjectRelatedPersonnelServiceImpl.java | 18 +-- 3 files changed, 95 insertions(+), 70 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java index b98e319c4..0e7e8ea0c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java @@ -141,6 +141,10 @@ public class ProjectLawsInventoryEO implements Serializable { @Dict(dicCode ="attestation_rank") private String attestationRank; + //适用增补件 + @Excel(name = "适用增补件", width = 20) + private String applicableSupplement; + /**WVTA ID*/ @Excel(name = "WVTA ID", width = 20) @ApiModelProperty(value = "WVTA ID") @@ -236,6 +240,10 @@ public class ProjectLawsInventoryEO implements Serializable { @TableField(exist = false) private String designDueDateString; + //交付物说明 + @Excel(name = "设计符合性确认-交付物说明", width = 20) + private String designRemark; + /**prehomo确认-交付物类型*/ @Excel(name = "prehomo确认-交付物类型", width = 20,dicCode ="deliverable_template") @ApiModelProperty(value = "prehomo确认-1") @@ -288,6 +296,10 @@ public class ProjectLawsInventoryEO implements Serializable { @TableField(exist = false) private String prehomoDueDateString; + //prehomo确认-交付物说明 + @Excel(name = "prehomo确认-交付物说明", width = 20) + private String prehomoRemark; + /**验证符合性确认-交付物类型*/ @Excel(name = "验证符合性确认-交付物类型", width = 20,dicCode ="deliverable_template") @ApiModelProperty(value = "验证符合性确认-交付物类型") @@ -340,6 +352,10 @@ public class ProjectLawsInventoryEO implements Serializable { @TableField(exist = false) private String verifyDueDateString; + //验证备注 + @Excel(name = "验证符合性确认-交付物说明", width = 20) + private String verifyRemark; + @TableField(exist = false) @ApiModelProperty(value = "角色代码") private String roleCode;//角色代码 @@ -395,12 +411,5 @@ public class ProjectLawsInventoryEO implements Serializable { @ApiModelProperty(value = "调取虚拟清单,虚拟清单中维护数据为空时,进行二次确认") private String flag; - //适用增补件 - private String applicableSupplement; - //验证备注 - private String verifyRemark; - //pre备注 - private String prehomoRemark; - //设计备注 - private String designRemark; + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 308f2afe2..1cb54be77 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -1593,20 +1593,22 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl list = Arrays.asList(titleOne.split(",")); @@ -1614,7 +1616,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl 1){ startLine = startLine + line + 1; endLine = startLine + line; @@ -1659,7 +1661,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl 10){ + if(j > 11){ String flag = ""; - if(10 < j && j < 16){ + if(11 < j && j < 18){ if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){ flag ="设计"; }else{ @@ -1940,7 +1942,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl titleOneList = Arrays.asList(titleOne.split(",")); From 527ac9198e383c7bce847c044ec3b210f5a04f49 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Wed, 18 May 2022 16:40:58 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=B4--=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=8C=83=E5=9B=B4=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectStatusBoardController.java | 2 +- .../project/entity/ProjectLibraryBase.java | 4 ++-- .../service/IProjectStatusBoardService.java | 2 +- .../impl/ProjectStatusBoardServiceImpl.java | 23 +++++++++++-------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectStatusBoardController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectStatusBoardController.java index c89f7390a..6c03652a7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectStatusBoardController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectStatusBoardController.java @@ -58,7 +58,7 @@ public class ProjectStatusBoardController { @AutoLog(value = "时间轴列") @ApiOperation(value="时间轴列", notes="时间轴列") @GetMapping(value = "/timeline") - public Result timeline(Date startTime,Date endTime) { + public Result timeline(String startTime,String endTime) { List timeline = iProjectStatusBoardService.timeline(startTime, endTime); return Result.OK(timeline); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java index cb4a03da8..f0ca0a949 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java @@ -97,8 +97,8 @@ public class ProjectLibraryBase implements Serializable { private String cut; @TableField(exist = false) - private java.util.Date startTime; + private String startTime; @TableField(exist = false) - private java.util.Date endTime; + private String endTime; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectStatusBoardService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectStatusBoardService.java index 72cafbeda..36e76b058 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectStatusBoardService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectStatusBoardService.java @@ -23,7 +23,7 @@ public interface IProjectStatusBoardService { */ List> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req); - List timeline(Date startTime, Date endTime); + List timeline(String startTime, String endTime); /** * 项目状态进度 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectStatusBoardServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectStatusBoardServiceImpl.java index b20a8fde7..6f2bff04b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectStatusBoardServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectStatusBoardServiceImpl.java @@ -18,6 +18,7 @@ import com.jero.modules.project.service.IProjectStatusBoardService; import com.jero.modules.project.vo.TimeNodeVO; import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.service.impl.SysDictItemServiceImpl; +import lombok.SneakyThrows; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; @@ -61,11 +62,12 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService * @param req * @return */ + @SneakyThrows @Override public List> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req) { // QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(projectLibraryBase, req.getParameterMap()); - + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); //项目库信息 List projectLibraryBaseList = projectLibraryBaseService.getList(projectLibraryBase); List> list = new ArrayList<>(); @@ -79,15 +81,15 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService int index = 0; list = projectTaskPlanningService.queryByProjectId(StringUtils.join(projectLibraryBaseIdList, ","), projectLibraryBase.getCut()); //时间段筛选,过滤数据 - Date startTime = projectLibraryBase.getStartTime(); - Date endTime = projectLibraryBase.getEndTime(); + String startTime = projectLibraryBase.getStartTime(); + String endTime = projectLibraryBase.getEndTime(); List> listNew = new ArrayList<>(); if(ObjectUtils.isNotEmpty(startTime) && ObjectUtils.isNotEmpty(endTime)){ for (List timeNodeVOS : list) { List timeNodeVOList = new ArrayList<>(); for (TimeNodeVO timeNodeVO : timeNodeVOS) { Date time = timeNodeVO.getTime(); - if(time.after(startTime) && time.before(endTime)){ + if(time.after(sdf.parse(startTime)) && time.before(sdf.parse(endTime))){ TimeNodeVO timeNodeVOTemp = new TimeNodeVO(); BeanUtils.copyProperties(timeNodeVO,timeNodeVOTemp); timeNodeVOTemp.setTime(time); @@ -400,27 +402,28 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService } + @SneakyThrows @Override - public List timeline(Date startTime, Date endTime) { + public List timeline(String startTime, String endTime) { List result = new ArrayList(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); Calendar calendarBefore = Calendar.getInstance(); if(ObjectUtils.isNotEmpty(startTime)){ - calendarBefore.setTime(startTime); + calendarBefore.setTime(sdf.parse(startTime)); }else{ calendarBefore.setTime(new Date()); + calendarBefore.add(Calendar.MONTH, -6); } - calendarBefore.add(Calendar.MONTH, -6); Date dateBefore = calendarBefore.getTime(); - Calendar calendarAfter = Calendar.getInstance(); + if(ObjectUtils.isNotEmpty(endTime)){ - calendarAfter.setTime(endTime); + calendarAfter.setTime(sdf.parse(endTime)); }else{ calendarAfter.setTime(new Date()); + calendarAfter.add(Calendar.MONTH, +5); } - calendarAfter.add(Calendar.MONTH, +5); Date dateAfter = calendarAfter.getTime(); Calendar min = Calendar.getInstance(); From 1ce2d5aec4b1fe2e1d7a434e68cd9b33d8aa52f9 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Wed, 18 May 2022 17:04:21 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E6=B8=85=E5=8D=95--?= =?UTF-8?q?=E4=B8=AD=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DummyInventoryBaseEOServiceImpl.java | 8 +-- .../impl/DummyInventoryInfoEOServiceImpl.java | 62 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java index c9bec70f0..3742beaa3 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java @@ -685,13 +685,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl infoDiff : infoDiffList) { if (infoDiff.size() > 1) { int infoDiffRow = 1; - contentInfo += row + ". The serial Number " + infoDiff.get("serialNumber") + " has been updated as follows : " + "\r\n"; + contentInfo += row + ". The Number " + infoDiff.get("serialNumber") + " has been updated as follows : " + "\r\n"; //标题 if (StringUtils.isNotBlank(infoDiff.get("title"))) { List list = Arrays.asList(infoDiff.get("title").split(",")); @@ -719,7 +719,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl Date: Wed, 18 May 2022 17:20:58 +0800 Subject: [PATCH 05/11] =?UTF-8?q?[add]=20=E6=9F=A5=E7=9C=8B=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/package-lock.json | 15 + jero-web/package.json | 1 + jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../src/components/tableCollection/index.vue | 226 ++++++++++++--- jero-web/src/main.js | 4 +- .../components/TaskParameterCollection.vue | 24 +- ...rTemplate.vue => ParameterTemplateAdd.vue} | 0 .../dialog/historicalVersion.vue | 265 ++++++++++++++++++ 9 files changed, 489 insertions(+), 48 deletions(-) rename jero-web/src/views/projectManagement/dialog/{ParameterTemplate.vue => ParameterTemplateAdd.vue} (100%) create mode 100644 jero-web/src/views/projectManagement/dialog/historicalVersion.vue diff --git a/jero-web/package-lock.json b/jero-web/package-lock.json index c621e69d5..5038e50fb 100644 --- a/jero-web/package-lock.json +++ b/jero-web/package-lock.json @@ -34,6 +34,7 @@ "vue": "^2.6.10", "vue-area-linkage": "^5.1.0", "vue-cropper": "^0.5.4", + "vue-draggable-resizable": "^2.1.0", "vue-i18n": "^8.26.8", "vue-loader": "^15.7.0", "vue-ls": "^3.2.0", @@ -19415,6 +19416,15 @@ "resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.6.tgz", "integrity": "sha512-54Z/AipXDBcE5nzJweTM+BryzSAcC0FCTMQLvLt6f4XanP4AWB3mPkQw3PG3NRICo7knljHO+N+pjZxYAKoTLQ==" }, + "node_modules/vue-draggable-resizable": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vue-draggable-resizable/-/vue-draggable-resizable-2.1.0.tgz", + "integrity": "sha512-DQe5JjiqPjndc3XZkkZAMVygMlJ4TLcpMWM78IkizHeJBfX5Ki6OKZPxrT+HE7w/12d+OfWom5Y5phYcrwCzqg==", + "engines": { + "node": ">= 4.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/vue-eslint-parser": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz", @@ -37285,6 +37295,11 @@ "resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.6.tgz", "integrity": "sha512-54Z/AipXDBcE5nzJweTM+BryzSAcC0FCTMQLvLt6f4XanP4AWB3mPkQw3PG3NRICo7knljHO+N+pjZxYAKoTLQ==" }, + "vue-draggable-resizable": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vue-draggable-resizable/-/vue-draggable-resizable-2.1.0.tgz", + "integrity": "sha512-DQe5JjiqPjndc3XZkkZAMVygMlJ4TLcpMWM78IkizHeJBfX5Ki6OKZPxrT+HE7w/12d+OfWom5Y5phYcrwCzqg==" + }, "vue-eslint-parser": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz", diff --git a/jero-web/package.json b/jero-web/package.json index c8f4fbeb9..da4e81b29 100644 --- a/jero-web/package.json +++ b/jero-web/package.json @@ -36,6 +36,7 @@ "vue": "^2.6.10", "vue-area-linkage": "^5.1.0", "vue-cropper": "^0.5.4", + "vue-draggable-resizable": "^2.1.0", "vue-i18n": "^8.26.8", "vue-loader": "^15.7.0", "vue-ls": "^3.2.0", diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 8bb2e75d2..91b9ecd39 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -707,6 +707,7 @@ module.exports = { uploadTime: 'Upload time', enclosure: 'enclosure', // 认证 + configurationInformation: 'configuration Information', modifyprojectInterfacePerson: 'modify project Interface Person', operatethisbutton: 'You do not have permission to operate this button', ParameterLibrary: 'Parameter Library', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 960b2e1f0..c17fe81ea 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -717,6 +717,7 @@ module.exports = { uploadTime: '上传时间', enclosure: '附件', // 认证 + configurationInformation: '配置信息', modifyprojectInterfacePerson: '修改工程接口人', operatethisbutton: '没有权限操作此按钮', ParameterLibrary: '参数库', diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 8813b4c1b..d4056b84f 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -10,9 +10,13 @@ :data-source="dataSource" :loading="loading" :columns="columns" + :components="components" @change="tableOnChange" @onHeaderRow='onHeaderRow' > + + {{ text.sortOrder }} 查看 + @@ -54,20 +58,6 @@ - - - - {{!record.collectFlag || record.collectFlag == 0 ? $t('Collection') :$t('CancelCollection')}} - - - {{!record.subscribeFlag || record.subscribeFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}} - - - {{ol.text}} - - - @@ -105,6 +95,40 @@
+ + +
+
+ {{$t('configurationName')}}: + {{configDetail.configName}} +
+
+
+
+ {{$t('Model')}}: + {{configDetail.carType}} +
+
+ {{$t('electricMachinery')}}: + {{configDetail.motor}} +
+
+
+
+ {{$t('Version')}}: + {{configDetail.version}} +
+
+ {{$t('Battery')}}: + {{configDetail.battery}} +
+
+
@@ -115,6 +139,7 @@ import CollectionType from '@/components/CollectionType' import { ACCESS_TOKEN } from '@/store/mutation-types' import axios from 'axios' import Vue from 'vue' +import VueDraggableResizable from 'vue-draggable-resizable' export default { name: 'index', props: { @@ -135,9 +160,48 @@ export default { } }, components: { - CollectionType + CollectionType, + VueDraggableResizable }, data() { + this.components = { + header: { + cell: (h, props, children) => { + const { key, ...restProps } = props + + // 此处的this.columns 是定义的table的表头属性变量 + + const col = this.columns.find((col) => { + const k = col.dataIndex || col.key + return k === key + }) + + if (!col || !col.width) { + return h('th', { ...restProps }, [...children]) + } + + const dragProps = { + key: col.dataIndex || col.key, + class: 'table-draggable-handle', + attrs: { + w: 10, + x: col.width, + z: 1, + axis: 'x', + draggable: true, + resizable: false, + }, + on: { + dragging: (x, y) => { + col.width = Math.max(x, 1) + }, + }, + } + const drag = h('vue-draggable-resizable', { ...dragProps }) + return h('th', { ...restProps, class: 'resize-table-th' }, [...children, drag]) + }, + }, + } return { token:Vue.ls.get(ACCESS_TOKEN), jsonBody: [], @@ -177,11 +241,44 @@ export default { querySdtList: [], // 工程接口人 Dateline: {}, getquerySdtId: '', // 当前工程接口人的id + areaVisibleView: false, // 查看配置得弹框 + configDetail: {}, // 查看配置得详细信息 } }, mounted() { }, methods: { + // 查看配置详细信息 + onClickSee(val) { + let _this = this + this.areaVisibleView = true + axios({ + url: `/jero-boot/params/config/getById?id=${val.sortColumn.dataIndex}`, + method: 'get', + transformRequest: [function (data) { + let ret = '' + for (let it in data) { + ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' + } + return ret + }], + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-Access-Token':_this.token + } + }) + .then( (res) =>{ + console.log(res) + if (res.data.success) { + this.configDetail = res.data.result + }else{ + _this.$message.warning(res.data.result) + } + }) + .catch( (error) =>{ + console.log(error); + }); + }, // 获取工程接口人 getquerySdtList(record) { // 当前工程接口人的id @@ -274,34 +371,36 @@ export default { var jsonHead = res.result this.columns = [] jsonHead.forEach((res, index) => { - this.columns.push({ - title: res.db_field_txt, - dataIndex: res.db_field_name, - align: 'center', - ellipsis: true, - sorter: res.sort - }) - if (res.type) { - this.columns[index].scopedSlots = { - customRender: 'detailClick' + // 配置列 + if(res.type) { + this.columns.push({ + dataIndex: res.db_field_name, + align: 'center', + ellipsis: true, + sorter: res.sort, + sortOrder: res.db_field_txt + }) + this.columns[index].scopedSlots = { + customRender: 'detailClick', + title: 'titleName' + } + // 非配置列 + } else { + this.columns.push({ + title: res.db_field_txt, + dataIndex: res.db_field_name, + align: 'center', + ellipsis: true, + sorter: res.sort + }) + if(res.click) { + // 工程接口人列表修改 + this.columns[index].scopedSlots = { + customRender: 'operationbtn' + } } } - if(res.click) { - // 工程接口人列表修改 - this.columns[index].scopedSlots = { - customRender: 'operationbtn' - } - } }) - if (this.showAction) { - this.columns.push({ - title: this.$t('operation'), - align: 'center', - fixed: 'right', - width: width, - scopedSlots: { customRender: 'operation' } - }) - } } }) }, @@ -382,6 +481,37 @@ export default { .ant-table td { white-space: nowrap; } +.content-text { + width: 100%; + display: flex; + flex-wrap: wrap; + .text-field { + width: 50%; + margin-bottom: 8px; + display: flex; + .text-field-left { + width: 100px; + display: inline-block; + font-size: 14px; + font-weight: 400; + color: #6F7385; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin-right: 24px; + } + + .text-field-right { + display: inline-block; + font-size: 16px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + color: #040B29; + font-weight: 400; + } + } +} diff --git a/jero-web/src/main.js b/jero-web/src/main.js index 1258d507d..ed0e649f6 100644 --- a/jero-web/src/main.js +++ b/jero-web/src/main.js @@ -56,7 +56,9 @@ import '@/assets/less/JAreaLinkage.less' import VueAreaLinkage from 'vue-area-linkage' import '@/components/jero/JVxeTable/install' import '@/components/JVxeCells/install' - +// 挂载全局使用的方法 +import VueDraggableResizable from 'vue-draggable-resizable' +Vue.component('vue-draggable-resizable', VueDraggableResizable) Vue.config.productionTip = false Vue.use(Storage, config.storageOptions) Vue.use(Antd) diff --git a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue index 0f42d2479..ae2641f4b 100644 --- a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue +++ b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue @@ -72,17 +72,24 @@ @showSizeChange="SizeChange" />
+ - + + + + + + + + + \ No newline at end of file From e909ba16760795e94a10a2d5c81f8f32e70af2c5 Mon Sep 17 00:00:00 2001 From: xiejunyu Date: Wed, 18 May 2022 17:24:24 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E6=9B=B4=E6=96=B0log=E7=BC=96=E8=BE=91+=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E6=B8=85=E5=8D=95log=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DummyInventoryBaseEOServiceImpl.java | 19 +- .../ProjectRelatedPersonnelController.java | 2 +- .../entity/ProjectLawsInventoryEO.java | 4 + .../enums/ProjectInventoryFieldEnum.java | 29 +- .../ProjectLawsInventoryEOServiceImpl.java | 497 +++++++++++++++++- 5 files changed, 522 insertions(+), 29 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java index 3742beaa3..d91355e15 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java @@ -428,6 +428,22 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl records) { Set technologyTerritorySet = new HashSet<>(); for (DummyInventoryInfoEO dummyInventoryInfoEO : records) { + //子标题 + if (StringUtils.isBlank(dummyInventoryInfoEO.getSubtitle())) { + dummyInventoryInfoEO.setSubtitle("空"); + } + //WVTA ID + if (StringUtils.isBlank(dummyInventoryInfoEO.getWvtaId())) { + dummyInventoryInfoEO.setWvtaId("空"); + } + //备注 + if (StringUtils.isBlank(dummyInventoryInfoEO.getRemark())) { + dummyInventoryInfoEO.setRemark("空"); + } + //适用增补件 + if (StringUtils.isBlank(dummyInventoryInfoEO.getApplicableSupplement())) { + dummyInventoryInfoEO.setApplicableSupplement("空"); + } //技术领域 if (StringUtils.isNotBlank(dummyInventoryInfoEO.getTechnologyTerritory())) { List list = Arrays.asList(dummyInventoryInfoEO.getTechnologyTerritory().split(",")); @@ -540,7 +556,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl deliverableTemplate = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.DELIVERABLE_TEMPLATE.getValue()); //设计符合性确认-交付物类型 @@ -1030,7 +1045,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl infoEOList = new ArrayList<>(); + infoEOList.add(projectLawsInventoryEO); + //查询数据库里原来的数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + List dataList = list(queryWrapper.eq("id", projectLawsInventoryEO.getId())); + + //保存 saveOrUpdate(projectLawsInventoryEO); + + //翻译 + translateData(infoEOList); + translateData(dataList); + //比对不同字段 + Map infoDiff = ListDiff.compareObject(dataList.get(0),projectLawsInventoryEO); + + //设置更新log + contentLog = setContentLog(infoDiff,contentLog); + projectLawsInventoryLogEOService.updateLog(contentLog, projectLawsInventoryEO.getProjectLibraryId()); }else { throw new JeroBootException("该用户没有权限操作该数据!"); } @@ -1354,14 +1377,34 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl infoList) { for (ProjectLawsInventoryEO projectLawsInventoryEO : infoList) { + //子标题 + if (StringUtils.isBlank(projectLawsInventoryEO.getSubtitle())) { + projectLawsInventoryEO.setSubtitle("空"); + } + //WVTA ID + if (StringUtils.isBlank(projectLawsInventoryEO.getWvtaId())) { + projectLawsInventoryEO.setWvtaId("空"); + } + //备注 + if (StringUtils.isBlank(projectLawsInventoryEO.getRemark())) { + projectLawsInventoryEO.setRemark("空"); + } + //实施类别 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())) { + List implementType = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getValue()); + String implementTypeName = implementType.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getImplementType())).map(f -> f.getItemText()).collect(Collectors.joining(",")); + projectLawsInventoryEO.setImplementType(implementTypeName); + } else { + projectLawsInventoryEO.setImplementType("空"); + } + + //在产车实施日期 + if (projectLawsInventoryEO.getImplementTime() != null) { + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); + String dateString = sdf.format(projectLawsInventoryEO.getImplementTime()); + projectLawsInventoryEO.setImplementTimeString(dateString); + }else { + projectLawsInventoryEO.setImplementTimeString("空"); + } + + //新车型实施日期 + if (projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null) { + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); + String dateString = sdf.format(projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1()); + projectLawsInventoryEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1String(dateString); + }else { + projectLawsInventoryEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1String("空"); + } + + //认证类型 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())) { + List attestationType = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_TYPE.getValue()); + String attestationTypeName = attestationType.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getAttestationType())).map(f -> f.getItemText()).collect(Collectors.joining(",")); + projectLawsInventoryEO.setAttestationType(attestationTypeName); + } else { + projectLawsInventoryEO.setAttestationType("空"); + } + + //认证级别 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())) { + List attestationRank = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue()); + String attestationRankName = attestationRank.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getAttestationRank())).map(f -> f.getItemText()).collect(Collectors.joining(",")); + projectLawsInventoryEO.setAttestationRank(attestationRankName); + } else { + projectLawsInventoryEO.setAttestationRank("空"); + } + //责任领域 if (StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())) { List dutyTerritory = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()); @@ -1424,30 +1524,157 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl implementType = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getValue()); - String implementTypeName = implementType.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getImplementType())).map(f -> f.getItemText()).collect(Collectors.joining(",")); - projectLawsInventoryEO.setImplementType(implementTypeName); - } else { - projectLawsInventoryEO.setImplementType("空"); + + //适用地区 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getRegion())) { + List region = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.REGION.getValue()); + List regionList = Arrays.asList(projectLawsInventoryEO.getRegion().split(",")); + StringBuilder regionBuilder = new StringBuilder(); + for (String midRegion : regionList) { + String regionName = region.stream().filter(e -> e.getItemValue().equals(midRegion)).map(f -> f.getItemText()).collect(Collectors.joining(",")); + regionBuilder.append(regionName).append(","); + } + projectLawsInventoryEO.setRegion(regionBuilder.substring(0, regionBuilder.toString().length() - 1)); + }else { + projectLawsInventoryEO.setRegion("空"); } - //认证类型 - if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())) { - List attestationType = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_TYPE.getValue()); - String attestationTypeName = attestationType.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getAttestationType())).map(f -> f.getItemText()).collect(Collectors.joining(",")); - projectLawsInventoryEO.setAttestationType(attestationTypeName); - } else { - projectLawsInventoryEO.setAttestationType("空"); + + //交付物类型 + List deliverableTemplate = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.DELIVERABLE_TEMPLATE.getValue()); + //设计符合性确认-交付物类型 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignDeliverableType())) { + String designDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getDesignDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(",")); + projectLawsInventoryEO.setDesignDeliverableType(designDeliverableTypeName); + }else { + projectLawsInventoryEO.setDesignDeliverableType("空"); } - //认证级别 - if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())) { - List attestationRank = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue()); - String attestationRankName = attestationRank.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getAttestationRank())).map(f -> f.getItemText()).collect(Collectors.joining(",")); - projectLawsInventoryEO.setAttestationRank(attestationRankName); - } else { - projectLawsInventoryEO.setAttestationRank("空"); + //prehomo确认-交付物类型 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getPrehomoDeliverableType())) { + String prehomoDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getPrehomoDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(",")); + projectLawsInventoryEO.setPrehomoDeliverableType(prehomoDeliverableTypeName); + }else { + projectLawsInventoryEO.setPrehomoDeliverableType("空"); } + //验证符合性确认-交付物类型 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getVerifyDeliverableType())) { + String verifyDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getVerifyDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(",")); + projectLawsInventoryEO.setVerifyDeliverableType(verifyDeliverableTypeName); + }else { + projectLawsInventoryEO.setVerifyDeliverableType("空"); + } + + + List userIdList= new ArrayList<>(); + //法规工程师 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getRegulationOwnerId())) { + userIdList.add(projectLawsInventoryEO.getRegulationOwnerId()); + } else { + projectLawsInventoryEO.setRegulationOwnerName("空"); + } + + //认证工程师 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getHomologationEngineerId())) { + userIdList.add(projectLawsInventoryEO.getHomologationEngineerId()); + }else { + projectLawsInventoryEO.setHomologationEngineerName("空"); + } + + //工程接口人 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getEngineeringInterfacePerson())) { + userIdList.add(projectLawsInventoryEO.getEngineeringInterfacePerson()); + }else { + projectLawsInventoryEO.setEngineeringInterfacePersonName("空"); + } + + //发起人 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignInitiatorId())) { + userIdList.add(projectLawsInventoryEO.getDesignInitiatorId()); + }else { + projectLawsInventoryEO.setDesignInitiatorName("空"); + } + if (StringUtils.isNotBlank(projectLawsInventoryEO.getPrehomoInitiatorId())) { + userIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId()); + }else { + projectLawsInventoryEO.setPrehomoInitiatorName("空"); + } + if (StringUtils.isNotBlank(projectLawsInventoryEO.getVerifyInitiatorId())) { + userIdList.add(projectLawsInventoryEO.getVerifyInitiatorId()); + }else { + projectLawsInventoryEO.setVerifyInitiatorName("空"); + } + + //责任人 + if (StringUtils.isBlank(projectLawsInventoryEO.getDesignDutyId())) { + userIdList.add(projectLawsInventoryEO.getDesignDutyId()); + }else { + projectLawsInventoryEO.setDesignDutyName("空"); + } + if (StringUtils.isBlank(projectLawsInventoryEO.getPrehomoDutyId())) { + userIdList.add(projectLawsInventoryEO.getPrehomoDutyId()); + }else { + projectLawsInventoryEO.setPrehomoDutyName("空"); + } + if (StringUtils.isBlank(projectLawsInventoryEO.getVerifyDutyId())) { + userIdList.add(projectLawsInventoryEO.getVerifyDutyId()); + }else { + projectLawsInventoryEO.setVerifyDutyName("空"); + } + + userIdList = userIdList.stream().distinct().collect(Collectors.toList()); + if(CollectionUtils.isNotEmpty(userIdList)){ + QueryWrapper userqueryWrapper = new QueryWrapper<>(); + List userList = sysUserService.list(userqueryWrapper.in("id ", userIdList)); + + //法规工程师 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getRegulationOwnerId())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getRegulationOwnerId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setRegulationOwnerName(userName); + } + + //认证工程师 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getHomologationEngineerId())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getHomologationEngineerId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setHomologationEngineerName(userName); + } + + //工程接口人 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getEngineeringInterfacePerson())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getEngineeringInterfacePerson())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setEngineeringInterfacePersonName(userName); + } + + + //发起人 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignInitiatorId())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getDesignInitiatorId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setDesignInitiatorName(userName); + } + if (StringUtils.isNotBlank(projectLawsInventoryEO.getPrehomoInitiatorId())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getPrehomoInitiatorId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setPrehomoInitiatorName(userName); + } + if (StringUtils.isNotBlank(projectLawsInventoryEO.getVerifyInitiatorId())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getVerifyInitiatorId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setVerifyInitiatorName(userName); + } + + //责任人 + if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignDutyId())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getDesignDutyId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setDesignDutyName(userName); + } + if (StringUtils.isNotBlank(projectLawsInventoryEO.getPrehomoDutyId())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getPrehomoDutyId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setPrehomoDutyName(userName); + } + if (StringUtils.isNotBlank(projectLawsInventoryEO.getVerifyDutyId())) { + String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getVerifyDutyId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0); + projectLawsInventoryEO.setVerifyDutyName(userName); + } + } + + + //截止时间 //设计符合性确认-截止时间 designDueDate if (projectLawsInventoryEO.getDesignDueDate() != null) { SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); @@ -1465,7 +1692,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl infoDiff,String contentLog) { + + //设置维护清单的修改消息 + if(MapUtils.isNotEmpty(infoDiff)) { + if (infoDiff.size() > 1) { + //子标题 + if (StringUtils.isNotBlank(infoDiff.get("subtitle"))) { + List list = Arrays.asList(infoDiff.get("subtitle").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.SUBTITLE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //WVTA ID + if (StringUtils.isNotBlank(infoDiff.get("wvtaId"))) { + List list = Arrays.asList(infoDiff.get("wvtaId").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.WVTA_ID.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //实施类别 + if (StringUtils.isNotBlank(infoDiff.get("implementType"))) { + List list = Arrays.asList(infoDiff.get("implementType").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //在产车实施日期 + if (StringUtils.isNotBlank(infoDiff.get("implementTimeString"))) { + List list = Arrays.asList(infoDiff.get("implementTimeString").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.IMPLEMENT_TIME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //新车型实施日期 + if (StringUtils.isNotBlank(infoDiff.get("xin1Che1Xing2Shi2Shi1Ri4Qi1String"))) { + List list = Arrays.asList(infoDiff.get("xin1Che1Xing2Shi2Shi1Ri4Qi1String").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //认证类型 + if (StringUtils.isNotBlank(infoDiff.get("attestationType"))) { + List list = Arrays.asList(infoDiff.get("attestationType").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.ATTESTATION_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //认证级别 + if (StringUtils.isNotBlank(infoDiff.get("attestationRank"))) { + List list = Arrays.asList(infoDiff.get("attestationRank").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.ATTESTATION_RANK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //责任领域 + if (StringUtils.isNotBlank(infoDiff.get("dutyTerritory"))) { + List list = Arrays.asList(infoDiff.get("dutyTerritory").split("\\|")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.DUTY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //regulationOwnerName;//法规工程师名称 + if (StringUtils.isNotBlank(infoDiff.get("regulationOwnerName"))) { + List list = Arrays.asList(infoDiff.get("regulationOwnerName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.REGULATION_OWNER_NAME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //homologationEngineerName;//认证工程师名称 + if (StringUtils.isNotBlank(infoDiff.get("homologationEngineerName"))) { + List list = Arrays.asList(infoDiff.get("homologationEngineerName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.HOMOLOGATION_ENGINEER_NAME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //engineeringInterfacePersonName;//工程接口人名称 + if (StringUtils.isNotBlank(infoDiff.get("engineeringInterfacePersonName"))) { + List list = Arrays.asList(infoDiff.get("engineeringInterfacePersonName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.ENGINEERING_INTERFACE_PERSON_NAME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //适用地区region 多选 + if (StringUtils.isNotBlank(infoDiff.get("region"))) { + List list = Arrays.asList(infoDiff.get("region").split("\\|")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.REGION.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //备注 + if (StringUtils.isNotBlank(infoDiff.get("remark"))) { + List list = Arrays.asList(infoDiff.get("remark").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.REMARK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //设计符合性确认-交付物类型 + if (StringUtils.isNotBlank(infoDiff.get("designDeliverableType"))) { + List list = Arrays.asList(infoDiff.get("designDeliverableType").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.DESIGN_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //设计符合性确认-交付物模板 + if (StringUtils.isNotBlank(infoDiff.get("designDeliverableTemplate"))) { + List list = Arrays.asList(infoDiff.get("designDeliverableTemplate").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.DESIGN_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //设计符合性确认-发起人 + if (StringUtils.isNotBlank(infoDiff.get("designInitiatorName"))) { + List list = Arrays.asList(infoDiff.get("designInitiatorName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.DESIGN_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //设计符合性确认-责任人 + if (StringUtils.isNotBlank(infoDiff.get("designDutyName"))) { + List list = Arrays.asList(infoDiff.get("designDutyName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.DESIGN_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //设计符合性确认-截止时间designDueDateString; + if (StringUtils.isNotBlank(infoDiff.get("designDueDateString"))) { + List list = Arrays.asList(infoDiff.get("designDueDateString").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //prehomo确认-交付物类型 + if (StringUtils.isNotBlank(infoDiff.get("prehomoDeliverableType"))) { + List list = Arrays.asList(infoDiff.get("prehomoDeliverableType").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.PREHOMO_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //prehomo确认-交付物模板 + if (StringUtils.isNotBlank(infoDiff.get("prehomoDeliverableTemplate"))) { + List list = Arrays.asList(infoDiff.get("prehomoDeliverableTemplate").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.PREHOMO_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //prehomo确认-发起人 + if (StringUtils.isNotBlank(infoDiff.get("prehomoInitiatorName"))) { + List list = Arrays.asList(infoDiff.get("prehomoInitiatorName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.PREHOMO_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //prehomo确认-责任人 + if (StringUtils.isNotBlank(infoDiff.get("prehomoDutyName"))) { + List list = Arrays.asList(infoDiff.get("prehomoDutyName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.PREHOMO_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //prehomo确认-截止时间prehomoDueDateString; + if (StringUtils.isNotBlank(infoDiff.get("prehomoDueDateString"))) { + List list = Arrays.asList(infoDiff.get("prehomoDueDateString").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + + //验证符合性确认-交付物类型 + if (StringUtils.isNotBlank(infoDiff.get("verifyDeliverableType"))) { + List list = Arrays.asList(infoDiff.get("verifyDeliverableType").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.VERIFY_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //验证符合性确认-交付物模板 + if (StringUtils.isNotBlank(infoDiff.get("verifyDeliverableTemplate"))) { + List list = Arrays.asList(infoDiff.get("verifyDeliverableTemplate").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.VERIFY_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //验证符合性确认-发起人 + if (StringUtils.isNotBlank(infoDiff.get("verifyInitiatorName"))) { + List list = Arrays.asList(infoDiff.get("verifyInitiatorName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.VERIFY_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //验证符合性确认-责任人 + if (StringUtils.isNotBlank(infoDiff.get("verifyDutyName"))) { + List list = Arrays.asList(infoDiff.get("verifyDutyName").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.VERIFY_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + //验证符合性确认-截止时间verifyDueDateString + if (StringUtils.isNotBlank(infoDiff.get("verifyDueDateString"))) { + List list = Arrays.asList(infoDiff.get("verifyDueDateString").split(",")); + String infoDiffOld = list.get(0); + String infoDiffNew = list.get(1); + contentLog += ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ","; + } + } + } + + contentLog = contentLog.substring(0, contentLog.length()-1); + return contentLog; + } } From 59c87137aeda9085e6009314f746597baa6c725f Mon Sep 17 00:00:00 2001 From: xiejunyu Date: Wed, 18 May 2022 17:30:45 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E6=B8=85=E5=8D=95log?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectLawsInventoryLogEOController.java | 26 ++++++++++--------- .../entity/ProjectLawsInventoryLogEO.java | 6 ++--- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryLogEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryLogEOController.java index e6a31ea30..0915efcd9 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryLogEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryLogEOController.java @@ -1,25 +1,26 @@ package com.jero.modules.project.controller; -import java.util.Arrays; -import java.util.List; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import com.jero.common.api.vo.Result; -import com.jero.common.system.query.QueryGenerator; -import com.jero.modules.project.entity.ProjectLawsInventoryLogEO; -import com.jero.modules.project.service.IProjectLawsInventoryLogEOService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.extern.slf4j.Slf4j; +import com.jero.common.api.vo.Result; +import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.system.base.controller.JeroController; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.project.entity.ProjectLawsInventoryLogEO; +import com.jero.modules.project.service.IProjectLawsInventoryLogEOService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import com.jero.common.aspect.annotation.AutoLog; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; /** @@ -53,6 +54,7 @@ public class ProjectLawsInventoryLogEOController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryLogEO, req.getParameterMap()); + queryWrapper.orderByDesc("create_time"); Page page = new Page(pageNo, pageSize); IPage pageList = projectLawsInventoryLogEOService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryLogEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryLogEO.java index 91fb87e01..730d4e430 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryLogEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryLogEO.java @@ -58,9 +58,9 @@ public class ProjectLawsInventoryLogEO implements Serializable { @ApiModelProperty(value = "所属部门") private String sysOrgCode; - /**法规清单表id*/ - @Excel(name = "法规清单表id", width = 15) - @ApiModelProperty(value = "法规清单表id") + /**项目id*/ + @Excel(name = "项目id", width = 15) + @ApiModelProperty(value = "项目id") private String projectLibraryId; /**log内容*/ From a7746bac733851f111282837c0238a6f61cf2eb2 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 18 May 2022 18:02:02 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectStatusBoard/index.vue | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/jero-web/src/views/projectManagement/projectStatusBoard/index.vue b/jero-web/src/views/projectManagement/projectStatusBoard/index.vue index 2bc35db56..b6ae4c56c 100644 --- a/jero-web/src/views/projectManagement/projectStatusBoard/index.vue +++ b/jero-web/src/views/projectManagement/projectStatusBoard/index.vue @@ -36,16 +36,19 @@ + > + +
@@ -203,6 +206,7 @@ this.getTimeline() }, hodeChange() { + this.getTime = [] this.startTime = undefined this.endTime = undefined this.getTimeline() @@ -267,6 +271,10 @@ } } } + let num = timeList.length * 3 + if (num < 31) { + num = 31 + } option = { legend: { data: ['Punch Card'], @@ -300,7 +308,7 @@ position: 'top', axisLabel: { showMinLabel: true, - interval: 31, + interval: num, textStyle: { fontFamily: 'Blue Sky Noto', color: '#000F16', From 70429978385615b0176c600c6e4cb4dd4b3bf7be Mon Sep 17 00:00:00 2001 From: liyawei Date: Wed, 18 May 2022 18:13:01 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86-=E5=90=8C=E6=AD=A5=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/enums/ModuleEnum.java | 3 +- .../jero/common/constant/enums/TableEnum.java | 3 +- .../impl/OnlCgformFieldServiceImpl.java | 2 + .../ParamsCollectManifestEOController.java | 51 +++ ...amsCollectManifestHistoryEOController.java | 2 + .../controller/ParamsConfigEOController.java | 5 +- .../ParamsManifestEOController.java | 27 +- .../xml/ParamsCollectManifestEOMapper.xml | 4 +- .../ParamsCollectManifestHistoryEOMapper.xml | 18 +- .../IParamsCollectManifestEOService.java | 3 + .../service/IParamsManifestEOService.java | 4 +- .../ParamsCollectManifestEOServiceImpl.java | 131 +++++- ...msCollectManifestHistoryEOServiceImpl.java | 12 +- .../impl/ParamsManifestEOServiceImpl.java | 8 +- .../ParamsExportTemplateEOController.java | 223 ++++++++++ .../ParamsReportDetailEOController.java | 81 ++++ .../controller/ParamsReportEOController.java | 181 ++++++++ ...ortCertCategoryParamsInfoEOController.java | 170 ++++++++ .../report/entity/ParamsExportTemplateEO.java | 81 ++++ .../entity/ParamsReportConfigDataEO.java | 27 ++ .../report/entity/ParamsReportConfigEO.java | 27 ++ .../report/entity/ParamsReportDetailEO.java | 38 ++ .../cert/report/entity/ParamsReportEO.java | 78 ++++ .../ReportCertCategoryParamsInfoEO.java | 27 ++ .../report/enums/ExportTemplateStateEnum.java | 64 +++ .../mapper/ParamsExportTemplateEOMapper.java | 14 + .../ParamsReportConfigDataEOMapper.java | 14 + .../mapper/ParamsReportConfigEOMapper.java | 14 + .../mapper/ParamsReportDetailEOMapper.java | 19 + .../report/mapper/ParamsReportEOMapper.java | 18 + .../ReportCertCategoryParamsInfoEOMapper.java | 14 + .../xml/ParamsExportTemplateEOMapper.xml | 16 + .../xml/ParamsReportConfigDataEOMapper.xml | 17 + .../mapper/xml/ParamsReportConfigEOMapper.xml | 20 + .../mapper/xml/ParamsReportDetailEOMapper.xml | 64 +++ .../mapper/xml/ParamsReportEOMapper.xml | 49 +++ .../ReportCertCategoryParamsInfoEOMapper.xml | 19 + .../IParamsExportTemplateEOService.java | 63 +++ .../IParamsReportConfigDataEOService.java | 22 + .../service/IParamsReportConfigEOService.java | 16 + .../service/IParamsReportDetailEOService.java | 34 ++ .../service/IParamsReportEOService.java | 70 +++ ...ReportCertCategoryParamsInfoEOService.java | 61 +++ .../ParamsExportTemplateEOServiceImpl.java | 145 +++++++ .../ParamsReportConfigDataEOServiceImpl.java | 34 ++ .../impl/ParamsReportConfigEOServiceImpl.java | 34 ++ .../impl/ParamsReportDetailEOServiceImpl.java | 410 ++++++++++++++++++ .../impl/ParamsReportEOServiceImpl.java | 121 ++++++ ...rtCertCategoryParamsInfoEOServiceImpl.java | 90 ++++ .../controller/ParamsInfoEOController.java | 18 +- .../ParamsTemplateEOController.java | 34 +- ...ertCategoryParamsInfoPublishEOService.java | 5 +- .../service/IParamsInfoEOService.java | 4 +- .../service/IParamsTemplateEOService.java | 8 +- ...ategoryParamsInfoPublishEOServiceImpl.java | 11 + .../service/impl/ParamsInfoEOServiceImpl.java | 8 +- .../impl/ParamsTemplateEOServiceImpl.java | 16 +- 57 files changed, 2661 insertions(+), 91 deletions(-) create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsExportTemplateEOController.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportDetailEOController.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ReportCertCategoryParamsInfoEOController.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsExportTemplateEO.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigDataEO.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigEO.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailEO.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportEO.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ReportCertCategoryParamsInfoEO.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/enums/ExportTemplateStateEnum.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsExportTemplateEOMapper.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportConfigDataEOMapper.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportConfigEOMapper.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailEOMapper.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportEOMapper.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ReportCertCategoryParamsInfoEOMapper.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsExportTemplateEOMapper.xml create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportConfigDataEOMapper.xml create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportConfigEOMapper.xml create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportEOMapper.xml create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ReportCertCategoryParamsInfoEOMapper.xml create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsExportTemplateEOService.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigDataEOService.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigEOService.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportEOService.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IReportCertCategoryParamsInfoEOService.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsExportTemplateEOServiceImpl.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigDataEOServiceImpl.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigEOServiceImpl.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportEOServiceImpl.java create mode 100644 jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ReportCertCategoryParamsInfoEOServiceImpl.java diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/ModuleEnum.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/ModuleEnum.java index 3d6e6f714..7baf2b13b 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/ModuleEnum.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/ModuleEnum.java @@ -12,7 +12,8 @@ public enum ModuleEnum { FILE_SPLIT_ITEMS("文档拆分条款","4"), ONL_CGFORM_COLLECTION("我的收藏","5"), ONL_CGFORM_SUBSCRIBE("我的订阅","6"), - PARAMS_COLLECT_MANIFEST("参数收集清单","7"); + PARAMS_COLLECT_MANIFEST("参数收集清单","7"), + PARAMS_REPORT_DETAIL("上报库参数项","8"); String name; diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/TableEnum.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/TableEnum.java index 659566035..e70566771 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/TableEnum.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/TableEnum.java @@ -14,7 +14,8 @@ public enum TableEnum { TAG_AREA("onl_cgform_area"), ONL_CGFORM_COLLECTION("onl_cgform_collection"), ONL_CGFORM_SUBSCRIBE("onl_cgform_subscribe"), - PARAMS_COLLECT_MANIFEST("params_collect_manifest"); + PARAMS_COLLECT_MANIFEST("params_collect_manifest"), + PARAMS_REPORT_DETAIL("params_report_detail"); String table; diff --git a/jero-boot/jero-boot-base/jero-boot-base-generater/src/main/java/com/jero/generater/modules/online/cgform/service/impl/OnlCgformFieldServiceImpl.java b/jero-boot/jero-boot-base/jero-boot-base-generater/src/main/java/com/jero/generater/modules/online/cgform/service/impl/OnlCgformFieldServiceImpl.java index 429af7206..ac9427ef8 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-generater/src/main/java/com/jero/generater/modules/online/cgform/service/impl/OnlCgformFieldServiceImpl.java +++ b/jero-boot/jero-boot-base/jero-boot-base-generater/src/main/java/com/jero/generater/modules/online/cgform/service/impl/OnlCgformFieldServiceImpl.java @@ -828,6 +828,8 @@ public class OnlCgformFieldServiceImpl extends ServiceImpl>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId, @RequestParam(name = "flag") String flag, @RequestParam(name = "cut") String cut) { @@ -60,6 +61,7 @@ public class ParamsCollectManifestEOController extends JeroController>> queryList(ParamsCollectManifestEO paramsCollectManifestEO, @RequestParam(name = "cut") String cut) { if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { @@ -85,6 +87,7 @@ public class ParamsCollectManifestEOController extends JeroController submit(@RequestBody ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.submit(paramsCollectManifestVO.getConfigDataList()); if (isSuccess) { @@ -103,6 +106,7 @@ public class ParamsCollectManifestEOController extends JeroController> paramsInfoList(ParamsCollectManifestVO paramsCollectManifestVO, @RequestParam(name = "cut") String cut) { if (StringUtils.isNotEmpty(paramsCollectManifestVO.getNioNumber())) { @@ -125,6 +129,7 @@ public class ParamsCollectManifestEOController extends JeroController add(@Validated @RequestBody ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.add(paramsCollectManifestVO); if (isSuccess) { @@ -143,6 +148,7 @@ public class ParamsCollectManifestEOController extends JeroController deleteBatch(@RequestParam(name="ids",required=true) String ids) { boolean isSuccess = paramsCollectManifestEOService.deleteByIds(Arrays.asList(ids.split(","))); if (isSuccess) { @@ -161,6 +167,7 @@ public class ParamsCollectManifestEOController extends JeroController>> querySdtList(ParamsCollectManifestVO paramsCollectManifestVO) { List> sdtList = paramsCollectManifestEOService.querySdtList(paramsCollectManifestVO); return Result.OK(sdtList); @@ -175,6 +182,7 @@ public class ParamsCollectManifestEOController extends JeroController getLoginUserTypes(ParamsCollectManifestVO paramsCollectManifestVO) { String loginUserType = paramsCollectManifestEOService.getLoginUserTypes(paramsCollectManifestVO); return Result.OK(loginUserType); @@ -189,6 +197,7 @@ public class ParamsCollectManifestEOController extends JeroController back(ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.goBack(paramsCollectManifestVO); if (isSuccess) { @@ -207,6 +216,7 @@ public class ParamsCollectManifestEOController extends JeroController withdraw(ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.withdraw(paramsCollectManifestVO); if (isSuccess) { @@ -225,6 +235,7 @@ public class ParamsCollectManifestEOController extends JeroController updateDeadlineBatch(ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.updateDeadlineBatch(paramsCollectManifestVO); if (isSuccess) { @@ -243,6 +254,7 @@ public class ParamsCollectManifestEOController extends JeroController updateSdt(ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.updateSdt(paramsCollectManifestVO); if (isSuccess) { @@ -261,6 +273,7 @@ public class ParamsCollectManifestEOController extends JeroController updateDreBatch(ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.updateDreBatch(paramsCollectManifestVO); if (isSuccess) { @@ -279,6 +292,7 @@ public class ParamsCollectManifestEOController extends JeroController issueCollection(ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.issueCollection(paramsCollectManifestVO); if (isSuccess) { @@ -297,6 +311,7 @@ public class ParamsCollectManifestEOController extends JeroController getConfigLableList(ParamsCollectManifestVO paramsCollectManifestVO) { List> configLableList = paramsCollectManifestEOService.getConfigLabelList(paramsCollectManifestVO); return Result.OK(configLableList); @@ -311,6 +326,7 @@ public class ParamsCollectManifestEOController extends JeroController lockConfigColumn(ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.lockConfigColumn(paramsCollectManifestVO); if (isSuccess) { @@ -320,6 +336,21 @@ public class ParamsCollectManifestEOController extends JeroController getConfigLableListRefer(ParamsCollectManifestVO paramsCollectManifestVO) { + List> configLableList = paramsCollectManifestEOService.getConfigLabelList(paramsCollectManifestVO); + return Result.OK(configLableList); + } + /** * 引用参数 * @@ -329,6 +360,7 @@ public class ParamsCollectManifestEOController extends JeroController referParams(ParamsCollectManifestVO paramsCollectManifestVO) { boolean isSuccess = paramsCollectManifestEOService.referParams(paramsCollectManifestVO); if (isSuccess) { @@ -338,6 +370,25 @@ public class ParamsCollectManifestEOController extends JeroController syncReport(ParamsCollectManifestVO paramsCollectManifestVO) { + boolean isSuccess = paramsCollectManifestEOService.syncReport(paramsCollectManifestVO); + if (isSuccess) { + return Result.OK("同步上报库成功!"); + } else { + return Result.error("同步上报库失败!"); + } + } + diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java index b13c01964..fe62106ff 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java @@ -47,6 +47,7 @@ public class ParamsCollectManifestHistoryEOController extends JeroController>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId, @RequestParam(name = "flag") String flag, @RequestParam(name = "cut") String cut) { @@ -62,6 +63,7 @@ public class ParamsCollectManifestHistoryEOController extends JeroController>> queryList(ParamsCollectManifestEO paramsCollectManifestEO, @RequestParam(name = "cut") String cut) { if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsConfigEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsConfigEOController.java index 30fc6a374..1590a416a 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsConfigEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsConfigEOController.java @@ -3,9 +3,9 @@ package com.jero.modules.cert.collect.controller; import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.system.base.controller.JeroController; -import com.jero.modules.cert.collect.vo.ParamsConfigVO; import com.jero.modules.cert.collect.entity.ParamsConfigEO; import com.jero.modules.cert.collect.service.IParamsConfigEOService; +import com.jero.modules.cert.collect.vo.ParamsConfigVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -38,6 +38,7 @@ public class ParamsConfigEOController extends JeroController> queryList(@RequestParam(name = "cut") String cut, @RequestParam(name = "paramsManifestId") String paramsManifestId) { List list = paramsConfigEOService.queryList(paramsManifestId); @@ -52,6 +53,7 @@ public class ParamsConfigEOController extends JeroController addBatch(@RequestBody ParamsConfigVO paramsConfigVO) { String paramsManifestId = paramsConfigVO.getParamsManifestId(); if (StringUtils.isBlank(paramsManifestId)) { @@ -69,6 +71,7 @@ public class ParamsConfigEOController extends JeroController getById(@RequestParam(name = "id") String id) { ParamsConfigEO paramsConfigEO = paramsConfigEOService.getById(id); return Result.OK(paramsConfigEO); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsManifestEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsManifestEOController.java index abb28d294..70e7f4263 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsManifestEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsManifestEOController.java @@ -52,6 +52,7 @@ public class ParamsManifestEOController extends JeroController queryPageList(ParamsManifestEO paramsManifestEO, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @@ -74,6 +75,7 @@ public class ParamsManifestEOController extends JeroController> getParamsTemplateList(ParamsTemplateEO paramsTemplateEO, @RequestParam(name="cut") String cut) { List list = paramsManifestEOService.getNewestPublishList(paramsTemplateEO); @@ -88,6 +90,7 @@ public class ParamsManifestEOController extends JeroController verifyTitle(String title, String projectId) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ParamsManifestEO::getTitle, title); @@ -108,6 +111,7 @@ public class ParamsManifestEOController extends JeroController add(@Validated @RequestBody ParamsManifestEO paramsManifestEO) { boolean isSuccess = paramsManifestEOService.add(paramsManifestEO); if (isSuccess) { @@ -126,6 +130,7 @@ public class ParamsManifestEOController extends JeroController edit(@Validated @RequestBody ParamsManifestEO paramsManifestEO) { boolean isSuccess = paramsManifestEOService.editById(paramsManifestEO); if (isSuccess) { @@ -144,9 +149,14 @@ public class ParamsManifestEOController extends JeroController delete(@RequestParam(name="id",required=true) String id) { - paramsManifestEOService.deleteById(id); - return Result.OK("删除成功!"); + boolean isSuccess = paramsManifestEOService.deleteById(id); + if (isSuccess) { + return Result.OK("删除成功!"); + } else { + return Result.error("删除失败!"); + } } /** @@ -158,9 +168,14 @@ public class ParamsManifestEOController extends JeroController deleteBatch(@RequestParam(name="ids",required=true) String ids) { - paramsManifestEOService.deleteByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); + boolean isSuccess = paramsManifestEOService.deleteByIds(Arrays.asList(ids.split(","))); + if (isSuccess) { + return Result.OK("批量删除成功!"); + } else { + return Result.error("批量删除失败!"); + } } /** @@ -172,6 +187,7 @@ public class ParamsManifestEOController extends JeroController changeExtension(@RequestParam(name="id",required=true) String id) { boolean isSuccess = paramsManifestEOService.changeExtension(id); if(isSuccess) { @@ -190,6 +206,7 @@ public class ParamsManifestEOController extends JeroController history(@RequestParam(name="title",required=true) String title) { List historyVersionList = paramsManifestEOService.getHistoryVersionList(title); return Result.OK(historyVersionList); @@ -204,6 +221,7 @@ public class ParamsManifestEOController extends JeroController getAllManifest(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="projectName",required=false) String projectName) { @@ -221,6 +239,7 @@ public class ParamsManifestEOController extends JeroController copy(ParamsManifestEO paramsManifestEO, @RequestParam(name="sourceManifestId",required=true) String sourceManifestId) { ParamsManifestEO manifestEO = paramsManifestEOService.copy(paramsManifestEO, sourceManifestId); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml index 8ce0ee2b9..eae391745 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml @@ -44,10 +44,10 @@ AND dre LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.dre}),'%') - AND duty_territory LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.dutyTerritory}),'%') + AND duty_territory = #{paramsCollectManifestEO.dutyTerritory} - AND params_manifest_id LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.paramsManifestId}),'%') + AND params_manifest_id = #{paramsCollectManifestEO.paramsManifestId} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml index feae422a6..fe002e106 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml @@ -26,7 +26,6 @@ - @@ -44,23 +43,10 @@ AND dre LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.dre}),'%') - AND duty_territory LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.dutyTerritory}),'%') + AND duty_territory = #{paramsCollectManifestEO.dutyTerritory} - AND params_manifest_id LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.paramsManifestId}),'%') - - - - - AND sdt = #{paramsCollectManifestEO.sdt} - - - AND dre = #{paramsCollectManifestEO.dre} - - - AND (sdt = #{paramsCollectManifestEO.sdt} or dre = #{paramsCollectManifestEO.dre}) - - + AND params_manifest_id = #{paramsCollectManifestEO.paramsManifestId} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java index 75021bbe6..89c250855 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java @@ -119,4 +119,7 @@ public interface IParamsCollectManifestEOService extends IService { * @param id * @return */ - void deleteById(String id); + boolean deleteById(String id); /** * 批量删除 @@ -46,7 +46,7 @@ public interface IParamsManifestEOService extends IService { * @param ids * @return */ - void deleteByIds(List ids); + boolean deleteByIds(List ids); /** * 通过id查询 diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 919421c46..877850cf0 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -15,6 +15,7 @@ import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServi import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.jero.modules.cert.collect.entity.ParamsConfigDataEO; import com.jero.modules.cert.collect.entity.ParamsConfigEO; +import com.jero.modules.cert.collect.entity.ParamsManifestEO; import com.jero.modules.cert.collect.enums.CollectManifestStateEnum; import com.jero.modules.cert.collect.enums.CollectManifestUserTypeEnum; import com.jero.modules.cert.collect.enums.ConfigDataTypeEnum; @@ -23,10 +24,15 @@ import com.jero.modules.cert.collect.mapper.ParamsCollectManifestEOMapper; import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService; import com.jero.modules.cert.collect.service.IParamsConfigDataEOService; import com.jero.modules.cert.collect.service.IParamsConfigEOService; +import com.jero.modules.cert.collect.service.IParamsManifestEOService; import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; import com.jero.modules.cert.collect.vo.ParamsConfigDataVO; +import com.jero.modules.cert.report.entity.*; +import com.jero.modules.cert.report.service.*; +import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO; import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; import com.jero.modules.cert.template.enums.ControlTypeEnum; +import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOService; import com.jero.modules.cert.template.service.IParamsInfoPublishEOService; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.ocr.util.LineHumpUtil; @@ -66,36 +72,42 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl paramsCollectManifestIdList = Arrays.asList(paramsCollectManifestIds.split(",")); + ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId); + + // 根据收集库清单id 的是否上报过 + boolean isSync = paramsReportEOService.isSync(paramsManifestId); + String reportId = null; + if (!isSync) { + reportId = UUID.randomUUID().toString().replace("-",""); + } else { + ParamsReportEO paramsReportEO = paramsReportEOService.queryByOldParamsManifestId(paramsManifestId); + reportId = paramsReportEO.getId(); + } + + // 配置 + List paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); + List addReportConfigEOList = new ArrayList<>(); + List addReportCertCategoryParamsInfoEOList = new ArrayList<>(); + if (!isSync) { // 未上报 + // 复制配置 + for (ParamsConfigEO configEO : paramsConfigEOList) { + ParamsReportConfigEO addReportConfigEO = new ParamsReportConfigEO(); + BeanUtils.copyProperties(configEO, addReportConfigEO); // 全盘复制,包括id + addReportConfigEO.setParamsManifestId(reportId); + addReportConfigEOList.add(addReportConfigEO); + } + + } + + // 添加参数项到上报库 + List paramsCollectManifestEOList = paramsCollectManifestEOMapper.selectBatchIds(paramsCollectManifestIdList); + List addReportDetailEOList = new ArrayList<>(); + List addReportConfigDataEOList = new ArrayList<>(); // 需要添加的配置数据 + Date syncTime = new Date(); + for (ParamsCollectManifestEO collectManifestEO : paramsCollectManifestEOList) { + ParamsReportDetailEO addReportDetailEO = new ParamsReportDetailEO(); + BeanUtils.copyProperties(collectManifestEO, addReportDetailEO); + String reportDetailId = UUID.randomUUID().toString().replace("-",""); + addReportDetailEO.setId(reportDetailId); + addReportDetailEO.setParamsManifestId(reportId); + addReportDetailEO.setSyncTime(syncTime); + addReportDetailEOList.add(addReportDetailEO); + + // 添加配置数据 + for (ParamsConfigEO configEO : paramsConfigEOList) { + ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId()); + + ParamsReportConfigDataEO addReportConfigDataEO = new ParamsReportConfigDataEO(); + BeanUtils.copyProperties(configDataEO, addReportConfigDataEO); + addReportConfigDataEO.setParamsCollectManifestId(reportDetailId); + addReportConfigDataEOList.add(addReportConfigDataEO); + + } + } + + // 复制认证类别参数 + List nioNumberList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList()); + List certCategoryParamsInfoPublishEOS = certCategoryParamsInfoPublishEOService.queryListByVersionAndNio(paramsManifestEO.getParamsTemplateId(), paramsManifestEO.getParamsTemplatePublishVersion(), nioNumberList); + for (CertCategoryParamsInfoPublishEO ccpi : certCategoryParamsInfoPublishEOS) { + ReportCertCategoryParamsInfoEO addCcpi = new ReportCertCategoryParamsInfoEO(); + BeanUtils.copyProperties(ccpi, addCcpi); // 全盘复制,包括id + addReportCertCategoryParamsInfoEOList.add(addCcpi); + } + + // 添加认证类别参数信息 + reportCertCategoryParamsInfoEOService.saveBatch(addReportCertCategoryParamsInfoEOList); + + // 添加参数项 + paramsReportDetailEOService.saveBatch(addReportDetailEOList); + + // 添加配置 + paramsReportConfigEOService.saveBatch(addReportConfigEOList); + + // 添加配置数据 + paramsReportConfigDataEOService.saveBatch(addReportConfigDataEOList); + + // 添加上报库 + ParamsReportEO addReportEO = new ParamsReportEO(); + addReportEO.setId(reportId); + addReportEO.setOldParamsManifestId(paramsManifestId); + addReportEO.setVersion(paramsManifestEO.getVersion()); + paramsReportEOService.save(addReportEO); + + // 修改收集库参数项状态 + List updateEOList = new ArrayList<>(); + + for (String paramsCollectManifestId : paramsCollectManifestIdList) { + ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO(); + updateEO.setId(paramsCollectManifestId); + updateEO.setState(CollectManifestStateEnum.SYNC_REPORT.getValue()); // 设置状态为:待工程接口人处理 + updateEOList.add(updateEO); + } + return updateBatchById(updateEOList); + } + /** * 实体对象转成Map * @param obj 实体对象 diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java index d97d4d1ef..521705105 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java @@ -61,17 +61,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl> queryList(ParamsCollectManifestEO paramsCollectManifestEO, String cut) { String paramsManifestId = paramsCollectManifestEO.getParamsManifestId(); -// String userTypes = paramsCollectManifestEO.getUserTypes(); -// LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户 -// if ("sdt".equals(userTypes)) { -// paramsCollectManifestEO.setSdt(loginUser.getUsername()); -// } else if ("dre".equals(userTypes)) { -// paramsCollectManifestEO.setDre(loginUser.getUsername()); -// } else if ("sdt,dre".equals(userTypes)) { -// paramsCollectManifestEO.setSdt(loginUser.getUsername()); -// paramsCollectManifestEO.setDre(loginUser.getUsername()); -// } - List list = paramsCollectManifestHistoryEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列 TODO 添加用户类型权限 + List list = paramsCollectManifestHistoryEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列 List paramsConfigEOList = paramsConfigHistoryEOService.queryList(paramsManifestId); // 查询配置列 // 普通数据字典 diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java index f1b308981..9366a6495 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java @@ -149,7 +149,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl configEOQueryWrapper = new LambdaQueryWrapper<>(); configEOQueryWrapper.eq(ParamsConfigEO::getParamsManifestId, id); @@ -165,7 +165,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl ids) { + public boolean deleteByIds(List ids) { // 关联删除配置 LambdaQueryWrapper configEOQueryWrapper = new LambdaQueryWrapper<>(); @@ -191,7 +191,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl { + @Autowired + private IParamsExportTemplateEOService paramsExportTemplateEOService; + + /** + * 分页列表查询 + * + * @param paramsExportTemplateEO + * @param pageNo + * @param pageSize + * @param cut + * @return + */ + @AutoLog(value = "参数导出模板表-分页列表查询") + @ApiOperation(value="参数导出模板表-分页列表查询", notes="参数导出模板表-分页列表查询") + @GetMapping(value = "/page") +// @RequiresPermissions("report:exportTemplate:page") + public Result queryPageList(ParamsExportTemplateEO paramsExportTemplateEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + @RequestParam(name="cut") String cut) { + if (StringUtils.isNotEmpty(paramsExportTemplateEO.getTemplateName())) { + paramsExportTemplateEO.setTemplateName(paramsExportTemplateEO.getTemplateName().replace("%", "\\%")); + } + + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.like(StringUtils.isNotEmpty(paramsExportTemplateEO.getTemplateName()), ParamsExportTemplateEO::getTemplateName, paramsExportTemplateEO.getTemplateName()); + Page page = new Page(pageNo, pageSize); + IPage pageList = paramsExportTemplateEOService.page(page, queryWrapper); + List rows = pageList.getRecords(); + Map stateMap = ExportTemplateStateEnum.toMap(cut); + rows.forEach(exportTemplateEO -> { + exportTemplateEO.setState(stateMap.get(exportTemplateEO.getState())); + }); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "参数导出模板表-列表查询") + @ApiOperation(value="参数导出模板表-列表查询", notes="参数导出模板表-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = paramsExportTemplateEOService.queryList(); + return Result.OK(list); + } + + /** + * 模板名称唯一校验 + * true-唯一,false-不唯一 + * @return + */ + @AutoLog(value = "参数导出模板表-模板名称唯一校验") + @ApiOperation(value="参数导出模板表-模板名称唯一校验", notes="参数导出模板表-模板名称唯一校验") + @GetMapping(value = "/verifyTemplateName") +// @RequiresPermissions("report:exportTemplate:add") + public Result verifyTemplateName(@RequestParam(name="templateName") String templateName) { + boolean isRepeat = paramsExportTemplateEOService.verifyTemplateName(templateName); + return Result.OK(isRepeat); + } + + + /** + * 添加 + * + * @param paramsExportTemplateEO + * @return + */ + @AutoLog(value = "参数导出模板表-添加") + @ApiOperation(value="参数导出模板表-添加", notes="参数导出模板表-添加") + @PostMapping(value = "/add") +// @RequiresPermissions("report:exportTemplate:add") + public Result add(@Validated @RequestBody ParamsExportTemplateEO paramsExportTemplateEO) { + boolean isSuccess = paramsExportTemplateEOService.add(paramsExportTemplateEO); + if (isSuccess) { + return Result.OK("添加成功!"); + } else { + return Result.error("添加失败!"); + } + } + + /** + * 编辑 + * + * @param paramsExportTemplateEO + * @return + */ + @AutoLog(value = "参数导出模板表-编辑") + @ApiOperation(value="参数导出模板表-编辑", notes="参数导出模板表-编辑") + @PostMapping(value = "/edit") +// @RequiresPermissions("report:exportTemplate:edit") + public Result edit(@Validated @RequestBody ParamsExportTemplateEO paramsExportTemplateEO) { + boolean isSuccess = paramsExportTemplateEOService.editById(paramsExportTemplateEO); + if (isSuccess) { + return Result.OK("编辑成功!"); + } else { + return Result.error("编辑失败!"); + } + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "参数导出模板表-通过id删除") + @ApiOperation(value="参数导出模板表-通过id删除", notes="参数导出模板表-通过id删除") + @GetMapping(value = "/delete") +// @RequiresPermissions("report:exportTemplate:delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + boolean isSuccess = paramsExportTemplateEOService.deleteById(id); + if (isSuccess) { + return Result.OK("删除成功!"); + } else { + return Result.error("删除失败!"); + } + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "参数导出模板表-批量删除") + @ApiOperation(value="参数导出模板表-批量删除", notes="参数导出模板表-批量删除") + @PostMapping(value = "/deleteBatch") +// @RequiresPermissions("report:exportTemplate:deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + boolean isSuccess = paramsExportTemplateEOService.deleteByIds(Arrays.asList(ids.split(","))); + if (isSuccess) { + return Result.OK("批量删除成功!"); + } else { + return Result.error("批量删除失败!"); + } + } + + + + + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "参数导出模板表-通过id查询") + @ApiOperation(value="参数导出模板表-通过id查询", notes="参数导出模板表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.queryById(id); + if(paramsExportTemplateEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(paramsExportTemplateEO); + } + + /** + * 导出excel + * + * @param request + * @param paramsExportTemplateEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ParamsExportTemplateEO paramsExportTemplateEO) { + return super.exportXls(request, paramsExportTemplateEO, ParamsExportTemplateEO.class, "参数导出模板表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ParamsExportTemplateEO.class); + } + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportDetailEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportDetailEOController.java new file mode 100644 index 000000000..9a77fc4bd --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportDetailEOController.java @@ -0,0 +1,81 @@ +package com.jero.modules.cert.report.controller; + +import com.jero.common.api.vo.Result; +import com.jero.common.aspect.annotation.AutoLog; +import com.jero.common.system.base.controller.JeroController; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import com.jero.modules.cert.report.entity.ParamsReportDetailEO; +import com.jero.modules.cert.report.service.IParamsReportDetailEOService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + + +/** + * @Description: 上报库参数项 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Api(tags="上报库参数项") +@RestController +@RequestMapping("/report/detail") +@Slf4j +public class ParamsReportDetailEOController extends JeroController { + @Autowired + private IParamsReportDetailEOService paramsReportDetailEOService; + + /** + * 表头中英文切换 + * + * @return + */ + @AutoLog(value = "上报库参数项-表头中英文切换") + @ApiOperation(value="上报库参数项-表头中英文切换", notes="上报库参数项-表头中英文切换") + @GetMapping(value = "/getHeader") +// @RequiresPermissions("report:detail:list") + public Result>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId, + @RequestParam(name = "flag") String flag, + @RequestParam(name = "cut") String cut) { + List> list = paramsReportDetailEOService.getHeader(paramsManifestId, flag, cut); + return Result.OK(list); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "上报库参数项-列表查询") + @ApiOperation(value="上报库参数项-列表查询", notes="上报库参数项-列表查询") + @GetMapping(value = "/list") +// @RequiresPermissions("report:detail:list") + public Result>> queryList(ParamsCollectManifestEO paramsCollectManifestEO, + @RequestParam(name = "cut") String cut) { + if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { + paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%")); + } + if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) { + paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%")); + } + if (StringUtils.isNotEmpty(paramsCollectManifestEO.getSdt())) { + paramsCollectManifestEO.setSdt(paramsCollectManifestEO.getSdt().replace("%","\\%")); + } + if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) { + paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%")); + } + + List> list = paramsReportDetailEOService.queryList(paramsCollectManifestEO, cut); + return Result.OK(list); + } + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java new file mode 100644 index 000000000..be73a96d3 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java @@ -0,0 +1,181 @@ +package com.jero.modules.cert.report.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jero.common.api.vo.Result; +import com.jero.common.aspect.annotation.AutoLog; +import com.jero.common.system.base.controller.JeroController; +import com.jero.modules.cert.report.entity.ParamsReportEO; +import com.jero.modules.cert.report.service.IParamsReportEOService; +import com.jero.modules.system.util.StringUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; + + + /** + * @Description: 上报库 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Api(tags="上报库") +@RestController +@RequestMapping("/params/report") +@Slf4j +public class ParamsReportEOController extends JeroController { + @Autowired + private IParamsReportEOService paramsReportEOService; + + /** + * 分页列表查询 + * + * @param paramsReportEO + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "上报库-分页列表查询") + @ApiOperation(value="上报库-分页列表查询", notes="上报库-分页列表查询") + @GetMapping(value = "/page") +// @RequiresPermissions("params:report:page") + public Result queryPageList(ParamsReportEO paramsReportEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + if (StringUtils.isNotEmpty(paramsReportEO.getProjectName())) { + paramsReportEO.setProjectName(paramsReportEO.getProjectName().replace("%", "\\%")); + } + + if (StringUtils.isNotEmpty(paramsReportEO.getTitle())) { + paramsReportEO.setProjectName(paramsReportEO.getTitle().replace("%", "\\%")); + } + + IPage page = new Page(pageNo, pageSize); + IPage pageList = paramsReportEOService.pageInfo(page, paramsReportEO); + return Result.OK(pageList); + } + + + + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "上报库-列表查询") + @ApiOperation(value="上报库-列表查询", notes="上报库-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = paramsReportEOService.queryList(); + return Result.OK(list); + } + + /** + * 添加 + * + * @param paramsReportEO + * @return + */ + @AutoLog(value = "上报库-添加") + @ApiOperation(value="上报库-添加", notes="上报库-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody ParamsReportEO paramsReportEO) { + paramsReportEOService.add(paramsReportEO); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param paramsReportEO + * @return + */ + @AutoLog(value = "上报库-编辑") + @ApiOperation(value="上报库-编辑", notes="上报库-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody ParamsReportEO paramsReportEO) { + paramsReportEOService.editById(paramsReportEO); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "上报库-通过id删除") + @ApiOperation(value="上报库-通过id删除", notes="上报库-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + paramsReportEOService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "上报库-批量删除") + @ApiOperation(value="上报库-批量删除", notes="上报库-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.paramsReportEOService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "上报库-通过id查询") + @ApiOperation(value="上报库-通过id查询", notes="上报库-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + ParamsReportEO paramsReportEO = paramsReportEOService.queryById(id); + if(paramsReportEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(paramsReportEO); + } + + /** + * 导出excel + * + * @param request + * @param paramsReportEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ParamsReportEO paramsReportEO) { + return super.exportXls(request, paramsReportEO, ParamsReportEO.class, "上报库"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ParamsReportEO.class); + } + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ReportCertCategoryParamsInfoEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ReportCertCategoryParamsInfoEOController.java new file mode 100644 index 000000000..13e3ad6aa --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ReportCertCategoryParamsInfoEOController.java @@ -0,0 +1,170 @@ +package com.jero.modules.cert.report.controller; + +import java.util.Arrays; +import java.util.List; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.jero.common.api.vo.Result; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.cert.report.entity.ReportCertCategoryParamsInfoEO; +import com.jero.modules.cert.report.service.IReportCertCategoryParamsInfoEOService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import com.jero.common.system.base.controller.JeroController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.jero.common.aspect.annotation.AutoLog; + + + /** + * @Description: 上报库认证类别参数信息 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Api(tags="上报库认证类别参数信息") +@RestController +@RequestMapping("/cert.report/reportCertCategoryParamsInfoEO") +@Slf4j +public class ReportCertCategoryParamsInfoEOController extends JeroController { + @Autowired + private IReportCertCategoryParamsInfoEOService reportCertCategoryParamsInfoEOService; + + /** + * 分页列表查询 + * + * @param reportCertCategoryParamsInfoEO + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "上报库认证类别参数信息-分页列表查询") + @ApiOperation(value="上报库认证类别参数信息-分页列表查询", notes="上报库认证类别参数信息-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(reportCertCategoryParamsInfoEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = reportCertCategoryParamsInfoEOService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "上报库认证类别参数信息-列表查询") + @ApiOperation(value="上报库认证类别参数信息-列表查询", notes="上报库认证类别参数信息-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = reportCertCategoryParamsInfoEOService.queryList(); + return Result.OK(list); + } + + /** + * 添加 + * + * @param reportCertCategoryParamsInfoEO + * @return + */ + @AutoLog(value = "上报库认证类别参数信息-添加") + @ApiOperation(value="上报库认证类别参数信息-添加", notes="上报库认证类别参数信息-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO) { + reportCertCategoryParamsInfoEOService.add(reportCertCategoryParamsInfoEO); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param reportCertCategoryParamsInfoEO + * @return + */ + @AutoLog(value = "上报库认证类别参数信息-编辑") + @ApiOperation(value="上报库认证类别参数信息-编辑", notes="上报库认证类别参数信息-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO) { + reportCertCategoryParamsInfoEOService.editById(reportCertCategoryParamsInfoEO); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "上报库认证类别参数信息-通过id删除") + @ApiOperation(value="上报库认证类别参数信息-通过id删除", notes="上报库认证类别参数信息-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + reportCertCategoryParamsInfoEOService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "上报库认证类别参数信息-批量删除") + @ApiOperation(value="上报库认证类别参数信息-批量删除", notes="上报库认证类别参数信息-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.reportCertCategoryParamsInfoEOService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "上报库认证类别参数信息-通过id查询") + @ApiOperation(value="上报库认证类别参数信息-通过id查询", notes="上报库认证类别参数信息-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO = reportCertCategoryParamsInfoEOService.queryById(id); + if(reportCertCategoryParamsInfoEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(reportCertCategoryParamsInfoEO); + } + + /** + * 导出excel + * + * @param request + * @param reportCertCategoryParamsInfoEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO) { + return super.exportXls(request, reportCertCategoryParamsInfoEO, ReportCertCategoryParamsInfoEO.class, "上报库认证类别参数信息"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ReportCertCategoryParamsInfoEO.class); + } + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsExportTemplateEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsExportTemplateEO.java new file mode 100644 index 000000000..084f3be64 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsExportTemplateEO.java @@ -0,0 +1,81 @@ +package com.jero.modules.cert.report.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; + + +/** + * @Description: 参数导出模板表 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Data +@TableName("params_export_template") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="params_export_template对象", description="参数导出模板表") +public class ParamsExportTemplateEO implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "最新变更时间") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + + /**模板名称*/ + @Excel(name = "模板名称", width = 15) + @ApiModelProperty(value = "模板名称") + private String templateName; + + /**状态*/ + @Excel(name = "状态", width = 15) + @ApiModelProperty(value = "状态") + private String state; + + /**内容说明*/ + @Excel(name = "内容说明", width = 15) + @ApiModelProperty(value = "内容说明") + private String description; + + /**附件上传*/ + @Excel(name = "附件上传", width = 15) + @ApiModelProperty(value = "附件上传") + private String fileConnectId; + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigDataEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigDataEO.java new file mode 100644 index 000000000..f9ccbe80a --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigDataEO.java @@ -0,0 +1,27 @@ +package com.jero.modules.cert.report.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.jero.modules.cert.collect.entity.ParamsConfigDataEO; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + + +/** + * @Description: 上报库参数配置数据 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Data +@TableName("params_report_config_data") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="params_report_config_data对象", description="上报库参数配置数据") +public class ParamsReportConfigDataEO extends ParamsConfigDataEO implements Serializable { + private static final long serialVersionUID = 1L; + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigEO.java new file mode 100644 index 000000000..14a5fed4c --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigEO.java @@ -0,0 +1,27 @@ +package com.jero.modules.cert.report.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.jero.modules.cert.collect.entity.ParamsConfigEO; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + + +/** + * @Description: 上报库参数配置 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Data +@TableName("params_report_config") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="params_report_config对象", description="上报库参数配置") +public class ParamsReportConfigEO extends ParamsConfigEO implements Serializable { + private static final long serialVersionUID = 1L; + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailEO.java new file mode 100644 index 000000000..5b73e83fb --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailEO.java @@ -0,0 +1,38 @@ +package com.jero.modules.cert.report.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; + + +/** + * @Description: 上报库参数项 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Data +@TableName("params_report_detail") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="params_report_detail对象", description="上报库参数项") +public class ParamsReportDetailEO extends ParamsCollectManifestEO implements Serializable { +// private static final long serialVersionUID = 1L; + + /**同步时间*/ + @Excel(name = "同步时间", width = 15, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "同步时间") + private java.util.Date syncTime; + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportEO.java new file mode 100644 index 000000000..90003a7f1 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ParamsReportEO.java @@ -0,0 +1,78 @@ +package com.jero.modules.cert.report.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; + + +/** + * @Description: 上报库 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Data +@TableName("params_report") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="params_report对象", description="上报库") +public class ParamsReportEO implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + + /**收集库参数清单id*/ + @Excel(name = "收集库参数清单id", width = 15) + @ApiModelProperty(value = "收集库参数清单id") + private String oldParamsManifestId; + + @ApiModelProperty(value = "版本") + private Integer version; + + @TableField(exist = false) + @ApiModelProperty(value = "项目名称") + private String projectName; + + @TableField(exist = false) + @ApiModelProperty(value = "清单标题") + private String title; + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ReportCertCategoryParamsInfoEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ReportCertCategoryParamsInfoEO.java new file mode 100644 index 000000000..a7c4a33dd --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ReportCertCategoryParamsInfoEO.java @@ -0,0 +1,27 @@ +package com.jero.modules.cert.report.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + + +/** + * @Description: 上报库认证类别参数信息 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Data +@TableName("report_cert_category_params_info") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="report_cert_category_params_info对象", description="上报库认证类别参数信息") +public class ReportCertCategoryParamsInfoEO extends CertCategoryParamsInfoEO implements Serializable { + private static final long serialVersionUID = 1L; + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/enums/ExportTemplateStateEnum.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/enums/ExportTemplateStateEnum.java new file mode 100644 index 000000000..68821d2fb --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/enums/ExportTemplateStateEnum.java @@ -0,0 +1,64 @@ +package com.jero.modules.cert.report.enums; + +import com.jero.common.constant.enums.CutEnum; + +import java.util.HashMap; +import java.util.Map; + +/** + * @Author: liyawei + * @Description: + * @Date: Created in 11:29 2022/5/18 + */ +public enum ExportTemplateStateEnum { + ENABLE("启用","0","enable"), + DISABLE("禁用","1","disable"); + + String name; + String value; + String enName; + + ExportTemplateStateEnum(String name, String value, String enName) { + this.name = name; + this.value = value; + this.enName = enName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getEnName() { + return enName; + } + + public void setEnName(String enName) { + this.enName = enName; + } + + public static Map toMap(String cut){ + Map map = new HashMap<>(); + if (CutEnum.CN.getValue().equals(cut)) { + for (ExportTemplateStateEnum exportTemplateStateEnum : ExportTemplateStateEnum.values()) { + map.put(exportTemplateStateEnum.getValue(), exportTemplateStateEnum.getName()); + } + } else if (CutEnum.EN.getValue().equals(cut)) { + for (ExportTemplateStateEnum exportTemplateStateEnum : ExportTemplateStateEnum.values()) { + map.put(exportTemplateStateEnum.getValue(), exportTemplateStateEnum.getEnName()); + } + } + return map; + } +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsExportTemplateEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsExportTemplateEOMapper.java new file mode 100644 index 000000000..814da6405 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsExportTemplateEOMapper.java @@ -0,0 +1,14 @@ +package com.jero.modules.cert.report.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.cert.report.entity.ParamsExportTemplateEO; + +/** + * @Description: 参数导出模板表 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface ParamsExportTemplateEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportConfigDataEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportConfigDataEOMapper.java new file mode 100644 index 000000000..e2dbfceb8 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportConfigDataEOMapper.java @@ -0,0 +1,14 @@ +package com.jero.modules.cert.report.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO; + +/** + * @Description: 上报库参数配置数据 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface ParamsReportConfigDataEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportConfigEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportConfigEOMapper.java new file mode 100644 index 000000000..6f31899ec --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportConfigEOMapper.java @@ -0,0 +1,14 @@ +package com.jero.modules.cert.report.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.cert.report.entity.ParamsReportConfigEO; + +/** + * @Description: 上报库参数配置 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface ParamsReportConfigEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailEOMapper.java new file mode 100644 index 000000000..811e0fc0f --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailEOMapper.java @@ -0,0 +1,19 @@ +package com.jero.modules.cert.report.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import com.jero.modules.cert.report.entity.ParamsReportDetailEO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Description: 上报库参数项 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface ParamsReportDetailEOMapper extends BaseMapper { + + List listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO); +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportEOMapper.java new file mode 100644 index 000000000..80e4464e3 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportEOMapper.java @@ -0,0 +1,18 @@ +package com.jero.modules.cert.report.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.modules.cert.report.entity.ParamsReportEO; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 上报库 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface ParamsReportEOMapper extends BaseMapper { + + IPage pageInfo(@Param("page") IPage page, @Param("paramsReportEO") ParamsReportEO paramsReportEO); + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ReportCertCategoryParamsInfoEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ReportCertCategoryParamsInfoEOMapper.java new file mode 100644 index 000000000..fcc02a34c --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/ReportCertCategoryParamsInfoEOMapper.java @@ -0,0 +1,14 @@ +package com.jero.modules.cert.report.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.cert.report.entity.ReportCertCategoryParamsInfoEO; + +/** + * @Description: 上报库认证类别参数信息 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface ReportCertCategoryParamsInfoEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsExportTemplateEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsExportTemplateEOMapper.xml new file mode 100644 index 000000000..a47a15e78 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsExportTemplateEOMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportConfigDataEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportConfigDataEOMapper.xml new file mode 100644 index 000000000..2c27ef2ef --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportConfigDataEOMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportConfigEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportConfigEOMapper.xml new file mode 100644 index 000000000..a58059d08 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportConfigEOMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml new file mode 100644 index 000000000..70d856572 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AND nio_number LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.nioNumber}),'%') + + + AND params_name LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.paramsName}),'%') + + + AND cert_category LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.certCategory}),'%') + + + AND sdt LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.sdt}),'%') + + + AND dre LIKE CONCAT(CONCAT('%',#{paramsCollectManifestEO.dre}),'%') + + + AND params_manifest_id = #{paramsCollectManifestEO.paramsManifestId} + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportEOMapper.xml new file mode 100644 index 000000000..c00f9aec4 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportEOMapper.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + pr.id as id, + pr.old_params_manifest_id as old_params_manifest_id, + pr.version as version, + pm.title as title, + pni.project_name as project_name + + + + + + + AND title LIKE CONCAT(CONCAT('%',#{paramsReportEO.paramsManifestTitle}),'%') + + + AND project_name LIKE CONCAT(CONCAT('%',#{paramsReportEO.projectName}),'%') + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ReportCertCategoryParamsInfoEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ReportCertCategoryParamsInfoEOMapper.xml new file mode 100644 index 000000000..cc2317fb5 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ReportCertCategoryParamsInfoEOMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsExportTemplateEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsExportTemplateEOService.java new file mode 100644 index 000000000..b545656b4 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsExportTemplateEOService.java @@ -0,0 +1,63 @@ +package com.jero.modules.cert.report.service; + +import com.jero.modules.cert.report.entity.ParamsExportTemplateEO; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 参数导出模板表 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface IParamsExportTemplateEOService extends IService { + + /** + * 保存 + * + * @param paramsExportTemplateEO + * @return + */ + boolean add(ParamsExportTemplateEO paramsExportTemplateEO); + + /** + * 更新 + * + * @param paramsExportTemplateEO + * @return + */ + boolean editById(ParamsExportTemplateEO paramsExportTemplateEO); + + /** + * 通过id删除 + * + * @param id + * @return + */ + boolean deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + boolean deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + ParamsExportTemplateEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); + + boolean verifyTemplateName(String templateName); +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigDataEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigDataEOService.java new file mode 100644 index 000000000..ec80f7bf7 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigDataEOService.java @@ -0,0 +1,22 @@ +package com.jero.modules.cert.report.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO; + +/** + * @Description: 上报库参数配置数据 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface IParamsReportConfigDataEOService extends IService { + + /** + * 通过id查询 + * + * @param paramsConfigId + * @param paramsCollectManifestId + * @return + */ + ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId); +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigEOService.java new file mode 100644 index 000000000..4c0d18c9c --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigEOService.java @@ -0,0 +1,16 @@ +package com.jero.modules.cert.report.service; + +import com.jero.modules.cert.report.entity.ParamsReportConfigEO; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 上报库参数配置 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface IParamsReportConfigEOService extends IService { + + List queryList(String paramsManifestId); +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java new file mode 100644 index 000000000..382a8b276 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java @@ -0,0 +1,34 @@ +package com.jero.modules.cert.report.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import com.jero.modules.cert.report.entity.ParamsReportDetailEO; + +import java.util.List; +import java.util.Map; + +/** + * @Description: 上报库参数项 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface IParamsReportDetailEOService extends IService { + + /** + * 列表查询 + * @param paramsCollectManifestEO + * @param cut + * @return + */ + List> queryList(ParamsCollectManifestEO paramsCollectManifestEO, String cut); + + /** + * 列表表头中英文切换 + * @param paramsManifestId + * @param flag + * @param cut + * @return + */ + List> getHeader(String paramsManifestId, String flag, String cut); +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportEOService.java new file mode 100644 index 000000000..7d8471009 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportEOService.java @@ -0,0 +1,70 @@ +package com.jero.modules.cert.report.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.cert.report.entity.ParamsReportEO; + +import java.util.List; + +/** + * @Description: 上报库 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface IParamsReportEOService extends IService { + + /** + * 保存 + * + * @param paramsReportEO + * @return + */ + void add(ParamsReportEO paramsReportEO); + + /** + * 更新 + * + * @param paramsReportEO + * @return + */ + void editById(ParamsReportEO paramsReportEO); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + ParamsReportEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); + + IPage pageInfo(IPage page, ParamsReportEO paramsReportEO); + + boolean isSync(String oldParamsManifestId); + + ParamsReportEO queryByOldParamsManifestId(String oldParamsManifestId); + +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IReportCertCategoryParamsInfoEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IReportCertCategoryParamsInfoEOService.java new file mode 100644 index 000000000..0128adb55 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IReportCertCategoryParamsInfoEOService.java @@ -0,0 +1,61 @@ +package com.jero.modules.cert.report.service; + +import com.jero.modules.cert.report.entity.ReportCertCategoryParamsInfoEO; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 上报库认证类别参数信息 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +public interface IReportCertCategoryParamsInfoEOService extends IService { + + /** + * 保存 + * + * @param reportCertCategoryParamsInfoEO + * @return + */ + void add(ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO); + + /** + * 更新 + * + * @param reportCertCategoryParamsInfoEO + * @return + */ + void editById(ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + ReportCertCategoryParamsInfoEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsExportTemplateEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsExportTemplateEOServiceImpl.java new file mode 100644 index 000000000..51815b94e --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsExportTemplateEOServiceImpl.java @@ -0,0 +1,145 @@ +package com.jero.modules.cert.report.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.modules.cert.report.entity.ParamsExportTemplateEO; +import com.jero.modules.cert.report.mapper.ParamsExportTemplateEOMapper; +import com.jero.modules.cert.report.service.IParamsExportTemplateEOService; +import com.jero.modules.oss.entity.OSSFile; +import com.jero.modules.oss.service.IOSSFileService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; +import java.util.UUID; + +/** + * @Description: 参数导出模板表 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Service +public class ParamsExportTemplateEOServiceImpl extends ServiceImpl implements IParamsExportTemplateEOService { + + @Autowired + private IOSSFileService ossFileService; + + /** + * 保存 + * + * @param paramsExportTemplateEO + * @return + */ + @Override + public boolean add(ParamsExportTemplateEO paramsExportTemplateEO) { + // 处理附件模板 修改文件表关联信息connect_id 一个文件 + if (StringUtils.isNotBlank(paramsExportTemplateEO.getFileConnectId())) { + String fileId = paramsExportTemplateEO.getFileConnectId(); + OSSFile targetOSSFile = ossFileService.getById(fileId); + if (ObjectUtil.isNotEmpty(targetOSSFile)) { + String connectId = UUID.randomUUID().toString().replace("-", ""); + OSSFile ossFile = new OSSFile(); + ossFile.setId(fileId); + ossFile.setConnectId(connectId); + ossFileService.updateById(ossFile); + paramsExportTemplateEO.setFileConnectId(connectId); + } else { + paramsExportTemplateEO.setFileConnectId(null); + } + } + + Date now = new Date(); + paramsExportTemplateEO.setCreateTime(now); + paramsExportTemplateEO.setUpdateTime(now); + return save(paramsExportTemplateEO); + } + + /** + * 更新 + * + * @param paramsExportTemplateEO + * @return + */ + @Override + public boolean editById(ParamsExportTemplateEO paramsExportTemplateEO) { + // 处理附件模板 若附件模板被修改,修改文件表关联信息connect_id 一个文件 + if (StringUtils.isNotBlank(paramsExportTemplateEO.getFileConnectId())) { + String fileId = paramsExportTemplateEO.getFileConnectId(); + OSSFile targetOSSFile = ossFileService.getById(fileId); + if (ObjectUtil.isNotEmpty(targetOSSFile)) { // 附件模板被修改,传的fileId + String connectId = UUID.randomUUID().toString().replace("-", ""); + OSSFile ossFile = new OSSFile(); + ossFile.setId(fileId); + ossFile.setConnectId(connectId); + ossFileService.updateById(ossFile); + paramsExportTemplateEO.setFileConnectId(connectId); + } + } + + Date now = new Date(); + paramsExportTemplateEO.setUpdateTime(now); + return updateById(paramsExportTemplateEO); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public boolean deleteById(String id) { + return removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public boolean deleteByIds(List ids) { + // TODO 关联删除文件信息 + return removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public ParamsExportTemplateEO queryById(String id) { + // TODO 关联删除文件信息 + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } + + @Override + public boolean verifyTemplateName(String templateName) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsExportTemplateEO::getTemplateName, templateName); + int repeatNum = count(queryWrapper); + if (repeatNum > 0) { + return false; + } else { + return true; + } + + } +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigDataEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigDataEOServiceImpl.java new file mode 100644 index 000000000..72134af05 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigDataEOServiceImpl.java @@ -0,0 +1,34 @@ +package com.jero.modules.cert.report.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO; +import com.jero.modules.cert.report.mapper.ParamsReportConfigDataEOMapper; +import com.jero.modules.cert.report.service.IParamsReportConfigDataEOService; +import org.springframework.stereotype.Service; + +/** + * @Description: 上报库参数配置数据 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Service +public class ParamsReportConfigDataEOServiceImpl extends ServiceImpl implements IParamsReportConfigDataEOService { + + /** + * 通过id查询 + * + * @param paramsConfigId + * @param paramsCollectManifestId + * @return + */ + @Override + public ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsReportConfigDataEO::getParamsConfigId, paramsConfigId); + queryWrapper.eq(ParamsReportConfigDataEO::getParamsCollectManifestId, paramsCollectManifestId); + getOne(queryWrapper); + return getOne(queryWrapper); + } +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigEOServiceImpl.java new file mode 100644 index 000000000..23af1d970 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigEOServiceImpl.java @@ -0,0 +1,34 @@ +package com.jero.modules.cert.report.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.modules.cert.report.entity.ParamsReportConfigEO; +import com.jero.modules.cert.report.mapper.ParamsReportConfigEOMapper; +import com.jero.modules.cert.report.service.IParamsReportConfigEOService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Description: 上报库参数配置 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Service +public class ParamsReportConfigEOServiceImpl extends ServiceImpl implements IParamsReportConfigEOService { + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList(String paramsManifestId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsReportConfigEO::getParamsManifestId, paramsManifestId); + queryWrapper.orderByAsc(ParamsReportConfigEO::getDisplaySeq); + List list = list(queryWrapper); + return list; + } +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java new file mode 100644 index 000000000..93f7fae89 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java @@ -0,0 +1,410 @@ +package com.jero.modules.cert.report.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.constant.enums.YesOrNoEnum; +import com.jero.generater.modules.online.cgform.entity.OnlCgformField; +import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; +import com.jero.modules.cert.collect.entity.*; +import com.jero.modules.cert.collect.enums.CollectManifestStateEnum; +import com.jero.modules.cert.collect.enums.ConfigDataTypeEnum; +import com.jero.modules.cert.collect.vo.ParamsConfigDataVO; +import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO; +import com.jero.modules.cert.report.entity.ParamsReportConfigEO; +import com.jero.modules.cert.report.entity.ParamsReportDetailEO; +import com.jero.modules.cert.report.mapper.ParamsReportDetailEOMapper; +import com.jero.modules.cert.report.service.IParamsReportConfigDataEOService; +import com.jero.modules.cert.report.service.IParamsReportConfigEOService; +import com.jero.modules.cert.report.service.IParamsReportDetailEOService; +import com.jero.modules.cert.template.enums.ControlTypeEnum; +import com.jero.modules.ocr.util.LineHumpUtil; +import com.jero.modules.system.entity.SysDictItem; +import com.jero.modules.system.service.ISysDictItemService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.lang.reflect.Field; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Description: 上报库参数项 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Service +public class ParamsReportDetailEOServiceImpl extends ServiceImpl implements IParamsReportDetailEOService { + + @Autowired + private ParamsReportDetailEOMapper paramsReportDetailEOMapper; + + @Autowired + private OnlCgformFieldServiceImpl onlCgformFieldService; + + @Autowired + private IParamsReportConfigEOService paramsReportConfigEOService; + + @Autowired + private IParamsReportConfigDataEOService paramsReportConfigDataEOService; + + @Autowired + private ISysDictItemService sysDictItemService; + + + /** + * 列表查询 + * + * @return + */ + @Override + public List> queryList(ParamsCollectManifestEO paramsCollectManifestEO, String cut) { + String paramsManifestId = paramsCollectManifestEO.getParamsManifestId(); + + List list = paramsReportDetailEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列 + List paramsConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列 + + // 普通数据字典 + List dictItemList = new ArrayList<>(); + List dictCodeList = new ArrayList<>(); + dictCodeList.add("duty_territory"); + dictCodeList.add("cert_category"); + for (String dictCode : dictCodeList) { + List dictItems = sysDictItemService.selectItemsByDictCode(dictCode); + dictItemList.addAll(dictItems); + } + + List> listMap = new ArrayList<>(); + list.forEach(collectManifestEO -> { // 参数收集清单 + // 处理数据字典字段 中英文切换 认证类型,责任领域 + List certCategory = Arrays.asList(collectManifestEO.getCertCategory().split(",")); + List dutyTerritory = Arrays.asList(collectManifestEO.getDutyTerritory().split(",")); + String certCategoryName = ""; + String dutyTerritoryName = ""; + if (CutEnum.CN.getValue().equals(cut)) { + certCategoryName = dictItemList.stream() + .filter(e -> certCategory.contains(e.getItemValue())) + .map(SysDictItem::getItemText) + .collect(Collectors.joining(",")); + + dutyTerritoryName = dictItemList.stream() + .filter(e -> dutyTerritory.contains(e.getItemValue())) + .map(SysDictItem::getItemText) + .collect(Collectors.joining(",")); + + } else if (CutEnum.EN.getValue().equals(cut)) { + certCategoryName = dictItemList.stream() + .filter(e -> certCategory.contains(e.getItemValue())) + .map(SysDictItem::getEnName) + .collect(Collectors.joining(",")); + + dutyTerritoryName = dictItemList.stream() + .filter(e -> dutyTerritory.contains(e.getItemValue())) + .map(SysDictItem::getEnName) + .collect(Collectors.joining(",")); + + } + + +// String certCategoryName = sysDictService.queryDictItemByValue("cert_category", collectManifestEO.getCertCategory(), cut); + collectManifestEO.setCertCategory(certCategoryName); +// String dutyTerritoryName = sysDictService.queryDictItemByValue("duty_territory", collectManifestEO.getDutyTerritory(), cut); + collectManifestEO.setDutyTerritory(dutyTerritoryName); + + // 处理状态字段 + Map collectManifestStateMap = CollectManifestStateEnum.toMap(cut); + String stateName = collectManifestStateMap.get(collectManifestEO.getState()); + collectManifestEO.setState(stateName); + + Map manifestMap = objectToMap(collectManifestEO); // 对象转map + String controlType = collectManifestEO.getControlType(); + String paramsCollectManifestId = collectManifestEO.getId(); + + if (CollectionUtil.isNotEmpty(paramsConfigEOList)) { + paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置 + Map configMap = new HashMap<>(); + String paramsConfigId = paramsConfigEO.getId(); + ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据 + List paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据 + configMap.put("controlType", controlType); + configMap.put("list", paramsConfigDataVOList); + manifestMap.put(paramsConfigEO.getId(), configMap); + }); + } + + listMap.add(manifestMap); + }); + + return listMap; + } + + /** + * 重新组装配置数据 用于返回前端 + * @param controlType + * @param paramsConfigDataEO + * @param paramsCollectManifestEO + * @return + */ + private List getConfigDataVOList(String controlType, ParamsConfigDataEO paramsConfigDataEO, ParamsCollectManifestEO paramsCollectManifestEO) { + List paramsConfigDataVOList = new ArrayList<>(); + + if (ControlTypeEnum.TEXT.getValue().equals(controlType)) { + + ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); + configDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + configDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + configDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + configDataVO.setDataValue(paramsConfigDataEO.getTextData()); + } + paramsConfigDataVOList.add(configDataVO); + + } else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)) { + + ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); + configDataVO.setType(ConfigDataTypeEnum.PULL.getValue()); + configDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + configDataVO.setDataValue(paramsConfigDataEO.getPullData()); + } + paramsConfigDataVOList.add(configDataVO); + + } else if (ControlTypeEnum.PULL_MORE.getValue().equals(controlType)) { + + ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); + configDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue()); + configDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + configDataVO.setDataValue(paramsConfigDataEO.getPullData()); + } + paramsConfigDataVOList.add(configDataVO); + + } else if (ControlTypeEnum.FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); + configDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + configDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + configDataVO.setDataValue(paramsConfigDataEO.getFileConnectId()); + } + paramsConfigDataVOList.add(configDataVO); + + } else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)) { + + ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO(); + textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData()); + } + paramsConfigDataVOList.add(textConfigDataVO); + + ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO(); + pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue()); + pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData()); + } + paramsConfigDataVOList.add(pullConfigDataVO); + + } else if (ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) { + + ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO(); + textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData()); + } + paramsConfigDataVOList.add(textConfigDataVO); + + ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO(); + pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue()); + pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData()); + } + paramsConfigDataVOList.add(pullMoreConfigDataVO); + + } else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO(); + textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData()); + } + paramsConfigDataVOList.add(textConfigDataVO); + + ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO(); + fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId()); + } + paramsConfigDataVOList.add(fileConfigDataVO); + + } else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO(); + pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue()); + pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData()); + } + paramsConfigDataVOList.add(pullConfigDataVO); + + ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO(); + fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId()); + } + paramsConfigDataVOList.add(fileConfigDataVO); + + } else if (ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO(); + pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue()); + pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData()); + } + paramsConfigDataVOList.add(pullMoreConfigDataVO); + + ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO(); + fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId()); + } + paramsConfigDataVOList.add(fileConfigDataVO); + + } else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO(); + textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData()); + } + paramsConfigDataVOList.add(textConfigDataVO); + + ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO(); + pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue()); + pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData()); + } + paramsConfigDataVOList.add(pullConfigDataVO); + + ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO(); + fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId()); + } + paramsConfigDataVOList.add(fileConfigDataVO); + + } + return paramsConfigDataVOList; + } + + private List> getControlValueMapList(String controlValue) { + List> controlValueMapList = new ArrayList<>(); + if (StringUtils.isNotEmpty(controlValue)) { + controlValue = controlValue.replace(",", ","); + String[] controlValueStr = controlValue.split(","); + for (int i = 0; i < controlValueStr.length; i++) { + Map controlValueMap = new HashMap<>(); + controlValueMap.put("lable", controlValueStr[i]); + controlValueMap.put("value", controlValueStr[i]); + controlValueMapList.add(controlValueMap); + } + } + return controlValueMapList; + } + + /** + * 列表表头中英文切换 + * + * @return + */ + @Override + public List> getHeader(String paramsManifestId, String flag, String cut) { + List fieldList = onlCgformFieldService.getFieldList(flag); // flag--->8 + if (fieldList.size() != 0) { + //过滤列表字段(is_show_list-->列表是否显示0否 1是) + fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList()); + } + List paramsConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); + List> listConfig = new LinkedList<>(); + for (ParamsConfigEO paramsConfigEO : paramsConfigEOList) { + Map map = new HashMap<>(); + map.put("db_field_name", paramsConfigEO.getId()); + map.put("db_field_txt", paramsConfigEO.getConfigName()); + map.put("type", true); //配置列 标识 + listConfig.add(map); + } + + List> list = new LinkedList<>(); + int indexOfDescription = 1; // 参数说明的位置 + for (int i = 0; i < fieldList.size(); i++) { + OnlCgformField onlCgformField = fieldList.get(i); + Map map = new HashMap<>(); + String dbFieldName = onlCgformField.getDbFieldName(); + if ("description".equals(dbFieldName)) { + indexOfDescription = i; + } + if ("sdt".equals(dbFieldName)) { + map.put("click", true); + } + map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName)); + if(CutEnum.CN.getValue().equals(cut)){ + map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名 + }else{ + map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名 + } + list.add(map); + } + + list.addAll(indexOfDescription+1, listConfig); + return list; + } + + /** + * 实体对象转成Map + * @param obj 实体对象 + * @return + */ + private Map objectToMap(Object obj) { + Map map = new HashMap<>(); + if (obj == null) { + return map; + } + Class clazz = obj.getClass(); + Field[] fields = clazz.getDeclaredFields(); + try { + for (Field field : fields) { + field.setAccessible(true); + map.put(field.getName(), field.get(obj)); + } + } catch (Exception e) { + e.printStackTrace(); + } + return map; + } +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportEOServiceImpl.java new file mode 100644 index 000000000..8c9398eea --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportEOServiceImpl.java @@ -0,0 +1,121 @@ +package com.jero.modules.cert.report.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.modules.cert.report.entity.ParamsReportEO; +import com.jero.modules.cert.report.mapper.ParamsReportEOMapper; +import com.jero.modules.cert.report.service.IParamsReportEOService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @Description: 上报库 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Service +public class ParamsReportEOServiceImpl extends ServiceImpl implements IParamsReportEOService { + + @Autowired + private ParamsReportEOMapper paramsReportEOMapper; + + /** + * 保存 + * + * @param paramsReportEO + * @return + */ + @Override + public void add(ParamsReportEO paramsReportEO) { + Date now = new Date(); + paramsReportEO.setCreateTime(now); + paramsReportEO.setUpdateTime(now); + save(paramsReportEO); + } + + /** + * 更新 + * + * @param paramsReportEO + * @return + */ + @Override + public void editById(ParamsReportEO paramsReportEO) { + Date now = new Date(); + paramsReportEO.setUpdateTime(now); + saveOrUpdate(paramsReportEO); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public ParamsReportEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } + + @Override + public IPage pageInfo(IPage page, ParamsReportEO paramsReportEO) { + return paramsReportEOMapper.pageInfo(page, paramsReportEO); + } + + @Override + public boolean isSync(String oldParamsManifestId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsReportEO::getOldParamsManifestId, oldParamsManifestId); + int num = count(queryWrapper); + if (num > 0) { + return true; // 上报过 + } else { + return false; // 没上报过 + } + + } + + @Override + public ParamsReportEO queryByOldParamsManifestId(String oldParamsManifestId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsReportEO::getOldParamsManifestId, oldParamsManifestId); + return getOne(queryWrapper); + } +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ReportCertCategoryParamsInfoEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ReportCertCategoryParamsInfoEOServiceImpl.java new file mode 100644 index 000000000..af93f3515 --- /dev/null +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ReportCertCategoryParamsInfoEOServiceImpl.java @@ -0,0 +1,90 @@ +package com.jero.modules.cert.report.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.modules.cert.report.entity.ReportCertCategoryParamsInfoEO; +import com.jero.modules.cert.report.mapper.ReportCertCategoryParamsInfoEOMapper; +import com.jero.modules.cert.report.service.IReportCertCategoryParamsInfoEOService; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @Description: 上报库认证类别参数信息 + * @Author: jero-boot + * @Date: 2022-05-18 + * @Version: V1.0 + */ +@Service +public class ReportCertCategoryParamsInfoEOServiceImpl extends ServiceImpl implements IReportCertCategoryParamsInfoEOService { + + /** + * 保存 + * + * @param reportCertCategoryParamsInfoEO + * @return + */ + @Override + public void add(ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO) { + Date now = new Date(); + reportCertCategoryParamsInfoEO.setCreateTime(now); + reportCertCategoryParamsInfoEO.setUpdateTime(now); + save(reportCertCategoryParamsInfoEO); + } + + /** + * 更新 + * + * @param reportCertCategoryParamsInfoEO + * @return + */ + @Override + public void editById(ReportCertCategoryParamsInfoEO reportCertCategoryParamsInfoEO) { + Date now = new Date(); + reportCertCategoryParamsInfoEO.setUpdateTime(now); + saveOrUpdate(reportCertCategoryParamsInfoEO); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public ReportCertCategoryParamsInfoEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java index 6c4c29e46..16eea6876 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java @@ -170,11 +170,12 @@ public class ParamsInfoEOController extends JeroController delete(@RequestParam(name="id",required=true) String id) { - if (StringUtils.isBlank(id)) { - return Result.error("删除数据不能为空"); + boolean isSuccess = paramsInfoEOService.deleteById(id); + if (isSuccess) { + return Result.OK("删除成功!"); + } else { + return Result.error("删除失败!"); } - paramsInfoEOService.deleteById(id); - return Result.OK("删除成功!"); } /** @@ -188,11 +189,12 @@ public class ParamsInfoEOController extends JeroController deleteBatch(@RequestParam(name="ids",required=true) String ids) { - if (StringUtils.isBlank(ids)) { - return Result.error("删除数据不能为空"); + boolean isSuccess = paramsInfoEOService.deleteByIds(Arrays.asList(ids.split(","))); + if (isSuccess) { + return Result.OK("批量删除成功!"); + } else { + return Result.error("批量删除失败!"); } - this.paramsInfoEOService.deleteByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); } /** diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/controller/ParamsTemplateEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/controller/ParamsTemplateEOController.java index 1dbbf33b7..51b3ff496 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/controller/ParamsTemplateEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/controller/ParamsTemplateEOController.java @@ -95,8 +95,12 @@ public class ParamsTemplateEOController extends JeroController add(@Validated @RequestBody ParamsTemplateEO paramsTemplateEO) { - paramsTemplateEOService.add(paramsTemplateEO); - return Result.OK("添加成功!"); + boolean isSuccess = paramsTemplateEOService.add(paramsTemplateEO); + if (isSuccess) { + return Result.OK("添加成功!"); + } else { + return Result.error("添加失败!"); + } } /** @@ -110,8 +114,12 @@ public class ParamsTemplateEOController extends JeroController edit(@Validated @RequestBody ParamsTemplateEO paramsTemplateEO) { - paramsTemplateEOService.editById(paramsTemplateEO); - return Result.OK("编辑成功!"); + boolean isSuccess = paramsTemplateEOService.editById(paramsTemplateEO); + if (isSuccess) { + return Result.OK("编辑成功!"); + } else { + return Result.error("编辑失败!"); + } } /** @@ -125,11 +133,12 @@ public class ParamsTemplateEOController extends JeroController delete(@RequestParam(name="id",required=true) String id) { - if (StringUtils.isBlank(id)) { - return Result.error("删除数据不能为空"); + boolean isSuccess = paramsTemplateEOService.deleteById(id); + if (isSuccess) { + return Result.OK("删除成功!"); + } else { + return Result.error("删除失败!"); } - paramsTemplateEOService.deleteById(id); - return Result.OK("删除成功!"); } /** @@ -143,11 +152,12 @@ public class ParamsTemplateEOController extends JeroController deleteBatch(@RequestParam(name="ids",required=true) String ids) { - if (StringUtils.isBlank(ids)) { - return Result.error("删除数据不能为空"); + boolean isSuccess = paramsTemplateEOService.deleteByIds(Arrays.asList(ids.split(","))); + if (isSuccess) { + return Result.OK("批量删除成功!"); + } else { + return Result.error("批量删除失败!"); } - this.paramsTemplateEOService.deleteByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); } /** diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/ICertCategoryParamsInfoPublishEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/ICertCategoryParamsInfoPublishEOService.java index 5c4bff3c9..f8fcdb5d8 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/ICertCategoryParamsInfoPublishEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/ICertCategoryParamsInfoPublishEOService.java @@ -1,7 +1,8 @@ package com.jero.modules.cert.template.service; -import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO; import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO; + import java.util.List; /** @@ -58,4 +59,6 @@ public interface ICertCategoryParamsInfoPublishEOService extends IService queryList(); + + List queryListByVersionAndNio(String paramsTemplateId, Integer version, List nioNumberList); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java index 625d14cf1..7ff7c338f 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java @@ -44,7 +44,7 @@ public interface IParamsInfoEOService extends IService { * @param id * @return */ - void deleteById(String id); + boolean deleteById(String id); /** * 批量删除 @@ -52,7 +52,7 @@ public interface IParamsInfoEOService extends IService { * @param ids * @return */ - void deleteByIds(List ids); + boolean deleteByIds(List ids); /** * 通过id查询 diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsTemplateEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsTemplateEOService.java index a6d22f9cd..7b16c011c 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsTemplateEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsTemplateEOService.java @@ -19,7 +19,7 @@ public interface IParamsTemplateEOService extends IService { * @param paramsTemplateEO * @return */ - void add(ParamsTemplateEO paramsTemplateEO); + boolean add(ParamsTemplateEO paramsTemplateEO); /** * 更新 @@ -27,7 +27,7 @@ public interface IParamsTemplateEOService extends IService { * @param paramsTemplateEO * @return */ - void editById(ParamsTemplateEO paramsTemplateEO); + boolean editById(ParamsTemplateEO paramsTemplateEO); /** * 通过id删除 @@ -35,7 +35,7 @@ public interface IParamsTemplateEOService extends IService { * @param id * @return */ - void deleteById(String id); + boolean deleteById(String id); /** * 批量删除 @@ -43,7 +43,7 @@ public interface IParamsTemplateEOService extends IService { * @param ids * @return */ - void deleteByIds(List ids); + boolean deleteByIds(List ids); /** * 通过id查询 diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/CertCategoryParamsInfoPublishEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/CertCategoryParamsInfoPublishEOServiceImpl.java index 8dcecaf2c..4125d0c14 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/CertCategoryParamsInfoPublishEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/CertCategoryParamsInfoPublishEOServiceImpl.java @@ -1,5 +1,6 @@ package com.jero.modules.cert.template.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO; import com.jero.modules.cert.template.mapper.CertCategoryParamsInfoPublishEOMapper; @@ -87,4 +88,14 @@ public class CertCategoryParamsInfoPublishEOServiceImpl extends ServiceImpl queryList() { return list(); } + + @Override + public List queryListByVersionAndNio(String paramsTemplateId, Integer version, List nioNumberList) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(CertCategoryParamsInfoPublishEO::getParamsTemplateId, paramsTemplateId); + queryWrapper.eq(CertCategoryParamsInfoPublishEO::getVersion, version); + queryWrapper.in(CertCategoryParamsInfoPublishEO::getNioNumber, nioNumberList); + + return list(queryWrapper); + } } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java index 6d68530a3..cb707f55c 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java @@ -208,14 +208,14 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl ids) { + public boolean deleteByIds(List ids) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.in(ParamsInfoEO::getId, ids); List paramsInfoEOList = list(queryWrapper); @@ -237,7 +237,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl ids) { + public boolean deleteByIds(List ids) { // 关联删除参数项 certCategoryParamsInfoEOService.deleteByParamsTemplateIds(StringUtils.join(ids, ",")); paramsInfoEOService.deleteByParamsTemplateIds(StringUtils.join(ids, ",")); - removeByIds(ids); + return removeByIds(ids); } /** From c6904eb63bb237bcc4dd4a55a3650c4d4b7668b0 Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Wed, 18 May 2022 18:14:01 +0800 Subject: [PATCH 10/11] =?UTF-8?q?[add]=20=E5=8E=86=E5=8F=B2=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/TaskParameterCollection.vue | 12 +- .../dialog/historicalVersion.vue | 177 ++++-------------- 2 files changed, 40 insertions(+), 149 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue index ae2641f4b..85e856662 100644 --- a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue +++ b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue @@ -81,7 +81,7 @@ - + @@ -174,7 +174,8 @@ rowId: '', version: 0, itemId: '', - historicalVisible: false + historicalVisible: false, + historicalRow: {}, // 历史版本得数据 } }, mounted() { @@ -208,10 +209,11 @@ handleTableChange() { }, - // - historicalVersion() { + // 历史版本 + historicalVersion(historicalRow) { + console.log(historicalRow) this.historicalVisible = true - console.log('历史版本。。。。') + this.historicalRow = historicalRow }, // 配置 configure(item) { diff --git a/jero-web/src/views/projectManagement/dialog/historicalVersion.vue b/jero-web/src/views/projectManagement/dialog/historicalVersion.vue index 8897bff5a..059c6da1a 100644 --- a/jero-web/src/views/projectManagement/dialog/historicalVersion.vue +++ b/jero-web/src/views/projectManagement/dialog/historicalVersion.vue @@ -9,30 +9,27 @@ :dataSource='areaTable' :pagination='false' :loading='loading' - :scroll='{x: 600}' - @change='handleTableChange'> + :scroll='{x: 600}'> {{ text }} {{ $t('edit') }} - {{ $t('delete') }} -
- {{ $t('cancel') }} - {{ $t('submit') }} -
From faa7914004361faca5ac3b6752df55363c8f1148 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 18 May 2022 18:18:25 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=9C=AA=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E6=97=B6=E5=8A=A0=E9=81=AE=E7=BD=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + jero-web/src/components/ImportFile/index.vue | 41 +++++++++++++++++++ .../components/taskCirculationHistory.vue | 9 +++- 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 91b9ecd39..0a3c95358 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -840,4 +840,5 @@ module.exports = { descriptionDeliverables:'Description of deliverables', startMonth:'Start Month', endMonth:'End Month', + Importing:'Importing', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index c17fe81ea..17d47a37b 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -845,4 +845,5 @@ module.exports = { descriptionDeliverables:'交付物说明', startMonth:'开始日期', endMonth:'结束日期', + Importing:'导入中', } \ No newline at end of file diff --git a/jero-web/src/components/ImportFile/index.vue b/jero-web/src/components/ImportFile/index.vue index 009755729..be20c78e7 100644 --- a/jero-web/src/components/ImportFile/index.vue +++ b/jero-web/src/components/ImportFile/index.vue @@ -9,6 +9,14 @@ {{$t('import')}} +
+
+ +
+ {{this.$t('Importing')}}... +
+
+
@@ -53,6 +61,7 @@ data() { return { tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }, + spinning: false, cut: '' } }, @@ -174,4 +183,36 @@ font-weight: 400 !important; color: #040B29 !important; } + + \ No newline at end of file diff --git a/jero-web/src/views/processCenter/components/taskCirculationHistory.vue b/jero-web/src/views/processCenter/components/taskCirculationHistory.vue index 04b7d45b1..7aedb1c56 100644 --- a/jero-web/src/views/processCenter/components/taskCirculationHistory.vue +++ b/jero-web/src/views/processCenter/components/taskCirculationHistory.vue @@ -83,8 +83,15 @@ let query = { actiProcInstId: this.$route.query.actiProcInstId } + this.loading = true getAction('/wkflow/processHistoryEO/list', query).then((res) => { - this.dataSource = res + if (res.success) { + this.dataSource = res.result || [] + this.loading = false + } else { + this.dataSource = [] + this.loading = false + } }) } }