Commit 95d97da2 authored by 韩桐桐's avatar 韩桐桐

fix(jg):车用出厂编号/产品编码 在编辑时不校验唯一性

parent 5821a3fe
......@@ -102,6 +102,6 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
* @param factoryNum
* @return
*/
Integer checkFactoryNumUniquenessForVehicleCylinder(String factoryNum);
Integer checkFactoryNumUniquenessForVehicleCylinder(String factoryNum,String sequenceNbr);
}
......@@ -847,5 +847,8 @@
AND "EQU_DEFINE" = '23T0'
AND "WHETHER_VEHICLE_CYLINDER" = '1' )
AND "FACTORY_NUM" = #{factoryNum}
<if test="sequenceNbr != null and sequenceNbr !=''">
AND "SEQUENCE_NBR" <![CDATA[ <> ]]> #{sequenceNbr}
</if>
</select>
</mapper>
......@@ -246,7 +246,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private void checkFactoryNumUniqueness(LinkedHashMap equipmentInfoForm) {
// 车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)
Integer factoryNum = commonMapper.checkFactoryNumUniquenessForVehicleCylinder((String) equipmentInfoForm.get(FACTORY_NUM));
Integer factoryNum = commonMapper.checkFactoryNumUniquenessForVehicleCylinder((String) equipmentInfoForm.get(FACTORY_NUM), (String) equipmentInfoForm.get(SEQUENCE_NBR));
if (factoryNum > 0) {
throw new BadRequest("出厂编号/产品编码 已存在,请重新输入!");
}
......
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