mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 13:42:07 +08:00
系统配置参数修改,新增空小板错误提示更改
This commit is contained in:
+7
-1
@@ -63,7 +63,7 @@ import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConsta
|
|||||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
||||||
import static com.cf.imes.module.executor.service.optimizeplan.OptimizePlanService.ORDER_PLATE_MODEL;
|
import static com.cf.imes.module.executor.service.optimizeplan.OptimizePlanService.ORDER_PLATE_MODEL;
|
||||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.PLATE_NOT_EXISTS;
|
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产单板件 Service 实现类
|
* 生产单板件 Service 实现类
|
||||||
@@ -261,6 +261,12 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public List<Long> createNewPlate(OptimizationSavePlateReqVO reqVO) {
|
public List<Long> createNewPlate(OptimizationSavePlateReqVO reqVO) {
|
||||||
|
|
||||||
|
if(reqVO.getRoomId() == null || reqVO.getBodyId() == null){
|
||||||
|
|
||||||
|
throw exception(THE_CURRENT_BOARD_IS_NOT_SELECTED);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
List<PlateDO> plateDOS = new ArrayList<>();
|
List<PlateDO> plateDOS = new ArrayList<>();
|
||||||
|
|
||||||
for (int i = 0; i < reqVO.getMultiple(); i++) {
|
for (int i = 0; i < reqVO.getMultiple(); i++) {
|
||||||
|
|||||||
+1
@@ -229,6 +229,7 @@ public interface ErrorCodeConstants {
|
|||||||
//=========== 板材信息 1-002-032-000 ============
|
//=========== 板材信息 1-002-032-000 ============
|
||||||
ErrorCode PLATE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_002_032_001, "导入板材数据不能为空!");
|
ErrorCode PLATE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_002_032_001, "导入板材数据不能为空!");
|
||||||
ErrorCode PLATE_EXISTS = new ErrorCode(1_002_032_002, "板材存在");
|
ErrorCode PLATE_EXISTS = new ErrorCode(1_002_032_002, "板材存在");
|
||||||
|
ErrorCode THE_CURRENT_BOARD_IS_NOT_SELECTED = new ErrorCode(1_002_032_003, "当前板材没有选择房间和柜体,请选择");
|
||||||
|
|
||||||
//=========== 板材信息 1-002-033-000 ============
|
//=========== 板材信息 1-002-033-000 ============
|
||||||
ErrorCode REMAIN_PLATE_NOT_EXISTS = new ErrorCode(1_002_032_002, "板材不存在");
|
ErrorCode REMAIN_PLATE_NOT_EXISTS = new ErrorCode(1_002_032_002, "板材不存在");
|
||||||
|
|||||||
+2
-1
@@ -3,6 +3,7 @@ package com.cf.imes.module.system.controller.admin.setting;
|
|||||||
|
|
||||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||||
import com.cf.imes.module.system.controller.admin.setting.vo.PackageConfigReqVO;
|
import com.cf.imes.module.system.controller.admin.setting.vo.PackageConfigReqVO;
|
||||||
|
import com.cf.imes.module.system.dal.dataobject.setting.PackageConfigDO;
|
||||||
import com.cf.imes.module.system.service.setting.SettingService;
|
import com.cf.imes.module.system.service.setting.SettingService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
@@ -53,7 +54,7 @@ public class SettingController {
|
|||||||
@GetMapping("/select")
|
@GetMapping("/select")
|
||||||
@Operation(summary = "查看当前用户的配置信息")
|
@Operation(summary = "查看当前用户的配置信息")
|
||||||
@Parameter(name = "type", description = "配置类型", required = true)
|
@Parameter(name = "type", description = "配置类型", required = true)
|
||||||
public CommonResult<PackageConfigReqVO> selectSetting( @RequestParam("type") Integer type ) {
|
public CommonResult<PackageConfigDO> selectSetting(@RequestParam("type") Integer type ) {
|
||||||
|
|
||||||
return success(settingService.selectSetting(type));
|
return success(settingService.selectSetting(type));
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -19,12 +19,12 @@ public class PackageConfigReqVO {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "组织ID")
|
// @Schema(description = "组织ID")
|
||||||
private Long organId;
|
// private Long organId;
|
||||||
|
//
|
||||||
|
//
|
||||||
@Schema(description = "用户ID")
|
// @Schema(description = "用户ID")
|
||||||
private Long userId;
|
// private Long userId;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "配置类型: 1 预打包,2 打包", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "配置类型: 1 预打包,2 打包", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
|||||||
+2
-1
@@ -2,6 +2,7 @@ package com.cf.imes.module.system.service.setting;
|
|||||||
|
|
||||||
|
|
||||||
import com.cf.imes.module.system.controller.admin.setting.vo.PackageConfigReqVO;
|
import com.cf.imes.module.system.controller.admin.setting.vo.PackageConfigReqVO;
|
||||||
|
import com.cf.imes.module.system.dal.dataobject.setting.PackageConfigDO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
public interface SettingService {
|
public interface SettingService {
|
||||||
@@ -12,5 +13,5 @@ public interface SettingService {
|
|||||||
|
|
||||||
Long updateSetting(PackageConfigReqVO reqVO);
|
Long updateSetting(PackageConfigReqVO reqVO);
|
||||||
|
|
||||||
PackageConfigReqVO selectSetting(Integer type);
|
PackageConfigDO selectSetting(Integer type);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-3
@@ -13,6 +13,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static com.cf.imes.framework.common.util.json.JsonUtils.unzipString;
|
||||||
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
|
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
|
||||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
@@ -64,7 +65,7 @@ public class SettingServiceImpl implements SettingService{
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PackageConfigReqVO selectSetting(Integer type) {
|
public PackageConfigDO selectSetting(Integer type) {
|
||||||
|
|
||||||
LoginUser loginUser = getLoginUser();
|
LoginUser loginUser = getLoginUser();
|
||||||
|
|
||||||
@@ -74,9 +75,11 @@ public class SettingServiceImpl implements SettingService{
|
|||||||
throw exception(CURRENTLY_NO_CONFIGURATION_AVAILABLE);
|
throw exception(CURRENTLY_NO_CONFIGURATION_AVAILABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
packageConfigDO.setSetting(JsonUtils.unzipString(packageConfigDO.getSetting()));
|
|
||||||
|
|
||||||
return BeanUtils.toBean(packageConfigDO,PackageConfigReqVO.class);
|
packageConfigDO.setSetting(unzipString(packageConfigDO.getSetting()));
|
||||||
|
|
||||||
|
|
||||||
|
return packageConfigDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user