|
|
@ -707,7 +707,7 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
task.put("task_id", IdUtil.getSnowflake().nextId()); |
|
|
|
task.put("task_code", CodeUtil.getNewCode("TASK_CODE")); |
|
|
|
task.put("task_name", "混料区人工送料"); |
|
|
|
task.put("task_type", TaskType.SEND_MATERIAL.value()); |
|
|
|
task.put("task_type", TaskType.PDA_HN.value()); |
|
|
|
task.put("task_status", TaskStatus.FINISHED.value()); |
|
|
|
task.put("point_code1", pointCode); |
|
|
|
task.put("point_code2", target_point); |
|
|
@ -726,7 +726,7 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
taskTab.insert(task); |
|
|
|
// 混碾工单需要加上重量真实值
|
|
|
|
JSONObject workorder_update = new JSONObject(); |
|
|
|
workorder_update.put("real_qty", workorder.getIntValue("real_qty") + workorder.getIntValue("weight")); |
|
|
|
workorder_update.put("real_qty", workorder.getIntValue("real_qty") + param.getIntValue("weight")); |
|
|
|
TaskUtils.addACSUpdateColum(workorder_update); |
|
|
|
WQLObject.getWQLObject("pdm_bd_workorder").update(workorder_update, "workorder_id = " + workorder.getString("workorder_id")); |
|
|
|
} |
|
|
@ -775,10 +775,17 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
// param: start_point, end_point, vehicle_code, is_agv
|
|
|
|
String startPoint = param.getString("start_point"); |
|
|
|
String endPoint = param.getString("end_point"); |
|
|
|
if (startPoint.equals(endPoint)) { |
|
|
|
throw new BadRequestException("起点和终点不能一样"); |
|
|
|
} |
|
|
|
String vehicleCode = param.getString("vehicle_code"); |
|
|
|
String isAgv = param.getString("is_agv"); |
|
|
|
JSONObject point1 = pointTab.query("point_code = '" + startPoint + "'").uniqueResult(0); |
|
|
|
JSONObject point2 = pointTab.query("point_code = '" + endPoint + "'").uniqueResult(0); |
|
|
|
point2.put("vehicle_type", point1.getString("vehicle_type")); |
|
|
|
point2.put("vehicle_code", point1.getString("vehicle_code")); |
|
|
|
point2.put("point_status", "1"); |
|
|
|
pointTab.update(point2); |
|
|
|
// 校验任务
|
|
|
|
JSONObject tasking = taskTab.query("(point_code1 = '" + startPoint + "' or point_code2 = '" + endPoint + "') " + |
|
|
|
"AND task_status < '7' AND is_delete = '0'").uniqueResult(0); |
|
|
@ -791,8 +798,8 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
throw new BadRequestException("料盅「" + vehicleCode + "」的组盘信息不存在"); |
|
|
|
} |
|
|
|
JSONObject taskParam = new JSONObject(); |
|
|
|
taskParam.put("point1", point1); |
|
|
|
taskParam.put("point2", point2); |
|
|
|
taskParam.put("point1", startPoint); |
|
|
|
taskParam.put("point2", endPoint); |
|
|
|
taskParam.put("vehicle_type", VehicleType.CUP.value()); |
|
|
|
taskParam.put("vehicle_code", vehicleCode); |
|
|
|
taskParam.put("create_mode", CreateMode.SCCJ.value()); |
|
|
@ -907,7 +914,7 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
return WQL |
|
|
|
.getWO("PDA") |
|
|
|
.addParam("flag", "9") |
|
|
|
.addParam("types", "('2','3')") |
|
|
|
.addParam("types", "('1')") |
|
|
|
.process() |
|
|
|
.getResultJSONArray(0); |
|
|
|
} |
|
|
|