Commit c0b2e138 authored by 刘林's avatar 刘林

fix(jg):96333重复问题修复,处理错误数据接口开发

parent 5c60a6ff
...@@ -61,9 +61,8 @@ public interface CategoryOtherInfoMapper extends BaseMapper<CategoryOtherInfo> { ...@@ -61,9 +61,8 @@ public interface CategoryOtherInfoMapper extends BaseMapper<CategoryOtherInfo> {
/** /**
* 查询电梯码是否重复 * 查询电梯码是否重复
* @param elevatorCode 96333 * @param elevatorCode 96333
* @param status 0 手动输入
* @return 0 * @return 0
*/ */
Integer checkElevatorCodeRepeat(@Param("elevatorCode") String elevatorCode, String status); Integer checkElevatorCodeRepeat(@Param("elevatorCode") String elevatorCode);
} }
...@@ -197,8 +197,7 @@ ...@@ -197,8 +197,7 @@
<select id="checkElevatorCodeRepeat" resultType="java.lang.Integer"> <select id="checkElevatorCodeRepeat" resultType="java.lang.Integer">
SELECT CODE96333 code SELECT CODE96333 code
FROM biz_jg_supervisory_code FROM biz_jg_supervisory_code
WHERE CODE96333 = #{elevatorCode} and create_status = #{status} WHERE CODE96333 = #{elevatorCode}
ORDER BY code ORDER BY code
</select> </select>
</mapper> </mapper>
...@@ -906,7 +906,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -906,7 +906,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Integer repeatCheck; Integer repeatCheck;
do { do {
newCode = generateCodeService.createElevatorCode("96333_" + prefix); newCode = generateCodeService.createElevatorCode("96333_" + prefix);
repeatCheck = categoryOtherInfoMapper.checkElevatorCodeRepeat(newCode, "0"); repeatCheck = categoryOtherInfoMapper.checkElevatorCodeRepeat(newCode);
} while (repeatCheck != null && repeatCheck > 0); } while (repeatCheck != null && repeatCheck > 0);
elevatorCode = new StringBuilder(newCode); elevatorCode = new StringBuilder(newCode);
} }
......
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