fix:入目申请
This commit is contained in:
@@ -20,6 +20,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -32,7 +33,7 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AutoSendVehicleToDjq {
|
||||
public class AutoSendVehicleToDjq extends Prun{
|
||||
private final String THIS_CLASS = AutoSendVehicleToDjq.class.getName();
|
||||
@Resource
|
||||
private IschBaseTaskService taskService;
|
||||
@@ -50,7 +51,7 @@ public class AutoSendVehicleToDjq {
|
||||
private IbstIvtPackageinfoivtService packageinfoivtService;
|
||||
|
||||
//装箱区->待检区或管制区补空载具
|
||||
|
||||
@Autowired
|
||||
public void run() {
|
||||
this.sendVehicleToDjqOrGzq(IOSEnum.IS_NOTANDYES.code("否"),null);
|
||||
}
|
||||
|
||||
@@ -73,10 +73,11 @@ public class TaskQueue {
|
||||
for (String block : tasksToProcessPerQueue.keySet()) {
|
||||
List<String> empPointList = tasksToProcessPerQueue.get(block);
|
||||
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
|
||||
.lt("task_status", TaskStatusEnum.SURE_START.getCode())
|
||||
.le("task_status", TaskStatusEnum.SURE_START.getCode())
|
||||
.eq("vehicle_code2", block)
|
||||
.eq("task_type", PackageInfoIvtEnum.TASK_TYPE.code("待检区->装箱区"))
|
||||
.eq("is_delete", IOSEnum.IS_NOTANDYES.code("否")).orderByDesc("create_time", "task_step"));
|
||||
.eq("is_delete", IOSEnum.IS_NOTANDYES.code("否"))
|
||||
.orderByDesc("create_time", "task_step"));
|
||||
log.info("当前zxq有起点任务数量"+list.size());
|
||||
for (int i = 0; i < Math.min(empPointList.size(),list.size()); i++) {
|
||||
String empPoin = empPointList.get(i);
|
||||
|
||||
@@ -60,6 +60,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -586,7 +587,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(propagation=Propagation.REQUIRES_NEW)
|
||||
public void reIssueTask(Map whereJson) {
|
||||
|
||||
String task_id = MapUtil.getStr(whereJson, "task_id");
|
||||
@@ -733,7 +734,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
||||
.syscompanyid(SecurityUtils.getDeptId())
|
||||
.sysdeptid(SecurityUtils.getDeptId())
|
||||
.build();
|
||||
|
||||
|
||||
if (ObjectUtil.isNotEmpty(MapUtil.getStr(whereJson, "out_stor_id"))) {
|
||||
mstDao.setOut_stor_id(Long.parseLong(MapUtil.getStr(whereJson, "out_stor_id")));
|
||||
}
|
||||
@@ -741,7 +742,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
||||
mstDao.setSource_id(Long.parseLong(MapUtil.getStr(whereJson, "source_id")));
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
// 修改
|
||||
mstDao.setBiz_date(whereJson.get("biz_date").toString().substring(0, 10));
|
||||
mstDao.setStor_id(storattrDto.getStor_id());
|
||||
|
||||
@@ -2035,6 +2035,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONObject jsonObject = ComPareUtil.CompareWhight(whereJson);
|
||||
if (jsonObject.getBoolean("compaer_result")) {
|
||||
whereJson.put("bill_type", IOSEnum.IN_TYPE.code("生产入库"));
|
||||
//"material_barcode":"C1101,","device_code":"RK1018","weight":500.95,"vehicle_code":"B01401","type":"1"
|
||||
int count = taskService.count(new QueryWrapper<SchBaseTask>()
|
||||
.eq("point_code1", whereJson.getString("device_code"))
|
||||
.eq("task_type", "010703")
|
||||
.eq("vehicle_code2", whereJson.getString("vehicle_code"))
|
||||
.lt("task_status", TaskStatusEnum.EXECUTING.getCode()));
|
||||
if (count>0){
|
||||
log.info("acs申请入库任务以存在直接跳过"+whereJson.getString("vehicle_code"));
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "acs申请入库任务以存在直接跳过!");
|
||||
return result;
|
||||
}
|
||||
inBussManageService.inTask(whereJson);
|
||||
} else {
|
||||
JSONObject jsonTaskParam = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user