chenlu
2024-12-19 a85bc05fb3a7dc9c67930a1b412cf5b1be172fd5
修改报工新增为通过判断工序是否为复合工序报工
3个文件已修改
21 ■■■■ 已修改文件
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java
@@ -24,7 +24,7 @@
    List<Map<String,String>> SelectTechnologicalNumMp(String processIdStr, String technologyStr, String process, String reportType);
    List<Map<String,String>> SelectReworlDetailMp(String processIdStr, String technologyStr, String process, String previousProcess);
    List<Map<String,String>> SelectReworlDetailMp(String processIdStr, String technologyStr, String process, String previousProcess, String laminating);
    List<Map<String,String>> SelectProcessMp();
@@ -95,5 +95,7 @@
    List<Map<String,String>> getSelectProcessDuoqu();
    List<Map<String, String>> SelectReworlDetailMpReview(String processIdStr, String technologyStr, String process, String previousProcess);
    List<Map<String, String>> SelectReworlDetailMpReview(String processIdStr, String technologyStr, String process, String previousProcess, String laminating);
    String getProcessLaminating(String process);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -81,6 +81,8 @@
    public Map<String, Object> AddSelectLastWorkSv(String processIdStr, String technologyStr, String process, String reportType) {
        Map<String, Object> map = new HashMap<>();
        //获取报工工序是否为复合工程
        String laminating = reportingWorkMapper.getProcessLaminating(process);
        //查询流程卡工艺流程
        String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(processIdStr,technologyStr);
@@ -142,9 +144,10 @@
                if (retrievedData!=null){
                    Integer reviewedState = retrievedData.getReviewedState();
                    //根据审核状态查询未审核数据
                    System.out.println(laminating);
                    if (reviewedState==1){//已审核
                        //不是第一道工序,查询报工数据
                        List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess);
                        List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess,laminating);
                        if(process.equals("中空")){
                            String orderId = processIdStr.substring(0,10);
                            details.forEach( detail -> {
@@ -161,7 +164,7 @@
                        map.put("Detail",details );
                    }else {
                        //不是第一道工序,查询报工数据
                        List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess);
                        List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess,laminating);
                        if(process.equals("中空")){
                            String orderId = processIdStr.substring(0,10);
                            details.forEach( detail -> {
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -255,7 +255,7 @@
        WHERE
            fc.process_id = #{processIdStr}
        <if test="process != '中空' and process != '夹胶' and process != '包装' and process != '打胶和粘框' ">
        <if test="laminating != 'laminating'">
           AND POSITION(fc.technology_number in #{technologyStr})
        </if>
        AND odpd.process = #{process}
@@ -993,11 +993,15 @@
        on rws.process_id = fc.process_id and rws.order_number=fc.order_number and rws.technology_number=fc.technology_number
        WHERE
        fc.process_id = #{processIdStr}
        <if test="process != '中空' and process != '夹胶' and process != '包装' and process != '打胶和粘框' ">
        <if test="laminating != 'laminating' ">
            AND POSITION(fc.technology_number in #{technologyStr})
        </if>
        AND odpd.process = #{process}
        and rws.reviewed_state=0
        order by fc.order_number
    </select>
    <select id="getProcessLaminating">
        select IFNULL(nickname,'') from sd.basic_data where basic_category='process' and basic_name=#{process}
    </select>
</mapper>