fix: 套轴修改虚拟(实际)相互切换

This commit is contained in:
2025-05-10 09:59:15 +08:00
parent 61c3972edb
commit b1a5ca5ab1
2 changed files with 10 additions and 6 deletions

View File

@@ -71,8 +71,6 @@
AND IFNULL(p.up_or_down,'') <![CDATA[ <> ]]> ''
AND IFNULL(p.left_or_right,'') <![CDATA[ <> ]]> ''
AND DATE(p.start_time) >= DATE_SUB(CURDATE(), INTERVAL #{day} DAY)
AND p.FRP_description NOT LIKE '%1800%'
AND p.container_name LIKE '%虚拟-B%'
AND '1' = (SELECT c.is_used FROM st_ivt_cutpointivt c WHERE c.ext_code = p.resource_name)
GROUP BY
p.resource_name,

View File

@@ -97,6 +97,7 @@ public class AutoCallAirShaftTask {
public final static String PARAM_CODE_PLAN_AREA = "PARAM_CODE_PLAN_AREA";
public final static String IS_ONLY_PULLING = "IS_ONLY_PULLING";
public final static String TZ_DAY = "TZ_DAY";
public final static String USE_XN = "USE_XN";
public String stepStr = "";
/**
@@ -114,19 +115,20 @@ public class AutoCallAirShaftTask {
Param isOnlyPulling = paramService.findByCode(IS_ONLY_PULLING);
Param tzDay = paramService.findByCode(TZ_DAY);
Param paramObj = paramService.findByCode(PARAM_CODE_PLAN_AREA);
Param useXn = paramService.findByCode(USE_XN);
// 1、获取空的插拔轴位(无任务)
List<BstIvtShafttubeivt> emptyPoints = bstIvtShafttubeivtService.getAllShaftPointsByConditions("2",
"0", "0");
// emptyPoints.forEach(empty -> doCallShaft(empty, isOnlyPulling, tzDay, paramObj));
for (BstIvtShafttubeivt empty : emptyPoints) {
stepStr = "";
doCallShaft(empty, isOnlyPulling, tzDay, paramObj);
doCallShaft(empty, isOnlyPulling, tzDay, paramObj, useXn);
redisUtils.set("INFO" + empty.getPoint_code(), stepStr);
}
}
@Transactional(rollbackFor = Exception.class)
public void doCallShaft(BstIvtShafttubeivt empty, Param isOnlyPulling, Param tzDay, Param paramObj) {
public void doCallShaft(BstIvtShafttubeivt empty, Param isOnlyPulling, Param tzDay, Param paramObj, Param useXn) {
// 标箔1锂电2 改大小4代5代
String specification = empty.getQzz_generation();
String location = empty.getPoint_location();
@@ -139,8 +141,12 @@ public class AutoCallAirShaftTask {
stepStr += ",2";
Integer integer = Integer.valueOf(ObjectUtil.isEmpty(tzDay.getValue()) ? "0" : tzDay.getValue());
// 2、获取分切计划数据 校验代数 todo 顺序可能需要考虑
// List<SlitterPlanDistinctDto> planAll = slittingproductionplanService.getAllCutPlan(integer);
List<SlitterPlanDistinctDto> planAll = slittingproductionplanService.getAllCutPlan2(integer);
List<SlitterPlanDistinctDto> planAll;
if (ObjectUtil.isNotEmpty(useXn) && "1".equals(useXn.getValue())) {
planAll = slittingproductionplanService.getAllCutPlan2(integer);
} else {
planAll = slittingproductionplanService.getAllCutPlan(integer);
}
// 排序
/* List<SlitterPlanDistinctDto> planAll = planAllNoSort.stream()
.sorted(Comparator.comparing(