国内 清单bug修复
This commit is contained in:
+2
@@ -42,4 +42,6 @@ public class AddDetailedDto {
|
||||
private String inforlist2;
|
||||
@ApiModelProperty(value = "新车型实施时间")
|
||||
private String inforlist3;
|
||||
@ApiModelProperty(value = "适用认证")
|
||||
private String inforlist4;
|
||||
}
|
||||
|
||||
+72
-49
@@ -323,30 +323,50 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
sarLawsDetailedListDao.insert(sarLawsDetailedList);
|
||||
if (addDetailedDto.getInforlist() != null) {
|
||||
if (addDetailedDto.getInforlist().contains(",")) {
|
||||
String[] id = addDetailedDto.getInforlist().split(",");
|
||||
String[] putTime = addDetailedDto.getInforlist1().split(";");
|
||||
String[] zcc = addDetailedDto.getInforlist2().split(";");
|
||||
String[] xcx = addDetailedDto.getInforlist3().split(";");
|
||||
String[] id = new String[]{};
|
||||
String[] putTime = new String[]{};
|
||||
String[] zcc = new String[]{};
|
||||
String[] xcx = new String[]{};
|
||||
String[] syrz = new String[]{};
|
||||
if (StringUtils.isNotEmpty(addDetailedDto.getInforlist())) {
|
||||
id = addDetailedDto.getInforlist().split(",");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(addDetailedDto.getInforlist1())) {
|
||||
putTime = addDetailedDto.getInforlist1().split(";");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(addDetailedDto.getInforlist2())) {
|
||||
zcc = addDetailedDto.getInforlist2().split(";");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(addDetailedDto.getInforlist3())) {
|
||||
xcx = addDetailedDto.getInforlist3().split(";");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(addDetailedDto.getInforlist4())) {
|
||||
syrz = addDetailedDto.getInforlist4().split(";");
|
||||
}
|
||||
for (int a = 0; a < id.length; a++) {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(id[a]);
|
||||
//putTiem即ssrq可能为空 ''
|
||||
if (putTime.length > 0) {
|
||||
if ("-".equals(putTime[a]) || null == putTime[a]) {
|
||||
dto.setSsrq(null);
|
||||
} else {
|
||||
dto.setSsrq(putTime[a]);
|
||||
}
|
||||
if ("-".equals(putTime[a]) || null == xcx[a]) {
|
||||
dto.setXcxssrqgj(null);
|
||||
} else {
|
||||
dto.setXcxssrqgj(xcx[a]);
|
||||
}
|
||||
if ("-".equals(putTime[a]) || null == zcc[a]) {
|
||||
dto.setZccssrqgj(null);
|
||||
} else {
|
||||
dto.setZccssrqgj(zcc[a]);
|
||||
}
|
||||
|
||||
if (putTime.length <= a) {
|
||||
dto.setSsrq(null);
|
||||
} else {
|
||||
dto.setSsrq(putTime[a]);
|
||||
}
|
||||
if (xcx.length <= a) {
|
||||
dto.setXcxssrqgj(null);
|
||||
} else {
|
||||
dto.setXcxssrqgj(xcx[a]);
|
||||
}
|
||||
if (zcc.length <= a) {
|
||||
dto.setZccssrqgj(null);
|
||||
} else {
|
||||
dto.setZccssrqgj(zcc[a]);
|
||||
}
|
||||
if (syrz.length <= a) {
|
||||
dto.setSyrz(null);
|
||||
} else {
|
||||
dto.setSyrz(syrz[a]);
|
||||
}
|
||||
timeDto.add(dto);
|
||||
}
|
||||
@@ -356,22 +376,25 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
dto.setSsrq(addDetailedDto.getInforlist1());
|
||||
dto.setXcxssrqgj(addDetailedDto.getInforlist2());
|
||||
dto.setZccssrqgj(addDetailedDto.getInforlist3());
|
||||
dto.setSyrz(addDetailedDto.getInforlist4());
|
||||
timeDto.add(dto);
|
||||
}
|
||||
} else {
|
||||
timeDto = null;
|
||||
}
|
||||
service.insertDetailedList(sarLawsDetailedList.getId(), timeDto);
|
||||
if (null != timeDto) {
|
||||
List<SarStandardsInfo> sarStandardsInfos = new ArrayList<>();
|
||||
timeDto.forEach(timeDto1 -> {
|
||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||
sarStandardsInfo.setId(timeDto1.getStandId());
|
||||
sarStandardsInfo.setIsRelateAccess("1");
|
||||
sarStandardsInfos.add(sarStandardsInfo);
|
||||
});
|
||||
sarStandardsInfoService.updateBatchById(sarStandardsInfos);
|
||||
List<String> list1 = new ArrayList<>();
|
||||
List<String> list2 = new ArrayList<>();
|
||||
//避免出现数据丢失 处理一下适用认证信息
|
||||
list1.addAll(Arrays.asList(addDetailedDto.getInforlist().split(",")));
|
||||
Hashtable<String, String> hashtable = new Hashtable<>();
|
||||
for (TimeDto dto:timeDto) {
|
||||
if (StringUtils.isNotBlank(dto.getSyrz())) {
|
||||
hashtable.put(dto.getStandId(), dto.getSyrz());
|
||||
}
|
||||
}
|
||||
//下面写消息队列了开始
|
||||
createUpdateMQService.sendMQ(hashtable, list2, list1);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -656,16 +679,16 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
String[] zcc = new String[]{};
|
||||
String[] xcx = new String[]{};
|
||||
String[] syrz = new String[]{};
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist())){
|
||||
if (StringUtils.isNotEmpty(detailedUpDto.getInforlist())) {
|
||||
id = detailedUpDto.getInforlist().split(",");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist1())){
|
||||
if (StringUtils.isNotEmpty(detailedUpDto.getInforlist1())) {
|
||||
putTime = detailedUpDto.getInforlist1().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist2())){
|
||||
if (StringUtils.isNotEmpty(detailedUpDto.getInforlist2())) {
|
||||
zcc = detailedUpDto.getInforlist2().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist3())){
|
||||
if (StringUtils.isNotEmpty(detailedUpDto.getInforlist3())) {
|
||||
xcx = detailedUpDto.getInforlist3().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist4())){
|
||||
@@ -722,7 +745,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
if (list1.size() > 0) {
|
||||
QueryWrapper<SarLawsAttrDetailedList> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.in("stand_id", list1);
|
||||
List<SarLawsAttrDetailedList> res = sarLawsAttrDetailedListDao.selectList(wrapper);
|
||||
List<SarLawsAttrDetailedList> res = sarLawsAttrDetailedListDao.selectList(wrapper1);
|
||||
if (res.size() > 0) {
|
||||
res.forEach(sarLawsAttrDetailedList -> {
|
||||
dealWithHashTableData(list1, list2, hashtable, sarLawsAttrDetailedList);
|
||||
@@ -869,20 +892,20 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
//数据校验 先做重复交验+再做是否存在校验
|
||||
if (null != res && "".equals(stringBuilder.toString())) {
|
||||
for (ExportEmptyModelDto re:res) {
|
||||
if(!(re.getSsrq().contains(",")||re.getSsrq().contains(","))) {
|
||||
for (ExportEmptyModelDto re : res) {
|
||||
if (!(re.getSsrq().contains(",") || re.getSsrq().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getSsrq()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
re.setSsrq(format.format(date));
|
||||
}
|
||||
if(!(re.getXcxssrqgj().contains(",")||re.getXcxssrqgj().contains(","))) {
|
||||
if (!(re.getXcxssrqgj().contains(",") || re.getXcxssrqgj().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getXcxssrqgj()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
re.setXcxssrqgj(format.format(date));
|
||||
}
|
||||
if(!(re.getZccssrqgj().contains(",")||re.getZccssrqgj().contains(","))) {
|
||||
if (!(re.getZccssrqgj().contains(",") || re.getZccssrqgj().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getZccssrqgj()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
@@ -989,10 +1012,10 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getStandName());
|
||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||
model.setSycpx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("sycpx") ?sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString():"");
|
||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbm") ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString():"");
|
||||
model.setSycx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("cllx") ?sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString():"");
|
||||
model.setNylx(null != sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ? sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString() : "");
|
||||
model.setSycpx(null != sarStandardsInfo.getAttrInfoCaseMap().get("sycpx") ? sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString() : "");
|
||||
model.setZrbm(null != sarStandardsInfo.getAttrInfoCaseMap().get("zrbm") ? sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString() : "");
|
||||
model.setSycx(null != sarStandardsInfo.getAttrInfoCaseMap().get("cllx") ? sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString() : "");
|
||||
result.add(model);
|
||||
});
|
||||
}
|
||||
@@ -1016,10 +1039,10 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getStandName());
|
||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||
model.setSycpx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("sycpx") ?sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString():"");
|
||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbm") ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString():"");
|
||||
model.setSycx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("cllx") ?sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString():"");
|
||||
model.setNylx(null != sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ? sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString() : "");
|
||||
model.setSycpx(null != sarStandardsInfo.getAttrInfoCaseMap().get("sycpx") ? sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString() : "");
|
||||
model.setZrbm(null != sarStandardsInfo.getAttrInfoCaseMap().get("zrbm") ? sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString() : "");
|
||||
model.setSycx(null != sarStandardsInfo.getAttrInfoCaseMap().get("cllx") ? sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString() : "");
|
||||
result.add(model);
|
||||
});
|
||||
}
|
||||
@@ -1042,11 +1065,11 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getLawsName());
|
||||
model.setStandEnName(sarStandardsInfo.getLawsEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString():"");
|
||||
model.setNylx(null != sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws") ? sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString() : "");
|
||||
//没有使用产品线
|
||||
// model.setSycpx(null!=sarStandardsInfo.getLawsSycx() ?sarStandardsInfo.getLawsSycx():"");
|
||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws") ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws").toString():"");
|
||||
model.setSycx(null!=sarStandardsInfo.getLawsSycx() ?sarStandardsInfo.getLawsSycx():"");
|
||||
model.setZrbm(null != sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws") ? sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws").toString() : "");
|
||||
model.setSycx(null != sarStandardsInfo.getLawsSycx() ? sarStandardsInfo.getLawsSycx() : "");
|
||||
result.add(model);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user