fix:修改同时生成任务问题
This commit is contained in:
@@ -186,11 +186,12 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
// 找到当前的设备
|
||||
String deviceCode = param.getString("device_code");
|
||||
String requestNo = param.getString("requestNo");
|
||||
RLock lock = redissonClient.getLock(deviceCode);
|
||||
SchBasePoint basePoint = pointService.getById(deviceCode);
|
||||
String configCode = basePoint.getRegion_code() + "QLTask";
|
||||
RLock lock = redissonClient.getLock(configCode);
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLock) {
|
||||
SchBasePoint basePoint = pointService.getById(deviceCode);
|
||||
if (ObjectUtil.isEmpty(basePoint)) {
|
||||
throw new BadRequestException("点位错误!");
|
||||
}
|
||||
@@ -231,7 +232,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
String configCode = basePoint.getRegion_code() + "QLTask";
|
||||
// 组织参数
|
||||
param.put("config_code", configCode);
|
||||
taskService.apply(param);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class FJQLTask extends AbstractTask {
|
||||
@Autowired
|
||||
private IPdmBdProductionProcessTrackingService processTrackingService;
|
||||
@Override
|
||||
protected synchronized void create() throws BadRequestException {
|
||||
protected void create() throws BadRequestException {
|
||||
// 获取任务
|
||||
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
||||
// 配置信息
|
||||
|
||||
Reference in New Issue
Block a user