| | |
| | | |
| | | 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(); |
| | | |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | |
| | | 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); |
| | | |
| | |
| | | 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 -> { |
| | |
| | | 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 -> { |
| | |
| | | |
| | | 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} |
| | |
| | | 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> |