This commit is contained in:
张江玮
2023-04-14 14:34:14 +08:00
parent a4e8800ced
commit a6e780d56c
11 changed files with 279 additions and 271 deletions

View File

@@ -142,4 +142,12 @@ public class WorkorderController {
return new ResponseEntity<>(workordeService.getDtl(param),HttpStatus.OK);
}
@PostMapping("/getMaterial")
@Log("获取工单物料")
@ApiOperation("获取工单物料")
//@SaCheckPermission("produceshiftorder:list")
public ResponseEntity<Object> getMaterial(){
return new ResponseEntity<>(workordeService.getMaterial(),HttpStatus.OK);
}
}

View File

@@ -121,4 +121,6 @@ public interface WorkordeService {
* @return
*/
JSONArray getDtl(JSONObject param);
JSONArray getMaterial();
}

View File

@@ -122,7 +122,6 @@ public class WorkorderServiceImpl implements WorkordeService {
}
work_order.put("vehicle_type", vehicle_type);
work_order.put("device_id", dto.getDevice_id());
work_order.put("device_code", device_code);
work_order.put("order_status", WorkOrderEnum.ORDER_STATUS_UNPRODUCED.value());
work_order.put("is_urgent", dto.getIs_urgent());
work_order.put("is_pri", dto.getIs_pri());
@@ -460,4 +459,8 @@ public class WorkorderServiceImpl implements WorkordeService {
return resultJSONArray;
}
@Override
public JSONArray getMaterial() {
return WQLObject.getWQLObject("md_me_materialbase").query().getResultJSONArray(0);
}
}

View File

@@ -134,74 +134,78 @@ public class YZCallEmptyTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(point1)
&& LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point1);
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point1);
TaskUtils.addCurrentUpdateColum(task);
}
point_table.update(point1);
}
WQLObject.getWQLObject("sch_base_task").update(task);
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(point1)
&& LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point1);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point1);
}
point_table.update(point1);
}
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
point1.put("vehicle_type", "");
point1.put("vehicle_code", "");
point1.put("point_status", PointStatus.EMPTY.value());
TaskUtils.addCurrentUpdateColum(point1);
point_table.update(point1);
}
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
point1.put("vehicle_type", "");
point1.put("vehicle_code", "");
point1.put("point_status", PointStatus.EMPTY.value());
TaskUtils.addCurrentUpdateColum(point1);
point_table.update(point1);
}
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}

View File

@@ -139,71 +139,75 @@ public class SZCallMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(point1)
&& LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point1);
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point1);
TaskUtils.addCurrentUpdateColum(task);
}
point_table.update(point1);
}
WQLObject.getWQLObject("sch_base_task").update(task);
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(point1)
&& LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point1);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point1);
}
point_table.update(point1);
}
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
point1.put("vehicle_type", "");
point1.put("vehicle_code", "");
point1.put("point_status", PointStatus.EMPTY.value());
TaskUtils.addCurrentUpdateColum(point1);
point_table.update(point1);
}
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
point1.put("vehicle_type", "");
point1.put("vehicle_code", "");
point1.put("point_status", PointStatus.EMPTY.value());
TaskUtils.addCurrentUpdateColum(point1);
point_table.update(point1);
}
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}

View File

@@ -129,71 +129,75 @@ public class SZSendMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point1);
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point1);
TaskUtils.addCurrentUpdateColum(task);
}
point_table.update(point1);
}
WQLObject.getWQLObject("sch_base_task").update(task);
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point1);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point1);
}
point_table.update(point1);
}
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(point1)
&& LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
TaskUtils.addCurrentUpdateColum(point1);
point_table.update(point1);
}
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(point1)
&& LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
TaskUtils.addCurrentUpdateColum(point1);
point_table.update(point1);
}
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}

View File

@@ -121,74 +121,78 @@ public class YZSendMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point1);
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point1);
TaskUtils.addCurrentUpdateColum(task);
}
point_table.update(point1);
}
WQLObject.getWQLObject("sch_base_task").update(task);
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point1);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point1);
}
point_table.update(point1);
}
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(task);
}
WQLObject.getWQLObject("sch_base_task").update(task);
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(point1)
&& LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
point1.put("vehicle_type", "");
point1.put("vehicle_code", "");
point1.put("point_status", PointStatus.EMPTY.value());
TaskUtils.addCurrentUpdateColum(point1);
point_table.update(point1);
}
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
JSONObject point1 = point_table.query("point_code = '" + task.getString("point_code1") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(point1)
&& LockType.TASK_LOCKED.value().equals(point1.getString("lock_type"))
&& task.getString("task_code").equals(point1.getString("task_code"))) {
point1.put("lock_type", LockType.UNLOCKED.value());
point1.put("task_code", "");
point1.put("vehicle_type", "");
point1.put("vehicle_code", "");
point1.put("point_status", PointStatus.EMPTY.value());
TaskUtils.addCurrentUpdateColum(point1);
point_table.update(point1);
}
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
JSONObject point2 = new JSONObject();
point2.put("lock_type", LockType.UNLOCKED.value());
point2.put("task_code", "");
point2.put("vehicle_type", task.getString("vehicle_type"));
point2.put("vehicle_code", task.getString("vehicle_code"));
point2.put("point_status", PointStatus.NOT_EMPTY.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(point2);
} else if (operation_type == OperationType.MANUAL) {
TaskUtils.addCurrentUpdateColum(point2);
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}