Browse Source

add 液压机优先级提升,任务组盘id。

master
张江玮 2 years ago
parent
commit
a612d56b1f
  1. 12
      lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  2. 5
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DeviceServiceImpl.java
  3. 3
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/GTKCallEmptyTask.java
  4. 3
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/HLCallEmptyTask.java
  5. 9
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java
  6. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/FJCallMaterialTask.java
  7. 5
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java
  8. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/wql/CALL_MATERIAL_TASK.wql
  9. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/empty/FJSendEmptyTask.java
  10. 3
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/HLSendMaterialTask.java
  11. 3
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/SZSendMaterialTask.java
  12. 8
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/YZSendMaterialTask.java
  13. 5
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/util/TaskUtils.java

12
lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -242,6 +242,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
case YZ: case YZ:
method_param.put("workorder", param.getJSONObject("workorder")); method_param.put("workorder", param.getJSONObject("workorder"));
method_param.put("vd", param.getJSONObject("vd")); method_param.put("vd", param.getJSONObject("vd"));
JSONObject device = WQLObject
.getWQLObject("pdm_bi_device")
.query("device_code = '" + point.getString("device_code") + "'")
.uniqueResult(0);
method_param.put("device", device);
task_code = yzSendMaterialTask.createTask(method_param); task_code = yzSendMaterialTask.createTask(method_param);
break; break;
case SZ: case SZ:
@ -305,6 +310,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
.query("is_delete = '0' AND device_code = '" + device_code + "' AND order_status = '3'") .query("is_delete = '0' AND device_code = '" + device_code + "' AND order_status = '3'")
.uniqueResult(0); .uniqueResult(0);
method_param.put("workorder", work_order); method_param.put("workorder", work_order);
JSONObject device = WQLObject
.getWQLObject("pdm_bi_device")
.query("device_code = '" + device_code + "'")
.uniqueResult(0);
method_param.put("device", device);
task_code = yzCallEmptyTask.createTask(method_param); task_code = yzCallEmptyTask.createTask(method_param);
break; break;
case GTK: case GTK:
@ -772,7 +782,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String vehicle_code = point.getString("vehicle_code"); String vehicle_code = point.getString("vehicle_code");
JSONObject data = null; JSONObject data = null;
if (!"0000".equals(vehicle_code)) { if (StrUtil.isNotBlank(vehicle_code) && !"0000".equals(vehicle_code)) {
data = WQL data = WQL
.getWO("ACS_TO_WMS") .getWO("ACS_TO_WMS")
.addParam("flag", "1") .addParam("flag", "1")

5
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DeviceServiceImpl.java

@ -18,6 +18,7 @@ import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.wql.WQL; import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil; import org.nl.modules.wql.util.WqlUtil;
import org.nl.wms.basedata.eum.TrueOrFalse;
import org.nl.wms.pdm.service.DeviceService; import org.nl.wms.pdm.service.DeviceService;
import org.nl.wms.pdm.service.dto.DeviceDto; import org.nl.wms.pdm.service.dto.DeviceDto;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
@ -120,8 +121,10 @@ public class DeviceServiceImpl implements DeviceService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) { public void deleteAll(Long[] ids) {
JSONObject device_update = new JSONObject();
device_update.put("is_delete", TrueOrFalse.TRUE.value());
String s = CommonUtils.idsArrayToInStr(ids); String s = CommonUtils.idsArrayToInStr(ids);
WQLObject.getWQLObject("pdm_bi_device").delete("device_id IN " + s); WQLObject.getWQLObject("pdm_bi_device").update(device_update, "device_id IN " + s);
} }
@Override @Override

3
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/GTKCallEmptyTask.java

@ -44,9 +44,10 @@ public class GTKCallEmptyTask extends AbstractAcsTask {
null, null,
point.getString("point_code"), point.getString("point_code"),
null, null,
null,
VehicleType.STEEL_TRAY.value(), VehicleType.STEEL_TRAY.value(),
null, null,
"1", 1,
GTKCallEmptyTask.class.getName(), GTKCallEmptyTask.class.getName(),
form.getString("create_mode"), form.getString("create_mode"),
form.getString("request_param"), form.getString("request_param"),

3
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/HLCallEmptyTask.java

@ -53,9 +53,10 @@ public class HLCallEmptyTask extends AbstractAcsTask {
null, null,
point.getString("point_code"), point.getString("point_code"),
null, null,
null,
VehicleType.CUP.value(), VehicleType.CUP.value(),
null, null,
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? "99" : "1", TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1,
HLCallEmptyTask.class.getName(), HLCallEmptyTask.class.getName(),
form.getString("create_mode"), form.getString("create_mode"),
form.getString("request_param"), form.getString("request_param"),

9
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java

@ -40,9 +40,13 @@ public class YZCallEmptyTask extends AbstractAcsTask {
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
JSONObject work_order = form.getJSONObject("workorder"); JSONObject work_order = form.getJSONObject("workorder");
String priority = "1"; int priority = 1;
if (ObjectUtil.isNotEmpty(work_order)) { if (ObjectUtil.isNotEmpty(work_order)) {
priority = TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? "99" : "1"; priority = TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1;
}
JSONObject device = form.getJSONObject("device");
if (ObjectUtil.isNotEmpty(device) && "4".equals(device.getString("device_model"))) {
++priority;
} }
JSONObject task = TaskUtils.buildTask( JSONObject task = TaskUtils.buildTask(
@ -52,6 +56,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
null, null,
point.getString("point_code"), point.getString("point_code"),
null, null,
null,
VehicleType.STEEL_TRAY.value(), VehicleType.STEEL_TRAY.value(),
null, null,
priority, priority,

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/FJCallMaterialTask.java

@ -47,10 +47,11 @@ public class FJCallMaterialTask extends AbstractAcsTask {
TaskStatus.SURE_END.value(), TaskStatus.SURE_END.value(),
null, null,
point.getString("point_code"), point.getString("point_code"),
null,
workorder.getString("material_id"), workorder.getString("material_id"),
VehicleType.STEEL_TRAY.value(), VehicleType.STEEL_TRAY.value(),
null, null,
TrueOrFalse.trueOrFalse(workorder.getString("is_urgent")) ? "99" : "1", TrueOrFalse.trueOrFalse(workorder.getString("is_urgent")) ? 50 : 1,
FJCallMaterialTask.class.getName(), FJCallMaterialTask.class.getName(),
form.getString("create_mode"), form.getString("create_mode"),
form.getString("request_param"), form.getString("request_param"),
@ -90,6 +91,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
task.put("task_status", TaskStatus.START_AND_END.value()); task.put("task_status", TaskStatus.START_AND_END.value());
task.put("point_code1", point.getString("point_code")); task.put("point_code1", point.getString("point_code"));
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code"))); task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code")));
task.put("group_id", point.getString("vd_id"));
task.put("remark", ""); task.put("remark", "");
TaskUtils.addAutoUpdateColum(task); TaskUtils.addAutoUpdateColum(task);
task_table.update(task); task_table.update(task);

5
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java

@ -1,6 +1,5 @@
package org.nl.wms.sch.task.call.material; package org.nl.wms.sch.task.call.material;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -65,9 +64,10 @@ public class SZCallMaterialTask extends AbstractAcsTask {
null, null,
point.getString("point_code"), point.getString("point_code"),
null, null,
null,
VehicleType.STEEL_TRAY.value(), VehicleType.STEEL_TRAY.value(),
null, null,
"1", 1,
SZCallMaterialTask.class.getName(), SZCallMaterialTask.class.getName(),
form.getString("create_mode"), form.getString("create_mode"),
form.getString("request_param"), form.getString("request_param"),
@ -107,6 +107,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
task.put("point_code1", point.getString("point_code")); task.put("point_code1", point.getString("point_code"));
task.put("material_id", point.getString("material_id")); task.put("material_id", point.getString("material_id"));
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code"))); task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code")));
task.put("group_id", point.getString("vd_id"));
task.put("remark", ""); task.put("remark", "");
TaskUtils.addAutoUpdateColum(task); TaskUtils.addAutoUpdateColum(task);
task_table.update(task); task_table.update(task);

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/wql/CALL_MATERIAL_TASK.wql

@ -42,6 +42,7 @@
QUERY QUERY
SELECT SELECT
point.*, point.*,
vd.vd_id,
vd.material_id, vd.material_id,
workorder.is_urgent workorder.is_urgent
FROM FROM
@ -82,7 +83,8 @@
IF 输入.flag = "3" IF 输入.flag = "3"
QUERY QUERY
SELECT SELECT
point.* point.*,
vd.vd_id
FROM FROM
sch_base_point point sch_base_point point
JOIN st_ivt_vehicle_detail vd ON point.vehicle_type = vd.vehicle_type JOIN st_ivt_vehicle_detail vd ON point.vehicle_type = vd.vehicle_type

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/empty/FJSendEmptyTask.java

@ -11,7 +11,6 @@ import org.nl.wms.basedata.eum.VehicleType;
import org.nl.wms.sch.manage.*; import org.nl.wms.sch.manage.*;
import org.nl.wms.sch.task.util.TaskUtils; import org.nl.wms.sch.task.util.TaskUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
/** /**
* @author zhangjiangwei * @author zhangjiangwei
@ -48,9 +47,10 @@ public class FJSendEmptyTask extends AbstractAcsTask {
point.getString("point_code"), point.getString("point_code"),
null, null,
null, null,
null,
VehicleType.STEEL_TRAY.value(), VehicleType.STEEL_TRAY.value(),
vehicle_code, vehicle_code,
"1", 1,
FJSendEmptyTask.class.getName(), FJSendEmptyTask.class.getName(),
form.getString("create_mode"), form.getString("create_mode"),
form.getString("request_param"), form.getString("request_param"),

3
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/HLSendMaterialTask.java

@ -58,10 +58,11 @@ public class HLSendMaterialTask extends AbstractAcsTask {
TaskStatus.SURE_START.value(), TaskStatus.SURE_START.value(),
point.getString("point_code"), point.getString("point_code"),
null, null,
null,
work_order.getString("material_id"), work_order.getString("material_id"),
VehicleType.CUP.value(), VehicleType.CUP.value(),
vehicle_code, vehicle_code,
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? "99" : "1", TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1,
HLSendMaterialTask.class.getName(), HLSendMaterialTask.class.getName(),
form.getString("create_mode"), form.getString("create_mode"),
form.getString("request_param"), form.getString("request_param"),

3
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/SZSendMaterialTask.java

@ -45,10 +45,11 @@ public class SZSendMaterialTask extends AbstractAcsTask {
TaskStatus.SURE_START.value(), TaskStatus.SURE_START.value(),
point.getString("point_code"), point.getString("point_code"),
null, null,
vd.getString("vd_id"),
vd.getString("material_id"), vd.getString("material_id"),
vd.getString("vehicle_type"), vd.getString("vehicle_type"),
vd.getString("vehicle_code"), vd.getString("vehicle_code"),
"1", 1,
SZSendMaterialTask.class.getName(), SZSendMaterialTask.class.getName(),
form.getString("create_mode"), form.getString("create_mode"),
form.getString("request_param"), form.getString("request_param"),

8
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/YZSendMaterialTask.java

@ -39,6 +39,11 @@ public class YZSendMaterialTask extends AbstractAcsTask {
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
JSONObject work_order = form.getJSONObject("workorder"); JSONObject work_order = form.getJSONObject("workorder");
int priority = TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1;
JSONObject device = form.getJSONObject("device");
if (ObjectUtil.isNotEmpty(device) && "4".equals(device.getString("device_model"))) {
++priority;
}
JSONObject vd = form.getJSONObject("vd"); JSONObject vd = form.getJSONObject("vd");
JSONObject task = TaskUtils.buildTask( JSONObject task = TaskUtils.buildTask(
@ -47,10 +52,11 @@ public class YZSendMaterialTask extends AbstractAcsTask {
TaskStatus.SURE_START.value(), TaskStatus.SURE_START.value(),
point.getString("point_code"), point.getString("point_code"),
null, null,
vd.getString("vd_id"),
vd.getString("material_id"), vd.getString("material_id"),
vd.getString("vehicle_type"), vd.getString("vehicle_type"),
vd.getString("vehicle_code"), vd.getString("vehicle_code"),
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? "99" : "1", priority,
YZSendMaterialTask.class.getName(), YZSendMaterialTask.class.getName(),
form.getString("create_mode"), form.getString("create_mode"),
form.getString("request_param"), form.getString("request_param"),

5
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/util/TaskUtils.java

@ -53,10 +53,11 @@ public class TaskUtils {
String task_status, String task_status,
String point_code1, String point_code1,
String point_code2, String point_code2,
String group_id,
String material_id, String material_id,
String vehicle_type, String vehicle_type,
String vehicle_code, String vehicle_code,
String priority, int priority,
String handle_class, String handle_class,
String create_mode, String create_mode,
String request_param, String request_param,
@ -74,7 +75,7 @@ public class TaskUtils {
task.put("material_id", material_id); task.put("material_id", material_id);
task.put("vehicle_type", vehicle_type); task.put("vehicle_type", vehicle_type);
task.put("vehicle_code", vehicle_code); task.put("vehicle_code", vehicle_code);
task.put("priority", priority); task.put("priority", String.valueOf(priority));
task.put("handle_class", handle_class); task.put("handle_class", handle_class);
task.put("create_mode", create_mode); task.put("create_mode", create_mode);
task.put("request_param", request_param); task.put("request_param", request_param);

Loading…
Cancel
Save