fix 压制满料修改

This commit is contained in:
周俊杰
2024-07-02 16:30:21 +08:00
parent b6d6141765
commit 5b9f798490
2 changed files with 4 additions and 8 deletions

View File

@@ -310,7 +310,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
if (ObjectUtil.isEmpty(basePoint)) {
throw new BadRequestException("点位错误!");
}
// 组织参数
param.put("config_code", configCode);
taskService.apply(param);
@@ -340,7 +339,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String configCode = basePoint.getRegion_code() + "MLTask";
RLock lock = redissonClient.getLock(configCode);
// 无业务0
int handling = 0;
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
try {
if (tryLock) {
@@ -349,20 +347,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
}
// 组织参数
param.put("config_code", configCode);
handling = specialHandling(basePoint.getRegion_code(), param);
param.put("special_param", handling);
taskService.apply(param);
}
}catch(Exception e){
log.info("入库业务出现错误{}",e.getMessage());
return ApplyTaskResponse.responseError(requestNo,e.getMessage());
}
finally {
if (tryLock) {
lock.unlock();
}
}
return ApplyTaskResponse.responseOk(requestNo, "任务创建成功", handling);
return ApplyTaskResponse.responseOk(requestNo);
}
/**

View File

@@ -158,6 +158,9 @@ public class YZMLTask extends AbstractTask {
? workorderService.getOne(new LambdaQueryWrapper<PdmBdWorkorder>()
.eq(PdmBdWorkorder::getWorkorder_code, workorderCode))
: null;
if (one == null) {
throw new BadRequestException("压制机的工单不能为空!");
}
// 判断是否加急,加急则去加急线,不加急就是去缓存输送线
assert one != null;
if (one.getIs_urgent()) {