更新
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -121,4 +121,6 @@ public interface WorkordeService {
|
||||
* @return
|
||||
*/
|
||||
JSONArray getDtl(JSONObject param);
|
||||
|
||||
JSONArray getMaterial();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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") + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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") + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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") + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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") + "'");
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -96,4 +96,11 @@ export function getDtl(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl }
|
||||
export function getMaterial() {
|
||||
return request({
|
||||
url: 'api/workorder/getMaterial',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl, getMaterial }
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料" prop="material_code">
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<el-input
|
||||
v-model="form.material_code"
|
||||
style="width: 300px"
|
||||
@@ -130,13 +130,13 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生产设备" prop="device_code">
|
||||
<el-form-item label="生产设备" prop="device_name">
|
||||
<el-input
|
||||
v-model="form.device_code"
|
||||
v-model="form.device_name"
|
||||
style="width: 300px"
|
||||
clearable
|
||||
@focus="deviceShow=true"
|
||||
@clear="form.device_code=''; form.device_id=''"
|
||||
@clear="form.device_code=''; form.device_id=''; form.device_name=''"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -198,10 +198,14 @@
|
||||
{{ dict.label.pdm_workorder_status[scope.row.order_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="planproducestart_date" label="计划开始时间" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="planproduceend_date" label="计划结束时间" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" label="物料编码" width="260" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_type" label="载具类型" min-width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="plan_qty" label="计划数量" />
|
||||
<el-table-column prop="is_urgent" label="是否加急">
|
||||
<template slot-scope="scope">
|
||||
@@ -218,12 +222,6 @@
|
||||
<el-table-column prop="real_qty" label="实际数量" />
|
||||
<el-table-column prop="qualified_qty" label="合格数量" />
|
||||
<el-table-column prop="unqualified_qty" label="不合格数量" width="100" />
|
||||
<!-- <el-table-column prop="vehicle_type" label="载具类型" min-width="120" show-overflow-tooltip>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ dict.label.vehicle_type[scope.row.vehicle_type] }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" width="150" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||
@@ -268,7 +266,7 @@ const defaultForm = {
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
material_weight: null,
|
||||
vehicle_type: null,
|
||||
vehicle_type: '3',
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
realproducestart_date: null,
|
||||
@@ -288,6 +286,7 @@ const defaultForm = {
|
||||
material_name: null,
|
||||
device_id: null,
|
||||
device_code: null,
|
||||
device_name: null,
|
||||
is_canupdate_update: '1',
|
||||
material_spec: null,
|
||||
sale_id: null,
|
||||
@@ -332,44 +331,17 @@ export default {
|
||||
order_status: ['-1'],
|
||||
permission: {},
|
||||
rules: {
|
||||
produceorder_code: [
|
||||
{ required: true, message: '生产班次工单编号不能为空', trigger: 'blur' }
|
||||
],
|
||||
producedeviceorder_code: [
|
||||
{ required: true, message: '机台工单号不能为空', trigger: 'blur' }
|
||||
],
|
||||
produce_date: [
|
||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
plan_qty: [
|
||||
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_code: [
|
||||
{ required: true, message: '物料编码不能为空', trigger: 'change' }
|
||||
],
|
||||
planproducestart_date: [
|
||||
{ required: true, message: '计划生产开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
planproduceend_date: [
|
||||
{ required: true, message: '计划生产结束时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
order_status: [
|
||||
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_needmove: [
|
||||
{ required: true, message: '是否搬运不能为空', trigger: 'blur' }
|
||||
],
|
||||
order_type_scode: [
|
||||
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_canupdate_update: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
vehicle_type: [
|
||||
{ required: true, message: '木托盘类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
device_code: [
|
||||
{ required: true, message: '生产设备不能为空', trigger: 'blur' }
|
||||
device_name: [
|
||||
{ required: true, message: '生产设备不能为空', trigger: 'change' }
|
||||
],
|
||||
is_urgent: [
|
||||
{ required: true, message: '是否加急不能为空', trigger: 'blur' }
|
||||
@@ -426,6 +398,7 @@ export default {
|
||||
tableChanged(row) {
|
||||
this.form.device_code = row.device_code
|
||||
this.form.device_id = row.device_id
|
||||
this.form.device_name = row.device_name
|
||||
},
|
||||
// 下发
|
||||
submits(row) {
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="编码名称">
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="编码名称"
|
||||
placeholder="物料编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -46,8 +46,7 @@
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="物料编码" width="189" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" width="190" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" label="物料编码" width="260" show-overflow-tooltip />
|
||||
<el-table-column prop="standing_time" label="静置时间" width="75" />
|
||||
<el-table-column prop="threshold_time" label="阈值时间" width="75" />
|
||||
<el-table-column prop="product_code" label="产品编号" width="75" />
|
||||
|
||||
Reference in New Issue
Block a user