opt: 事务范围缩小
This commit is contained in:
@@ -95,7 +95,6 @@ public class AutoCallAirShaftTask {
|
||||
* 套拔轴缓存位满了、没有分切计划,则触发自动创建套拔轴任务
|
||||
* update: 24/04/28 内包间只是区分气胀轴大小(即代数),不需要区分锂电/标箔
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void run() {
|
||||
log.info("自动呼叫套轴开始执行...");
|
||||
// 判断配置参数是否只做拔轴
|
||||
@@ -105,7 +104,11 @@ public class AutoCallAirShaftTask {
|
||||
// 1、获取空的插拔轴位(无任务)
|
||||
List<BstIvtShafttubeivt> emptyPoints = bstIvtShafttubeivtService.getAllShaftPointsByConditions("2",
|
||||
"0", "0");
|
||||
emptyPoints.forEach(empty -> {
|
||||
emptyPoints.forEach(empty -> doCallShaft(empty, isOnlyPulling, tzDay, paramObj));
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void doCallShaft(BstIvtShafttubeivt empty, Param isOnlyPulling, Param tzDay, Param paramObj) {
|
||||
// 标箔:1,锂电:2 改:大小:4代5代
|
||||
String specification = empty.getQzz_generation();
|
||||
String location = empty.getPoint_location();
|
||||
@@ -261,7 +264,6 @@ public class AutoCallAirShaftTask {
|
||||
TaskUtils.updateOptMessageBySlitterPlan(p);
|
||||
});
|
||||
slittingproductionplanService.updateBatchById(needPlans);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -409,8 +409,6 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
if (shafttubeivts.size() == 0) {
|
||||
throw new BadRequestException("未找到可存放气涨轴规格「" + qzzSize + "」的空暂存位");
|
||||
}
|
||||
// todo: 过滤空位后面是否有轴的位置
|
||||
|
||||
BstIvtShafttubeivt shafttubeivt = shafttubeivts.get(0);
|
||||
RLock lockPoint = redissonClient.getLock(shafttubeivt.getPoint_code());
|
||||
boolean tryLockPoint = lockPoint.tryLock(0, TimeUnit.SECONDS);
|
||||
@@ -1975,6 +1973,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
plan.setIs_parent_ok("0");
|
||||
plan.setIs_child_tz_ok("0");
|
||||
plan.setIs_child_ps_ok("0");
|
||||
plan.setPaper_weight("0");
|
||||
plan.setQzzno("");
|
||||
plan.setIs_delete("0");
|
||||
plan.setSale_order_name("-");
|
||||
|
||||
Reference in New Issue
Block a user