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. 15
      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:
method_param.put("workorder", param.getJSONObject("workorder"));
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);
break;
case SZ:
@ -305,6 +310,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
.query("is_delete = '0' AND device_code = '" + device_code + "' AND order_status = '3'")
.uniqueResult(0);
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);
break;
case GTK:
@ -772,7 +782,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String vehicle_code = point.getString("vehicle_code");
JSONObject data = null;
if (!"0000".equals(vehicle_code)) {
if (StrUtil.isNotBlank(vehicle_code) && !"0000".equals(vehicle_code)) {
data = WQL
.getWO("ACS_TO_WMS")
.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.core.bean.WQLObject;
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.dto.DeviceDto;
import org.springframework.data.domain.Pageable;
@ -120,8 +121,10 @@ public class DeviceServiceImpl implements DeviceService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
JSONObject device_update = new JSONObject();
device_update.put("is_delete", TrueOrFalse.TRUE.value());
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

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,
point.getString("point_code"),
null,
null,
VehicleType.STEEL_TRAY.value(),
null,
"1",
1,
GTKCallEmptyTask.class.getName(),
form.getString("create_mode"),
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,
point.getString("point_code"),
null,
null,
VehicleType.CUP.value(),
null,
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? "99" : "1",
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1,
HLCallEmptyTask.class.getName(),
form.getString("create_mode"),
form.getString("request_param"),

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

@ -35,14 +35,18 @@ public class YZCallEmptyTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.AUTO);
}
}
@Override
public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point");
JSONObject work_order = form.getJSONObject("workorder");
String priority = "1";
int priority = 1;
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(
@ -52,6 +56,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
null,
point.getString("point_code"),
null,
null,
VehicleType.STEEL_TRAY.value(),
null,
priority,
@ -120,7 +125,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL);
}
@Override
public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -166,7 +171,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());

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(),
null,
point.getString("point_code"),
null,
workorder.getString("material_id"),
VehicleType.STEEL_TRAY.value(),
null,
TrueOrFalse.trueOrFalse(workorder.getString("is_urgent")) ? "99" : "1",
TrueOrFalse.trueOrFalse(workorder.getString("is_urgent")) ? 50 : 1,
FJCallMaterialTask.class.getName(),
form.getString("create_mode"),
form.getString("request_param"),
@ -90,6 +91,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
task.put("task_status", TaskStatus.START_AND_END.value());
task.put("point_code1", point.getString("point_code"));
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code")));
task.put("group_id", point.getString("vd_id"));
task.put("remark", "");
TaskUtils.addAutoUpdateColum(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;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@ -65,9 +64,10 @@ public class SZCallMaterialTask extends AbstractAcsTask {
null,
point.getString("point_code"),
null,
null,
VehicleType.STEEL_TRAY.value(),
null,
"1",
1,
SZCallMaterialTask.class.getName(),
form.getString("create_mode"),
form.getString("request_param"),
@ -107,6 +107,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
task.put("point_code1", point.getString("point_code"));
task.put("material_id", point.getString("material_id"));
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code")));
task.put("group_id", point.getString("vd_id"));
task.put("remark", "");
TaskUtils.addAutoUpdateColum(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
SELECT
point.*,
vd.vd_id,
vd.material_id,
workorder.is_urgent
FROM
@ -82,7 +83,8 @@
IF 输入.flag = "3"
QUERY
SELECT
point.*
point.*,
vd.vd_id
FROM
sch_base_point point
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.task.util.TaskUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
/**
* @author zhangjiangwei
@ -48,9 +47,10 @@ public class FJSendEmptyTask extends AbstractAcsTask {
point.getString("point_code"),
null,
null,
null,
VehicleType.STEEL_TRAY.value(),
vehicle_code,
"1",
1,
FJSendEmptyTask.class.getName(),
form.getString("create_mode"),
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(),
point.getString("point_code"),
null,
null,
work_order.getString("material_id"),
VehicleType.CUP.value(),
vehicle_code,
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? "99" : "1",
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1,
HLSendMaterialTask.class.getName(),
form.getString("create_mode"),
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(),
point.getString("point_code"),
null,
vd.getString("vd_id"),
vd.getString("material_id"),
vd.getString("vehicle_type"),
vd.getString("vehicle_code"),
"1",
1,
SZSendMaterialTask.class.getName(),
form.getString("create_mode"),
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) {
JSONObject point = form.getJSONObject("point");
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 task = TaskUtils.buildTask(
@ -47,10 +52,11 @@ public class YZSendMaterialTask extends AbstractAcsTask {
TaskStatus.SURE_START.value(),
point.getString("point_code"),
null,
vd.getString("vd_id"),
vd.getString("material_id"),
vd.getString("vehicle_type"),
vd.getString("vehicle_code"),
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? "99" : "1",
priority,
YZSendMaterialTask.class.getName(),
form.getString("create_mode"),
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 point_code1,
String point_code2,
String group_id,
String material_id,
String vehicle_type,
String vehicle_code,
String priority,
int priority,
String handle_class,
String create_mode,
String request_param,
@ -74,7 +75,7 @@ public class TaskUtils {
task.put("material_id", material_id);
task.put("vehicle_type", vehicle_type);
task.put("vehicle_code", vehicle_code);
task.put("priority", priority);
task.put("priority", String.valueOf(priority));
task.put("handle_class", handle_class);
task.put("create_mode", create_mode);
task.put("request_param", request_param);

Loading…
Cancel
Save