This commit is contained in:
linfso 2024-07-22 11:10:53 +08:00
parent 6c98b06ee2
commit 85495c7b55

View File

@ -314,38 +314,38 @@
z.type_name as problem_type_name
from emis_waybill a
left join emis_country b on a.receive_country=b.code
left join emis_country c on a.send_country=c.code
left join emis_region d on a.receive_province=d.region_code
left join emis_region e on a.receive_city=e.region_code
left join emis_region f on a.receive_county=f.region_code
left join emis_country b on a.receive_country=b.code and b.del_flag='0'
left join emis_country c on a.send_country=c.code and c.del_flag='0'
left join emis_region d on a.receive_province=d.region_code and d.del_flag='0'
left join emis_region e on a.receive_city=e.region_code and e.del_flag='0'
left join emis_region f on a.receive_county=f.region_code and f.del_flag='0'
left join emis_region g on a.send_province=g.region_code
left join emis_region h on a.send_city=h.region_code
left join emis_region i on a.send_county=i.region_code
left join emis_region g on a.send_province=g.region_code and g.del_flag='0'
left join emis_region h on a.send_city=h.region_code and h.del_flag='0'
left join emis_region i on a.send_county=i.region_code and i.del_flag='0'
left join emis_trans_product j on a.product_type=j.prod_code
left join emis_trans_line k on a.trans_line_type=k.line_code
left join emis_site l on a.send_site_code=l.site_code
left join emis_site m on a.dispatch_underling_site_code=m.site_code
left join emis_trans_product j on a.product_type=j.prod_code and j.del_flag='0'
left join emis_trans_line k on a.trans_line_type=k.line_code and k.del_flag='0'
left join emis_site l on a.send_site_code=l.site_code and l.del_flag=0 and l.del_flag='0'
left join emis_site m on a.dispatch_underling_site_code=m.site_code and m.del_flag=0
left join emis_destination n on a.destination_code=n.dest_code
left join emis_site o on a.dispatch_site_code=o.site_code
left join emis_destination n on a.destination_code=n.dest_code and n.del_flag='0'
left join emis_site o on a.dispatch_site_code=o.site_code and o.del_flag='0'
left join sys_user p on a.dispatch_man_code=p.emp_code
left join emis_site q on a.print_site=q.site_code
left join sys_user r on a.print_man_code=r.emp_code
left join sys_user s on a.take_piece_employee_code=s.emp_code
left join sys_user t on a.operate_employee_code=t.emp_code
left join emis_site u on a.register_site_code=u.site_code
left join sys_user v on a.register_man_code=v.emp_code
left join emis_site w on a.current_site_code=w.site_code
left join emis_site x on a.next_site_code=x.site_code
left join emis_site y on a.last_site_code=y.site_code
left join emis_problem_type z on a.problem_type=z.id
left join sys_user p on a.dispatch_man_code=p.emp_code and p.del_flag='0'
left join emis_site q on a.print_site=q.site_code and q.del_flag='0'
left join sys_user r on a.print_man_code=r.emp_code and r.del_flag='0'
left join sys_user s on a.take_piece_employee_code=s.emp_code and s.del_flag='0'
left join sys_user t on a.operate_employee_code=t.emp_code and t.del_flag='0'
left join emis_site u on a.register_site_code=u.site_code and u.del_flag='0'
left join sys_user v on a.register_man_code=v.emp_code and v.del_flag='0'
left join emis_site w on a.current_site_code=w.site_code and w.del_flag='0'
left join emis_site x on a.next_site_code=x.site_code and x.del_flag='0'
left join emis_site y on a.last_site_code=y.site_code and y.del_flag='0'
left join emis_problem_type z on a.problem_type=z.id and z.del_flag='0'
left join emis_site a1 on a.send_center_code=a1.site_code
left join emis_site a2 on a.destination_center_code=a2.site_code
left join emis_site a1 on a.send_center_code=a1.site_code and a1.del_flag='0'
left join emis_site a2 on a.destination_center_code=a2.site_code and a2.del_flag='0'
</sql>
@ -403,38 +403,38 @@
z.type_name as problem_type_name
from emis_waybill a
left join emis_country b on a.receive_country=b.code
left join emis_country c on a.send_country=c.code
left join emis_region d on a.receive_province=d.region_code
left join emis_region e on a.receive_city=e.region_code
left join emis_region f on a.receive_county=f.region_code
left join emis_country b on a.receive_country=b.code and b.del_flag='0'
left join emis_country c on a.send_country=c.code and c.del_flag='0'
left join emis_region d on a.receive_province=d.region_code and d.del_flag='0'
left join emis_region e on a.receive_city=e.region_code and e.del_flag='0'
left join emis_region f on a.receive_county=f.region_code and f.del_flag='0'
left join emis_region g on a.send_province=g.region_code
left join emis_region h on a.send_city=h.region_code
left join emis_region i on a.send_county=i.region_code
left join emis_region g on a.send_province=g.region_code and g.del_flag='0'
left join emis_region h on a.send_city=h.region_code and h.del_flag='0'
left join emis_region i on a.send_county=i.region_code and i.del_flag='0'
left join emis_trans_product j on a.product_type=j.prod_code
left join emis_trans_line k on a.trans_line_type=k.line_code
left join emis_site l on a.send_site_code=l.site_code
left join emis_site m on a.dispatch_underling_site_code=m.site_code
left join emis_trans_product j on a.product_type=j.prod_code and j.del_flag='0'
left join emis_trans_line k on a.trans_line_type=k.line_code and k.del_flag='0'
left join emis_site l on a.send_site_code=l.site_code and l.del_flag=0 and l.del_flag='0'
left join emis_site m on a.dispatch_underling_site_code=m.site_code and m.del_flag=0
left join emis_destination n on a.destination_code=n.dest_code
left join emis_site o on a.dispatch_site_code=o.site_code
left join emis_destination n on a.destination_code=n.dest_code and n.del_flag='0'
left join emis_site o on a.dispatch_site_code=o.site_code and o.del_flag='0'
left join sys_user p on a.dispatch_man_code=p.emp_code
left join emis_site q on a.print_site=q.site_code
left join sys_user r on a.print_man_code=r.emp_code
left join sys_user s on a.take_piece_employee_code=s.emp_code
left join sys_user t on a.operate_employee_code=t.emp_code
left join emis_site u on a.register_site_code=u.site_code
left join sys_user v on a.register_man_code=v.emp_code
left join emis_site w on a.current_site_code=w.site_code
left join emis_site x on a.next_site_code=x.site_code
left join emis_site y on a.last_site_code=y.site_code
left join emis_problem_type z on a.problem_type=z.id
left join sys_user p on a.dispatch_man_code=p.emp_code and p.del_flag='0'
left join emis_site q on a.print_site=q.site_code and q.del_flag='0'
left join sys_user r on a.print_man_code=r.emp_code and r.del_flag='0'
left join sys_user s on a.take_piece_employee_code=s.emp_code and s.del_flag='0'
left join sys_user t on a.operate_employee_code=t.emp_code and t.del_flag='0'
left join emis_site u on a.register_site_code=u.site_code and u.del_flag='0'
left join sys_user v on a.register_man_code=v.emp_code and v.del_flag='0'
left join emis_site w on a.current_site_code=w.site_code and w.del_flag='0'
left join emis_site x on a.next_site_code=x.site_code and x.del_flag='0'
left join emis_site y on a.last_site_code=y.site_code and y.del_flag='0'
left join emis_problem_type z on a.problem_type=z.id and z.del_flag='0'
left join emis_site a1 on a.send_center_code=a1.site_code
left join emis_site a2 on a.destination_center_code=a2.site_code
left join emis_site a1 on a.send_center_code=a1.site_code and a1.del_flag='0'
left join emis_site a2 on a.destination_center_code=a2.site_code and a2.del_flag='0'
</sql>