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.
 
 
 
 
klhis/WEB-INF/conf/sysds_mms.xml

3674 lines
169 KiB

<?xml version="1.0" encoding="UTF-8"?>
<datasource>
<dao id="mmsDjlxSetupDic" log="true" type="1" memo="物资管理多级类组设置dao">
<sql>select
PKEY,BM,MC,SJBM,LZTYPE,XH,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG
from
HIS_MMS_DJLZ where JGID=? and lztype=? order by bm
</sql>
<tables>
<table name="HIS_MMS_DJLZ" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_DJLZ" />
<f name="BM" type="12" table="HIS_MMS_DJLZ" />
<f name="MC" type="12" table="HIS_MMS_DJLZ" />
<f name="SJBM" type="12" table="HIS_MMS_DJLZ" />
<f name="LZTYPE" type="12" table="HIS_MMS_DJLZ" />
<f name="XH" type="-5" table="HIS_MMS_DJLZ" />
<f name="BZ" type="12" table="HIS_MMS_DJLZ" />
<f name="CJR" type="12" table="HIS_MMS_DJLZ" />
<f name="CJRQ" type="93" table="HIS_MMS_DJLZ" />
<f name="XGR" type="12" table="HIS_MMS_DJLZ" />
<f name="XGRQ" type="93" table="HIS_MMS_DJLZ" />
<f name="JGID" type="12" table="HIS_MMS_DJLZ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_DJLZ" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="kcwzallpopdao" log="true" type="1">
<sql>
select distinct b.BM,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JBJG,b.JG,c.WZCS
from HIS_KSKC a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.GLBM AND c.JGID=b.JGID
where
a.JGID=? and b.GLLX='W' 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="8" />
<f name="JG" type="8" />
<f name="WZCS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmscgjhquerydao" type="1" memo="物资采购计划查询dao">
<sql>
select
a.PKEY,a.DJH,a.DPTID,a.ZDRQ,a.ZDR,a.SHRQ,a.SHR,a.WCZT,a.SHZT,a.JE,a.SJJE,a.BZ,a.WZLZ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG
from HIS_MMS_KC_CGJH a where a.JGID=? #select#
</sql>
<tables>
<table name="HIS_MMS_KC_CGJH" insert="false" update="false"
delete="false">
<primary>JGID</primary>
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_CGJH " />
<f name="DJH" type="12" table="HIS_MMS_KC_CGJH " />
<f name="DPTID" type="12" table="HIS_MMS_KC_CGJH " />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_CGJH " />
<f name="ZDR" type="12" table="HIS_MMS_KC_CGJH " />
<f name="SHRQ" type="93" table="HIS_MMS_KC_CGJH " />
<f name="SHR" type="12" table="HIS_MMS_KC_CGJH " />
<f name="WCZT" type="12" table="HIS_MMS_KC_CGJH " />
<f name="SHZT" type="12" table="HIS_MMS_KC_CGJH " />
<f name="JE" type="8" table="HIS_MMS_KC_CGJH " />
<f name="SJJE" type="8" table="HIS_MMS_KC_CGJH " />
<f name="BZ" type="12" table="HIS_MMS_KC_CGJH " />
<f name="WZLZ" type="12" table="HIS_MMS_KC_CGJH " />
<f name="CJR" type="12" table="HIS_MMS_KC_CGJH " />
<f name="CJRQ" type="93" table="HIS_MMS_KC_CGJH " />
<f name="XGR" type="12" table="HIS_MMS_KC_CGJH " />
<f name="XGRQ" type="93" table="HIS_MMS_KC_CGJH " />
<f name="JGID" type="12" table="HIS_MMS_KC_CGJH " />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_CGJH " />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmscgjhmxdao" log="true" type="1" memo="物资采购计划明细表dao">
<sql>
select
a.PKEY,a.CGJHPKEY,a.DJH,a.XH,a.SFX_BM,a.SL,a.DW,a.DJ,a.SJ,a.JE,a.SJJE,a.GYS,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,c.WZCS,b.DWVIEW
from HIS_MMS_KC_CGJH_MX a
left join HIS_SFX b on a.JGID=b.JGID and
a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
where a.JGID=?
and a.CGJHPKEY=? order by a.XH
</sql>
<tables>
<table name="HIS_MMS_KC_CGJH_MX" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="CGJHPKEY" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_CGJH_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_CGJH_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_CGJH_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_CGJH_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_CGJH_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_CGJH_MX" />
<f name="GYS" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_CGJH_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_CGJH_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_CGJH_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_CGJH_MX" />
<f name="MC" type="12" />
<f name="WZCS" type="12" />
<f name="DWVIEW" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmscgjhdjhdao" log="true" type="1" memo="物资采购计划主表dao">
<sql>select
PKEY,DJH,DPTID,ZDRQ,ZDR,SHRQ,SHR,WCZT,SHZT,JE,SJJE,BZ,WZLZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate
打印日期,'' 大写总金额 from HIS_MMS_KC_CGJH where JGID=? and DJH=?
</sql>
<tables>
<table name="HIS_MMS_KC_CGJH" insert="true" update="true"
delete="true">
<primary>JGID</primary>
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_CGJH" />
<f name="DJH" type="12" table="HIS_MMS_KC_CGJH" />
<f name="DPTID" type="12" table="HIS_MMS_KC_CGJH" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_CGJH" />
<f name="ZDR" type="12" table="HIS_MMS_KC_CGJH" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_CGJH" />
<f name="SHR" type="12" table="HIS_MMS_KC_CGJH" />
<f name="WCZT" type="12" table="HIS_MMS_KC_CGJH" />
<f name="SHZT" type="12" table="HIS_MMS_KC_CGJH" />
<f name="JE" type="8" table="HIS_MMS_KC_CGJH" />
<f name="SJJE" type="8" table="HIS_MMS_KC_CGJH" />
<f name="BZ" type="12" table="HIS_MMS_KC_CGJH" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_CGJH" />
<f name="CJR" type="12" table="HIS_MMS_KC_CGJH" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_CGJH" />
<f name="XGR" type="12" table="HIS_MMS_KC_CGJH" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_CGJH" />
<f name="JGID" type="12" table="HIS_MMS_KC_CGJH" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_CGJH" />
<f name="打印日期" type="93" table="HIS_MMS_KC_CGJH" />
<f name="大写总金额" type="12" table="HIS_MMS_KC_CGJH" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDingdanDao" log="true" type="1" memo="物资订单dao">
<sql>select
PKEY,DJH,DPTID,GYS,WZLZ,ZDRQ,HB,RATE,ZXF,ZDR,SHZT,WCZT,SHR,SHRQ,JYRQ,JE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate
打印日期,'' 大写总金额 from HIS_MMS_KC_DD where JGID=? and DJH=?
</sql>
<tables>
<table name="HIS_MMS_KC_DD" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DD" />
<f name="DJH" type="12" table="HIS_MMS_KC_DD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_DD" />
<f name="GYS" type="12" table="HIS_MMS_KC_DD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_DD" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="HB" type="12" table="HIS_MMS_KC_DD" />
<f name="RATE" type="8" table="HIS_MMS_KC_DD" />
<f name="ZXF" type="8" table="HIS_MMS_KC_DD" />
<f name="ZDR" type="12" table="HIS_MMS_KC_DD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_DD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_DD" />
<f name="SHR" type="12" table="HIS_MMS_KC_DD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="JYRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="JE" type="8" table="HIS_MMS_KC_DD" />
<f name="BZ" type="12" table="HIS_MMS_KC_DD" />
<f name="CJR" type="12" table="HIS_MMS_KC_DD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="XGR" type="12" table="HIS_MMS_KC_DD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="JGID" type="12" table="HIS_MMS_KC_DD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_DD" />
<f name="打印日期" type="93" table="HIS_MMS_KC_DD" />
<f name="大写总金额" type="12" table="HIS_MMS_KC_DD" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsWzksPopDao" type="1" memo="能够申领物资的科室,通过科室类组授权设置(可用科室)">
<sql>
select distinct
b.DPTID,b.DPTCODE,b.DPTNAME,b.DPTZJM,b.JGID,a.KSPKEY
from
HIS_MMS_KSGLLZ a left join MAIN_KS b on
a.JGID=b.JGID and
b.DPTID=a.KSPKEY where b.DPTFLAG = '1' and a.JGID=?
</sql>
<tables>
<table delete="false" insert="false" name="HIS_MMS_KSGLLZ"
update="false">
<primary>KSPKEY</primary>
<primary>JGID</primary>
</table>
<table delete="true" insert="true" name="MAIN_KS" update="true">
<primary>DPTID</primary>
<primary>DPTCODE</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="DPTID" table="MAIN_KS" type="12" />
<f name="DPTCODE" table="MAIN_KS" type="12" />
<f name="DPTNAME" table="MAIN_KS" type="12" />
<f name="DPTZJM" table="MAIN_KS" type="12" />
<f name="JGID" table="MAIN_KS,HIS_MMS_KSGLLZ" type="12" />
<f name="KSPKEY" table="HIS_MMS_KSGLLZ" type="12" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<!--收费项物资POP -->
<dao id="mmsSfxyppopdao" type="1">
<sql>
select
a.JGID,a.BM,a.MC,a.JBDW,a.FYDL,a.FYZL,a.HSZFL,a.KJZFL,a.MZZFL,a.ZYZFL,a.BASYFL,a.KCFL,a.RKDW,a.ZHXS,a.MZFYDW,a.ZYFYDW,a.JG,a.JBJG,a.SFYJ,a.SFXMSM,a.BZ,a.ZT,b.WZCS,b.WZGG,a.DWVIEW,b.WZJJ,b.ZBGYS,b.ZBPSS,(select
sum(SL) SL from HIS_KSKC where sfx_bm=a.bm and JGID=a.JGID)
sl,a.YBBM,a.YBMC from HIS_SFX a
left join HIS_MMS_WZZD b on
a.GLBM=b.WZBM
where a.JGID=? and a.GLLX='W' and b.WZLZ like ? and
(a.BM like ? or a.MC
like ? or EXISTS (SELECT 1 FROM HIS_SFX_ZJM b
WHERE b.SFX_BM = a.BM
and b.JGID=a.JGID and b.PYM like ?))
</sql>
<tables>
<table name="HIS_SFX" insert="false" update="false"
delete="false">
<primary>JGID</primary>
<primary>BM</primary>
</table>
</tables>
<fields>
<f name="JGID" type="12" table="HIS_SFX" />
<f name="BM" type="12" table="HIS_SFX" />
<f name="MC" type="12" table="HIS_SFX" />
<f name="JBDW" type="12" table="HIS_SFX" />
<f name="FYDL" type="12" table="HIS_SFX" />
<f name="FYZL" type="12" table="HIS_SFX" />
<f name="HSZFL" type="12" table="HIS_SFX" />
<f name="KJZFL" type="12" table="HIS_SFX" />
<f name="MZZFL" type="12" table="HIS_SFX" />
<f name="ZYZFL" type="12" table="HIS_SFX" />
<f name="BASYFL" type="12" table="HIS_SFX" />
<f name="KCFL" type="12" table="HIS_SFX" />
<f name="RKDW" type="12" table="HIS_SFX" />
<f name="ZHXS" type="8" table="HIS_SFX" />
<f name="MZFYDW" type="12" table="HIS_SFX" />
<f name="ZYFYDW" type="12" table="HIS_SFX" />
<f name="JG" type="8" table="HIS_SFX" />
<f name="JBJG" type="8" table="HIS_SFX" />
<f name="SFYJ" type="12" table="HIS_SFX" />
<f name="SFXMSM" type="12" table="HIS_SFX" />
<f name="BZ" type="12" table="HIS_SFX" />
<f name="ZT" type="12" table="HIS_SFX" />
<f name="WZCS" type="12" />
<f name="WZGG" type="12" />
<f name="DWVIEW" type="12" table="HIS_SFX" />
<f name="WZJJ" type="8" />
<f name="ZBGYS" type="12" />
<f name="ZBPSS" type="12" />
<f name="SL" type="4" />
<f name="YBBM" type="12" table="HIS_SFX" />
<f name="YBMC" type="12" table="HIS_SFX" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsrkddao" log="true" type="1" memo="物资入库主表dao">
<sql>select
PKEY,DJH,DPTID,GYS,WZLZ,ZDRQ,DD_DJH,DDPKEY,RKLX,HB,RATE,ZXF,ZDR,SHZT,WCZT,SHR,SHRQ,JE,SJJE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate
打印日期,'' 大写总金额 from HIS_MMS_KC_RKD where JGID=? and DJH=?
</sql>
<tables>
<table name="HIS_MMS_KC_RKD" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_RKD" />
<f name="DJH" type="12" table="HIS_MMS_KC_RKD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_RKD" />
<f name="GYS" type="12" table="HIS_MMS_KC_RKD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_RKD" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="DD_DJH" type="12" table="HIS_MMS_KC_RKD" />
<f name="DDPKEY" type="12" table="HIS_MMS_KC_RKD" />
<f name="RKLX" type="12" table="HIS_MMS_KC_RKD" />
<f name="HB" type="12" table="HIS_MMS_KC_RKD" />
<f name="RATE" type="8" table="HIS_MMS_KC_RKD" />
<f name="ZXF" type="8" table="HIS_MMS_KC_RKD" />
<f name="ZDR" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_RKD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHR" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="JE" type="8" table="HIS_MMS_KC_RKD" />
<f name="SJJE" type="8" table="HIS_MMS_KC_RKD" />
<f name="BZ" type="12" table="HIS_MMS_KC_RKD" />
<f name="CJR" type="12" table="HIS_MMS_KC_RKD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="XGR" type="12" table="HIS_MMS_KC_RKD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="JGID" type="12" table="HIS_MMS_KC_RKD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_RKD" />
<f name="打印日期" type="93" table="HIS_MMS_KC_RKD" />
<f name="大写总金额" type="12" table="HIS_MMS_KC_RKD" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDingdanQueryDao" log="true" type="1" memo="物资订单查询dao">
<sql>
select
a.PKEY,a.DJH,a.DPTID,a.GYS,a.WZLZ,a.ZDRQ,a.HB,a.RATE,a.ZXF,a.ZDR,a.SHZT,a.WCZT,a.SHR,a.SHRQ,a.JYRQ,a.JE,a.BZ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG
from HIS_MMS_KC_DD a where a.JGID=? #select#
</sql>
<tables>
<table name="HIS_MMS_KC_DD" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DD" />
<f name="DJH" type="12" table="HIS_MMS_KC_DD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_DD" />
<f name="GYS" type="12" table="HIS_MMS_KC_DD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_DD" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="HB" type="12" table="HIS_MMS_KC_DD" />
<f name="RATE" type="8" table="HIS_MMS_KC_DD" />
<f name="ZXF" type="8" table="HIS_MMS_KC_DD" />
<f name="ZDR" type="12" table="HIS_MMS_KC_DD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_DD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_DD" />
<f name="SHR" type="12" table="HIS_MMS_KC_DD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="JYRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="JE" type="8" table="HIS_MMS_KC_DD" />
<f name="BZ" type="12" table="HIS_MMS_KC_DD" />
<f name="CJR" type="12" table="HIS_MMS_KC_DD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="XGR" type="12" table="HIS_MMS_KC_DD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DD" />
<f name="JGID" type="12" table="HIS_MMS_KC_DD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_DD" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDingdanMxDao" log="true" type="1" memo="物资订单明细dao">
<sql>
select
a.PKEY,a.DDPKEY,a.DJH,a.DPTID,a.XH,a.SFX_BM,a.DHRQ,a.QQDHSL,a.SJDHSL,a.SJJHSL,a.DW,a.DJ,a.JE,a.CGJHMX_PKEY,a.BZ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,c.WZCS,b.DWVIEW
from HIS_MMS_KC_DD_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
where a.JGID=? and a.DDPKEY=? order by a.XH
</sql>
<tables>
<table name="HIS_MMS_KC_DD_MX" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DDPKEY" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DPTID" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DHRQ" type="93" table="HIS_MMS_KC_DD_MX" />
<f name="QQDHSL" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="SJDHSL" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="SJJHSL" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_DD_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_DD_MX" />
<f name="CGJHMX_PKEY" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="BZ" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="MC" type="12" />
<f name="WZCS" type="12" />
<f name="DWVIEW" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsrkdquerydao" log="true" type="1" memo="物资入库单查询dao">
<sql><![CDATA[
select PKEY,DJH,DPTID,GYS,WZLZ,ZDRQ,DD_DJH,DDPKEY,RKLX,HB,RATE,ZXF,ZDR,SHZT,WCZT,SHR,SHRQ,JE,SJJE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_RKD where JGID=? and ZDRQ >=? and ZDRQ <=?]]></sql>
<tables>
<table name="HIS_MMS_KC_RKD" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_RKD" />
<f name="DJH" type="12" table="HIS_MMS_KC_RKD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_RKD" />
<f name="GYS" type="12" table="HIS_MMS_KC_RKD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_RKD" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="DD_DJH" type="12" table="HIS_MMS_KC_RKD" />
<f name="DDPKEY" type="12" table="HIS_MMS_KC_RKD" />
<f name="RKLX" type="12" table="HIS_MMS_KC_RKD" />
<f name="HB" type="12" table="HIS_MMS_KC_RKD" />
<f name="RATE" type="8" table="HIS_MMS_KC_RKD" />
<f name="ZXF" type="8" table="HIS_MMS_KC_RKD" />
<f name="ZDR" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_RKD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHR" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="JE" type="8" table="HIS_MMS_KC_RKD" />
<f name="SJJE" type="8" table="HIS_MMS_KC_RKD" />
<f name="BZ" type="12" table="HIS_MMS_KC_RKD" />
<f name="CJR" type="12" table="HIS_MMS_KC_RKD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="XGR" type="12" table="HIS_MMS_KC_RKD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="JGID" type="12" table="HIS_MMS_KC_RKD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_RKD" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="mmsrkdmxquerydao" log="true" type="1" memo="物资入库单明细dao">
<sql>select
a.PKEY,a.RKDPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.ZHXS,c.WZCS,b.DWVIEW,a.SCRQ
from HIS_MMS_KC_RKD_MX a left join HIS_SFX b on a.JGID=b.JGID and
a.SFX_BM=b.BM left join HIS_MMS_WZZD c on c.WZBM=b.BM where a.JGID=?
and a.DJH=? order by a.XH</sql>
<tables>
<table name="HIS_MMS_KC_RKD_MX" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="RKDPKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="DPTID" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="PH" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="YXQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="ZK" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="FPHM" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="FPJE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="PCJG" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="DDMX_PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="BZ" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="MC" type="12" />
<f name="JBDW" type="12" />
<f name="ZHXS" type="8" />
<f name="WZCS" type="12" />
<f name="DWVIEW" type="12" />
<f name="SCRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsthddao" log="true" type="1" memo="物资退货单主表dao">
<sql>select
PKEY,DJH,DPTID,GYS,RK_DJH,WZLZ,ZDRQ,ZDR,SHZT,WCZT,SHR,SHRQ,JE,SJJE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate
打印日期,'' 大写总金额 from HIS_MMS_KC_THD where JGID=? and DJH=?</sql>
<tables>
<table name="HIS_MMS_KC_THD" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_THD" />
<f name="DJH" type="12" table="HIS_MMS_KC_THD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_THD" />
<f name="GYS" type="12" table="HIS_MMS_KC_THD" />
<f name="RK_DJH" type="12" table="HIS_MMS_KC_THD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_THD" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_THD" />
<f name="ZDR" type="12" table="HIS_MMS_KC_THD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_THD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_THD" />
<f name="SHR" type="12" table="HIS_MMS_KC_THD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_THD" />
<f name="JE" type="8" table="HIS_MMS_KC_THD" />
<f name="SJJE" type="8" table="HIS_MMS_KC_THD" />
<f name="BZ" type="12" table="HIS_MMS_KC_THD" />
<f name="CJR" type="12" table="HIS_MMS_KC_THD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_THD" />
<f name="XGR" type="12" table="HIS_MMS_KC_THD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_THD" />
<f name="JGID" type="12" table="HIS_MMS_KC_THD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_THD" />
<f name="打印日期" type="93" table="HIS_MMS_KC_THD" />
<f name="大写总金额" type="12" table="HIS_MMS_KC_THD" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsthdquerydao" log="true" type="1">
<sql>select
JGID,DJH,DPTID,GYS,WZLZ,RK_DJH,ZDRQ,ZDR,SHZT,WCZT,SHR,SHRQ,JE,SJJE,BZ
from HIS_MMS_KC_THD a
where a.JGID=? and a.ZDRQ between ? and ?
</sql>
<fields>
<f name="JGID" type="12" />
<f name="DJH" type="12" />
<f name="DPTID" type="12" />
<f name="GYS" type="12" />
<f name="WZLZ" type="12" />
<f name="RK_DJH" type="12" />
<f name="ZDRQ" type="93" />
<f name="ZDR" type="12" />
<f name="SHZT" type="12" />
<f name="WCZT" type="12" />
<f name="SHR" type="12" />
<f name="SHRQ" type="93" />
<f name="JE" type="8" />
<f name="SJJE" type="8" />
<f name="BZ" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="mmsthdmxdao" log="true" type="1" memo="物资退货单明细表dao">
<sql>select a.PKEY,a.THDPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.ZHXS,c.WZCS,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
from HIS_MMS_KC_THD_MX a
left join HIS_MMS_KC_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_MMS_WZZD c on c.WZBM=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_MMS_KC_THD_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="THDPKEY" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_THD_MX" />
<f name="RKDMX_PKEY" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_THD_MX" />
<f name="THYY" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_THD_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_THD_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_THD_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_THD_MX" />
<f name="FPHM" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="FPJE" type="8" table="HIS_MMS_KC_THD_MX" />
<f name="PCJG" type="8" table="HIS_MMS_KC_THD_MX" />
<f name="BZ" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_THD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_THD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_THD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_THD_MX" />
<f name="MC" type="12" />
<f name="JBDW" type="12" />
<f name="ZHXS" type="8" />
<f name="WZCS" type="12" />
<f name="SFX_BM" type="12" />
<f name="PH" type="12" />
<f name="YXQ" type="93" />
<f name="RKSL" type="-5" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_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" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskctzdao" log="true" type="1" memo="物资库存调整主表dao">
<sql>select PKEY,DJH,DPTID,WZLZ,SHZT,WCZT,SHR,SHRQ,TZYY,JE,SJJE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_MMS_KC_KCTZ where JGID=? and DJH=?</sql>
<tables>
<table name="HIS_MMS_KC_KCTZ" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="DJH" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="DPTID" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="SHZT" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="WCZT" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="SHR" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_KCTZ" />
<f name="TZYY" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="JE" type="8" table="HIS_MMS_KC_KCTZ" />
<f name="SJJE" type="8" table="HIS_MMS_KC_KCTZ" />
<f name="BZ" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="CJR" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_KCTZ" />
<f name="XGR" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_KCTZ" />
<f name="JGID" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_KCTZ" />
<f name="打印日期" type="93" table="HIS_MMS_KC_KCTZ" />
<f name="大写总金额" type="12" table="HIS_MMS_KC_KCTZ" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskctzmxdao" log="true" type="1" memo="物资库存调整明细表">
<sql>
select a.PKEY,a.THDPKEY,a.DJH,a.XH,a.SFX_BM,a.KSKC_PC_PKEY,a.DW,a.DJ,a.SJ,a.SL,a.JE,a.SJJE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,a.YXQ,a.SCRQ,b.MC,b.JBDW,b.RKDW,b.ZHXS,b.DWVIEW,c.WZCS,c.WZGG,
e.PH,e.SL PCSL,e.KYSL,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ,a.TZPH
from HIS_MMS_KC_KCTZ_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
left join 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_MMS_KC_KCTZ_MX " insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="THDPKEY" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="DJH" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="XH" type="-5" table="HIS_MMS_KC_KCTZ_MX " />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="DW" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="DJ" type="8" table="HIS_MMS_KC_KCTZ_MX " />
<f name="SJ" type="8" table="HIS_MMS_KC_KCTZ_MX " />
<f name="SL" type="-5" table="HIS_MMS_KC_KCTZ_MX " />
<f name="JE" type="8" table="HIS_MMS_KC_KCTZ_MX " />
<f name="SJJE" type="8" table="HIS_MMS_KC_KCTZ_MX " />
<f name="CJR" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="CJRQ" type="93" table="HIS_MMS_KC_KCTZ_MX " />
<f name="XGR" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="XGRQ" type="93" table="HIS_MMS_KC_KCTZ_MX " />
<f name="JGID" type="12" table="HIS_MMS_KC_KCTZ_MX " />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_KCTZ_MX " />
<f name="YXQ" type="93" table="HIS_MMS_KC_KCTZ_MX " />
<f name="SCRQ" type="93" table="HIS_MMS_KC_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="WZCS" type="12" />
<f name="WZGG" type="12" />
<f name="PH" type="12" />
<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="TZPH" type="12" table="HIS_MMS_KC_KCTZ_MX " />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskctzquerydao" log="true" type="1" memo="物资库存调整查询dao">
<sql><![CDATA[
select PKEY,DJH,DPTID,WZLZ,SHZT,WCZT,SHR,SHRQ,TZYY,JE,SJJE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_KCTZ where JGID=? and CJRQ >= ? and CJRQ <=?
]]></sql>
<tables>
<table name="HIS_MMS_KC_KCTZ" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="DJH" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="DPTID" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="SHZT" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="WCZT" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="SHR" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_KCTZ" />
<f name="TZYY" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="JE" type="8" table="HIS_MMS_KC_KCTZ" />
<f name="SJJE" type="8" table="HIS_MMS_KC_KCTZ" />
<f name="BZ" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="CJR" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_KCTZ" />
<f name="XGR" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_KCTZ" />
<f name="JGID" type="12" table="HIS_MMS_KC_KCTZ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_KCTZ" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="mmspckcpopdao" log="true" type="1">
<sql><![CDATA[
select b.PKEY,b.PH,b.YXQ,b.SCRQ,b.KYSL,c.BM,c.MC,c.JBDW,c.ZHXS,c.RKDW,c.DWVIEW,y.WZCS,y.WZGG,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_MMS_WZZD y on c.BM=y.WZBM
where a.JGID=? and a.DPTID=? and b.KYSL>0 and c.GLLX='W' and y.WZLZ=? 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="YXQ" type="93" />
<f name="SCRQ" 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="WZCS" type="12" />
<f name="WZGG" 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="mmskcshdao" log="true" type="1" memo="物资报损表dao">
<sql>select PKEY,DJH,DPTID,WZLZ,SHZT,WCZT,SHR,SHRQ,TZYY,JE,SJJE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_MMS_KC_KCSH where JGID=? and DJH=?</sql>
<tables>
<table name="HIS_MMS_KC_KCSH" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_KCSH" />
<f name="DJH" type="12" table="HIS_MMS_KC_KCSH" />
<f name="DPTID" type="12" table="HIS_MMS_KC_KCSH" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_KCSH" />
<f name="SHZT" type="12" table="HIS_MMS_KC_KCSH" />
<f name="WCZT" type="12" table="HIS_MMS_KC_KCSH" />
<f name="SHR" type="12" table="HIS_MMS_KC_KCSH" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_KCSH" />
<f name="TZYY" type="12" table="HIS_MMS_KC_KCSH" />
<f name="JE" type="8" table="HIS_MMS_KC_KCSH" />
<f name="SJJE" type="8" table="HIS_MMS_KC_KCSH" />
<f name="BZ" type="12" table="HIS_MMS_KC_KCSH" />
<f name="CJR" type="12" table="HIS_MMS_KC_KCSH" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_KCSH" />
<f name="XGR" type="12" table="HIS_MMS_KC_KCSH" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_KCSH" />
<f name="JGID" type="12" table="HIS_MMS_KC_KCSH" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_KCSH" />
<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="mmskcshmxdao" log="true" type="1" memo="物资损耗明细表dao">
<sql>
select a.PKEY,a.KCSHPKEY,a.XH,a.SFX_BM,a.DJH,a.KSKC_PC_PKEY,a.DW,a.DJ,a.SJ,a.SL,a.JE,a.SJJE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.RKDW,b.JBJG,b.JG,b.ZHXS,c.WZCS,c.WZGG,
e.PH,e.YXQ,e.SL PCSL,e.KYSL,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ,b.DWVIEW
from HIS_MMS_KC_KCSH_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
left join 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_MMS_KC_KCSH_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="KCSHPKEY" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_KCSH_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_KCSH_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_KCSH_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_KCSH_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_KCSH_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_KCSH_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_KCSH_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_KCSH_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_KCSH_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_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="WZCS" type="12" />
<f name="WZGG" 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" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskcshquerydao" log="true" type="1">
<sql><![CDATA[
select PKEY,DJH,DPTID,WZLZ,SHZT,WCZT,SHR,SHRQ,TZYY,JE,SJJE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_KCSH where JGID=? and CJRQ >= ? and CJRQ <=?
]]></sql>
<tables>
<table name="HIS_MMS_KC_KCSH" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_KCSH" />
<f name="DJH" type="12" table="HIS_MMS_KC_KCSH" />
<f name="DPTID" type="12" table="HIS_MMS_KC_KCSH" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_KCSH" />
<f name="SHZT" type="12" table="HIS_MMS_KC_KCSH" />
<f name="WCZT" type="12" table="HIS_MMS_KC_KCSH" />
<f name="SHR" type="12" table="HIS_MMS_KC_KCSH" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_KCSH" />
<f name="TZYY" type="12" table="HIS_MMS_KC_KCSH" />
<f name="JE" type="8" table="HIS_MMS_KC_KCSH" />
<f name="SJJE" type="8" table="HIS_MMS_KC_KCSH" />
<f name="BZ" type="12" table="HIS_MMS_KC_KCSH" />
<f name="CJR" type="12" table="HIS_MMS_KC_KCSH" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_KCSH" />
<f name="XGR" type="12" table="HIS_MMS_KC_KCSH" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_KCSH" />
<f name="JGID" type="12" table="HIS_MMS_KC_KCSH" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_KCSH" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="mmsdbsqdao" log="true" type="1" memo="物资调拨申请单dao">
<sql>select PKEY,DJH,SQKS,JSKS,WZLZ,ZDRQ,ZDR,WCZT,JE,SJJE,SHZT,SHR,SHRQ,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_MMS_KC_DBSQ where JGID=? and DJH=?</sql>
<tables>
<table name="HIS_MMS_KC_DBSQ" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="DJH" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="SQKS" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="JSKS" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="ZDR" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="WCZT" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="JE" type="8" table="HIS_MMS_KC_DBSQ" />
<f name="SJJE" type="8" table="HIS_MMS_KC_DBSQ" />
<f name="SHZT" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="SHR" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="BZ" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="CJR" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="XGR" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="JGID" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_DBSQ" />
<f name="打印日期" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="大写总金额" type="12" table="HIS_MMS_KC_DBSQ" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsdbsqmxdao" log="true" type="1" memo="物资调拨申请明细单dao">
<sql>
select a.PKEY,a.DBSQPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.WZCS,b.DWVIEW
,e.DJ PCDJ,e.JBDJ PCJBDJ,e.SJ PCSJ,e.JBSJ PCJBSJ,e.PH,e.YXQ,c.WZGG
from HIS_MMS_KC_DBSQ_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
left join HIS_MMS_KC_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=? order by a.XH
</sql>
<tables>
<table name="HIS_MMS_KC_DBSQ_MX" insert="true" update="true" delete="true">
<primary>JGID</primary>
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="DBSQPKEY" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SJDBSL" type="-5" table="HIS_MMS_KC_DBSQ_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_DBSQ_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_DBSQ_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DBSQ_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DBSQ_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_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="WZCS" 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="PH" type="12" />
<f name="YXQ" type="93" />
<f name="WZGG" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsdbquerydao" log="true" type="1">
<sql><![CDATA[
select a.PKEY,a.DJH,a.SQKS,a.JSKS,a.WZLZ,a.ZDRQ,a.ZDR,a.WCZT,a.JE,a.SJJE,a.SHZT,a.SHR,a.SHRQ,a.BZ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG from HIS_MMS_KC_DBSQ a where a.JGID=? and a.ZDRQ >= ? and a.ZDRQ <= ? #select#
]]></sql>
<tables>
<table name="HIS_MMS_KC_DBSQ" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="DJH" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="SQKS" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="JSKS" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="ZDR" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="WCZT" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="JE" type="8" table="HIS_MMS_KC_DBSQ" />
<f name="SJJE" type="8" table="HIS_MMS_KC_DBSQ" />
<f name="SHZT" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="SHR" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="BZ" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="CJR" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="XGR" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DBSQ" />
<f name="JGID" type="12" table="HIS_MMS_KC_DBSQ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_DBSQ" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="mmsdbddao" log="true" type="1" memo="物资调拨单dao">
<sql>select PKEY,DJH,SQDJH,SQKS,JSKS,WZLZ,CKRQ,CKR,CKSHRQ,CKSHR,RKSHRQ,RKSHR,WCZT,SHZT,RKZT,ZYLX,JE,SJJE,ZT,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_MMS_KC_DBD where JGID=? and DJH=?</sql>
<tables>
<table name="HIS_MMS_KC_DBD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DBD" />
<f name="DJH" type="12" table="HIS_MMS_KC_DBD" />
<f name="SQDJH" type="12" table="HIS_MMS_KC_DBD" />
<f name="SQKS" type="12" table="HIS_MMS_KC_DBD" />
<f name="JSKS" type="12" table="HIS_MMS_KC_DBD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_DBD" />
<f name="CKRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="CKR" type="12" table="HIS_MMS_KC_DBD" />
<f name="CKSHRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="CKSHR" type="12" table="HIS_MMS_KC_DBD" />
<f name="RKSHRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="RKSHR" type="12" table="HIS_MMS_KC_DBD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_DBD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_DBD" />
<f name="RKZT" type="12" table="HIS_MMS_KC_DBD" />
<f name="ZYLX" type="12" table="HIS_MMS_KC_DBD" />
<f name="JE" type="8" table="HIS_MMS_KC_DBD" />
<f name="SJJE" type="8" table="HIS_MMS_KC_DBD" />
<f name="ZT" type="12" table="HIS_MMS_KC_DBD" />
<f name="BZ" type="12" table="HIS_MMS_KC_DBD" />
<f name="CJR" type="12" table="HIS_MMS_KC_DBD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="XGR" type="12" table="HIS_MMS_KC_DBD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="JGID" type="12" table="HIS_MMS_KC_DBD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_DBD" />
<f name="打印日期" type="93" table="HIS_MMS_KC_DBD" />
<f name="大写总金额" type="12" table="HIS_MMS_KC_DBD" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsdbdmxdao" log="true" type="1" memo="物资调拨单明细dao">
<sql>
select a.PKEY,a.DBDPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,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.WZCS,y.WZGG,b.ybbm,b.ybmc,c.FIRST_KSKC_PC_PKEY
from HIS_MMS_KC_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_MMS_KC_DBSQ_MX sq on a.JGID=sq.JGID and a.DBSQMX_PKEY=sq.PKEY
left join HIS_MMS_WZZD y on b.BM=y.WZBM
where a.JGID=? and a.DJH=?
</sql>
<tables>
<table name="HIS_MMS_KC_DBD_MX" insert="true" update="true" delete="true">
<primary>JGID</primary>
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="DBDPKEY" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_DBD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="DBSQMX_PKEY" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_DBD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_DBD_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_DBD_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_DBD_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_DBD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DBD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DBD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_DBD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_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="-5" />
<f name="SJDBSL" type="-5" />
<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="WZCS" type="12" />
<f name="WZGG" type="12" />
<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="mmsdbdquerydao" log="true" type="1" memo="物资调拨申请单查询dao">
<sql><![CDATA[
select PKEY,DJH,SQDJH,SQKS,JSKS,WZLZ,CKRQ,CKR,CKSHRQ,CKSHR,RKSHRQ,RKSHR,WCZT,SHZT,RKZT,ZYLX,JE,SJJE,ZT,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_DBD where JGID=? and CKRQ >= ? and CKRQ <=?
]]></sql>
<tables>
<table name="HIS_MMS_KC_DBD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DBD" />
<f name="DJH" type="12" table="HIS_MMS_KC_DBD" />
<f name="SQDJH" type="12" table="HIS_MMS_KC_DBD" />
<f name="SQKS" type="12" table="HIS_MMS_KC_DBD" />
<f name="JSKS" type="12" table="HIS_MMS_KC_DBD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_DBD" />
<f name="CKRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="CKR" type="12" table="HIS_MMS_KC_DBD" />
<f name="CKSHRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="CKSHR" type="12" table="HIS_MMS_KC_DBD" />
<f name="RKSHRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="RKSHR" type="12" table="HIS_MMS_KC_DBD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_DBD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_DBD" />
<f name="RKZT" type="12" table="HIS_MMS_KC_DBD" />
<f name="ZYLX" type="12" table="HIS_MMS_KC_DBD" />
<f name="JE" type="8" table="HIS_MMS_KC_DBD" />
<f name="SJJE" type="8" table="HIS_MMS_KC_DBD" />
<f name="ZT" type="12" table="HIS_MMS_KC_DBD" />
<f name="BZ" type="12" table="HIS_MMS_KC_DBD" />
<f name="CJR" type="12" table="HIS_MMS_KC_DBD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="XGR" type="12" table="HIS_MMS_KC_DBD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DBD" />
<f name="JGID" type="12" table="HIS_MMS_KC_DBD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_DBD" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="mmsdbmxquerydao" log="true" type="1" memo="物资调拨通过科室请领单导入的查询明细dao">
<sql>
select a.PKEY,a.DBSQPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.WZCS,c.WZGG,d.SQKS,d.JSKS,b.DWVIEW,
d.WZLZ,pc.PH,pc.YXQ,pc.DJ PCDJ,pc.JBDJ PCJBDJ,pc.SJ PCSJ,pc.JBSJ PCJBSJ,pc.KYSL
from HIS_MMS_KC_DBSQ_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
left join HIS_MMS_KC_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_MMS_KC_DBSQ_MX" insert="true" update="true" delete="true">
<primary>JGID</primary>
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="DBSQPKEY" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SJDBSL" type="-5" table="HIS_MMS_KC_DBSQ_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_DBSQ_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_DBSQ_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_DBSQ_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DBSQ_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DBSQ_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_DBSQ_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_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="WZCS" type="12" />
<f name="WZGG" type="12" />
<f name="SQKS" type="12" />
<f name="JSKS" type="12" />
<f name="DWVIEW" type="12" />
<f name="WZLZ" 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="mmskcpddao" log="true" type="1" memo="库存盘点主表dao">
<sql>select PKEY,DJH,DPTID,WCZT,SPZT,SHZT,SHR,SHRQ,TZDJH,QSHW,JSHW,WZLZ,KCFL,BHBKY,JBKY,FLKC,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,sysdate 打印日期,'' 大写总金额 from HIS_MMS_KC_PD where JGID=? and DJH=?</sql>
<tables>
<table name="HIS_MMS_KC_PD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_PD" />
<f name="DJH" type="12" table="HIS_MMS_KC_PD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_PD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SPZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SHR" type="12" table="HIS_MMS_KC_PD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="TZDJH" type="12" table="HIS_MMS_KC_PD" />
<f name="QSHW" type="12" table="HIS_MMS_KC_PD" />
<f name="JSHW" type="12" table="HIS_MMS_KC_PD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_PD" />
<f name="KCFL" type="12" table="HIS_MMS_KC_PD" />
<f name="BHBKY" type="12" table="HIS_MMS_KC_PD" />
<f name="JBKY" type="12" table="HIS_MMS_KC_PD" />
<f name="FLKC" type="12" table="HIS_MMS_KC_PD" />
<f name="CJR" type="12" table="HIS_MMS_KC_PD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="XGR" type="12" table="HIS_MMS_KC_PD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="JGID" type="12" table="HIS_MMS_KC_PD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_PD" />
<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="mmskcpdmxdao" log="true" type="1" memo="库存盘点明细表dao">
<sql>
select a.PKEY,a.PDPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.RKDW,b.JBJG,b.JG,b.ZHXS,c.WZCS,c.WZGG,
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_MMS_KC_PD_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.GLBM
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_MMS_KC_PD_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="PDPKEY" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_PD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="ZPS" type="-5" table="HIS_MMS_KC_PD_MX" />
<f name="RKDWZPS" type="8" table="HIS_MMS_KC_PD_MX" />
<f name="ZPSJ" type="93" table="HIS_MMS_KC_PD_MX" />
<f name="SPS" type="-5" table="HIS_MMS_KC_PD_MX" />
<f name="SPSJ" type="93" table="HIS_MMS_KC_PD_MX" />
<f name="SPR" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="SYS" type="-5" table="HIS_MMS_KC_PD_MX" />
<f name="KCTZ_PKEY" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_PD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_PD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_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="WZCS" type="12" />
<f name="WZGG" 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="mmsLzGlKcflMCDao" log="true" type="1" memo="物资管理库类组关联库存分类名称dao">
<sql>
SELECT a.PKEY,a.LZPKEY,a.KCFLPKEY,a.LZTYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.mc FROM HIS_MMS_LZGLKCFL a left join MAIN_JGZDB b on a.JGID=b.JGID and b.JGZDLB_BH='Z00008' and a.KCFLPKEY=b.bh WHERE a.JGID=? AND a.LZPKEY=? ORDER BY a.PKEY
</sql>
<tables>
<table name="HIS_MMS_LZGLKCFL" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="LZPKEY" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="KCFLPKEY" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="LZTYPE" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="CJR" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="CJRQ" type="93" table="HIS_MMS_LZGLKCFL" />
<f name="XGR" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="XGRQ" type="93" table="HIS_MMS_LZGLKCFL" />
<f name="JGID" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_LZGLKCFL" />
<f name="MC" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskspckcquerydao" log="true" type="1" memo="用于物资盘点增加盘点库存明细dao">
<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.WZCS,y.WZGG,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_MMS_WZZD y on c.GLBM=y.WZBM
where a.JGID=? and c.GLLX='W' 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="WZCS" type="12" />
<f name="WZGG" type="12" />
<f name="DWVIEW" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskcpdquerydao" log="true" type="1" memo="物资生成账盘的查询单据dao">
<sql><![CDATA[
select PKEY,DJH,DPTID,WCZT,SPZT,SHZT,SHR,SHRQ,TZDJH,QSHW,JSHW,WZLZ,KCFL,BHBKY,JBKY,FLKC,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_PD where JGID=? and CJRQ >=? and CJRQ <=? ORDER BY CJRQ
]]></sql>
<tables>
<table name="HIS_MMS_KC_PD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_PD" />
<f name="DJH" type="12" table="HIS_MMS_KC_PD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_PD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SPZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SHR" type="12" table="HIS_MMS_KC_PD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="TZDJH" type="12" table="HIS_MMS_KC_PD" />
<f name="QSHW" type="12" table="HIS_MMS_KC_PD" />
<f name="JSHW" type="12" table="HIS_MMS_KC_PD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_PD" />
<f name="KCFL" type="12" table="HIS_MMS_KC_PD" />
<f name="BHBKY" type="12" table="HIS_MMS_KC_PD" />
<f name="JBKY" type="12" table="HIS_MMS_KC_PD" />
<f name="FLKC" type="12" table="HIS_MMS_KC_PD" />
<f name="CJR" type="12" table="HIS_MMS_KC_PD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="XGR" type="12" table="HIS_MMS_KC_PD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="JGID" type="12" table="HIS_MMS_KC_PD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_PD" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="mmspdmxdao" log="true" type="1" >
<sql>select a.PKEY,a.PDPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.RKDW,b.JBJG,b.JG,b.ZHXS,c.WZCS,c.WZGG,e.PH,e.YXQ,b.DWVIEW from HIS_MMS_KC_PD_MX a left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM left join HIS_MMS_WZZD c on c.WZBM=b.GLBM left join HIS_KSKC_PC e on a.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY where a.JGID=? and a.DJH=? and a.SFX_BM=?</sql>
<tables>
<table name="HIS_MMS_KC_PD_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="PDPKEY" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_PD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="ZPS" type="-5" table="HIS_MMS_KC_PD_MX" />
<f name="RKDWZPS" type="8" table="HIS_MMS_KC_PD_MX" />
<f name="ZPSJ" type="93" table="HIS_MMS_KC_PD_MX" />
<f name="SPS" type="-5" table="HIS_MMS_KC_PD_MX" />
<f name="SPSJ" type="93" table="HIS_MMS_KC_PD_MX" />
<f name="SPR" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="SYS" type="-5" table="HIS_MMS_KC_PD_MX" />
<f name="KCTZ_PKEY" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_PD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_PD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_PD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_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="WZCS" type="12" />
<f name="WZGG" type="12" />
<f name="PH" type="12" />
<f name="YXQ" type="93" />
<f name="DWVIEW" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmspdmxpopdao" log="true" type="1" memo="物资库存盘点实盘查询定位的dao">
<sql>
select a.XH,a.SFX_BM,b.MC,b.JBDW,b.RKDW,b.JBJG,b.JG,b.ZHXS,c.WZCS,c.WZGG,e.PH,e.YXQ,b.DWVIEW
from HIS_MMS_KC_PD_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.GLBM
left join HIS_KSKC_PC e on a.JGID=e.JGID and e.PKEY=a.KSKC_PC_PKEY
where a.JGID=? and a.DJH=? and (a.SFX_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="XH" type="-5" />
<f name="SFX_BM" type="12" />
<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="WZCS" type="12" />
<f name="WZGG" type="12" />
<f name="PH" type="12" />
<f name="YXQ" type="93" />
<f name="DWVIEW" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskcpdtzquerydao" log="true" type="1" memo="物资盘点调整dao">
<sql><![CDATA[
select PKEY,DJH,DPTID,WCZT,SPZT,SHZT,SHR,SHRQ,TZDJH,QSHW,JSHW,WZLZ,KCFL,BHBKY,JBKY,FLKC,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_PD where JGID=? and SPZT='1'
]]></sql>
<tables>
<table name="HIS_MMS_KC_PD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_PD" />
<f name="DJH" type="12" table="HIS_MMS_KC_PD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_PD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SPZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_PD" />
<f name="SHR" type="12" table="HIS_MMS_KC_PD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="TZDJH" type="12" table="HIS_MMS_KC_PD" />
<f name="QSHW" type="12" table="HIS_MMS_KC_PD" />
<f name="JSHW" type="12" table="HIS_MMS_KC_PD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_PD" />
<f name="KCFL" type="12" table="HIS_MMS_KC_PD" />
<f name="BHBKY" type="12" table="HIS_MMS_KC_PD" />
<f name="JBKY" type="12" table="HIS_MMS_KC_PD" />
<f name="FLKC" type="12" table="HIS_MMS_KC_PD" />
<f name="CJR" type="12" table="HIS_MMS_KC_PD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="XGR" type="12" table="HIS_MMS_KC_PD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_PD" />
<f name="JGID" type="12" table="HIS_MMS_KC_PD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_PD" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmskcpdpopdao" log="true" type="1">
<sql>
select distinct b.BM,b.MC
from HIS_MMS_KC_PD_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.GLBM
where a.JGID=? and a.DJH=? 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" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskskcxxdao" log="true" type="1" memo="物资查询主表dao">
<sql>
select a.JGID,a.PKEY,a.SFX_BM,a.SL,a.KYSL,a.DJSL,a.HWM_BM,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.WZGG,c.WZCS,b.DWVIEW,c.WZLZ,c.KCFL,a.DPTID,b.ZT,b.ybbm,b.ybmc,a.LOCKFLAG,c.ZCZH
from HIS_KSKC a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.GLBM
where a.JGID=? and b.GLLX='W'
</sql>
<tables>
<table name="HIS_KSKC" insert="false" update="true" delete="false">
<primary>JGID</primary>
<primary>PKEY</primary>
<primary>SFX_BM</primary>
</table>
</tables>
<fields>
<f name="JGID" type="12" table="HIS_KSKC" />
<f name="PKEY" type="12" table="HIS_KSKC" />
<f name="SFX_BM" 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="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="WZGG" type="12" />
<f name="WZCS" type="12" />
<f name="DWVIEW" type="12" />
<f name="WZLZ" type="12" />
<f name="KCFL" type="12" />
<f name="DPTID" type="12" table="HIS_KSKC" />
<f name="ZT" type="12" />
<f name="YBBM" type="12" />
<f name="YBMC" type="12" />
<f name="LOCKFLAG" type="-5" table="HIS_KSKC" />
<f name="ZCZH" type="12" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmskskcpcxxdao" log="true" type="1" memo="物资库存查询明细dao">
<sql>
select a.PKEY,a.JGID,a.KSKC_PKEY,a.PH,a.YXQ,a.SCRQ,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,b.DWVIEW
,a.ZJPCTJBM
,log.DJ as LOG_DJ
,log.JBDJ as LOG_JBDJ
,log.SJ as LOG_SJ
,log.JBSJ as LOG_JBSJ
,null as SEL
from HIS_KSKC_PC a
left join HIS_KSKC c on c.JGID=a.JGID and c.PKEY=a.KSKC_PKEY
left join HIS_SFX b on c.JGID=b.JGID and c.SFX_BM=b.BM
left join HIS_KSKC_PC_TJ_LOG log on log.JGID = a.JGID and log.TJPCBM = a.ZJPCTJBM
where a.JGID=? and a.KSKC_PKEY=? and b.GLLX='W' order by a.CGSHRQ
</sql>
<tables>
<table name="HIS_KSKC_PC" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</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="SCRQ" 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="DWVIEW" type="12" />
<f name="ZJPCTJBM" table="HIS_KSKC_PC" type="12" />
<f name="LOG_DJ" type="8" />
<f name="LOG_JBDJ" type="8" />
<f name="LOG_SJ" type="8" />
<f name="LOG_JBSJ" type="8" />
<f name="SEL" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="kcwzallpopdao" log="true" type="1">
<sql>
select distinct b.BM,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JBJG,b.JG,c.WZCS
from HIS_KSKC a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.GLBM AND c.JGID=b.JGID
where a.JGID=? and b.GLLX='W' 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="8" />
<f name="JG" type="8" />
<f name="WZCS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsWzzdInKcDao" log="true" type="1" memo="用于判断物资字典是否已经入库,入库将不能进行库存和换算关系的调整">
<sql>select count(*) num from HIS_KSKC a LEFT JOIN HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.bm left join HIS_MMS_WZZD c on b.GLBM=c.WZBM where a.JGID=? and c.WZBM=?</sql>
<fields>
<f name="NUM" type="4" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsmzdfzzbnewdao" log="true" type="1" memo="门诊待发物资主表">
<sql>select PKEY,HZPKEY,JZPKEY,MZFPPKEY,ZDZBPKEY,FYCK,FYYF,FYZT,SFDY,SFTY,CFH,PYZT,SHZT,CJR,CJRQ,XGR,XGRQ,JGID,PYR,PYRQ,SHR,SHRQ,FYR,FYRQ from HIS_MMS_MZDFYZB where 1=2</sql>
<tables>
<table name="HIS_MMS_MZDFYZB" insert="true" update="true" delete="true">
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_MZDFYZB" />
<f name="HZPKEY" type="12" table="HIS_MMS_MZDFYZB" />
<f name="JZPKEY" type="12" table="HIS_MMS_MZDFYZB" />
<f name="MZFPPKEY" type="12" table="HIS_MMS_MZDFYZB" />
<f name="ZDZBPKEY" type="12" table="HIS_MMS_MZDFYZB" />
<f name="FYCK" type="12" table="HIS_MMS_MZDFYZB" />
<f name="FYYF" type="12" table="HIS_MMS_MZDFYZB" />
<f name="FYZT" type="12" table="HIS_MMS_MZDFYZB" />
<f name="SFDY" type="12" table="HIS_MMS_MZDFYZB" />
<f name="SFTY" type="12" table="HIS_MMS_MZDFYZB" />
<f name="CFH" type="12" table="HIS_MMS_MZDFYZB" />
<f name="PYZT" type="12" table="HIS_MMS_MZDFYZB" />
<f name="SHZT" type="12" table="HIS_MMS_MZDFYZB" />
<f name="CJR" type="12" table="HIS_MMS_MZDFYZB" />
<f name="CJRQ" type="93" table="HIS_MMS_MZDFYZB" />
<f name="XGR" type="12" table="HIS_MMS_MZDFYZB" />
<f name="XGRQ" type="93" table="HIS_MMS_MZDFYZB" />
<f name="JGID" type="12" table="HIS_MMS_MZDFYZB" />
<f name="PYR" type="12" table="HIS_MMS_MZDFYZB" />
<f name="PYRQ" type="93" table="HIS_MMS_MZDFYZB" />
<f name="SHR" type="12" table="HIS_MMS_MZDFYZB" />
<f name="SHRQ" type="93" table="HIS_MMS_MZDFYZB" />
<f name="FYR" type="12" table="HIS_MMS_MZDFYZB" />
<f name="FYRQ" type="93" table="HIS_MMS_MZDFYZB" />
</fields>
</dao>
<dao id="mmsfypybnewDao" log="true" type="1" memo="门诊,住院待发物资配药表">
<sql>select PKEY,YZX,YZMX,YZDJ,YZSL,DFYPKEY,FYMXPKEY,HZBQ,HZKS,FYKS,HZPKEY,YPFL,JZPKEY,TYPE,CJR,CJRQ,XGR,XGRQ,JGID,YZDL,TYSL,SFSL,SFLYSH,SFYSSH,LYSHR,LYSHRQ,YSSHR,YSSHRQ,FYZT,FYCX,PYLX,JSYBH,LOCKFLAG from HIS_MMS_PYB where 1=2</sql>
<tables>
<table name="HIS_MMS_PYB" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_PYB" />
<f name="YZX" type="12" table="HIS_MMS_PYB" />
<f name="YZMX" type="12" table="HIS_MMS_PYB" />
<f name="YZDJ" type="12" table="HIS_MMS_PYB" />
<f name="YZSL" type="12" table="HIS_MMS_PYB" />
<f name="DFYPKEY" type="12" table="HIS_MMS_PYB" />
<f name="FYMXPKEY" type="12" table="HIS_MMS_PYB" />
<f name="HZBQ" type="12" table="HIS_MMS_PYB" />
<f name="HZKS" type="12" table="HIS_MMS_PYB" />
<f name="FYKS" type="12" table="HIS_MMS_PYB" />
<f name="HZPKEY" type="12" table="HIS_MMS_PYB" />
<f name="YPFL" type="12" table="HIS_MMS_PYB" />
<f name="JZPKEY" type="12" table="HIS_MMS_PYB" />
<f name="TYPE" type="12" table="HIS_MMS_PYB" />
<f name="CJR" type="12" table="HIS_MMS_PYB" />
<f name="CJRQ" type="93" table="HIS_MMS_PYB" />
<f name="XGR" type="12" table="HIS_MMS_PYB" />
<f name="XGRQ" type="93" table="HIS_MMS_PYB" />
<f name="JGID" type="12" table="HIS_MMS_PYB" />
<f name="YZDL" type="12" table="HIS_MMS_PYB" />
<f name="TYSL" type="12" table="HIS_MMS_PYB" />
<f name="SFSL" type="12" table="HIS_MMS_PYB" />
<f name="SFLYSH" type="12" table="HIS_MMS_PYB" />
<f name="SFYSSH" type="12" table="HIS_MMS_PYB" />
<f name="LYSHR" type="12" table="HIS_MMS_PYB" />
<f name="LYSHRQ" type="93" table="HIS_MMS_PYB" />
<f name="YSSHR" type="12" table="HIS_MMS_PYB" />
<f name="YSSHRQ" type="93" table="HIS_MMS_PYB" />
<f name="FYZT" type="12" table="HIS_MMS_PYB" />
<f name="FYCX" type="12" table="HIS_MMS_PYB" />
<f name="PYLX" type="12" table="HIS_MMS_PYB" />
<f name="JSYBH" type="12" table="HIS_MMS_PYB" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_PYB" />
</fields>
</dao>
<dao id="mmsSfxJgDao" 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="mmsFindKcflByLzDao" log="true" type="1" memo="通过物资类组查找对应设置的库存分类dao">
<sql>
SELECT a.LZPKEY,a.KCFLPKEY,b.mc,b.BH FROM HIS_MMS_LZGLKCFL a left join MAIN_JGZDB b on b.BH=a.KCFLPKEY and a.JGID=b.JGID and b.JGZDLB_BH='Z00008' left join HIS_MMS_DJLZ c on a.lzpkey=c.pkey and a.JGID =c.JGID WHERE a.JGID=? AND c.bm like ? ORDER BY a.PKEY
</sql>
<fields>
<f name="LZPKEY" type="12" />
<f name="KCFLPKEY" type="12" />
<f name="MC" type="12" />
<f name="BH" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<!--收费项-->
<dao id="mmsHissfxdao" type="1" memo="物资专用收费项dao,因为物资收费项应该用关联编码来和物资字典进行绑定,收费项的编码不一定和物资字典编码一致">
<sql>
select JGID,BM,MC,JBDW,FYDL,FYZL,HSZFL,KJZFL,MZZFL,ZYZFL,BASYFL,KCFL,RKDW,ZHXS,MZFYDW,ZYFYDW,JG,SFYJ,SFXMSM,BZ,ZT,JBJG,YBBM,YBMC,GLLX,GLBM,GLRQ,DWVIEW,LOCKFLAG,YBPKEY from HIS_SFX where JGID=? and GLBM=?
</sql>
<tables>
<table name="HIS_SFX" insert="true" update="true" delete="true">
<primary>JGID</primary>
<primary>BM</primary>
</table>
</tables>
<fields>
<f name="JGID" type="12" table="HIS_SFX" />
<f name="BM" type="12" table="HIS_SFX" />
<f name="MC" type="12" table="HIS_SFX" />
<f name="JBDW" type="12" table="HIS_SFX" />
<f name="FYDL" type="12" table="HIS_SFX" />
<f name="FYZL" type="12" table="HIS_SFX" />
<f name="HSZFL" type="12" table="HIS_SFX" />
<f name="KJZFL" type="12" table="HIS_SFX" />
<f name="MZZFL" type="12" table="HIS_SFX" />
<f name="ZYZFL" type="12" table="HIS_SFX" />
<f name="BASYFL" type="12" table="HIS_SFX" />
<f name="KCFL" type="12" table="HIS_SFX" />
<f name="RKDW" type="12" table="HIS_SFX" />
<f name="ZHXS" type="8" table="HIS_SFX" />
<f name="MZFYDW" type="12" table="HIS_SFX" />
<f name="ZYFYDW" type="12" table="HIS_SFX" />
<f name="JG" type="8" table="HIS_SFX" />
<f name="SFYJ" type="12" table="HIS_SFX" />
<f name="SFXMSM" type="12" table="HIS_SFX" />
<f name="BZ" type="12" table="HIS_SFX" />
<f name="ZT" type="12" table="HIS_SFX" />
<f name="JBJG" type="8" table="HIS_SFX" />
<f name="YBBM" type="12" table="HIS_SFX" />
<f name="YBMC" type="12" table="HIS_SFX" />
<f name="GLLX" type="12" table="HIS_SFX" />
<f name="GLBM" type="12" table="HIS_SFX" />
<f name="GLRQ" type="93" table="HIS_SFX" />
<f name="DWVIEW" type="12" table="HIS_SFX" />
<f name="LOCKFLAG" type="-5" table="HIS_SFX" />
<f name="YBPKEY" type="12" table="HIS_SFX" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="zyMMSfypybByCancelExecDao" log="true" type="1" memo="住院护士工作站在撤销医嘱执行的时候,同步撤销没有发耗材的配耗材单dao">
<sql>
select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.WZGG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.zxflag,a.FYCX from HIS_MMS_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_MMS_WZZD c on a.YZX=c.WZBM and a.JGID=c.JGID left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=e.pkey and a.JGID=e.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID where a.JGID=? and a.hzpkey=? and a.JZPKEY =? AND a.TYPE='Z' and d.JZLX='Z' AND d.JZZT='Z' and a.FYCX=0 and a.FYZT=0 and e.zxflag=1 and a.YZMX=? and a.DFYPKEY=?
</sql>
<tables>
<table name="HIS_MMS_PYB" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>YZMX</primary>
<primary>DFYPKEY</primary>
<primary>FYCX</primary>
<primary>FYZT</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_PYB" />
<f name="YZX" type="12" table="HIS_MMS_PYB" />
<f name="YZMX" type="12" table="HIS_MMS_PYB" />
<f name="YZDJ" type="12" table="HIS_MMS_PYB" />
<f name="YZSL" type="12" table="HIS_MMS_PYB" />
<f name="DFYPKEY" type="12" table="HIS_MMS_PYB" />
<f name="FYMXPKEY" type="12" table="HIS_MMS_PYB" />
<f name="HZBQ" type="12" table="HIS_MMS_PYB" />
<f name="HZKS" type="12" table="HIS_MMS_PYB" />
<f name="FYKS" type="12" table="HIS_MMS_PYB" />
<f name="HZPKEY" type="12" table="HIS_MMS_PYB" />
<f name="YPFL" type="12" table="HIS_MMS_PYB" />
<f name="JZPKEY" type="12" table="HIS_MMS_PYB" />
<f name="TYPE" type="12" table="HIS_MMS_PYB" />
<f name="CJR" type="12" table="HIS_MMS_PYB" />
<f name="CJRQ" type="93" table="HIS_MMS_PYB" />
<f name="XGR" type="12" table="HIS_MMS_PYB" />
<f name="XGRQ" type="93" table="HIS_MMS_PYB" />
<f name="JGID" type="12" table="HIS_MMS_PYB" />
<f name="YZDL" type="12" table="HIS_MMS_PYB" />
<f name="TYSL" type="12" table="HIS_MMS_PYB" />
<f name="SFSL" type="12" table="HIS_MMS_PYB" />
<f name="SFLYSH" type="12" table="HIS_MMS_PYB" />
<f name="SFYSSH" type="12" table="HIS_MMS_PYB" />
<f name="LYSHR" type="12" table="HIS_MMS_PYB" />
<f name="LYSHRQ" type="93" table="HIS_MMS_PYB" />
<f name="YSSHR" type="12" table="HIS_MMS_PYB" />
<f name="YSSHRQ" type="93" table="HIS_MMS_PYB" />
<f name="FYZT" type="12" table="HIS_MMS_PYB" />
<f name="WARD" type="12" />
<f name="BED" type="12" />
<f name="JJYS" type="12" />
<f name="XM" type="12" />
<f name="ZXTIME" type="93" />
<f name="JZYZSL" type="4" />
<f name="YPYZJBDW" type="12" />
<f name="YZJZZHXS" type="12" />
<f name="YZMC" type="12" />
<f name="WZGG" type="12" />
<f name="YZJL" type="12" />
<f name="YZJLDW" type="12" />
<f name="YZPC" type="12" />
<f name="YZCL" type="12" />
<f name="ZXFLAG" type="12" />
<f name="FYCX" type="12" table="HIS_MMS_PYB" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmskskcAndPcxxdao" log="true" type="1" memo="所有库存批次信息查询">
<sql>
select kcpc.PH,kcpc.YXQ,kcpc.SL,kcpc.KYSL,kcpc.DJSL,kcpc.DJ,kcpc.JBDJ,kcpc.SJ,kcpc.JBSJ,kcpc.JGID,a.SFX_BM,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.WZGG,c.WZCS,b.DWVIEW,c.WZLZ,c.KCFL,a.DPTID,b.ZT,b.ybbm,b.ybmc,a.LOCKFLAG
from HIS_KSKC_PC kcpc left join HIS_KSKC a on kcpc.KSKC_PKEY=a.pkey and kcpc.JGID=a.JGID
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.GLBM
where a.JGID=? and b.GLLX='W' and kcpc.SL > 0
</sql>
<fields>
<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="JGID" type="12" />
<f name="SFX_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="WZGG" type="12" />
<f name="WZCS" type="12" />
<f name="DWVIEW" type="12" />
<f name="WZLZ" type="12" />
<f name="KCFL" type="12" />
<f name="DPTID" type="12" />
<f name="ZT" type="12" />
<f name="YBBM" type="12" />
<f name="YBMC" type="12" />
<f name="LOCKFLAG" type="-5" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmssfxypkcpopdao" log="true" type="1" memo="物资收费项关联库存批次的弹出选择物资项dao">
<sql><![CDATA[
select a.JGID,a.BM,a.MC,a.JBDW,a.FYDL,a.FYZL,a.HSZFL,a.KJZFL,a.MZZFL,a.ZYZFL,a.BASYFL,a.KCFL,a.RKDW,a.ZHXS,a.MZFYDW,a.ZYFYDW,a.JG,a.JBJG,a.SFYJ,a.SFXMSM,a.BZ,a.ZT,b.WZCS,b.WZGG,a.DWVIEW,b.WZJJ from HIS_SFX a
left join HIS_MMS_WZZD b on a.GLBM=b.WZBM
where a.JGID=? and a.GLLX='W' and b.WZLZ like ? and (a.BM like ? or a.MC like ? or EXISTS (SELECT 1 FROM HIS_SFX_ZJM b WHERE b.SFX_BM = a.BM and b.JGID=a.JGID and b.PYM like ?))
and exists (select 1 from HIS_KSKC ks where ks.JGID=a.JGID and ks.SFX_BM=a.BM and ks.SL>0)
]]></sql>
<tables>
<table name="HIS_SFX" insert="true" update="true" delete="true">
<primary>JGID</primary>
<primary>BM</primary>
</table>
</tables>
<fields>
<f name="JGID" type="12" table="HIS_SFX" />
<f name="BM" type="12" table="HIS_SFX" />
<f name="MC" type="12" table="HIS_SFX" />
<f name="JBDW" type="12" table="HIS_SFX" />
<f name="FYDL" type="12" table="HIS_SFX" />
<f name="FYZL" type="12" table="HIS_SFX" />
<f name="HSZFL" type="12" table="HIS_SFX" />
<f name="KJZFL" type="12" table="HIS_SFX" />
<f name="MZZFL" type="12" table="HIS_SFX" />
<f name="ZYZFL" type="12" table="HIS_SFX" />
<f name="BASYFL" type="12" table="HIS_SFX" />
<f name="KCFL" type="12" table="HIS_SFX" />
<f name="RKDW" type="12" table="HIS_SFX" />
<f name="ZHXS" type="8" table="HIS_SFX" />
<f name="MZFYDW" type="12" table="HIS_SFX" />
<f name="ZYFYDW" type="12" table="HIS_SFX" />
<f name="JG" type="8" table="HIS_SFX" />
<f name="JBJG" type="8" table="HIS_SFX" />
<f name="SFYJ" type="12" table="HIS_SFX" />
<f name="SFXMSM" type="12" table="HIS_SFX" />
<f name="BZ" type="12" table="HIS_SFX" />
<f name="ZT" type="12" table="HIS_SFX" />
<f name="WZCS" type="12" />
<f name="WZGG" type="12" />
<f name="DWVIEW" type="12" table="HIS_SFX" />
<f name="WZJJ" type="8" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmstjbmxdao" log="true" type="1" memo="物资库存调价明细dao">
<sql>select PKEY,SFX_BM,DJH,TJRQ,JHSXRQ,SXRQ,TJR,TJDW,TQSJ,THSJ,CJ,QTTQSJ,QTTHSJ,QTCJ,TJYY,ZT,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_TJB where JGID=? and DJH=? and SFX_BM=?</sql>
<tables>
<table name="HIS_MMS_KC_TJB" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_TJB" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_TJB" />
<f name="DJH" type="12" table="HIS_MMS_KC_TJB" />
<f name="TJRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="JHSXRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="SXRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="TJR" type="12" table="HIS_MMS_KC_TJB" />
<f name="TJDW" type="12" table="HIS_MMS_KC_TJB" />
<f name="TQSJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="THSJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="CJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="QTTQSJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="QTTHSJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="QTCJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="TJYY" type="12" table="HIS_MMS_KC_TJB" />
<f name="ZT" type="12" table="HIS_MMS_KC_TJB" />
<f name="BZ" type="12" table="HIS_MMS_KC_TJB" />
<f name="CJR" type="12" table="HIS_MMS_KC_TJB" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="XGR" type="12" table="HIS_MMS_KC_TJB" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="JGID" type="12" table="HIS_MMS_KC_TJB" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_TJB" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmstjbsynewdao" log="true" type="1" memo="物资调价损益表dao">
<sql>select PKEY,SFX_BM,DJH,TJDJH,KSKC_PC_PKEY,SL,JBSL,DW,JE,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_TJB_SY where 1=2</sql>
<tables>
<table name="HIS_MMS_KC_TJB_SY" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="DJH" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="TJDJH" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="SL" type="8" table="HIS_MMS_KC_TJB_SY" />
<f name="JBSL" type="8" table="HIS_MMS_KC_TJB_SY" />
<f name="DW" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="JE" type="8" table="HIS_MMS_KC_TJB_SY" />
<f name="BZ" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="CJR" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_TJB_SY" />
<f name="XGR" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_TJB_SY" />
<f name="JGID" type="12" table="HIS_MMS_KC_TJB_SY" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_TJB_SY" />
</fields>
</dao>
<dao id="mmstjbdao" log="true" type="1" memo="物资库存调价表dao">
<sql><![CDATA[
select a.PKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.DWVIEW,to_char(a.TJRQ,'yyyy-mm-dd') pdrq,c.wzlz
from HIS_MMS_KC_TJB a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on a.JGID=b.JGID and b.GLBM=c.WZBM
where a.JGID=? and a.TJRQ >= ? and a.TJRQ <= ?
order by a.DJH,a.CJRQ
]]></sql>
<tables>
<table name="HIS_MMS_KC_TJB" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_TJB" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_TJB" />
<f name="DJH" type="12" table="HIS_MMS_KC_TJB" />
<f name="TJRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="JHSXRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="SXRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="TJR" type="12" table="HIS_MMS_KC_TJB" />
<f name="TJDW" type="12" table="HIS_MMS_KC_TJB" />
<f name="TQSJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="THSJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="CJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="QTTQSJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="QTTHSJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="QTCJ" type="8" table="HIS_MMS_KC_TJB" />
<f name="TJYY" type="12" table="HIS_MMS_KC_TJB" />
<f name="ZT" type="12" table="HIS_MMS_KC_TJB" />
<f name="BZ" type="12" table="HIS_MMS_KC_TJB" />
<f name="CJR" type="12" table="HIS_MMS_KC_TJB" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="XGR" type="12" table="HIS_MMS_KC_TJB" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_TJB" />
<f name="JGID" type="12" table="HIS_MMS_KC_TJB" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_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="WZLZ" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<!-- 物资调价制单打印 列数据 -->
<dao id="mmsTjzdLsjDao" type="1">
<sql>
<![CDATA[
select
null as JGID
,null as ZDRQ
,null as ZDR
from dual
where 1 = 1
]]>
</sql>
<fields>
<f name="JGID" type="12"/>
<f name="ZDRQ" type="93"/>
<f name="ZDR" type="12"/>
</fields>
<parameter>
</parameter>
</dao>
<!-- 物资调价制单打印 表数据 -->
<dao id="mmsTjdBsjDao" type="1">
<sql>
<![CDATA[
select
null as XH
,t.DJH
,t.SFX_BM
,sf.MC
,yh.NAME as TJRXM
,sf.DWVIEW
,t.TJDW
,dw.MC as TJDWMC
,t.TQSJ
,t.THSJ
,t.CJ
,t.QTTQSJ
,t.QTTHSJ
,t.QTCJ
,t.JHSXRQ
,t.SXRQ
,t.TJR
,t.TJRQ
,t.TJYY
,yy.MC as TJYYMC
,t.BZ
from HIS_MMS_KC_TJB t
left join MAIN_YHXX yh on yh.USERACCOUNT = t.TJR
left join HIS_SFX sf on sf.JGID = t.JGID and sf.BM = t.SFX_BM
left join MAIN_ZDB dw on dw.ZDZB_BH = '000014' and dw.BH = t.TJDW
left join MAIN_JGZDB yy on yy.JGZDLB_BH = 'Z00011' and yy.JGID = t.JGID and yy.BH = t.TJYY
where 1 = 1
and t.JGID = ?
and t.PKEY in (
select
regexp_substr(? ,'[^,]+' ,1 ,level ,'c') as STR
from dual
connect by level <= length(regexp_replace(? ,'[^,]+'))+1
)
order by t.DJH,t.CJRQ
]]>
</sql>
<fields>
<f name="XH" type="4"/>
<f name="DJH" type="12"/>
<f name="SFX_BM" type="12"/>
<f name="SFX_MC" type="12"/>
<f name="TJRXM" type="12"/>
<f name="DWVIEW" type="12"/>
<f name="TJDW" type="12"/>
<f name="TJDWMC" type="12"/>
<f name="TQSJ" type="8"/>
<f name="THSJ" type="8"/>
<f name="CJ" type="8"/>
<f name="QTTQSJ" type="8"/>
<f name="QTTHSJ" type="8"/>
<f name="QTCJ" type="8"/>
<f name="JHSXRQ" type="93"/>
<f name="SXRQ" type="93"/>
<f name="TJR" type="12"/>
<f name="TJRQ" type="93"/>
<f name="TJYY" type="12"/>
<f name="TJYYMC" type="12"/>
<f name="BZ" type="12"/>
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsKscgyDao" log="true" type="1" memo="物资科室采购员dao">
<sql>select PKEY,KSPKEY,CGRYPKEY,ISMR,ISJH,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KSCGY where JGID=? and KSPKEY=? order by pkey</sql>
<tables>
<table name="HIS_MMS_KSCGY" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KSCGY" />
<f name="KSPKEY" type="12" table="HIS_MMS_KSCGY" />
<f name="CGRYPKEY" type="12" table="HIS_MMS_KSCGY" />
<f name="ISMR" type="12" table="HIS_MMS_KSCGY" />
<f name="ISJH" type="12" table="HIS_MMS_KSCGY" />
<f name="CJR" type="12" table="HIS_MMS_KSCGY" />
<f name="CJRQ" type="93" table="HIS_MMS_KSCGY" />
<f name="XGR" type="12" table="HIS_MMS_KSCGY" />
<f name="XGRQ" type="93" table="HIS_MMS_KSCGY" />
<f name="JGID" type="12" table="HIS_MMS_KSCGY" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KSCGY" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsKcflGlQtflDao" log="true" cache="true" type="1" memo="库存分类关联其他分类设置dao">
<sql>select PKEY,KCFL,FYZL,HSZL,KJZL,MZZL,ZYZL,BASYFL,YZZL,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KCFLGLQTFL where JGID=? order by pkey</sql>
<tables>
<table name="HIS_MMS_KCFLGLQTFL" insert="true" update="true" delete="true">
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="KCFL" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="FYZL" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="HSZL" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="KJZL" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="MZZL" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="ZYZL" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="BASYFL" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="YZZL" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="CJR" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="CJRQ" type="93" table="HIS_MMS_KCFLGLQTFL" />
<f name="XGR" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="XGRQ" type="93" table="HIS_MMS_KCFLGLQTFL" />
<f name="JGID" type="12" table="HIS_MMS_KCFLGLQTFL" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KCFLGLQTFL" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDjlxSetupDao" log="true" type="1" memo="物资管理多级类组设置dao">
<sql>select PKEY,BM,MC,SJBM,LZTYPE,XH,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_DJLZ where JGID=? and lztype=? and SJBM like ? order by bm</sql>
<tables>
<table name="HIS_MMS_DJLZ" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_DJLZ" />
<f name="BM" type="12" table="HIS_MMS_DJLZ" />
<f name="MC" type="12" table="HIS_MMS_DJLZ" />
<f name="SJBM" type="12" table="HIS_MMS_DJLZ" />
<f name="LZTYPE" type="12" table="HIS_MMS_DJLZ" />
<f name="XH" type="-5" table="HIS_MMS_DJLZ" />
<f name="BZ" type="12" table="HIS_MMS_DJLZ" />
<f name="CJR" type="12" table="HIS_MMS_DJLZ" />
<f name="CJRQ" type="93" table="HIS_MMS_DJLZ" />
<f name="XGR" type="12" table="HIS_MMS_DJLZ" />
<f name="XGRQ" type="93" table="HIS_MMS_DJLZ" />
<f name="JGID" type="12" table="HIS_MMS_DJLZ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_DJLZ" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsLzGlKcflDao" log="true" type="1" memo="物资管理库类组关联库存分类dao">
<sql>SELECT PKEY,LZPKEY,KCFLPKEY,LZTYPE,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG FROM HIS_MMS_LZGLKCFL WHERE JGID=? AND LZPKEY=? ORDER BY PKEY</sql>
<tables>
<table name="HIS_MMS_LZGLKCFL" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="LZPKEY" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="KCFLPKEY" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="LZTYPE" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="CJR" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="CJRQ" type="93" table="HIS_MMS_LZGLKCFL" />
<f name="XGR" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="XGRQ" type="93" table="HIS_MMS_LZGLKCFL" />
<f name="JGID" type="12" table="HIS_MMS_LZGLKCFL" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_LZGLKCFL" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<!--机构字典值查询,-->
<dao id="lzglkcflPopdao" type="1" memo="类组关联库存分类pop的dao">
<sql>
select JGID,JGZDLB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT,VALUE3,VALUE4,VALUE5 from MAIN_JGZDB where JGID=? and JGZDLB_BH='Z00008' and BH not in (select KCFLPKEY from HIS_MMS_LZGLKCFL where JGID=? and LZTYPE=?) and (MC like ? or PYM like ? or WBM like ?) order by XH asc
</sql>
<tables>
<table name="MAIN_JGZDB" insert="true" update="true" delete="true">
<primary>JGID</primary>
<primary>JGZDLB_BH</primary>
<primary>BH</primary>
</table>
</tables>
<fields>
<f name="JGID" type="12" table="MAIN_JGZDB" />
<f name="JGZDLB_BH" type="12" table="MAIN_JGZDB" />
<f name="BH" type="12" table="MAIN_JGZDB" />
<f name="MC" type="12" table="MAIN_JGZDB" />
<f name="PYM" type="12" table="MAIN_JGZDB" />
<f name="WBM" type="12" table="MAIN_JGZDB" />
<f name="VALUE1" type="12" table="MAIN_JGZDB" />
<f name="VALUE2" type="12" table="MAIN_JGZDB" />
<f name="XH" type="8" table="MAIN_JGZDB" />
<f name="ZT" type="12" table="MAIN_JGZDB" />
<f name="VALUE3" type="12" table="MAIN_JGZDB" />
<f name="VALUE4" type="12" table="MAIN_JGZDB" />
<f name="VALUE5" type="12" table="MAIN_JGZDB" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsKsgllzDao" log="true" type="1" memo="物资管理科室关联类组权限dao">
<sql>select PKEY,KSPKEY,LZBH,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KSGLLZ where JGID=? and kspkey=?</sql>
<tables>
<table name="HIS_MMS_KSGLLZ" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KSGLLZ" />
<f name="KSPKEY" type="12" table="HIS_MMS_KSGLLZ" />
<f name="LZBH" type="12" table="HIS_MMS_KSGLLZ" />
<f name="CJR" type="12" table="HIS_MMS_KSGLLZ" />
<f name="CJRQ" type="93" table="HIS_MMS_KSGLLZ" />
<f name="XGR" type="12" table="HIS_MMS_KSGLLZ" />
<f name="XGRQ" type="93" table="HIS_MMS_KSGLLZ" />
<f name="JGID" type="12" table="HIS_MMS_KSGLLZ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KSGLLZ" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsRygllzDao" log="true" type="1" memo="物资管理人员关联类组权限dao">
<sql>select PKEY,RYPKEY,LZBH,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_RYGLLZ where JGID=? and rypkey=?</sql>
<tables>
<table name="HIS_MMS_RYGLLZ" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_RYGLLZ" />
<f name="RYPKEY" type="12" table="HIS_MMS_RYGLLZ" />
<f name="LZBH" type="12" table="HIS_MMS_RYGLLZ" />
<f name="CJR" type="12" table="HIS_MMS_RYGLLZ" />
<f name="CJRQ" type="93" table="HIS_MMS_RYGLLZ" />
<f name="XGR" type="12" table="HIS_MMS_RYGLLZ" />
<f name="XGRQ" type="93" table="HIS_MMS_RYGLLZ" />
<f name="JGID" type="12" table="HIS_MMS_RYGLLZ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_RYGLLZ" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsMustInputDao" log="true" cache="true" type="1" memo="物资信息必填信息dao">
<sql>SELECT PKEY,JBDW,RKDW,KCFL,LZ,ZYFS,PC,XQ,JC,TM,JJ,SJ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG FROM HIS_MMS_MUSTINPUT WHERE JGID=?</sql>
<tables>
<table name="HIS_MMS_MUSTINPUT" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="JBDW" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="RKDW" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="KCFL" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="LZ" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="ZYFS" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="PC" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="XQ" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="JC" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="TM" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="JJ" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="SJ" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="CJR" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="CJRQ" type="93" table="HIS_MMS_MUSTINPUT" />
<f name="XGR" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="XGRQ" type="93" table="HIS_MMS_MUSTINPUT" />
<f name="JGID" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_MUSTINPUT" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDecimalDao" log="true" type="1" memo="物资管理小数规则">
<sql>select PKEY,BM,MC,ISQY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_DECIMAL where JGID=? order by pkey</sql>
<tables>
<table name="HIS_MMS_DECIMAL" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_DECIMAL" />
<f name="BM" type="12" table="HIS_MMS_DECIMAL" />
<f name="MC" type="12" table="HIS_MMS_DECIMAL" />
<f name="ISQY" type="12" table="HIS_MMS_DECIMAL" />
<f name="CJR" type="12" table="HIS_MMS_DECIMAL" />
<f name="CJRQ" type="93" table="HIS_MMS_DECIMAL" />
<f name="XGR" type="12" table="HIS_MMS_DECIMAL" />
<f name="XGRQ" type="93" table="HIS_MMS_DECIMAL" />
<f name="JGID" type="12" table="HIS_MMS_DECIMAL" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_DECIMAL" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDecimalDetailDao" log="true" type="1" memo="物资管理小数规则明细设置dao">
<sql>select PKEY,GZPKEY,XX,SX,GZWS,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_DECIMAL_DETAIL where JGID=? and gzpkey=? order by pkey</sql>
<tables>
<table name="HIS_MMS_DECIMAL_DETAIL" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="GZPKEY" type="12" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="XX" type="-5" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="SX" type="-5" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="GZWS" type="-5" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="CJR" type="12" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="CJRQ" type="93" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="XGR" type="12" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="XGRQ" type="93" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="JGID" type="12" table="HIS_MMS_DECIMAL_DETAIL" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_DECIMAL_DETAIL" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDjlxDao" log="true" type="1" memo="物资管理定价类型dao">
<sql>SELECT PKEY,BM,MC,ISQY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG FROM HIS_MMS_DJLX WHERE JGID=? ORDER BY PKEY</sql>
<tables>
<table name="HIS_MMS_DJLX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_DJLX" />
<f name="BM" type="12" table="HIS_MMS_DJLX" />
<f name="MC" type="12" table="HIS_MMS_DJLX" />
<f name="ISQY" type="12" table="HIS_MMS_DJLX" />
<f name="CJR" type="12" table="HIS_MMS_DJLX" />
<f name="CJRQ" type="93" table="HIS_MMS_DJLX" />
<f name="XGR" type="12" table="HIS_MMS_DJLX" />
<f name="XGRQ" type="93" table="HIS_MMS_DJLX" />
<f name="JGID" type="12" table="HIS_MMS_DJLX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_DJLX" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDjlxDjgzDao" log="true" type="1" memo="物资管理定价类型定价规则dao">
<sql>select PKEY,DJLXPKEY,DECIMALPKEY,BM,MC,GZXX,GZSX,JCL,JCE,ZGJCL,ZGJCE,ISQY,BZ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_DJLX_DJGZ where JGID=? and DJLXPKEY=? order by pkey</sql>
<tables>
<table name="HIS_MMS_DJLX_DJGZ" insert="true" update="true" delete="true">
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="DJLXPKEY" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="DECIMALPKEY" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="BM" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="MC" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="GZXX" type="-5" table="HIS_MMS_DJLX_DJGZ" />
<f name="GZSX" type="-5" table="HIS_MMS_DJLX_DJGZ" />
<f name="JCL" type="8" table="HIS_MMS_DJLX_DJGZ" />
<f name="JCE" type="8" table="HIS_MMS_DJLX_DJGZ" />
<f name="ZGJCL" type="8" table="HIS_MMS_DJLX_DJGZ" />
<f name="ZGJCE" type="8" table="HIS_MMS_DJLX_DJGZ" />
<f name="ISQY" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="BZ" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="CJR" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="CJRQ" type="93" table="HIS_MMS_DJLX_DJGZ" />
<f name="XGR" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="XGRQ" type="93" table="HIS_MMS_DJLX_DJGZ" />
<f name="JGID" type="12" table="HIS_MMS_DJLX_DJGZ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_DJLX_DJGZ" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsDecimalPopDao" log="true" type="1" cache="true" memo="物资管理小数规则">
<sql>select PKEY,BM,MC,ISQY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_DECIMAL where JGID=? and ISQY=1 order by pkey</sql>
<tables>
<table name="HIS_MMS_DECIMAL" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_DECIMAL" />
<f name="BM" type="12" table="HIS_MMS_DECIMAL" />
<f name="MC" type="12" table="HIS_MMS_DECIMAL" />
<f name="ISQY" type="12" table="HIS_MMS_DECIMAL" />
<f name="CJR" type="12" table="HIS_MMS_DECIMAL" />
<f name="CJRQ" type="93" table="HIS_MMS_DECIMAL" />
<f name="XGR" type="12" table="HIS_MMS_DECIMAL" />
<f name="XGRQ" type="93" table="HIS_MMS_DECIMAL" />
<f name="JGID" type="12" table="HIS_MMS_DECIMAL" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_DECIMAL" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmswzzdDao" log="true" type="1" memo="物资信息字典dao">
<sql>
select a.PKEY,a.WZBM,a.WZMC,a.WZGG,a.WZXH,a.WZPP,a.WZJC,a.JBDW,a.RKDW,a.ZHXS,a.WZLZ,a.KCFL,a.ISPHYQ,a.ISXQYQ,a.XQCD,a.ZBFL,a.JGJB,a.BWM,a.WZBZ,a.ISSF,a.WZJJ,a.WZSJ,a.JGSXRQ,a.WJWJH,a.DJLX,a.WJBARQ,a.SFLX,a.WZCS,a.ZCZH,a.ZCZYXRQ,a.ZCZFZRQ,a.ZCZMC,a.ZBMC,a.ZBGYS,a.ZBPSS,a.ZBJB,a.ZBRQ,a.ZBJJ,a.WZGB,a.WZTM,a.WZCD,a.ZGSJ,a.MJFL,a.MJSJCD,a.ZLCC,a.ZBBH,a.ZD,a.ISJK,a.ISGZ,a.ISYCX,a.ISZR,a.ISJJQL,a.CCTJPKEY,a.QQLX,a.ZT,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,a.CLFL,b.ybbm,b.ybmc,b.JG,b.JBJG from HIS_MMS_WZZD a left join HIS_SFX b on a.WZBM=b.GLBM and a.JGID=b.JGID where a.JGID=? order by a.pkey
</sql>
<tables>
<table name="HIS_MMS_WZZD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_WZZD" />
<f name="WZBM" type="12" table="HIS_MMS_WZZD" />
<f name="WZMC" type="12" table="HIS_MMS_WZZD" />
<f name="WZGG" type="12" table="HIS_MMS_WZZD" />
<f name="WZXH" type="12" table="HIS_MMS_WZZD" />
<f name="WZPP" type="12" table="HIS_MMS_WZZD" />
<f name="WZJC" type="12" table="HIS_MMS_WZZD" />
<f name="JBDW" type="12" table="HIS_MMS_WZZD" />
<f name="RKDW" type="12" table="HIS_MMS_WZZD" />
<f name="ZHXS" type="-5" table="HIS_MMS_WZZD" />
<f name="WZLZ" type="12" table="HIS_MMS_WZZD" />
<f name="KCFL" type="12" table="HIS_MMS_WZZD" />
<f name="ISPHYQ" type="12" table="HIS_MMS_WZZD" />
<f name="ISXQYQ" type="12" table="HIS_MMS_WZZD" />
<f name="XQCD" type="-5" table="HIS_MMS_WZZD" />
<f name="ZBFL" type="12" table="HIS_MMS_WZZD" />
<f name="JGJB" type="12" table="HIS_MMS_WZZD" />
<f name="BWM" type="12" table="HIS_MMS_WZZD" />
<f name="WZBZ" type="12" table="HIS_MMS_WZZD" />
<f name="ISSF" type="12" table="HIS_MMS_WZZD" />
<f name="WZJJ" type="8" table="HIS_MMS_WZZD" />
<f name="WZSJ" type="8" table="HIS_MMS_WZZD" />
<f name="JGSXRQ" type="93" table="HIS_MMS_WZZD" />
<f name="WJWJH" type="12" table="HIS_MMS_WZZD" />
<f name="DJLX" type="12" table="HIS_MMS_WZZD" />
<f name="WJBARQ" type="93" table="HIS_MMS_WZZD" />
<f name="SFLX" type="12" table="HIS_MMS_WZZD" />
<f name="WZCS" type="12" table="HIS_MMS_WZZD" />
<f name="ZCZH" type="12" table="HIS_MMS_WZZD" />
<f name="ZCZYXRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZCZFZRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZCZMC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBMC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBGYS" type="12" table="HIS_MMS_WZZD" />
<f name="ZBPSS" type="12" table="HIS_MMS_WZZD" />
<f name="ZBJB" type="12" table="HIS_MMS_WZZD" />
<f name="ZBRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZBJJ" type="8" table="HIS_MMS_WZZD" />
<f name="WZGB" type="12" table="HIS_MMS_WZZD" />
<f name="WZTM" type="12" table="HIS_MMS_WZZD" />
<f name="WZCD" type="12" table="HIS_MMS_WZZD" />
<f name="ZGSJ" type="8" table="HIS_MMS_WZZD" />
<f name="MJFL" type="12" table="HIS_MMS_WZZD" />
<f name="MJSJCD" type="-5" table="HIS_MMS_WZZD" />
<f name="ZLCC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBBH" type="12" table="HIS_MMS_WZZD" />
<f name="ZD" type="12" table="HIS_MMS_WZZD" />
<f name="ISJK" type="12" table="HIS_MMS_WZZD" />
<f name="ISGZ" type="12" table="HIS_MMS_WZZD" />
<f name="ISYCX" type="12" table="HIS_MMS_WZZD" />
<f name="ISZR" type="12" table="HIS_MMS_WZZD" />
<f name="ISJJQL" type="12" table="HIS_MMS_WZZD" />
<f name="CCTJPKEY" type="12" table="HIS_MMS_WZZD" />
<f name="QQLX" type="12" table="HIS_MMS_WZZD" />
<f name="ZT" type="12" table="HIS_MMS_WZZD" />
<f name="CJR" type="12" table="HIS_MMS_WZZD" />
<f name="CJRQ" type="93" table="HIS_MMS_WZZD" />
<f name="XGR" type="12" table="HIS_MMS_WZZD" />
<f name="XGRQ" type="93" table="HIS_MMS_WZZD" />
<f name="JGID" type="12" table="HIS_MMS_WZZD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_WZZD" />
<f name="CLFL" type="12" table="HIS_MMS_WZZD" />
<f name="YBBM" type="12" />
<f name="YBMC" type="12" />
<f name="JG" type="12" />
<f name="JBJG" type="12" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmsWzzdCctjDao" log="true" type="1" memo="物资字典储存信息dao">
<sql>select WZBM,MINWD,MAXWD,MINSD,MAXSD,ISCW,ISNC,ISGZ,ISBG,ISTF,ISYL,ISLA,ISMB,ISRF,ISMF,ISFFS,ISLD,ISFC,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_CCTJ where JGID=? and WZBM=? </sql>
<tables>
<table name="HIS_MMS_CCTJ" insert="true" update="true" delete="true">
<primary>WZBM</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="WZBM" type="12" table="HIS_MMS_CCTJ" />
<f name="MINWD" type="8" table="HIS_MMS_CCTJ" />
<f name="MAXWD" type="8" table="HIS_MMS_CCTJ" />
<f name="MINSD" type="8" table="HIS_MMS_CCTJ" />
<f name="MAXSD" type="8" table="HIS_MMS_CCTJ" />
<f name="ISCW" type="12" table="HIS_MMS_CCTJ" />
<f name="ISNC" type="12" table="HIS_MMS_CCTJ" />
<f name="ISGZ" type="12" table="HIS_MMS_CCTJ" />
<f name="ISBG" type="12" table="HIS_MMS_CCTJ" />
<f name="ISTF" type="12" table="HIS_MMS_CCTJ" />
<f name="ISYL" type="12" table="HIS_MMS_CCTJ" />
<f name="ISLA" type="12" table="HIS_MMS_CCTJ" />
<f name="ISMB" type="12" table="HIS_MMS_CCTJ" />
<f name="ISRF" type="12" table="HIS_MMS_CCTJ" />
<f name="ISMF" type="12" table="HIS_MMS_CCTJ" />
<f name="ISFFS" type="12" table="HIS_MMS_CCTJ" />
<f name="ISLD" type="12" table="HIS_MMS_CCTJ" />
<f name="ISFC" type="12" table="HIS_MMS_CCTJ" />
<f name="CJR" type="12" table="HIS_MMS_CCTJ" />
<f name="CJRQ" type="93" table="HIS_MMS_CCTJ" />
<f name="XGR" type="12" table="HIS_MMS_CCTJ" />
<f name="XGRQ" type="93" table="HIS_MMS_CCTJ" />
<f name="JGID" type="12" table="HIS_MMS_CCTJ" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_CCTJ" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="wzzdZjmDao" log="true" type="1" memo="物资字典助记码dao">
<sql>select PKEY,WZBM,PYM,FLAG,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_ZJM where JGID=? and wzbm=? order by pkey</sql>
<tables>
<table name="HIS_MMS_ZJM" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_ZJM" />
<f name="WZBM" type="12" table="HIS_MMS_ZJM" />
<f name="PYM" type="12" table="HIS_MMS_ZJM" />
<f name="FLAG" type="12" table="HIS_MMS_ZJM" />
<f name="CJR" type="12" table="HIS_MMS_ZJM" />
<f name="CJRQ" type="93" table="HIS_MMS_ZJM" />
<f name="XGR" type="12" table="HIS_MMS_ZJM" />
<f name="XGRQ" type="93" table="HIS_MMS_ZJM" />
<f name="JGID" type="12" table="HIS_MMS_ZJM" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_ZJM" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsMustInputDao" log="true" cache="true" type="1" memo="物资信息必填信息dao">
<sql>SELECT PKEY,JBDW,RKDW,KCFL,LZ,ZYFS,PC,XQ,JC,TM,JJ,SJ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG FROM HIS_MMS_MUSTINPUT WHERE JGID=?</sql>
<tables>
<table name="HIS_MMS_MUSTINPUT" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="JBDW" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="RKDW" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="KCFL" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="LZ" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="ZYFS" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="PC" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="XQ" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="JC" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="TM" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="JJ" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="SJ" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="CJR" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="CJRQ" type="93" table="HIS_MMS_MUSTINPUT" />
<f name="XGR" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="XGRQ" type="93" table="HIS_MMS_MUSTINPUT" />
<f name="JGID" type="12" table="HIS_MMS_MUSTINPUT" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_MUSTINPUT" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="mmsrkdmxdao" log="true" type="1" memo="物资入库明细表dao">
<sql>
select a.PKEY,a.RKDPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.ZHXS,c.WZCS,b.DWVIEW,b.RKDW,c.wzgg,b.ybbm,b.ybmc,a.SCRQ from HIS_MMS_KC_RKD_MX a left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM left join HIS_MMS_WZZD c on c.WZBM=b.BM where a.JGID=? and a.DJH=? order by a.XH
</sql>
<tables>
<table name="HIS_MMS_KC_RKD_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="RKDPKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="DPTID" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="PH" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="YXQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="ZK" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="FPHM" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="FPJE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="PCJG" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="DDMX_PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="BZ" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="MC" type="12" />
<f name="JBDW" type="12" />
<f name="ZHXS" type="8" />
<f name="WZCS" type="12" />
<f name="DWVIEW" type="12" />
<f name="RKDW" type="12" />
<f name="WZGG" type="12" />
<f name="YBBM" type="12" />
<f name="YBMC" type="12" />
<f name="SCRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao> <dao id="newmmswzzdDao" log="true" type="1" memo="物资信息字典dao">
<sql>select PKEY,WZBM,WZMC,WZGG,WZXH,WZPP,WZJC,JBDW,RKDW,ZHXS,WZLZ,KCFL,ISPHYQ,ISXQYQ,XQCD,ZBFL,JGJB,BWM,WZBZ,ISSF,WZJJ,WZSJ,JGSXRQ,WJWJH,DJLX,WJBARQ,SFLX,WZCS,ZCZH,ZCZYXRQ,ZCZFZRQ,ZCZMC,ZBMC,ZBGYS,ZBPSS,ZBJB,ZBRQ,ZBJJ,WZGB,WZTM,WZCD,ZGSJ,MJFL,MJSJCD,ZLCC,ZBBH,ZD,ISJK,ISGZ,ISYCX,ISZR,ISJJQL,CCTJPKEY,QQLX,ZT,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,CLFL from HIS_MMS_WZZD where 1=2</sql>
<tables>
<table name="HIS_MMS_WZZD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_WZZD" />
<f name="WZBM" type="12" table="HIS_MMS_WZZD" />
<f name="WZMC" type="12" table="HIS_MMS_WZZD" />
<f name="WZGG" type="12" table="HIS_MMS_WZZD" />
<f name="WZXH" type="12" table="HIS_MMS_WZZD" />
<f name="WZPP" type="12" table="HIS_MMS_WZZD" />
<f name="WZJC" type="12" table="HIS_MMS_WZZD" />
<f name="JBDW" type="12" table="HIS_MMS_WZZD" />
<f name="RKDW" type="12" table="HIS_MMS_WZZD" />
<f name="ZHXS" type="-5" table="HIS_MMS_WZZD" />
<f name="WZLZ" type="12" table="HIS_MMS_WZZD" />
<f name="KCFL" type="12" table="HIS_MMS_WZZD" />
<f name="ISPHYQ" type="12" table="HIS_MMS_WZZD" />
<f name="ISXQYQ" type="12" table="HIS_MMS_WZZD" />
<f name="XQCD" type="-5" table="HIS_MMS_WZZD" />
<f name="ZBFL" type="12" table="HIS_MMS_WZZD" />
<f name="JGJB" type="12" table="HIS_MMS_WZZD" />
<f name="BWM" type="12" table="HIS_MMS_WZZD" />
<f name="WZBZ" type="12" table="HIS_MMS_WZZD" />
<f name="ISSF" type="12" table="HIS_MMS_WZZD" />
<f name="WZJJ" type="8" table="HIS_MMS_WZZD" />
<f name="WZSJ" type="8" table="HIS_MMS_WZZD" />
<f name="JGSXRQ" type="93" table="HIS_MMS_WZZD" />
<f name="WJWJH" type="12" table="HIS_MMS_WZZD" />
<f name="DJLX" type="12" table="HIS_MMS_WZZD" />
<f name="WJBARQ" type="93" table="HIS_MMS_WZZD" />
<f name="SFLX" type="12" table="HIS_MMS_WZZD" />
<f name="WZCS" type="12" table="HIS_MMS_WZZD" />
<f name="ZCZH" type="12" table="HIS_MMS_WZZD" />
<f name="ZCZYXRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZCZFZRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZCZMC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBMC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBGYS" type="12" table="HIS_MMS_WZZD" />
<f name="ZBPSS" type="12" table="HIS_MMS_WZZD" />
<f name="ZBJB" type="12" table="HIS_MMS_WZZD" />
<f name="ZBRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZBJJ" type="8" table="HIS_MMS_WZZD" />
<f name="WZGB" type="12" table="HIS_MMS_WZZD" />
<f name="WZTM" type="12" table="HIS_MMS_WZZD" />
<f name="WZCD" type="12" table="HIS_MMS_WZZD" />
<f name="ZGSJ" type="8" table="HIS_MMS_WZZD" />
<f name="MJFL" type="12" table="HIS_MMS_WZZD" />
<f name="MJSJCD" type="-5" table="HIS_MMS_WZZD" />
<f name="ZLCC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBBH" type="12" table="HIS_MMS_WZZD" />
<f name="ZD" type="12" table="HIS_MMS_WZZD" />
<f name="ISJK" type="12" table="HIS_MMS_WZZD" />
<f name="ISGZ" type="12" table="HIS_MMS_WZZD" />
<f name="ISYCX" type="12" table="HIS_MMS_WZZD" />
<f name="ISZR" type="12" table="HIS_MMS_WZZD" />
<f name="ISJJQL" type="12" table="HIS_MMS_WZZD" />
<f name="CCTJPKEY" type="12" table="HIS_MMS_WZZD" />
<f name="QQLX" type="12" table="HIS_MMS_WZZD" />
<f name="ZT" type="12" table="HIS_MMS_WZZD" />
<f name="CJR" type="12" table="HIS_MMS_WZZD" />
<f name="CJRQ" type="93" table="HIS_MMS_WZZD" />
<f name="XGR" type="12" table="HIS_MMS_WZZD" />
<f name="XGRQ" type="93" table="HIS_MMS_WZZD" />
<f name="JGID" type="12" table="HIS_MMS_WZZD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_WZZD" />
<f name="CLFL" type="12" table="HIS_MMS_WZZD" />
</fields>
</dao>
<dao id="mmscgjhdddao" log="true" type="1" memo="物资采购计划关联订单表dao">
<sql>select PKEY,CGJHPKEY,DPTID,CGDH,DDH,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_MMS_KC_CGJH_DD where JGID=? and DPTID=? and CGDH=?</sql>
<tables>
<table name="HIS_MMS_KC_CGJH_DD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_CGJH_DD" />
<f name="CGJHPKEY" type="12" table="HIS_MMS_KC_CGJH_DD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_CGJH_DD" />
<f name="CGDH" type="12" table="HIS_MMS_KC_CGJH_DD" />
<f name="DDH" type="12" table="HIS_MMS_KC_CGJH_DD" />
<f name="CJR" type="12" table="HIS_MMS_KC_CGJH_DD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_CGJH_DD" />
<f name="XGR" type="12" table="HIS_MMS_KC_CGJH_DD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_CGJH_DD" />
<f name="JGID" type="12" table="HIS_MMS_KC_CGJH_DD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_CGJH_DD" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsddmxquerydao" log="true" type="1" memo="物资订单明细dao">
<sql>
select a.PKEY,a.DDPKEY,a.DJH,a.DPTID,a.XH,a.SFX_BM,a.DHRQ,a.QQDHSL,a.SJDHSL,a.SJJHSL,a.DW,a.DJ,a.JE,a.CGJHMX_PKEY,a.BZ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,c.WZCS,b.DWVIEW
from HIS_MMS_KC_DD_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
where a.JGID=? and a.DDPKEY=? #select# order by a.XH
</sql>
<tables>
<table name="HIS_MMS_KC_DD_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DDPKEY" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DPTID" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DHRQ" type="93" table="HIS_MMS_KC_DD_MX" />
<f name="QQDHSL" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="SJDHSL" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="SJJHSL" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_DD_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_DD_MX" />
<f name="CGJHMX_PKEY" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="BZ" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_DD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_DD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_DD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_DD_MX" />
<f name="MC" type="12" />
<f name="WZCS" type="12" />
<f name="DWVIEW" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsrkdmxpopdao" type="1" memo="物资入库单明细pop的dao">
<sql><![CDATA[
select a.PKEY,a.RKDPKEY,a.DJH,a.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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.ZHXS,c.WZCS,d.GYS,e.KYSL,e.KSKC_PKEY,
b.DWVIEW
from HIS_MMS_KC_RKD_MX a
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
left join HIS_MMS_WZZD c on c.WZBM=b.BM
left join HIS_MMS_KC_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.GLLX='W' and d.WZLZ=? 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_MMS_KC_RKD_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="RKDPKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="DPTID" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="PH" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="YXQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="ZK" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="FPHM" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="FPJE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="PCJG" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="DDMX_PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="BZ" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="MC" type="12" />
<f name="JBDW" type="12" />
<f name="ZHXS" type="8" />
<f name="WZCS" 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="mmsrkdQuerymxdao" log="true" type="1" memo="物资入库单查询明细表dao">
<sql>
select a.PKEY,a.RKDPKEY,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,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.MC,b.JBDW,b.ZHXS,c.WZCS,b.DWVIEW,b.RKDW from HIS_MMS_KC_RKD_MX a left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM left join HIS_MMS_WZZD c on c.WZBM=b.BM left join 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.PKEY=a.KSKC_PC_PKEY where a.JGID=? and a.DJH=? and e.KYSL>0 order by a.XH
</sql>
<tables>
<table name="HIS_MMS_KC_RKD_MX" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="RKDPKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="DJH" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="DPTID" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="XH" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="SFX_BM" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="KSKC_PC_PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="PH" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="YXQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="DW" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="SL" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="DJ" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="SJ" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="JE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="SJJE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="ZK" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="FPHM" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="FPJE" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="PCJG" type="8" table="HIS_MMS_KC_RKD_MX" />
<f name="DDMX_PKEY" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="BZ" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="CJR" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="XGR" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_RKD_MX" />
<f name="JGID" type="12" table="HIS_MMS_KC_RKD_MX" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_RKD_MX" />
<f name="MC" type="12" />
<f name="JBDW" type="12" />
<f name="ZHXS" type="8" />
<f name="WZCS" type="12" />
<f name="DWVIEW" type="12" />
<f name="RKDW" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmsrkdByThQuerydao" log="true" type="1" memo="退货单里面查询入库单dao">
<sql><![CDATA[
select a.PKEY,a.DJH,a.DPTID,a.GYS,a.WZLZ,a.ZDRQ,a.DD_DJH,a.DDPKEY,a.RKLX,a.HB,a.RATE,a.ZXF,a.ZDR,a.SHZT,a.WCZT,a.SHR,a.SHRQ,a.JE,a.SJJE,a.BZ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG from HIS_MMS_KC_RKD a
where a.SHZT='1' and a.JGID=? and a.SHRQ >= ? and a.SHRQ <=? and a.DPTID like ? and a.GYS like ? and a.DJH like ? and exists(select 1 from HIS_MMS_KC_RKD_MX b
left join HIS_KSKC_PC c on b.JGID=c.JGID and c.PKEY=b.KSKC_PC_PKEY where a.JGID=b.JGID and a.DJH=b.DJH and c.KYSL>0)
]]></sql>
<tables>
<table name="HIS_MMS_KC_RKD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_KC_RKD" />
<f name="DJH" type="12" table="HIS_MMS_KC_RKD" />
<f name="DPTID" type="12" table="HIS_MMS_KC_RKD" />
<f name="GYS" type="12" table="HIS_MMS_KC_RKD" />
<f name="WZLZ" type="12" table="HIS_MMS_KC_RKD" />
<f name="ZDRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="DD_DJH" type="12" table="HIS_MMS_KC_RKD" />
<f name="DDPKEY" type="12" table="HIS_MMS_KC_RKD" />
<f name="RKLX" type="12" table="HIS_MMS_KC_RKD" />
<f name="HB" type="12" table="HIS_MMS_KC_RKD" />
<f name="RATE" type="8" table="HIS_MMS_KC_RKD" />
<f name="ZXF" type="8" table="HIS_MMS_KC_RKD" />
<f name="ZDR" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHZT" type="12" table="HIS_MMS_KC_RKD" />
<f name="WCZT" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHR" type="12" table="HIS_MMS_KC_RKD" />
<f name="SHRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="JE" type="8" table="HIS_MMS_KC_RKD" />
<f name="SJJE" type="8" table="HIS_MMS_KC_RKD" />
<f name="BZ" type="12" table="HIS_MMS_KC_RKD" />
<f name="CJR" type="12" table="HIS_MMS_KC_RKD" />
<f name="CJRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="XGR" type="12" table="HIS_MMS_KC_RKD" />
<f name="XGRQ" type="93" table="HIS_MMS_KC_RKD" />
<f name="JGID" type="12" table="HIS_MMS_KC_RKD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_KC_RKD" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmstjsxdao" log="true" type="1" memo="判断当前物资是否已经当日已经调价dao">
<sql><![CDATA[select DJH from HIS_MMS_KC_TJB where JGID =? and SFX_BM=? and SXRQ >= ? and SXRQ <= ?]]></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="mmstjzddao" log="true" type="1" memo="判断当前物资是否已经增加了申请调价单dao">
<sql>select DJH from HIS_MMS_KC_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>
<!--收费项物资POP-->
<dao id="mmsSfxypBykspopdao" type="1">
<sql>
select a.JGID,a.BM,a.MC,a.JBDW,a.FYDL,a.FYZL,a.HSZFL,a.KJZFL,a.MZZFL,a.ZYZFL,a.BASYFL,a.KCFL,a.RKDW,a.ZHXS,a.MZFYDW,a.ZYFYDW,a.JG,a.JBJG,a.SFYJ,a.SFXMSM,a.BZ,a.ZT,b.WZCS,b.WZGG,a.DWVIEW,b.WZJJ,b.ZBGYS,b.ZBPSS,(select sum(SL) SL from HIS_KSKC where sfx_bm=a.bm and JGID=a.JGID) sl,a.YBBM,a.YBMC,c.LASTJJ,kc.sl kcsl from HIS_SFX a
left join HIS_MMS_WZZD b on a.GLBM=b.WZBM
left join HIS_YFYK_YPJJ c on a.bm=c.SFX_BM and a.JGID=c.JGID
left join HIS_KSKC kc on a.GLBM=kc.SFX_BM and a.JGID=kc.JGID and kc.DPTID=?
where a.JGID=? and a.GLLX='W' and b.zt=1 and b.WZLZ like ? and (a.BM like ? or a.MC like ? or EXISTS (SELECT 1 FROM HIS_SFX_ZJM b WHERE b.SFX_BM = a.BM and b.JGID=a.JGID and b.PYM like ?))
</sql>
<tables>
<table name="HIS_SFX" insert="false" update="false" delete="false">
<primary>JGID</primary>
<primary>BM</primary>
</table>
</tables>
<fields>
<f name="JGID" type="12" table="HIS_SFX" />
<f name="BM" type="12" table="HIS_SFX" />
<f name="MC" type="12" table="HIS_SFX" />
<f name="JBDW" type="12" table="HIS_SFX" />
<f name="FYDL" type="12" table="HIS_SFX" />
<f name="FYZL" type="12" table="HIS_SFX" />
<f name="HSZFL" type="12" table="HIS_SFX" />
<f name="KJZFL" type="12" table="HIS_SFX" />
<f name="MZZFL" type="12" table="HIS_SFX" />
<f name="ZYZFL" type="12" table="HIS_SFX" />
<f name="BASYFL" type="12" table="HIS_SFX" />
<f name="KCFL" type="12" table="HIS_SFX" />
<f name="RKDW" type="12" table="HIS_SFX" />
<f name="ZHXS" type="8" table="HIS_SFX" />
<f name="MZFYDW" type="12" table="HIS_SFX" />
<f name="ZYFYDW" type="12" table="HIS_SFX" />
<f name="JG" type="8" table="HIS_SFX" />
<f name="JBJG" type="8" table="HIS_SFX" />
<f name="SFYJ" type="12" table="HIS_SFX" />
<f name="SFXMSM" type="12" table="HIS_SFX" />
<f name="BZ" type="12" table="HIS_SFX" />
<f name="ZT" type="12" table="HIS_SFX" />
<f name="WZCS" type="12" />
<f name="WZGG" type="12" />
<f name="DWVIEW" type="12" table="HIS_SFX" />
<f name="WZJJ" type="8" />
<f name="ZBGYS" type="12" />
<f name="ZBPSS" type="12" />
<f name="SL" type="4" />
<f name="YBBM" type="12" table="HIS_SFX" />
<f name="YBMC" type="12" table="HIS_SFX" />
<f name="LASTJJ" type="12" />
<f name="KCSL" type="8" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="mmswzzdBySetupDao" log="true" type="1" memo="物资信息字典dao">
<sql>
select a.PKEY,a.WZBM,a.WZMC,a.WZGG,a.WZXH,a.WZPP,a.WZJC,a.JBDW,a.RKDW,a.ZHXS,a.WZLZ,a.KCFL,a.ISPHYQ,a.ISXQYQ,a.XQCD,a.ZBFL,a.JGJB,a.BWM,a.WZBZ,a.ISSF,a.WZJJ,a.WZSJ,a.JGSXRQ,a.WJWJH,a.DJLX,a.WJBARQ,a.SFLX,a.WZCS,a.ZCZH,a.ZCZYXRQ,a.ZCZFZRQ,a.ZCZMC,a.ZBMC,a.ZBGYS,a.ZBPSS,a.ZBJB,a.ZBRQ,a.ZBJJ,a.WZGB,a.WZTM,a.WZCD,a.ZGSJ,a.MJFL,a.MJSJCD,a.ZLCC,a.ZBBH,a.ZD,a.ISJK,a.ISGZ,a.ISYCX,a.ISZR,a.ISJJQL,a.CCTJPKEY,a.QQLX,a.ZT,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,a.CLFL,b.ybbm,b.ybmc,b.JG,b.JBJG from HIS_MMS_WZZD a left join HIS_SFX b on a.WZBM=b.GLBM and a.JGID=b.JGID where a.JGID=? and EXISTS (SELECT 1 FROM HIS_MMS_ZJM c WHERE c.WZBM = a.WZBM and c.JGID=a.JGID and c.PYM like ?)order by a.pkey
</sql>
<tables>
<table name="HIS_MMS_WZZD" insert="true" update="true" delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_MMS_WZZD" />
<f name="WZBM" type="12" table="HIS_MMS_WZZD" />
<f name="WZMC" type="12" table="HIS_MMS_WZZD" />
<f name="WZGG" type="12" table="HIS_MMS_WZZD" />
<f name="WZXH" type="12" table="HIS_MMS_WZZD" />
<f name="WZPP" type="12" table="HIS_MMS_WZZD" />
<f name="WZJC" type="12" table="HIS_MMS_WZZD" />
<f name="JBDW" type="12" table="HIS_MMS_WZZD" />
<f name="RKDW" type="12" table="HIS_MMS_WZZD" />
<f name="ZHXS" type="-5" table="HIS_MMS_WZZD" />
<f name="WZLZ" type="12" table="HIS_MMS_WZZD" />
<f name="KCFL" type="12" table="HIS_MMS_WZZD" />
<f name="ISPHYQ" type="12" table="HIS_MMS_WZZD" />
<f name="ISXQYQ" type="12" table="HIS_MMS_WZZD" />
<f name="XQCD" type="-5" table="HIS_MMS_WZZD" />
<f name="ZBFL" type="12" table="HIS_MMS_WZZD" />
<f name="JGJB" type="12" table="HIS_MMS_WZZD" />
<f name="BWM" type="12" table="HIS_MMS_WZZD" />
<f name="WZBZ" type="12" table="HIS_MMS_WZZD" />
<f name="ISSF" type="12" table="HIS_MMS_WZZD" />
<f name="WZJJ" type="8" table="HIS_MMS_WZZD" />
<f name="WZSJ" type="8" table="HIS_MMS_WZZD" />
<f name="JGSXRQ" type="93" table="HIS_MMS_WZZD" />
<f name="WJWJH" type="12" table="HIS_MMS_WZZD" />
<f name="DJLX" type="12" table="HIS_MMS_WZZD" />
<f name="WJBARQ" type="93" table="HIS_MMS_WZZD" />
<f name="SFLX" type="12" table="HIS_MMS_WZZD" />
<f name="WZCS" type="12" table="HIS_MMS_WZZD" />
<f name="ZCZH" type="12" table="HIS_MMS_WZZD" />
<f name="ZCZYXRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZCZFZRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZCZMC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBMC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBGYS" type="12" table="HIS_MMS_WZZD" />
<f name="ZBPSS" type="12" table="HIS_MMS_WZZD" />
<f name="ZBJB" type="12" table="HIS_MMS_WZZD" />
<f name="ZBRQ" type="93" table="HIS_MMS_WZZD" />
<f name="ZBJJ" type="8" table="HIS_MMS_WZZD" />
<f name="WZGB" type="12" table="HIS_MMS_WZZD" />
<f name="WZTM" type="12" table="HIS_MMS_WZZD" />
<f name="WZCD" type="12" table="HIS_MMS_WZZD" />
<f name="ZGSJ" type="8" table="HIS_MMS_WZZD" />
<f name="MJFL" type="12" table="HIS_MMS_WZZD" />
<f name="MJSJCD" type="-5" table="HIS_MMS_WZZD" />
<f name="ZLCC" type="12" table="HIS_MMS_WZZD" />
<f name="ZBBH" type="12" table="HIS_MMS_WZZD" />
<f name="ZD" type="12" table="HIS_MMS_WZZD" />
<f name="ISJK" type="12" table="HIS_MMS_WZZD" />
<f name="ISGZ" type="12" table="HIS_MMS_WZZD" />
<f name="ISYCX" type="12" table="HIS_MMS_WZZD" />
<f name="ISZR" type="12" table="HIS_MMS_WZZD" />
<f name="ISJJQL" type="12" table="HIS_MMS_WZZD" />
<f name="CCTJPKEY" type="12" table="HIS_MMS_WZZD" />
<f name="QQLX" type="12" table="HIS_MMS_WZZD" />
<f name="ZT" type="12" table="HIS_MMS_WZZD" />
<f name="CJR" type="12" table="HIS_MMS_WZZD" />
<f name="CJRQ" type="93" table="HIS_MMS_WZZD" />
<f name="XGR" type="12" table="HIS_MMS_WZZD" />
<f name="XGRQ" type="93" table="HIS_MMS_WZZD" />
<f name="JGID" type="12" table="HIS_MMS_WZZD" />
<f name="LOCKFLAG" type="-5" table="HIS_MMS_WZZD" />
<f name="CLFL" type="12" table="HIS_MMS_WZZD" />
<f name="YBBM" type="12" />
<f name="YBMC" type="12" />
<f name="JG" type="12" />
<f name="JBJG" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="daoForHisKskcPcTjLog" log="true" type="1" memo="dao科室库存批次调价记录表">
<sql>
<![CDATA[
select
PKEY
,t.JGID
,t.KSKC_PC_PKEY
,t.TJRQ
,t.TJRY
,t.TJPCBM
,t.DJ
,t.JBDJ
,t.SJ
,t.JBSJ
,t.LOCKFLAG
from HIS_KSKC_PC_TJ_LOG t
where 1 = 1
and t.JGID = ?
and t.TJPCBM = ?
]]>
</sql>
<tables>
<table name="HIS_KSKC_PC_TJ_LOG" insert="true" update="false" delete="false">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" table="HIS_KSKC_PC_TJ_LOG" type="12" />
<f name="JGID" table="HIS_KSKC_PC_TJ_LOG" type="12" />
<f name="KSKC_PC_PKEY" table="HIS_KSKC_PC_TJ_LOG" type="12" />
<f name="TJRQ" table="HIS_KSKC_PC_TJ_LOG" type="93" />
<f name="TJRY" table="HIS_KSKC_PC_TJ_LOG" type="12" />
<f name="TJPCBM" table="HIS_KSKC_PC_TJ_LOG" type="12" />
<f name="DJ" table="HIS_KSKC_PC_TJ_LOG" type="8" />
<f name="JBDJ" table="HIS_KSKC_PC_TJ_LOG" type="8" />
<f name="SJ" table="HIS_KSKC_PC_TJ_LOG" type="8" />
<f name="JBSJ" table="HIS_KSKC_PC_TJ_LOG" type="8" />
<f name="LOCKFLAG" table="HIS_KSKC_PC_TJ_LOG" type="-5" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
</datasource>