优化信息丢失问题
This commit is contained in:
@@ -476,17 +476,19 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
throw new BadRequestException("未找到指令号'" + task_id);
|
||||
}
|
||||
//将之前的托盘信息删除
|
||||
groupTable.delete("vehicle_code='" + vehicle_code + "' and task_id <>'" + task_id + "'");
|
||||
JSONObject groupObj = groupTable.query("task_id='" + task_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(groupObj)) {
|
||||
throw new BadRequestException("未找到指令号为'" + task_id + "'的组盘信息!");
|
||||
if ("RYSMW01".equals(device_code)) {
|
||||
//将之前的托盘信息删除
|
||||
// groupTable.delete("vehicle_code='" + vehicle_code + "' and task_id <>'" + task_id + "'");
|
||||
JSONObject groupObj = groupTable.query("task_id='" + task_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(groupObj)) {
|
||||
throw new BadRequestException("未找到指令号为'" + task_id + "'的组盘信息!");
|
||||
}
|
||||
groupObj.put("vehicle_code", vehicle_code);
|
||||
groupObj.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
groupObj.put("update_optname", SecurityUtils.getNickName());
|
||||
groupObj.put("update_time", DateUtil.now());
|
||||
groupTable.update(groupObj);
|
||||
}
|
||||
groupObj.put("vehicle_code", vehicle_code);
|
||||
groupObj.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
groupObj.put("update_optname", SecurityUtils.getNickName());
|
||||
groupObj.put("update_time", DateUtil.now());
|
||||
groupTable.update(groupObj);
|
||||
//更新入库单单据的托盘条码
|
||||
WQLObject iosTable = WQLObject.getWQLObject("ST_IVT_workProcedureIOS");
|
||||
JSONObject iosObj = iosTable.query("task_id ='" + task_id + "'").uniqueResult(0);
|
||||
|
||||
@@ -91,14 +91,6 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
|
||||
startPointObj.put("vehicle_code", "");
|
||||
pointTab.update(startPointObj);
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
//将组盘表删除
|
||||
WQLObject group_Table = WQLObject.getWQLObject("st_buss_vehiclegroup");
|
||||
JSONObject groupObj = group_Table.query("vehicle_code='" + vehicle_code + "' and is_delete='0'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(groupObj)) {
|
||||
groupObj.put("is_delete", "0");
|
||||
group_Table.update(groupObj);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -146,7 +138,7 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
|
||||
}
|
||||
PointDto startPoint = pointService.findByCode(start_point_code);
|
||||
//假如载具为空,去点位表里面去取空托盘
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
if (StrUtil.isEmpty(vehicle_code) || "0000".equals(vehicle_code) || "0".equals(vehicle_code)) {
|
||||
vehicle_code = startPoint.getVehicle_code();
|
||||
}
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
@@ -205,6 +197,11 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
|
||||
taskObj.put("create_time", DateUtil.now());
|
||||
taskObj.put("is_delete", "0");
|
||||
taskTable.insert(taskObj);
|
||||
|
||||
//将组盘表删除
|
||||
WQLObject.getWQLObject("st_buss_vehiclegroup")
|
||||
.delete("vehicle_code = '" + vehicle_code + "'");
|
||||
|
||||
return task_id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user