mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
Merge branch 'main' of ssh://192.168.1.205:9922/cf_devdept2/cf_imes_server
This commit is contained in:
+2
@@ -209,6 +209,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode NOT_TEMPLATE_AUTH = new ErrorCode(1_002_029_005, "该组织无此机台模板权限");
|
||||
ErrorCode NOT_MACHINE_AUTH = new ErrorCode(1_002_029_005, "该组织无此机台权限");
|
||||
ErrorCode THE_CURRENT_MACHINE_IS_ALREADY_IN_USE = new ErrorCode(1_002_029_006, "当前机台已使用,禁止删除");
|
||||
ErrorCode MACHINE_ERROR = new ErrorCode(1_002_029_007, "当前机台错误,请重新选择机台");
|
||||
|
||||
// ========== 标签模板 1-002-300-000 ==========
|
||||
ErrorCode LABEL_TEMPLATE_NOT_EXISTS = new ErrorCode(1_002_300_000, "标签模板不存在");
|
||||
@@ -216,6 +217,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode DEFAULT_LABEL_NOT_EXISTS = new ErrorCode(1_002_300_002, "该类型标签默认模板不存在");
|
||||
ErrorCode MACHINE_USE_LABEL = new ErrorCode(1_002_300_003, "无法删除已有机台使用标签");
|
||||
ErrorCode DEFAULT_NOT_DELETED = new ErrorCode(1_002_300_004, "默认标签模板无法删除");
|
||||
ErrorCode LABEL_ERROR = new ErrorCode(1_002_300_005, "当前标签错误,请重新配置标签");
|
||||
|
||||
// ========== 系统数据源 1_002_301_000 ==========
|
||||
ErrorCode DATA_SOURCE_NOT_EXISTS = new ErrorCode(1_002_301_000, "系统数据源不存在");
|
||||
|
||||
+4
-2
@@ -19,8 +19,7 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
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.module.system.enums.ErrorCodeConstants.LABEL_NOT_EXISTS;
|
||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.MACHINE_USE_LABEL;
|
||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 标签模板 Service 实现类
|
||||
@@ -92,6 +91,9 @@ public class LabelServiceImpl implements LabelService {
|
||||
@Override
|
||||
public LabelRespVO getLabel(Long id) {
|
||||
LabelDO LabelDO = labelMapper.selectById(id);
|
||||
if (LabelDO == null) {
|
||||
throw exception(LABEL_ERROR);
|
||||
}
|
||||
LabelDO.setTemplate(JsonUtils.unzipString(LabelDO.getTemplate()));
|
||||
LabelRespVO LabelRespVO = BeanUtils.toBean(LabelDO, LabelRespVO.class);
|
||||
return LabelRespVO;
|
||||
|
||||
+3
-3
@@ -165,12 +165,12 @@ public class MachineServiceImpl implements MachineService {
|
||||
public CuttingRespVO getCutting(Long id) {
|
||||
MachineDO machineDO = machineMapper.selectById(id);
|
||||
|
||||
if (machineDO == null) {
|
||||
throw exception(MACHINE_ERROR);
|
||||
}
|
||||
// 对机台的配置进行解压
|
||||
machineDO.setSetting(JsonUtils.unzipString(machineDO.getSetting()));
|
||||
|
||||
if (Objects.isNull(machineDO)) {
|
||||
throw exception(MACHINE_NOT_EXISTS);
|
||||
}
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
assert loginUser != null;
|
||||
MachineLimitDO machineLimitDO = machineLimitMapper.selectOne(new LambdaQueryWrapperX<MachineLimitDO>()
|
||||
|
||||
Reference in New Issue
Block a user