80aae306f97c827d4421cba11394f7ce644e718f.svn-base
1.89 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
<?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.thinkgem.jeesite.modules.reg.dao.ywpjxt.YwpjDao">
<!-- 根据操作人员Id获取ywpj -->
<select id="getYwpjByUserId" resultType="ywpj">
select * from ywpj y where y.userId = #{userId} and y.slzt = 2 order by y.sqrq desc
</select>
<!-- 更新mycd -->
<update id="updatePjmycd">
update ywpj set slzt = '3', mycd = #{mycd}, pjfs = #{pjfs} where pjId = #{pjId}
</update>
<!-- 根据Id获取ywpj -->
<select id="getYwpjByPjId" resultType="ywpj">
select * from ywpj y where pjId = #{pjId}
</select>
<insert id="addYwpj">
insert into ywpj(pjId, ywh, djxlbm, djxlmc, sqr, zjhm, userId, sqrq, slzt) values
(#{pjId}, #{ywh}, #{djxlbm}, #{djxlmc}, #{sqr}, #{zjhm}, #{userId}, #{sqrq}, #{slzt})
</insert>
<!-- 评价状态变更 业务办理时 slzt=1 提交业务时slzt=2 返回时slzt=0 -->
<update id="updatePjslzt">
update ywpj set slzt = #{slzt} where ywh = #{ywh}
</update>
<select id="getYwpjIdByYwh" resultType="String">
select pjId from ywpj where ywh = #{ywh}
</select>
<!-- 获取所有的userId -->
<select id="getAllUserId" resultType="String">
select userId from cwuser where yxbz = '1'
</select>
<!-- 获取评价数据 -->
<select id="getPjfsByUserId" resultType="Integer">
select count(*) from ywpj y
where y.userId = #{userId}
and y.mycd = #{mycd}
and sqrq > to_date(#{qssj},'yyyy-MM')
and sqrq < to_date(#{jssj},'yyyy-MM')
and y.slzt = '3'
</select>
<!-- 获取当前用户所有的评价信息 -->
<select id="findList" resultType="Ywpj">
select * from ywpj
where 1 = 1
<if test="userId != null and userId != ''">
and userid = #{userId}
</if>
<if test="slzt != null and slzt != ''">
and slzt = #{slzt}
</if>
order by ywh desc
</select>
</mapper>