|
|
@@ -56,7 +56,7 @@
|
|
56
|
56
|
</delete>
|
|
57
|
57
|
|
|
58
|
58
|
<select id="selectCaseNumRules" parameterType="CaseNumRule" resultMap="BaseResultMap">
|
|
59
|
|
- SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar
|
|
|
59
|
+ SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
|
|
60
|
60
|
FROM case_num_rule
|
|
61
|
61
|
<where>
|
|
62
|
62
|
<if test="deptNameFirchar != null and deptNameFirchar != ''">
|
|
|
@@ -67,4 +67,38 @@
|
|
67
|
67
|
|
|
68
|
68
|
|
|
69
|
69
|
|
|
|
70
|
+ <select id="countCaseNumRule" resultType="Integer">
|
|
|
71
|
+ select count(1) from case_num_rule c
|
|
|
72
|
+ <where>
|
|
|
73
|
+ <if test="prefixstr != null and prefixstr != '' ">
|
|
|
74
|
+ AND c.prefixstr = #{prefixstr}
|
|
|
75
|
+ </if>
|
|
|
76
|
+ <if test="ruleType != null ">
|
|
|
77
|
+ AND c.rule_type = #{ruleType}
|
|
|
78
|
+ </if>
|
|
|
79
|
+ <if test="dateFormat != null ">
|
|
|
80
|
+ AND c.date_format = #{dateFormat}
|
|
|
81
|
+ </if>
|
|
|
82
|
+ <if test="deptName != null and deptName != '' ">
|
|
|
83
|
+ AND c.dept_name = #{deptName}
|
|
|
84
|
+ </if>
|
|
|
85
|
+ <if test="deptNameFirchar != null and deptNameFirchar != '' ">
|
|
|
86
|
+ AND c.dept_name_firchar = #{deptNameFirchar}
|
|
|
87
|
+ </if>
|
|
|
88
|
+
|
|
|
89
|
+ </where>
|
|
|
90
|
+ </select>
|
|
|
91
|
+
|
|
|
92
|
+ <select id="selectCaseNumRule" parameterType="CaseNumRule" resultMap="BaseResultMap">
|
|
|
93
|
+ SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
|
|
|
94
|
+ FROM case_num_rule
|
|
|
95
|
+ <where>
|
|
|
96
|
+ <if test="id != null ">
|
|
|
97
|
+ AND id = #{id}
|
|
|
98
|
+ </if>
|
|
|
99
|
+ </where>
|
|
|
100
|
+ </select>
|
|
|
101
|
+
|
|
|
102
|
+
|
|
|
103
|
+
|
|
70
|
104
|
</mapper>
|