feat: 分切下料2
fix: 分切下料不在校验分切计划05状态 fix:分切桁架做完任务更新计划失败报错
This commit is contained in:
@@ -40,6 +40,13 @@ public class SlitterPdaController {
|
|||||||
return new ResponseEntity<>(slitterDevices.downRolls(param), HttpStatus.OK);
|
return new ResponseEntity<>(slitterDevices.downRolls(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/downRolls2")
|
||||||
|
@Log("下卷2")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> downRolls2(@RequestBody JSONObject param) {
|
||||||
|
return new ResponseEntity<>(slitterDevices.downRolls2(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/moveVehicle")
|
@PostMapping("/moveVehicle")
|
||||||
@Log("搬运废箔斗")
|
@Log("搬运废箔斗")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
|
|||||||
@@ -141,26 +141,28 @@ public class SlitterDownTrussTask extends AbstractAcsTask {
|
|||||||
log.info("即将上卷的气胀轴编码数据:{}", upQzzNos);
|
log.info("即将上卷的气胀轴编码数据:{}", upQzzNos);
|
||||||
if (upQzzNos.size() > 0) {
|
if (upQzzNos.size() > 0) {
|
||||||
List<PdmBiSlittingproductionplan> plans = slittingproductionplanService.getByQzzNos(upQzzNos);
|
List<PdmBiSlittingproductionplan> plans = slittingproductionplanService.getByQzzNos(upQzzNos);
|
||||||
PdmBiSlittingproductionplan pp = plans.get(0);
|
if (plans.size() > 0) {
|
||||||
// 需要把重量记录到分切机上
|
PdmBiSlittingproductionplan pp = plans.get(0);
|
||||||
point1.setRemark(SlitterTaskUtil.getPaperWeightStr(plans));
|
// 需要把重量记录到分切机上
|
||||||
if (pp.getContainer_name().contains("虚拟")) {
|
point1.setRemark(SlitterTaskUtil.getPaperWeightStr(plans));
|
||||||
// 如果是虚拟卷,需要执行删除标记,并且清空数据
|
if (pp.getContainer_name().contains("虚拟")) {
|
||||||
// 将分切计划删除,设备禁用
|
// 如果是虚拟卷,需要执行删除标记,并且清空数据
|
||||||
plans.forEach(p1 -> {
|
// 将分切计划删除,设备禁用
|
||||||
p1.setIs_delete("1");
|
plans.forEach(p1 -> {
|
||||||
p1.setQzzno("");
|
p1.setIs_delete("1");
|
||||||
p1.setUpdate_time(DateUtil.now());
|
p1.setQzzno("");
|
||||||
p1.setUpdate_optname(SecurityUtils.getCurrentNickName());
|
p1.setUpdate_time(DateUtil.now());
|
||||||
p1.setUpdate_optid(SecurityUtils.getCurrentUserId());
|
p1.setUpdate_optname(SecurityUtils.getCurrentNickName());
|
||||||
});
|
p1.setUpdate_optid(SecurityUtils.getCurrentUserId());
|
||||||
slittingproductionplanService.updateBatchById(plans);
|
});
|
||||||
// 设备禁用
|
slittingproductionplanService.updateBatchById(plans);
|
||||||
point1.setUp_qzzno("");
|
// 设备禁用
|
||||||
point1.setDown_qzzno("");
|
point1.setUp_qzzno("");
|
||||||
} else {
|
point1.setDown_qzzno("");
|
||||||
slittingproductionplanService.update(p, new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
} else {
|
||||||
.in(PdmBiSlittingproductionplan::getQzzno, upQzzNos));
|
slittingproductionplanService.update(p, new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
|
.in(PdmBiSlittingproductionplan::getQzzno, upQzzNos));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
point1.setUpdate_optid(3L);
|
point1.setUpdate_optid(3L);
|
||||||
|
|||||||
@@ -146,7 +146,6 @@
|
|||||||
p.split_group,
|
p.split_group,
|
||||||
p.up_or_down,
|
p.up_or_down,
|
||||||
p.qzz_size,
|
p.qzz_size,
|
||||||
p.`status`,
|
|
||||||
p.qzz_generation,
|
p.qzz_generation,
|
||||||
MIN(p.start_time) AS start_time
|
MIN(p.start_time) AS start_time
|
||||||
FROM
|
FROM
|
||||||
@@ -168,6 +167,6 @@
|
|||||||
p.qzz_size,
|
p.qzz_size,
|
||||||
p.qzz_generation
|
p.qzz_generation
|
||||||
ORDER BY
|
ORDER BY
|
||||||
start_time DESC, `status`
|
start_time DESC
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -313,4 +313,11 @@ public interface SlitterService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<CallPlanViewVO> showManualView(JSONObject param);
|
List<CallPlanViewVO> showManualView(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卷下料2
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONObject downRolls2(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -487,12 +487,11 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
log.error("子卷参数不能为空!");
|
log.error("子卷参数不能为空!");
|
||||||
throw new BadRequestException("子卷参数不能为空!");
|
throw new BadRequestException("子卷参数不能为空!");
|
||||||
}
|
}
|
||||||
// 获取分切计划,最多4个需要出站的任务
|
// 获取分切计划,最多4个需要出站的任务 (不在校验05状态)
|
||||||
List<PdmBiSlittingproductionplan> currentPlans = slittingproductionplanService.list(
|
List<PdmBiSlittingproductionplan> currentPlans = slittingproductionplanService.list(
|
||||||
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.in(PdmBiSlittingproductionplan::getContainer_name, containerList)
|
.in(PdmBiSlittingproductionplan::getContainer_name, containerList)
|
||||||
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO)
|
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO));
|
||||||
.eq(PdmBiSlittingproductionplan::getStatus, "05"));
|
|
||||||
if (currentPlans.size() == 0) {
|
if (currentPlans.size() == 0) {
|
||||||
log.error("当前子卷已经出卷或者不存在!");
|
log.error("当前子卷已经出卷或者不存在!");
|
||||||
throw new BadRequestException("当前子卷已经出卷或者不存在!");
|
throw new BadRequestException("当前子卷已经出卷或者不存在!");
|
||||||
@@ -515,14 +514,6 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
}
|
}
|
||||||
String area = device.getProduct_area();
|
String area = device.getProduct_area();
|
||||||
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
||||||
// hint: 获取到的分切可能是不同组的但具有一定时间顺序
|
|
||||||
// List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(
|
|
||||||
// new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
|
||||||
// .eq(PdmBiSlittingproductionplan::getResource_name, actualDeviceCode)
|
|
||||||
// .eq(PdmBiSlittingproductionplan::getStatus, "03")
|
|
||||||
// .eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
|
||||||
// .orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
|
|
||||||
// log.info("获取下一组分切计划(可能存在脏数据):{}", timePlans);
|
|
||||||
// 寻找备好轴的对接点位
|
// 寻找备好轴的对接点位
|
||||||
List<BstIvtCutpointivt> cutPointList = slitterMapper.getReadyShaftPoint(actualDeviceCode);
|
List<BstIvtCutpointivt> cutPointList = slitterMapper.getReadyShaftPoint(actualDeviceCode);
|
||||||
// 任务参数
|
// 任务参数
|
||||||
@@ -2118,4 +2109,16 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
public List<CallPlanViewVO> showManualView(JSONObject param) {
|
public List<CallPlanViewVO> showManualView(JSONObject param) {
|
||||||
return slitterMapper.showManualView();
|
return slitterMapper.showManualView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject downRolls2(JSONObject param) {
|
||||||
|
log.info("下卷2的输入参数为:{}", param);
|
||||||
|
// param: device_code, container
|
||||||
|
String device_code = param.getString("device_code");
|
||||||
|
List<SchBaseTask> tasks = taskService.checkHaveTask(device_code);
|
||||||
|
if (tasks.size() > 0) {
|
||||||
|
throw new BadRequestException("分切机" + device_code + " 已经有存在的任务");
|
||||||
|
}
|
||||||
|
return mesSlittingMachineSendMaterial(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user