From db1f4a084ed8f6ad16a60ad9ba0cb935083ba1ae Mon Sep 17 00:00:00 2001 From: yuekuo Date: Tue, 28 Mar 2023 17:50:00 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=9F=A5=E7=9C=8B+=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/upgradecompletion.vue | 73 ++++++++++--------- .../otamanagement/upgradeactivity/index.vue | 9 ++- 2 files changed, 46 insertions(+), 36 deletions(-) diff --git a/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue b/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue index ace445a90..2440d63b6 100644 --- a/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue +++ b/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue @@ -19,11 +19,11 @@ {{$t('implementedupgrade')}} - - + + {{$t('yes')}} - + {{$t('not')}} @@ -43,7 +43,7 @@ @@ -59,9 +59,9 @@ - {{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || - formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') + @click="clickButtonToUpload('csv')"> + {{ (formInline.csv === 'null' || formInline.csv === '' || + formInline.csv == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}

{{$t('notecsv')}}

@@ -69,11 +69,11 @@ -
+
{{$t('vehicleshavenotcompletedonlineupgrade')}} -
@@ -86,7 +86,7 @@
@@ -96,13 +96,13 @@
{{$t('Quantity')}}
- +
@@ -114,15 +114,15 @@
- + - {{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || - formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') + @click="clickButtonToUpload('wwcfj')"> + {{ (formInline.wwcfj === 'null' || formInline.wwcfj === '' || + formInline.wwcfj == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}

{{$t('format')}}

@@ -142,7 +142,7 @@ + :rows="2" v-model="formInline.ssjl"/>
@@ -155,9 +155,9 @@ - {{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || - formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') + @click="clickButtonToUpload('ssjlfj')"> + {{ (formInline.ssjlfj === 'null' || formInline.ssjlfj === '' || + formInline.ssjlfj == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}

{{$t('format')}}

@@ -192,7 +192,9 @@ export default { visible: false, disabled: false, showButton:false, - formInline: {}, + formInline: { + list:[{}] + }, confirmLoading: false, acceptcode:'', projectNameList: [], @@ -237,6 +239,8 @@ export default { methods: { ...mapGetters(['userInfo']), addModel(record,flag) { + this.disabled=false + this.showButton=false if(flag=='1'){ this.disabled=true this.showButton=true @@ -244,12 +248,11 @@ export default { this.record=record this.visible = true this.confirmLoading = false - this.formInline = {} - this.formInline.dataList = [{}] + // this.formInline = {} + // this.formInline.list = [{}] this.$nextTick(() => { this.formInline = { ...this.formInline } this.$refs.ruleForm.clearValidate() - // this.$refs.codeNumber.number() }) }, handleCancel() { @@ -267,27 +270,27 @@ export default { this.formInline.authDummyInventoryBaseId = this.$route.query.id let query = JSON.parse(JSON.stringify(this.formInline)) this.confirmLoading = true - // postAction(this.url.addModel, query).then((res) => { - // if (res.success) { - // this.confirmLoading = false - // this.$message.success(this.$t('OperationSuccessful')) + postAction('/ota/otaBaSjJssj/add',{otaId:this.record.id,...this.formInline}).then((res) => { + if (res.success) { + this.confirmLoading = false + this.$message.success(this.$t('OperationSuccessful')) - // } else { - // this.$message.warning(res.message) - // this.confirmLoading = false - // } - // }) + } else { + this.$message.warning(res.message) + this.confirmLoading = false + } + }) this.visible = false this.$emit('addModelList',this.record) } }) }, addClick(index){ - this.formInline.dataList.splice(index + 1, 0, {}) + this.formInline.list.splice(index + 1, 0, {}) this.formInline = { ...this.formInline } }, deleteClick(index) { - this.formInline.dataList.splice(index, 1) + this.formInline.list.splice(index, 1) this.formInline = { ...this.formInline } }, getRegulationNo() { diff --git a/jero-web/src/views/otamanagement/upgradeactivity/index.vue b/jero-web/src/views/otamanagement/upgradeactivity/index.vue index 39f523d9c..b2330f285 100644 --- a/jero-web/src/views/otamanagement/upgradeactivity/index.vue +++ b/jero-web/src/views/otamanagement/upgradeactivity/index.vue @@ -444,11 +444,18 @@ export default { }, // 结束升级 endUpgrade(record,flag){ + console.log('model',record); this.$refs.upgradecompletionRef.addModel(record,flag) }, // 查看 detailclick(record){ - + localStorage.removeItem('otaIdT') + localStorage.removeItem('otaId') + localStorage.setItem('otaId',record.id) + this.$router.push({ + path: '/upgradeactivityrecord', + query: {} + }) }, // 维护 maintenanceClick(row){ From 9193fa806b0479d07aafdfdcb6a3b475bb77d5c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=BD=A6=E6=B3=BD?= Date: Tue, 28 Mar 2023 18:02:31 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=B8=85=E5=8D=95-=E7=BB=B4=E6=8A=A4=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 4 ++-- jero-web/src/common/lang/zh-cn.js | 4 ++-- .../virtualList/components/virtualListDetails.vue | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index e5cbbbd3b..18121d70b 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1729,8 +1729,8 @@ module.exports = { notethree:'Provide supporting materials', verifyComplianceConfirmReturnReason:'Verify compliance Confirm return reason', theDeliverablesCannotReferencedPleaseReselect:'The deliverables of this project cannot be referenced, please reselect', - regulationListModuleMaintenance:'Regulation list module maintenance', - regulationListModule:'Regulation list module', + regulationListTemplateMaintenance:'Regulation list template maintenance', + regulatoryListTemplate:'Regulatory list template', gnxtwh:'Functional system maintenance', gnxt:'Functional system', dykzq:'Corresponding controller', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 6a59e83ea..2f643ba49 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1831,8 +1831,8 @@ module.exports = { notethree:'\n提供证明材料\n', verifyComplianceConfirmReturnReason:'验证符合性确认退回原因', theDeliverablesCannotReferencedPleaseReselect:'不能引用本项目的交付物,请重新选择', - regulationListModuleMaintenance:'法规清单模块维护', - regulationListModule:'法规清单模块', + regulationListTemplateMaintenance:'法规清单模板维护', + regulatoryListTemplate:'法规清单模板', gnxtwh:'功能系统维护', gnxt:'功能系统', dykzq:'对应控制器', diff --git a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue index 1643704b2..41ef684b2 100644 --- a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue +++ b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue @@ -6,7 +6,7 @@ - {{isTrue ? $t('regulationListModuleMaintenance'):$t('regulationListModuleMaintenance')}} + {{isTrue ? $t('regulationListTemplateMaintenance'):$t('regulationListTemplateMaintenance')}}
@@ -23,8 +23,8 @@
- - {{$t('regulationListModule')}} + + {{$t('regulatoryListTemplate')}} {{$route.query.name}} From da2673ff1152c4f8fee8a15aee2192f8deea99f1 Mon Sep 17 00:00:00 2001 From: yuekuo Date: Tue, 28 Mar 2023 18:04:52 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../upgradeactivity/components/upgradecompletion.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue b/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue index d364fa0c5..8b1479d10 100644 --- a/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue +++ b/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue @@ -236,17 +236,17 @@ export default { methods: { ...mapGetters(['userInfo']), addModel(record,flag) { - this.disabled=false + this.disabled=false this.showButton=false if(flag=='1'){ this.disabled=true this.showButton=true } this.record=record + this.visible = true this.confirmLoading = false - // this.formInline = {} - // this.formInline.list = [{}] + console.log('555',record); this.$nextTick(() => { this.formInline = { ...this.formInline } this.$refs.ruleForm.clearValidate() From b3c0534d5cc05470e7efd95706d89a695dd00e3d Mon Sep 17 00:00:00 2001 From: cuijiaming <1410452759@qq.com> Date: Tue, 28 Mar 2023 18:05:36 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=9A=84=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectCertificationInventoryEO.java | 8 +- .../ProjectCertificationInventoryEOEn.java | 3 +- .../project/enums/ProjectRoleEnum.java | 1 + ...ctCertificationInventoryEOServiceImpl.java | 700 +++++++++++++++++- 4 files changed, 676 insertions(+), 36 deletions(-) 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 74d413d05..54c3fb880 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 @@ -139,11 +139,12 @@ public class ProjectCertificationInventoryEO implements Serializable { private String bussDocumentLibraryId; /**交付物模板*/ -// @Excel(name = "交付物模板", width = 15) + @ApiModelProperty(value = "交付物模板") private String deliverableTemplate; /**交付物模板名称**/ @TableField(exist = false) + @Excel(name = "交付物模板", width = 15) private String deliverableTemplateName; /**交付结果*/ @@ -157,7 +158,6 @@ public class ProjectCertificationInventoryEO implements Serializable { @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "截止日期") private Date endTime; - /**流程状态*/ @ApiModelProperty(value = "流程状态") private String flowStatus; @@ -213,4 +213,8 @@ public class ProjectCertificationInventoryEO implements Serializable { @TableField(exist = false) private String excelName; + +// @Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd") +// @TableField(exist = false) +// private String endTimeStr; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java index d9f5e41fd..1f31acd54 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java @@ -137,11 +137,12 @@ public class ProjectCertificationInventoryEOEn implements Serializable { private java.lang.String bussDocumentLibraryId; /**交付物模板*/ -// @Excel(name = "交付物模板", width = 15) + @ApiModelProperty(value = "交付物模板") private java.lang.String deliverableTemplate; /**交付物模板名称**/ @TableField(exist = false) + @Excel(name = "交付物模板", width = 15) private String deliverableTemplateName; /**交付结果*/ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java index 24bfda6e3..cbffa1463 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java @@ -21,6 +21,7 @@ public enum ProjectRoleEnum { MANAGER("manage","11",""), ADMIN("系统管理员","12",""), VIEWER("Viewer","13",""), + DUTYPERSON("责任人","14","") ; String name; 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 bc470b601..0142b904c 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 @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.aliyuncs.utils.IOUtils; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -15,12 +16,14 @@ import com.jero.common.exception.JeroBootException; import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.vo.LoginUser; import com.jero.common.util.DateUtils; +import com.jero.common.util.oss.CosBootUtil; 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.document.controller.BussDocumentLibraryEOController; import com.jero.modules.document.entity.BussDocumentLibraryEO; import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper; +import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.oss.entity.OSSFile; @@ -63,15 +66,18 @@ import org.aspectj.util.FileUtil; import org.jeecgframework.poi.excel.ExcelExportUtil; import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.enmus.ExcelType; +import org.joda.time.DateTime; import org.springframework.beans.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.mock.web.MockMultipartFile; import org.springframework.stereotype.Service; import java.io.*; import java.text.DateFormat; +import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; @@ -85,6 +91,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile; + /** * @Description: 项目库-认证清单表 * @Author: jero-boot @@ -139,6 +147,15 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl stringStringMap : dataList) { ProjectCertificationInventoryEO projectCertificationInventoryEOTemp = JSON.parseObject(JSON.toJSONString(stringStringMap), ProjectCertificationInventoryEO.class); -// projectCertificationInventoryEOTemp.setCut(projectCertificationInventoryEO.getCut()); + projectCertificationInventoryEOTemp.setCut(projectCertificationInventoryEO.getCut()); projectCertificationInventoryEOTemp.setProjectLibraryId(projectCertificationInventoryEO.getProjectLibraryId()); projectCertificationInventoryEOTemp.setFlowStatus(CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()); datas.add(projectCertificationInventoryEOTemp); @@ -2842,17 +2858,553 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl categoryList = sysCategoryService.list(); + List categoryList = sysCategoryService.list(); //普通数据字典 -// List dictItemList = sysDictItemServiceImpl.selectItemsAll(); -// importDatas(datas, dictItemList, zipEntryName,saveDirectory,projectCertificationInventoryEO,categoryList); - String cut = projectCertificationInventoryEO.getCut(); - importDisposeData(datas,cut); + List dictItemList = sysDictItemServiceImpl.selectItemsAll(); + importDatas(datas, dictItemList, zipEntryName,saveDirectory,projectCertificationInventoryEO,categoryList); +// String cut = projectCertificationInventoryEO.getCut(); +// importDisposeData(datas,cut); //删除原上传文件 FileUnZip.deleteDir(saveDirectory); } + private void importDatas(List datas, + List dictItemList, String zipEntryName, + File saveDirectory, ProjectCertificationInventoryEO projectCertificationInventoryEOTemp, + List categoryList) { + List msgList = new ArrayList<>(); + //模板数据验证 + msgList = dataTemplateVerify(datas, dictItemList, zipEntryName, projectCertificationInventoryEOTemp, categoryList); + + if (msgList.size() > 0) { + //返回报错信息 + String html = ""; + for (String s : msgList) { + html += s + "
"; + } + FileUnZip.deleteDir(saveDirectory); + throw new JeroBootException(html); + }else { + if (datas.size() != 0) { + this.saveBatch(datas); + } + } + } + + //模板数据验证 + private List dataTemplateVerify(List datas, + List dictItemList, String zipEntryName, + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp, + List categoryList) { + String dictId = sysCategoryMapper.getDictId("ren4_zheng4_-_jiao1_fu4_wu4_lei4_xing2"); + List collect = categoryList.stream().filter(e -> e.getSysDictId().equals(dictId)).collect(Collectors.toList()); + List treeNameList = new ArrayList<>(); + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + treeNameList = collect.stream().map(SysCategory::getName).collect(Collectors.toList()); + }else{ + treeNameList = collect.stream().map(SysCategory::getEnName).collect(Collectors.toList()); + } + int i = 2; + List msgList = new ArrayList<>(); + String value = ""; + boolean flag = true; + + //编号验证 + verifySerialNumber(datas,projectCertificationInventoryEOTemp); + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : datas) { + i++; + String errorMsg = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + errorMsg = "第" + i + "行:"; + }else{ + errorMsg = i + " line:"; + } + //类别 + String category = projectCertificationInventoryEO.getCategory(); + //检验项目 + String inspectionItem = projectCertificationInventoryEO.getInspectionItem(); + //配置项 + String configItem = projectCertificationInventoryEO.getConfigItem(); + //WVTA ID + String wvtaId = projectCertificationInventoryEO.getWvtaId(); + //标准编号 + String serialNumber = projectCertificationInventoryEO.getSerialNumber(); + //责任领域 + String dutyTerritory = projectCertificationInventoryEO.getDutyTerritoryName(); + //工程接口人engineeringInterfacePerson + String sdt = projectCertificationInventoryEO.getSdtName(); + //责任人 + String dutyPerson = projectCertificationInventoryEO.getDutyPersonName(); + //交付物类型 + String deliverableType = projectCertificationInventoryEO.getDeliverableTypeName(); + //截止时间 + Date endTime = projectCertificationInventoryEO.getEndTime(); + + //文件 + //交付物模板 + String deliverableTemplate = projectCertificationInventoryEO.getDeliverableTemplateName(); + + + + + //编号必填 + flag = must(projectCertificationInventoryEO, errorMsg, msgList, serialNumber, "编号", "Standard No"); + + + //WVTA ID + + if(StringUtils.isNotBlank(wvtaId)){ + if(wvtaId.length() > 100){ + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "WVTA ID不能超过100个字符, "; + }else{ + message = errorMsg + " The WVTA ID cannot contain more than 100 characters, "; + } + msgList.add(message); + } + } else { + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "WVTA ID不能为空, "; + }else{ + message = errorMsg + " The WVTA ID cannot null, "; + } + msgList.add(message); + } + //类别 + + if(StringUtils.isNotBlank(category)){ + if(category.length() > 100){ + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "类别不能超过100个字符, "; + }else{ + message = errorMsg + " The Category cannot contain more than 100 characters, "; + } + msgList.add(message); + } + }else { + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "类别不能为空, "; + }else{ + message = errorMsg + " The Category cannot null, "; + } + msgList.add(message); + } + //检验项目 + + if(StringUtils.isNotBlank(inspectionItem)){ + if(inspectionItem.length() > 100){ + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "检验项目不能超过100个字符, "; + }else{ + message = errorMsg + " The InspectionItem cannot contain more than 100 characters, "; + } + msgList.add(message); + } + }else { + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "检验项目不能为空, "; + }else{ + message = errorMsg + " The InspectionItem cannot null, "; + } + msgList.add(message); + } + //配置项 + + if(StringUtils.isNotBlank(configItem)){ + if(configItem.length() > 100){ + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "配置项不能超过100个字符, "; + }else{ + message = errorMsg + " The ConfigItem cannot contain more than 100 characters, "; + } + msgList.add(message); + } + }else { + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "配置项不能为空, "; + }else{ + message = errorMsg + " The ConfigItem cannot null, "; + } + msgList.add(message); + } + + //责任领域 + + if(StringUtils.isNotBlank(dutyTerritory)){ + value = pullMore(dictItemList, projectCertificationInventoryEO, errorMsg, dutyTerritory,msgList,"责任领域","Responsible Field","duty_territory"); + if(StringUtils.isNotBlank(value)){ + projectCertificationInventoryEO.setDutyTerritory(value); + } + }else { + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "责任领域不能为空, "; + }else{ + message = errorMsg + " The Responsible Field cannot null, "; + } + msgList.add(message); + } + //工程接口人(责任领域下的工程接口人) + Map objectMap = iProjectRelatedPersonnelService.queryPersonByProjectId(projectCertificationInventoryEOTemp.getProjectLibraryId(), value); + + //工程接口人 + List> mapPersonList = (List>) objectMap.get("engineeringInterfacePersonList"); + //所有人 + List> allPersonList = (List>) objectMap.get("allPersonList"); + + String nameCn = ""; + String nameEn = ""; + //工程接口人 + if(StringUtils.isNotBlank(sdt)){ + nameCn = "工程接口人"; + nameEn = "Eng. Interface "; + //验证人员是否存在 + personnelVerify(projectCertificationInventoryEO, errorMsg, msgList, sdt, mapPersonList,nameCn,nameEn, com.jero.modules.project.enums.ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue()); + }else { + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "工程接口人不能为空, "; + }else{ + message = errorMsg + " The Eng. Interface cannot null, "; + } + msgList.add(message); + } + //责任人 + if(StringUtils.isNotBlank(dutyPerson)){ + nameCn = "责任人"; + nameEn = "Assignee"; + //验证人员是否存在 + personnelVerify(projectCertificationInventoryEO, errorMsg, msgList, dutyPerson, allPersonList,nameCn,nameEn, com.jero.modules.project.enums.ProjectRoleEnum.DUTYPERSON.getValue()); + }else { + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "责任人不能为空, "; + }else{ + message = errorMsg + " The Assignee cannot null, "; + } + msgList.add(message); + } + //交付物类型 + if(StringUtils.isNotEmpty(deliverableType)){ + value = tree(categoryList,treeNameList, projectCertificationInventoryEO, errorMsg, deliverableType,msgList,"交付物类型","Deliverable Type","deliverable_template"); + if(StringUtils.isNotBlank(value)){ + String treeId = getTreeId(categoryList, projectCertificationInventoryEOTemp, treeNameList, value); + projectCertificationInventoryEO.setDeliverableType(treeId); + } + }else{ + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "交付物类型不能为空, "; + }else{ + message = errorMsg + " The Deliverable Type cannot null, "; + } + msgList.add(message); + } + + //交付物模板 + value = templateTransition(zipEntryName, projectCertificationInventoryEO, errorMsg, deliverableTemplate,msgList,"交付物模板","Deliverable Template"); + if(StringUtils.isNotBlank(value)){ + projectCertificationInventoryEO.setDeliverableTemplate(value); + } + //截止时间 + SimpleDateFormat sd = new SimpleDateFormat(); + String endTimeStr = sd.format(endTime); + if(StringUtils.isNotBlank(endTimeStr)){ + flag = dateVerify(projectCertificationInventoryEO, errorMsg, endTime,msgList,"截止时间","Due Date"); + if(flag){ + projectCertificationInventoryEO.setEndTime(projectCertificationInventoryEO.getEndTime()); + } + }else{ + String message = ""; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){ + message = errorMsg + "截止时间不能为空, "; + }else{ + message = errorMsg + " The Due Date Type cannot null, "; + } + msgList.add(message); + } + + } + return msgList; + } + //必填 + private boolean must(ProjectCertificationInventoryEO projectCertificationInventoryEO, String errorMsg, + List msgList, String serialNumber,String nameCn,String nameEn) { + int errorCount = 0; + if(StringUtils.isBlank(serialNumber)){ + errorCount ++; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + errorMsg += nameCn + "为必填项,不能为空, "; + }else{ + errorMsg += nameEn + "This parameter is mandatory and cannot be empty, "; + } + msgList.add(errorMsg); + } + if(errorCount == 0){ + return true; + }else{ + return false; + } + } + + private boolean dateVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO, + String errorMsg, Date field, List msgList, String nameCn, String nameEn) { + + //判断格式是否正确 + boolean flag = true; + if(ObjectUtils.isNotEmpty(field)){ + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + String format = sdf.format(field); + if (!DateUtils.isValidDate(format)) { + flag = false; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + errorMsg += nameCn + "格式不正确, 正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日"; + }else{ + errorMsg += nameEn + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日"; + } + msgList.add(errorMsg); + } + } + return flag; + } + + private String templateTransition(String zipEntryName, + ProjectCertificationInventoryEO projectCertificationInventoryEO, + String errorMsg, String deliverableTemplate, List msgList, + String nameCn, String nameEn) { + String value = ""; + if (StringUtils.isNotBlank(deliverableTemplate)) { + StringBuilder sb = new StringBuilder(); + for (String fileName : deliverableTemplate.split(",")) { + List nowFileList = new ArrayList<>(); + + nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName,projectCertificationInventoryEO.getCut(),errorMsg,msgList,nameCn,nameEn); + + if (nowFileList.size() == 0) { +// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ +// errorMsg += "压缩包中没有" + fileName + "文件; "; +// }else{ +// errorMsg += " Not in the zip package" + fileName + "file; "; +// } +// msgList.add(errorMsg); + } else { + try { + FileInputStream input = new FileInputStream(nowFileList.get(0)); + MultipartFile multipartFile = + new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input); + //文件存入文件表 + OSSFile ossFile = iOSSFileService.uploadLocalOfCos(multipartFile, "", null,null); + if (ObjectUtils.isNotEmpty(ossFile)) { + sb.append(ossFile.getId() + ","); + } + } catch (IOException e) { + log.error("认证清单导入"+e.getMessage()); + } + } + } + if (StringUtils.isNotBlank(sb)) { + value = sb.substring(0, sb.length() - 1); + } + } + return value; + } + + private String getTreeId(List categoryList, + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp, + List treeNameList, String value) { + StringBuilder sb = new StringBuilder(); + for (String valueTemp : value.split(",")) { + if (treeNameList.contains(valueTemp)) { + List sysCategoryList = new ArrayList<>(); + if (CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())) { + sysCategoryList = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList()); + } else { + sysCategoryList = categoryList.stream().filter(e -> e.getEnName().equals(valueTemp)).collect(Collectors.toList()); + } + if (sysCategoryList.size() != 0) { + sb.append(sysCategoryList.get(0).getId() + ","); + } + } + } + if (StringUtils.isNotBlank(sb)) { + String substring = sb.substring(0, sb.length() - 1); + return substring; + } + return null; + } + + private String tree(List categoryList, List nameList, + ProjectCertificationInventoryEO projectCertificationInventoryEO, + String errorMsg, String value, List msgList, + String nameCn, String nameEn, String dictCode) { + if (StringUtils.isNotBlank(value)) { + StringBuilder sb = new StringBuilder(); + for (String s : value.split(",")) { + if(!nameList.contains(s)){ + sb.append(s+","); + } + } + if(StringUtils.isNotBlank(sb)){ + String substring = sb.substring(0, sb.length() - 1); + if (CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())) { + errorMsg += nameCn + "中的" + substring + "与数据字典不匹配, "; + } else { + errorMsg += nameEn + " " + substring + " does not match the data dictionary, "; + } + msgList.add(errorMsg); + }else{ + StringBuilder sbTemp = new StringBuilder(); + for (String s : value.split(",")) { + List collect = new ArrayList<>(); + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + collect = categoryList.stream().filter(e -> s.equals(e.getName())).collect(Collectors.toList()); + if(collect.size() != 0){ + sbTemp.append(collect.get(0).getName()+","); + } + }else{ + collect = categoryList.stream().filter(e -> s.equals(e.getEnName())).collect(Collectors.toList()); + if(collect.size() != 0){ + sbTemp.append(collect.get(0).getEnName()+","); + } + } + } + if(StringUtils.isNotBlank(sbTemp)){ + String substring = sbTemp.substring(0, sbTemp.length() - 1); + return substring; + } + } + } + return null; + } + + private void personnelVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO, + String errorMsg, List msgList, String regulationOwnerId, + List> mapList, String nameCn, String nameEn, String fieldNumber) { + //单选 + if(regulationOwnerId.contains(",")){ + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + errorMsg += nameCn + "导入只能填写一个用户名, "; + }else{ + errorMsg += "Only one user name can be entered for"+ nameEn +"import, "; + } + msgList.add(errorMsg); + } + + if(mapList.size() != 0){ + int count = 0; + for (Map stringStringMap : mapList) { + String name = stringStringMap.get("name"); + if(regulationOwnerId.equals(name)){ + count ++; + if(com.jero.modules.project.enums.ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue().equals(fieldNumber)){ + projectCertificationInventoryEO.setSdt(stringStringMap.get("value")); + }else if(com.jero.modules.project.enums.ProjectRoleEnum.DUTYPERSON.getValue().equals(fieldNumber)){ + projectCertificationInventoryEO.setDutyPerson(stringStringMap.get("value")); + } + break; + } + } + if(count == 0){ + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + errorMsg += nameCn+regulationOwnerId+"与相关人员名单中责任领域下的人员不匹配"; + }else{ + errorMsg += nameEn+regulationOwnerId+"does not match a person under the Responsible Field in the relevant person list"; + } + msgList.add(errorMsg); + } + }else{ + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + errorMsg += nameCn+regulationOwnerId+"与相关人员名单中责任领域下的人员不匹配"; + }else{ + errorMsg += nameEn+regulationOwnerId+"does not match a person under the Responsible Field in the relevant person list"; + } + msgList.add(errorMsg); + } + } + + private String pullMore(List dictItemList, ProjectCertificationInventoryEO projectCertificationInventoryEO, + String errorMsg, String value, List msgList, + String nameCn, String nameEn, String dictCode) { + List valueList = new ArrayList<>(); + if (StringUtils.isNotBlank(value)) { + List list = Arrays.asList(value.split(",")); + List sysDictItemList = new ArrayList<>(); + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + sysDictItemList = dictItemList.stream().filter(e ->dictCode.equals(e.getDictCode()) && list.contains(e.getItemText())).collect(Collectors.toList()); + }else{ + sysDictItemList = dictItemList.stream().filter(e ->dictCode.equals(e.getDictCode()) && list.contains(e.getEnName())).collect(Collectors.toList()); + } + + if(list.size() == sysDictItemList.size()){ + valueList = sysDictItemList.stream().map(SysDictItem::getItemValue).collect(Collectors.toList()); + + }else{ + //数据中有与数据字典不匹配的值 + List finalValueList = valueList; + List diffList = list.stream().filter(e -> !finalValueList.contains(e)).collect(Collectors.toList()); + if (CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())) { + errorMsg += nameCn + "中的" + StringUtils.join(diffList,",") + "与数据字典不匹配, "; + } else { + errorMsg += nameEn + " " + StringUtils.join(diffList,",") + " does not match the data dictionary, "; + } + msgList.add(errorMsg); + } + } + return StringUtils.join(valueList,","); + } + + + //编号验证 + private void verifySerialNumber(List datas, + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp) { + //1. 验证标准号在文档库中是否存在 + List serialNumberList = datas.stream().map(ProjectCertificationInventoryEO::getSerialNumber).collect(Collectors.toList()); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.in(BussDocumentLibraryEO::getSerialNumber,serialNumberList); + List bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapper); + //文档库中可能存在重复的标准号 + List serialNumberListTemp = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).distinct().collect(Collectors.toList()); + if(serialNumberList.size() != serialNumberListTemp.size()){ + //存在文档库没有的数据 + List collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList()); + List serialNumbers = serialNumberList.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList()); + if(serialNumbers.size() > 0){ + if(CutEnum.CN.getValue().equals(datas.get(0).getCut())){ + throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加"); + }else{ + throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added"); + } + } + }else{ + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : datas) { + List collect = bussDocumentLibraryEOList.stream() + .filter(e -> e.getSerialNumber().equals(projectCertificationInventoryEO.getSerialNumber())).collect(Collectors.toList()); + projectCertificationInventoryEO.setBussDocumentLibraryId(collect.get(0).getId()); + } + } +// //2. 验证标准号在法规清单中是否添加过 +// LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); +// lambdaQueryWrapper.in(ProjectCertificationInventoryEO::getSerialNumber,serialNumberList).in(ProjectCertificationInventoryEO::getProjectLibraryId,projectCertificationInventoryEOTemp.getProjectLibraryId()); +// List projectCertificationInventoryEOList = this.list(lambdaQueryWrapper); +// List serialNumberTempList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getSerialNumber).collect(Collectors.toList()); +// if(projectCertificationInventoryEOList.size() > 0){ +// if(CutEnum.CN.getValue().equals(datas.get(0).getCut())){ +// throw new JeroBootException(StringUtils.join(serialNumberTempList,",")+"已存在,不能重复添加"); +// }else{ +// throw new JeroBootException(StringUtils.join(serialNumberTempList,",")+" already exists and cannot be added again"); +// } +// } + } + /** * 导出数据 * @param response @@ -2870,10 +3422,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl fileInfos = getOssFiles(dataList); + //处理文件名称 + for (int i = 0; i < dataList.size(); i++) { if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){ String fileName = ossFileService.getFileInfos(dataList.get(i).getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(",")); dataList.get(i).setDeliveryResult(fileName); + + } + if(StringUtils.isNotEmpty(dataList.get(i).getDeliverableTemplate())){ + String deliverableTemplateName = template(fileInfos, dataList.get(i).getDeliverableTemplate()); + dataList.get(i).setDeliverableTemplateName(deliverableTemplateName); } } String cut = projectCertificationInventoryEO.getCut(); @@ -2890,7 +3451,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl dataList, List fileInfos) throws IOException{ + if(fileInfos.size() != 0){ + for(ProjectCertificationInventoryEO projectCertificationInventoryEO : dataList){ + String deliverableTemplate = projectCertificationInventoryEO.getDeliverableTemplate(); + String serialNumber = projectCertificationInventoryEO.getSerialNumber(); + if(StringUtils.isBlank(serialNumber)){ + continue; + } + List deliverableTemplateFileList = new ArrayList<>(); + List oSSFileList = new ArrayList<>(); + if(StringUtils.isNotBlank(deliverableTemplate)){ + deliverableTemplateFileList = fileInfos.stream().filter(e -> deliverableTemplate.contains(e.getId())).collect(Collectors.toList()); + oSSFileList.addAll(deliverableTemplateFileList); + } + if(oSSFileList.size() != 0){ + String fileNowPath = uploadpath + "/tempZip/" + serialNumber; + File file = new File(fileNowPath); + if (file.exists()) { + file.delete(); + } + file.mkdirs(); + for (OSSFile ossFile : oSSFileList) { + String url = ossFile.getUrl(); + if(StringUtils.isNotBlank(url)){ + //判断文件是否存在 + boolean b = CosBootUtil.doesObjectExist(url); + if(b){ + InputStream download = CosBootUtil.download(url); + copyFile(download, fileNowPath + File.separator + ossFile.getFileName()); + } + } + } + } + } + + } + } + + private String template(List fileInfos, String value) { + StringBuilder sb = new StringBuilder(); + for (String s : value.split(",")) { + List collect = fileInfos.stream().filter(e -> s.equals(e.getId())).collect(Collectors.toList()); + if(collect.size() != 0){ + sb.append(collect.get(0).getFileName()+","); + } + } + String substring = ""; + if(StringUtils.isNotBlank(sb)){ + substring = sb.substring(0, sb.length() - 1); + } + return substring; + } + + private List getOssFiles(List dataList) { + List fileIdList = new ArrayList<>(); + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : dataList) { + if(StringUtils.isNotBlank(projectCertificationInventoryEO.getDeliverableTemplate())){ + fileIdList.add(projectCertificationInventoryEO.getDeliverableTemplate()); + } + } + //查询所有的文件 + List fileInfos = new ArrayList<>(); + if(fileIdList.size() != 0){ + fileInfos = iOSSFileService.getFileInfos(StringUtils.join(fileIdList, ",")); + } + return fileInfos; + } + private String pull(List sysDictItems, String field,String dictCode) { if(StringUtils.isBlank(field)){ return null; @@ -3008,33 +3638,37 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl list = Arrays.asList(title.split(",")); @@ -3112,7 +3746,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl Date: Tue, 28 Mar 2023 18:06:59 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/listEditModel.vue | 695 +++++++++--------- 1 file changed, 360 insertions(+), 335 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index 9a4a571c8..8042ce409 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -221,30 +221,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
@@ -252,13 +252,13 @@ {{$t('engineeringInterfacePerson')}}
- - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - -
-
- {{$t('remarks')}} -
- - - -
-
-
+ + + + + + + + + + + + + + + + + + + + + +
+
+ {{$t('remarks')}} +
+ + + +
+
+
 {{$t('confirmationOfDesignConformity')}}
@@ -326,21 +326,22 @@ :isSingleChoice="true" :personneQuery="formInline" v-if="visible" + :disabled="isEdit(this.formInline)" @change="PersonnelSelectionChange" v-model="formInline.designDutyIdName"/> - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -361,66 +362,67 @@ :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="dateChange({db_field_name:'designDueDate'})" format="YYYY-MM-DD" + :disabled="isEdit(this.formInline)" :getCalendarContainer="(trigger) => trigger.parentNode" v-model="formInline.designDueDate" style="width: 100%"/>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
@@ -436,6 +438,7 @@ :getPopupContainer="triggerNode=> triggerNode.parentNode" class="box-input" style="width: 100%" + :disabled="isEdit(this.formInline)" :tree-data="DeliverableTreeList" tree-checkable :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')" @@ -475,177 +478,178 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 {{$t('verificationAndConformityconfirmation')}}
@@ -661,6 +665,7 @@ :isSingleChoice="true" :personneQuery="formInline" v-if="visible" + :disabled="isEditVerifi(this.formInline)" @change="PersonnelSelectionChange" v-model="formInline.verifyDutyIdName"/> @@ -677,50 +682,51 @@ :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="dateChange({db_field_name:'verifyDueDate'})" format="YYYY-MM-DD" + :disabled="isEditVerifi(this.formInline)" :getCalendarContainer="(trigger) => trigger.parentNode" v-model="formInline.verifyDueDate" style="width: 100%"/>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + +
@@ -736,6 +742,7 @@ :getPopupContainer="triggerNode=> triggerNode.parentNode" class="box-input" style="width: 100%" + :disabled="isEditVerifi(this.formInline)" :tree-data="DeliverableTreeList" tree-checkable :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')" @@ -776,6 +783,7 @@ @@ -827,7 +835,8 @@
-
+
{{$t('verifyComplianceConfirmReturnReason')}}
@@ -984,6 +993,22 @@ this.userInfoQuery = this.userInfo() }, methods: { + isEdit(val) { + if (val.designFlowStatus == 'Task to be confirmed' || val.designFlowStatus == 'Results to be submitted' || + val.designFlowStatus == 'Results to be reviewed') { + return true + } else { + return false + } + }, + isEditVerifi(val){ + if (val.verifyFlowStatus == 'Task to be confirmed' || val.verifyFlowStatus == 'Results to be submitted' || + val.verifyFlowStatus == 'Results to be reviewed') { + return true + } else { + return false + } + }, ...mapGetters(['userInfo']), getRejectCause(id) { let query = { From 05451454d6923a6942697a8548f7a3683c33b3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Tue, 28 Mar 2023 18:12:35 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/projectManagement/components/listEditModel.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index 8042ce409..fe42f0fd7 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -1001,7 +1001,7 @@ return false } }, - isEditVerifi(val){ + isEditVerifi(val) { if (val.verifyFlowStatus == 'Task to be confirmed' || val.verifyFlowStatus == 'Results to be submitted' || val.verifyFlowStatus == 'Results to be reviewed') { return true @@ -1326,8 +1326,15 @@ this.$set(this, 'rules', rules) }, clickButtonToUpload(item) { + let isTrue = false + if (item == 'designDeliverableTemplate') { + isTrue = this.isEdit(this.formInline) + } else if (item == 'verifyDeliverableTemplate') { + isTrue = this.isEditVerifi(this.formInline) + } this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.visible = true + this.$refs.uploadFile.disabled = isTrue this.uploadName = item getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => { if (res.success) { From 0514fa9f45000b9584deb2390b656457f9210455 Mon Sep 17 00:00:00 2001 From: wangzhijiang Date: Tue, 28 Mar 2023 18:29:12 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8E=BB=E9=99=A4=E5=AD=97=E6=AE=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/entity/ProjectLawsInventoryEO.java | 18 +++++++++--------- .../entity/ProjectLawsInventoryEOEn.java | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 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 c66e7ce3d..8ebc4d8d4 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 @@ -102,19 +102,19 @@ public class ProjectLawsInventoryEO implements Serializable { /**适用地区*/ @ApiModelProperty(value = "适用地区") //@Dict(dicCode ="region") - @Excel(name = "适用地区", width = 15, dicCode = "region") +// @Excel(name = "适用地区", width = 15, dicCode = "region") private java.lang.String region; @TableField(exist = false) private String region_dictText; /**对应标准*/ - @Excel(name = "对应标准", width = 20) +// @Excel(name = "对应标准", width = 20) @ApiModelProperty(value = "对应标准") private String correspondingStandard; /**实施类别*/ - @Excel(name = "实施类别", width = 20,dicCode ="implement_type") +// @Excel(name = "实施类别", width = 20,dicCode ="implement_type") @ApiModelProperty(value = "实施类别") //@Dict(dicCode ="implement_type") private String implementType; @@ -122,7 +122,7 @@ public class ProjectLawsInventoryEO implements Serializable { private String implementType_dictText; /**新车型实施日期*/ - @Excel(name = "新车型实施日期", width = 20, format = "yyyy-MM-dd") +// @Excel(name = "新车型实施日期", width = 20, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "新车型实施日期") @@ -132,7 +132,7 @@ public class ProjectLawsInventoryEO implements Serializable { private String xin1Che1Xing2Shi2Shi1Ri4Qi1String; /**在产车实施日期*/ - @Excel(name = "在产车实施日期", width = 20, format = "yyyy-MM-dd") +// @Excel(name = "在产车实施日期", width = 20, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "在产车实施日期") @@ -162,7 +162,7 @@ public class ProjectLawsInventoryEO implements Serializable { private String applicableSupplement; /**WVTA ID*/ - @Excel(name = "WVTA ID", width = 20) +// @Excel(name = "WVTA ID", width = 20) @ApiModelProperty(value = "WVTA ID") private String wvtaId; @@ -187,7 +187,7 @@ public class ProjectLawsInventoryEO implements Serializable { @ApiModelProperty(value = "认证工程师id") private String homologationEngineerId; - @Excel(name = "认证工程师", width = 20) +// @Excel(name = "认证工程师", width = 20) @TableField(exist = false) @ApiModelProperty(value = "认证工程师名称") private String homologationEngineerName;//认证工程师名称 @@ -238,7 +238,7 @@ public class ProjectLawsInventoryEO implements Serializable { private String designInitiatorId; /**设计符合性确认-发起人名称*/ - @Excel(name = "发起人", width = 20,groupName = "设计符合性确认") +// @Excel(name = "发起人", width = 20,groupName = "设计符合性确认") @TableField(exist = false) private String designInitiatorName; @@ -372,7 +372,7 @@ public class ProjectLawsInventoryEO implements Serializable { private String verifyInitiatorId; /**验证符合性确认-发起人名称*/ - @Excel(name = "发起人", width = 20,groupName = "验证符合性确认") +// @Excel(name = "发起人", width = 20,groupName = "验证符合性确认") @TableField(exist = false) private String verifyInitiatorName; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java index d380e7c48..a5f786793 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java @@ -101,29 +101,29 @@ public class ProjectLawsInventoryEOEn implements Serializable { /**适用地区*/ @ApiModelProperty(value = "适用地区") @Dict(dicCode ="Area") - @Excel(name = "Area", width = 15) +// @Excel(name = "Area", width = 15) private String region; /**对应标准*/ - @Excel(name = "Compare EU/CN", width = 20) +// @Excel(name = "Compare EU/CN", width = 20) @ApiModelProperty(value = "对应标准") private String correspondingStandard; /**实施类别*/ - @Excel(name = "Usage", width = 20,dicCode ="implement_type") +// @Excel(name = "Usage", width = 20,dicCode ="implement_type") @ApiModelProperty(value = "实施类别") @Dict(dicCode ="implement_type") private String implementType; /**新车型实施日期*/ - @Excel(name = "New Type Execution Date", width = 30, format = "yyyy-MM-dd") +// @Excel(name = "New Type Execution Date", width = 30, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "新车型实施日期") private Date xin1Che1Xing2Shi2Shi1Ri4Qi1; /**在产车实施日期*/ - @Excel(name = "New Vehicle Execution Date", width = 30, format = "yyyy-MM-dd") +// @Excel(name = "New Vehicle Execution Date", width = 30, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "在产车实施日期") @@ -146,7 +146,7 @@ public class ProjectLawsInventoryEOEn implements Serializable { private String applicableSupplement; /**WVTA ID*/ - @Excel(name = "WVTA ID", width = 20) +// @Excel(name = "WVTA ID", width = 20) @ApiModelProperty(value = "WVTA ID") private String wvtaId; @@ -169,7 +169,7 @@ public class ProjectLawsInventoryEOEn implements Serializable { @ApiModelProperty(value = "认证工程师id") private String homologationEngineerId; - @Excel(name = "Homologation Engineer", width = 25) +// @Excel(name = "Homologation Engineer", width = 25) @TableField(exist = false) @ApiModelProperty(value = "认证工程师名称") private String homologationEngineerName;//认证工程师名称 @@ -213,7 +213,7 @@ public class ProjectLawsInventoryEOEn implements Serializable { private String designInitiatorId; /**设计符合性确认-发起人名称*/ - @Excel(name = "Reviewer", width = 25,groupName = "Design Compliance Check") +// @Excel(name = "Reviewer", width = 25,groupName = "Design Compliance Check") @TableField(exist = false) private String designInitiatorName; @@ -325,7 +325,7 @@ public class ProjectLawsInventoryEOEn implements Serializable { private String verifyInitiatorId; /**验证符合性确认-发起人名称*/ - @Excel(name = "Reviewer", width = 25,groupName = "Validation Compliance Check") +// @Excel(name = "Reviewer", width = 25,groupName = "Validation Compliance Check") @TableField(exist = false) private String verifyInitiatorName; From b03aa4d0380e3053530a6a1fa2709532c79da32e Mon Sep 17 00:00:00 2001 From: wangzhijiang Date: Tue, 28 Mar 2023 18:29:47 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8E=BB=E9=99=A4=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=A6=85=E9=81=93bug=2067169?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/modules/project/entity/ProjectLawsInventoryEOEn.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java index a5f786793..b156a0f74 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java @@ -123,7 +123,7 @@ public class ProjectLawsInventoryEOEn implements Serializable { private Date xin1Che1Xing2Shi2Shi1Ri4Qi1; /**在产车实施日期*/ -// @Excel(name = "New Vehicle Execution Date", width = 30, format = "yyyy-MM-dd") +// @Excel(name = "New Vehicle Execution Date", width = 30, format = "yyyy-MM-dd") 67169 @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "在产车实施日期")