Commit c0b2e138 authored by 刘林's avatar 刘林

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

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