rev 点位状态修改

This commit is contained in:
张江玮
2023-07-18 17:28:24 +08:00
parent 6f078b894b
commit 85adcb1b8f
13 changed files with 16 additions and 25 deletions

View File

@@ -458,7 +458,7 @@ public class PdaServiceImpl implements PdaService {
WQLObject point_table = WQLObject.getWQLObject("sch_base_point"); WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
point.put("vehicle_type", VehicleType.CUP.value()); point.put("vehicle_type", VehicleType.CUP.value());
point.put("vehicle_code", vehicle_code); point.put("vehicle_code", vehicle_code);
point.put("point_status", PointStatus.NOT_EMPTY.value()); point.put("point_status", PointStatus.EMPTY_VEHICLE.value());
TaskUtils.addCurrentUpdateColum(point); TaskUtils.addCurrentUpdateColum(point);
point_table.update(point); point_table.update(point);
JSONObject point_update = new JSONObject(); JSONObject point_update = new JSONObject();
@@ -568,7 +568,7 @@ public class PdaServiceImpl implements PdaService {
@Override @Override
public void vehicleBind(String point_code, String vehicle_type, String vehicle_code) { public void vehicleBind(String point_code, String vehicle_type, String vehicle_code) {
JSONObject point_update = new JSONObject(); JSONObject point_update = new JSONObject();
point_update.put("point_status", PointStatus.NOT_EMPTY.value()); point_update.put("point_status", PointStatus.EMPTY_VEHICLE.value());
point_update.put("vehicle_type", vehicle_type); point_update.put("vehicle_type", vehicle_type);
point_update.put("vehicle_code", vehicle_code); point_update.put("vehicle_code", vehicle_code);
TaskUtils.addCurrentUpdateColum(point_update); TaskUtils.addCurrentUpdateColum(point_update);

View File

@@ -1,6 +1,5 @@
package org.nl.wms.sch.manage; package org.nl.wms.sch.manage;
import lombok.Getter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
/** /**
@@ -12,8 +11,9 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
public enum PointStatus { public enum PointStatus {
EMPTY("无货", "0"), EMPTY("空位", "1"),
NOT_EMPTY("有货", "1"); EMPTY_VEHICLE("空载具", "2"),
HAS_GOODS("有货", "3");
private final String label; private final String label;

View File

@@ -9,7 +9,6 @@ import org.nl.modules.common.exception.BadRequestException;
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.wms.basedata.eum.TrueOrFalse; import org.nl.wms.basedata.eum.TrueOrFalse;
import org.nl.wms.ext.acs.service.WmsToAcsService;
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;
@@ -239,7 +238,7 @@ public class FJCallEmptyTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.EMPTY_VEHICLE.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -218,7 +218,7 @@ public class HLCallEmptyTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.EMPTY_VEHICLE.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -233,7 +233,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.EMPTY_VEHICLE.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -2,7 +2,6 @@ package org.nl.wms.sch.task.call.material;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.exception.BadRequestException;
@@ -205,7 +204,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.HAS_GOODS.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -227,7 +227,7 @@ public class YZCallMaterialTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.HAS_GOODS.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -9,7 +9,6 @@ import org.nl.modules.common.exception.BadRequestException;
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.wms.basedata.eum.TrueOrFalse; import org.nl.wms.basedata.eum.TrueOrFalse;
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;
@@ -221,7 +220,7 @@ public class YZSendEmptyTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.EMPTY_VEHICLE.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -9,8 +9,6 @@ import org.nl.modules.common.exception.BadRequestException;
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.wms.basedata.eum.TrueOrFalse; import org.nl.wms.basedata.eum.TrueOrFalse;
import org.nl.wms.common.PickType;
import org.nl.wms.ext.acs.service.WmsToAcsService;
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;
@@ -285,7 +283,7 @@ public class FJSendMaterialTask extends AbstractAcsTask {
if (TaskType.CALL_EMPTY.value().equals(task.getString("task_type"))) { if (TaskType.CALL_EMPTY.value().equals(task.getString("task_type"))) {
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.HAS_GOODS.value());
} }
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);

View File

@@ -9,7 +9,6 @@ import org.nl.modules.common.exception.BadRequestException;
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.wms.basedata.eum.TrueOrFalse; import org.nl.wms.basedata.eum.TrueOrFalse;
import org.nl.wms.common.PickType;
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;
@@ -247,7 +246,7 @@ public class HLSendMaterialTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.HAS_GOODS.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -212,7 +212,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.HAS_GOODS.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -9,7 +9,6 @@ import org.nl.modules.common.exception.BadRequestException;
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.wms.basedata.eum.TrueOrFalse; import org.nl.wms.basedata.eum.TrueOrFalse;
import org.nl.wms.common.PickType;
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;
@@ -219,7 +218,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
point2.put("task_code", ""); point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type")); point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code")); point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value()); point2.put("point_status", PointStatus.HAS_GOODS.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2); TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) { } else if (operation_type == OperationType.MANUAL) {

View File

@@ -8,9 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.common.utils.SecurityUtils; import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.system.util.CodeUtil; import org.nl.modules.system.util.CodeUtil;
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.wms.common.PickType;
import org.nl.wms.sch.manage.*; import org.nl.wms.sch.manage.*;
/** /**
@@ -22,7 +20,7 @@ import org.nl.wms.sch.manage.*;
public class TaskUtils { public class TaskUtils {
public static void isEmptyPoint(JSONObject point) { public static void isEmptyPoint(JSONObject point) {
if (PointStatus.NOT_EMPTY.value().equals(point.getString("point_status"))) { if (PointStatus.EMPTY_VEHICLE.value().equals(point.getString("point_status"))) {
throw new BadRequestException("[" + point.getString("point_code") + "] 上有货!"); throw new BadRequestException("[" + point.getString("point_code") + "] 上有货!");
} }
} }