|
|
|
@ -188,7 +188,7 @@ public class MesImportImpl implements IMesImportService {
|
|
|
|
|
// productBom = productBom.replaceAll("(.*?)", "");
|
|
|
|
|
// MesBaseMaterialInfo productMaterial = mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByMaterialCode(productBom);
|
|
|
|
|
// if (productMaterial == null) {
|
|
|
|
|
// throw new ServiceException("Excel格式错误:物料编号:" + productBom + "的信息不存在!");
|
|
|
|
|
// throw new ServiceException("Excel格式错误:物料编码:" + productBom + "的信息不存在!");
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// i = i + 3;//标题下一行
|
|
|
|
@ -253,7 +253,7 @@ public class MesImportImpl implements IMesImportService {
|
|
|
|
|
// materialBom.setCreateBy(operName);
|
|
|
|
|
// bomList.add(materialBom);
|
|
|
|
|
// } else {
|
|
|
|
|
// failureMsg.append("物料编号:").append(materialCode).append("|");
|
|
|
|
|
// failureMsg.append("物料编码:").append(materialCode).append("|");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// i++;
|
|
|
|
@ -324,7 +324,7 @@ public class MesImportImpl implements IMesImportService {
|
|
|
|
|
// productBom = productBom.replaceAll("(.*?)", "");
|
|
|
|
|
MesBaseMaterialInfo productMaterial = mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByMaterialCode(productBom);
|
|
|
|
|
if (productMaterial == null) {
|
|
|
|
|
throw new ServiceException("Excel格式错误:物料编号:" + productBom + "的信息不存在!");
|
|
|
|
|
throw new ServiceException("Excel格式错误:物料编码:" + productBom + "的信息不存在!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i = i + 2;//标题下一行
|
|
|
|
@ -419,7 +419,7 @@ public class MesImportImpl implements IMesImportService {
|
|
|
|
|
}
|
|
|
|
|
bomList.add(materialBom);
|
|
|
|
|
} else {
|
|
|
|
|
failureMsg.append("物料编号:").append(materialCode).append("|");
|
|
|
|
|
failureMsg.append("物料编码:").append(materialCode).append("|");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
i++;
|
|
|
|
@ -516,7 +516,7 @@ public class MesImportImpl implements IMesImportService {
|
|
|
|
|
// productBom = productBom.replaceAll("(.*?)", "");
|
|
|
|
|
MesBaseMaterialInfo productMaterial = mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByMaterialCode(productBom);
|
|
|
|
|
if (productMaterial != null) {
|
|
|
|
|
throw new ServiceException("Excel格式错误:物料编号:" + productBom + "的信息已存在!");
|
|
|
|
|
throw new ServiceException("Excel格式错误:物料编码:" + productBom + "的信息已存在!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -585,7 +585,7 @@ public class MesImportImpl implements IMesImportService {
|
|
|
|
|
if (StringUtils.isNotEmpty(materialCode) && !materialCode.equals("物料编码")) {
|
|
|
|
|
MesBaseMaterialInfo materialInfo = mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByMaterialCode(materialCode);
|
|
|
|
|
if(materialInfo!=null){
|
|
|
|
|
throw new ServiceException("物料编号:"+materialCode+"已经存在");
|
|
|
|
|
throw new ServiceException("物料编码:"+materialCode+"已经存在");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
materialInfo = new MesBaseMaterialInfo();
|
|
|
|
|