fix:信号反馈null

This commit is contained in:
zhangzhiqiang
2023-02-06 20:55:39 +08:00
parent 98186e21c8
commit ec683e2395

View File

@@ -614,37 +614,39 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
//查询该设备对应的输送线点位
JSONObject deliver_jo = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_code = '"+device_code+"'").uniqueResult(0);
String qzzno = deliver_jo.getString("qzzno");
if (ObjectUtil.isNotEmpty(deliver_jo)){
deliver_jo.put("point_status","01");
deliver_jo.put("qzzno","");
deliver_jo.put("vehicle_code","");
WQLObject.getWQLObject("st_ivt_deliverypointivt").update(deliver_jo);
if (deliver_jo != null){
String qzzno = deliver_jo.getString("qzzno");
if (ObjectUtil.isNotEmpty(deliver_jo)){
deliver_jo.put("point_status","01");
deliver_jo.put("qzzno","");
deliver_jo.put("vehicle_code","");
WQLObject.getWQLObject("st_ivt_deliverypointivt").update(deliver_jo);
//如果为靠近分切机一端的输送点,判断远离端是否需要进行横移
char dtl_type = device_code.charAt(device_code.length() - 1);
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
String point_location = deliver_jo.getString("point_location");
String product_area = deliver_jo.getString("product_area");
String sort_seq = deliver_jo.getString("sort_seq");
JSONObject right_point = WQL.getWO("PDA_02")
.addParam("point_location", point_location)
.addParam("point_code", device_code)
.addParam("product_area", product_area)
.addParam("sort_seq", sort_seq)
.addParam("find_type","1")
.addParam("flag", "17").process().uniqueResult(0);
if (ObjectUtil.isNotEmpty(right_point) && !right_point.getString("point_status").equals("01")) {
//创建载具横移任务
String translate_code1 = right_point.getString("point_code");
String translate_code2 = device_code;
JSONObject tran_jo = new JSONObject();
tran_jo.put("point_code1",translate_code1);
tran_jo.put("point_code2",translate_code2);
tran_jo.put("vehicle_code",right_point.getString("qzzno"));
tran_jo.put("vehicle_code2",right_point.getString("vehicle_code"));
tran_jo.put("task_type","010406");
cutConveyorTask.createTask(tran_jo);
//如果为靠近分切机一端的输送点,判断远离端是否需要进行横移
char dtl_type = device_code.charAt(device_code.length() - 1);
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
String point_location = deliver_jo.getString("point_location");
String product_area = deliver_jo.getString("product_area");
String sort_seq = deliver_jo.getString("sort_seq");
JSONObject right_point = WQL.getWO("PDA_02")
.addParam("point_location", point_location)
.addParam("point_code", device_code)
.addParam("product_area", product_area)
.addParam("sort_seq", sort_seq)
.addParam("find_type","1")
.addParam("flag", "17").process().uniqueResult(0);
if (ObjectUtil.isNotEmpty(right_point) && !right_point.getString("point_status").equals("01")) {
//创建载具横移任务
String translate_code1 = right_point.getString("point_code");
String translate_code2 = device_code;
JSONObject tran_jo = new JSONObject();
tran_jo.put("point_code1",translate_code1);
tran_jo.put("point_code2",translate_code2);
tran_jo.put("vehicle_code",right_point.getString("qzzno"));
tran_jo.put("vehicle_code2",right_point.getString("vehicle_code"));
tran_jo.put("task_type","010406");
cutConveyorTask.createTask(tran_jo);
}
}
}
}