优化生成案件编号规则功能

This commit is contained in:
qitz
2023-12-19 14:01:56 +08:00
parent 45f30d2dbc
commit 60561da44d
5 changed files with 55 additions and 2 deletions
@@ -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>