123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd" >
- <sqlMap namespace="da_lqwhxx" >
- <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.da.dataobject.DaLqwhxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- <result column="ID" property="id" jdbcType="INTEGER" />
- <result column="LQID" property="lqid" jdbcType="INTEGER" />
- <result column="LQMC" property="lqmc" jdbcType="VARCHAR" />
- <result column="FSSJ" property="fssj" jdbcType="TIMESTAMP" />
- <result column="ZLS" property="zls" jdbcType="DECIMAL" />
- <result column="RLS" property="rls" jdbcType="DECIMAL" />
- <result column="RLPJTZ" property="rlpjtz" jdbcType="DECIMAL" />
- <result column="SCS" property="scs" jdbcType="DECIMAL" />
- <result column="SCPJTZ" property="scpjtz" jdbcType="DECIMAL" />
- <result column="GLS" property="gls" jdbcType="DECIMAL" />
- <result column="GLPJTZ" property="glpjtz" jdbcType="DECIMAL" />
- <result column="SWS" property="sws" jdbcType="DECIMAL" />
- <result column="SWPJTZ" property="swpjtz" jdbcType="DECIMAL" />
- <result column="TTS" property="tts" jdbcType="DECIMAL" />
- <result column="TTPJTZ" property="ttpjtz" jdbcType="DECIMAL" />
- <result column="CLS" property="cls" jdbcType="DECIMAL" />
- <result column="CLPJTZ" property="clpjtz" jdbcType="DECIMAL" />
- <result column="CZ" property="cz" jdbcType="VARCHAR" />
- <result column="GLY" property="gly" jdbcType="VARCHAR" />
- <result column="XGR" property="xgr" jdbcType="VARCHAR" />
- <result column="XGSJ" property="xgsj" jdbcType="TIMESTAMP" />
- <result column="ZFBZ" property="zfbz" jdbcType="INTEGER" />
- </resultMap>
- <sql id="ibatorgenerated_Example_Where_Clause" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- <iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate" >
- <isEqual property="oredCriteria[].valid" compareValue="true" >
- (
- <iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
- $oredCriteria[].criteriaWithoutValue[]$
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
- $oredCriteria[].criteriaWithSingleValue[].condition$
- #oredCriteria[].criteriaWithSingleValue[].value#
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and" >
- $oredCriteria[].criteriaWithListValue[].condition$
- <iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction="," >
- #oredCriteria[].criteriaWithListValue[].values[]#
- </iterate>
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
- $oredCriteria[].criteriaWithBetweenValue[].condition$
- #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
- #oredCriteria[].criteriaWithBetweenValue[].values[1]#
- </iterate>
- )
- </isEqual>
- </iterate>
- </sql>
- <select id="ibatorgenerated_selectByExample" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.da.dataobject.DaLqwhxxExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- select ID, LQID, LQMC, FSSJ, ZLS, RLS, RLPJTZ, SCS, SCPJTZ, GLS, GLPJTZ, SWS, SWPJTZ, TTS,
- TTPJTZ, CLS, CLPJTZ, CZ, GLY, XGR, XGSJ, ZFBZ
- from da_lqwhxx
- <isParameterPresent >
- <include refid="da_lqwhxx.ibatorgenerated_Example_Where_Clause" />
- <isNotNull property="orderByClause" >
- order by $orderByClause$
- </isNotNull>
- <isGreaterEqual property="start" compareValue="0" >
- limit $start$ , $limit$
- </isGreaterEqual>
- </isParameterPresent>
- </select>
- <select id="ibatorgenerated_selectByPrimaryKey" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.da.dataobject.DaLqwhxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- select ID, LQID, LQMC, FSSJ, ZLS, RLS, RLPJTZ, SCS, SCPJTZ, GLS, GLPJTZ, SWS, SWPJTZ, TTS,
- TTPJTZ, CLS, CLPJTZ, CZ, GLY, XGR, XGSJ, ZFBZ
- from da_lqwhxx
- where ID = #id:INTEGER#
- </select>
- <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.da.dataobject.DaLqwhxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- delete from da_lqwhxx
- where ID = #id:INTEGER#
- </delete>
- <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.da.dataobject.DaLqwhxxExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- delete from da_lqwhxx
- <include refid="da_lqwhxx.ibatorgenerated_Example_Where_Clause" />
- </delete>
- <insert id="ibatorgenerated_insert" parameterClass="com.huimv.da.dataobject.DaLqwhxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- insert into da_lqwhxx (ID, LQID, LQMC, FSSJ, ZLS, RLS, RLPJTZ, SCS, SCPJTZ, GLS, GLPJTZ, SWS,
- SWPJTZ, TTS, TTPJTZ, CLS, CLPJTZ, CZ, GLY, XGR, XGSJ, ZFBZ)
- values (#id:INTEGER#, #lqid:INTEGER#, #lqmc:VARCHAR#, #fssj:TIMESTAMP#, #zls:DECIMAL#,
- #rls:DECIMAL#, #rlpjtz:DECIMAL#, #scs:DECIMAL#, #scpjtz:DECIMAL#, #gls:DECIMAL#,
- #glpjtz:DECIMAL#, #sws:DECIMAL#, #swpjtz:DECIMAL#, #tts:DECIMAL#, #ttpjtz:DECIMAL#,
- #cls:DECIMAL#, #clpjtz:DECIMAL#, #cz:VARCHAR#, #gly:VARCHAR#, #xgr:VARCHAR#, #xgsj:TIMESTAMP#,
- #zfbz:INTEGER#)
- </insert>
- <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.da.dataobject.DaLqwhxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- insert into da_lqwhxx
- <dynamic prepend="(" >
- <isNotNull prepend="," property="id" >
- ID
- </isNotNull>
- <isNotNull prepend="," property="lqid" >
- LQID
- </isNotNull>
- <isNotNull prepend="," property="lqmc" >
- LQMC
- </isNotNull>
- <isNotNull prepend="," property="fssj" >
- FSSJ
- </isNotNull>
- <isNotNull prepend="," property="zls" >
- ZLS
- </isNotNull>
- <isNotNull prepend="," property="rls" >
- RLS
- </isNotNull>
- <isNotNull prepend="," property="rlpjtz" >
- RLPJTZ
- </isNotNull>
- <isNotNull prepend="," property="scs" >
- SCS
- </isNotNull>
- <isNotNull prepend="," property="scpjtz" >
- SCPJTZ
- </isNotNull>
- <isNotNull prepend="," property="gls" >
- GLS
- </isNotNull>
- <isNotNull prepend="," property="glpjtz" >
- GLPJTZ
- </isNotNull>
- <isNotNull prepend="," property="sws" >
- SWS
- </isNotNull>
- <isNotNull prepend="," property="swpjtz" >
- SWPJTZ
- </isNotNull>
- <isNotNull prepend="," property="tts" >
- TTS
- </isNotNull>
- <isNotNull prepend="," property="ttpjtz" >
- TTPJTZ
- </isNotNull>
- <isNotNull prepend="," property="cls" >
- CLS
- </isNotNull>
- <isNotNull prepend="," property="clpjtz" >
- CLPJTZ
- </isNotNull>
- <isNotNull prepend="," property="cz" >
- CZ
- </isNotNull>
- <isNotNull prepend="," property="gly" >
- GLY
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- XGR
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- XGSJ
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- ZFBZ
- </isNotNull>
- )
- </dynamic>
- values
- <dynamic prepend="(" >
- <isNotNull prepend="," property="id" >
- #id:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="lqid" >
- #lqid:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="lqmc" >
- #lqmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="fssj" >
- #fssj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="zls" >
- #zls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="rls" >
- #rls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="rlpjtz" >
- #rlpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="scs" >
- #scs:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="scpjtz" >
- #scpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="gls" >
- #gls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="glpjtz" >
- #glpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="sws" >
- #sws:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="swpjtz" >
- #swpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="tts" >
- #tts:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="ttpjtz" >
- #ttpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="cls" >
- #cls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="clpjtz" >
- #clpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="cz" >
- #cz:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="gly" >
- #gly:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- #xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- #xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- #zfbz:INTEGER#
- </isNotNull>
- )
- </dynamic>
- </insert>
- <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.da.dataobject.DaLqwhxxExample" resultClass="java.lang.Integer" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- select count(*) from da_lqwhxx as wh
- <include refid="da_lqwhxx.ibatorgenerated_Example_Where_Clause" />
- </select>
- <update id="ibatorgenerated_updateByExampleSelective" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- update da_lqwhxx
- <dynamic prepend="set" >
- <isNotNull prepend="," property="record.id" >
- ID = #record.id:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.lqid" >
- LQID = #record.lqid:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.lqmc" >
- LQMC = #record.lqmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.fssj" >
- FSSJ = #record.fssj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="record.zls" >
- ZLS = #record.zls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.rls" >
- RLS = #record.rls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.rlpjtz" >
- RLPJTZ = #record.rlpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.scs" >
- SCS = #record.scs:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.scpjtz" >
- SCPJTZ = #record.scpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.gls" >
- GLS = #record.gls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.glpjtz" >
- GLPJTZ = #record.glpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.sws" >
- SWS = #record.sws:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.swpjtz" >
- SWPJTZ = #record.swpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.tts" >
- TTS = #record.tts:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.ttpjtz" >
- TTPJTZ = #record.ttpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.cls" >
- CLS = #record.cls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.clpjtz" >
- CLPJTZ = #record.clpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="record.cz" >
- CZ = #record.cz:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.gly" >
- GLY = #record.gly:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.xgr" >
- XGR = #record.xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.xgsj" >
- XGSJ = #record.xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="record.zfbz" >
- ZFBZ = #record.zfbz:INTEGER#
- </isNotNull>
- </dynamic>
- <isParameterPresent >
- <include refid="da_lqwhxx.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- update da_lqwhxx
- set ID = #record.id:INTEGER#,
- LQID = #record.lqid:INTEGER#,
- LQMC = #record.lqmc:VARCHAR#,
- FSSJ = #record.fssj:TIMESTAMP#,
- ZLS = #record.zls:DECIMAL#,
- RLS = #record.rls:DECIMAL#,
- RLPJTZ = #record.rlpjtz:DECIMAL#,
- SCS = #record.scs:DECIMAL#,
- SCPJTZ = #record.scpjtz:DECIMAL#,
- GLS = #record.gls:DECIMAL#,
- GLPJTZ = #record.glpjtz:DECIMAL#,
- SWS = #record.sws:DECIMAL#,
- SWPJTZ = #record.swpjtz:DECIMAL#,
- TTS = #record.tts:DECIMAL#,
- TTPJTZ = #record.ttpjtz:DECIMAL#,
- CLS = #record.cls:DECIMAL#,
- CLPJTZ = #record.clpjtz:DECIMAL#,
- CZ = #record.cz:VARCHAR#,
- GLY = #record.gly:VARCHAR#,
- XGR = #record.xgr:VARCHAR#,
- XGSJ = #record.xgsj:TIMESTAMP#,
- ZFBZ = #record.zfbz:INTEGER#
- <isParameterPresent >
- <include refid="da_lqwhxx.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.da.dataobject.DaLqwhxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- update da_lqwhxx
- <dynamic prepend="set" >
- <isNotNull prepend="," property="lqid" >
- LQID = #lqid:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="lqmc" >
- LQMC = #lqmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="fssj" >
- FSSJ = #fssj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="zls" >
- ZLS = #zls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="rls" >
- RLS = #rls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="rlpjtz" >
- RLPJTZ = #rlpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="scs" >
- SCS = #scs:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="scpjtz" >
- SCPJTZ = #scpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="gls" >
- GLS = #gls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="glpjtz" >
- GLPJTZ = #glpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="sws" >
- SWS = #sws:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="swpjtz" >
- SWPJTZ = #swpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="tts" >
- TTS = #tts:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="ttpjtz" >
- TTPJTZ = #ttpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="cls" >
- CLS = #cls:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="clpjtz" >
- CLPJTZ = #clpjtz:DECIMAL#
- </isNotNull>
- <isNotNull prepend="," property="cz" >
- CZ = #cz:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="gly" >
- GLY = #gly:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- XGR = #xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- XGSJ = #xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- ZFBZ = #zfbz:INTEGER#
- </isNotNull>
- </dynamic>
- where ID = #id:INTEGER#
- </update>
- <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.da.dataobject.DaLqwhxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 23 16:56:30 CST 2014.
- -->
- update da_lqwhxx
- set LQID = #lqid:INTEGER#,
- LQMC = #lqmc:VARCHAR#,
- FSSJ = #fssj:TIMESTAMP#,
- ZLS = #zls:DECIMAL#,
- RLS = #rls:DECIMAL#,
- RLPJTZ = #rlpjtz:DECIMAL#,
- SCS = #scs:DECIMAL#,
- SCPJTZ = #scpjtz:DECIMAL#,
- GLS = #gls:DECIMAL#,
- GLPJTZ = #glpjtz:DECIMAL#,
- SWS = #sws:DECIMAL#,
- SWPJTZ = #swpjtz:DECIMAL#,
- TTS = #tts:DECIMAL#,
- TTPJTZ = #ttpjtz:DECIMAL#,
- CLS = #cls:DECIMAL#,
- CLPJTZ = #clpjtz:DECIMAL#,
- CZ = #cz:VARCHAR#,
- GLY = #gly:VARCHAR#,
- XGR = #xgr:VARCHAR#,
- XGSJ = #xgsj:TIMESTAMP#,
- ZFBZ = #zfbz:INTEGER#
- where ID = #id:INTEGER#
- </update>
-
- <!-- 栏期维护列表 -->
- <select id="ibatorgenerated_selectMCZSLQLQWHByExample" resultClass="com.huimv.da.dataobject.DaLqwhxx" parameterClass="com.huimv.da.dataobject.DaLqwhxxExample" >
- <!-- select da_lqwhxx.ID, da_lqwhxx.LQID, da_lqda.LQMC, da_lqwhxx.FSSJ, da_lqwhxx.RLS, da_lqwhxx.RLPJTZ, da_lqwhxx.ZLS, da_lqwhxx.SCS, da_lqwhxx.SCPJTZ, da_lqwhxx.GLS, da_lqwhxx.GLPJTZ, da_lqwhxx.SWS, da_lqwhxx.SWPJTZ, da_lqwhxx.CLS, da_lqwhxx.CLPJTZ,
- da_lqwhxx.TTS, da_lqwhxx.TTPJTZ, da_lqwhxx.CZ, da_lqwhxx.GLY, da_lqwhxx.XGR, da_lqwhxx.XGSJ, da_lqwhxx.ZFBZ, da_lqda.lqmc, da_zsda.zsmc, da_mcda.mcmc
- from da_lqwhxx
- inner join da_lqda
- inner join da_zsda
- inner join da_mcda
- on da_lqwhxx.lqid = da_lqda.id and da_lqda.zsid = da_zsda.id and da_zsda.mcid = da_mcda.id -->
- SELECT wh.ID, wh.LQID, wh.FSSJ, wh.ZLS, wh.RLS, wh.RLPJTZ, wh.SCS, wh.SCPJTZ, wh.GLS, wh.GLPJTZ, wh.SWS, wh.SWPJTZ, wh.TTS, wh.TTPJTZ,
- wh.CLS, wh.CLPJTZ, wh.TTS, wh.TTPJTZ, wh.CZ, wh.GLY, wh.XGR, wh.XGSJ, wh.ZFBZ, lq.LQMC AS LQMC, zs.ZSMC AS ZSMC, mc.MCMC AS MCMC
- FROM da_lqwhxx AS wh
- LEFT JOIN da_lqda lq ON lq.ID = wh.LQID AND lq.ZFBZ = 0
- LEFT JOIN da_zsda zs ON zs.ID = lq.ZSID AND zs.ZFBZ = 0
- LEFT JOIN da_mcda mc ON mc.ID = zs.MCID AND mc.ZFBZ = 0
- <isParameterPresent >
- <include refid="da_lqwhxx.ibatorgenerated_Example_Where_Clause" />
- <isNotNull property="orderByClause" >
- order by $orderByClause$
- </isNotNull>
- <isGreaterEqual property="start" compareValue="0" >
- limit $start$ , $limit$
- </isGreaterEqual>
- </isParameterPresent>
- </select>
-
- <!-- 动物数目 -->
- <select id="dws.select.lqwhxx.by.lqid" parameterClass="java.lang.Integer" resultClass="com.huimv.busi.da.dto.DaDwsDTO">
- SELECT
- CASE WHEN sum(sws) IS NULL THEN 0 ELSE SUM(sws) END as sumsws,
- CASE WHEN sum(scs) IS NULL THEN 0 ELSE SUM(scs) END as sumscs,
- CASE WHEN sum(gls) IS NULL THEN 0 ELSE SUM(gls) END as sumgls,
- CASE WHEN sum(rls) IS NULL THEN 0 ELSE SUM(rls) END as sumrls,
- CASE WHEN sum(tts) IS NULL THEN 0 ELSE SUM(tts) END as sumtts,
- CASE WHEN sum(cls) IS NULL THEN 0 ELSE SUM(cls) END as sumcls,
- CASE WHEN (SUM(rls*rlpjtz)/sum(rls)) IS NULL THEN 0 ELSE (SUM(rls*rlpjtz)/sum(rls)) END as zrlpjtz,
- CASE WHEN (sum(rls) - sum(sws) - sum(scs)-sum(gls) - sum(tts) - sum(cls)) IS NULL THEN 0 ELSE
- (sum(rls) - sum(sws) - sum(scs)-sum(gls) - sum(tts) - sum(cls)) END as sumzls
- FROM da_lqwhxx where lqid = #lqid:INTEGER# and ZFBZ = 0
- </select>
-
- <!-- 发生时间受限条件下的动物数目 -->
- <select id="dws.select.lqwhxx.by.lqid.fssj" parameterClass="com.huimv.da.dataobject.DaLqwhxx" resultClass="com.huimv.busi.da.dto.DaDwsDTO">
- SELECT
- CASE WHEN sum(sws) IS NULL THEN 0 ELSE SUM(sws) END as sumsws,
- CASE WHEN sum(scs) IS NULL THEN 0 ELSE SUM(scs) END as sumscs,
- CASE WHEN sum(gls) IS NULL THEN 0 ELSE SUM(gls) END as sumgls,
- CASE WHEN sum(rls) IS NULL THEN 0 ELSE SUM(rls) END as sumrls,
- CASE WHEN sum(tts) IS NULL THEN 0 ELSE SUM(tts) END as sumtts,
- CASE WHEN sum(cls) IS NULL THEN 0 ELSE SUM(cls) END as sumcls,
- CASE WHEN (SUM(rls*rlpjtz)/sum(rls)) IS NULL THEN 0 ELSE (SUM(rls*rlpjtz)/sum(rls)) END as zrlpjtz,
- CASE WHEN (sum(rls) - sum(sws) - sum(scs)-sum(gls) - sum(tts) - sum(cls)) IS NULL THEN 0 ELSE
- (sum(rls) - sum(sws) - sum(scs)-sum(gls) - sum(tts) - sum(cls)) END as sumzls
- FROM da_lqwhxx
- <dynamic prepend="WHERE" >
- <isNotNull prepend="and" property="lqid" >
- LQID = #lqid:INTEGER#
- </isNotNull>
- <isNotNull prepend="and" property="fssj" >
- <![CDATA[
- FSSJ <= #fssj:TIMESTAMP#
- ]]>
- </isNotNull>
- <isNotNull prepend="and" property="zfbz" >
- ZFBZ = #zfbz:INTEGER#
- </isNotNull>
- </dynamic>
- </select>
-
- <!-- 栏期维护日志 -->
- <select id="id.select.lqwhxx.by.lqid" parameterClass="java.lang.Integer" resultClass="com.huimv.da.dataobject.DaLqwhxx">
- <!-- SELECT id FROM da_lqwhxx where lqid = #lqid:INTEGER# and ZFBZ = 0 order by xgsj desc limit 0,1 -->
- SELECT * FROM da_lqwhxx where lqid = #lqid:INTEGER# and ZFBZ = 0 order by xgsj desc limit 0,1
- </select>
-
- <!-- 更新栏期维护日志 -->
- <update id="zls.update.lqwhxx.by.id" parameterClass="java.lang.Integer">
- update da_lqwhxx set zls = #zls:INTEGER# where id = #id:INTEGER# and ZFBZ = 0
- </update>
- </sqlMap>
|