From b8b88190f538797aadc8c010a379c7ca96b73c4f Mon Sep 17 00:00:00 2001 From: cuijiaming <1410452759@qq.com> Date: Thu, 30 Mar 2023 16:35:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=BF=85=E5=A1=AB=E9=A1=B9=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E5=92=8C=E7=BC=96=E5=8F=B7=E9=AA=8C=E8=AF=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ctCertificationInventoryEOServiceImpl.java | 86 +++++++++++++++---- 1 file changed, 69 insertions(+), 17 deletions(-) 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 f86813fb3..489cae778 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 @@ -2859,6 +2859,49 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl 1) { dataList.add(rowList); } @@ -3518,8 +3561,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl datas, ProjectCertificationInventoryEO projectCertificationInventoryEOTemp) { - //1. 验证标准号在文档库中是否存在 + + List serialNumberList = datas.stream().map(ProjectCertificationInventoryEO::getSerialNumber).collect(Collectors.toList()); + //1. 验证标准号在文档库中是否存在 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.in(BussDocumentLibraryEO::getSerialNumber,serialNumberList); List bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapper); @@ -3537,24 +3582,31 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl collect = bussDocumentLibraryEOList.stream() - .filter(e -> e.getSerialNumber().equals(projectCertificationInventoryEO.getSerialNumber())).collect(Collectors.toList()); - projectCertificationInventoryEO.setBussDocumentLibraryId(collect.get(0).getId()); + //验证编号在法规清单中是否存在 + LambdaQueryWrapper lwrapper = new LambdaQueryWrapper<>(); + lwrapper.in(ProjectLawsInventoryEO::getSerialNumber,serialNumberList); + List projectLawsInventoryEOList = projectLawsInventoryEOService.list(lwrapper); + List LawSerialNumberListTemp = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.toList()); + if(serialNumberList.size() != LawSerialNumberListTemp.size()){ + //存在法规清单中没有的数据 + List collect = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::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 project laws 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"); -// } -// } + } /** From a60df3bb36170c00fbbf5365e35bc3d5d9e585f7 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Thu, 30 Mar 2023 16:42:38 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/otamanagement/upgradeactivity/components/gnxtwh.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-web/src/views/otamanagement/upgradeactivity/components/gnxtwh.vue b/jero-web/src/views/otamanagement/upgradeactivity/components/gnxtwh.vue index e077321bb..c7c034892 100644 --- a/jero-web/src/views/otamanagement/upgradeactivity/components/gnxtwh.vue +++ b/jero-web/src/views/otamanagement/upgradeactivity/components/gnxtwh.vue @@ -291,7 +291,7 @@ export default { this.confirmLoading = false this.bussLogList() } else { - this.$message.warning(this.$t('operationFailed')) + this.$message.warning(res.message) this.confirmLoading = false } }) From 7763795a5053fb886727481b2bebfd271c359d20 Mon Sep 17 00:00:00 2001 From: yuekuo Date: Thu, 30 Mar 2023 17:15:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=BD=A6=E5=9E=8B?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../otamanagement/upgradeactivity/index.vue | 2 +- .../thetargetvehicleofthisupgrade.vue | 5 ++- .../components/upgradetargetmodel.vue | 42 +++++++++++++++++-- .../components/basicInformation.vue | 6 ++- .../vehicleregistration/index.vue | 2 +- 5 files changed, 49 insertions(+), 8 deletions(-) diff --git a/jero-web/src/views/otamanagement/upgradeactivity/index.vue b/jero-web/src/views/otamanagement/upgradeactivity/index.vue index ea2c98ab9..a3f5994a6 100644 --- a/jero-web/src/views/otamanagement/upgradeactivity/index.vue +++ b/jero-web/src/views/otamanagement/upgradeactivity/index.vue @@ -428,7 +428,7 @@ export default { localStorage.removeItem('otaIdT') this.$router.push({ path: '/upgradeactivityrecord', - query: {} + query: { type:2} }) }, viewProcessClick(row) { diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue index 4367f3867..b08e2102d 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue @@ -140,6 +140,9 @@ export default { } getAction('/ota/otaBaSjSjmbcl/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ if(res.code==200){ + if(res.result==null){ + res.result={} + } this.formInline.zsl=res.result.zsl this.formInline.vinList=res.result.vinList this.formInline.csv=res.result.csv @@ -148,7 +151,7 @@ export default { res.result.scrqjs=res.result.scrqjs == null ? "" : res.result.scrqjs this.formInline.dateofproduction.push(res.result.scrqks) this.formInline.dateofproduction.push(res.result.scrqjs) - this.formInline.id = res.result.vinList + this.formInline.id = res.result.id this.$forceUpdate() } diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue index bf9c32c44..9908fc679 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue @@ -130,7 +130,7 @@ - + @@ -216,8 +216,23 @@ import ImportFile from '@/components/ImportFileData/index' this.form.dllx1=undefined this.form.dllx2=undefined this.form.qymc='安徽江淮汽车集团股份有限公司' + // if(this.$route.query.type == 1 && res.result.cxmb == null){ + // this.form.cxmb=this.form.ggpc+'-'+ this.form.cpmc+'-'+this.form.cpxh + // } + }else{ + this.form=res.result + if(this.$route.query.type == 1 && res.result.cxmb == null){ + this.form.cxmb = this.form.babh+'-'+ this.form.bapc+'-'+this.form.cpxh + }else { + if(this.$route.query.type == 2 && res.result.cxmb == null){ + this.form.cxmb = this.form.babh+'-'+ this.form.bapc+'-'+this.form.cpxh + }else{ + this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined + } + } + if(res.result.dllx1==null){ this.form.dllx1=undefined @@ -242,6 +257,11 @@ import ImportFile from '@/components/ImportFileData/index' if(otaId==null){ otaId='' } + // if(this.form.bapc!=null && this.form.bapc!=undefined && this.form.bapc!=''){ + // this.$nextTick(()=>{ + // this.$refs.ruleForm.clearValidate('bapc') + // }) + // } this.$refs.ruleForm.validate(valid=>{ if(valid){ this.selectListPc.map(item=>{ @@ -256,12 +276,19 @@ import ImportFile from '@/components/ImportFileData/index' this.getData() } }) + }else{ + this.form.bapc=undefined } }) }, next(){ this.save() + // if(this.form.bapc!=null && this.form.bapc!=undefined && this.form.bapc!=''){ + // this.$nextTick(()=>{ + // this.$refs.ruleForm.clearValidate('bapc') + // }) + // } this.$refs.ruleForm.validate(valid=>{ if(valid){ this.$emit('basicInformationForm') @@ -289,7 +316,7 @@ import ImportFile from '@/components/ImportFileData/index' res.result.forEach(item=>{ let obj={} obj.id=item.id - obj.cpdjbh=item.cpdjbh + obj.cpdjbh=item.cpdjbh+'-'+item.ggpc+'-'+item.cpxh this.selectListMb.push(obj) }) } @@ -317,13 +344,20 @@ import ImportFile from '@/components/ImportFileData/index' getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:'',otaId:item.id}).then(res=>{ this.form.dllx1=res.result.dllx1 == null?undefined:res.result.dllx1 this.form.dllx2=res.result.dllx2== null?undefined:res.result.dllx2 - this.$forceUpdate() }) } }) this.$forceUpdate() }, - update(){ + update(val){ + this.$forceUpdate() + localStorage.removeItem('otaId') + localStorage.removeItem('otaIdT') + localStorage.setItem('otaIdT',val) + + this.getData() + }, + update2(){ this.$forceUpdate() } } diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue index 573c06e46..a66145229 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue @@ -331,7 +331,11 @@ import { message } from 'ant-design-vue' if(this.$route.query.type == 1 && res.result.cxmb == null){ this.form.cxmb = this.form.ggpc+'-'+ this.form.cpmc+'-'+this.form.cpxh }else { - this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined + if(this.$route.query.type == 2 && res.result.cxmb == null){ + this.form.cxmb = this.form.ggpc+'-'+ this.form.cpmc+'-'+this.form.cpxh + }else{ + this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined + } } if(res.result.dllx1 == null ){ res.result.dllx1 = undefined diff --git a/jero-web/src/views/otamanagement/vehicleregistration/index.vue b/jero-web/src/views/otamanagement/vehicleregistration/index.vue index c3b9810aa..f3278c7d0 100644 --- a/jero-web/src/views/otamanagement/vehicleregistration/index.vue +++ b/jero-web/src/views/otamanagement/vehicleregistration/index.vue @@ -385,7 +385,7 @@ export default { localStorage.removeItem('otaIdT') this.$router.push({ path: '/vehicleinformation', - query: { type:1} + query: { type:2} }) }, viewProcessClick(row) {