mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 05:12:07 +08:00
生产单新增完成时间,配件过滤" 封边条 "类型
This commit is contained in:
+1
-1
@@ -343,7 +343,7 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode CURRENTLY_NO_CONFIGURATION_AVAILABLE = new ErrorCode(1_002_039_001, "当前没有{}配置信息,请前往设置配置");
|
||||
public static final ErrorCode BRANCHING_SETTING_NAME_REPEAT = new ErrorCode(1_002_039_002, "分线配置名称重复,请重新设置");
|
||||
public static final ErrorCode BRANCHING_SETTING_RULE_SAVE_CHECK_ERROR = new ErrorCode(1_002_039_003, "智能分线配置保存解析失败,数据有误,请检查配置规则或联系客服");
|
||||
public static final ErrorCode BRANCHING_SETTING_SAVE_ERROR = new ErrorCode(1_002_039_004, "智能分线配置为空,请添加配置");
|
||||
public static final ErrorCode BRANCHING_SETTING_SAVE_ERROR = new ErrorCode(1_002_039_004, "机台:{} 的配置为空,请添加配置");
|
||||
public static final ErrorCode BRANCHING_SETTING_COUNT_ERROR = new ErrorCode(1_002_039_005, "智能分线配置机台数量必须大于2才能保存");
|
||||
|
||||
//=========== 系统配置 1-002-040-000 ============
|
||||
|
||||
+7
-5
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user