|
@ -17,6 +17,7 @@ import org.nl.wms.sch.SchTaskDto; |
|
|
import org.nl.wms.sch.manage.*; |
|
|
import org.nl.wms.sch.manage.*; |
|
|
import org.nl.wms.sch.tasks.AcsTaskDto; |
|
|
import org.nl.wms.sch.tasks.AcsTaskDto; |
|
|
import org.nl.wms.util.IdUtil; |
|
|
import org.nl.wms.util.IdUtil; |
|
|
|
|
|
import org.nl.wms.util.MapOf; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
@ -239,8 +240,26 @@ public class YzjSendMaterialTask extends AbstractAcsTask { |
|
|
for (int i = 0; i < taskArr.size(); i++) { |
|
|
for (int i = 0; i < taskArr.size(); i++) { |
|
|
JSONObject taskObj = taskArr.getJSONObject(i); |
|
|
JSONObject taskObj = taskArr.getJSONObject(i); |
|
|
String vehicle_type = taskObj.getString("vehicle_type"); |
|
|
String vehicle_type = taskObj.getString("vehicle_type"); |
|
|
|
|
|
// 优先判断窑口是否空位
|
|
|
|
|
|
JSONObject rywPoint = WQL.getWO("QSCH_yzSendMaterial_01").addParamMap(MapOf.of("flag", "1", |
|
|
|
|
|
"point_code", "RYW")).process().uniqueResult(0); |
|
|
|
|
|
if (ObjectUtil.isNotEmpty(rywPoint)) { |
|
|
|
|
|
// 找到去入窑口
|
|
|
|
|
|
taskObj.put("update_time", DateUtil.now()); |
|
|
|
|
|
taskObj.put("remark", ""); |
|
|
|
|
|
taskObj.put("point_code2", rywPoint.getString("point_code")); |
|
|
|
|
|
taskObj.put("task_status", TaskStatusEnum.START_AND_POINT.getCode()); |
|
|
|
|
|
taskTab.update(taskObj); |
|
|
|
|
|
|
|
|
|
|
|
//锁住终点
|
|
|
|
|
|
rywPoint.put("task_id", taskObj.getString("task_id")); |
|
|
|
|
|
rywPoint.put("lock_type", PointEnum.LOCK_TYPE_TRUE.getCode()); |
|
|
|
|
|
pointTab.update(rywPoint); |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
// 否则就去货架查找
|
|
|
JSONObject param1 = new JSONObject(); |
|
|
JSONObject param1 = new JSONObject(); |
|
|
param1.put("flag", "1"); |
|
|
param1.put("flag", "2"); |
|
|
param1.put("region_code", "RYZCQ"); |
|
|
param1.put("region_code", "RYZCQ"); |
|
|
param1.put("vehicle_type", "%" + vehicle_type + "%"); |
|
|
param1.put("vehicle_type", "%" + vehicle_type + "%"); |
|
|
//1、查找入窑暂存货架的空位
|
|
|
//1、查找入窑暂存货架的空位
|
|
|