From 0e6ae94f81c3f319d78c6aa2008dfcae5dad7d53 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 13 Mar 2023 09:54:10 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-boot/db/蔚来标准sql/dev_2nd_period.sql | 7 ++++++ ...ectCertificationInventoryEOController.java | 7 ++++++ .../ProjectCertificationInventoryEO.java | 1 + ...rojectCertificationInventoryEOService.java | 7 ++++++ ...ctCertificationInventoryEOServiceImpl.java | 22 +++++++++++++++++++ 5 files changed, 44 insertions(+) diff --git a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql index 1eb94cb36..d50c0e628 100644 --- a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql +++ b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql @@ -325,3 +325,10 @@ CREATE TABLE `auth_dummy_content_change` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +-- 标签管理 增加认证清单-配置项数据 2023-03-13 未同步生产环境 +INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1635093263477002242', '认证清单-配置项', 'ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4', '认证清单-配置项', 0, 'admin', '2023-03-13 09:39:47', NULL, NULL, NULL, NULL, 1, 0, '1', 1); + +INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1635093344389320705', '1635093263477002242', '配置1', '46c10455e29e4855bb7e5d653b11a51d', '开发环境假数据', 1, 1, 'admin', '2023-03-13 09:40:07', 'admin', '2023-03-13 09:40:46', 1, NULL, NULL, '0', 'pz1'); +INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1635093406049783810', '1635093263477002242', '配置2', '4718f8eef0434d079b970834a2b9dd69', '开发环境假数据', 2, 1, 'admin', '2023-03-13 09:40:21', 'admin', '2023-03-13 09:40:43', 1, NULL, NULL, '0', 'Pz2'); +INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1635093480922304513', '1635093263477002242', '配置3', 'd3dd928d93d74e07ad8fa31bffea9641', '开发环境假数据', 3, 1, 'admin', '2023-03-13 09:40:39', NULL, NULL, 1, NULL, NULL, '0', 'Pz3'); + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index 898b198d4..fbc8ec65b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -241,4 +241,11 @@ public class ProjectCertificationInventoryEOController extends JeroController expediting(@RequestBody JSONObject json) { return this.projectCertificationInventoryEOService.expediting(json); } + + @AutoLog(value = "项目库-认证清单表-批量修改配置项") + @ApiOperation(value="项目库-认证清单表-批量修改配置项", notes="项目库-认证清单表-批量修改配置项") + @PostMapping(value = "/updateConfigItemBatch") + public Result updateConfigItemBatch(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.updateConfigItemBatch(json); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java index 9242934e8..c600ead2a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java @@ -75,6 +75,7 @@ public class ProjectCertificationInventoryEO implements Serializable { /**配置项*/ @Excel(name = "配置项", width = 15) @ApiModelProperty(value = "配置项") + @Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4") private java.lang.String configItem; /**WVTA ID*/ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index 7ae88da7e..792c9ce16 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -160,4 +160,11 @@ public interface IProjectCertificationInventoryEOService extends IService getCertificationInventoryLinkHrefFeishu(String projectLibraryId,String PRN_CN,String PRN_EN); Map getStandNameAndItemName(List projectCertificationInventoryEOList); + + /** + * 批量修改配置项 + * @param json + * @return + */ + Result updateConfigItemBatch(JSONObject json); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index b4eea846e..bd93b3bb0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -1746,4 +1746,26 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl updateConfigItemBatch(JSONObject json) { + String ids = json.getString("ids"); + if(StringUtils.isEmpty(ids)){ + throw new JeroBootException("至少选择一条数据进行操作!"); + } + + String configItem = json.getString("configItem"); + if(StringUtils.isEmpty(ids)){ + throw new JeroBootException("请选择一个配置!"); + } + QueryWrapper queryWrap = new QueryWrapper<>(); + queryWrap.lambda().in(ProjectCertificationInventoryEO::getId,ids.split(",")); + List projectCertificationInventoryEOList = this.list(queryWrap); + projectCertificationInventoryEOList.forEach(certificationInventoryEO -> { + certificationInventoryEO.setConfigItem(configItem); + }); + + this.updateBatchById(projectCertificationInventoryEOList); + return Result.OK("修改配置成功!"); + } } From 1e81d1731f5fc6ef7f95065b17621e443becde0a Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 13 Mar 2023 10:13:11 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E6=98=8E=E7=BB=86=E8=A1=A8=20=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AD=97=E6=AE=B5=20=E4=BA=A4=E4=BB=98=E7=89=A9?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-boot/db/蔚来标准sql/dev_2nd_period.sql | 3 +++ .../authDummy/entity/AuthDummyInventoryInfoEO.java | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql index d50c0e628..a08943981 100644 --- a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql +++ b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql @@ -332,3 +332,6 @@ INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `descri INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1635093406049783810', '1635093263477002242', '配置2', '4718f8eef0434d079b970834a2b9dd69', '开发环境假数据', 2, 1, 'admin', '2023-03-13 09:40:21', 'admin', '2023-03-13 09:40:43', 1, NULL, NULL, '0', 'Pz2'); INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1635093480922304513', '1635093263477002242', '配置3', 'd3dd928d93d74e07ad8fa31bffea9641', '开发环境假数据', 3, 1, 'admin', '2023-03-13 09:40:39', NULL, NULL, 1, NULL, NULL, '0', 'Pz3'); +-- 认证虚拟清单明细表 增加字段 交付物类型 2023-03-13 未同步生产环境 +ALTER TABLE `auth_dummy_inventory_info` + ADD COLUMN `deliverable_type` varchar(255) NULL COMMENT '交付物类型' AFTER `deliverable`; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEO.java index 8dee0aa8a..a140133ef 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEO.java @@ -97,6 +97,14 @@ public class AuthDummyInventoryInfoEO implements Serializable { @ApiModelProperty(value = "交付物") private java.lang.String deliverable; + /**交付物类型*/ + @Excel(name = "交付物类型", width = 15) + @ApiModelProperty(value = "交付物类型") + private String deliverableType; + @TableField(exist = false) + // 交付物类型名称 + private String deliverableTypeName; + /**文档库id*/ // @Excel(name = "文档库id", width = 15) @ApiModelProperty(value = "文档库id") From f1725f92e0381ef85827d1803a11f0ed23804fc9 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 13 Mar 2023 10:23:57 +0800 Subject: [PATCH 3/6] update --- .../controller/ProjectCertificationInventoryEOController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index fbc8ec65b..e391fdfbf 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -60,7 +60,7 @@ public class ProjectCertificationInventoryEOController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryEO, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = this.projectCertificationInventoryEOService.queryPage(queryWrapper,page,projectCertificationInventoryEO,cut); - return Result.OK(pageList); + return Result.OK(cut,pageList); } /** From f62aecb925481ede899e40ba6a55e23b0146c1b4 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 13 Mar 2023 11:24:47 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E8=B0=83=E5=8F=96=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ectCertificationInventoryEOController.java | 7 +++ ...rojectCertificationInventoryEOService.java | 7 +++ ...ctCertificationInventoryEOServiceImpl.java | 46 ++++++++++++++++++- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index e391fdfbf..51f739282 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -248,4 +248,11 @@ public class ProjectCertificationInventoryEOController extends JeroController updateConfigItemBatch(@RequestBody JSONObject json) { return this.projectCertificationInventoryEOService.updateConfigItemBatch(json); } + + @AutoLog(value = "项目库-认证清单表-调取添加") + @ApiOperation(value="项目库-认证清单表-调取添加", notes="项目库-认证清单表-调取添加") + @PostMapping(value = "/callAdd") + public Result callAdd(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.callAdd(json); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index 792c9ce16..4d86f8bbe 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -167,4 +167,11 @@ public interface IProjectCertificationInventoryEOService extends IService updateConfigItemBatch(JSONObject json); + + /** + * 调取添加 + * @param json + * @return + */ + Result callAdd(JSONObject json); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index bd93b3bb0..e8535fb80 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -11,6 +11,9 @@ import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.system.vo.LoginUser; import com.jero.common.util.DateUtils; +import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO; +import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService; +import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService; import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.project.entity.ProjectCertificationInventoryEO; @@ -84,6 +87,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl standNameAndItemName = this.getStandNameAndItemName(projectCertificationInventoryEOList); String standName = (String) standNameAndItemName.get("standName"); String itemName = (String) standNameAndItemName.get("itemName"); @@ -1693,8 +1704,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl callAdd(JSONObject json) { + String authDummyInventoryBaseId = json.getString("authDummyInventoryBaseId"); + if(StringUtils.isEmpty(authDummyInventoryBaseId)){ + throw new JeroBootException("请选择一个认证虚拟清单进行操作!"); + } + + String authDummyInventoryInfoIds = json.getString("authDummyInventoryInfoIds"); + if(StringUtils.isEmpty(authDummyInventoryInfoIds)){ + throw new JeroBootException("至少选择一条数据进行调取!"); + } + + String projectLibraryId = json.getString("projectLibraryId"); + + QueryWrapper authDummyInfoQueryWrap = new QueryWrapper<>(); + authDummyInfoQueryWrap.lambda().in(AuthDummyInventoryInfoEO::getId,authDummyInventoryInfoIds.split(",")); + List authDummyInventoryInfoEOList = this.authDummyInventoryInfoEOService.list(authDummyInfoQueryWrap); + + if(CollectionUtils.isNotEmpty(authDummyInventoryInfoEOList)){ + List projectCertificationInventoryEOList = new ArrayList<>(); + for (AuthDummyInventoryInfoEO authDummyInventoryInfoEO : authDummyInventoryInfoEOList) { + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp = new ProjectCertificationInventoryEO(); + BeanUtils.copyProperties(authDummyInventoryInfoEO,projectCertificationInventoryEOTemp); + + projectCertificationInventoryEOTemp.setProjectLibraryId(projectLibraryId); + projectCertificationInventoryEOList.add(projectCertificationInventoryEOTemp); + } + this.saveBatch(projectCertificationInventoryEOList); + } + + return Result.OK("调取成功!"); + } } From 36426c7ac597185379a7e6522fc3812e74af1e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Mon, 13 Mar 2023 11:30:28 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certificationList/components/addModel.vue | 210 +++++++++++++----- .../components/batSetting.vue | 133 +++++++---- .../components/certificationList/index.vue | 60 ++++- 3 files changed, 303 insertions(+), 100 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue index 03441eca1..3edbcd8c6 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue @@ -93,7 +93,46 @@ - + + +
+
+ * + {{$t('configurationItem')}} +
+ + + +
+
+ +
+
+ * + {{$t('areaOfResponsibility')}} +
+ + + +
+
+
@@ -141,25 +180,6 @@ - -
-
- * - {{$t('areaOfResponsibility')}} -
- - - -
-
@@ -180,30 +200,52 @@
- -
* - {{$t('personLiable')}} + {{$t('closingDate')}}
- - +
+ + + + + + + + + + + + + + + + + + + + + + +
@@ -240,7 +282,44 @@
- + + +
+
+ * + {{$t('configurationItem')}} +
+ + + +
+
+ +
+
+ * + {{$t('areaOfResponsibility')}} +
+ + + +
+
+
@@ -286,24 +365,6 @@ - -
-
- * - {{$t('areaOfResponsibility')}} -
- - - -
-
@@ -323,6 +384,26 @@
+ +
+
+ * + {{$t('closingDate')}} +
+ + + +
+
@@ -377,6 +458,7 @@ import uploadFile from '@/components/uploadFile/file' import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { mapGetters } from 'vuex' + import moment from 'moment' export default { name: 'addModel', @@ -450,7 +532,17 @@ message: this.$t('personLiable') + this.$t('cannotEmpty'), trigger: 'change' } - ] + ], + endTime:[ + { + required: true, + message: this.$t('closingDate') + this.$t('cannotEmpty'), + trigger: 'change' + } + ], + configItem:[ + { required: true, message: this.$t('configurationItem') + this.$t('cannotEmpty'), trigger: 'change' }, + ], }, disabled: false, projectNameList: [], @@ -471,6 +563,18 @@ }, methods: { ...mapGetters(['userInfo']), + disabledDate(current) { + return current && current < moment().subtract(1, 'day') + }, + dateChange(item,index) { + if (index){ + this.formInline.dataList[index][item.db_field_name] = this.formInline.dataList[index][item.db_field_name] ? moment(this.formInline.dataList[index][item.db_field_name]).format('YYYY-MM-DD') : '' + + }else{ + this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : '' + + } + }, getDeliverableTree() { getAction('/sys/category/getDeliverableTree', {}).then((res) => { if (res.success) { diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue b/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue index 6d7f9cde3..0a6dcdd5b 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue @@ -17,19 +17,11 @@ {{$t('configurationItem')}}
- - - - {{ item.label }} - - - +
@@ -74,15 +66,20 @@
- {{$t('personLiable')}} + {{$t('typeOfDeliverables')}}
- +
@@ -91,25 +88,52 @@
- {{$t('typeOfDeliverables')}} + {{$t('closingDate')}}
- - - - - {{ item.label }} - - - + +
+ +
+
+ {{$t('CertificationProgress')}} +
+ + + +
+
+
+ + +
+
+ {{$t('remarks')}} +
+ + + +
+
@@ -122,7 +146,7 @@ export default { name: 'batSetting', - props: ['url'], + props: ['url','roleSwitchingCode'], components: { PersonnelSelection }, @@ -131,19 +155,36 @@ visible: false, confirmLoading: false, formInline: {}, - rules: {}, + rules: { + + }, ids: [], configurationItemList: [], engineeringInterfacePersonList: [], typeOfDeliverablesList: [], - name: '' + name: '', + DeliverableTreeList: [] } }, mounted() { }, methods: { + disabledDate(current) { + return current && current < moment().subtract(1, 'day') + }, + + getDeliverableTree() { + getAction('/sys/category/getDeliverableTree', {}).then((res) => { + if (res.success) { + this.DeliverableTreeList = res.result + } else { + this.DeliverableTreeList = [] + } + }) + }, edit(data, name) { this.visible = true + this.getDeliverableTree() this.$nextTick(() => { this.ids = data || [] this.formInline = {} @@ -163,12 +204,24 @@ }, handleOkOne() { let ids = JSON.parse(JSON.stringify(this.ids)) + let formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] && formInline[res] instanceof Array) { + formInline[res] = formInline[res].join(',') + } + }) let query = { ids: ids.join(','), - ...this.formInline + ...formInline } + let url = '' this.confirmLoading = true - postAction(this.url.setBatch, query).then((res) => { + if (this.name == this.$t('changeSetting')) { + url = '/project/projectCertificationInventoryEO/updateConfigItemBatch' + } else { + url = this.url.setBatch + } + postAction(url, query).then((res) => { if (res.success) { this.$message.success(this.$t('OperationSuccessful')) this.visible = false diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index b3cacecb4..acb6c31bf 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -54,10 +54,10 @@ {{ $t('query') }} {{ $t('reset') }} - - {{ !toggleSearchStatus ? $t('open') : $t('away') }} - - + + + + @@ -347,7 +347,7 @@ - + @@ -473,7 +473,51 @@ 'NA': 'notInvolvedColor', 'Not start': 'submittedColor' }, - fieldList: [], + fieldList: [ + { + type: 'string', + value: 'category', + text: this.$t('category') + }, + { + type: 'string', + value: 'inspectionItem', + text: this.$t('inspectionItems') + }, + { + type: '', + value: 'configItem', + text: this.$t('configurationItem'), + dictCode: 'ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框 + }, + { + type: 'string', + value: 'wvtaId', + text: 'WVTA ID' + }, + { + type: 'string', + value: 'serialNumber', + text: this.$t('standardNo') + }, + { + type: 'Personnel', + value: 'sdt', + valueName: 'sdtName', + text: this.$t('engineeringInterfacePerson') + }, + { + type: 'Personnel', + value: 'dutyPerson', + valueName: 'dutyPersonName', + text: this.$t('personLiable') + }, + { + type: 'date', + value: 'endTime', + text: this.$t('closingDate') + }, + ], disabled: false, queryParamQuery: {}, formInline: {}, @@ -538,7 +582,7 @@ { title: this.$t('configurationItem'), align: 'left', - dataIndex: 'configItem', + dataIndex: 'configItem_dictText', width: 180, ellipsis: true }, @@ -1187,6 +1231,8 @@ this.$message.success(this.$t('OperationSuccessful')) this.visibleRoleSwitching = false this.confirmLoadingRoleSwitching = false + this.selectedRowKeysList = [] + this.selectedRowKeys = [] this.getList() this.$emit('getRoleSwitch', this.roleSwitchingCode) } else { From 13e067941de18a0f4eb22f62cdf6cf063663f31a Mon Sep 17 00:00:00 2001 From: cuijiaming <1410452759@qq.com> Date: Mon, 13 Mar 2023 11:31:38 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BA=93-=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E6=B8=85=E5=8D=95-=E6=A8=A1=E6=9D=BF=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ectCertificationInventoryEOController.java | 7 + ...rojectCertificationInventoryEOService.java | 10 ++ ...ctCertificationInventoryEOServiceImpl.java | 123 ++++++++++++++++++ 3 files changed, 140 insertions(+) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index e391fdfbf..8534b2c3b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject; import com.jero.common.api.vo.Result; import com.jero.common.system.query.QueryGenerator; import com.jero.modules.project.entity.ProjectCertificationInventoryEO; +import com.jero.modules.project.entity.ProjectLawsInventoryEO; import com.jero.modules.project.service.IProjectCertificationInventoryEOService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -248,4 +249,10 @@ public class ProjectCertificationInventoryEOController extends JeroController updateConfigItemBatch(@RequestBody JSONObject json) { return this.projectCertificationInventoryEOService.updateConfigItemBatch(json); } + + @ApiOperation(value="项目库-认证清单表-模板下载", notes="项目库-认证清单表-模板下载") + @GetMapping(value = "/exportTemplate") + public void exportTemplate(ProjectCertificationInventoryEO projectCertificationInventoryEO, HttpServletResponse response, HttpServletRequest request) throws Exception { + projectCertificationInventoryEOService.exportTemplate(projectCertificationInventoryEO,response,request); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index 792c9ce16..8284f1efb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -12,6 +12,8 @@ import com.jero.modules.system.entity.SysRole; import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO; import com.jero.modules.todoCenter.entity.ProcessInfoEO; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; @@ -161,6 +163,14 @@ public interface IProjectCertificationInventoryEOService extends IService getStandNameAndItemName(List projectCertificationInventoryEOList); + /** + * 模板下载 + * @param projectCertificationInventoryEO + * @param response + * @param request + */ + void exportTemplate(ProjectCertificationInventoryEO projectCertificationInventoryEO, HttpServletResponse response, HttpServletRequest request); + /** * 批量修改配置项 * @param json diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index bd93b3bb0..e53099cd0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -2,6 +2,7 @@ package com.jero.modules.project.service.impl; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.aliyuncs.utils.IOUtils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -37,6 +38,15 @@ import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum; import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService; import com.jero.modules.todoCenter.service.IProcessInfoEOService; import com.jero.modules.wkflow.enums.FlowTypeEnum; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFRichTextString; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.ss.util.CellRangeAddress; import org.apache.shiro.SecurityUtils; import org.springframework.beans.BeanUtils; import org.apache.commons.collections4.CollectionUtils; @@ -45,7 +55,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import java.io.File; import java.io.IOException; +import java.io.OutputStream; import java.util.*; import java.util.stream.Collectors; @@ -54,6 +66,9 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.ObjectUtils; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + /** * @Description: 项目库-认证清单表 * @Author: jero-boot @@ -88,6 +103,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl list = Arrays.asList(title.split(",")); + int index = 0; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + index = list.indexOf("认证进度") + 1; + }else{ + index = list.indexOf("Homologation Progress") + 1; + } + + //创建临时文件夹 + File nowFile = new File(filePath); + if (nowFile.exists()) { + nowFile.delete(); + } + nowFile.mkdirs(); + HSSFSheet sheet = workbook.createSheet("认证清单导入模板"); + sheet.setDefaultColumnWidth(16);//列宽 +// HSSFCellStyle cellStyle = workbook.createCellStyle(); +// cellStyle.setWrapText(true);//自动换行 +// cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 +// cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中 + + HSSFCellStyle cellStyleTemp = workbook.createCellStyle(); + cellStyleTemp.setWrapText(true);//自动换行 + + CellRangeAddress region = + new CellRangeAddress(1, 1, 0, 15); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列 + sheet.addMergedRegion(region); + String explain= ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + explain = "填写说明\n" + + "1.导入数据从第三行开始\n" + + "2.所有带*号的字段必须填写\n"+ + "3.责任人,交付物类型,工程接口人,字段是单选属性,必须和系统中的对应字段选项相匹配\n" + + "4.编号,责任领域,字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n" + + "5.类别,WVTA ID,检验项目,填写文本内容\n" + + "6.交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx"; + }else{ + explain = "Filling explanation\n" + + "1.Import data starts at the fourth line\n" + + "2.All fields marked with * must be filled in\n"+ + "3.Assignee,Deliverable Type,Deliverable Type,Eng. Interface,Fields are radio attributes that must match the corresponding field option in the system\n" + + "4.Standard No,Responsible Field, field is a multi-select attribute and must match the corresponding field in the system. If multiple fields are filled in, separate them by commas (,)\n" + + "5.Category,WVTA ID,Inspection Items,Fill in the text\n" + + "6.Deliverable Template,When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. If b. diocx is stored under the AAA standard number, enter AAA/B. diocx"; + } + for(int i = 0; i < 2; i++){ + //表头 + Row row = sheet.createRow(i);//开始创建标题行 + String[] headerArr = title.split(","); + if(i == 0 ){ + for (int m = 0; m < headerArr.length; m++) { + if(m < index){ + row.createCell(m).setCellValue(headerArr[m]); + }else { + break; + } + } + }else { + short height = (short) (7 * 252); + row.setHeight((short) height); + Cell cell = row.createCell(0); + cell.setCellStyle(cellStyleTemp); + cell.setCellValue(new HSSFRichTextString(explain)); + } + } + response.setHeader("Content-Disposition", + "attachment; filename=\"" + fileOriName + ".xls"); + response.setContentType("application/force-download"); + response.flushBuffer(); + os = response.getOutputStream(); + workbook.write(os); + }catch (Exception e){ + e.printStackTrace(); + throw new JeroBootException("下载文件失败,请重试"); + }finally { + IOUtils.closeQuietly(os); + } + } + }