DgArchivesReplenishMapper.xml
2.24 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
<?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="CREATETIME" property="createTime"/>
<result column="CREATER" property="creater"/>
<result column="BZ" property="bz"/>
</resultMap>
<select id="search" resultType="com.pashanhoo.replenish.entity.vo.DgArchivesReplenishListVO">
select DGR.BSM_ARCHIVES,
DGR.BSM_MODIFY,
DB.QLLX,
DB.DJLX,
DA.AJH,
DB.YWH,
BDCDY.BDCDYH,
BDCDY.QLR,
BDCDY.YWR,
BDCDY.BDCQZH,
DGR.CREATETIME,
DGR.CREATER,
DGR.STATE,
count(*) over (partition by BDCDY.bdcdyh) as bdcdyNum
from DG_REPLENISH DGR
join DG_ARCHIVES DA on DA.BSM_ARCHIVES = DGR.BSM_ARCHIVES
join DG_BDCDY BDCDY on BDCDY.BSM_ARCHIVES = DGR.BSM_ARCHIVES
join DG_BUSINESS DB on DB.BSM_ARCHIVES = DGR.BSM_ARCHIVES
<where>
<if test="request.ywh != null and request.ywh != ''">
DB.YWH = #{request.ywh,jdbcType=VARCHAR}
</if>
<if test="request.qllx != null and request.qllx != ''">
and DB.QLLX = #{request.qllx,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 DGR.CREATER = #{request.creater,jdbcType=VARCHAR}
</if>
<if test="request.createTime != null">
and DGR.CREATETIME = #{request.createTime,jdbcType=TIMESTAMP}
</if>
</where>
</select>
</mapper>