mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
未排单创建排单新需求接口逻辑更改,相关接口逻辑更改,排单排序接口修改
This commit is contained in:
+14
@@ -7,6 +7,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author 加工方案组配置
|
||||
@@ -40,6 +41,10 @@ public class ProcessSchemeDTO implements Serializable {
|
||||
private String processLineConfigSetting;
|
||||
|
||||
|
||||
@Schema(description = "加工分线的更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime processLineUpdateTime;
|
||||
|
||||
|
||||
@Schema(description = "数据优化配置ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long optimizationConfig;
|
||||
|
||||
@@ -52,6 +57,10 @@ public class ProcessSchemeDTO implements Serializable {
|
||||
private String optimizationConfigSetting;
|
||||
|
||||
|
||||
@Schema(description = "数据优化配置的更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime optimizationUpdateTime;
|
||||
|
||||
|
||||
@Schema(description = "解析器配置ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long analyzer;
|
||||
|
||||
@@ -63,6 +72,11 @@ public class ProcessSchemeDTO implements Serializable {
|
||||
@Schema(description = "解析器配置-机台的配置", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String analyzerConfigSetting;
|
||||
|
||||
|
||||
@Schema(description = "解析器配置-机台的配置的更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime analyzerUpdateTime;
|
||||
|
||||
|
||||
@Schema(description = "机台类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer machineType;
|
||||
|
||||
|
||||
+2
-4
@@ -335,10 +335,8 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode THIS_PLAN_PLATE_IS_CUT = new ErrorCode(1_002_041_045, "当前排单已有板材开料,无法修改");
|
||||
public static final ErrorCode THIS_ORDER_NOT_PLATE_DATA = new ErrorCode(1_002_041_046, "当前生产单无板材数据,无法进行用板量计算");
|
||||
public static final ErrorCode THIS_PLAN_SCHEME_DATA_ERROR = new ErrorCode(1_002_041_047, "当前方案组的优化信息有误,请重新选择方案组或重新导入排单再进行优化");
|
||||
|
||||
|
||||
public static final ErrorCode THIS_PLAN_PLATE_OPTIMIZE_IS_ALL = new ErrorCode(1_002_041_046, "当前排单已全部开料,无法进行选择");
|
||||
public static final ErrorCode THIS_PLATE_IS_OPTIMIZE = new ErrorCode(1_002_041_046, "小板:{},已开料,无法删除,请重新选择小板再删除");
|
||||
public static final ErrorCode PLAN_SORT_DATA_ERROR = new ErrorCode(1_002_041_048, "已无可进行排序的数据,无法进行排序");
|
||||
public static final ErrorCode THIS_PLATE_IS_OPTIMIZE = new ErrorCode(1_002_041_049, "小板:{},已开料,无法删除,请重新选择小板再删除");
|
||||
|
||||
|
||||
|
||||
|
||||
+20
-6
@@ -209,32 +209,46 @@ public class SystemConfigApiImpl implements SystemConfigApi {
|
||||
|
||||
f.setProcessLineConfigName(processLineConfigList.stream()
|
||||
.filter(p->f.getProcessLineConfig().equals(p.getId()))
|
||||
.map(SystemConfigDO::getName)
|
||||
.map(SystemConfigProcessDO::getName)
|
||||
.toList().get(0)
|
||||
);
|
||||
f.setProcessLineConfigSetting(
|
||||
processLineConfigList.stream()
|
||||
.filter(p->f.getProcessLineConfig().equals(p.getId()))
|
||||
.map(SystemConfigDO::getSetting)
|
||||
.map(SystemConfigProcessDO::getSetting)
|
||||
.toList().get(0)
|
||||
);
|
||||
f.setProcessLineUpdateTime(
|
||||
processLineConfigList.stream()
|
||||
.filter(p->f.getProcessLineConfig().equals(p.getId()))
|
||||
.map(SystemConfigProcessDO::getUpdateTime)
|
||||
.toList().get(0)
|
||||
);
|
||||
|
||||
f.setOptimizationConfigName(processLineConfigList.stream()
|
||||
.filter(p->f.getProcessLineConfig().equals(p.getId()))
|
||||
.map(SystemConfigDO::getName)
|
||||
f.setOptimizationConfigName(optimizationConfigList.stream()
|
||||
.filter(p->f.getOptimizationConfig().equals(p.getId()))
|
||||
.map(SystemConfigDataDO::getName)
|
||||
.toList().get(0)
|
||||
);
|
||||
f.setOptimizationConfigSetting(
|
||||
optimizationConfigList.stream()
|
||||
.filter(p->f.getOptimizationConfig().equals(p.getId()))
|
||||
.map(SystemConfigDO::getSetting)
|
||||
.map(SystemConfigDataDO::getSetting)
|
||||
.toList().get(0)
|
||||
);
|
||||
f.setOptimizationUpdateTime(
|
||||
optimizationConfigList.stream()
|
||||
.filter(p->f.getOptimizationConfig().equals(p.getId()))
|
||||
.map(SystemConfigDataDO::getUpdateTime)
|
||||
.toList().get(0)
|
||||
);
|
||||
|
||||
|
||||
|
||||
MachineDO machineDO = analyzerList.stream().filter(p -> f.getAnalyzer().equals(p.getId())).toList().get(0);
|
||||
f.setAnalyzerConfigName(machineDO.getName());
|
||||
f.setAnalyzerConfigSetting(unzipString(machineDO.getSetting()));
|
||||
f.setAnalyzerUpdateTime(machineDO.getUpdateTime());
|
||||
f.setMachineType(machineDO.getMachineType());
|
||||
|
||||
|
||||
|
||||
+8
@@ -27,6 +27,7 @@ import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
@@ -98,6 +99,13 @@ public class PostController {
|
||||
public void export(HttpServletResponse response, @Validated PostPageReqVO reqVO) throws IOException {
|
||||
reqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PostDO> list = postService.getPostPage(reqVO).getList();
|
||||
|
||||
AtomicLong sort = new AtomicLong();
|
||||
list.forEach(f->{
|
||||
sort.addAndGet(1);
|
||||
f.setId(sort.get());
|
||||
});
|
||||
|
||||
// 输出
|
||||
ExcelUtils.write(response, "岗位数据.xls", "岗位列表", PostRespVO.class,
|
||||
BeanUtils.toBean(list, PostRespVO.class));
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import java.time.LocalDateTime;
|
||||
public class PostRespVO {
|
||||
|
||||
@Schema(description = "岗位编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@ExcelProperty("岗位编号")
|
||||
@ExcelProperty("序号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "岗位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "小土豆")
|
||||
|
||||
-14
@@ -7,7 +7,6 @@ import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
||||
import com.cf.imes.framework.security.core.LoginUser;
|
||||
import com.cf.imes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.cf.imes.module.system.controller.admin.dept.vo.post.PostPageReqVO;
|
||||
import com.cf.imes.module.system.dal.dataobject.dept.DeptDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.dept.PostDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@@ -35,19 +34,6 @@ public interface PostMapper extends BaseMapperX<PostDO> {
|
||||
}else{
|
||||
lambdaQueryWrapperX.eqIfPresent(PostDO::getOrganId, loginUser.getOrganId());
|
||||
}
|
||||
// 获取分页结果
|
||||
// PageResult<PostDO> pageResult = selectPage(reqVO, lambdaQueryWrapperX
|
||||
// .likeIfPresent(PostDO::getCode, reqVO.getCode())
|
||||
// .likeIfPresent(PostDO::getName, reqVO.getName())
|
||||
// .eqIfPresent(PostDO::getStatus, reqVO.getStatus())
|
||||
// .orderByDesc(PostDO::getSort));
|
||||
|
||||
// 重新设置 id 值
|
||||
// List<PostDO> records = pageResult.getList();
|
||||
// for (int i = 0; i < records.size(); i++) {
|
||||
// PostDO postDO = records.get(i);
|
||||
// postDO.setId((long) (i + 1));
|
||||
// }
|
||||
|
||||
lambdaQueryWrapperX.likeIfPresent(PostDO::getCode, reqVO.getCode())
|
||||
.likeIfPresent(PostDO::getName, reqVO.getName())
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public enum SystemConfigTypeEnum {
|
||||
/**
|
||||
* 数据处理
|
||||
*/
|
||||
DATA_PROCESSING(5, "优化数据配置"),
|
||||
DATA_PROCESSING(5, "数据处理"),
|
||||
|
||||
/**
|
||||
* 加工方案
|
||||
|
||||
+1
@@ -343,6 +343,7 @@ public class MachineServiceImpl implements MachineService {
|
||||
// 更新
|
||||
MachineDO updateObj = MachineConvert.convert(updateReqVO);
|
||||
|
||||
updateObj.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
// 判断传入的机台配置是否存在,如果存在,压缩数据后更新
|
||||
if (!updateReqVO.getMachineSettingDO().isEmpty()) {
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ public class OAuth2TokenServiceImpl implements OAuth2TokenService {
|
||||
// 校验组织的有效性
|
||||
organService.validOrgan(accessTokenDO.getOrganId());
|
||||
// 有令牌的校验,代表有接口访问,延长令牌的过期时间(30分钟)
|
||||
oauth2AccessTokenRedisDAO.expire(accessToken, 1800, TimeUnit.SECONDS);
|
||||
oauth2AccessTokenRedisDAO.expire(accessToken, 1, TimeUnit.DAYS);
|
||||
}
|
||||
return accessTokenDO;
|
||||
}
|
||||
|
||||
+3
@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -135,6 +136,8 @@ public class DataProcessServiceHandler extends AbstractSystemConfigServiceHandle
|
||||
systemConfigDataDO.setSetting(reqVO.getSetting());
|
||||
// 覆盖名称
|
||||
systemConfigDataDO.setName(reqVO.getName());
|
||||
// 更新时间
|
||||
systemConfigDataDO.setUpdateTime(LocalDateTime.now());
|
||||
// 更新
|
||||
systemConfigDataMapper.updateById(systemConfigDataDO);
|
||||
} else {
|
||||
|
||||
+3
@@ -15,6 +15,7 @@ import com.cf.imes.module.system.service.systemconfig.factory.service.AbstractSy
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -153,6 +154,8 @@ public class IntellectBranchingService extends AbstractSystemConfigServiceHandle
|
||||
systemConfigFilterDO.setSetting(reqVO.getSetting());
|
||||
// 覆盖名称
|
||||
systemConfigFilterDO.setName(reqVO.getName());
|
||||
// 更新时间
|
||||
systemConfigFilterDO.setUpdateTime(LocalDateTime.now());
|
||||
// 更新
|
||||
systemConfigFilterMapper.updateById(systemConfigFilterDO);
|
||||
} else {
|
||||
|
||||
+3
@@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
@@ -123,6 +124,8 @@ public class MultiColorOrderPlanServiceHandler extends AbstractSystemConfigServi
|
||||
systemConfigDO.setSetting(reqVO.getSetting());
|
||||
// 覆盖名称
|
||||
systemConfigDO.setName(reqVO.getName());
|
||||
// 更新时间
|
||||
systemConfigDO.setUpdateTime(LocalDateTime.now());
|
||||
// 更新
|
||||
systemConfigMapper.updateById(systemConfigDO);
|
||||
} else {
|
||||
|
||||
+3
@@ -18,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -208,6 +209,8 @@ public class ProcessSchemeServiceHandler extends AbstractSystemConfigServiceHand
|
||||
systemConfigSchemeDO.setSetting(reqVO.getSetting());
|
||||
// 覆盖名称
|
||||
systemConfigSchemeDO.setName(reqVO.getName());
|
||||
// 更新时间
|
||||
systemConfigSchemeDO.setUpdateTime(LocalDateTime.now());
|
||||
// 更新
|
||||
systemConfigSchemeMapper.updateById(systemConfigSchemeDO);
|
||||
} else {
|
||||
|
||||
+3
@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -136,6 +137,8 @@ public class ProcessScreeningServiceHandler extends AbstractSystemConfigServiceH
|
||||
systemConfigProcessDO.setSetting(reqVO.getSetting());
|
||||
// 覆盖名称
|
||||
systemConfigProcessDO.setName(reqVO.getName());
|
||||
// 更新时间
|
||||
systemConfigProcessDO.setUpdateTime(LocalDateTime.now());
|
||||
// 更新
|
||||
systemConfigProcessMapper.updateById(systemConfigProcessDO);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user