This commit is contained in:
hyunho 2020-12-22 08:37:18 +00:00
parent 115b9c8930
commit e4731a4361
1 changed files with 74 additions and 1 deletions

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<sqlMap xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/tr/xmlschema-1/" namespace="">
<alias>
<typeAlias alias="document" type="NP.Model.document, NP.Model" />
<typeAlias alias="textvalue" type="NP.Model.textvalue, NP.Model" />
</alias>
<cacheModels>
<cacheModel id="croomCache" implementation="LRU" >
@ -1274,5 +1275,77 @@
,iscancel=#iscancel#
where taxno=#taxno#
</update>
<select id="cr.documnetspast" parameterClass="hashtable" resultClass="document">
select
a.*
from (
select
a.no,a.kind,a.cg,a.cshape,a.username,a.userpno,a.typeman,a.edukind,a.typeedu,a.typegrade,a.typejob,a.cgname,a.completeno,a.companyname,a.companyaddr,a.brno,a.eino,a.btype
,a.bkind,a.ceoname,date_format(a.ssdate, '%Y-%m-%d') ssdate,date_format(a.sedate, '%Y-%m-%d') sedate,a.sctime,a.assign,a.slevel,a.uduty,a.phone,a.mname,a.mphone,a.sprice,a.rprice,a.rbank,a.rbankno,a.rbankuser,a.taxemail,a.syear
,row_number() over(order by a.ssdate desc) rno
,count(a.ssdate) over() pagetotalcount
from docprintpast a
where a.ssdate &gt;= #ssdate# and a.sedate &lt;= #sedate#
<isNotNull property="syear">and a.syear=#syear#</isNotNull>
<isNotNull property="cg">and a.cg=#cg#</isNotNull>
<isNotNull property="cshape">and a.cshape=#cshape#</isNotNull>
<isNotNull property="typeman">and a.typeman=#typeman#</isNotNull>
<isNotNull property="edukind">and a.edukind=#edukind#</isNotNull>
<isNotNull property="typeedu">and a.typeedu=#typeedu#</isNotNull>
<isNotNull property="typegrade">and a.typegrade=#typegrade#</isNotNull>
<isNotNull property="typejob">and a.typejob=#typejob#</isNotNull>
<isNotNull property="word">
<isNotNull property="text">
<isEqual property="word" compareValue="username" prepend="and"> a.username like concat('%',#text#,'%')</isEqual>
<isEqual property="word" compareValue="userpno" prepend="and"> a.userpno like concat('%',#text#,'%')</isEqual>
<isEqual property="word" compareValue="completeno" prepend="and"> a.completeno like concat('%',#text#,'%')</isEqual>
<isEqual property="word" compareValue="companyname" prepend="and"> a.companyname like concat('%',#text#,'%')</isEqual>
<isEqual property="word" compareValue="brno" prepend="and"> a.username brno concat('%',#text#,'%')</isEqual>
</isNotNull>
</isNotNull>
) a
<include refid="sql.pagedynamic"></include>
order by a.rno
</select>
<select id="cr.documnets.syear" parameterClass="hashtable" resultClass="textvalue">
select a.syear value,a.syear text from docprintpast a
where a.syear is not null and a.syear &lt;&gt; ""
group by a.syear
</select>
<select id="cr.documnets.cg" parameterClass="hashtable" resultClass="textvalue">
select a.cg value,a.cg text from docprintpast a
where a.cg is not null and a.cg &lt;&gt; ""
group by a.cg
</select>
<select id="cr.documnets.cshape" parameterClass="hashtable" resultClass="textvalue">
select a.cshape value,a.cshape text from docprintpast a
where a.cshape is not null and a.cshape &lt;&gt; ""
group by a.cshape
</select>
<select id="cr.documnets.typeman" parameterClass="hashtable" resultClass="textvalue">
select a.typeman value,a.typeman text from docprintpast a
where a.typeman is not null and a.typeman &lt;&gt; ""
group by a.typeman
</select>
<select id="cr.documnets.edukind" parameterClass="hashtable" resultClass="textvalue">
select a.edukind value,a.edukind text from docprintpast a
where a.edukind is not null and a.edukind &lt;&gt; ""
group by a.edukind
</select>
<select id="cr.documnets.typeedu" parameterClass="hashtable" resultClass="textvalue">
select a.typeedu value,a.typeedu text from docprintpast a
where a.typeedu is not null and a.typeedu &lt;&gt; ""
group by a.typeedu
</select>
<select id="cr.documnets.typegrade" parameterClass="hashtable" resultClass="textvalue">
select a.typegrade value,a.typegrade text from docprintpast a
where a.typegrade is not null and a.typegrade &lt;&gt; ""
group by a.typegrade
</select>
<select id="cr.documnets.typejob" parameterClass="hashtable" resultClass="textvalue">
select a.typejob value,a.typejob text from docprintpast a
where a.typejob is not null and a.typejob &lt;&gt; ""
group by a.typejob
</select>
</statements>
</sqlMap>