企业信息管理、企业信息查询前后端接口调试

This commit is contained in:
yuyan02 2025-06-20 16:54:06 +08:00
parent 016a958418
commit 4c808a37ae
3 changed files with 2 additions and 8 deletions

View File

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

View File

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