代码更新

This commit is contained in:
2022-10-25 15:48:56 +08:00
parent f5a1543952
commit 8a540766bf
2 changed files with 46 additions and 26 deletions

View File

@@ -119,16 +119,19 @@ public class GjxCallEmpVehicleTask extends AbstractAcsTask {
if (StrUtil.equals(jsonEnd.getString("region_id"), RegionTypeEnum.DPJQB.getId())) {
// 更新起点点位状态
JSONObject jsonStart = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
// 判断起点是否是等待点
if (!StrUtil.equals(jsonStart.getString("row_num"), "9")) {
// 如果不是等待点更新等待点状态
JSONObject jsonEmpWait = pointTab.query("region_id = '" + jsonStart.getString("region_id") +
"' and block_num = '" + jsonStart.getString("block_num") +
"' and col_num = '" + jsonStart.getString("col_num") +
"' and row_num = '9'").uniqueResult(0);
// 判断起点是不是养生A区空载具
if (StrUtil.equals(jsonStart.getString("region_id"), RegionTypeEnum.YSAQKTPQ01.getId())) {
// 判断此起点是否是等待点
if (!StrUtil.equals(jsonStart.getString("row_num"), "9")) {
// 如果不是等待点更新等待点状态
JSONObject jsonEmpWait = pointTab.query("region_id = '" + jsonStart.getString("region_id") +
"' and block_num = '" + jsonStart.getString("block_num") +
"' and col_num = '" + jsonStart.getString("col_num") +
"' and row_num = '9'").uniqueResult(0);
jsonEmpWait.put("lock_type", "1");
pointTab.update(jsonEmpWait);
jsonEmpWait.put("lock_type", "1");
pointTab.update(jsonEmpWait);
}
}
jsonStart.put("point_status", "1");
@@ -141,6 +144,8 @@ public class GjxCallEmpVehicleTask extends AbstractAcsTask {
// 更新终点(叠盘架状态)
jsonEnd.put("vehicle_qty", NumberUtil.add(jsonEnd.getString("vehicle_qty"),jsonTask.getString("vehicle_qty")));
jsonEnd.put("lock_type", "1");
jsonEnd.put("point_status", "2");
jsonEnd.put("vehicle_type", jsonTask.getString("vehicle_type"));
pointTab.update(jsonEnd);
// 更新任务组状态
@@ -153,6 +158,10 @@ public class GjxCallEmpVehicleTask extends AbstractAcsTask {
JSONObject jsonStart = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
jsonStart.put("vehicle_qty",NumberUtil.sub(jsonStart.getString("vehicle_qty"),"1"));
jsonStart.put("lock_type", "1");
if (StrUtil.equals(jsonStart.getString("vehicle_qty"),"0")) {
jsonStart.put("point_status", "1");
jsonStart.put("vehicle_type", "");
}
pointTab.update(jsonStart);
}
}
@@ -180,7 +189,7 @@ public class GjxCallEmpVehicleTask extends AbstractAcsTask {
// 更新任务起点
jsonTask.put("point_code1", jsonDpjStart.getString("point_code"));
jsonTask.put("task_status", TaskStatusEnum.START_AND_POINT);
jsonTask.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
taskTab.update(jsonTask);
} else {
@@ -303,9 +312,10 @@ public class GjxCallEmpVehicleTask extends AbstractAcsTask {
WQLObject workOrderTab = WQLObject.getWQLObject("PDM_BD_WorkOrder"); // 生产工单表
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point"); //点位基础表
String point_code2 = form.getString("point_code1");
String point_code2 = form.getString("point_code2");
String sub_device_code = point_code2.substring(0, point_code2.indexOf("_"));
String device_code = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0).getString("device_code");
String device_code = pointTab.query("point_code = '" + sub_device_code + "'").uniqueResult(0).getString("device_code");
JSONObject workOrderObj = workOrderTab.query("device_code = '" + device_code + "' and order_status = '3' and is_delete ='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(workOrderObj)) throw new BadRequestException("该设备当前未生产或者已删除");

View File

@@ -63,7 +63,7 @@ public class YqxCallEmpVehicleTask extends AbstractAcsTask {
JSONObject jsonEnd = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0);
// 终点在叠盘架
if (StrUtil.equals(jsonEnd.getString("region_id"), RegionTypeEnum.DPJQA.getId())) {
if (StrUtil.equals(jsonEnd.getString("region_id"), RegionTypeEnum.DPJQB.getId())) {
JSONObject jsonStart = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
// 判断此起点是否是等待点
if (!StrUtil.equals(jsonStart.getString("row_num"), "9")) {
@@ -122,16 +122,19 @@ public class YqxCallEmpVehicleTask extends AbstractAcsTask {
if (StrUtil.equals(jsonEnd.getString("region_id"), RegionTypeEnum.DPJQA.getId())) {
// 更新起点点位状态
JSONObject jsonStart = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
// 判断起点是否是等待点
if (!StrUtil.equals(jsonStart.getString("row_num"), "9")) {
// 如果不是等待点更新等待点状态
JSONObject jsonEmpWait = pointTab.query("region_id = '" + jsonStart.getString("region_id") +
"' and block_num = '" + jsonStart.getString("block_num") +
"' and col_num = '" + jsonStart.getString("col_num") +
"' and row_num = '9'").uniqueResult(0);
// 判断起点是不是养生A区空载具
if (StrUtil.equals(jsonStart.getString("region_id"), RegionTypeEnum.YSAQKTPQ01.getId())) {
// 判断此起点是否是等待点
if (!StrUtil.equals(jsonStart.getString("row_num"), "9")) {
// 如果不是等待点更新等待点状态
JSONObject jsonEmpWait = pointTab.query("region_id = '" + jsonStart.getString("region_id") +
"' and block_num = '" + jsonStart.getString("block_num") +
"' and col_num = '" + jsonStart.getString("col_num") +
"' and row_num = '9'").uniqueResult(0);
jsonEmpWait.put("lock_type", "1");
pointTab.update(jsonEmpWait);
jsonEmpWait.put("lock_type", "1");
pointTab.update(jsonEmpWait);
}
}
jsonStart.put("point_status", "1");
@@ -144,6 +147,8 @@ public class YqxCallEmpVehicleTask extends AbstractAcsTask {
// 更新终点(叠盘架状态)
jsonEnd.put("vehicle_qty", NumberUtil.add(jsonEnd.getString("vehicle_qty"),jsonTask.getString("vehicle_qty")));
jsonEnd.put("lock_type", "1");
jsonEnd.put("point_status", "2");
jsonEnd.put("vehicle_type", jsonTask.getString("vehicle_type"));
pointTab.update(jsonEnd);
// 更新任务组状态
@@ -160,6 +165,10 @@ public class YqxCallEmpVehicleTask extends AbstractAcsTask {
JSONObject jsonStart = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
jsonStart.put("vehicle_qty",NumberUtil.sub(jsonStart.getString("vehicle_qty"),jsonTask.getString("vehicle_qty")));
jsonStart.put("lock_type", "1");
if (StrUtil.equals(jsonStart.getString("vehicle_qty"),"0")) {
jsonStart.put("point_status", "1");
jsonStart.put("vehicle_type", "");
}
pointTab.update(jsonStart);
}
}
@@ -192,7 +201,7 @@ public class YqxCallEmpVehicleTask extends AbstractAcsTask {
// 更新任务起点
jsonTask.put("point_code1", jsonDpjStart.getString("point_code"));
jsonTask.put("task_status", TaskStatusEnum.START_AND_POINT);
jsonTask.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
taskTab.update(jsonTask);
} else {
@@ -294,7 +303,7 @@ public class YqxCallEmpVehicleTask extends AbstractAcsTask {
pointTab.update(jsonEmpWait);
} else {
continue;
}
}
}
@@ -315,9 +324,10 @@ public class YqxCallEmpVehicleTask extends AbstractAcsTask {
WQLObject workOrderTab = WQLObject.getWQLObject("PDM_BD_WorkOrder"); // 生产工单表
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point"); //点位基础表
String point_code2 = form.getString("point_code1");
String point_code2 = form.getString("point_code2");
String sub_device_code = point_code2.substring(0, point_code2.indexOf("_"));
String device_code = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0).getString("device_code");
String device_code = pointTab.query("point_code = '" + sub_device_code + "'").uniqueResult(0).getString("device_code");
JSONObject workOrderObj = workOrderTab.query("device_code = '" + device_code + "' and order_status = '3' and is_delete ='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(workOrderObj)) throw new BadRequestException("该设备当前未生产或者已删除");