DgArchivesReplenishMapper.xml
2.51 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
<?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.replenish.mapper.DgArchivesReplenishMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.pashanhoo.replenish.entity.DgArchivesReplenishDO">
<id column="BSM_MODIFY" property="bsmModify" />
<result column="BSM_ARCHIVES" property="bsmArchives" />
<result column="BLBH" property="blbh" />
<result column="XGSJ" property="xgsj" />
<result column="XGR" property="xgr" />
<result column="BZ" property="bz" />
</resultMap>
<!-- 通用查询映射结果 -->
<resultMap id="SearchResultMap" type="com.pashanhoo.replenish.entity.vo.DgArchivesReplenishListVO">
<id column="BSM_MODIFY" property="bsm_modify" />
<result column="XGSJ" property="xgsj" />
<result column="XGR" property="xgr" />
<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="bdcdy_num" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
BSM_MODIFY, BSM_ARCHIVES, BLBH, XGSJ, XGR, BZ
</sql>
<select id="search" resultMap="SearchResultMap">
select a.bsm_modify,a.xgsj,a.xgr,b.djlx,b.djjgmc,d.ajh,b.ywh,c.bdcdyh,c.qlr,c.ywr,c.BDCQZH,count(1) over(partition by c.bdcdyh) bdcdy_num
from dg_archives_replenish a, dg_business b, dg_bdcdy c,dg_archives d
where a.bsm_archives = d.bsm_archives
and a.bsm_archives=d.bsm_archives
and c.bsm_archives=d.bsm_archives
<if test="ywh != null and ywh!='' ">
and b.ywh=#{ywh,jdbcType=VARCHAR}
</if>
<if test="djjgbm != null and djjgbm!='' ">
and b.djjgbm=#{djjgbm,jdbcType=VARCHAR}
</if>
<if test="djlx != null and djlx!='' ">
and b.djlx=#{djlx,jdbcType=VARCHAR}
</if>
<if test="xgr != null and xgr!='' ">
and a.xgr=#{xgr,jdbcType=VARCHAR}
</if>
<if test="xgsj != null and xgsj!='' ">
and a.xgsj=#{xgsj,jdbcType=VARCHAR}
</if>
</select>
</mapper>