| | |
| | | |
| | | List<Map<String, String>> getPrimaryListLimt(String orderId, String processId, String remarks); |
| | | |
| | | List<Map<String, String>> getPrimaryListLimts(String orderId, String processId, String remarks); |
| | | List<Map<String, String>> getPrimaryListLimts(String customerName, String project, String remarks); |
| | | |
| | | List<Map<String, Object>> getDetailList(String orderId, String processId, String remarks); |
| | | |
| | |
| | | } |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail", finishedOperateLogMapper.getPrimaryListLimts(finishedOperateLog.getOrderId(),finishedOperateLog.getProcessId(),finishedOperateLog.getRemarks())); |
| | | itemmap.put("detail", finishedOperateLogMapper.getPrimaryListLimts(finishedOperateLog.getOrder().getCustomerName(),finishedOperateLog.getOrder().getProject(),finishedOperateLog.getRemarks())); |
| | | |
| | | List<Map<String, Object>> detailList = finishedOperateLogMapper.getDetailList2(finishedOperateLog.getOrderId(),finishedOperateLog.getProcessId(),finishedOperateLog.getRemarks()); |
| | | |
| | |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = #{type} and aa.status!='已作废') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | <where> |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} |
| | | <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''"> |
| | |
| | | </select> |
| | | |
| | | <select id="getPrimaryListLimts"> |
| | | |
| | | |
| | | |
| | | select kkk.*,rw.teams_groups_name as teams_groups_name2 from(select o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | fol.remarks, |
| | | SUM(fol.quantity) as quantity, |
| | | ROUND( sum(od.width * od.height * fol.quantity) / 1000000, 2 ) as area, |
| | | ROUND( sum(od.width * od.height * fol.quantity*p.total_thickness*2.5) / 1000000, 2 ) as weight, |
| | | fol.process_id, |
| | | aaa.teams_groups_name, |
| | | aaa.previous_process, |
| | | date( aaa.reporting_work_time) as reporting_work_time |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '入库' and aa.status!='已作废') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on od.product_id=p.id |
| | | left join (select teams_groups_name,process_id,previous_process,reporting_work_time from pp.reporting_work where this_process='包装' group by process_id) aaa on aaa.process_id=fol.process_id |
| | | o.customer_name, |
| | | o.project, |
| | | fol.remarks, |
| | | SUM(fol.quantity) as quantity, |
| | | ROUND( sum(od.width * od.height * fol.quantity) / 1000000, 2 ) as area, |
| | | ROUND( sum(od.width * od.height * fol.quantity*p.total_thickness*2.5) / 1000000, 2 ) as weight, |
| | | fol.process_id, |
| | | aaa.teams_groups_name, |
| | | aaa.previous_process, |
| | | date( aaa.reporting_work_time) as reporting_work_time |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '入库' and aa.status!='已作废') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on od.product_id=p.id |
| | | left join (select teams_groups_name,process_id,previous_process,reporting_work_time from pp.reporting_work where this_process='包装' group by process_id) aaa on aaa.process_id=fol.process_id |
| | | |
| | | |
| | | |
| | | where |
| | | o.order_id=#{orderId} and fol.remarks=#{remarks} |
| | | and (fol.remarks is not null and fol.remarks !="") and (fol.process_id !="" and fol.process_id is not null) |
| | | where |
| | | o.customer_name=#{customerName} and fol.remarks=#{remarks} and o.project=#{project} |
| | | and (fol.remarks is not null and fol.remarks !="") and (fol.process_id !="" and fol.process_id is not null) |
| | | |
| | | group by fol.remarks,od.order_id |
| | | ) as kkk |
| | | left join pp.reporting_work rw on rw.process_id=kkk.process_id and rw.this_process=kkk.previous_process |
| | | group by kkk.remarks,kkk.order_id |
| | | group by fol.remarks,o.customer_name,o.project |
| | | ) as kkk |
| | | left join pp.reporting_work rw on rw.process_id=kkk.process_id and rw.this_process=kkk.previous_process |
| | | group by kkk.remarks,kkk.customer_name,kkk.project |
| | | |
| | | </select> |
| | | |