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"); -// } -// } + } /** 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 } }) 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) {