Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
高嵩
2023-03-30 17:25:19 +08:00
7 changed files with 119 additions and 26 deletions
@@ -2859,6 +2859,49 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
}
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
for(int k = 0 ;k<rowList.size();k++){
if("".equals(rowList.get("category")) ||
"".equals(rowList.get("inspectionItem")) ||
"".equals(rowList.get("configItem")) ||
"".equals(rowList.get("wvtaId")) ||
"".equals(rowList.get("serialNumber")) ||
"".equals(rowList.get("dutyTerritoryName")) ||
"".equals(rowList.get("sdtName")) ||
"".equals(rowList.get("dutyPersonName")) ||
"".equals(rowList.get("deliverableTypeName")) ||
"".equals(rowList.get("endTimeStr")) ){
//删除原上传文件
FileUnZip.deleteDir(saveDirectory);
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
throw new JeroBootException("请填写必填字段内容,带*的为必填");
}else{
throw new JeroBootException("Please fill in the required fields marked with *");
}
}
}
}else {
for(int k = 0 ;k<rowList.size();k++){
if("".equals(rowList.get("category")) ||
"".equals(rowList.get("inspectionItem")) ||
"".equals(rowList.get("configItem")) ||
"".equals(rowList.get("wvtaId")) ||
"".equals(rowList.get("serialNumber")) ||
"".equals(rowList.get("dutyTerritoryName")) ||
"".equals(rowList.get("sdtName")) ||
"".equals(rowList.get("dutyPersonName")) ||
"".equals(rowList.get("deliverableTypeNameEn")) ||
"".equals(rowList.get("endTimeStr")) ){
//删除原上传文件
FileUnZip.deleteDir(saveDirectory);
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
throw new JeroBootException("请填写必填字段内容,带*的为必填");
}else{
throw new JeroBootException("Please fill in the required fields marked with *");
}
}
}
}
if (i > 1) {
dataList.add(rowList);
}
@@ -3518,8 +3561,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
//编号验证
private void verifySerialNumber(List<ProjectCertificationInventoryEO> datas,
ProjectCertificationInventoryEO projectCertificationInventoryEOTemp) {
//1. 验证标准号在文档库中是否存在
List<String> serialNumberList = datas.stream().map(ProjectCertificationInventoryEO::getSerialNumber).collect(Collectors.toList());
//1. 验证标准号在文档库中是否存在
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(BussDocumentLibraryEO::getSerialNumber,serialNumberList);
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapper);
@@ -3537,24 +3582,31 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
}else{
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : datas) {
List<BussDocumentLibraryEO> collect = bussDocumentLibraryEOList.stream()
.filter(e -> e.getSerialNumber().equals(projectCertificationInventoryEO.getSerialNumber())).collect(Collectors.toList());
projectCertificationInventoryEO.setBussDocumentLibraryId(collect.get(0).getId());
//验证编号在法规清单中是否存在
LambdaQueryWrapper<ProjectLawsInventoryEO> lwrapper = new LambdaQueryWrapper<>();
lwrapper.in(ProjectLawsInventoryEO::getSerialNumber,serialNumberList);
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = projectLawsInventoryEOService.list(lwrapper);
List<String> LawSerialNumberListTemp = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.toList());
if(serialNumberList.size() != LawSerialNumberListTemp.size()){
//存在法规清单中没有的数据
List<String> collect = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).collect(Collectors.toList());
List<String> 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<BussDocumentLibraryEO> collect = bussDocumentLibraryEOList.stream()
.filter(e -> e.getSerialNumber().equals(projectCertificationInventoryEO.getSerialNumber())).collect(Collectors.toList());
projectCertificationInventoryEO.setBussDocumentLibraryId(collect.get(0).getId());
}
}
}
// //2. 验证标准号在法规清单中是否添加过
// LambdaQueryWrapper<ProjectCertificationInventoryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
// lambdaQueryWrapper.in(ProjectCertificationInventoryEO::getSerialNumber,serialNumberList).in(ProjectCertificationInventoryEO::getProjectLibraryId,projectCertificationInventoryEOTemp.getProjectLibraryId());
// List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(lambdaQueryWrapper);
// List<String> 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");
// }
// }
}
/**
@@ -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
}
})
@@ -428,7 +428,7 @@ export default {
localStorage.removeItem('otaIdT')
this.$router.push({
path: '/upgradeactivityrecord',
query: {}
query: { type:2}
})
},
viewProcessClick(row) {
@@ -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()
}
@@ -130,7 +130,7 @@
</a-select>
</a-form-model-item>
<a-form-model-item class="itemModel" style="width: 40%;margin-left:-9px">
<a-select v-model="form.dllx2" class="box-input" :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="update">
<a-select v-model="form.dllx2" class="box-input" :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="update2">
<a-select-option v-for="(item, key) in projectNameList2"
:key="key"
:value="item">
@@ -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()
}
}
@@ -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
@@ -385,7 +385,7 @@ export default {
localStorage.removeItem('otaIdT')
this.$router.push({
path: '/vehicleinformation',
query: { type:1}
query: { type:2}
})
},
viewProcessClick(row) {