Browse Source

更新

master
张江玮 2 years ago
parent
commit
a6e780d56c
  1. 8
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/rest/WorkorderController.java
  2. 2
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/WorkordeService.java
  3. 5
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java
  4. 118
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java
  5. 112
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java
  6. 112
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/SZSendMaterialTask.java
  7. 118
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/YZSendMaterialTask.java
  8. BIN
      lms/nladmin-system/src/main/java/org/nl/wms/wms.xls
  9. 9
      lms/nladmin-ui/src/api/wms/pdm/workorder.js
  10. 59
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
  11. 7
      lms/nladmin-ui/src/views/wms/pub/MaterDialog.vue

8
lms/nladmin-system/src/main/java/org/nl/wms/pdm/rest/WorkorderController.java

@ -142,4 +142,12 @@ public class WorkorderController {
return new ResponseEntity<>(workordeService.getDtl(param),HttpStatus.OK); 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);
}
} }

2
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/WorkordeService.java

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

5
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java

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

118
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java

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

112
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java

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

112
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/SZSendMaterialTask.java

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

118
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/YZSendMaterialTask.java

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

BIN
lms/nladmin-system/src/main/java/org/nl/wms/wms.xls

Binary file not shown.

9
lms/nladmin-ui/src/api/wms/pdm/workorder.js

@ -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 }

59
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

@ -110,7 +110,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物料" prop="material_code"> <el-form-item label="物料编码" prop="material_code">
<el-input <el-input
v-model="form.material_code" v-model="form.material_code"
style="width: 300px" style="width: 300px"
@ -130,13 +130,13 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="生产设备" prop="device_code"> <el-form-item label="生产设备" prop="device_name">
<el-input <el-input
v-model="form.device_code" v-model="form.device_name"
style="width: 300px" style="width: 300px"
clearable clearable
@focus="deviceShow=true" @focus="deviceShow=true"
@clear="form.device_code=''; form.device_id=''" @clear="form.device_code=''; form.device_id=''; form.device_name=''"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -198,10 +198,14 @@
{{ dict.label.pdm_workorder_status[scope.row.order_status] }} {{ dict.label.pdm_workorder_status[scope.row.order_status] }}
</template> </template>
</el-table-column> </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="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="plan_qty" label="计划数量" />
<el-table-column prop="is_urgent" label="是否加急"> <el-table-column prop="is_urgent" label="是否加急">
<template slot-scope="scope"> <template slot-scope="scope">
@ -218,12 +222,6 @@
<el-table-column prop="real_qty" label="实际数量" /> <el-table-column prop="real_qty" label="实际数量" />
<el-table-column prop="qualified_qty" label="合格数量" /> <el-table-column prop="qualified_qty" label="合格数量" />
<el-table-column prop="unqualified_qty" label="不合格数量" width="100" /> <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="create_time" label="创建时间" width="150" />
<el-table-column prop="update_optname" label="修改人" /> <el-table-column prop="update_optname" label="修改人" />
<el-table-column prop="update_time" label="修改时间" width="150" /> <el-table-column prop="update_time" label="修改时间" width="150" />
@ -268,7 +266,7 @@ const defaultForm = {
material_id: null, material_id: null,
material_code: null, material_code: null,
material_weight: null, material_weight: null,
vehicle_type: null, vehicle_type: '3',
planproducestart_date: null, planproducestart_date: null,
planproduceend_date: null, planproduceend_date: null,
realproducestart_date: null, realproducestart_date: null,
@ -288,6 +286,7 @@ const defaultForm = {
material_name: null, material_name: null,
device_id: null, device_id: null,
device_code: null, device_code: null,
device_name: null,
is_canupdate_update: '1', is_canupdate_update: '1',
material_spec: null, material_spec: null,
sale_id: null, sale_id: null,
@ -332,44 +331,17 @@ export default {
order_status: ['-1'], order_status: ['-1'],
permission: {}, permission: {},
rules: { rules: {
produceorder_code: [
{ required: true, message: '生产班次工单编号不能为空', trigger: 'blur' }
],
producedeviceorder_code: [
{ required: true, message: '机台工单号不能为空', trigger: 'blur' }
],
produce_date: [
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
],
plan_qty: [ plan_qty: [
{ required: true, message: '计划数量不能为空', trigger: 'blur' } { required: true, message: '计划数量不能为空', trigger: 'blur' }
], ],
material_code: [ material_code: [
{ required: true, message: '物料编码不能为空', trigger: 'change' } { 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: [ vehicle_type: [
{ required: true, message: '木托盘类型不能为空', trigger: 'blur' } { required: true, message: '木托盘类型不能为空', trigger: 'blur' }
], ],
device_code: [ device_name: [
{ required: true, message: '生产设备不能为空', trigger: 'blur' } { required: true, message: '生产设备不能为空', trigger: 'change' }
], ],
is_urgent: [ is_urgent: [
{ required: true, message: '是否加急不能为空', trigger: 'blur' } { required: true, message: '是否加急不能为空', trigger: 'blur' }
@ -426,6 +398,7 @@ export default {
tableChanged(row) { tableChanged(row) {
this.form.device_code = row.device_code this.form.device_code = row.device_code
this.form.device_id = row.device_id this.form.device_id = row.device_id
this.form.device_name = row.device_name
}, },
// //
submits(row) { submits(row) {

7
lms/nladmin-ui/src/views/wms/pub/MaterDialog.vue

@ -15,12 +15,12 @@
label-width="80px" label-width="80px"
label-suffix=":" label-suffix=":"
> >
<el-form-item label="编码名称"> <el-form-item label="物料编码">
<el-input <el-input
v-model="query.name" v-model="query.name"
clearable clearable
size="mini" size="mini"
placeholder="编码名称" placeholder="物料编码"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
@ -46,8 +46,7 @@
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio> <el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="material_code" label="物料编码" width="189" show-overflow-tooltip /> <el-table-column prop="material_code" label="物料编码" width="260" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料名称" width="190" show-overflow-tooltip />
<el-table-column prop="standing_time" label="静置时间" width="75" /> <el-table-column prop="standing_time" label="静置时间" width="75" />
<el-table-column prop="threshold_time" label="阈值时间" width="75" /> <el-table-column prop="threshold_time" label="阈值时间" width="75" />
<el-table-column prop="product_code" label="产品编号" width="75" /> <el-table-column prop="product_code" label="产品编号" width="75" />

Loading…
Cancel
Save