|
|
|
@ -1065,6 +1065,7 @@ public class ExcelServiceImpl implements ExcelService { |
|
|
|
List<String> errMsg = new ArrayList<>(); |
|
|
|
for (int i = 0; i < excelInfoByMaterialS.size(); i++) { |
|
|
|
ExcelInfoForMaterial excelInfoForMaterial = excelInfoByMaterialS.get(i); |
|
|
|
log.info("处理的数据" + JSONObject.toJSONString(excelInfoForMaterial)); |
|
|
|
Map<String, Object> paramForMaterial = new HashMap<>(); |
|
|
|
String mname = excelInfoForMaterial.getMname(); |
|
|
|
if (mname == null) { |
|
|
|
@ -1075,8 +1076,8 @@ public class ExcelServiceImpl implements ExcelService { |
|
|
|
} |
|
|
|
paramForMaterial.put("mname", mname); |
|
|
|
paramForMaterial.put("version", excelInfoForMaterial.getVersion()); |
|
|
|
Material material = materialMapper.findMaterialByMnameAndVersion(paramForMaterial); |
|
|
|
if (material != null) { |
|
|
|
List<Material> materials = materialMapper.findMaterialByMnameAndVersion(paramForMaterial); |
|
|
|
if (materials != null && materials.size() > 0) { |
|
|
|
String s = dataIndex.get(i); |
|
|
|
String msg = s + "出现异常,名称为:" + mname + ",型号为:" + excelInfoForMaterial.getVersion() + "的物料已存在"; |
|
|
|
errMsg.add(msg); |
|
|
|
@ -1115,7 +1116,9 @@ public class ExcelServiceImpl implements ExcelService { |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
ExcelFileInfoPool.getUserExcelMaterialInfo(userByPort.getNumber()).add(excelInfoForMaterial); |
|
|
|
log.info("添加的数据" + JSONObject.toJSONString(excelInfoForMaterial)); |
|
|
|
List<ExcelInfoForMaterial> userExcelMaterialInfo = ExcelFileInfoPool.getUserExcelMaterialInfo(userByPort.getNumber()); |
|
|
|
userExcelMaterialInfo.add(excelInfoForMaterial); |
|
|
|
} |
|
|
|
return errMsg; |
|
|
|
} |
|
|
|
|