廖井涛
2024-09-25 b5a9dccccaf5bed064891a05ec8ff3f21de9cff0
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -25,7 +25,6 @@
import com.example.erp.service.userInfo.LogService;
import com.example.erp.service.userInfo.SysErrorService;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
@@ -178,9 +177,21 @@
    }
    //查询工序
    public Map<String, Object> SelectProcessSv() {
    public Map<String, Object> SelectProcessSv(String userId) {
        Map<String, Object> map = new HashMap<>();
        map.put("process", reportingWorkMapper.SelectProcessMp());
        String process = reportingWorkMapper.selectUserProcess(userId);
        if (process==null) {
            map.put("process", reportingWorkMapper.SelectProcessMp());
        }
        else {
            if (process.equals("夹胶")){
                map.put("process",reportingWorkMapper.getSelectProcessJiajiao() );
            }
            if (process.equals("技术部多曲")){
                map.put("process",reportingWorkMapper.getSelectProcessDuoqu() );
            }
        }
        return map;
    }
@@ -199,7 +210,8 @@
        String formattedDate = dateFormat.format(currentDate);
        String reportingWorkId = "BG" + formattedDate + formattedNumber;
        reportingWork.setReportingWorkId(reportingWorkId);
        reportingWork.setProcessId(reportingWork.getProcessId().substring(0, 14));
        String[] processIdStr = reportingWork.getProcessId().split("/");
        reportingWork.setProcessId(processIdStr[0]);
        int reviewState = (int) reportingWorkJson.get("type");
        if (reviewState == 1) {
@@ -208,6 +220,8 @@
        } else {
            reportingWork.setReviewedState(0);
        }
        reportingWork.setNextProcess(orderProcessDetailMapper.selectNextProcess(processIdStr[0],processIdStr[1],reportingWork.getThisProcess()));
        //主表插入
        reportingWorkMapper.insert(reportingWork);
        //副表循环插入,并且插入次破信息表。再根据次破信息修改订单玻璃流程表的完工数量与刺破数量
@@ -389,7 +403,7 @@
        //根据报工编号获取层
        map.put("layer", reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId));
        map.put("numberList", flowCardMapper.getGlassNumber(reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId),reportingWork.getProcessId()));
        map.put("title", "补片状态");
        return map;
    }