add: 套轴区域选择、套轴计划为当天计划
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
AND p.is_delete = '0'
|
||||
AND IFNULL(p.up_or_down,'') <![CDATA[ <> ]]> ''
|
||||
AND IFNULL(p.left_or_right,'') <![CDATA[ <> ]]> ''
|
||||
AND DATE(p.start_time) = CURDATE()
|
||||
GROUP BY
|
||||
p.resource_name,
|
||||
parent_container_name,
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -81,6 +82,8 @@ public class AutoCallAirShaftTask {
|
||||
@Autowired
|
||||
private ISysParamService paramService;
|
||||
|
||||
public final static String PARAM_CODE_PLAN_AREA = "PARAM_CODE_PLAN_AREA";
|
||||
|
||||
/**
|
||||
* hint: 目前只是考虑了上区域
|
||||
* 执行套轴和拔轴任务的逻辑处理。
|
||||
@@ -103,10 +106,14 @@ public class AutoCallAirShaftTask {
|
||||
// 判断配置参数是否只做拔轴
|
||||
// 2、获取分切计划数据 校验代数 todo: 顺序可能需要考虑
|
||||
List<SlitterPlanDistinctDto> planAll = slittingproductionplanService.getAllCutPlan();
|
||||
Param paramObj = paramService.findByCode(PARAM_CODE_PLAN_AREA);
|
||||
String value = paramObj.getValue();
|
||||
List<String> prefixList = Arrays.asList(value.split("[,,]"));
|
||||
List<SlitterPlanDistinctDto> plans = planAll.stream()
|
||||
.filter(p -> (p.getResource_name().startsWith("B5") ||
|
||||
p.getResource_name().startsWith("B6")) &&
|
||||
(checkComputationPoint(p) && checkHasTask(p))).collect(Collectors.toList());
|
||||
.filter(p -> prefixList.stream()
|
||||
.anyMatch(prefix -> p.getResource_name().startsWith(prefix)) &&
|
||||
checkComputationPoint(p) && checkHasTask(p))
|
||||
.collect(Collectors.toList());
|
||||
if (plans.size() == 0) {
|
||||
// 如果不需要套轴,就只做拔轴
|
||||
makePullShaft(empty, specification);
|
||||
|
||||
Reference in New Issue
Block a user