This commit is contained in:
zds
2022-11-03 09:49:33 +08:00
parent 1653f4ce31
commit 34b24798e4
3 changed files with 30 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
if (StrUtil.isNotEmpty(device_code)) {
map.put("device_code", "%" + device_code + "%");
}
JSONObject json = WQL.getWO("QPDM_WORKORDER01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "WorkOrder.planstart_time,mb.material_code,WorkOrder.pcsn");
JSONObject json = WQL.getWO("QPDM_WORKORDER01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "WorkOrder.planend_time,mb.material_code,WorkOrder.pcsn");
return json;
}
@Override

View File

@@ -1,8 +1,10 @@
package org.nl.wms.sch.manage;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.exception.BadRequestException;
import org.nl.wms.sch.AcsUtil;
import org.nl.wms.sch.tasks.AcsTaskDto;
import org.nl.wql.core.bean.WQLObject;
@@ -87,6 +89,18 @@ public abstract class AbstractAcsTask {
*/
public JSONObject notifyAcs(String taskdtl_id) {
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
WQLObject sch_base_point = WQLObject.getWQLObject("sch_base_point");
WQLObject wo_param = WQLObject.getWQLObject("sys_param");
String Priority1 = "1";
String Priority2 = "1";
JSONObject param = wo_param.query("is_active='1' and is_delete='0' and code='PW_RW_PRI'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(param)) {
Priority1 = param.getString("value");
}
JSONObject param2 = wo_param.query("is_active='1' and is_delete='0' and code='PT_RW_PRI'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(param2)) {
Priority2 = param2.getString("value");
}
JSONArray jsonArray = new JSONArray();
JSONArray arr = taskTab.query("taskdtl_id = '" + taskdtl_id + "'").getResultJSONArray(0);
for (int i = 0, j = arr.size(); i < j; i++) {
@@ -96,8 +110,18 @@ public abstract class AbstractAcsTask {
taskDto.setExt_task_uuid(json.getString("taskdtl_id"));
taskDto.setTask_code(json.getString("task_code"));
taskDto.setTask_type(json.getString("acs_task_type"));
taskDto.setStart_device_code(json.getString("start_point_code"));
taskDto.setNext_device_code(json.getString("next_point_code"));
String start_point_code = json.getString("start_point_code");
String next_point_code = json.getString("next_point_code");
taskDto.setStart_device_code(start_point_code);
taskDto.setNext_device_code(next_point_code);
JSONObject start_point = sch_base_point.query("point_code='"+start_point_code+"' and is_delete='0'").uniqueResult(0);
JSONObject next_point = sch_base_point.query("point_code='"+next_point_code+"' and is_delete='0'").uniqueResult(0);
if("26".equals(start_point.getString("area_type")) || "26".equals(next_point.getString("area_type"))){
taskDto.setPriority(Priority1);
}else{
taskDto.setPriority(Priority2);
}
taskDto.setVehicle_code(json.getString("vehicle_code"));
jsonArray.add(JSONObject.parseObject(JSON.toJSONString(taskDto)));