开发OTA备案工具-车辆升级
This commit is contained in:
+10
-20
@@ -28,6 +28,8 @@ import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -95,28 +97,16 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
|
||||
}
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, otaBaCxAqcsOld, otaBaCxAqcs, sysDictService);
|
||||
|
||||
for (AttachmentEO aeoNew : otaBaCxAqcs.getZmclList()) {
|
||||
boolean flag = true;
|
||||
for (AttachmentEO aeoOld : otaBaCxAqcsOld.getZmclList()) {
|
||||
if (aeoNew.getId().equals(aeoOld.getId())) {
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
reList.add(cu.addAttRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, "证明材料", aeoNew.getFileName()));
|
||||
Map<String, String> newAttMap = otaBaCxAqcs.getZmclList().stream().collect(Collectors.toMap(AttachmentEO::getId, AttachmentEO::getFileName));
|
||||
Map<String, String> oldAttMap = otaBaCxAqcsOld.getZmclList().stream().collect(Collectors.toMap(AttachmentEO::getId, AttachmentEO::getFileName));
|
||||
for (String nId : newAttMap.keySet()) {
|
||||
if (!oldAttMap.containsKey(nId)) {
|
||||
reList.add(cu.addAttRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, "证明材料", newAttMap.get(nId)));
|
||||
}
|
||||
}
|
||||
for (AttachmentEO aeoOld : otaBaCxAqcsOld.getZmclList()) {
|
||||
boolean flag = true;
|
||||
for (AttachmentEO aeoNew : otaBaCxAqcs.getZmclList()) {
|
||||
if (aeoOld.getId().equals(aeoNew.getId())) {
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
reList.add(cu.delAttRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, "证明材料", aeoOld.getFileName()));
|
||||
for (String oId : oldAttMap.keySet()) {
|
||||
if (!newAttMap.containsKey(oId)) {
|
||||
reList.add(cu.delAttRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, "证明材料", newAttMap.get(oId)));
|
||||
}
|
||||
}
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
|
||||
+11
-1
@@ -18,7 +18,7 @@ import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import com.jero.modules.ota.utils.ComparisonUtil;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
@@ -107,6 +107,16 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, OtaTitleEnum.XTLB.getName(), oldList, newList, sysDictService);
|
||||
saveOrUpdateBatch(newList);
|
||||
|
||||
|
||||
for (OtaBaCxKsjxtmccs newMccs:newList) {
|
||||
String newTpt = newMccs.getTpt();
|
||||
if(StringUtils.isNotEmpty(newTpt)){
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
String fj = (String) json.get("fj");
|
||||
if (StringUtils.isNotEmpty(fj)) {
|
||||
|
||||
+11
-22
@@ -17,8 +17,6 @@ import com.jero.modules.ota.service.IOtaBaCxZxsjyqService;
|
||||
import com.jero.modules.ota.utils.ComparisonUtil;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
@@ -36,6 +34,8 @@ import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 车型备案-在线升级要求
|
||||
@@ -101,28 +101,17 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
|
||||
}
|
||||
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, otaBaCxZxsjyqOld, otaBaCxZxsjyq, sysDictService);
|
||||
for (AttachmentEO aeoNew : otaBaCxZxsjyq.getZmclList()) {
|
||||
boolean flag = true;
|
||||
for (AttachmentEO aeoOld : otaBaCxZxsjyqOld.getZmclList()) {
|
||||
if (aeoNew.getId().equals(aeoOld.getId())) {
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
reList.add(cu.addAttRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, "证明材料", aeoNew.getFileName()));
|
||||
Map<String, String> newAttMap = otaBaCxZxsjyq.getZmclList().stream().collect(Collectors.toMap(AttachmentEO::getId, AttachmentEO::getFileName));
|
||||
Map<String, String> oldAttMap = otaBaCxZxsjyqOld.getZmclList().stream().collect(Collectors.toMap(AttachmentEO::getId, AttachmentEO::getFileName));
|
||||
|
||||
for (String nId : newAttMap.keySet()) {
|
||||
if (!oldAttMap.containsKey(nId)) {
|
||||
reList.add(cu.addAttRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, "证明材料", newAttMap.get(nId)));
|
||||
}
|
||||
}
|
||||
for (AttachmentEO aeoOld : otaBaCxZxsjyqOld.getZmclList()) {
|
||||
boolean flag = true;
|
||||
for (AttachmentEO aeoNew : otaBaCxZxsjyq.getZmclList()) {
|
||||
if (aeoOld.getId().equals(aeoNew.getId())) {
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
reList.add(cu.delAttRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, "证明材料", aeoOld.getFileName()));
|
||||
for (String oId : oldAttMap.keySet()) {
|
||||
if (!newAttMap.containsKey(oId)) {
|
||||
reList.add(cu.delAttRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, "证明材料", newAttMap.get(oId)));
|
||||
}
|
||||
}
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
|
||||
+1
@@ -71,6 +71,7 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
otaBaSjSjmbcl.setCreateTime(now);
|
||||
}
|
||||
otaBaSjSjmbcl.setUpdateTime(now);
|
||||
deleteById(otaBaSjSjmbcl.getId());
|
||||
saveOrUpdate(otaBaSjSjmbcl);
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
if (ObjectUtils.isEmpty(otaBaSjSjmbclOld)) {
|
||||
|
||||
Reference in New Issue
Block a user