You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
klintersrv/WEB-INF/conf/sysds_jimureport_wzxx.xml

886 lines
49 KiB

<?xml version="1.0" encoding="UTF-8"?>
<datasource>
<!-- 1 表示 sql语句dao 2表示存储过程dao 默认为sql语句dao-->
<dao id="wzxxmzypfyfzbDao" log="true" type="1">
<sql><![CDATA[
select b.yzxpkey,b.yzmc,c.wzgg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,e.YXQ,e.PH,c.ZCZH,c.wzcs,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYRQ >=? and g.FYRQ <=? order by d.JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="wzgg" type="12" />
<f name="YZSL" type="12" />
<f name="TYSL" type="12" />
<f name="ZHXS" type="12" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="JBDJ" type="8" />
<f name="YPYZJBJG" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="wzcs" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxzyypfyfzbDao" log="true" type="1">
<sql><![CDATA[
select b.yzxpkey,b.yzmc,c.wzgg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,e.YXQ,e.PH,c.ZCZH,c.wzcs,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYTIME >=? and g.FYTIME <=? order by d.JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="wzgg" type="12" />
<f name="YZSL" type="12" />
<f name="TYSL" type="12" />
<f name="ZHXS" type="12" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="JBDJ" type="8" />
<f name="YPYZJBJG" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="wzcs" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxallypfyfzbDao" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,wzgg,YZSL,TYSL,ZHXS,JBDW,RKDW,JJYS,JJKS,FYZL,jbdj,YPYZJBJG,dwview,FYRQ,YXQ,PH,ZCZH,wzcs,GYS FROM
(
select b.yzxpkey,b.yzmc,c.wzgg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,g.FYRQ,e.YXQ,e.PH,c.ZCZH,c.wzcs,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
union all
select b.yzxpkey,b.yzmc,c.wzgg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,g.FYTIME FYRQ,e.YXQ,e.PH,c.ZCZH,c.wzcs,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
) ORDER BY JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="wzgg" type="12" />
<f name="YZSL" type="12" />
<f name="TYSL" type="12" />
<f name="ZHXS" type="12" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="JBDJ" type="8" />
<f name="YPYZJBJG" type="12" />
<f name="DWVIEW" type="12" />
<f name="FYRQ" type="93" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="wzcs" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxypxstjbymx" type="1">
<sql>
select '' 编码, '' 耗材名称, '' 规格, '' 单位数量,'' 单位, '' 成本单价, '' 成本金额, '' 零售单价 ,'' 零售金额, '' 单价差额, '' 总金额差, '' 医生,'' 科室, '' 费用类别,'' 有效期,'' 批次,'' 批准文号,'' 生产厂家,'' 供应商 from dual where 1=2
</sql>
<fields>
<f name="编码" type="1" />
<f name="耗材名称" type="1" />
<f name="规格" type="1" />
<f name="单位数量" type="1" />
<f name="单位" type="1" />
<f name="成本单价" type="1" />
<f name="成本金额" type="1" />
<f name="零售单价" type="1" />
<f name="零售金额" type="1" />
<f name="单价差额" type="1" />
<f name="总金额差" type="1" />
<f name="医生" type="1" />
<f name="科室" type="1" />
<f name="费用类别" type="1" />
<f name="有效期" type="1" />
<f name="批次" type="1" />
<f name="注册证号" type="1" />
<f name="生产厂家" type="1" />
<f name="供应商" type="1" />
</fields>
</dao>
<dao id="wzxxypxstjbyhz" type="1">
<sql>
select '' 编码, '' 耗材名称, '' 规格, '' 单位数量,'' 单位,'' 成本金额, '' 零售金额, '' 总金额差, '' 组织结构,'' 费用类别,'' 有效期,'' 批次,'' 注册证号,'' 生产厂家,'' 供应商 from dual where 1=2
</sql>
<fields>
<f name="编码" type="1" />
<f name="耗材名称" type="1" />
<f name="规格" type="1" />
<f name="单位数量" type="1" />
<f name="单位" type="1" />
<f name="成本金额" type="1" />
<f name="零售金额" type="1" />
<f name="总金额差" type="1" />
<f name="组织结构" type="1" />
<f name="费用类别" type="1" />
<f name="有效期" type="1" />
<f name="批次" type="1" />
<f name="注册证号" type="1" />
<f name="生产厂家" type="1" />
<f name="供应商" type="1" />
</fields>
</dao>
<dao id="wzxxallyphzbyJjysDao" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
union all
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,WZCS,GYS ORDER BY JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxzyyphzbyJjysDao" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,WZCS,GYS ORDER BY JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxMzyphzbyJjysDao" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS ORDER BY JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxallyphzbyJjksDao" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
union all
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS ORDER BY JJKS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxzyyphzbyJjksDao" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS ORDER BY JJKS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxMzyphzbyJjksDao" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS ORDER BY JJKS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxcgtjmxDao" type="1" memo="采购统计">
<sql><![CDATA[
select a.PKEY,a.JGID,a.DJH,a.DPTID,a.XH,a.SFX_BM,a.KSKC_PC_PKEY,a.PH,a.YXQ,a.DW,a.SL,a.DJ,a.SJ,a.JE,a.SJJE,a.ZK,a.FPHM,a.FPJE,a.PCJG,a.DDMX_PKEY,a.BZ,b.MC,b.JBDW,b.ZHXS,c.WZCS,b.DWVIEW,b.RKDW,a.LOCKFLAG,c.WZGG
,'' 零进差价,d.value2 kclz,b.ybbm,b.ybmc,c.ZCZH,rkd.GYS,rkd.ZDRQ,rkd.ZDR from HIS_MMS_KC_RKD_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
left join MAIN_JGZDB d on B.kcfl=d.bh and d.jgzdlb_bh='Z00008' and d.JGID=b.JGID
left join HIS_MMS_KC_RKD rkd on a.djh=rkd.djh and a.JGID=rkd.JGID
where a.JGID=? #select# and rkd.SHZT='1' and rkd.ZDRQ >= ? and rkd.ZDRQ <=? order by a.djh,a.pkey
]]></sql>
<tables>
<table name="HIS_YFYK_RKD_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YFYK_RKD_MX" />
<f name="JGID" type="12" table="HIS_YFYK_RKD_MX" />
<f name="DJH" type="12" table="HIS_YFYK_RKD_MX" />
<f name="DPTID" type="12" table="HIS_YFYK_RKD_MX" />
<f name="XH" type="-5" table="HIS_YFYK_RKD_MX" />
<f name="SFX_BM" type="12" table="HIS_YFYK_RKD_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_RKD_MX" />
<f name="PH" type="12" table="HIS_YFYK_RKD_MX" />
<f name="YXQ" type="93" table="HIS_YFYK_RKD_MX" />
<f name="DW" type="12" table="HIS_YFYK_RKD_MX" />
<f name="SL" type="8" table="HIS_YFYK_RKD_MX" />
<f name="DJ" type="8" table="HIS_YFYK_RKD_MX" />
<f name="SJ" type="8" table="HIS_YFYK_RKD_MX" />
<f name="JE" type="8" table="HIS_YFYK_RKD_MX" />
<f name="SJJE" type="8" table="HIS_YFYK_RKD_MX" />
<f name="ZK" type="8" table="HIS_YFYK_RKD_MX" />
<f name="FPHM" type="12" table="HIS_YFYK_RKD_MX" />
<f name="FPJE" type="8" table="HIS_YFYK_RKD_MX" />
<f name="PCJG" type="8" table="HIS_YFYK_RKD_MX" />
<f name="DDMX_PKEY" type="12" table="HIS_YFYK_RKD_MX" />
<f name="BZ" type="12" table="HIS_YFYK_RKD_MX" />
<f name="MC" type="12"/>
<f name="JBDW" type="12"/>
<f name="ZHXS" type="8"/>
<f name="WZCS" type="12"/>
<f name="DWVIEW" type="12"/>
<f name="RKDW" type="12"/>
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_RKD_MX" />
<f name="WZGG" type="12"/>
<f name="零进差价" type="12"/>
<f name="kclz" type="12"/>
<f name="YBBM" type="12" />
<f name="YBMC" type="12" />
<f name="ZCZH" type="12" />
<f name="GYS" type="12" />
<f name="ZDRQ" type="93" />
<f name="ZDR" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxypcgtjbymx" type="1">
<sql>
select '' 科室,'' 采购日期, '' 编码, '' 耗材名称, '' 规格, '' 单位数量,'' 包装,'' 进价, '' 进货金额, '' 有效期,'' 批次,'' 注册证号,'' 生产厂家,'' 供应商,'' 单据号,'' 制单人 from dual where 1=2
</sql>
<fields>
<f name="科室" type="1" />
<f name="采购日期" type="1" />
<f name="编码" type="1" />
<f name="耗材名称" type="1" />
<f name="规格" type="1" />
<f name="单位数量" type="1" />
<f name="包装" type="1" />
<f name="进价" type="1" />
<f name="进货金额" type="1" />
<f name="有效期" type="1" />
<f name="批次" type="1" />
<f name="注册证号" type="1" />
<f name="生产厂家" type="1" />
<f name="供应商" type="1" />
<f name="单据号" type="1" />
<f name="制单人" type="1" />
</fields>
</dao>
<dao id="wzxxypcgtjbyhz" type="1">
<sql>
select '' 编码, '' 耗材名称, '' 规格, '' 单位数量,'' 包装,'' 注册证号,'' 生产厂家,'' 供应商,'' 单据号 from dual where 1=2
</sql>
<fields>
<f name="编码" type="1" />
<f name="耗材名称" type="1" />
<f name="规格" type="1" />
<f name="单位数量" type="1" />
<f name="包装" type="1" />
<f name="注册证号" type="1" />
<f name="生产厂家" type="1" />
<f name="供应商" type="1" />
<f name="单据号" type="1" />
</fields>
</dao>
<dao id="wzxxallypfyfzbDaoBySales" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,wzgg,YZSL,TYSL,ZHXS,JBDW,RKDW,JJYS,JJKS,FYZL,jbdj,YPYZJBJG,dwview,FYRQ,YXQ,PH,ZCZH,wzcs,GYS FROM
(
select b.yzxpkey,b.yzmc,c.wzgg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,g.FYRQ,e.YXQ,e.PH,c.ZCZH,c.wzcs,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
union all
select b.yzxpkey,b.yzmc,c.wzgg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,g.FYTIME FYRQ,e.YXQ,e.PH,c.ZCZH,c.wzcs,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
) ORDER BY JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="wzgg" type="12" />
<f name="YZSL" type="12" />
<f name="TYSL" type="12" />
<f name="ZHXS" type="12" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="JBDJ" type="8" />
<f name="YPYZJBJG" type="12" />
<f name="DWVIEW" type="12" />
<f name="FYRQ" type="93" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="wzcs" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxzyypfyfzbDaoBySales" log="true" type="1">
<sql><![CDATA[
select b.yzxpkey,b.yzmc,c.wzgg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,e.YXQ,e.PH,c.ZCZH,c.wzcs,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=? order by d.JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="wzgg" type="12" />
<f name="YZSL" type="12" />
<f name="TYSL" type="12" />
<f name="ZHXS" type="12" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="JBDJ" type="8" />
<f name="YPYZJBJG" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="wzcs" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxmzypfyfzbDaoBySales" log="true" type="1">
<sql><![CDATA[
select b.yzxpkey,b.yzmc,c.wzgg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,e.YXQ,e.PH,c.ZCZH,c.wzcs,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=? order by d.JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="wzgg" type="12" />
<f name="YZSL" type="12" />
<f name="TYSL" type="12" />
<f name="ZHXS" type="12" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="JBDJ" type="8" />
<f name="YPYZJBJG" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="wzcs" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxallyphzbyJjysDaoBySales" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
union all
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,WZCS,GYS ORDER BY JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxzyyphzbyJjysDaoBySales" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,WZCS,GYS ORDER BY JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxMzyphzbyJjysDaoBySales" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS ORDER BY JJYS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJYS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxallyphzbyJjksDaoBySales" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
union all
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS ORDER BY JJKS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxzyyphzbyJjksDaoBySales" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZXPKEY=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_MMS_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS ORDER BY JJKS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="wzxxMzyphzbyJjksDaoBySales" log="true" type="1">
<sql><![CDATA[
SELECT yzxpkey,yzmc,WZGG,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS FROM
(
select b.yzxpkey,b.yzmc,c.WZGG,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.WZCS,rkd.GYS from HIS_MMS_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_MMS_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_MMS_KC_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_MMS_KC_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.JGID=h.JGID left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.JGID=fpb.JGID where a.JGID=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,WZGG,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,WZCS,GYS ORDER BY JJKS
]]></sql>
<fields>
<f name="YZXPKEY" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="FYSL" type="4" />
<f name="CBJE" type="4" />
<f name="XSJE" type="4" />
<f name="ZHXS" type="8" />
<f name="JBDW" type="12" />
<f name="RKDW" type="12" />
<f name="JJKS" type="12" />
<f name="FYZL" type="12" />
<f name="DWVIEW" type="12" />
<f name="YXQ" type="93" />
<f name="PH" type="12" />
<f name="ZCZH" type="12" />
<f name="WZCS" type="12" />
<f name="GYS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
</datasource>