opt:优化
This commit is contained in:
@@ -202,6 +202,7 @@
|
||||
p.parent_container_name,
|
||||
p.split_group,
|
||||
p.up_or_down,
|
||||
p.manufacture_sort,
|
||||
p.qzz_size,
|
||||
p.qzz_generation,
|
||||
MIN(p.start_time) AS start_time
|
||||
@@ -221,7 +222,11 @@
|
||||
p.parent_container_name,
|
||||
p.split_group,
|
||||
p.up_or_down,
|
||||
p.manufacture_sort,
|
||||
p.qzz_size,
|
||||
p.qzz_generation
|
||||
order by p.qzz_size,
|
||||
p.manufacture_sort desc,
|
||||
p.start_time
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -139,13 +139,13 @@ public class AutoCallAirShaftTask {
|
||||
Integer integer = Integer.valueOf(ObjectUtil.isEmpty(tzDay.getValue()) ? "0" : tzDay.getValue());
|
||||
// 2、获取分切计划数据 校验代数 todo: 顺序可能需要考虑
|
||||
// List<SlitterPlanDistinctDto> planAll = slittingproductionplanService.getAllCutPlan(integer);
|
||||
List<SlitterPlanDistinctDto> planAllNoSort = slittingproductionplanService.getAllCutPlan2(integer);
|
||||
List<SlitterPlanDistinctDto> planAll = slittingproductionplanService.getAllCutPlan2(integer);
|
||||
// 排序
|
||||
List<SlitterPlanDistinctDto> planAll = planAllNoSort.stream()
|
||||
/* List<SlitterPlanDistinctDto> planAll = planAllNoSort.stream()
|
||||
.sorted(Comparator.comparing(
|
||||
dto -> LocalDateTime.parse(dto.getStart_time(), TIME_FORMATTER)
|
||||
))
|
||||
.collect(Collectors.toList());
|
||||
.collect(Collectors.toList());*/
|
||||
// 过滤
|
||||
String value = paramObj.getValue();
|
||||
List<String> prefixList = Arrays.asList(value.split("[,,]"));
|
||||
|
||||
@@ -33,6 +33,10 @@ public class SlitterPlanDistinctDto {
|
||||
* 气胀轴尺寸
|
||||
*/
|
||||
private String qzz_size;
|
||||
/**
|
||||
* 生产顺序
|
||||
*/
|
||||
private String manufacture_sort;
|
||||
/**
|
||||
* 气胀轴代数
|
||||
*/
|
||||
|
||||
@@ -2215,9 +2215,15 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
res.put("message", "加急失败,当前计划正在套轴!");
|
||||
return res;
|
||||
}
|
||||
if(!"P1".equals(plan.getManufacture_sort())){
|
||||
res.put("status", HttpStatus.HTTP_OK);
|
||||
res.put("message", "加急失败,当前计划已加急过一次!");
|
||||
return res;
|
||||
}
|
||||
//更新套轴计划开始时间为当前时间
|
||||
LambdaUpdateWrapper<PdmBiSlittingproductionplan> updateWrapper = new LambdaUpdateWrapper<PdmBiSlittingproductionplan>();
|
||||
updateWrapper.set(PdmBiSlittingproductionplan::getStart_time, DateUtil.now())
|
||||
.set(PdmBiSlittingproductionplan::getManufacture_sort, "P2")
|
||||
.eq(PdmBiSlittingproductionplan::getWorkorder_id, workorder_id)
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO);
|
||||
//判断更新是否成功
|
||||
|
||||
Reference in New Issue
Block a user