Merge branch 'main' of ssh://192.168.1.205:9922/cf_devdept2/cf_imes_server

This commit is contained in:
lym
2024-07-11 09:31:23 +08:00
8 changed files with 23 additions and 8 deletions
@@ -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;
@@ -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>()