廖井涛
2025-12-02 fd2ec4214c6f8456b957c3545e7d67bcdbbb9985
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -1796,4 +1796,37 @@
        return result;
    }
    @Transactional(rollbackFor = Exception.class)
    public Result addWorkInProgress(Map<String, Object> object) {
        List<Map<String,Object>> list = (List<Map<String,Object>>) object.get("reportingWorks");
        list.forEach(item -> {
            ReportingWork reportingWork = JSONObject.parseObject(
                    JSONObject.toJSONString(item.get("processTitle")), ReportingWork.class);
            Map<String, String> mapTitle = new HashMap<>();
            String[] processIdStr = reportingWork.getProcessId() != null
                    ? reportingWork.getProcessId().split("/")
                    : new String[]{""};
            mapTitle.put("process", reportingWork.getPreviousProcess());
            mapTitle.put("processId", reportingWork.getProcessId());
            mapTitle.put("thisProcess", reportingWork.getThisProcess());
            mapTitle.put("technologyStr", processIdStr[1]);
            mapTitle.put("userName", object.get("userName").toString());
            ReviewReportingWorkSv(mapTitle);
            Map<String, Object> map = new HashMap<>();
            map.put("detail", item.get("processList"));
            map.put("title", item.get("processTitle"));
            map.put("type", object.get("type"));
            map.put("userId", object.get("userId"));
            map.put("userName", object.get("userName"));
            map.put("qualityInsStatus", object.get("qualityInsStatus"));
            map.put("class", object.get("class"));
            SaveReportingWorkSv(map);
        });
        return Result.success(true);
    }
}