TODO标准excl导入

This commit is contained in:
zhaokaiyao@91isoft.com
2021-10-20 14:51:05 +08:00
parent 7b87743f9f
commit f6508c6e1a
@@ -51,7 +51,9 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
// private SarBussionessStandServiceImpl sarBussionessStandService;
/**
* 标准类别
*/
private final static String GN = "GB,GB/T,QC/T,GJB,JB,JT,HG,YV,SY,SH,GA,HJ,QB,JG,NB,JC,YS/T,FZ/T,TB/T,JJG,SJ/T,T/TBPS" +
",NB/T,CJ/T,YS/T,SJ/T,BB/T,SN/T,SB/T,MH/T,DB11,SZDB/Z,HKG,T/ZSA,CSAE,T/CAS,T/CADA,T/CHTS,T/ITS,T/BJQC";
private final static String QB = "Q/QCBFC,Q/FT,Q/FL,Q/QCFLC,Q/BQB,Q/SGT," +
@@ -335,7 +337,7 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
*/
importListMap.get("HWBZ").forEach(item -> {
/*importListMap.get("HWBZ").forEach(item -> {
if (true ) {
String standID = UUIDUtils.randomUUID20();
@@ -394,14 +396,14 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
});
});*/
/**
* 国内标准
*/
importListMap.get("GNBZ").forEach(item -> {
/*importListMap.get("GNBZ").forEach(item -> {
if (true) {
@@ -457,7 +459,7 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
}
});
});*/
/**
@@ -742,25 +744,27 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
result.put("sort", sort);
result.put("number", number);
result.put("year", year);
//标准类别不存在,新增标准类别
/**
* 标准类别不存在,新增标准类别
*/
// List<DicTypeEO> isExist = dicTypeEOService.getTypeIdByDicIdAndTypeName("JKSADFH564S", null, sort, null);
if (!sarSort.contains(sort)){
DicTypeEO dicTypeVO = new DicTypeEO();
dicTypeVO.setId(null);
dicTypeVO.setDicId("JKSADFH564S");
dicTypeVO.setDicTypeCode(sort);
dicTypeVO.setDicTypeName(sort);
dicTypeVO.setShowIndex(1);
Integer dicTypeEO = dicTypeEOService.saveDictype(dicTypeVO);
if (dicTypeEO>0){
sarSort.add(sort);
importDto.setErrorStr("标准类别不存在,已新增");
}else {
importDto.setErrorStr("标准类别不存在,新增失败");
}
error.add(importDto);
}
// if (!sarSort.contains(sort)){
//
// DicTypeEO dicTypeVO = new DicTypeEO();
// dicTypeVO.setId(null);
// dicTypeVO.setDicId("JKSADFH564S");
// dicTypeVO.setDicTypeCode(sort);
// dicTypeVO.setDicTypeName(sort);
// dicTypeVO.setShowIndex(1);
// Integer dicTypeEO = dicTypeEOService.saveDictype(dicTypeVO);
// if (dicTypeEO>0){
// sarSort.add(sort);
// importDto.setErrorStr("标准类别不存在,已新增");
// }else {
// importDto.setErrorStr("标准类别不存在,新增失败");
// }
// error.add(importDto);
// }