Merge remote-tracking branch 'origin/feature/DM/nflg-bom' into feature/DM/nflg-bom

This commit is contained in:
大米 2023-12-18 18:11:33 +08:00
commit 0a3facd6e7
3 changed files with 10 additions and 11 deletions

View File

@ -33,7 +33,7 @@ public enum EBomExceptionStatusEnum {
EXCEPT_NO_10(10, "项目赋值异常(当父级物料的项目类型为F时子级中不能存在项目类型为F的物料)"),
EXCEPT_NO_11(11, "未填写变更原因和技术通知单"),
EXCEPT_NO_12(12, "数量需要用户确认"),
EXCEPT_NO_13(12, "项目类型需要用户确认") ;
EXCEPT_NO_13(13, "项目类型需要用户确认") ;

View File

@ -77,16 +77,15 @@ public class OptionalExcelService {
String materialDesc = item.getCellSecond().trim();
//替换统一格式
materialDesc = materialDesc.replace(":", "");
// materialDesc = materialDesc.replace(":", "");
int optionChildPos=materialDesc.indexOf(" ");
if (!materialDesc.contains("")) {
throw new NflgBusinessException(STATE.Error, StrUtil.format("第{}行,格式错误,物料数据未使用:或:分隔,{}", item.getLineNo(), item.getCellSecond()));
if(optionChildPos<0){
throw new NflgBusinessException(STATE.Error,StrUtil.format("第{}行,格式错误,选项使用空格分隔图号和名称 {}",item.getLineNo(), item.getCellSecond()));
}
levelDto3.setDrawingNo(StrUtil.sub(materialDesc, 0, materialDesc.indexOf("")));
String materialName = StrUtil.subSuf(materialDesc, materialDesc.indexOf("") + 1);
levelDto3.setDrawingNo(StrUtil.sub(materialDesc, 0, optionChildPos));
String materialName = StrUtil.subSuf(materialDesc, optionChildPos + 1);
// if (StrUtil.isEmpty(levelDto3.getDrawingNo())) {
// throw new NflgBusinessException(STATE.Error, StrUtil.format("第{}行,格式错误,解析后不包含物料图号", item.getLineNo(), item.getCellSecond()));
@ -146,7 +145,7 @@ public class OptionalExcelService {
int optionChildPos=k.indexOf(" ");
if(optionChildPos<0){
throw new NflgBusinessException(STATE.Error,StrUtil.format("第{}行,格式错误,选项使用空格分隔名称和图号",v.get(0).getLineNo()));
throw new NflgBusinessException(STATE.Error,StrUtil.format("第{}行,格式错误,选项使用空格分隔图号和名称",v.get(0).getLineNo()));
}
OptionalEbomImportDTO optionalEbomImportL2 = new OptionalEbomImportDTO();
@ -319,9 +318,9 @@ public class OptionalExcelService {
throw new NflgBusinessException(STATE.Error, hintMsg);
}
// return true;
// return true;
//保存db
return batchExcelToRepertory(optionalEbomInportExcelDTO);
return batchExcelToRepertory(optionalEbomInportExcelDTO);
}