wuxw
2021-04-23 fdf45f690fa4eca9191aa0fb6abf077e7b36ce06
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?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="workflowAuditMessageServiceDaoImpl">
 
 
    <!-- 保存流程审核表信息 add by wuxw 2018-07-03 -->
    <insert id="saveWorkflowAuditMessageInfo" parameterType="Map">
        insert into workflow_audit_message(
        audit_id,pre_audit_id,business_key,audit_person_id,audit_person,share_id,state,business_type,message,share_type,audit_link
        ) values (
        #{auditId},#{preAuditId},#{businessKey},#{auditPersonId},#{auditPerson},#{shareId},#{state},#{businessType},#{message},#{shareType},#{auditLink}
        )
    </insert>
 
 
    <!-- 查询流程审核表信息 add by wuxw 2018-07-03 -->
    <select id="getWorkflowAuditMessageInfo" parameterType="Map" resultType="Map">
        select t.audit_id,t.audit_id auditId,t.pre_audit_id,t.pre_audit_id preAuditId,t.business_key,t.business_key
        businessKey,t.audit_person_id,t.audit_person_id auditPersonId,t.audit_person,t.audit_person
        auditPerson,t.share_id,t.share_id shareId,t.status_cd,t.status_cd
        statusCd,t.state,t.business_type,t.business_type businessType,t.message,t.share_type,t.share_type
        shareType,t.audit_link,t.audit_link auditLink
        from workflow_audit_message t
        where 1 =1
        <if test="auditId !=null and auditId != ''">
            and t.audit_id= #{auditId}
        </if>
        <if test="preAuditId !=null and preAuditId != ''">
            and t.pre_audit_id= #{preAuditId}
        </if>
        <if test="businessKey !=null and businessKey != ''">
            and t.business_key= #{businessKey}
        </if>
        <if test="auditPersonId !=null and auditPersonId != ''">
            and t.audit_person_id= #{auditPersonId}
        </if>
        <if test="auditPerson !=null and auditPerson != ''">
            and t.audit_person= #{auditPerson}
        </if>
        <if test="shareId !=null and shareId != ''">
            and t.share_id= #{shareId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="businessType !=null and businessType != ''">
            and t.business_type= #{businessType}
        </if>
        <if test="message !=null and message != ''">
            and t.message= #{message}
        </if>
        <if test="shareType !=null and shareType != ''">
            and t.share_type= #{shareType}
        </if>
        <if test="auditLink !=null and auditLink != ''">
            and t.audit_link= #{auditLink}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
 
    </select>
 
 
    <!-- 修改流程审核表信息 add by wuxw 2018-07-03 -->
    <update id="updateWorkflowAuditMessageInfo" parameterType="Map">
        update workflow_audit_message t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="preAuditId !=null and preAuditId != ''">
            , t.pre_audit_id= #{preAuditId}
        </if>
        <if test="businessKey !=null and businessKey != ''">
            , t.business_key= #{businessKey}
        </if>
        <if test="auditPersonId !=null and auditPersonId != ''">
            , t.audit_person_id= #{auditPersonId}
        </if>
        <if test="auditPerson !=null and auditPerson != ''">
            , t.audit_person= #{auditPerson}
        </if>
        <if test="shareId !=null and shareId != ''">
            , t.share_id= #{shareId}
        </if>
        <if test="state !=null and state != ''">
            , t.state= #{state}
        </if>
        <if test="businessType !=null and businessType != ''">
            , t.business_type= #{businessType}
        </if>
        <if test="message !=null and message != ''">
            , t.message= #{message}
        </if>
        <if test="shareType !=null and shareType != ''">
            , t.share_type= #{shareType}
        </if>
        <if test="auditLink !=null and auditLink != ''">
            , t.audit_link= #{auditLink}
        </if>
        where 1=1
        <if test="auditId !=null and auditId != ''">
            and t.audit_id= #{auditId}
        </if>
 
    </update>
 
    <!-- 查询流程审核表数量 add by wuxw 2018-07-03 -->
    <select id="queryWorkflowAuditMessagesCount" parameterType="Map" resultType="Map">
        select count(1) count
        from workflow_audit_message t
        where 1 =1
        <if test="auditId !=null and auditId != ''">
            and t.audit_id= #{auditId}
        </if>
        <if test="preAuditId !=null and preAuditId != ''">
            and t.pre_audit_id= #{preAuditId}
        </if>
        <if test="businessKey !=null and businessKey != ''">
            and t.business_key= #{businessKey}
        </if>
        <if test="auditPersonId !=null and auditPersonId != ''">
            and t.audit_person_id= #{auditPersonId}
        </if>
        <if test="auditPerson !=null and auditPerson != ''">
            and t.audit_person= #{auditPerson}
        </if>
        <if test="shareId !=null and shareId != ''">
            and t.share_id= #{shareId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="businessType !=null and businessType != ''">
            and t.business_type= #{businessType}
        </if>
        <if test="message !=null and message != ''">
            and t.message= #{message}
        </if>
        <if test="shareType !=null and shareType != ''">
            and t.share_type= #{shareType}
        </if>
        <if test="auditLink !=null and auditLink != ''">
            and t.audit_link= #{auditLink}
        </if>
 
 
    </select>
 
</mapper>