|
|
|
@ -86,7 +86,16 @@ public class ResourceRepairTaskServiceImpl extends ServiceImpl<ResourceRepairTas
|
|
|
|
|
}
|
|
|
|
|
// 不良代码
|
|
|
|
|
String ncCodeNo = resourceRepairTask.getNcCodeNo();
|
|
|
|
|
String[] ncSplit = ncCodeNo.split(",");
|
|
|
|
|
if (ncCodeNo != null && !ncCodeNo.equals("")){
|
|
|
|
|
String[] ncSplit = ncCodeNo.split(",");
|
|
|
|
|
for (int i = 0; i < ncSplit.length; i++) {
|
|
|
|
|
String ncCodeHandle = HandleEnum.NC_CODE.getHandle(site, ncSplit[i]);
|
|
|
|
|
if ( ncCodeService.getById(ncCodeHandle) == null ){
|
|
|
|
|
throw BusinessException.build("不良代码错误!!!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Collection<String> collection = new ArrayList<>();
|
|
|
|
|
for (int i = 0; i < ncSplit.length; i++) {
|
|
|
|
|
collection.add(HandleEnum.NC_CODE.getHandle(site,ncSplit[i]));
|
|
|
|
@ -95,12 +104,6 @@ public class ResourceRepairTaskServiceImpl extends ServiceImpl<ResourceRepairTas
|
|
|
|
|
if ( ncCodes.size() != ncSplit.length ){
|
|
|
|
|
throw BusinessException.build("不良代码错误!!!");
|
|
|
|
|
}*/
|
|
|
|
|
for (int i = 0; i < ncSplit.length; i++) {
|
|
|
|
|
String ncCodeHandle = HandleEnum.NC_CODE.getHandle(site, ncSplit[i]);
|
|
|
|
|
if ( ncCodeService.getById(ncCodeHandle) == null ){
|
|
|
|
|
throw BusinessException.build("不良代码错误!!!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 维修单号、维修HANDLE
|
|
|
|
|
List<String> nextNumber = nextNumberHelper.getNextNumber(site, Constants.RESOURCE_REPAIR_TASK, 1);
|
|
|
|
|
resourceRepairTask.setRepairNo(nextNumber.get(0));
|
|
|
|
|