Browse Source

测试修改!

master
18188916393 2 years ago
parent
commit
b7c969a35e
  1. 6
      wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java
  2. 1
      wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql
  3. 11
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  4. 6
      wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java

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

@ -41,10 +41,6 @@ public class StructFindUtil {
String is_full = jsonObject.getString("is_full"); String is_full = jsonObject.getString("is_full");
String workprocedure_id = jsonObject.getString("workprocedure_id"); String workprocedure_id = jsonObject.getString("workprocedure_id");
String vehicle_type = jsonObject.getString("vehicle_type"); String vehicle_type = jsonObject.getString("vehicle_type");
if (StrUtil.isEmpty(material_id)) {
throw new BadRequestException("物料不能为空!");
}
if (StrUtil.isEmpty(area_type)) { if (StrUtil.isEmpty(area_type)) {
throw new BadRequestException("区域不能为空!"); throw new BadRequestException("区域不能为空!");
} }
@ -109,7 +105,7 @@ public class StructFindUtil {
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
//如果是堆叠位5 需要更新 设备状态 //如果是堆叠位5 需要更新 设备状态
if (StrUtil.equals(point_code, "KGTDDW05")) { if (StrUtil.equals(point_code, "KGTDDW05")) {
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTDDQ).addParam("flag", "2").process().getResultJSONArray(0); JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTDDQ.getCode()).addParam("flag", "2").process().getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr); PointUpdateUtil.updatePoint(pointarr);
result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "6") result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "6")
.addParam("area_type", area_type) .addParam("area_type", area_type)

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

@ -114,6 +114,7 @@ IF 输入.flag = "3"
ivt.qty_unit_id, ivt.qty_unit_id,
ivt.pcsn, ivt.pcsn,
ivt.qty_unit_id, ivt.qty_unit_id,
ivt.material_id,
ruledis.out_seq_no ruledis.out_seq_no
FROM FROM
st_ivt_structivt ivt st_ivt_structivt ivt

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

@ -75,10 +75,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
//叫料出库 //叫料出库
jsonObject.put("next_point_code", device_code); jsonObject.put("next_point_code", device_code);
jsonObject.put("create_mode", "01"); jsonObject.put("create_mode", "01");
produceInfoByCode = this.getProduceInfoByCode(device_code);
//批次 物料,客户要从排产单里面去取 //批次 物料,客户要从排产单里面去取
jsonObject.put("pcsn", "pcsn"); jsonObject.put("pcsn", "pcsn");
jsonObject.put("material_id", produceInfoByCode.getString("material_id")); if (!StrUtil.equals(device_code,"RYW")){
produceInfoByCode = this.getProduceInfoByCode(device_code);
jsonObject.put("material_id", produceInfoByCode.getString("material_id"));
}
jsonObject.put("cust_id", "1516368197694132224"); jsonObject.put("cust_id", "1516368197694132224");
callMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject)); callMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
break; break;
@ -150,7 +155,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) 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");

6
wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java

@ -176,9 +176,6 @@ public class CallMaterialTask extends AbstractAcsTask {
if (StrUtil.isEmpty(next_point_code)) { if (StrUtil.isEmpty(next_point_code)) {
throw new BadRequestException("终点不能为空!"); throw new BadRequestException("终点不能为空!");
} }
if (StrUtil.isEmpty(material_id)) {
throw new BadRequestException("物料标识不能为空!");
}
if (StrUtil.isEmpty(create_mode)) { if (StrUtil.isEmpty(create_mode)) {
throw new BadRequestException("创建方式不能为空!"); throw new BadRequestException("创建方式不能为空!");
} }
@ -296,6 +293,9 @@ public class CallMaterialTask extends AbstractAcsTask {
iosObj.put("bill_type", bill_type); iosObj.put("bill_type", bill_type);
iosObj.put("workprocedure_id", workprocedure_id); iosObj.put("workprocedure_id", workprocedure_id);
iosObj.put("ivt_workprocedure_id", ivt_workprocedure_id); iosObj.put("ivt_workprocedure_id", ivt_workprocedure_id);
if (StrUtil.isEmpty(material_id)) {
material_id = outStructObj.getString("material_id");
}
iosObj.put("material_id", material_id); iosObj.put("material_id", material_id);
iosObj.put("vehicle_code", outStructObj.getString("vehicle_code")); iosObj.put("vehicle_code", outStructObj.getString("vehicle_code"));
iosObj.put("qty", qty); iosObj.put("qty", qty);

Loading…
Cancel
Save