feat:追加日志、上单下单取消报错、改切工单母卷检测

This commit is contained in:
2024-07-24 15:31:38 +08:00
parent 8459f52a6f
commit 8f70ad21e4
2 changed files with 11 additions and 2 deletions

View File

@@ -150,6 +150,10 @@ public class SlitterDownTrussTask extends AbstractAcsTask {
StIvtCutpointivt point1 = cutpointivtService.getPintByUpOrDownCode(pointCode1, false);
String pointCode2 = task.getPoint_code2();
BstIvtCutpointivt point2 = bcutpointivtService.getPintByTrussCode(pointCode2, false);
if (ObjectUtil.isEmpty(point1)) {
point1 = cutpointivtService.getPintByUpOrDownCode(pointCode2, false);
point2 = bcutpointivtService.getPintByTrussCode(pointCode1, false);
}
String tmpUpQzzNo = point1.getUp_qzzno();
String tmpDownQzzNo = point1.getDown_qzzno();
// 更新分切计划

View File

@@ -498,7 +498,7 @@ public class SlitterServiceImpl implements SlitterService {
.eq(PdmBiSlittingproductionplan::getStatus, "03")
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
log.info("获取下一组分切计划:{}", timePlans);
log.info("获取下一组分切计划(可能存在脏数据){}", timePlans);
// 寻找备好轴的对接点位
List<BstIvtCutpointivt> cutPointList = slitterMapper.getReadyShaftPoint(device.getExt_code());
// 任务参数
@@ -563,8 +563,11 @@ public class SlitterServiceImpl implements SlitterService {
PdmBiSlittingproductionplan tmpPlan = timePlans.get(0);
// hint: 以第一条为准,过滤和第一条同组同母卷的分切计划
List<PdmBiSlittingproductionplan> nextPlans = timePlans.stream()
.filter(plan -> plan.getParent_container_name().equals(tmpPlan.getParent_container_name()) && plan.getSplit_group().equals(tmpPlan.getSplit_group()))
.filter(plan -> plan.getParent_container_name().equals(tmpPlan.getParent_container_name())
&& plan.getRestruct_container_name().equals(tmpPlan.getRestruct_container_name())
&& plan.getSplit_group().equals(tmpPlan.getSplit_group()))
.collect(Collectors.toList());
log.info("获取下一趟分切计划数据:{}", nextPlans);
// 筛选上下轴各一条
PdmBiSlittingproductionplan nextUpPlan = nextPlans.stream().filter(p -> "1".equals(p.getUp_or_down())).findFirst().orElse(null);
PdmBiSlittingproductionplan nextDownPlan = nextPlans.stream().filter(p -> "2".equals(p.getUp_or_down())).findFirst().orElse(null);
@@ -745,6 +748,7 @@ public class SlitterServiceImpl implements SlitterService {
if (ObjectUtil.isEmpty(plan.getLevel())) {
throw new BadRequestException("子卷[" + plan.getContainer_name() + "]对应的级别不能为空");
}
log.info("分切计划数据:{}", plan);
// plan.setLevel("4");
String point_type = "5".equals(plan.getLevel()) ? "5" : "4";
// 查找终点 确认是废箔还是成品: 根据分切计划的子卷等级来区分5为报废
@@ -948,6 +952,7 @@ public class SlitterServiceImpl implements SlitterService {
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject acsActionFinishRequestToRelease(JSONObject param) {
log.info("ACS请求取货完成参数{}", param);
JSONObject result = new JSONObject();
result.put("status", HttpStatus.HTTP_OK);
result.put("message", "反馈取货成功!");