Commit b72dab68 authored by tianbo's avatar tianbo

fix(jg): 修正使用登记证编号重复性校验逻辑

- 将数据源判断从精确匹配改为前缀匹配,以兼容历史数据源标识
parent d0895432
......@@ -285,7 +285,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
private void beforeCheckForUseOrgCode(IdxBizJgUseInfo useInfoOld, IdxBizJgRegisterInfo registerInfoNew) {
// 1.使用登记证编辑时重复性校验
if (!CylinderTypeEnum.CYLINDER.getCode().equals(registerInfoNew.getEquCategory())) { // 非气瓶逻辑,所有设备不能重复
if (useInfoOld.getDataSource().equals("jg_his") && StringUtils.isNotEmpty(registerInfoNew.getUseOrgCode())) {
if (useInfoOld.getDataSource().startsWith("jg_his") && StringUtils.isNotEmpty(registerInfoNew.getUseOrgCode())) {
Boolean isUsed = commonEquipDataProcessService.getCommonService().useRegistrationCertificateAccountUnique(registerInfoNew.getUseOrgCode(), useInfoOld.getRecord());
if (isUsed) {
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