生产单新增完成时间,配件过滤" 封边条 "类型

This commit is contained in:
liuzhaotian
2024-11-25 14:56:52 +08:00
parent 185d6ce34b
commit 5931c21034
13 changed files with 154 additions and 53 deletions
@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
@@ -57,11 +58,12 @@ public class IntellectBranchingService extends AbstractSystemConfigServiceHandle
JSONObject jsonObject = jsonArray.getJSONObject(i);
checkMachineId(jsonObject.getString("machineId"));
checkMachineName(jsonObject.getString("machineName"));
checkMachineConfig(jsonObject.get("machineConfig"));
String machineName = jsonObject.getString("machineName");
checkMachineName(machineName);
checkMachineConfig(jsonObject.get("machineConfig"),machineName);
}
if(jsonArray.size() < 2){
if(jsonArray.size() <= 2){
throw new ServiceException(BRANCHING_SETTING_COUNT_ERROR);
}
@@ -136,9 +138,9 @@ public class IntellectBranchingService extends AbstractSystemConfigServiceHandle
* 校验 机台分流条件
*
*/
private void checkMachineConfig(Object machineConfig) {
private void checkMachineConfig(Object machineConfig,String machineName) {
if (ObjectUtil.isEmpty(machineConfig)) {
throw new ServiceException(BRANCHING_SETTING_SAVE_ERROR);
throw exception(BRANCHING_SETTING_SAVE_ERROR,machineName);
}
}