Browse Source

更新

master
18188916393 2 years ago
parent
commit
d39e2662ae
  1. 4
      wms/hd/nladmin-system/src/main/java/org/nl/wms/WorkProcedureEnum.java
  2. 7
      wms/hd/nladmin-system/src/main/java/org/nl/wms/common/PointUpdateUtil.java
  3. 46
      wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java
  4. 6
      wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql
  5. 62
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  6. 2
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java
  7. 4
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/wql/ACSTOMES_001.wql
  8. 20
      wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallEmptyVehicleTask.java
  9. 7
      wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/SendMaterialTask.java
  10. BIN
      wms/hd/nladmin-system/src/main/java/org/nl/wms/wms.xls

4
wms/hd/nladmin-system/src/main/java/org/nl/wms/WorkProcedureEnum.java

@ -12,8 +12,8 @@ public enum WorkProcedureEnum {
YZGX(2, "1514444247439380480", "02", "压制工序", ""), YZGX(2, "1514444247439380480", "02", "压制工序", ""),
SZGX(3, "1514444321896665088", "03", "烧制工序", ""), SZGX(3, "1514444321896665088", "03", "烧制工序", ""),
FJGX(4, "1514444386174373888", "04", "分拣工序", ""), FJGX(4, "1514444386174373888", "04", "分拣工序", ""),
DPGX(4, "1514444386174373888", "05", "叠盘工序", ""), DPGX(4, "1564863511488761856", "05", "叠盘工序", ""),
CPGX(4, "1514444386174373888", "06", "拆盘工序", ""); CPGX(4, "1565169481129529344", "06", "拆盘工序", "");
//顺序号 //顺序号
private int index; private int index;
//工序标识 //工序标识

7
wms/hd/nladmin-system/src/main/java/org/nl/wms/common/PointUpdateUtil.java

@ -22,9 +22,14 @@ public class PointUpdateUtil {
JSONObject pointjo = pointarr.getJSONObject(i); JSONObject pointjo = pointarr.getJSONObject(i);
String point_status = "0" + pointjo.getString("move"); String point_status = "0" + pointjo.getString("move");
String device_code = pointjo.getString("device_code"); String device_code = pointjo.getString("device_code");
pointjo.put("point_status", point_status); int container_type = pointjo.getIntValue("container_type");
String vehicle_type = "";
if (container_type != 0) {
vehicle_type = "0" + (container_type + 2);
}
JSONObject pointObj = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0); JSONObject pointObj = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0);
pointObj.put("point_status", point_status); pointObj.put("point_status", point_status);
pointObj.put("vehicle_type", vehicle_type);
pointTable.update(pointObj); pointTable.update(pointObj);
} }
} }

46
wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java

@ -72,33 +72,21 @@ public class StructFindUtil {
} }
public static JSONObject getEmptyVehicleInStruct(JSONObject jsonObject) { public static JSONObject getEmptyVehicleInStruct(JSONObject jsonObject) {
String vehice_type = "";
String area_type = jsonObject.getString("area_type"); String area_type = jsonObject.getString("area_type");
String vehicle_code = jsonObject.getString("vehicle_code"); String vehicle_code = jsonObject.getString("vehicle_code");
String point_code = jsonObject.getString("point_code"); String point_code = jsonObject.getString("point_code");
if (StrUtil.isEmpty(vehicle_code)) { if (StrUtil.equals(point_code, "KGTDTW01") || StrUtil.equals(point_code, "KGTDDW01")) {
throw new BadRequestException("托盘不能为空!"); JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTCPQ.getCode()).addParam("flag", "2").process().getResultJSONArray(0);
}
if (StrUtil.equals(point_code, "KGTDDW05")) {
JSONArray pointarr = WQL
.getWO("ACSTOMES_001")
.addParam("area_type", AreaEnum.KGTCPQ.getCode())
.addParam("flag", "2")
.process()
.getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr); PointUpdateUtil.updatePoint(pointarr);
} } else {
//根据托盘找托盘类型, //根据托盘找托盘类型,
JSONObject vehicleObj = WQLObject JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'").uniqueResult(0);
.getWQLObject("md_pb_vehicle")
.query("vehicle_code='" + vehicle_code + "'")
.uniqueResult(0);
if (ObjectUtil.isEmpty(vehicleObj)) { if (ObjectUtil.isEmpty(vehicleObj)) {
throw new BadRequestException("未找到托盘号为'" + vehicle_code + "' 托盘信息!"); throw new BadRequestException("未找到托盘号为'" + vehicle_code + "' 托盘信息!");
} }
if (StrUtil.isEmpty(area_type)) { vehice_type = vehicleObj.getString("vehicle_type");
throw new BadRequestException("区域不能为空!");
} }
String vehice_type = vehicleObj.getString("vehicle_type");
JSONObject result = WQL JSONObject result = WQL
.getWO("QSTRUCT_RULE") .getWO("QSTRUCT_RULE")
.addParam("flag", "4") .addParam("flag", "4")
@ -114,22 +102,28 @@ public class StructFindUtil {
String area_type = jsonObject.getString("area_type"); String area_type = jsonObject.getString("area_type");
String vehicle_type = jsonObject.getString("vehicle_type"); String vehicle_type = jsonObject.getString("vehicle_type");
String point_code = jsonObject.getString("point_code"); String point_code = jsonObject.getString("point_code");
//用于判断木托盘区域的托盘类型
String point_vehicle_type = jsonObject.getString("point_vehicle_type");
//如果是堆叠位5 需要更新 设备状态 //如果是堆叠位5 需要更新 设备状态
if(StrUtil.equals(point_code,"KGTDDW05")){ if (StrUtil.equals(point_code, "KGTDDW05")) {
JSONArray pointarr = WQL JSONArray pointarr = WQL.getWO("ACSTOMES_001")
.getWO("ACSTOMES_001")
.addParam("area_type", AreaEnum.KGTCPQ.getCode()) .addParam("area_type", AreaEnum.KGTCPQ.getCode())
.addParam("flag", "2") .addParam("flag", "2")
.process() .process()
.getResultJSONArray(0); .getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr); PointUpdateUtil.updatePoint(pointarr);
} }
//如果是分拣区域 需要更新覆膜机点位的状态
if (StrUtil.equals(area_type, AreaEnum.ZDCDX.getCode())) {
JSONArray pointarr = WQL.getWO("ACSTOMES_001")
.addParam("area_type", AreaEnum.RGCPQ.getCode())
.addParam("flag", "2").process().getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr);
}
if (StrUtil.isEmpty(area_type)) { if (StrUtil.isEmpty(area_type)) {
throw new BadRequestException("区域不能为空!"); throw new BadRequestException("区域不能为空!");
} }
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
//如果是堆叠位5 需要更新 设备状态
if (StrUtil.equals(point_code, "KGTDDW05")) { if (StrUtil.equals(point_code, "KGTDDW05")) {
result = WQL result = WQL
.getWO("QSTRUCT_RULE") .getWO("QSTRUCT_RULE")
@ -146,10 +140,10 @@ public class StructFindUtil {
.addParam("area_type", area_type) .addParam("area_type", area_type)
.addParam("vehicle_type", vehicle_type) .addParam("vehicle_type", vehicle_type)
.addParam("point_code", point_code) .addParam("point_code", point_code)
.process() .addParam("point_vehicle_type", point_vehicle_type)
.uniqueResult(0); .process().uniqueResult(0);
}
}
return result; return result;
} }

6
wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql

@ -23,6 +23,7 @@
输入.is_full TYPEAS s_string 输入.is_full TYPEAS s_string
输入.vehicle_type TYPEAS s_string 输入.vehicle_type TYPEAS s_string
输入.point_code TYPEAS s_string 输入.point_code TYPEAS s_string
输入.point_vehicle_type TYPEAS s_string
[临时表] [临时表]
@ -155,7 +156,7 @@ IF 输入.flag = "4"
point.point_code as struct_code, point.point_code as struct_code,
point.point_name as struct_name point.point_name as struct_name
FROM FROM
sch_base_point point ON point.point_id = structattr.struct_id sch_base_point point
WHERE WHERE
point.lock_type = '00' point.lock_type = '00'
AND ( point.vehicle_code = '' OR point.vehicle_code IS NULL ) AND ( point.vehicle_code = '' OR point.vehicle_code IS NULL )
@ -197,6 +198,9 @@ IF 输入.flag = "5"
OPTION 输入.point_code <> "" OPTION 输入.point_code <> ""
point.point_code = 输入.point_code point.point_code = 输入.point_code
ENDOPTION ENDOPTION
OPTION 输入.point_vehicle_type <> ""
point.vehicle_type = 输入.point_vehicle_type
ENDOPTION
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF

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

@ -61,14 +61,26 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
case "1": case "1":
jsonObject.put("start_point_code", device_code); jsonObject.put("start_point_code", device_code);
jsonObject.put("create_mode", "01"); jsonObject.put("create_mode", "01");
if (!StrUtil.equals(device_code, "CYBZW")) {
produceInfoByCode = this.getProduceInfoByCode(device_code);
jsonObject.put("material_id", produceInfoByCode.getString("material_id"));
produceInfoByCode = this.getProduceInfoByCode(device_code); produceInfoByCode = this.getProduceInfoByCode(device_code);
//批次 物料,客户要从排产单里面去取 //批次 物料,客户要从排产单里面去取
jsonObject.put("pcsn", "pcsn");
jsonObject.put("create_mode", "01"); jsonObject.put("create_mode", "01");
jsonObject.put("material_id", produceInfoByCode.getString("material_id")); jsonObject.put("material_id", produceInfoByCode.getString("material_id"));
jsonObject.put("cust_id", produceInfoByCode.getString("cust_id")); jsonObject.put("cust_id", produceInfoByCode.getString("cust_id"));
jsonObject.put("stewing_time", produceInfoByCode.getString("stewing_time")); jsonObject.put("stewing_time", produceInfoByCode.getString("stewing_time"));
jsonObject.put("producetask_id", produceInfoByCode.getString("producetask_id")); jsonObject.put("producetask_id", produceInfoByCode.getString("producetask_id"));
} else {
String vehicle_code = (String) jsonObject.get("vehicle_code");
JSONObject groupObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "'", "create_time desc").uniqueResult(0);
jsonObject.put("create_mode", "01");
jsonObject.put("material_id", groupObj.getString("material_uuid"));
jsonObject.put("cust_id", groupObj.getString("cust_id"));
jsonObject.put("stewing_time", "0");
jsonObject.put("vehicle_code", vehicle_code);
jsonObject.put("producetask_id", groupObj.getString("producetask_id"));
}
sendMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject)); sendMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
break; break;
case "2": case "2":
@ -78,7 +90,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
//批次 物料,客户要从排产单里面去取 //批次 物料,客户要从排产单里面去取
jsonObject.put("pcsn", "pcsn"); jsonObject.put("pcsn", "pcsn");
if (!StrUtil.equals(device_code,"RYW")){ if (!StrUtil.equals(device_code, "CYBZW")) {
produceInfoByCode = this.getProduceInfoByCode(device_code); produceInfoByCode = this.getProduceInfoByCode(device_code);
jsonObject.put("material_id", produceInfoByCode.getString("material_id")); jsonObject.put("material_id", produceInfoByCode.getString("material_id"));
@ -114,10 +126,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
StrUtil.equals(device_code, "YZJ07XL02") || StrUtil.equals(device_code, "YZJ07XL02") ||
StrUtil.equals(device_code, "YZJ08XL01") || StrUtil.equals(device_code, "YZJ08XL01") ||
StrUtil.equals(device_code, "YZJ08XL02") || StrUtil.equals(device_code, "YZJ08XL02") ||
StrUtil.equals(device_code, "FJJXS01MD1") || StrUtil.equals(device_code, "FJMDJXSDJW01") ||
StrUtil.equals(device_code, "FJJXS01MD2") || StrUtil.equals(device_code, "FJMDJXSDJW02")
StrUtil.equals(device_code, "FJJXS02MD1") ||
StrUtil.equals(device_code, "FJJXS02MD2")
) { ) {
produceInfoByCode = this.getProduceInfoByCode(device_code); produceInfoByCode = this.getProduceInfoByCode(device_code);
String material_id = produceInfoByCode.getString("material_id"); String material_id = produceInfoByCode.getString("material_id");
@ -163,7 +173,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject produceInfoByCode = new JSONObject(); JSONObject produceInfoByCode = new JSONObject();
String device_code = (String) jsonObject.get("device_code"); String device_code = (String) jsonObject.get("device_code");
String vehicle_code = (String) jsonObject.get("vehicle_code"); String vehicle_code = (String) jsonObject.get("vehicle_code");
String qty = String.valueOf(jsonObject.get("qty")) ; String qty = String.valueOf(jsonObject.get("qty"));
produceInfoByCode = this.getProduceInfoByCode(device_code); produceInfoByCode = this.getProduceInfoByCode(device_code);
String material_id = (String) produceInfoByCode.get("material_id"); String material_id = (String) produceInfoByCode.get("material_id");
String cust_id = (String) produceInfoByCode.get("cust_id"); String cust_id = (String) produceInfoByCode.get("cust_id");
@ -257,8 +267,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
String producetask_id = vehicleObj.getString("producetask_id"); String producetask_id = vehicleObj.getString("producetask_id");
JSONObject taskObj = WQLObject.getWQLObject("PDM_MG_produceTask").query("producetask_id='" + producetask_id + "'").uniqueResult(0); JSONObject taskObj = WQLObject.getWQLObject("PDM_MG_produceTask").query("producetask_id='" + producetask_id + "'").uniqueResult(0);
//1代表去出窑,2 是优先包装
String is_package = "1";
if (StrUtil.equals(taskObj.getString("is_package"), "1")) {
is_package = "2";
}
JSONObject returnjo = new JSONObject(); JSONObject returnjo = new JSONObject();
returnjo.put("is_package", taskObj.getString("is_package")); returnjo.put("is_package", is_package);
return returnjo; return returnjo;
} }
@ -288,6 +303,21 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
vehicle_table.insert(json); vehicle_table.insert(json);
JSONObject returnjo = new JSONObject(); JSONObject returnjo = new JSONObject();
returnjo.put("vehicle_code", vehicle_code); returnjo.put("vehicle_code", vehicle_code);
returnjo.put("status", HttpStatus.OK.value());
//将起点终点确定不下发的任务查出来,将木托盘点位解锁,起点改为扫描点,is_auto_issue 改为1,
String device_code = (String) jsonObject.get("device_code");
WQLObject task_Table = WQLObject.getWQLObject("SCH_BASE_Task");
JSONObject taskObj = task_Table.query("task_status='04' and is_auto_issue='0'", "create_time desc").uniqueResult(0);
String start_point_code = taskObj.getString("start_point_code");
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
JSONObject startObj = pointTable.query("point_code ='" + start_point_code + "'").uniqueResult(0);
startObj.put("lock_type", "00");
pointTable.update(startObj);
taskObj.put("start_point_code", device_code);
taskObj.put("is_auto_issue", "1");
taskObj.put("vehicle_code", vehicle_code);
task_Table.update(taskObj);
//
return returnjo; return returnjo;
} }
@ -311,15 +341,21 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Map<String, Object> getVehicleInfoBycode(Map jsonObject) { public Map<String, Object> getVehicleInfoBycode(Map jsonObject) {
String vehicle_code = (String) jsonObject.get("vehicle_code"); String device_code = (String) jsonObject.get("device_code");
JSONObject pointObj = WQLObject.getWQLObject("sch_base_point").query("point_code='" + device_code + "'").uniqueResult(0);
String vehicle_code = pointObj.getString("vehicle_code");
if (StrUtil.isEmpty(vehicle_code)) { if (StrUtil.isEmpty(vehicle_code)) {
throw new BadRequestException("托盘编码不能为空!"); throw new BadRequestException("点位编码为'" + device_code + "'未找到托盘信息!");
} }
JSONObject vehicleObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "' AND is_delete='0'").uniqueResult(0); JSONObject vehicleObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "' AND is_delete='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicleObj)) { if (ObjectUtil.isEmpty(vehicleObj)) {
throw new BadRequestException("未找到托盘号为'" + vehicle_code + "'的托盘信息!"); throw new BadRequestException("未找到托盘号为'" + vehicle_code + "'的托盘信息!");
} }
return vehicleObj; JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value());
result.put("message", "反馈成功!");
result.put("data", vehicleObj);
return result;
} }
@Override @Override
@ -360,7 +396,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
if (StrUtil.equals("2", type)) { if (StrUtil.equals("2", type)) {
taskObj.put("producetask_status", "05"); taskObj.put("producetask_status", "05");
taskObj.put("real_qty",qty); taskObj.put("real_qty", qty);
} }
taskTable.update(taskObj); taskTable.update(taskObj);
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
@ -378,7 +414,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
for (int i = 0; i < array.size(); i++) { for (int i = 0; i < array.size(); i++) {
JSONObject row = array.getJSONObject(i); JSONObject row = array.getJSONObject(i);
String task_id = row.getString("ext_task_uuid"); String task_id = row.getString("ext_task_uuid");
row.put("task_id",task_id); row.put("task_id", task_id);
TaskDto taskDto = taskService.findById(task_id); TaskDto taskDto = taskService.findById(task_id);
String processing_class = taskDto.getHandle_class(); String processing_class = taskDto.getHandle_class();
//1:执行中,2:完成 ,3:acs取消 //1:执行中,2:完成 ,3:acs取消

2
wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java

@ -36,7 +36,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
@Override @Override
public Map action(JSONArray arr) { public Map action(JSONArray arr) {
String api = "api/wms/updateDeviceGoods"; String api = "api/wms/action";
return AcsUtil.notifyAcs(api, arr); return AcsUtil.notifyAcs(api, arr);
} }

4
wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/wql/ACSTOMES_001.wql

@ -18,6 +18,7 @@
输入.material_id TYPEAS s_string 输入.material_id TYPEAS s_string
输入.area_type TYPEAS s_string 输入.area_type TYPEAS s_string
输入.point_code TYPEAS s_string 输入.point_code TYPEAS s_string
输入.device_point_type TYPEAS s_string
[临时表] [临时表]
--这边列出来的临时表就会在运行期动态创建 --这边列出来的临时表就会在运行期动态创建
@ -79,6 +80,9 @@
ENDOPTION ENDOPTION
OPTION 输入.point_code <> "" OPTION 输入.point_code <> ""
point.point_code = 输入.point_code point.point_code = 输入.point_code
ENDOPTION
OPTION 输入.device_point_type <> ""
point.device_point_type = 输入.device_point_type
ENDOPTION ENDOPTION
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY

20
wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallEmptyVehicleTask.java

@ -11,7 +11,9 @@ import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils; import org.nl.utils.SecurityUtils;
import org.nl.utils.SpringContextHolder; import org.nl.utils.SpringContextHolder;
import org.nl.wms.WorkProcedureEnum; import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.common.PointUpdateUtil;
import org.nl.wms.common.StructFindUtil; import org.nl.wms.common.StructFindUtil;
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.AbstractAcsTask;
import org.nl.wms.sch.manage.AreaEnum; import org.nl.wms.sch.manage.AreaEnum;
import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.manage.TaskStatusEnum;
@ -230,6 +232,11 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
vehicle_type = WQLObject.getWQLObject("PDM_MG_produceTask").query("device_id='" + device_id + "' and producetask_status='04'").uniqueResult(0).getString("vehicle_type"); vehicle_type = WQLObject.getWQLObject("PDM_MG_produceTask").query("device_id='" + device_id + "' and producetask_status='04'").uniqueResult(0).getString("vehicle_type");
start_area = AreaEnum.RGCPQ.getCode(); start_area = AreaEnum.RGCPQ.getCode();
is_auto_issue = "0"; is_auto_issue = "0";
//更新设备点位。
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.RGCPQ.getCode())
.addParam("flag", "2").addParam("device_point_type","01")
.process().getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr);
break; break;
//叠盘工序 //叠盘工序
case DPGX: case DPGX:
@ -243,13 +250,23 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
start_area = AreaEnum.KLHJ.getCode(); start_area = AreaEnum.KLHJ.getCode();
} }
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("vehicle_type", vehicle_type); param.put("point_vehicle_type", vehicle_type);
param.put("area_type", start_area); param.put("area_type", start_area);
param.put("point_code", start_point_code); param.put("point_code", start_point_code);
JSONObject outStructObj = StructFindUtil.getEmptyVehicleOutStruct(param); JSONObject outStructObj = StructFindUtil.getEmptyVehicleOutStruct(param);
if (ObjectUtil.isEmpty(outStructObj)) { if (ObjectUtil.isEmpty(outStructObj)) {
throw new BadRequestException("未找到合适的空托盘点位"); throw new BadRequestException("未找到合适的空托盘点位");
} }
//如果是覆膜机区域,写给acs点位
if (StrUtil.equals(AreaEnum.RGCPQ.getCode(), start_area)) {
JSONArray arr = new JSONArray();
JSONObject jo = new JSONObject();
jo.put("device_code", outStructObj.getString("struct_code"));
jo.put("to_command", "1");
arr.add(jo);
WmsToAcsServiceImpl wmsToAcsService = new WmsToAcsServiceImpl();
wmsToAcsService.action(arr);
}
vehicle_code = outStructObj.getString("vehicle_code"); vehicle_code = outStructObj.getString("vehicle_code");
start_point_code = outStructObj.getString("struct_code"); start_point_code = outStructObj.getString("struct_code");
@ -309,7 +326,6 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
taskObj.put("create_time", DateUtil.now()); taskObj.put("create_time", DateUtil.now());
taskObj.put("is_delete", "0"); taskObj.put("is_delete", "0");
taskTable.insert(taskObj); taskTable.insert(taskObj);
return task_id; return task_id;
} }

7
wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/SendMaterialTask.java

@ -233,7 +233,7 @@ public class SendMaterialTask extends AbstractAcsTask {
.process().uniqueResult(0); .process().uniqueResult(0);
String workprocedure_id = workInfo.getString("workprocedure_id"); String workprocedure_id = workInfo.getString("workprocedure_id");
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id); WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id);
String vehilce_type=""; String vehilce_type = "";
switch (workProcedureEnum) { switch (workProcedureEnum) {
//混黏工序 //混黏工序
@ -260,6 +260,7 @@ public class SendMaterialTask extends AbstractAcsTask {
qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID; qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
bill_type = BillTypeEnum.FJRK.getCode(); bill_type = BillTypeEnum.FJRK.getCode();
endArea_type = AreaEnum.BZZC.getCode(); endArea_type = AreaEnum.BZZC.getCode();
vehicle_code = startPoint.getVehicle_code();
break; break;
default: default:
qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID; qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
@ -276,8 +277,8 @@ public class SendMaterialTask extends AbstractAcsTask {
} }
next_point_code = inStructObj.getString("struct_code"); next_point_code = inStructObj.getString("struct_code");
//创建入库单据 //创建入库单据
//假如静置时间为0 或者为空,则取物料表上的静置时间 //假如静置时间为空,则取物料表上的静置时间
if (StrUtil.isEmpty(stewing_time) || StrUtil.equals(stewing_time, "0")) { if (StrUtil.isEmpty(stewing_time)) {
stewing_time = WQLObject stewing_time = WQLObject
.getWQLObject("md_me_material") .getWQLObject("md_me_material")
.query("material_id ='" + material_id + "'") .query("material_id ='" + material_id + "'")

BIN
wms/hd/nladmin-system/src/main/java/org/nl/wms/wms.xls

Binary file not shown.
Loading…
Cancel
Save