手持修改窑设备送料请求

This commit is contained in:
18188916393
2022-09-07 10:31:06 +08:00
parent 68b519e7aa
commit e3e6cbb561

View File

@@ -59,11 +59,11 @@ public class SendMaterialServiceImpl implements SendMaterialService {
@Override
@Transactional
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 qty = (String) param.get("qty");
String is_full = (String) param.get("is_full");
if (StrUtil.isEmpty(start_point_code)) {
if (StrUtil.isEmpty(device_code)) {
throw new PdaRequestException("点位不能为空!");
}
if (StrUtil.isEmpty(vehicle_code)) {
@@ -79,14 +79,24 @@ public class SendMaterialServiceImpl implements SendMaterialService {
JSONObject jsonObject = new JSONObject();
jsonObject.put("pcsn", "pcsn");
jsonObject.put("create_mode", "03");
JSONObject produceInfoByCode = this.getProduceInfoByCode(start_point_code);
jsonObject.put("cust_id", produceInfoByCode.getString("cust_id"));
jsonObject.put("material_id", produceInfoByCode.getString("material_id"));
jsonObject.put("stewing_time", produceInfoByCode.getString("stewing_time"));
jsonObject.put("producetask_id", produceInfoByCode.getString("producetask_id"));
jsonObject.put("start_point_code", start_point_code);
jsonObject.put("vehicle_code", vehicle_code);
jsonObject.put("qty", qty);
if (!StrUtil.equals(device_code, "CYBZW")) {
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("cust_id", produceInfoByCode.getString("cust_id"));
jsonObject.put("stewing_time", produceInfoByCode.getString("stewing_time"));
jsonObject.put("producetask_id", produceInfoByCode.getString("producetask_id"));
} 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("producetask_id", groupObj.getString("producetask_id"));
}
jsonObject.put("is_full", is_full);
sendMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
JSONObject returnjo = new JSONObject();