|
@@ -125,6 +125,57 @@ public class BizSpecialDayworkController extends BaseController {
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 查询deptProcess列表
|
|
|
|
+ */
|
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:deptProcess:list')")
|
|
|
|
+ @PostMapping("/list")
|
|
|
|
+ public AjaxResult list(@RequestBody Map<String, Object> data) throws NoSuchFieldException, IllegalAccessException {
|
|
|
|
+ List<String> statusList = Arrays.asList("0", "1", "2");
|
|
|
|
+ Long deptId = Long.parseLong(data.get("deptId").toString());
|
|
|
|
+ List<BizDeptProcess> deptProcesses = bizDeptProcessService.query().eq("dept_id", deptId).list();
|
|
|
|
+ List<Long> deptProcessIds = deptProcesses.stream().map(BizDeptProcess::getProcessId).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ long dayworkId = 0L;
|
|
|
|
+ if (data.get("dayworkId") != null) {
|
|
|
|
+ dayworkId = Long.parseLong(data.get("dayworkId").toString());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ long planDetailId = 0L;
|
|
|
|
+ if (data.get("planDetailId") != null) {
|
|
|
|
+ planDetailId = Long.parseLong(data.get("planDetailId").toString());
|
|
|
|
+ BizProductionPlanDetail productionPlanDetail = bizProductionPlanDetailService.getById(planDetailId);
|
|
|
|
+ List<BizTechnologicalProcessDetail> technologicalProcessDetails = bizTechnologicalProcessDetailService.query()
|
|
|
|
+ .eq("technological_process_id", productionPlanDetail.getTechnologicalProcessId())
|
|
|
|
+ .ne("tenant_id", 9)
|
|
|
|
+ .in("process_id", deptProcessIds)
|
|
|
|
+ .orderByAsc("process_step_number")
|
|
|
|
+ .list();
|
|
|
|
+
|
|
|
|
+ return success(technologicalProcessDetails);
|
|
|
|
+ }
|
|
|
|
+ /* 当一个工序未工序完成,再开始报工时,只能做当前工序,不允许做其它工序
|
|
|
|
+ if (dayworkId > 0){
|
|
|
|
+ List<BizDayworkItem> itemList = bizDayworkItemService.query()
|
|
|
|
+ .eq("daywork_id", dayworkId)
|
|
|
|
+ .in("status", statusList)
|
|
|
|
+ .orderByDesc("create_time")
|
|
|
|
+ .list();
|
|
|
|
+ //如果当前批次有未完成的工序,那么只能做这一道工序
|
|
|
|
+ for (BizDeptProcess item : list) {
|
|
|
|
+ if (!itemList.isEmpty()){
|
|
|
|
+ //保留工段下和他相同的那一条工序
|
|
|
|
+ if(itemList.get(0).getProcessId().equals(item.getProcessId())){
|
|
|
|
+ returnList.add(item);
|
|
|
|
+ return success(returnList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ */
|
|
|
|
+ return success(deptProcesses);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Log(title = "特殊报工首序报工查询批次信息", businessType = BusinessType.SELECT)
|
|
@Log(title = "特殊报工首序报工查询批次信息", businessType = BusinessType.SELECT)
|
|
@GetMapping("/selectLotList")
|
|
@GetMapping("/selectLotList")
|
|
public AjaxResult selectLotList(BizLot bizLot) {
|
|
public AjaxResult selectLotList(BizLot bizLot) {
|