Browse Source

手持修改窑设备送料请求

master
18188916393 2 years ago
parent
commit
e3e6cbb561
  1. 22
      wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/service/impl/SendMaterialServiceImpl.java

22
wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/service/impl/SendMaterialServiceImpl.java

@ -59,11 +59,11 @@ public class SendMaterialServiceImpl implements SendMaterialService {
@Override @Override
@Transactional @Transactional
public Map<String, Object> bussConfirm(@RequestBody Map<String, String> param) { public Map<String, Object> bussConfirm(@RequestBody Map<String, String> param) {
String start_point_code = (String) param.get("point_code"); String device_code = (String) param.get("point_code");
String vehicle_code = (String) param.get("vehicle_code"); String vehicle_code = (String) param.get("vehicle_code");
String qty = (String) param.get("qty"); String qty = (String) param.get("qty");
String is_full = (String) param.get("is_full"); String is_full = (String) param.get("is_full");
if (StrUtil.isEmpty(start_point_code)) { if (StrUtil.isEmpty(device_code)) {
throw new PdaRequestException("点位不能为空!"); throw new PdaRequestException("点位不能为空!");
} }
if (StrUtil.isEmpty(vehicle_code)) { if (StrUtil.isEmpty(vehicle_code)) {
@ -79,14 +79,24 @@ public class SendMaterialServiceImpl implements SendMaterialService {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("pcsn", "pcsn"); jsonObject.put("pcsn", "pcsn");
jsonObject.put("create_mode", "03"); jsonObject.put("create_mode", "03");
JSONObject produceInfoByCode = this.getProduceInfoByCode(start_point_code); if (!StrUtil.equals(device_code, "CYBZW")) {
jsonObject.put("cust_id", produceInfoByCode.getString("cust_id")); JSONObject produceInfoByCode = this.getProduceInfoByCode(device_code);
jsonObject.put("material_id", produceInfoByCode.getString("material_id"));
produceInfoByCode = this.getProduceInfoByCode(device_code);
//批次 物料,客户要从排产单里面去取
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("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"));
jsonObject.put("start_point_code", start_point_code); } else {
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("vehicle_code", vehicle_code);
jsonObject.put("qty", qty); jsonObject.put("producetask_id", groupObj.getString("producetask_id"));
}
jsonObject.put("is_full", is_full); jsonObject.put("is_full", is_full);
sendMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject)); sendMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
JSONObject returnjo = new JSONObject(); JSONObject returnjo = new JSONObject();

Loading…
Cancel
Save