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)));

View File

@@ -102,15 +102,15 @@ jwt:
# 必须使用最少88位的Base64对该令牌进行编码
base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
# 令牌过期时间 此处单位/毫秒 默认2小时可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
token-validity-in-seconds: 7200000
token-validity-in-seconds: 900000
# 在线用户key
online-key: online-token-
# 验证码
code-key: code-key-
# token 续期检查时间范围默认30分钟单位默认毫秒在token即将过期的一段时间内用户操作了则给用户的token续期
detect: 1800000
detect: 900000
# 续期时间范围,默认 1小时这里单位毫秒
renew: 3600000
renew: 900000
# IP 本地解析
ip: