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.
3300 lines
126 KiB
3300 lines
126 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<datasource>
|
|
<!-- 1 表示 sql语句dao 2表示存储过程dao 默认为sql语句dao -->
|
|
<!--调价单自动执行 -->
|
|
<dao id="histjdAutodao" type="1">
|
|
<sql>select
|
|
a.JGID,a.SFX_BM,a.DJH,a.TJDW,a.SXRQ,a.THSJ,a.QTTHSJ,a.ZT,b.JBDW
|
|
from HIS_YFYK_TJB a
|
|
left join HIS_SFX b on a.JGID=b.JGID and
|
|
a.SFX_BM=b.BM
|
|
where a.JGID =? and a.ZT='2' and a.JHSXRQ between ?
|
|
and ?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_TJB" insert="false" update="true" delete="false">
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="TJDW" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="SXRQ" type="93" table="HIS_YFYK_TJB" />
|
|
<f name="THSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="QTTHSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="ZT" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="JBDW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--订单信息 -->
|
|
<dao id="hisdddao" type="1">
|
|
<sql>select JGID,DJH,DPTID,GYS,LZ,ZDRQ,HB,RATE,ZXF,ZDR,SHZT,WCZT,SHR,SHRQ,JYRQ,JE,BZ,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_YFYK_DD where JGID=? and DJH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DD" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
<primary>WCZT</primary>
|
|
<primary>SHZT</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_DD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DD" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_DD" />
|
|
<f name="GYS" type="12" table="HIS_YFYK_DD" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_DD" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_DD" />
|
|
<f name="HB" type="12" table="HIS_YFYK_DD" />
|
|
<f name="RATE" type="8" table="HIS_YFYK_DD" />
|
|
<f name="ZXF" type="8" table="HIS_YFYK_DD" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_DD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_DD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_DD" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_DD" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_DD" />
|
|
<f name="JYRQ" type="93" table="HIS_YFYK_DD" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DD" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DD" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_DD" />
|
|
<f name="打印日期" type="93" table="HIS_YFYK_DD" />
|
|
<f name="大写总金额" type="12" table="HIS_YFYK_DD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--订单明细信息 -->
|
|
<dao id="hisddmxdao" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.DPTID,a.DJH,a.XH,a.SFX_BM,a.DHRQ,a.QQDHSL,a.SJDHSL,a.SJJHSL,a.DW,a.DJ,a.JE,a.CGJHMX_PKEY,a.BZ,b.MC,c.CSXX,b.DWVIEW,a.LOCKFLAG
|
|
from HIS_YFYK_DD_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
where a.JGID=? and a.DJH=? order by a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DD_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="XH" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="DHRQ" type="93" table="HIS_YFYK_DD_MX" />
|
|
<f name="QQDHSL" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="SJDHSL" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="SJJHSL" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="CGJHMX_PKEY" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_DD_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室库存 -->
|
|
<dao id="hiskskcdao" type="1">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,SL,KYSL,DJSL,HWM_BM,KCXX,KCSX,BZKC,BCKCFS,LOCKFLAG from HIS_KSKC where JGID=? and DPTID=? and SFX_BM=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSKC" />
|
|
<f name="DPTID" type="12" table="HIS_KSKC" />
|
|
<f name="SL" type="8" table="HIS_KSKC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC" />
|
|
<f name="HWM_BM" type="12" table="HIS_KSKC" />
|
|
<f name="KCXX" type="8" table="HIS_KSKC" />
|
|
<f name="KCSX" type="8" table="HIS_KSKC" />
|
|
<f name="BZKC" type="8" table="HIS_KSKC" />
|
|
<f name="BCKCFS" type="12" table="HIS_KSKC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室库存批次 -->
|
|
<dao id="hiskskcpcdao" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.KSKC_PKEY,a.PH,a.YXQ,a.SL,a.KYSL,a.DJSL,a.DJ,a.JBDJ,a.SJ,a.JBSJ,a.YSPKEY,a.LOCKFLAG,a.FIRST_KSKC_PC_PKEY,a.CGSHRQ,a.SCRQ from HIS_KSKC_PC a where a.JGID=? and a.KSKC_PKEY=? and PH=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBDJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="SJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBSJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="YSPKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
<f name="FIRST_KSKC_PC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="CGSHRQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SCRQ" type="93" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室库存批次 pkey -->
|
|
<dao id="hiskskcpcpkeydao" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.KSKC_PKEY,a.PH,a.SCRQ,a.YXQ,a.SL,a.KYSL,a.DJSL,a.DJ,a.JBDJ,a.SJ,a.JBSJ,a.YSPKEY,a.LOCKFLAG,a.FIRST_KSKC_PC_PKEY,a.CGSHRQ from HIS_KSKC_PC a where a.JGID=? and a.PKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="SCRQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBDJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="SJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBSJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="YSPKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
<f name="FIRST_KSKC_PC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="CGSHRQ" type="93" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室库存批次 来源pkey -->
|
|
<dao id="hiskskcpcyspkeydao" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.KSKC_PKEY,a.PH,a.YXQ,a.SL,a.KYSL,a.DJSL,a.DJ,a.JBDJ,a.SJ,a.JBSJ,a.YSPKEY,a.LOCKFLAG,a.FIRST_KSKC_PC_PKEY,a.CGSHRQ from HIS_KSKC_PC a where a.JGID=? and a.KSKC_PKEY=? and a.YSPKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBDJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="SJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBSJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="YSPKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
<f name="FIRST_KSKC_PC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="CGSHRQ" type="93" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室每日库存 -->
|
|
<dao id="hisksrkcdao" type="1">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION,LOCKFLAG from HIS_KSRKC where JGID=? and DPTID=? and SFX_BM=? and RQ between ? and ?</sql>
|
|
<tables>
|
|
<table name="HIS_KSRKC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DPTID</primary>
|
|
<primary>RQ</primary>
|
|
<primary>JSSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSRKC" />
|
|
<f name="JGID" type="12" table="HIS_KSRKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSRKC" />
|
|
<f name="DPTID" type="12" table="HIS_KSRKC" />
|
|
<f name="KSSL" type="8" table="HIS_KSRKC" />
|
|
<f name="JSSL" type="8" table="HIS_KSRKC" />
|
|
<f name="RQ" type="93" table="HIS_KSRKC" />
|
|
<f name="RQVERSION" type="12" table="HIS_KSRKC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSRKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室每日库存-批次 -->
|
|
<dao id="hisksrkcpcdao" type="1">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,KSKC_PC_PKEY,KSSL,JSSL,RQ,RQVERSION,LOCKFLAG from HIS_KSRKC_PC where JGID=? and DPTID=? and KSKC_PC_PKEY=? and RQ between ? and ?</sql>
|
|
<tables>
|
|
<table name="HIS_KSRKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DPTID</primary>
|
|
<primary>KSKC_PC_PKEY</primary>
|
|
<primary>RQ</primary>
|
|
<primary>JSSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="DPTID" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="KSSL" type="8" table="HIS_KSRKC_PC" />
|
|
<f name="JSSL" type="8" table="HIS_KSRKC_PC" />
|
|
<f name="RQ" type="93" table="HIS_KSRKC_PC" />
|
|
<f name="RQVERSION" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSRKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室库存操作记录 -->
|
|
<dao id="hiskskcjldao" type="1">
|
|
<sql>select PKEY,JGID,DPTID,SFX_BM,KSKC_PC_PKEY,CZRQ,CZR,DJH,LX,SL,DW,DJ,JE,JYSL,LOCKFLAG,JBDW,JBSL,JBJYSL,HZPKEY,JZPKEY,EXEPKEY,YZMX,FYMXBPKEY from HIS_KSKCJL where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_KSKCJL" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKCJL" />
|
|
<f name="JGID" type="12" table="HIS_KSKCJL" />
|
|
<f name="DPTID" type="12" table="HIS_KSKCJL" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSKCJL" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_KSKCJL" />
|
|
<f name="CZRQ" type="93" table="HIS_KSKCJL" />
|
|
<f name="CZR" type="12" table="HIS_KSKCJL" />
|
|
<f name="DJH" type="12" table="HIS_KSKCJL" />
|
|
<f name="LX" type="12" table="HIS_KSKCJL" />
|
|
<f name="SL" type="8" table="HIS_KSKCJL" />
|
|
<f name="DW" type="12" table="HIS_KSKCJL" />
|
|
<f name="DJ" type="8" table="HIS_KSKCJL" />
|
|
<f name="JE" type="8" table="HIS_KSKCJL" />
|
|
<f name="JYSL" type="8" table="HIS_KSKCJL" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKCJL" />
|
|
<f name="JBDW" type="12" table="HIS_KSKCJL" />
|
|
<f name="JBSL" type="8" table="HIS_KSKCJL" />
|
|
<f name="JBJYSL" type="8" table="HIS_KSKCJL" />
|
|
<f name="HZPKEY" type="12" table="HIS_KSKCJL" />
|
|
<f name="JZPKEY" type="12" table="HIS_KSKCJL" />
|
|
<f name="EXEPKEY" type="12" table="HIS_KSKCJL" />
|
|
<f name="YZMX" type="12" table="HIS_KSKCJL" />
|
|
<f name="FYMXBPKEY" type="12" table="HIS_KSKCJL" />
|
|
</fields>
|
|
</dao>
|
|
<!--科室库存-系统自动结转使用 -->
|
|
<dao id="hiskskcjzdao" type="1">
|
|
<sql><![CDATA[select PKEY,JGID,SFX_BM,DPTID,SL,KYSL,DJSL,HWM_BM,KCXX,KCSX,BZKC,BCKCFS,LOCKFLAG from HIS_KSKC where JGID=? and SL>0]]></sql>
|
|
<tables>
|
|
<table name="HIS_KSKC" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSKC" />
|
|
<f name="DPTID" type="12" table="HIS_KSKC" />
|
|
<f name="SL" type="8" table="HIS_KSKC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC" />
|
|
<f name="HWM_BM" type="12" table="HIS_KSKC" />
|
|
<f name="KCXX" type="8" table="HIS_KSKC" />
|
|
<f name="KCSX" type="8" table="HIS_KSKC" />
|
|
<f name="BZKC" type="8" table="HIS_KSKC" />
|
|
<f name="BCKCFS" type="12" table="HIS_KSKC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室库存批次 -->
|
|
<dao id="hiskskcpcjzdao" type="1">
|
|
<sql><![CDATA[select a.PKEY,a.JGID,a.KSKC_PKEY,a.PH,a.SCRQ,a.YXQ,a.SL,a.KYSL,a.DJSL,a.LOCKFLAG from HIS_KSKC_PC a where a.JGID=? and a.KSKC_PKEY=? and a.SL>0]]></sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="SCRQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨单 -->
|
|
<dao id="hisdbddao" log="true" type="1">
|
|
<sql>select JGID,DJH,SQDJH,SQKS,JSKS,LZ,CKRQ,CKR,CKSHRQ,CKSHR,RKSHRQ,RKSHR,WCZT,SHZT,RKZT,ZYLX,JE,SJJE,ZT,BZ,LOCKFLAG,DBTYPE,sysdate 打印日期,'' 大写总金额
|
|
from HIS_YFYK_DBD where JGID=? and DJH=?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBD" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
<primary>WCZT</primary>
|
|
<primary>SHZT</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="SQDJH" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="SQKS" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="JSKS" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="CKRQ" type="93" table="HIS_YFYK_DBD" />
|
|
<f name="CKR" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="CKSHRQ" type="93" table="HIS_YFYK_DBD" />
|
|
<f name="CKSHR" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="RKSHRQ" type="93" table="HIS_YFYK_DBD" />
|
|
<f name="RKSHR" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="RKZT" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="ZYLX" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBD" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBD" />
|
|
<f name="ZT" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_DBD" />
|
|
<f name="DBTYPE" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="打印日期" type="93" table="HIS_YFYK_DBD" />
|
|
<f name="大写总金额" type="12" table="HIS_YFYK_DBD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨单明细 -->
|
|
<dao id="hisdbdmxdao" log="true" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.DJH,row_number() over(order by a.SFX_BM) XH,a.SFX_BM,a.KSKC_PC_PKEY,a.DBSQMX_PKEY,a.SL,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,b.MC,b.JBDW,b.RKDW,b.ZHXS,b.JG,b.JBJG,c.KYSL,c.PH,c.KSKC_PKEY,c.YXQ,
|
|
b.DWVIEW,sq.SL SQSL,sq.SJDBSL,sq.DW SQDW,c.DJ PCDJ,c.JBDJ PCJBDJ,c.SJ PCSJ,c.JBSJ PCJBSJ,y.CSXX,y.GG,a.LOCKFLAG,b.ybbm,b.ybmc,c.FIRST_KSKC_PC_PKEY
|
|
from HIS_YFYK_DBD_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_KSKC_PC c on a.JGID=c.JGID and c.PKEY=a.KSKC_PC_PKEY
|
|
left join HIS_YFYK_DBSQ_MX sq on a.JGID=sq.JGID and a.DBSQMX_PKEY=sq.PKEY
|
|
left join HIS_YPXX y on b.BM=y.BM
|
|
where a.JGID=? and a.DJH=? order by XH asc
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBD_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,JGID,DJH,XH,SFX_BM,KSKC_PC_PKEY,DBSQMX_PKEY,SL,DW,DJ,SJ,JE,SJJE,
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="XH" type="-5" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="DBSQMX_PKEY" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="PH" type="12" />
|
|
<f name="KSKC_PKEY" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="SQSL" type="8" />
|
|
<f name="SJDBSL" type="8" />
|
|
<f name="SQDW" type="12" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_DBD_MX" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="FIRST_KSKC_PC_PKEY" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨单查询 -->
|
|
<dao id="dbdquerydao" log="true" type="1">
|
|
<sql>select JGID,DJH,SQDJH,SQKS,JSKS,LZ,CKRQ,CKR,CKSHRQ,CKSHR,RKSHRQ,RKSHR,WCZT,SHZT,RKZT,ZYLX,JE,SJJE,ZT,BZ
|
|
from HIS_YFYK_DBD where JGID=? and DBTYPE = ? and CKRQ between ? and ?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBD" insert="false" update="false" delete="false">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="SQDJH" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="SQKS" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="JSKS" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="CKRQ" type="93" table="HIS_YFYK_DBD" />
|
|
<f name="CKR" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="CKSHRQ" type="93" table="HIS_YFYK_DBD" />
|
|
<f name="CKSHR" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="RKSHRQ" type="93" table="HIS_YFYK_DBD" />
|
|
<f name="RKSHR" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="RKZT" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="ZYLX" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBD" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBD" />
|
|
<f name="ZT" type="12" table="HIS_YFYK_DBD" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DBD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨单申请查询 -->
|
|
<dao id="hisdbquerydao" type="1">
|
|
<sql><![CDATA[select a.JGID,a.LZ,a.DJH,a.SQKS,a.JSKS,a.ZDRQ,a.ZDR,a.WCZT,a.SHZT,a.SHR,a.SHRQ,a.JE,a.SJJE,a.BZ from HIS_YFYK_DBSQ a
|
|
where a.JGID=? and a.ZDRQ between ? and ? #select# ]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBSQ" insert="false" update="false" delete="false">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SQKS" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="JSKS" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_DBSQ" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_DBSQ" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBSQ" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBSQ" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DBSQ" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨单申请明细查询 -->
|
|
<dao id="hisdbmxquerydao" type="1">
|
|
<sql><![CDATA[select a.PKEY,a.JGID,a.DJH,a.XH,a.SFX_BM,a.KSKC_PC_PKEY,a.SL,a.SJDBSL,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.CSXX,c.GG,d.SQKS,d.JSKS,b.DWVIEW,
|
|
d.LZ,pc.PH,pc.YXQ,pc.DJ PCDJ,pc.JBDJ PCJBDJ,pc.SJ PCSJ,pc.JBSJ PCJBSJ,pc.KYSL
|
|
from HIS_YFYK_DBSQ_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_YFYK_DBSQ d on a.JGID=d.JGID and a.DJH=d.DJH
|
|
left join HIS_KSKC_PC pc on a.JGID=pc.JGID and pc.PKEY=a.KSKC_PC_PKEY
|
|
where a.JGID=? and a.DJH=? order by a.XH]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBSQ_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJDBSL" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="SQKS" type="12" />
|
|
<f name="JSKS" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="LZ" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨单申请 -单据号查询 -->
|
|
<dao id="hisdbsqquerydao" type="1">
|
|
<sql><![CDATA[select a.JGID,a.LZ,a.DJH,a.SQKS,a.JSKS,a.ZDRQ,a.ZDR,a.WCZT,a.SHZT,a.SHR,a.SHRQ,a.JE,a.SJJE,a.BZ from HIS_YFYK_DBSQ a
|
|
where a.JGID=? and a.DJH=?]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBSQ" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SQKS" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="JSKS" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_DBSQ" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_DBSQ" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBSQ" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBSQ" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DBSQ" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨单申请明细更新 -->
|
|
<dao id="hisdbmxupdao" type="1">
|
|
<sql><![CDATA[select a.PKEY,a.JGID,a.DJH,a.XH,a.SFX_BM,a.SL,a.SJDBSL,a.DW,a.DJ,a.SJ,a.JE,a.SJJE
|
|
from HIS_YFYK_DBSQ_MX a
|
|
where a.JGID=? and a.DJH=?]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBSQ_MX" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJDBSL" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室库存POP -->
|
|
<dao id="hiskcpopdao" type="1">
|
|
<sql><![CDATA[select a.SFX_BM,a.KYSL,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,b.DWVIEW,c.CSXX
|
|
from HIS_KSKC a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
where a.JGID=? and a.DPTID=? and a.KYSL>0 and (b.BM like ? or b.MC like ? or EXISTS (SELECT 1 FROM HIS_SFX_ZJM z WHERE z.SFX_BM = b.BM and z.JGID=b.JGID and z.PYM like ?))]]></sql>
|
|
<fields>
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室批次库存POP -->
|
|
<dao id="hispckcpopdao" type="1">
|
|
<sql><![CDATA[
|
|
select b.PKEY,b.PH,b.SCRQ,b.YXQ,b.KYSL,c.BM,c.MC,c.JBDW,c.ZHXS,c.RKDW,c.DWVIEW,y.CSXX,y.GG,b.DJ,b.JBDJ,b.SJ,b.JBSJ,a.SFX_BM,c.YBBM,c.YBMC
|
|
from HIS_KSKC a
|
|
left join HIS_KSKC_PC b on a.JGID=b.JGID and a.PKEY=b.KSKC_PKEY
|
|
left join HIS_SFX c on a.JGID=c.JGID and a.SFX_BM=c.BM
|
|
left join HIS_YPXX y on c.BM=y.BM
|
|
where a.JGID=? and c.GLLX='Y' and a.DPTID=? and b.KYSL>0 and c.KCFL in (select bh from MAIN_JGZDB where JGID=a.JGID and jgzdlb_bh='Z00008' and value2 like ?) and (c.BM like ? or c.MC like ? or EXISTS (SELECT 1 FROM HIS_SFX_ZJM z WHERE z.SFX_BM = c.BM and z.JGID=c.JGID and z.PYM like ?))]]></sql>
|
|
|
|
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="SCRQ" type="93" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="BM" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="DJ" type="8" />
|
|
<f name="JBDJ" type="8" />
|
|
<f name="SJ" type="8" />
|
|
<f name="JBSJ" type="8" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室批次库存查询 -->
|
|
<dao id="kskcpcquerydao" type="1">
|
|
<sql><![CDATA[select b.PKEY,b.JGID,b.KSKC_PKEY,b.PH,b.YXQ,b.SL,b.KYSL,b.DJSL,b.LOCKFLAG
|
|
from HIS_KSKC a
|
|
left join HIS_KSKC_PC b on a.JGID=b.JGID and a.PKEY=b.KSKC_PKEY
|
|
where a.JGID=? and a.SFX_BM=? and a.DPTID=? and b.KYSL>0 order by PKEY asc]]></sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室批次库存查询-PCPKEY -->
|
|
<dao id="kskcpcpkeyquerydao" type="1">
|
|
<sql><![CDATA[select b.PKEY,b.JGID,b.KSKC_PKEY,b.PH,b.YXQ,b.SL,b.KYSL,b.DJSL,b.DJ,b.JBDJ,b.SJ,b.JBSJ,b.LOCKFLAG
|
|
from HIS_KSKC a
|
|
left join HIS_KSKC_PC b on a.JGID=b.JGID and a.PKEY=b.KSKC_PKEY
|
|
where a.JGID=? and a.SFX_BM=? and a.DPTID=? and b.PKEY=? and b.KYSL>0 order by PKEY asc]]></sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBDJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="SJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBSJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hisrkddao" type="1">
|
|
<sql>select JGID,DJH,DPTID,GYS,LZ,ZDRQ,DD_DJH,RKLX,HB,RATE,ZXF,ZDR,SHZT,WCZT,SHR,SHRQ,JE,SJJE,BZ,LOCKFLAG,sysdate 打印日期,'' 大写总金额,'' 零进差价合计 from HIS_YFYK_RKD where JGID=? and DJH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_RKD" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
<primary>SHZT</primary>
|
|
<primary>WCZT</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="GYS" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_RKD" />
|
|
<f name="DD_DJH" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="RKLX" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="HB" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="RATE" type="8" table="HIS_YFYK_RKD" />
|
|
<f name="ZXF" type="8" table="HIS_YFYK_RKD" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_RKD" />
|
|
<f name="JE" type="8" table="HIS_YFYK_RKD" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_RKD" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_RKD" />
|
|
<f name="打印日期" type="93" table="HIS_YFYK_RKD" />
|
|
<f name="大写总金额" type="12" table="HIS_YFYK_RKD" />
|
|
<f name="零进差价合计" type="12" table="HIS_YFYK_RKD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hisrkdmxdao" type="1">
|
|
<sql>
|
|
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.CSXX,b.DWVIEW,b.RKDW,a.LOCKFLAG,c.GG
|
|
,'' 零进差价,d.value2 kclz,b.ybbm,b.ybmc,c.ZCZH,a.SCRQ from HIS_YFYK_RKD_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join MAIN_JGZDB d on b.kcfl=d.bh and d.jgzdlb_bh='Z00008' and d.JGID=b.JGID
|
|
where a.JGID=? and a.DJH=? order by 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="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_RKD_MX" />
|
|
<f name="GG" 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="SCRQ" type="93" table="HIS_YFYK_RKD_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="histhddao" type="1">
|
|
<sql>select JGID,DJH,DPTID,GYS,LZ,ZDRQ,ZDR,SHZT,WCZT,SHR,SHRQ,JE,SJJE,RK_DJH,BZ,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_YFYK_THD where JGID=? and DJH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_THD" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
//JGID,DJH,DPTID,GYS,ZDRQ,ZDR,SHZT,WCZT,SHR,SHRQ,JE,SJJE,BZ,
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_THD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_THD" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_THD" />
|
|
<f name="GYS" type="12" table="HIS_YFYK_THD" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_THD" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_THD" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_THD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_THD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_THD" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_THD" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_THD" />
|
|
<f name="JE" type="8" table="HIS_YFYK_THD" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_THD" />
|
|
<f name="RK_DJH" type="12" table="HIS_YFYK_THD" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_THD" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_THD" />
|
|
<f name="打印日期" type="93" table="HIS_YFYK_THD" />
|
|
<f name="大写总金额" type="12" table="HIS_YFYK_THD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="histhdmxdao" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.DJH,a.XH,a.RKDMX_PKEY,a.SL,a.THYY,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,a.FPHM,a.FPJE,a.PCJG,a.BZ,b.MC,b.JBDW,b.ZHXS,c.CSXX,r.SFX_BM,r.PH,r.YXQ,r.SL RKSL,a.KSKC_PC_PKEY,r.DPTID,r.DW RKDW,r.DJ RKDJ,r.SJ RKSJ,e.PKEY PCPKEY,e.KYSL,e.DJSL,e.KSKC_PKEY,
|
|
b.DWVIEW,a.LOCKFLAG,c.GG
|
|
from HIS_YFYK_THD_MX a
|
|
left join HIS_YFYK_RKD_MX r on a.JGID=r.JGID and a.RKDMX_PKEY=r.PKEY
|
|
left join HIS_SFX b on r.JGID=b.JGID and r.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSKC_PC e on r.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY
|
|
where a.JGID=? and a.DJH=? order by a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_THD_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_THD_MX" />
|
|
<f name="RKDMX_PKEY" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="THYY" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="FPHM" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="FPJE" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="PCJG" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="RKSL" type="8" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="RKDJ" type="8" />
|
|
<f name="RKSJ" type="8" />
|
|
<f name="PCPKEY" type="12" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="KSKC_PKEY" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_THD_MX" />
|
|
<f name="GG" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="kskcKckjDao" log="true" type="1">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,SL,KYSL,DJSL,HWM_BM,KCXX,KCSX,BZKC,BCKCFS,LOCKFLAG from HIS_KSKC where JGID=? and PKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
<primary>DJSL</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,JGID,SFX_BM,DPTID,SL,KYSL,DJSL,HWM_BM,KCXX,KCSX,BZKC,BCKCFS
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSKC" />
|
|
<f name="DPTID" type="12" table="HIS_KSKC" />
|
|
<f name="SL" type="8" table="HIS_KSKC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC" />
|
|
<f name="HWM_BM" type="12" table="HIS_KSKC" />
|
|
<f name="KCXX" type="8" table="HIS_KSKC" />
|
|
<f name="KCSX" type="8" table="HIS_KSKC" />
|
|
<f name="BZKC" type="8" table="HIS_KSKC" />
|
|
<f name="BCKCFS" type="12" table="HIS_KSKC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="kskcpcKckjDao" log="true" type="1">
|
|
<sql>select PKEY,JGID,KSKC_PKEY,PH,YXQ,SL,KYSL,DJSL,LOCKFLAG,FIRST_KSKC_PC_PKEY from HIS_KSKC_PC where JGID=? and PKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>KSKC_PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
<primary>DJSL</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,JGID,KSKC_PKEY,PH,YXQ,SL,KYSL,DJSL
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
<f name="FIRST_KSKC_PC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="ksrkcKskjDao" log="true" type="1">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION,LOCKFLAG from HIS_KSRKC where JGID=? and DPTID=? and SFX_BM=? and RQVERSION=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSRKC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DPTID</primary>
|
|
<primary>KSSL</primary>
|
|
<primary>JSSL</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSRKC" />
|
|
<f name="JGID" type="12" table="HIS_KSRKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSRKC" />
|
|
<f name="DPTID" type="12" table="HIS_KSRKC" />
|
|
<f name="KSSL" type="8" table="HIS_KSRKC" />
|
|
<f name="JSSL" type="8" table="HIS_KSRKC" />
|
|
<f name="RQ" type="93" table="HIS_KSRKC" />
|
|
<f name="RQVERSION" type="12" table="HIS_KSRKC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSRKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="ksrkcpcKskjDao" log="true" type="1">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,KSKC_PC_PKEY,KSSL,JSSL,RQ,RQVERSION,LOCKFLAG from HIS_KSRKC_PC where JGID=? and DPTID=? and SFX_BM=? and KSKC_PC_PKEY=? and RQVERSION=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSRKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DPTID</primary>
|
|
<primary>KSKC_PC_PKEY</primary>
|
|
<primary>KSSL</primary>
|
|
<primary>JSSL</primary>
|
|
<primary>RQVERSION</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,JGID,SFX_BM,DPTID,KSKC_PC_PKEY,KSSL,JSSL,RQ,RQVERSION
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="DPTID" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="KSSL" type="8" table="HIS_KSRKC_PC" />
|
|
<f name="JSSL" type="8" table="HIS_KSRKC_PC" />
|
|
<f name="RQ" type="93" table="HIS_KSRKC_PC" />
|
|
<f name="RQVERSION" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSRKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiscgjhdao" type="1">
|
|
<sql>select JGID,DJH,DPTID,LZ,ZDRQ,ZDR,SHRQ,SHR,WCZT,SHZT,JE,SJJE,BZ,LOCKFLAG from HIS_YFYK_CGJH where JGID=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_CGJH" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_CGJH" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_CGJH" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="JE" type="8" table="HIS_YFYK_CGJH" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_CGJH" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_CGJH" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiscgjhmxdao" type="1" memo="采购计划明细数据dao">
|
|
<sql>select a.PKEY,a.JGID,a.DJH,a.XH,a.SFX_BM,a.SL,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,a.GYS,b.MC,c.CSXX,b.DWVIEW,a.LOCKFLAG
|
|
from HIS_YFYK_CGJH_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
where a.JGID=? and a.DJH=? order by a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_CGJH_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="XH" type="12" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="GYS" type="12" table="HIS_YFYK_CGJH_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_CGJH_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiskctzdao" log="true" type="1">
|
|
<sql>select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,DJH,DPTID,LZ,SHZT,WCZT,SHR,SHRQ,TZYY,JE,SJJE,BZ,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_YFYK_KCTZ where JGID=? and DJH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_KCTZ" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_KCTZ" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_KCTZ" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_KCTZ" />
|
|
<f name="TZYY" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="JE" type="8" table="HIS_YFYK_KCTZ" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_KCTZ" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_KCTZ" />
|
|
<f name="打印日期" type="93" table="HIS_YFYK_KCTZ" />
|
|
<f name="大写总金额" type="12" table="HIS_YFYK_KCTZ" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiskctzmxdao" log="true" type="1">
|
|
<sql>select a.PKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.XH,a.SFX_BM,a.DJH,a.KSKC_PC_PKEY,a.DW,a.DJ,a.SJ,a.SL,a.JE,a.SJJE,b.MC,b.JBDW,b.RKDW,b.ZHXS,b.DWVIEW,c.CSXX,c.GG,
|
|
e.PH,a.YXQ,e.SL PCSL,e.KYSL,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ,a.LOCKFLAG,a.SCRQ,a.TZPH
|
|
from HIS_YFYK_KCTZ_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSKC_PC e on a.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY
|
|
where a.JGID=? and a.DJH=? order by a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_KCTZ_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="PCSL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SCRQ" type="93" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="TZPH" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiskctzquerydao" log="true" type="1">
|
|
<sql>
|
|
|
|
select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,DJH,DPTID,LZ,SHZT,WCZT,SHR,SHRQ,TZYY,JE,SJJE,BZ from HIS_YFYK_KCTZ where JGID=? and CJRQ between ? and ?
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_KCTZ" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,CJR,CJRQ,XGR,XGRQ,JGID,DJH,DPTID,SHZT,WCZT,SHR,SHRQ,TZYY,BZ
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_KCTZ" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_KCTZ" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_KCTZ" />
|
|
<f name="TZYY" type="12" table="HIS_YFYK_KCTZ" />
|
|
<f name="JE" type="8" table="HIS_YFYK_KCTZ" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_KCTZ" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_KCTZ" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--根据pkey取批次库存信息 -->
|
|
<dao id="hisgetpckcdao" type="1">
|
|
<sql>select b.KYSL,c.JBDW,c.ZHXS,c.RKDW
|
|
from HIS_KSKC_PC b
|
|
left join HIS_KSKC a on a.JGID=b.JGID and a.PKEY=b.KSKC_PKEY
|
|
left join HIS_SFX c on a.JGID=c.JGID and a.SFX_BM=c.BM
|
|
where b.JGID=? and b.PKEY=?
|
|
</sql>
|
|
<fields>
|
|
<f name="KYSL" type="8" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--库存报损信息 -->
|
|
<dao id="hiskcshdao" log="true" type="1">
|
|
<sql>select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,DJH,DPTID,LZ,SHZT,WCZT,SHR,SHRQ,TZYY,JE,SJJE,BZ,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_YFYK_KCSH where JGID=? and DJH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_KCSH" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_KCSH" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_KCSH" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_KCSH" />
|
|
<f name="TZYY" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="JE" type="8" table="HIS_YFYK_KCSH" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_KCSH" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_KCSH" />
|
|
<f name="打印日期" type="93" table="HIS_YFYK_KCSH" />
|
|
<f name="大写总金额" type="12" table="HIS_YFYK_KCSH" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--库存报损明细信息 -->
|
|
<dao id="hiskcshmxdao" log="true" type="1">
|
|
<sql>select a.PKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.XH,a.SFX_BM,a.DJH,a.KSKC_PC_PKEY,a.DW,a.DJ,a.SJ,a.SL,a.JE,a.SJJE,b.MC,b.JBDW,b.RKDW,b.JBJG,b.JG,b.ZHXS,c.CSXX,c.GG,
|
|
e.PH,e.YXQ,e.SL PCSL,e.KYSL,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ,b.DWVIEW,a.LOCKFLAG
|
|
from HIS_YFYK_KCSH_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSKC_PC e on a.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY
|
|
where a.JGID=? and a.DJH=? order by a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_KCSH_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="JG" type="8" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="PCSL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_KCSH_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--库存报损查询 -->
|
|
<dao id="hiskcshquerydao" log="true" type="1">
|
|
<sql>select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,DJH,DPTID,LZ,SHZT,WCZT,SHR,SHRQ,TZYY,JE,SJJE,BZ from HIS_YFYK_KCSH where JGID=? and CJRQ between ? and ? </sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_KCSH" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,CJR,CJRQ,XGR,XGRQ,JGID,DJH,DPTID,SHZT,WCZT,SHR,SHRQ,TZYY,BZ
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_KCSH" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_KCSH" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_KCSH" />
|
|
<f name="TZYY" type="12" table="HIS_YFYK_KCSH" />
|
|
<f name="JE" type="8" table="HIS_YFYK_KCSH" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_KCSH" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_KCSH" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiskcpddao" log="true" type="1">
|
|
<sql>select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,DJH,DPTID,WCZT,SPZT,SHZT,TZDJH,QSHW,JSHW,LZ,KCFL,BHBKY,JBKY,FLKC,sysdate 打印日期,'' 大写总金额 from HIS_YFYK_PD where JGID=? and DJH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_PD" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_PD" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_PD" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_PD" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_PD" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_PD" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_PD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_PD" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_PD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="SPZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="TZDJH" type="12" table="HIS_YFYK_PD" />
|
|
<f name="QSHW" type="12" table="HIS_YFYK_PD" />
|
|
<f name="JSHW" type="12" table="HIS_YFYK_PD" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_PD" />
|
|
<f name="KCFL" type="12" table="HIS_YFYK_PD" />
|
|
<f name="BHBKY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="JBKY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="FLKC" type="12" table="HIS_YFYK_PD" />
|
|
<f name="打印日期" type="93" />
|
|
<f name="大写总金额" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiskcpdmxdao" log="true" type="1">
|
|
<sql>select a.PKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,a.XH,a.SFX_BM,a.DJH,a.KSKC_PC_PKEY,a.DW,a.ZPS,a.RKDWZPS,a.ZPSJ,a.SPS,a.SPSJ,a.SPR,a.SYS,a.KCTZ_PKEY,b.MC,b.JBDW,b.RKDW,b.JBJG,b.JG,b.ZHXS,c.CSXX,c.GG,
|
|
e.PH,e.YXQ,e.SL PCSL,e.KYSL,b.DWVIEW,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ
|
|
from HIS_YFYK_PD_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSKC_PC e on a.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY
|
|
where a.JGID=? and a.DJH=?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_PD_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_PD_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_PD_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_PD_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_PD_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="ZPS" type="8" table="HIS_YFYK_PD_MX" />
|
|
<f name="RKDWZPS" type="8" table="HIS_YFYK_PD_MX" />
|
|
<f name="ZPSJ" type="93" table="HIS_YFYK_PD_MX" />
|
|
<f name="SPS" type="8" table="HIS_YFYK_PD_MX" />
|
|
<f name="SPSJ" type="93" table="HIS_YFYK_PD_MX" />
|
|
<f name="SPR" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="SYS" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="KCTZ_PKEY" type="12" table="HIS_YFYK_PD_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="JG" type="8" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="PCSL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiskcpdquerydao" log="true" type="1">
|
|
<sql>select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,DJH,DPTID,WCZT,SPZT,SHZT,TZDJH,QSHW,JSHW,LZ,KCFL,BHBKY,JBKY,FLKC from HIS_YFYK_PD where JGID=? and DPTID=? and CJRQ between ? and ? and (WCZT like ? or SPZT like ? or SHZT like ?)</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_PD" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_PD" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_PD" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_PD" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_PD" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_PD" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_PD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_PD" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_PD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="SPZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="TZDJH" type="12" table="HIS_YFYK_PD" />
|
|
<f name="QSHW" type="12" table="HIS_YFYK_PD" />
|
|
<f name="JSHW" type="12" table="HIS_YFYK_PD" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_PD" />
|
|
<f name="KCFL" type="12" table="HIS_YFYK_PD" />
|
|
<f name="BHBKY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="JBKY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="FLKC" type="12" table="HIS_YFYK_PD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiskcpdtzquerydao" log="true" type="1">
|
|
<sql>select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,DJH,DPTID,WCZT,SPZT,SHZT,TZDJH,QSHW,JSHW,LZ,KCFL,BHBKY,JBKY,FLKC from HIS_YFYK_PD where JGID=? and DPTID=? and CJRQ between ? and ? and SPZT='1'</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_PD" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_PD" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_PD" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_PD" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_PD" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_PD" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_PD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_PD" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_PD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="SPZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_PD" />
|
|
<f name="TZDJH" type="12" table="HIS_YFYK_PD" />
|
|
<f name="QSHW" type="12" table="HIS_YFYK_PD" />
|
|
<f name="JSHW" type="12" table="HIS_YFYK_PD" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_PD" />
|
|
<f name="KCFL" type="12" table="HIS_YFYK_PD" />
|
|
<f name="BHBKY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="JBKY" type="12" table="HIS_YFYK_PD" />
|
|
<f name="FLKC" type="12" table="HIS_YFYK_PD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--科室药品pop -->
|
|
<dao id="kcypallpopdao" type="1">
|
|
<sql><![CDATA[select distinct b.BM,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JBJG,b.JG,c.CSXX
|
|
from HIS_KSKC a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
where a.JGID=? and b.GLLX='Y' and a.DPTID like ? and (b.BM like ? or b.MC like ? or EXISTS (SELECT 1 FROM HIS_SFX_ZJM z WHERE z.SFX_BM = b.BM and z.JGID=b.JGID and z.PYM like ?))]]></sql>
|
|
<fields>
|
|
<f name="BM" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JBJG" type="12" />
|
|
<f name="JG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调价损益表 -->
|
|
<dao id="histjbsynewdao" log="true" type="1">
|
|
<sql>select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,SFX_BM,DJH,TJDJH,KSKC_PC_PKEY,SL,JBSL,DW,JE,BZ from HIS_YFYK_TJB_SY where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_TJB_SY" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_TJB_SY" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_TJB_SY" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_TJB_SY" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="TJDJH" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="SL" type="8" table="HIS_YFYK_TJB_SY" />
|
|
<f name="JBSL" type="8" table="HIS_YFYK_TJB_SY" />
|
|
<f name="DW" type="12" table="HIS_YFYK_TJB_SY" />
|
|
<f name="JE" type="8" table="HIS_YFYK_TJB_SY" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_TJB_SY" />
|
|
</fields>
|
|
</dao>
|
|
<!--调价表-单条明细 -->
|
|
<dao id="histjbmxdao" log="true" type="1">
|
|
<sql>select JGID,SFX_BM,DJH,TJRQ,JHSXRQ,SXRQ,TJR,TJDW,TQSJ,THSJ,CJ,QTTQSJ,QTTHSJ,QTCJ,TJYY,ZT,BZ from HIS_YFYK_TJB where JGID=? and DJH=? and SFX_BM=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_TJB" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="TJRQ" type="93" table="HIS_YFYK_TJB" />
|
|
<f name="JHSXRQ" type="93" table="HIS_YFYK_TJB" />
|
|
<f name="SXRQ" type="93" table="HIS_YFYK_TJB" />
|
|
<f name="TJR" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="TJDW" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="TQSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="THSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="CJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="QTTQSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="QTTHSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="QTCJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="TJYY" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="ZT" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_TJB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--库存批次损益查询 -->
|
|
<dao id="kspckcysldao" log="true" type="1">
|
|
<sql><![CDATA[select b.PKEY,b.JGID,b.KSKC_PKEY,b.PH,b.YXQ,b.SL,b.KYSL,b.DJSL,b.DJ,b.JBDJ,b.SJ,b.JBSJ from HIS_KSKC a
|
|
left join HIS_KSKC_PC b on a.JGID=b.JGID and a.PKEY=b.KSKC_PKEY
|
|
where a.JGID=? and a.SFX_BM=? and b.SL>0
|
|
]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="KSKC_PKEY" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="SL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="DJ" type="8" />
|
|
<f name="JBDJ" type="8" />
|
|
<f name="SJ" type="8" />
|
|
<f name="JBSJ" type="8" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--库存查询 -->
|
|
<dao id="kskcsfxdao" log="true" type="1">
|
|
<sql><![CDATA[select a.PKEY,a.JGID,a.SFX_BM,a.DPTID,a.SL,a.KYSL,a.DJSL,a.HWM_BM,a.KCXX,a.KCSX,a.BZKC,a.BCKCFS,b.JBDW,b.ZHXS,b.RKDW
|
|
from HIS_KSKC a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
where a.JGID=? and a.SFX_BM=? and a.SL>0]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="HWM_BM" type="12" />
|
|
<f name="KCXX" type="8" />
|
|
<f name="KCSX" type="8" />
|
|
<f name="BZKC" type="8" />
|
|
<f name="BCKCFS" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hisrkdmxpopdao" type="1">
|
|
<sql><![CDATA[select a.PKEY,a.JGID,a.DJH,f.DPTID,a.XH,a.SFX_BM,e.PKEY 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.CSXX,d.GYS,e.KYSL,e.KSKC_PKEY,
|
|
b.DWVIEW
|
|
from HIS_YFYK_RKD_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_YFYK_RKD d on a.JGID=d.JGID and a.DJH=d.DJH
|
|
left join HIS_KSKC_PC e on a.JGID=e.JGID AND (e.FIRST_KSKC_PC_PKEY=a.KSKC_PC_PKEY or e.PKEY=a.KSKC_PC_PKEY )
|
|
left join HIS_KSKC f on e.JGID=f.JGID and e.KSKC_PKEY=f.pkey
|
|
where a.JGID=? and f.DPTID=? and b.KCFL in (select bh from MAIN_JGZDB where JGID=a.JGID and jgzdlb_bh='Z00008' and value2 like ?) and d.GYS=? and e.KYSL>0 and (b.BM like ? or b.MC like ? or EXISTS (SELECT 1 FROM HIS_SFX_ZJM z WHERE z.SFX_BM = b.BM and z.JGID=b.JGID and z.PYM like ?))]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_RKD_MX" insert="false" update="false" delete="false">
|
|
<primary>PKEY</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="CSXX" type="12" />
|
|
<f name="GYS" type="12" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="KSKC_PKEY" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="pdkskcpcdao" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.KSKC_PKEY,a.PH,a.YXQ,a.SL,a.KYSL,a.DJSL,a.LOCKFLAG from HIS_KSKC_PC a where a.JGID=? and a.PKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiskcdjmxdao" log="true" type="1">
|
|
<sql>select PKEY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,DPTID,SFX_BM,KSKC_PC_PKEY,DJH,DW,SL,LX,ZT
|
|
from HIS_KCDJMX where JGID=? and DPTID=? and SFX_BM=? and KSKC_PC_PKEY=? and DJH like ? and ZT=?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_KCDJMX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KCDJMX" />
|
|
<f name="CJR" type="12" table="HIS_KCDJMX" />
|
|
<f name="CJRQ" type="93" table="HIS_KCDJMX" />
|
|
<f name="XGR" type="12" table="HIS_KCDJMX" />
|
|
<f name="XGRQ" type="93" table="HIS_KCDJMX" />
|
|
<f name="JGID" type="12" table="HIS_KCDJMX" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KCDJMX" />
|
|
<f name="DPTID" type="12" table="HIS_KCDJMX" />
|
|
<f name="SFX_BM" type="12" table="HIS_KCDJMX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_KCDJMX" />
|
|
<f name="DJH" type="12" table="HIS_KCDJMX" />
|
|
<f name="DW" type="12" table="HIS_KCDJMX" />
|
|
<f name="SL" type="8" table="HIS_KCDJMX" />
|
|
<f name="LX" type="12" table="HIS_KCDJMX" />
|
|
<f name="ZT" type="12" table="HIS_KCDJMX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="kspckcquerydao" log="true" type="1">
|
|
<sql>select b.PKEY,b.PH,b.YXQ,b.SL,b.KYSL,b.DJSL,c.BM,c.MC,c.JBDW,c.ZHXS,c.RKDW,c.JG,c.JBJG,y.CSXX,y.GG,c.DWVIEW
|
|
from HIS_KSKC a
|
|
left join HIS_KSKC_PC b on a.JGID=b.JGID and a.PKEY=b.KSKC_PKEY
|
|
left join HIS_SFX c on a.JGID=c.JGID and a.SFX_BM=c.BM
|
|
left join HIS_YPXX y on c.BM=y.BM
|
|
where a.JGID=? AND c.GLLX='Y' and a.DPTID=? #select#
|
|
</sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="SL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="BM" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨申请单 -->
|
|
<dao id="hisdbsqdao" type="1">
|
|
<sql>select JGID,DJH,SQKS,JSKS,LZ,ZDRQ,ZDR,WCZT,JE,SJJE,SHZT,SHR,SHRQ,BZ,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_YFYK_DBSQ where JGID=? and DJH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBSQ" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SQKS" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="JSKS" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_DBSQ" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBSQ" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_DBSQ" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DBSQ" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_DBSQ" />
|
|
<f name="打印日期" type="93" table="HIS_YFYK_DBSQ" />
|
|
<f name="大写总金额" type="12" table="HIS_YFYK_DBSQ" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<!--调拨申请单明细 -->
|
|
<dao id="hisdbsqmxdao" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.DJH,a.XH,a.SFX_BM,a.KSKC_PC_PKEY,a.SL,a.SJDBSL,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.CSXX,b.DWVIEW
|
|
,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ,a.LOCKFLAG
|
|
from HIS_YFYK_DBSQ_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_YFYK_DBSQ d on a.JGID=d.JGID and a.DJH=d.DJH
|
|
left join HIS_KSKC_PC e on a.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY
|
|
where a.JGID=? and a.DJH=?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBSQ_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="XH" type="4" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJDBSL" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="LOCKFLAG" type="8" table="HIS_YFYK_DBSQ_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiscgjhquerydao" type="1">
|
|
<sql>
|
|
|
|
select JGID,DJH,DPTID,LZ,ZDRQ,ZDR,SHRQ,SHR,WCZT,SHZT,JE,SJJE,BZ from HIS_YFYK_CGJH a
|
|
where JGID=? and ZDRQ between ? and ?
|
|
and exists (select 1 from HIS_YFYK_CGJH_MX b where a.JGID=b.JGID and a.DJH=b.DJH and b.GYS like ? and b.SFX_BM like ?)
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_CGJH" insert="false" update="false" delete="false">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_CGJH" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_CGJH" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="JE" type="8" table="HIS_YFYK_CGJH" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_CGJH" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_CGJH" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hiscgjhdjhdao" type="1">
|
|
<sql>select JGID,DJH,DPTID,LZ,ZDRQ,ZDR,SHRQ,SHR,WCZT,SHZT,JE,SJJE,BZ,sysdate 打印日期,'' 大写总金额 from HIS_YFYK_CGJH where JGID=? and DJH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_CGJH" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="LZ" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_CGJH" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_CGJH" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="JE" type="8" table="HIS_YFYK_CGJH" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_CGJH" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_CGJH" />
|
|
<f name="打印日期" type="93" table="HIS_YFYK_CGJH" />
|
|
<f name="大写总金额" type="12" table="HIS_YFYK_CGJH" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="hiscgjhdddao" type="1">
|
|
<sql>select PKEY,JGID,DPTID,CGDH,DDH,LOCKFLAG from HIS_YFYK_CGJH_DD where JGID=? and DPTID=? and CGDH=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_CGJH_DD" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_CGJH_DD" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_CGJH_DD" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_CGJH_DD" />
|
|
<f name="CGDH" type="12" table="HIS_YFYK_CGJH_DD" />
|
|
<f name="DDH" type="12" table="HIS_YFYK_CGJH_DD" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_CGJH_DD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hisddquerydao" type="1">
|
|
<sql><![CDATA[select a.JGID,a.DJH,a.DPTID,a.GYS,a.ZDRQ,a.HB,a.RATE,a.ZXF,a.ZDR,a.SHZT,a.WCZT,a.SHR,a.SHRQ,a.JYRQ,a.JE,a.BZ from HIS_YFYK_DD a
|
|
where a.JGID=? and a.ZDRQ between ? and ? and a.DPTID like ? and a.GYS like ? and a.DJH like ? and a.WCZT like ? and exists(select 1 from HIS_YFYK_DD_MX b where a.JGID=b.JGID and a.DJH=b.DJH and b.SFX_BM like ?)]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DD" insert="false" update="false" delete="false">
|
|
<primary>JGID</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_DD" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DD" />
|
|
<f name="DPTID" type="12" table="HIS_YFYK_DD" />
|
|
<f name="GYS" type="12" table="HIS_YFYK_DD" />
|
|
<f name="ZDRQ" type="93" table="HIS_YFYK_DD" />
|
|
<f name="HB" type="12" table="HIS_YFYK_DD" />
|
|
<f name="RATE" type="8" table="HIS_YFYK_DD" />
|
|
<f name="ZXF" type="8" table="HIS_YFYK_DD" />
|
|
<f name="ZDR" type="12" table="HIS_YFYK_DD" />
|
|
<f name="SHZT" type="12" table="HIS_YFYK_DD" />
|
|
<f name="WCZT" type="12" table="HIS_YFYK_DD" />
|
|
<f name="SHR" type="12" table="HIS_YFYK_DD" />
|
|
<f name="SHRQ" type="93" table="HIS_YFYK_DD" />
|
|
<f name="JYRQ" type="93" table="HIS_YFYK_DD" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DD" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DD" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hisddmxquerydao" type="1">
|
|
<sql><![CDATA[select a.PKEY,a.JGID,a.DJH,a.XH,a.SFX_BM,a.DHRQ,a.QQDHSL,a.SJDHSL,a.SJJHSL,a.DW,a.DJ,a.JE,a.CGJHMX_PKEY,a.BZ,b.MC,c.CSXX,b.DWVIEW
|
|
from HIS_YFYK_DD_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
where a.JGID=? and a.DJH=? order by a.XH]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DD_MX" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="XH" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="DHRQ" type="93" table="HIS_YFYK_DD_MX" />
|
|
<f name="QQDHSL" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="SJDHSL" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="SJJHSL" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DD_MX" />
|
|
<f name="CGJHMX_PKEY" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_DD_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="ypSfxJgDao" type="1" memo="获取药品收费项价格">
|
|
<sql>
|
|
|
|
|
|
select JG,JBJG from HIS_SFX
|
|
where JGID=? and BM=?
|
|
|
|
|
|
</sql>
|
|
|
|
<fields>
|
|
<f name="JG" type="12" />
|
|
<f name="JBJG" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="yplastjjDao" log="true" type="1" memo="用于保存最近一次进价dao">
|
|
<sql>
|
|
select PKEY,SFX_BM,LASTJJ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_YFYK_YPJJ where JGID=? and SFX_BM=?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_YPJJ" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_YPJJ" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_YPJJ" />
|
|
<f name="LASTJJ" type="12" table="HIS_YFYK_YPJJ" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_YPJJ" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_YPJJ" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_YPJJ" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_YPJJ" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_YPJJ" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_YPJJ" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="djypByYzmxbDao" log="true" type="1" memo="冻结药品在医嘱里面的信息dao">
|
|
<sql>
|
|
<![CDATA[
|
|
select
|
|
t.PKEY
|
|
,t.HZPKEY
|
|
,t.JZPKEY
|
|
,t.YZMC
|
|
,t.CFH
|
|
,t.JGID
|
|
,t.YZSFZT
|
|
,t.YZSHZT
|
|
,t.YZDJSL
|
|
,t.YZSHRQ
|
|
,t.YZLB
|
|
,t.YZJZZHXS
|
|
,t.YZXPKEY
|
|
,t.YZZXKS
|
|
,t.YZXZSJ
|
|
,t.YZXZYS
|
|
,t.YZXZKS
|
|
,hz.XM as HZXM
|
|
,ks.DPTNAME as YZXZKSMC
|
|
,ys.NAME as YZXZYSMC
|
|
from HIS_YZ_MXB t
|
|
left join HIS_HZINFO hz on hz.JGID = t.JGID and hz.PKEY = t.HZPKEY
|
|
left join MAIN_KS ks on ks.JGID = t.JGID and ks.DPTID = t.YZXZKS
|
|
left join MAIN_YHXX ys on ys.USERACCOUNT = t.YZXZYS
|
|
where 1 = 1
|
|
and t.YZDJSL > 0
|
|
and t.YZSHZT = '1'
|
|
and t.JGID = ?
|
|
and t.YZXPKEY = ?
|
|
]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="HZPKEY" type="12" />
|
|
<f name="JZPKEY" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="CFH" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="YZSFZT" type="12" />
|
|
<f name="YZSHZT" type="12" />
|
|
<f name="YZDJSL" type="12" />
|
|
<f name="YZSHRQ" type="93" />
|
|
<f name="YZLB" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="YZZXKS" type="12" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="YZXZKS" type="12" />
|
|
<f name="HZXM" type="12" />
|
|
<f name="YZXZKSMC" type="12" />
|
|
<f name="YZXZYSMC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="djypByYpDbdDao" log="true" type="1" memo="冻结药品在药品调拨单">
|
|
<sql>
|
|
select a.DJH,a.SL,a.DW from HIS_YFYK_DBD_MX a left join HIS_YFYK_DBD b on a.DJH=b.DJH and a.JGID=b.JGID where b.JGID=? and b.SHZT=1 and b.RKZT=0 and a.sfx_bm=?
|
|
</sql>
|
|
<fields>
|
|
<f name="DJH" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="DW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="djypByYpPdDao" log="true" type="1" memo="冻结药品在药品盘点表">
|
|
<sql>
|
|
select a.DJH,a.SPS,a.DW,a.SYS,a.ZPS from HIS_YFYK_PD_MX a left join HIS_YFYK_PD b on a.DJH=b.DJH and a.JGID=b.JGID where b.JGID=? and b.WCZT=1 and b.SPZT=0 and a.sfx_bm=?
|
|
</sql>
|
|
<fields>
|
|
<f name="DJH" type="12" />
|
|
<f name="SPS" type="8" />
|
|
<f name="DW" type="12" />
|
|
<f name="SYS" type="8" />
|
|
<f name="ZPS" type="8" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="djypByYpThdDao" log="true" type="1" memo="冻结药品在退货单">
|
|
<sql>
|
|
select a.DJH,a.SL,a.DW from HIS_YFYK_THD_MX a left join HIS_YFYK_THD b on a.DJH=b.DJH and a.JGID=b.JGID left join HIS_YFYK_RKD_MX c on a.RKDMX_PKEY =c.PKEY and a.JGID=c.JGID where b.JGID=? and b.WCZT=1 and b.SHZT=0 and c.sfx_bm=?
|
|
</sql>
|
|
<fields>
|
|
<f name="DJH" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="DW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="histjbdao" type="1">
|
|
<sql>select a.JGID,a.SFX_BM,a.DJH,a.TJRQ,a.JHSXRQ,a.SXRQ,a.TJR,a.TJDW,a.TQSJ,a.THSJ,a.CJ,a.QTTQSJ,a.QTTHSJ,a.QTCJ,a.TJYY,a.ZT,a.BZ,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.DWVIEW,to_char(a.TJRQ,'yyyy-mm-dd') pdrq,b.KCFL
|
|
from HIS_YFYK_TJB a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
where a.JGID=? and a.TJRQ between ? and ?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_TJB" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DJH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="TJRQ" type="93" table="HIS_YFYK_TJB" />
|
|
<f name="JHSXRQ" type="93" table="HIS_YFYK_TJB" />
|
|
<f name="SXRQ" type="93" table="HIS_YFYK_TJB" />
|
|
<f name="TJR" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="TJDW" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="TQSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="THSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="CJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="QTTQSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="QTTHSJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="QTCJ" type="8" table="HIS_YFYK_TJB" />
|
|
<f name="TJYY" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="ZT" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_TJB" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="pdrq" type="12" />
|
|
<f name="KCFL" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="histjsxdao" type="1">
|
|
<sql>select DJH from HIS_YFYK_TJB where JGID =? and SFX_BM=? and SXRQ between ? and ?</sql>
|
|
<fields>
|
|
<f name="DJH" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="histjzddao" type="1">
|
|
<sql>select DJH from HIS_YFYK_TJB where JGID =? and SFX_BM=? and (ZT='1' or ZT='2')</sql>
|
|
<fields>
|
|
<f name="DJH" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<!--调拨单统计明细 -->
|
|
<dao id="hisdbdtjmxdao" log="true" type="1">
|
|
<sql>select a.PKEY,a.JGID,a.DJH,a.XH,a.SFX_BM,a.KSKC_PC_PKEY,a.DBSQMX_PKEY,a.SL,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,b.MC,b.JBDW,b.RKDW,b.ZHXS,b.JG,b.JBJG,c.KYSL,c.PH,c.KSKC_PKEY,c.YXQ,
|
|
b.DWVIEW,c.DJ PCDJ,c.JBDJ PCJBDJ,c.SJ PCSJ,c.JBSJ PCJBSJ,y.CSXX,y.GG,a.LOCKFLAG,b.ybbm,b.ybmc,dbd.SQKS,dbd.JSKS,dbd.ZYLX,dbd.CKRQ,y.ZCZH, rkd.gys
|
|
from HIS_YFYK_DBD_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_KSKC_PC c on a.JGID=c.JGID and c.PKEY=a.KSKC_PC_PKEY
|
|
left join HIS_YPXX y on b.BM=y.BM
|
|
left join HIS_YFYK_DBD dbd on a.djh=dbd.djh and a.JGID=dbd.JGID
|
|
left join HIS_YFYK_DBD_LOG log on a.pkey=log.DBDMXPKEY and a.JGID=log.JGID
|
|
left join HIS_YFYK_RKD_MX rkdmx on log.FIRST_KSKC_PC_PKEY = rkdmx.KSKC_PC_PKEY and rkdmx.JGID=log.JGID
|
|
left join HIS_YFYK_RKD rkd on rkdmx.djh = rkd.djh and
|
|
rkd.JGID=rkdmx.JGID
|
|
where a.JGID=? and dbd.SHZT='1' and dbd.RKZT='1' order by a.djh,a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_DBD_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_DBD_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="DBSQMX_PKEY" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_DBD_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_DBD_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="PH" type="12" />
|
|
<f name="KSKC_PKEY" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_DBD_MX" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="SQKS" type="12" />
|
|
<f name="JSKS" type="12" />
|
|
<f name="ZYLX" type="12" />
|
|
<f name="CKRQ" type="93" />
|
|
<f name="ZCZH" type="12" />
|
|
<f name="GYS" type="12" />
|
|
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="hiskctztjmxdao" log="true" type="1" memo="药品库存调整统计">
|
|
<sql>select a.PKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.XH,a.SFX_BM,a.DJH,a.KSKC_PC_PKEY,a.DW,a.DJ,a.SJ,a.SL,a.JE,a.SJJE,b.MC,b.JBDW,b.RKDW,b.ZHXS,b.DWVIEW,c.CSXX,c.GG,
|
|
e.PH,e.YXQ,e.SL PCSL,e.KYSL,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ,a.LOCKFLAG,c.ZCZH,kctz.DPTID,kctz.SHRQ
|
|
from HIS_YFYK_KCTZ_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSKC_PC e on a.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY
|
|
left join HIS_YFYK_KCTZ kctz on a.djh=kctz.djh and a.JGID=kctz.JGID
|
|
where a.JGID=? order by a.djh,a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_KCTZ_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="PCSL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_KCTZ_MX" />
|
|
<f name="ZCZH" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="SHRQ" type="93" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<!--库存报损明细信息 -->
|
|
<dao id="hiskcshtjmxdao" log="true" type="1" memo="药品库存报损统计明细">
|
|
<sql>select a.PKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.XH,a.SFX_BM,a.DJH,a.KSKC_PC_PKEY,a.DW,a.DJ,a.SJ,a.SL,a.JE,a.SJJE,b.MC,b.JBDW,b.RKDW,b.JBJG,b.JG,b.ZHXS,c.CSXX,c.GG,
|
|
e.PH,e.YXQ,e.SL PCSL,e.KYSL,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ,b.DWVIEW,a.LOCKFLAG,c.ZCZH,kcsh.DPTID,kcsh.SHRQ
|
|
from HIS_YFYK_KCSH_MX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSKC_PC e on a.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY
|
|
left join HIS_YFYK_KCSH kcsh on a.djh=kcsh.djh and a.JGID=kcsh.JGID
|
|
where a.JGID=? order by a.djh,a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_KCSH_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="SFX_BM" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="JG" type="8" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="PCSL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="PCDJ" type="8" />
|
|
<f name="PCJBDJ" type="8" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_KCSH_MX" />
|
|
<f name="ZCZH" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="SHRQ" type="93" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="histhdtjmxdao" type="1" memo="药品库存退货统计">
|
|
<sql>select a.PKEY,a.JGID,a.DJH,a.XH,a.RKDMX_PKEY,a.SL,a.THYY,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,a.FPHM,a.FPJE,a.PCJG,a.BZ,b.MC,b.JBDW,b.ZHXS,c.CSXX,r.SFX_BM,r.PH,r.YXQ,r.SL RKSL,r.KSKC_PC_PKEY,r.DPTID,r.DW RKDW,r.DJ RKDJ,r.SJ RKSJ,e.PKEY PCPKEY,e.KYSL,e.DJSL,e.KSKC_PKEY,
|
|
b.DWVIEW,a.LOCKFLAG,c.ZCZH,thd.ZDRQ,thd.GYS
|
|
from HIS_YFYK_THD_MX a
|
|
left join HIS_YFYK_RKD_MX r on a.JGID=r.JGID and a.RKDMX_PKEY=r.PKEY
|
|
left join HIS_SFX b on r.JGID=b.JGID and r.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSKC_PC e on r.JGID=e.JGID and e.PKEY=r.KSKC_PC_PKEY
|
|
left join HIS_YFYK_THD thd on a.djh=thd.djh and a.JGID=thd.JGID
|
|
where a.JGID=? order by a.djh,a.XH
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFYK_THD_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="DJH" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="XH" type="-5" table="HIS_YFYK_THD_MX" />
|
|
<f name="RKDMX_PKEY" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="SL" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="THYY" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="DW" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="DJ" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="SJ" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="JE" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="SJJE" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="FPHM" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="FPJE" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="PCJG" type="8" table="HIS_YFYK_THD_MX" />
|
|
<f name="BZ" type="12" table="HIS_YFYK_THD_MX" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="RKSL" type="8" />
|
|
<f name="KSKC_PC_PKEY" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="RKDJ" type="8" />
|
|
<f name="RKSJ" type="8" />
|
|
<f name="PCPKEY" type="12" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="KSKC_PKEY" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_THD_MX" />
|
|
<f name="ZCZH" type="12" />
|
|
<f name="ZDRQ" type="93" />
|
|
<f name="GYS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="ykAccountMainDao" log="true" type="1" memo="台账查询主dao">
|
|
<sql><![CDATA[
|
|
select a.JGID,a.PKEY,a.SFX_BM,a.SL,a.KYSL,a.DJSL,a.HWM_BM,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.GG,c.CSXX,b.DWVIEW,a.DPTID,d.KSSL bkssl,d.JSSL bjssl,e.KSSL ekssl,e.JSSL ejssl,c.BM,c.MC,(select sum(jbsl) zjsl from HIS_KSKCJL where JGID=a.JGID and DPTID=a.DPTID and SFX_BM=a.SFX_BM and SL >0 and CZRQ >=? and CZRQ <= ? ) zjsl,(select sum(jbsl) jssl from HIS_KSKCJL where JGID=a.JGID and DPTID=a.DPTID and SFX_BM=a.SFX_BM and SL <0 and CZRQ >=? and CZRQ <= ? ) jssl,b.KCFL,b.ybbm,b.ybmc
|
|
from HIS_KSKC a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSRKC d on a.SFX_BM=d.SFX_BM and a.JGID=d.JGID and a.DPTID=d.DPTID and d.RQVERSION=?
|
|
left join HIS_KSRKC e on a.SFX_BM=e.SFX_BM and a.JGID=e.JGID and a.DPTID=e.DPTID and e.RQVERSION=?
|
|
where a.JGID=? and b.GLLX='Y' #select# order by a.SFX_BM,a.DPTID
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JGID" type="12" />
|
|
<f name="PKEY" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="HWM_BM" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="BKSSL" type="8" />
|
|
<f name="BJSSL" type="8" />
|
|
<f name="EKSSL" type="8" />
|
|
<f name="EJSSL" type="8" />
|
|
<f name="BM" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="ZJSL" type="4" />
|
|
<f name="JSSL" type="4" />
|
|
<f name="KCFL" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="ykAccountFindBeginDao" log="true" type="1" memo="台账查询中查找期初记录dao">
|
|
<sql><![CDATA[
|
|
|
|
select * from (select PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION from HIS_KSRKC where JGID=? and DPTID=? and SFX_BM=? and RQ < ? order by RQ desc ) where rownum=1
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="KSSL" type="8" />
|
|
<f name="JSSL" type="8" />
|
|
<f name="RQ" type="93" />
|
|
<f name="RQVERSION" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="ykAccountFindEndDao" log="true" type="1" memo="台账查询中查找期末记录dao">
|
|
<sql><![CDATA[
|
|
select * from (select PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION from HIS_KSRKC where JGID=? and DPTID=? and SFX_BM=? and RQ > ? order by RQ ) where rownum=1
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="KSSL" type="8" />
|
|
<f name="JSSL" type="8" />
|
|
<f name="RQ" type="93" />
|
|
<f name="RQVERSION" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="ykAccountDetailDao" log="true" type="1" memo="台账查询 明细dao">
|
|
<sql><![CDATA[
|
|
select a.PKEY,a.JGID,a.DPTID,a.SFX_BM,a.KSKC_PC_PKEY,a.CZRQ,a.CZR,a.DJH,a.LX,a.SL,a.DW,a.DJ,a.JE,a.JYSL,a.LOCKFLAG,b.PH,b.YXQ,a.JBDW,a.JBSL,a.JBJYSL,c.yzxzys,c.yzxzsj,c.yzyf,c.yzjl,c.yzjldw,d.xm,d.xb,e.jznl,e.JZZDNAMELIST,c.yzxzks,c.yzpc from HIS_KSKCJL a left join HIS_KSKC_PC b on a.KSKC_PC_PKEY=b.pkey and a.JGID=b.JGID left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.jgid=c.jgid left join HIS_HZINFO d on a.hzpkey=d.pkey and a.jgid=d.jgid left join HIS_JZ_BASEINFO e on a.jzpkey=e.pkey and a.jgid=e.jgid where a.JGID=? and a.DPTID=? and a.SFX_BM=? and a.CZRQ >=? and a.CZRQ <= ? order by a.CZRQ
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="KSKC_PC_PKEY" type="12" />
|
|
<f name="CZRQ" type="93" />
|
|
<f name="CZR" type="12" />
|
|
<f name="DJH" type="12" />
|
|
<f name="LX" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="DW" type="12" />
|
|
<f name="DJ" type="8" />
|
|
<f name="JE" type="8" />
|
|
<f name="JYSL" type="8" />
|
|
<f name="LOCKFLAG" type="-5" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="JBSL" type="8" />
|
|
<f name="JBJYSL" type="8" />
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="XB" type="12" />
|
|
<f name="JZNL" type="12" />
|
|
<f name="JZZDNAMELIST" type="12" />
|
|
<f name="YZXZKS" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="processKskcjlDao" log="true" type="1" memo="用于修复之前记录数量的单位不统一,统一增加基本单位类型的数量dao">
|
|
<sql>
|
|
select a.PKEY,a.JGID,a.DPTID,a.SFX_BM,a.KSKC_PC_PKEY,a.CZRQ,a.CZR,a.DJH,a.LX,a.SL,a.DW,a.DJ,a.JE,a.JYSL,a.LOCKFLAG,a.JBDW,a.JBSL,a.JBJYSL,b.JBDW sfxjbdw,b.RKDW sfxrkdw,b.ZHXS,b.GLLX from HIS_KSKCJL a left join HIS_SFX b on a.SFX_BM=b.BM and a.JGID=b.JGID where a.JGID=?
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_KSKCJL" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKCJL" />
|
|
<f name="JGID" type="12" table="HIS_KSKCJL" />
|
|
<f name="DPTID" type="12" table="HIS_KSKCJL" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSKCJL" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_KSKCJL" />
|
|
<f name="CZRQ" type="93" table="HIS_KSKCJL" />
|
|
<f name="CZR" type="12" table="HIS_KSKCJL" />
|
|
<f name="DJH" type="12" table="HIS_KSKCJL" />
|
|
<f name="LX" type="12" table="HIS_KSKCJL" />
|
|
<f name="SL" type="8" table="HIS_KSKCJL" />
|
|
<f name="DW" type="12" table="HIS_KSKCJL" />
|
|
<f name="DJ" type="8" table="HIS_KSKCJL" />
|
|
<f name="JE" type="8" table="HIS_KSKCJL" />
|
|
<f name="JYSL" type="8" table="HIS_KSKCJL" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKCJL" />
|
|
<f name="JBDW" type="12" table="HIS_KSKCJL" />
|
|
<f name="JBSL" type="8" table="HIS_KSKCJL" />
|
|
<f name="JBJYSL" type="8" table="HIS_KSKCJL" />
|
|
<f name="SFXJBDW" type="12" />
|
|
<f name="SFXRKDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="GLLX" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="ypkcdxMainDao" log="true" type="1" memo="药品库存动销查询主dao">
|
|
<sql><![CDATA[
|
|
select a.JGID,a.PKEY,a.SFX_BM,a.SL,a.KYSL,a.DJSL,a.HWM_BM,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.GG,c.CSXX,b.DWVIEW,a.DPTID,c.BM,c.MC,(select sum(jbsl) zjsl from HIS_KSKCJL where JGID=a.JGID and DPTID=a.DPTID and SFX_BM=a.SFX_BM and SL >0 and CZRQ >=? and CZRQ <= ? ) zjsl,(select sum(jbsl) jssl from HIS_KSKCJL where JGID=a.JGID and DPTID=a.DPTID and SFX_BM=a.SFX_BM and SL <0 and CZRQ >=? and CZRQ <= ? ) jssl,b.KCFL,b.ybbm,b.ybmc
|
|
from HIS_KSKC a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
where a.JGID=? and b.GLLX='Y' #select# order by a.SFX_BM,a.DPTID
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JGID" type="12" />
|
|
<f name="PKEY" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="HWM_BM" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="BM" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="ZJSL" type="4" />
|
|
<f name="JSSL" type="4" />
|
|
<f name="KCFL" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="ypkcxqbjDao" log="true" type="1" memo="药品库存效期报警dao">
|
|
<sql>
|
|
select '' ISSHOW,'' zt,a.PKEY,b.DPTID,a.JGID,a.KSKC_PKEY,a.PH,a.YXQ,a.SL,a.KYSL,a.DJSL,a.DJ,a.JBDJ,a.SJ,a.JBSJ,a.YSPKEY,a.LOCKFLAG,b.HWM_BM,c.bm,c.MC,c.JBDW,c.RKDW,c.ZHXS,d.GG,d.CSXX,c.KCFL,'' zhycgys,'' sxts,c.ybbm,c.ybmc from HIS_KSKC_PC a left join HIS_KSKC b on a.KSKC_PKEY=b.pkey and a.JGID=b.JGID left join HIS_SFX c on b.SFX_BM=c.bm and b.JGID=c.JGID left join HIS_YPXX d on c.bm=d.bm where a.JGID=? and c.GLLX='Y' #select# and a.YXQ >? order by c.bm,a.ph
|
|
|
|
</sql>
|
|
<fields>
|
|
<f name="ISSHOW" type="12" />
|
|
<f name="ZT" type="12" />
|
|
<f name="PKEY" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="KSKC_PKEY" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="SL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="DJ" type="8" />
|
|
<f name="JBDJ" type="8" />
|
|
<f name="SJ" type="8" />
|
|
<f name="JBSJ" type="8" />
|
|
<f name="YSPKEY" type="12" />
|
|
<f name="LOCKFLAG" type="-5" />
|
|
<f name="HWM_BM" type="12" />
|
|
<f name="BM" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="KCFL" type="12" />
|
|
<f name="zhycgys" type="12" />
|
|
<f name="sxts" type="8" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="ypkcbjByXhlDao" log="true" type="1" memo="库存报警按消耗量dao(只统计类型为3门诊发药 4门诊退药 5 门诊药房撤销退药单 6住院发药 7住院退药的药品)">
|
|
<sql><![CDATA[
|
|
select a.JGID,a.PKEY,a.SFX_BM,a.SL,a.KYSL,a.DJSL,a.HWM_BM,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.GG,c.CSXX,b.DWVIEW,a.DPTID,c.BM,c.MC,(select sum(jbsl) xhsl from HIS_KSKCJL where JGID=a.JGID and DPTID=a.DPTID and SFX_BM=a.SFX_BM and (LX='3' or LX='4' or LX='5' or LX='6' or LX='7') and CZRQ >=? and CZRQ <= ? ) zxhsl,b.KCFL,'' rxhl,'' xql,b.ybbm,b.ybmc
|
|
from HIS_KSKC a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
where a.JGID=? and b.GLLX='Y' #select# order by a.SFX_BM,a.DPTID
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JGID" type="12" />
|
|
<f name="PKEY" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="HWM_BM" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="BM" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="ZXHSL" type="4" />
|
|
<f name="KCFL" type="12" />
|
|
<f name="RXHL" type="12" />
|
|
<f name="XQL" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="ypDbslmxDao" log="true" type="1">
|
|
<sql><![CDATA[
|
|
select b.SQKS,b.JSKS,b.RKSHR,b.RKSHRQ,d.value2 kclz,e.GG,c.MC,f.ph,e.ZCZH,a.SL,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,f.YXQ,e.csxx,c.ZHXS,c.JBDW,c.RKDW,c.bm from HIS_YFYK_DBD_MX a left join HIS_YFYK_DBD b on a.DJH=b.DJH and a.JGID=b.JGID left join HIS_SFX c on a.SFX_BM=c.bm and a.JGID=c.JGID left join MAIN_JGZDB d on c.kcfl=d.bh and d.jgzdlb_bh='Z00008' and d.JGID=c.JGID left join HIS_YPXX e on c.BM=e.BM left join HIS_KSKC_PC f on a.KSKC_PC_PKEY=f.pkey and a.JGID=f.JGID where a.JGID=? and b.SHZT=1 and b.RKZT=1 and (b.SQKS like ? or b.JSKS like ? ) and b.RKSHRQ >= ? and b.RKSHRQ <=? order by b.RKSHRQ,a.SFX_BM
|
|
]]></sql>
|
|
<fields>
|
|
<f name="SQKS" type="12" />
|
|
<f name="JSKS" type="12" />
|
|
<f name="RKSHR" type="12" />
|
|
<f name="RKSHRQ" type="93" />
|
|
<f name="KCLZ" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="ZCZH" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="DW" type="12" />
|
|
<f name="DJ" type="8" />
|
|
<f name="SJ" type="8" />
|
|
<f name="JE" type="8" />
|
|
<f name="SJJE" type="8" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="BM" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<!-- 库存台账业务类型字典 100157 -->
|
|
<dao id="kctzywlxDic" cache="true" type="1">
|
|
<sql>select ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT from MAIN_ZDB where ZDZB_BH='100157' and zt=1 order by XH asc,BH asc</sql>
|
|
<tables>
|
|
<table name="MAIN_ZDB" insert="true" update="true" delete="true">
|
|
<primary>ZDZB_BH</primary>
|
|
<primary>BH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="ZDZB_BH" type="12" table="MAIN_ZDB" />
|
|
<f name="BH" type="12" table="MAIN_ZDB" />
|
|
<f name="MC" type="12" table="MAIN_ZDB" />
|
|
<f name="PYM" type="12" table="MAIN_ZDB" />
|
|
<f name="WBM" type="12" table="MAIN_ZDB" />
|
|
<f name="VALUE1" type="12" table="MAIN_ZDB" />
|
|
<f name="VALUE2" type="12" table="MAIN_ZDB" />
|
|
<f name="XH" type="-5" table="MAIN_ZDB" />
|
|
<f name="ZT" type="12" table="MAIN_ZDB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<!-- 库存效期时间字典 100158 -->
|
|
<dao id="kcxqsjDic" cache="true" type="1">
|
|
<sql>select ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT from MAIN_ZDB where ZDZB_BH='100158' and zt=1 order by XH asc,BH asc</sql>
|
|
<tables>
|
|
<table name="MAIN_ZDB" insert="true" update="true" delete="true">
|
|
<primary>ZDZB_BH</primary>
|
|
<primary>BH</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="ZDZB_BH" type="12" table="MAIN_ZDB" />
|
|
<f name="BH" type="12" table="MAIN_ZDB" />
|
|
<f name="MC" type="12" table="MAIN_ZDB" />
|
|
<f name="PYM" type="12" table="MAIN_ZDB" />
|
|
<f name="WBM" type="12" table="MAIN_ZDB" />
|
|
<f name="VALUE1" type="12" table="MAIN_ZDB" />
|
|
<f name="VALUE2" type="12" table="MAIN_ZDB" />
|
|
<f name="XH" type="-5" table="MAIN_ZDB" />
|
|
<f name="ZT" type="12" table="MAIN_ZDB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="hisyzxjedao" type="1">
|
|
<sql>select a.YZX_BM,sum(a.SL*b.JG) JE from HIS_YZX_SFX a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
where a.JGID=? and a.YZX_BM=?
|
|
group by a.YZX_BM
|
|
</sql>
|
|
<fields>
|
|
<f name="YZX_BM" type="12" />
|
|
<f name="JE" type="8" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="hissfxTyzxdao" type="1">
|
|
<sql>select a.YZX_BM from HIS_YZX_SFX a where a.JGID=? and a.SFX_BM=? </sql>
|
|
<fields>
|
|
<f name="YZX_BM" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="ypJxcKcpcDao" log="true" type="1" memo="药品进销存库存批次dao">
|
|
<sql><![CDATA[
|
|
select a.JGID,a.PKEY,a.SFX_BM,pc.SL,pc.KYSL,pc.DJSL,a.HWM_BM,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.GG,c.CSXX,b.DWVIEW,a.DPTID,d.KSSL bkssl,d.JSSL bjssl,e.KSSL ekssl,e.JSSL ejssl,c.BM,c.MC,(select sum(jbsl) zjsl from HIS_KSKCJL where JGID=a.JGID and KSKC_PC_PKEY=pc.pkey and DPTID=a.DPTID and SFX_BM=a.SFX_BM and (LX != 8 and LX != 9 and LX != 10 and LX != 13 and LX != 14 ) and SL >0 and CZRQ >=? and CZRQ <= ? ) zjsl,(select sum(jbsl) jssl from HIS_KSKCJL where JGID=a.JGID and KSKC_PC_PKEY=pc.pkey and DPTID=a.DPTID and SFX_BM=a.SFX_BM and (LX != 8 and LX != 9 and LX != 10 and LX != 13 and LX != 14 ) and SL <0 and CZRQ >=? and CZRQ <= ? ) jssl,b.KCFL,b.ybbm,b.ybmc,pc.DJ,pc.JBDJ,pc.SJ,pc.JBSJ,pc.pkey kcpcpkey,(select sum(jbsl) zjsl from HIS_KSKCJL where JGID=a.JGID and KSKC_PC_PKEY=pc.pkey and DPTID=a.DPTID and SFX_BM=a.SFX_BM and (LX = 8 or LX = 9 or LX = 10 or LX = 13 or LX = 14 ) and SL >0 and CZRQ >=? and CZRQ <= ? ) pdzjsl,(select sum(jbsl) jssl from HIS_KSKCJL where JGID=a.JGID and KSKC_PC_PKEY=pc.pkey and DPTID=a.DPTID and SFX_BM=a.SFX_BM and (LX = 8 or LX = 9 or LX = 10 or LX = 13 or LX = 14 ) and SL <0 and CZRQ >=? and CZRQ <= ? ) pdjssl
|
|
from HIS_KSKC a
|
|
left join HIS_KSKC_PC pc on a.PKEY=pc.KSKC_PKEY and a.JGID=pc.JGID
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
left join HIS_KSRKC_PC d on a.SFX_BM=d.SFX_BM and d.KSKC_PC_PKEY=pc.pkey and a.JGID=d.JGID and a.DPTID=d.DPTID and d.RQVERSION=?
|
|
left join HIS_KSRKC_PC e on a.SFX_BM=e.SFX_BM and e.KSKC_PC_PKEY=pc.pkey and a.JGID=e.JGID and a.DPTID=e.DPTID and e.RQVERSION=?
|
|
where a.JGID=? and b.GLLX='Y' #select# order by a.SFX_BM,a.DPTID
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JGID" type="12" />
|
|
<f name="PKEY" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="KYSL" type="8" />
|
|
<f name="DJSL" type="8" />
|
|
<f name="HWM_BM" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="BKSSL" type="8" />
|
|
<f name="BJSSL" type="8" />
|
|
<f name="EKSSL" type="8" />
|
|
<f name="EJSSL" type="8" />
|
|
<f name="BM" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="ZJSL" type="4" />
|
|
<f name="JSSL" type="4" />
|
|
<f name="KCFL" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="DJ" type="4" />
|
|
<f name="JBDJ" type="12" />
|
|
<f name="SJ" type="12" />
|
|
<f name="JBSJ" type="12" />
|
|
<f name="kcpcpkey" type="12" />
|
|
<f name="pdzjsl" type="12" />
|
|
<f name="pdjssl" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="jxcKsrkcPcFindBeginDao" log="true" type="1" memo="进销存科室批次日库存查询中查找期初记录dao">
|
|
<sql><![CDATA[
|
|
|
|
select * from (select PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION from HIS_KSRKC_PC where JGID=? and DPTID=? and SFX_BM=? and KSKC_PC_PKEY=? and RQ < ? order by RQ desc ) where rownum=1
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="KSSL" type="8" />
|
|
<f name="JSSL" type="8" />
|
|
<f name="RQ" type="93" />
|
|
<f name="RQVERSION" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="jxcKsrkcPcFindEndDao" log="true" type="1" memo="进销存科室批次日库存查询中查找期末记录dao">
|
|
<sql><![CDATA[
|
|
select * from (select PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION from HIS_KSRKC_PC where JGID=? and DPTID=? and SFX_BM=? and KSKC_PC_PKEY=? and RQ > ? order by RQ ) where rownum=1
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="SFX_BM" type="12" />
|
|
<f name="DPTID" type="12" />
|
|
<f name="KSSL" type="8" />
|
|
<f name="JSSL" type="8" />
|
|
<f name="RQ" type="93" />
|
|
<f name="RQVERSION" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="yljgHisYpxxNewDao" type="1" memo="医院的基础药品信息管理dao">
|
|
<sql>
|
|
|
|
select distinct a.BM,a.MC,a.TYM,a.GG,a.JBDW,a.DXSL,a.DXDW,a.CSXX,a.ZH,a.ZCZH,a.YPBWM,a.GZFL,a.GWJB,a.WHODDD,a.WHODDDDW,a.DDD,a.WHONET,a.OTC,a.GJZLYM,a.YWGJFZLYM,a.ISKJY,a.ISGJJBYW,a.ISPS,a.ISJK,a.ZT,a.JX,b.BM tybm,b.YPCF_BM,b.MC tymc,b.JX tyjx,c.YZDL,c.YZZL,f.JG,f.RKDW,f.KCFL,c.JGID,g.YXFL_BM,f.YBBM,f.YBMC,f.YBPKEY,a.YPBIEMING,f.JBJG,f.ZHXS from HIS_YPXX a left join HIS_TYMC b on a.TYM=b.BM inner join HIS_YZX c on a.BM=c.BM left join HIS_SFX f on a.BM=f.BM left join HIS_TYMC tym on a.TYM=tym.BM left join HIS_YP_YXFL g on tym.YPCF_BM=g.YPCF_BM WHERE c.JGID=? and f.JGID=? #select# order by a.bm
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YPXX" insert="true" update="true" delete="true">
|
|
<primary>BM</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="BM" type="12" table="HIS_YPXX" />
|
|
<f name="MC" type="12" table="HIS_YPXX" />
|
|
<f name="TYM" type="12" table="HIS_YPXX" />
|
|
<f name="GG" type="12" table="HIS_YPXX" />
|
|
<f name="JBDW" type="12" table="HIS_YPXX" />
|
|
<f name="DXSL" type="8" table="HIS_YPXX" />
|
|
<f name="DXDW" type="12" table="HIS_YPXX" />
|
|
<f name="CSXX" type="12" table="HIS_YPXX" />
|
|
<f name="ZH" type="12" table="HIS_YPXX" />
|
|
<f name="ZCZH" type="12" table="HIS_YPXX" />
|
|
<f name="YPBWM" type="12" table="HIS_YPXX" />
|
|
<f name="GZFL" type="12" table="HIS_YPXX" />
|
|
<f name="GWJB" type="12" table="HIS_YPXX" />
|
|
<f name="WHODDD" type="8" table="HIS_YPXX" />
|
|
<f name="WHODDDDW" type="12" table="HIS_YPXX" />
|
|
<f name="DDD" type="8" table="HIS_YPXX" />
|
|
<f name="WHONET" type="12" table="HIS_YPXX" />
|
|
<f name="OTC" type="12" table="HIS_YPXX" />
|
|
<f name="GJZLYM" type="12" table="HIS_YPXX" />
|
|
<f name="YWGJFZLYM" type="12" table="HIS_YPXX" />
|
|
<f name="ISKJY" type="12" table="HIS_YPXX" />
|
|
<f name="ISGJJBYW" type="12" table="HIS_YPXX" />
|
|
<f name="ISPS" type="12" table="HIS_YPXX" />
|
|
<f name="ISJK" type="12" table="HIS_YPXX" />
|
|
<f name="ZT" type="12" table="HIS_YPXX" />
|
|
<f name="JX" type="12" table="HIS_YPXX" />
|
|
<f name="TYBM" type="12" />
|
|
<f name="YPCF_BM" type="12" />
|
|
<f name="TYMC" type="12" />
|
|
<f name="TYJX" type="12" />
|
|
<f name="YZDL" type="12" />
|
|
<f name="YZZL" type="12" />
|
|
<f name="JG" type="12" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="KCFL" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="YXFL_BM" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="YBPKEY" type="12" />
|
|
<f name="YPBIEMING" type="12" table="HIS_YPXX" />
|
|
<f name="JBJG" type="12" />
|
|
<f name="ZHXS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
</datasource>
|
|
|