Commit 1cade3c0 authored by 刘林's avatar 刘林

fix(jg):增补功能修改

parent afaccfa3
...@@ -668,13 +668,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -668,13 +668,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
} }
if (CylinderTypeEnum.CYLINDER.getCode().equals(map.get("EQU_CATEGORY_CODE"))) { if (CylinderTypeEnum.CYLINDER.getCode().equals(map.get("EQU_CATEGORY_CODE"))) {
// 检验企业是否已存在瓶30的证
boolean hasExistingCertificate = this.baseMapper.selectList( boolean hasExistingCertificate = this.baseMapper.selectList(
new LambdaQueryWrapper<JgUseRegistration>() new LambdaQueryWrapper<JgUseRegistration>()
.eq(JgUseRegistration::getUseUnitCreditCode, company.getCompanyCode()) .eq(JgUseRegistration::getUseUnitCreditCode, company.getCompanyCode())
.eq(JgUseRegistration::getIsDelete, false) .eq(JgUseRegistration::getIsDelete, false)
.ne(JgUseRegistration::getStatus, "已作废") .ne(JgUseRegistration::getStatus, "已作废")
).stream().anyMatch(v -> v.getUseRegistrationCode().contains("瓶30")); ).stream()
.filter(Objects::nonNull)
.anyMatch(v -> v.getUseRegistrationCode().contains("瓶30"));
if (hasExistingCertificate) { if (hasExistingCertificate) {
throw new BadRequest("该企业已存在气瓶证书,请选择增补功能进行登记!"); 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