问题描述
- 怎么样实现图表的显示!这个sql什么意思呀!
- String sql=""select A.P_DATE'采购入库' as CGTYPEsum(A.P_NUMBER) AS P_NUMBERsum(A.Z_PRICE) AS Z_PRICEC.PROVNAME
+"" CASE F.PRODLEVEL WHEN '1' THEN '原厂' WHEN '2' THEN '正厂' WHEN '3' THEN '副厂' WHEN '4' THEN '品牌' WHEN '5' THEN '拆车件' END AS PRODLEVEL
+"" CONCAT(I.className'->'H.className'->'g.className) as CLASSNAMEF.NOF.PRODNAMEF.OENO""
+"" FROM ""
+"" (select left(A.P_DATE7) AS P_DATE A.ID'采购入库' as CGTYPEB.P_NUMBERB.P_PRICEB.Z_PRICEB.P_WARES_IDA.P_SUPPLIER_IDA.D_STORAGE_IDB.LOCATION_IDA.P_TYPEA.AUDIT_STATUSA.COMPANY_ID""
+"" from jxc_t_purchase A""
+"" left join jxc_t_purchase_detail B on A.ID=B.P_PURCHASE_ID""
+"" UNION""
+"" select left(C.TIME7) AS P_DATEC.ID'采购退货' as CGTYPED.NUM AS P_NUMBERD.PRICE AS P_PRICED.NUM*D.PRICE AS Z_PRICE
+"" D.PRODUCTS_ID AS P_WARES_IDC.P_SUPPLIER_IDC.STORAGE_ID AS D_STORAGE_IDD.LOCATION_ID'0' AS P_TYPEC.AUDIT_STATUSC.COMPANY_ID""
+"" from jxc_t_purchasing_return C""
+"" left join jxc_t_purchasing_return_detailed D on C.ID=D.OUTBOUND_ID""
+"" ) A""
+"" left join jxc_t_products F on A.P_WARES_ID=F.ID""
+"" left join jxc_t_providers C on A.P_SUPPLIER_ID=C.ID""
+"" left join shopping_goodsclass G on G.ID=F.GOODSCLASS_ID""
+"" left join shopping_goodsclass H on H.ID=G.parent_id""
+"" left join shopping_goodsclass I on I.ID=H.parent_id""
+"" where A.P_TYPE='0' and A.AUDIT_STATUS='3' "";
解决方案
不就是左连接么。。。。
时间: 2024-09-24 01:51:50