fix(sip): 修复生成订单编码异常问题
- 优化了 selectMaxOrderCode 查询,使用动态长度计算订单编码的起始位置 - 提高了代码的灵活性和鲁棒性,避免了固定长度带来的潜在问题master
parent
ab440f6896
commit
d2eb5e8f9b
|
@ -95,12 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</select>
|
||||
<select id="selectMaxOrderCode" resultType="java.lang.Integer">
|
||||
select ifnull( max(SUBSTR( order_code FROM 16 FOR 3 )), 0 )
|
||||
select ifnull( max(SUBSTR( order_code FROM LENGTH(#{province})+1 FOR 3 )), 0 )
|
||||
from project_order_info
|
||||
where order_code like concat(#{province}, '%')
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
<select id="selectAgentProvinceByProjectId" resultType="java.lang.String">
|
||||
select t2.province
|
||||
|
|
Loading…
Reference in New Issue