Commit f4ee6999 authored by tianyiming's avatar tianyiming

1、一码通96333码空区间问题

2、一码通多线程校验code重复问题
parent 78d24a5d
...@@ -50,7 +50,7 @@ public enum EquipmentCategoryEnum { ...@@ -50,7 +50,7 @@ public enum EquipmentCategoryEnum {
static { static {
for (EquipmentCategoryEnum e : EquipmentCategoryEnum.values()) { for (EquipmentCategoryEnum e : EquipmentCategoryEnum.values()) {
getName.put(e.code, e.name); getName.put(e.code, e.name);
getCode.put(e.name, e.code); getCode.put(e.value, e.code);
getValue.put(e.value, e.code); getValue.put(e.value, e.code);
} }
......
...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.CategoryOtherInfo; ...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.CategoryOtherInfo;
import lombok.NonNull; import lombok.NonNull;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -39,4 +40,8 @@ public interface CategoryOtherInfoMapper extends BaseMapper<CategoryOtherInfo> { ...@@ -39,4 +40,8 @@ public interface CategoryOtherInfoMapper extends BaseMapper<CategoryOtherInfo> {
@Param("equCode") String equCode, @Param("equCode") String equCode,
@Param("useOrgCode") String useOrgCode, @Param("useOrgCode") String useOrgCode,
@Param("record") String record); @Param("record") String record);
List<Integer> selectExceedElevatorCodeList(Integer start,String prefix);
Integer selectCode(Integer start, Integer end, String prefix);
} }
...@@ -128,4 +128,27 @@ ...@@ -128,4 +128,27 @@
) AS code ) AS code
</if> </if>
</select> </select>
<select id="selectExceedElevatorCodeList" resultType="java.lang.Integer">
SELECT CODE96333 code
FROM biz_jg_supervisory_code bjsc
WHERE code LIKE CONCAT(#{prefix}, '%')
<if test="start != null and start != ''">
AND code <![CDATA[ >= ]]> #{start}
</if>
ORDER BY code
</select>
<select id="selectCode" resultType="java.lang.Integer">
SELECT
generate_series AS missing_numbers
FROM
generate_series ( #{start}, #{end} )
LEFT JOIN ( SELECT code96333 code FROM biz_jg_supervisory_code WHERE code96333 LIKE CONCAT ( #{prefix}, '%' ) ) asd ON generate_series = asd.code
WHERE
asd.code IS NULL
ORDER BY
generate_series
LIMIT 1
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment