|
楼主 |
发表于 2020-5-12 15:38:12
|
显示全部楼层
本帖最后由 查查 于 2020-5-12 15:45 编辑
现在是KSQL不支持:
case when SQL.ISNULL(VENDOR.Vdr_Code, '') > '' then VENDOR.Vdr_Code else
case when SQL.ISNULL(VENDOR_2.Vdr_Code, '') > '' then VENDOR_2.Vdr_Code else '' end
end as M_VDR_CODE
如何在ACTION中用SQL? 直接写不支持啊
以下这里queryMODA,没有看到KSQL-->SQL的标记啊,因为还是要平台带 的保存的saveMODAction,
<action name="queryMODAPAction" procedure="bizQueryProcedure">
<permission name="range" type="List"/>
<private name="concept" type="String" value="MOD"/>
<private name="select" type="String" value="MOD.*,PARAUNIT.S_DESC as UNIT_DESC,PARAPKUNIT.S_DESC as PKUNIT_DESC,PARACURR.S_DESC as CURR_DESC,MOH.VDRFILE_NO as MOH_VDRFILE_NO,MOH.FILE_NO as MOH_FILE_NO,MOH.TRAN_DATE as MOH_TRAN_DATE,MOH.FRMORG_CODE as MOH_FRMORG_CODE,MOH.FRMORG_DESC as MOH_FRMORG_DESC,MOH.TOORG_CODE as MOH_TOORG_CODE,MOH.TOORG_DESC as MOH_TOORG_DESC,case when VENDOR.Vdr_Code > '' then VENDOR.TaxRate_Flag else VENDOR_2.TaxRate_Flag end as F_TAXRATE_FLAG,case when VENDOR.Vdr_Code > '' then VENDOR.Tax_Rate else VENDOR_2.Tax_Rate end as F_TAX_RATE,case when ( SQL.ISNULL(ORDID.PORD_ID, '') = 'W004' AND SQL.ISNULL(ORDID.P1, '') = '3' ) OR ( SQL.ISNULL(ORDID.PORD_ID, '') = 'W024' AND SQL.ISNULL(MOD.QTYTYPE, '') = '外发回厂不良' ) then 0 - MOD.QTY else MOD.QTY end as F_QTY,case when VENDOR.Vdr_Code > '' then VENDOR.Vdr_Code else VENDOR_2.Vdr_Code end as F_VDR_CODE,case when VENDOR.Vdr_Code > '' then VENDOR.Vdr_Namec else VENDOR_2.Vdr_Namec end as F_VDR_DESC,case when MOD2 > '' then MOD2.UNIT_PRICE else MOD.UNIT_PRICE end as UNIT_PRICE2,case when MOD2 > '' then MOD2.CURR_CODE else MOD2.CURR_CODE end as CURR_CODE2,case when MOD2 > '' then PARACURR2.S_DESC else PARACURR.S_DESC end as CURR_DESC2"/>
<private name="from" type="String" value="MOD MOD join MOH MOH on MOD.HID = MOH optional join VENDOR VENDOR on MOH.FRMORG_CODE = VENDOR.Vdr_Code optional join VENDOR VENDOR_2 on MOH.TOORG_CODE = VENDOR_2.Vdr_Code optional join PARA PARAUNIT on MOD.UNIT = PARAUNIT.S AND PARAUNIT.P = '300' optional join PARA PARAPKUNIT on MOD.PACKUNIT = PARAPKUNIT.S AND PARAPKUNIT.P = '300' optional join PARA PARACURR on PARACURR.S = MOD.CURR_CODE AND PARACURR.P = '200' optional join MOD MOD2 on MOD.Ffid1 = MOD2 optional join PARA PARACURR2 on PARACURR2.S = MOD2.CURR_CODE AND PARACURR2.P = '200' optional join ORDID ORDID on MOH.ORD_ID = ORDID.PORD_ID"/>
<private name="aggregate" type="String"/>
<private name="dataModel" type="String" value="/E2018/BASE/data"/>
<private name="fnModel" type="String"/>
<protected name="condition" type="String" value="VENDOR.Vdr_Code > '' OR VENDOR_2.Vdr_Code > ''"/>
<public name="distinct" type="Boolean" value="false"/>
<public name="idColumn" type="String" value="MOD"/>
<public name="filter" type="String"/>
<public name="limit" type="Integer"/>
<public name="offset" type="Integer"/>
<public name="columns" type="String"/>
<public name="orderBy" type="String"/>
<public name="aggregateColumns" type="String"/>
<public name="variables" type="Map"/>
<label language="zh_CN">queryMODAPAction</label>
</action>
|
|