Commit 7614697d by wancheng

app驾驶舱代码优化

parent 5b81e3c8
...@@ -245,10 +245,10 @@ ...@@ -245,10 +245,10 @@
select select
a.PROJ_NAME, a.PROJ_NAME,
concat(left(max(a.PLAN_COMPLETION_DATE),4),'年',substring(max(a.PLAN_COMPLETION_DATE),5,2),'月',right(max(a.PLAN_COMPLETION_DATE),2),'日') as JHDATE, concat(left(max(a.PLAN_COMPLETION_DATE),4),'年',substring(max(a.PLAN_COMPLETION_DATE),5,2),'月',right(max(a.PLAN_COMPLETION_DATE),2),'日') as JHDATE,
concat(format(ifnull(sum(b.TOTAL_WT ),0),2),'吨') as JHCL, concat(format(ifnull(sum(b.NUM*b.UNIT_WT ),0),2),'吨') as JHCL,
concat(format(ifnull(sum(c.WEIGHT),0),2),'吨') as SJCL, concat(format(ifnull(sum(c.WEIGHT),0),2),'吨') as SJCL,
concat(format((ifnull( sum( c.AMOUNT ), 0 ) / ifnull( sum( b.NUM ), 0 ) * 100),2),'%') as SCJD, concat(format((ifnull( sum( c.WEIGHT ), 0 ) / ifnull( sum( b.NUM*b.UNIT_WT ), 0 ) * 100),2),'%') as SCJD,
concat(format((ifnull( sum( d.AMOUNT ), 0 ) / ifnull( sum( b.NUM ), 0 ) * 100),2),'%') as FHJD concat(format((ifnull( sum( d.WEIGHT ), 0 ) / ifnull( sum( b.NUM*b.UNIT_WT ), 0 ) * 100),2),'%') as FHJD
from hpjx.T_HPSC003 a from hpjx.T_HPSC003 a
join hpjx.T_HPSC004 b on b.PARENT_ID = a.PLAN_INFO_NO join hpjx.T_HPSC004 b on b.PARENT_ID = a.PLAN_INFO_NO
left join hpjx.T_HPkC003 c on c.PROD_ORDER_NO = b.PROD_ORDER_NO left join hpjx.T_HPkC003 c on c.PROD_ORDER_NO = b.PROD_ORDER_NO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment