DgArchivesModifyMapper.xml
4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pashanhoo.modify.mapper.DgArchivesModifyMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.pashanhoo.modify.entity.DgModifyDO">
<id column="BSM_MODIFY" property="bsmModify"/>
<result column="BSM_ARCHIVES" property="bsmArchives"/>
<result column="XGBH" property="xgbh"/>
<result column="YDAXX" property="ydaxx"/>
<result column="XDAXX" property="xdaxx"/>
<result column="XGNR" property="xgnr"/>
<result column="XGSJ" property="xgsj"/>
<result column="XGR" property="xgr"/>
<result column="BZ" property="bz"/>
</resultMap>
<!--<!– 通用查询映射结果 –>-->
<!--<resultMap id="SearchResultMap" type="com.pashanhoo.modify.entity.vo.DgArchivesModifyListVO">-->
<!-- <id column="BSM_ARCHIVES" property="bsmArchives" />-->
<!-- <result column="XGSJ" property="xgsj" />-->
<!-- <result column="CREATER" property="creater" />-->
<!-- <result column="DJLX" property="djlx" />-->
<!-- <result column="DJJGMC" property="djjgmc" />-->
<!-- <result column="AJH" property="ajh" />-->
<!-- <result column="YWH" property="ywh" />-->
<!-- <result column="BDCDYH" property="bdcdyh" />-->
<!-- <result column="QLR" property="qlr" />-->
<!-- <result column="YWR" property="ywr" />-->
<!-- <result column="BDCQZH" property="bdcqzh" />-->
<!-- <result column="BDCDY_NUM" property="bdcdyNum" />-->
<!--</resultMap>-->
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
BSM_MODIFY,
BSM_ARCHIVES,
XGBH,
YDAXX,
XDAXX,
XGNR,
XGSJ,
XGR,
BZ
</sql>
<select id="searchDgArchivesModifyList" resultType="com.pashanhoo.modify.entity.vo.DgArchivesModifyListVO">
select DA.BSM_ARCHIVES,
DM.BSM_MODIFY,
DB.QLLX,
DB.DJLX,
DA.AJH,
DB.YWH,
BDCDY.BDCDYH,
BDCDY.QLR,
BDCDY.YWR,
BDCDY.BDCQZH,
DM.CREATETIME,
DM.CREATER,
DM.STATE,
count(*) over (partition by BDCDY.bdcdyh) as bdcdyNum
from DG_MODIFY DM
join DG_BUSINESS DB on DM.BSM_ARCHIVES = DB.BSM_ARCHIVES
join DG_BDCDY BDCDY on DM.BSM_ARCHIVES = BDCDY.BSM_ARCHIVES
join DG_ARCHIVES DA on DM.BSM_ARCHIVES = DA.BSM_ARCHIVES
<where>
<if test="request.djywmc != null and request.djywmc != ''">
DB.DJYWMC = #{request.djywmc,jdbcType=VARCHAR}
</if>
<if test="request.djlx != null and request.djlx != ''">
and DB.DJLX = #{request.djlx,jdbcType=VARCHAR}
</if>
<if test="request.creater != null and request.creater != ''">
and DM.CREATER = #{request.creater,jdbcType=VARCHAR}
</if>
<if test="request.xgqssj != null">
<![CDATA[
and DM.CREATETIME >= #{request.xgqssj,jdbcType=TIMESTAMP}
]]>
</if>
<if test="request.xgjzsj != null">
<![CDATA[
and DM.CREATETIME <= #{request.xgjzsj,jdbcType=TIMESTAMP}
]]>
</if>
<if test="request.ajh != null and request.ajh != ''">
and DA.AJH = #{request.ajh,jdbcType=VARCHAR}
</if>
<if test="request.ywh != null and request.ywh != ''">
and DB.YWH = #{request.ywh,jdbcType=VARCHAR}
</if>
<if test="request.bdcdyh != null and request.bdcdyh != ''">
and BDCDY.BDCDYH = #{request.bdcdyh,jdbcType=VARCHAR}
</if>
<if test="request.bdcqzh != null and request.bdcqzh != ''">
and BDCDY.BDCQZH = #{request.bdcqzh,jdbcType=VARCHAR}
</if>
</where>
</select>
</mapper>