优化生成案件编号规则功能
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
</delete>
|
||||
|
||||
<select id="selectCaseNumRules" parameterType="CaseNumRule" resultMap="BaseResultMap">
|
||||
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar
|
||||
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
|
||||
FROM case_num_rule
|
||||
<where>
|
||||
<if test="deptNameFirchar != null and deptNameFirchar != ''">
|
||||
@@ -67,4 +67,38 @@
|
||||
|
||||
|
||||
|
||||
<select id="countCaseNumRule" resultType="Integer">
|
||||
select count(1) from case_num_rule c
|
||||
<where>
|
||||
<if test="prefixstr != null and prefixstr != '' ">
|
||||
AND c.prefixstr = #{prefixstr}
|
||||
</if>
|
||||
<if test="ruleType != null ">
|
||||
AND c.rule_type = #{ruleType}
|
||||
</if>
|
||||
<if test="dateFormat != null ">
|
||||
AND c.date_format = #{dateFormat}
|
||||
</if>
|
||||
<if test="deptName != null and deptName != '' ">
|
||||
AND c.dept_name = #{deptName}
|
||||
</if>
|
||||
<if test="deptNameFirchar != null and deptNameFirchar != '' ">
|
||||
AND c.dept_name_firchar = #{deptNameFirchar}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCaseNumRule" parameterType="CaseNumRule" resultMap="BaseResultMap">
|
||||
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
|
||||
FROM case_num_rule
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user