fix: 手持权限、任务校验
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
OR pp.qzzno = bc.qzz_no2
|
||||
WHERE bc.point_type = #{type}
|
||||
AND pp.qzz_size = #{size}
|
||||
AND LEFT(p.resource_name, 2) = #{area}
|
||||
AND LEFT(pp.resource_name, 2) = #{area}
|
||||
AND bc.is_used = '1'
|
||||
AND bc.point_status = '3'
|
||||
AND 0 = (SELECT COUNT(*)
|
||||
|
||||
@@ -62,8 +62,10 @@ public interface IBstIvtShafttubeivtService extends IService<BstIvtShafttubeivt>
|
||||
|
||||
/**
|
||||
* 获得气胀轴库对应的气涨轴位置
|
||||
* @param qzzSize
|
||||
* @param qzzSize 气涨轴尺寸
|
||||
* @param specification 标箔、锂电
|
||||
* @param location 位置:上半部分还是下半部分
|
||||
* @return
|
||||
*/
|
||||
List<BstIvtShafttubeivt> getByQzzSize(String qzzSize);
|
||||
List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String specification, String location);
|
||||
}
|
||||
|
||||
@@ -13,5 +13,5 @@ public interface BstIvtShafttubeivtMapper extends BaseMapper<BstIvtShafttubeivt>
|
||||
|
||||
List<BstIvtShafttubeivt> getAllShaftPointsByConditions(String type, String location, String have);
|
||||
|
||||
List<BstIvtShafttubeivt> getByQzzSize(String qzzSize);
|
||||
List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String specification, String location);
|
||||
}
|
||||
|
||||
@@ -19,5 +19,6 @@
|
||||
FROM
|
||||
`bst_ivt_shafttubeivt` bsf
|
||||
WHERE bsf.is_used = '1' AND bsf.qzz_size = #{qzzSize} AND bsf.point_type = '1'
|
||||
AND bsf.qzz_generation = #{specification} AND bsf.point_location = #{location}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -102,8 +102,8 @@ public class BstIvtShafttubeivtServiceImpl extends ServiceImpl<BstIvtShafttubeiv
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BstIvtShafttubeivt> getByQzzSize(String qzzSize) {
|
||||
return bstIvtShafttubeivtMapper.getByQzzSize(qzzSize);
|
||||
public List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String specification, String location) {
|
||||
return bstIvtShafttubeivtMapper.getByQzzSize(qzzSize, specification, location);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,8 @@ public interface IPdmBiSlittingproductionplanService extends IService<PdmBiSlitt
|
||||
|
||||
/**
|
||||
* 获取可用的分切计划
|
||||
* @param area 区域
|
||||
* @return /
|
||||
*/
|
||||
List<SlitterPlanDistinctDto> getAllCutPlan(String specification);
|
||||
List<SlitterPlanDistinctDto> getAllCutPlan(String area);
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ import java.util.List;
|
||||
**/
|
||||
public interface PdmBiSlittingproductionplanMapper extends BaseMapper<PdmBiSlittingproductionplan> {
|
||||
|
||||
List<SlitterPlanDistinctDto> getAllCutPlan(String specification);
|
||||
List<SlitterPlanDistinctDto> getAllCutPlan(String area);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
AND p.is_paper_ok = '1'
|
||||
AND p.is_delete = '0'
|
||||
AND p.manufacture_date = '2024-01-05'
|
||||
AND LEFT ( p.resource_name, 2 ) = #{specification}
|
||||
AND LEFT ( p.resource_name, 2 ) = #{area}
|
||||
AND p.up_or_down IS NOT NULL
|
||||
AND p.left_or_right IS NOT NULL
|
||||
GROUP BY
|
||||
|
||||
@@ -76,8 +76,8 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SlitterPlanDistinctDto> getAllCutPlan(String specification) {
|
||||
return pdmBiSlittingproductionplanMapper.getAllCutPlan(specification);
|
||||
public List<SlitterPlanDistinctDto> getAllCutPlan(String area) {
|
||||
return pdmBiSlittingproductionplanMapper.getAllCutPlan(area);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,8 +68,7 @@ public class TrussCallAirShaftTask extends AbstractAcsTask {
|
||||
.next_device_code(task.getPoint_code2())
|
||||
.start_device_code2(task.getPoint_code3())
|
||||
.next_device_code2(task.getPoint_code4())
|
||||
.vehicle_code(ObjectUtil.isNotEmpty(task.getVehicle_code())
|
||||
? task.getVehicle_code() : task.getVehicle_code2())
|
||||
.vehicle_code(task.getVehicle_code())
|
||||
.agv_system_type(agv_system_type)
|
||||
.priority(task.getPriority())
|
||||
.remark(task.getRemark())
|
||||
@@ -101,38 +100,41 @@ public class TrussCallAirShaftTask extends AbstractAcsTask {
|
||||
.eq(BstIvtShafttubeivt::getPoint_code, endPoint));
|
||||
String requestParam = task.getRequest_param();
|
||||
JSONObject extGroupData = JSONObject.parseObject(requestParam);
|
||||
// 获取分切计划(最多两个)需要获取子卷的纸管设置到点位上 获取分切计划dto中对应的需要套轴的分切计划 最多两个计划
|
||||
String needPlan = extGroupData.getString("needPlan");
|
||||
SlitterPlanDistinctDto planDistinctDto = JSONObject.parseObject(needPlan, SlitterPlanDistinctDto.class);
|
||||
List<PdmBiSlittingproductionplan> needPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||
.eq(PdmBiSlittingproductionplan::getResource_name, planDistinctDto.getResource_name())
|
||||
.eq(PdmBiSlittingproductionplan::getParent_container_name, planDistinctDto.getParent_container_name())
|
||||
.eq(PdmBiSlittingproductionplan::getUp_or_down, planDistinctDto.getUp_or_down())
|
||||
.eq(PdmBiSlittingproductionplan::getIs_paper_ok, "2"));
|
||||
if (needPlans.size() == 0) {
|
||||
throw new BadRequestException("找不到气涨轴编码【" + task.getVehicle_code() + "】对应的气涨轴");
|
||||
}
|
||||
for (PdmBiSlittingproductionplan plan : needPlans) {
|
||||
if ("1".equals(plan.getLeft_or_right())) {
|
||||
// 左卷
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
endPointObj.setTube_code1(plan.getPaper_tube_material());
|
||||
endPointObj.setTube_name1(plan.getPaper_tube_model());
|
||||
// 需要套轴就要把纸管信息进行维护
|
||||
if ("1".equals(extGroupData.getString("is_bushing"))) {
|
||||
// 获取分切计划(最多两个)需要获取子卷的纸管设置到点位上 获取分切计划dto中对应的需要套轴的分切计划 最多两个计划
|
||||
String needPlan = extGroupData.getString("needPlan");
|
||||
SlitterPlanDistinctDto planDistinctDto = JSONObject.parseObject(needPlan, SlitterPlanDistinctDto.class);
|
||||
List<PdmBiSlittingproductionplan> needPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||
.eq(PdmBiSlittingproductionplan::getResource_name, planDistinctDto.getResource_name())
|
||||
.eq(PdmBiSlittingproductionplan::getParent_container_name, planDistinctDto.getParent_container_name())
|
||||
.eq(PdmBiSlittingproductionplan::getUp_or_down, planDistinctDto.getUp_or_down())
|
||||
.eq(PdmBiSlittingproductionplan::getIs_paper_ok, "2"));
|
||||
if (needPlans.size() == 0) {
|
||||
throw new BadRequestException("找不到气涨轴编码【" + task.getVehicle_code() + "】对应的气涨轴");
|
||||
}
|
||||
for (PdmBiSlittingproductionplan plan : needPlans) {
|
||||
if ("1".equals(plan.getLeft_or_right())) {
|
||||
// 左卷
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
endPointObj.setTube_code1(plan.getPaper_tube_material());
|
||||
endPointObj.setTube_name1(plan.getPaper_tube_model());
|
||||
} else {
|
||||
endPointObj.setTube_code1(plan.getFRP_material());
|
||||
endPointObj.setTube_name1(plan.getFRP_model());
|
||||
}
|
||||
endPointObj.setContainer_name1(plan.getContainer_name());
|
||||
} else {
|
||||
endPointObj.setTube_code1(plan.getFRP_material());
|
||||
endPointObj.setTube_name1(plan.getFRP_model());
|
||||
// 右卷
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
endPointObj.setTube_code1(plan.getPaper_tube_material());
|
||||
endPointObj.setTube_name1(plan.getPaper_tube_model());
|
||||
} else {
|
||||
endPointObj.setTube_code1(plan.getFRP_material());
|
||||
endPointObj.setTube_name1(plan.getFRP_model());
|
||||
}
|
||||
endPointObj.setContainer_name2(plan.getContainer_name());
|
||||
}
|
||||
endPointObj.setContainer_name1(plan.getContainer_name());
|
||||
} else {
|
||||
// 右卷
|
||||
if ("1".equals(plan.getPaper_tube_or_FRP())) {
|
||||
endPointObj.setTube_code1(plan.getPaper_tube_material());
|
||||
endPointObj.setTube_name1(plan.getPaper_tube_model());
|
||||
} else {
|
||||
endPointObj.setTube_code1(plan.getFRP_material());
|
||||
endPointObj.setTube_name1(plan.getFRP_model());
|
||||
}
|
||||
endPointObj.setContainer_name2(plan.getContainer_name());
|
||||
}
|
||||
}
|
||||
endPointObj.setHave_qzz("1");
|
||||
@@ -140,9 +142,14 @@ public class TrussCallAirShaftTask extends AbstractAcsTask {
|
||||
TaskUtils.updateOptMessageByBShaftPoint(endPointObj);
|
||||
shafttubeivtService.updateById(endPointObj);
|
||||
// 起点清空
|
||||
startPointObj.setQzz_no1("");
|
||||
startPointObj.setQzz_no2("");
|
||||
startPointObj.setPoint_status("1");
|
||||
if (startPoint.equals(startPointObj.getTruss_point_code1())) {
|
||||
startPointObj.setQzz_no1("");
|
||||
} else {
|
||||
startPointObj.setQzz_no2("");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(startPointObj.getQzz_no1()) && ObjectUtil.isEmpty(startPointObj.getQzz_no2())) {
|
||||
startPointObj.setPoint_status("1");
|
||||
}
|
||||
TaskUtils.updateOptMessageByBCutPoint(startPointObj);
|
||||
bcutpointivtService.updateById(startPointObj);
|
||||
|
||||
@@ -166,8 +173,7 @@ public class TrussCallAirShaftTask extends AbstractAcsTask {
|
||||
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
||||
task.setPoint_code1(form.getString("point_code1"));
|
||||
task.setPoint_code2(form.getString("point_code2"));
|
||||
task.setVehicle_code(form.getString("vehicle_code1"));
|
||||
task.setVehicle_code2(form.getString("vehicle_code2"));
|
||||
task.setVehicle_code(form.getString("vehicle_code"));
|
||||
task.setAcs_task_type("6");
|
||||
task.setIs_delete("0");
|
||||
task.setRequest_param(form.toJSONString());
|
||||
|
||||
@@ -61,21 +61,25 @@ public class AutoCallAirShaftTask {
|
||||
emptyPoints.forEach(empty -> {
|
||||
// 标箔:1,锂电:2
|
||||
String specification = empty.getQzz_generation();
|
||||
String location;
|
||||
String area;
|
||||
if ("1".equals(specification)) {
|
||||
location = "0";
|
||||
if ("0".equals(empty.getPoint_location())) {
|
||||
specification = "B2";
|
||||
area = "B2";
|
||||
} else {
|
||||
specification = "B4";
|
||||
area = "B4";
|
||||
}
|
||||
} else {
|
||||
location = "1";
|
||||
if ("0".equals(empty.getPoint_location())) {
|
||||
specification = "B1";
|
||||
area = "B1";
|
||||
} else {
|
||||
specification = "B3";
|
||||
area = "B3";
|
||||
}
|
||||
}
|
||||
// 2、获取分切计划数据,hint: 根据标箔锂电区分区域
|
||||
List<SlitterPlanDistinctDto> plans = slittingproductionplanService.getAllCutPlan(specification);
|
||||
List<SlitterPlanDistinctDto> plans = slittingproductionplanService.getAllCutPlan(area);
|
||||
if (plans.size() == 0) {
|
||||
// 如果不需要套轴,就只做拔轴
|
||||
makePullShaft(empty);
|
||||
@@ -102,10 +106,10 @@ public class AutoCallAirShaftTask {
|
||||
PdmBiSlittingproductionplan needPlan = needPlans.get(0);
|
||||
String qzzSize = needPlan.getQzz_size();
|
||||
// 从套轴对接位获取相同气涨轴大小
|
||||
List<BstIvtCutpointivt> qzzPoint = bcutpointivtService.getPointByTypeAndShaftSize("1", qzzSize, specification);
|
||||
List<BstIvtCutpointivt> qzzPoint = bcutpointivtService.getPointByTypeAndShaftSize("1", qzzSize, area);
|
||||
if (qzzPoint.size() == 0) {
|
||||
// 调用ACS滚条气涨轴下来
|
||||
toAcsOutShaft(qzzSize);
|
||||
toAcsOutShaft(qzzSize, specification, location);
|
||||
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
||||
saveCutPlanMessage(empty, needPlans, qzzSize);
|
||||
return;
|
||||
@@ -115,7 +119,7 @@ public class AutoCallAirShaftTask {
|
||||
if (ObjectUtil.isEmpty(startPoint)) {
|
||||
// 如果不存在,则发起信号滚气涨轴
|
||||
// 调用ACS滚条气涨轴下来
|
||||
toAcsOutShaft(qzzSize);
|
||||
toAcsOutShaft(qzzSize, specification, location);
|
||||
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
||||
saveCutPlanMessage(empty, needPlans, qzzSize);
|
||||
return;
|
||||
@@ -152,9 +156,16 @@ public class AutoCallAirShaftTask {
|
||||
});
|
||||
}
|
||||
|
||||
private void toAcsOutShaft(String qzzSize) {
|
||||
/**
|
||||
* 获取对应的气胀轴库1
|
||||
* @param qzzSize 气涨轴尺寸
|
||||
* @param specification 标箔、锂电
|
||||
* @param location 位置:上半部分还是下半部分
|
||||
*/
|
||||
private void toAcsOutShaft(String qzzSize, String specification, String location) {
|
||||
// todo: 访问acs判断是否有无气涨轴
|
||||
List<BstIvtShafttubeivt> shafttubeivts = bstIvtShafttubeivtService.getByQzzSize(qzzSize);
|
||||
// 需要区分上下
|
||||
List<BstIvtShafttubeivt> shafttubeivts = bstIvtShafttubeivtService.getByQzzSize(qzzSize, specification, location);
|
||||
if (shafttubeivts.size() == 0) {
|
||||
throw new BadRequestException("气胀轴库找不到[" + qzzSize + "]规格的气涨轴");
|
||||
}
|
||||
@@ -214,29 +225,28 @@ public class AutoCallAirShaftTask {
|
||||
return;
|
||||
}
|
||||
BstIvtCutpointivt cutpointivt = notTaskPoints.get(0);
|
||||
String pointCode1 = ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1()) ? cutpointivt.getTruss_point_code1() : cutpointivt.getTruss_point_code2();
|
||||
String qzzNo = ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1()) ? cutpointivt.getQzz_no1() : cutpointivt.getQzz_no2();
|
||||
// 获取对应的分切计划
|
||||
List<PdmBiSlittingproductionplan> list = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||
.eq(PdmBiSlittingproductionplan::getQzzno, qzzNo)
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, "0"));
|
||||
if (list.size() == 0) {
|
||||
log.warn("气涨轴[{}]对应的分切计划不存在!", qzzNo);
|
||||
throw new BadRequestException("气涨轴[" + qzzNo + "]对应的分切计划不存在!");
|
||||
}
|
||||
PdmBiSlittingproductionplan plan = list.get(0);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1())
|
||||
? cutpointivt.getTruss_point_code1() : cutpointivt.getTruss_point_code2());
|
||||
param.put("point_code1", pointCode1);
|
||||
param.put("point_code2", empty.getPoint_code());
|
||||
param.put("vehicle_code", ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1())
|
||||
? cutpointivt.getQzz_no1() : cutpointivt.getQzz_no2());
|
||||
param.put("qzz_no", ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1())
|
||||
? cutpointivt.getQzz_no1() : cutpointivt.getQzz_no2());
|
||||
param.put("vehicle_code", qzzNo);
|
||||
param.put("qzz_no", qzzNo);
|
||||
// hint: 当前分切计划的气涨轴尺寸
|
||||
param.put("qzz_size", plan.getQzz_size());
|
||||
param.put("task_type", "6");
|
||||
param.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||
param.put("is_bushing", "0");
|
||||
trussCallAirShaftTask.createTask(param);
|
||||
}
|
||||
|
||||
public boolean checkHaveTask(BstIvtCutpointivt p) {
|
||||
List<String> pointCodes = Stream.of(p.getPoint_code(), p.getTruss_point_code1(), p.getTruss_point_code1()).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<SchBaseTask> lam = Wrappers.lambdaQuery();
|
||||
lam.lt(SchBaseTask::getTask_code, "07");
|
||||
lam.and(la -> la
|
||||
.in(SchBaseTask::getPoint_code1, pointCodes).or()
|
||||
.in(SchBaseTask::getPoint_code2, pointCodes));
|
||||
List<SchBaseTask> list = taskService.list(lam);
|
||||
return list.size() == 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ public class AutoSendAirShaftAgvTask {
|
||||
}
|
||||
// 如果两个气涨轴编码则表示一组满了
|
||||
// 查找分切对接没任务的空位
|
||||
// todo:枷锁
|
||||
List<BstIvtCutpointivt> emptyPoint = slitterMapper.getEmptyCutPointNotTask(deviceCut.getSort_seq());
|
||||
if (emptyPoint.size() == 0) {
|
||||
log.warn("找不到对应的位置!");
|
||||
|
||||
@@ -10,6 +10,6 @@ public interface SlitterConstant {
|
||||
/**
|
||||
* 任务区域:暂定Test
|
||||
*/
|
||||
String SLITTER_TASK_AREA = "Test";
|
||||
String SLITTER_TASK_AREA = "B2";
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class SlitterController {
|
||||
@PostMapping("/test2")
|
||||
@Log("1111")
|
||||
public ResponseEntity<Object> create2(@RequestBody JSONObject entity){
|
||||
return new ResponseEntity<>(slitterService.acsFinishLoadShaft(entity), HttpStatus.CREATED);
|
||||
return new ResponseEntity<>(slitterService.acsFinishLoadShaft(entity), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/test3")
|
||||
@Log("1111")
|
||||
|
||||
@@ -187,11 +187,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
.in(PdmBiSlittingproductionplan::getContainer_name, collect)
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, "0"));
|
||||
if (plans.size() == 0) {
|
||||
throw new BadRequestException("找不到对应的分切计划!");
|
||||
throw new BadRequestException("找不到[" + collect + "]对应的分切计划!");
|
||||
}
|
||||
// 当前套轴的分切计划
|
||||
PdmBiSlittingproductionplan demoPlan = plans.get(0);
|
||||
String area = demoPlan.getResource_name().substring(0, 2);
|
||||
// 查找是否有同组的气胀轴位置
|
||||
BstIvtCutpointivt cutPoint = slitterMapper.getSameGroupPoint(demoPlan);
|
||||
if (ObjectUtil.isEmpty(cutPoint)) {
|
||||
@@ -204,31 +203,44 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isEmpty(cutPoint)) {
|
||||
// 获取一个空位 todo: 枷锁
|
||||
// 获取一个空位
|
||||
List<BstIvtCutpointivt> emptyNotTaskPoint = bcutpointivtService.getAreaNotTaskPointByStatus("1", "1", "1");
|
||||
if (emptyNotTaskPoint.size() == 0) {
|
||||
throw new BadRequestException("找不到可用套轴对接位!");
|
||||
}
|
||||
cutPoint = emptyNotTaskPoint.get(0);
|
||||
}
|
||||
// 分切计划设置套轴完成
|
||||
String qzzNo = IdUtil.getSnowflake(1,1).nextIdStr();
|
||||
plans.forEach(plan -> {
|
||||
plan.setIs_child_tz_ok("1");
|
||||
plan.setQzzno(qzzNo);
|
||||
TaskUtils.updateOptMessageBySlitterPlan(plan);
|
||||
});
|
||||
slittingproductionplanService.updateBatchById(plans);
|
||||
// 创建任务
|
||||
JSONObject taskParam = new JSONObject();
|
||||
taskParam.put("point_code1", startPoint.getPoint_code());
|
||||
taskParam.put("point_code2", "1".equals(demoPlan.getUp_or_down())
|
||||
? cutPoint.getTruss_point_code1() : cutPoint.getTruss_point_code2());
|
||||
taskParam.put("vehicle_code1", "1".equals(demoPlan.getUp_or_down()) ? qzzNo : "");
|
||||
taskParam.put("vehicle_code2", "2".equals(demoPlan.getUp_or_down()) ? qzzNo : "");
|
||||
taskParam.put("task_type", "6");
|
||||
taskParam.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||
trussSendAirShaftTask.createTask(taskParam);
|
||||
// 枷锁
|
||||
RLock lockPoint = redissonClient.getLock(cutPoint.getPoint_code());
|
||||
boolean tryLockPoint = lockPoint.tryLock(0, TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLockPoint) {
|
||||
// 分切计划设置套轴完成
|
||||
String qzzNo = IdUtil.getSnowflake(1,1).nextIdStr();
|
||||
plans.forEach(plan -> {
|
||||
plan.setIs_child_tz_ok("1");
|
||||
plan.setQzzno(qzzNo);
|
||||
TaskUtils.updateOptMessageBySlitterPlan(plan);
|
||||
});
|
||||
slittingproductionplanService.updateBatchById(plans);
|
||||
// 创建任务
|
||||
JSONObject taskParam = new JSONObject();
|
||||
taskParam.put("point_code1", startPoint.getPoint_code());
|
||||
taskParam.put("point_code2", "1".equals(demoPlan.getUp_or_down())
|
||||
? cutPoint.getTruss_point_code1() : cutPoint.getTruss_point_code2());
|
||||
taskParam.put("vehicle_code1", "1".equals(demoPlan.getUp_or_down()) ? qzzNo : "");
|
||||
taskParam.put("vehicle_code2", "2".equals(demoPlan.getUp_or_down()) ? qzzNo : "");
|
||||
taskParam.put("task_type", "6");
|
||||
taskParam.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||
trussSendAirShaftTask.createTask(taskParam);
|
||||
} else {
|
||||
throw new BadRequestException("系统繁忙,稍后在试");
|
||||
}
|
||||
} finally {
|
||||
if (tryLockPoint) {
|
||||
lockPoint.unlock();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("系统繁忙,稍后在试");
|
||||
}
|
||||
@@ -280,16 +292,17 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
// 任务参数
|
||||
JSONObject taskParam = new JSONObject();
|
||||
if (timePlans.size() == 0) {
|
||||
// 如果没有下一组分切计划,就只做下卷任务(判断下单/下双)
|
||||
// 如果没有下一组的分切计划,就只做下卷任务(判断下单/下双)
|
||||
// 获取分切对接位没任务的空位置
|
||||
List<BstIvtCutpointivt> emptyPoints = slitterMapper.getEmptyCutPointNotTask(device.getSort_seq());
|
||||
if (emptyPoints.size() == 0) {
|
||||
throw new BadRequestException("分切机【" + device.getExt_code() + "】找不到对应的对接位!");
|
||||
}
|
||||
// todo: 枷锁
|
||||
BstIvtCutpointivt emptyPoint = emptyPoints.get(0);
|
||||
// 创建任务
|
||||
if (currentUpPlan != null && currentDownPlan != null) {
|
||||
// 双轴任务 下双
|
||||
// 双轴任务 下双
|
||||
taskParam.put("point_code1", device.getUp_point_code());
|
||||
taskParam.put("point_code2", emptyPoint.getTruss_point_code2());
|
||||
taskParam.put("point_code3", device.getDown_point_code());
|
||||
@@ -297,7 +310,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
taskParam.put("truss_type", "1");
|
||||
taskParam.put("empty_site", "0");
|
||||
} else {
|
||||
// 单轴任务 下单
|
||||
// 单轴任务 下单
|
||||
taskParam.put("point_code1", currentUpPlan == null
|
||||
? device.getDown_point_code() : device.getUp_point_code());
|
||||
taskParam.put("point_code2", currentUpPlan == null
|
||||
@@ -336,7 +349,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
BstIvtCutpointivt newCutPoint = bcutpointivtService.getOne(newCutLam, false);
|
||||
if (ObjectUtil.isEmpty(newCutPoint)) {
|
||||
throw new BadRequestException("分切机【" + device.getExt_code() + "】的下一组分切计划未配送完毕!");
|
||||
throw new BadRequestException("分切机【" + device.getExt_code() + "】的下一组分切计划未配送完毕!😊");
|
||||
}
|
||||
String binaryExpress = TaskUtils.binaryConvertExpress(currentUpPlan, currentDownPlan, nextUpPlan, nextDownPlan);
|
||||
switch (binaryExpress) {
|
||||
@@ -391,12 +404,12 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
plan.setStatus("06");
|
||||
TaskUtils.updateOptMessageBySlitterPlan(plan);
|
||||
});
|
||||
// slittingproductionplanService.updateBatchById(currentPlans);
|
||||
// 上去的分切计划修改状态:03 -> 04
|
||||
nextPlans.forEach(plan -> {
|
||||
plan.setStatus("04");
|
||||
TaskUtils.updateOptMessageBySlitterPlan(plan);
|
||||
});
|
||||
// hint: 为了减少IO次数,将两个数组放在一起批量插入
|
||||
List<PdmBiSlittingproductionplan> mergedList = new ArrayList<>();
|
||||
mergedList.addAll(currentPlans);
|
||||
mergedList.addAll(nextPlans);
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
max( sys_user.username ) AS username,
|
||||
max( sys_roles_menus.menu_id ) AS menu_id,
|
||||
max( sys_menu.component ) AS component,
|
||||
max( sys_menu.title ) AS title,
|
||||
max( sys_menu.path ) AS path,
|
||||
max( sys_menu.component_name ) AS component_name
|
||||
FROM
|
||||
@@ -123,6 +124,7 @@
|
||||
sys_menu.title,
|
||||
sys_menu.component,
|
||||
sys_menu.path,
|
||||
sys_menu.title,
|
||||
sys_menu.component_name,
|
||||
sys_menu.menu_sort
|
||||
ORDER BY sys_menu.menu_sort
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')"/>
|
||||
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')"/>
|
||||
<el-table-column prop="qzz_size" label="气涨轴尺寸" :min-width="flexWidth('qzz_size',crud.data,'气涨轴尺寸')"/>
|
||||
<el-table-column prop="qzz_generation" label="气涨轴代数" :min-width="flexWidth('qzz_generation',crud.data,'气涨轴代数')"/>
|
||||
<el-table-column prop="qzz_generation" label="标箔/锂电" :min-width="flexWidth('qzz_generation',crud.data,'气涨轴代数')"/>
|
||||
<el-table-column prop="tube_code1" label="纸管1编码" :min-width="flexWidth('tube_code1',crud.data,'纸管1编码')"/>
|
||||
<el-table-column prop="tube_name1" label="纸管1描述" :min-width="flexWidth('tube_name1',crud.data,'纸管1描述')"/>
|
||||
<el-table-column prop="tube_code2" label="纸管2编码" :min-width="flexWidth('tube_code2',crud.data,'纸管2编码')"/>
|
||||
|
||||
Reference in New Issue
Block a user