fix: 提示、计划时间校验

This commit is contained in:
2026-08-16 15:00:04 +08:00
parent adc13f989d
commit 513a1c26f4
2 changed files with 4 additions and 1 deletions

View File

@@ -260,7 +260,7 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
LambdaQueryWrapper<PdmBiSlittingproductionplan> lam = new LambdaQueryWrapper<>();
lam.eq(PdmBiSlittingproductionplan::getResource_name, deviceCode)
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
.apply("DATE(call_time) >= DATE_SUB(CURDATE(), INTERVAL 1 DAY)")
.apply("DATE(start_time) >= DATE_SUB(CURDATE(), INTERVAL 1 DAY)")
.orderByAsc(PdmBiSlittingproductionplan::getStatus, PdmBiSlittingproductionplan::getWorkorder_id);
return list(lam);
}

View File

@@ -745,6 +745,9 @@ public class SlitterServiceImpl implements SlitterService {
log.info("获取下一趟分切计划数据:{}", filterNextPlans);
// 查找分切对接位空位根据原理分切机先放优先放区域、location、plan进行过滤
List<SlitterDownNewDto> slitterDownNewDtoList = slitterMapper.getCanDownPoints(actualDevice);
if (slitterDownNewDtoList.isEmpty()) {
throw new BadRequestException("找不到分切对接位空位");
}
String groupId = IdUtil.getStringId();
// 筛选上下轴各一条
PdmBiSlittingproductionplan nextUpPlan = filterNextPlans.stream().filter(p -> "1".equals(p.getUp_or_down())).findFirst().orElse(null);