动态数据管理模块bug修改

This commit is contained in:
hanqi 2025-06-20 16:55:05 +08:00
parent 4c808a37ae
commit ca7f31e21c
3 changed files with 8 additions and 2 deletions

View File

@ -151,6 +151,7 @@ const handleChange = (val) => {
const selectedEnterprise = enterprises.value.find(enterprise => enterprise.enterpriseId === val)
selectedEnterprises = selectedEnterprise ? [selectedEnterprise] : []
}
// change
emit('change', props.multiple ? selectedEnterprises : (selectedEnterprises[0] || null))
}

View File

@ -74,7 +74,9 @@ public class EnterpriseAuditService {
if ("update".equals(type)) {
EnterpriseAudit audit = enterpriseAuditRepo.findById(enterpriseId).orElseThrow(() -> new RuntimeException("单位信息不存在"));
String unifiedSocialCode = enterpriseAudit.getUnifiedSocialCode();
ion("社会统一信用代码【" + unifiedSocialCode + "】在企业上报审核/企业信息管理已存在");
if (enterpriseAuditRepo.existsByUnifiedSocialCodeAndDelFlagAndEnterpriseIdNot(unifiedSocialCode, (short) 0, enterpriseId)
|| enterpriseRepo.existsByUnifiedSocialCodeAndDelFlag(unifiedSocialCode, (short) 0))
throw new RuntimeException("社会统一信用代码【" + unifiedSocialCode + "】在企业上报审核/企业信息管理已存在");
String legalPhone = enterpriseAudit.getLegalPhone();
if (enterpriseAuditRepo.existsByLegalPhoneAndDelFlagAndEnterpriseIdNot(legalPhone, (short) 0, enterpriseId)
|| enterpriseRepo.existsByLegalPhoneAndDelFlag(legalPhone, (short) 0))

View File

@ -80,7 +80,10 @@ public class EnterpriseService {
if ("update".equals(enterprise.getOperate())) {
String unifiedSocialCode = enterprise.getUnifiedSocialCode();
String enterpriseId = enterprise.getEnterpriseId();
oneAndDelFlagAndEnterpriseIdNot(legalPhone, (short) 0, enterpriseId))
if (enterpriseRepo.existsByUnifiedSocialCodeAndDelFlagAndEnterpriseIdNot(unifiedSocialCode, (short) 0, enterpriseId))
throw new RuntimeException("社会统一信用代码【" + unifiedSocialCode + "】在企业信息管理已存在");
String legalPhone = enterprise.getLegalPhone();
if (enterpriseRepo.existsByLegalPhoneAndDelFlagAndEnterpriseIdNot(legalPhone, (short) 0, enterpriseId))
throw new RuntimeException("联系电话【" + legalPhone + "】在企业上报审核/企业信息管理已存在");
Optional<Enterprise> optional = enterpriseRepo.findById(enterpriseId);
if (optional.isPresent()) {