Browse Source

Merge branch 'master_20240722' of http://git.dgtis.com/15896567520/oneportal_saas into master_20240722

zhaopeiqing 7 months ago
parent
commit
4b7b4614db
18 changed files with 225 additions and 41 deletions
  1. 31 0
      yudao-module-customer/yudao-module-customer-api/src/main/java/cn/iocoder/yudao/module/customer/api/info/CustomerInfoApi.java
  2. 21 0
      yudao-module-customer/yudao-module-customer-api/src/main/java/cn/iocoder/yudao/module/customer/api/info/dto/CustomerInfoDTO.java
  3. 1 1
      yudao-module-customer/yudao-module-customer-api/src/main/java/cn/iocoder/yudao/module/employee/enums/ErrorCodeConstants.java
  4. 0 11
      yudao-module-customer/yudao-module-customer-api/src/main/java/cn/iocoder/yudao/module/employee/api/CustomerApi.java
  5. 0 14
      yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/api/info/CustomerApiImpl.java
  6. 40 0
      yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/api/info/CustomerInfoApiImpl.java
  7. 9 0
      yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/info/CustomerInfoController.java
  8. 37 0
      yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/info/vo/CustomerInfoListRespVO.java
  9. 1 3
      yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/service/businessopportunity/CustomerBusinessOpportunityServiceImpl.java
  10. 23 4
      yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/service/info/CustomerInfoService.java
  11. 14 6
      yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/service/info/CustomerInfoServiceImpl.java
  12. 2 0
      yudao-module-finance/yudao-module-contract-api/src/main/java/cn/iocoder/yudao/module/contract/enums/ErrorCodeConstants.java
  13. 5 0
      yudao-module-finance/yudao-module-contract-biz/pom.xml
  14. 14 0
      yudao-module-finance/yudao-module-contract-biz/src/main/java/cn/iocoder/yudao/module/contract/controller/admin/customercontract/CustomerContractController.java
  15. 13 0
      yudao-module-finance/yudao-module-contract-biz/src/main/java/cn/iocoder/yudao/module/contract/service/customercontract/CustomerContractServiceImpl.java
  16. 12 0
      yudao-module-finance/yudao-module-contract-biz/src/main/java/cn/iocoder/yudao/module/contract/service/suppliercontract/SupplierContractServiceImpl.java
  17. 2 1
      yudao-module-finance/yudao-module-contract-biz/src/main/resources/mapper/customercontract/CustomerContractMapper.xml
  18. 0 1
      yudao-module-personnel/yudao-module-employee-biz/src/main/java/cn/iocoder/yudao/module/employee/service/info/EmployeeInfoServiceImpl.java

+ 31 - 0
yudao-module-customer/yudao-module-customer-api/src/main/java/cn/iocoder/yudao/module/customer/api/info/CustomerInfoApi.java

@@ -0,0 +1,31 @@
+package cn.iocoder.yudao.module.customer.api.info;
+
+
+import cn.iocoder.yudao.module.customer.api.info.dto.CustomerInfoDTO;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 客户 API 接口
+ *
+ * @author zhaopq
+ */
+public interface CustomerInfoApi {
+
+    /**
+     * 获得客户信息列表,包括开启的和关闭的
+     *
+     * @param ids 客户信息id集合
+     * @return 客户信息列表
+     */
+    List<CustomerInfoDTO> getCustomerInfoList(Collection<Long> ids);
+
+    /**
+     * 获得客户信息
+     *
+     * @param id 客户信息id
+     * @return 客户信息
+     */
+    CustomerInfoDTO getCustomerInfo(Long id);
+}

+ 21 - 0
yudao-module-customer/yudao-module-customer-api/src/main/java/cn/iocoder/yudao/module/customer/api/info/dto/CustomerInfoDTO.java

@@ -0,0 +1,21 @@
+package cn.iocoder.yudao.module.customer.api.info.dto;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class CustomerInfoDTO {
+    /**
+     * 自增主键
+     */
+    private Long id;
+    /**
+     * 客户编码
+     */
+    private String customerCode;
+    /**
+     * 客户名称
+     */
+    private String customerName;
+}

+ 1 - 1
yudao-module-customer/yudao-module-customer-api/src/main/java/cn/iocoder/yudao/module/employee/enums/ErrorCodeConstants.java

@@ -1,4 +1,4 @@
-package cn.iocoder.yudao.module.employee.enums;
+package cn.iocoder.yudao.module.customer.enums;
 
 import cn.iocoder.yudao.framework.common.exception.ErrorCode;
 

+ 0 - 11
yudao-module-customer/yudao-module-customer-api/src/main/java/cn/iocoder/yudao/module/employee/api/CustomerApi.java

@@ -1,11 +0,0 @@
-package cn.iocoder.yudao.module.employee.api;
-
-
-/**
- * 客户 API 接口
- *
- * @author zhaopq
- */
-public interface CustomerApi {
-
-}

+ 0 - 14
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/api/info/CustomerApiImpl.java

@@ -1,14 +0,0 @@
-package cn.iocoder.yudao.module.customer.api.info;
-
-import cn.iocoder.yudao.module.employee.api.CustomerApi;
-import org.springframework.stereotype.Service;
-
-/**
- * 客户 API 实现类
- *
- * @author zhaopq
- */
-@Service
-public class CustomerApiImpl implements CustomerApi {
-
-}

+ 40 - 0
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/api/info/CustomerInfoApiImpl.java

@@ -0,0 +1,40 @@
+package cn.iocoder.yudao.module.customer.api.info;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.module.customer.api.info.dto.CustomerInfoDTO;
+import cn.iocoder.yudao.module.customer.dal.dataobject.info.CustomerInfoDO;
+import cn.iocoder.yudao.module.customer.service.info.CustomerInfoService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 客户 API 实现类
+ *
+ * @author zhaopq
+ */
+@Service
+public class CustomerInfoApiImpl implements CustomerInfoApi {
+
+    @Resource
+    private CustomerInfoService customerInfoService;
+
+    @Override
+    public List<CustomerInfoDTO> getCustomerInfoList(Collection<Long> ids) {
+        if (CollUtil.isEmpty(ids)) {
+            return Collections.emptyList();
+        }
+        List<CustomerInfoDO> customerInfoDOList = customerInfoService.getCustomerInfoList(ids);
+        return BeanUtils.toBean(customerInfoDOList, CustomerInfoDTO.class);
+    }
+
+    @Override
+    public CustomerInfoDTO getCustomerInfo(Long id) {
+        CustomerInfoDO customerInfoDO = customerInfoService.getInfo(id);
+        return BeanUtils.toBean(customerInfoDO, CustomerInfoDTO.class);
+    }
+}

+ 9 - 0
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/info/CustomerInfoController.java

@@ -146,4 +146,13 @@ public class CustomerInfoController {
         return success(result);
     }
 
+    @GetMapping("/listForSelect")
+    @Operation(summary = "获得客户信息列表,用于其他模块选择或查询客户")
+    @Parameter(name = "isOpen", description = "是否开启:0开启1关闭,不传参数时查询所有", required = false)
+    // @PreAuthorize("@ss.hasPermission('customer:info:query')")
+    public CommonResult<List<CustomerInfoListRespVO>> getInfoListForSelect(@RequestParam(value = "isOpen", required = false) Integer isOpen) {
+        List<CustomerInfoDO> customerInfoDOListForSelect = infoService.getCustomerInfoListForSelect(isOpen);
+        return success(BeanUtils.toBean(customerInfoDOListForSelect, CustomerInfoListRespVO.class));
+    }
+
 }

+ 37 - 0
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/info/vo/CustomerInfoListRespVO.java

@@ -0,0 +1,37 @@
+package cn.iocoder.yudao.module.customer.controller.admin.info.vo;
+
+import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Schema(description = "客户列表信息 Response VO")
+@Data
+public class CustomerInfoListRespVO {
+
+    /**
+     * 主键id
+     */
+    private Long id;
+
+    /**
+     * 客户编码
+     */
+    private String customerCode;
+
+    /**
+     * 客户名称
+     */
+    private String customerName;
+
+    /**
+     * 是否开启 0开启1关闭
+     */
+    private Integer isOpen;
+
+}

+ 1 - 3
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/service/businessopportunity/CustomerBusinessOpportunityServiceImpl.java

@@ -16,7 +16,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -24,13 +23,12 @@ import java.util.*;
 import cn.iocoder.yudao.module.customer.controller.admin.businessopportunity.vo.*;
 import cn.iocoder.yudao.module.customer.dal.dataobject.businessopportunity.CustomerBusinessOpportunityDO;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 
 import cn.iocoder.yudao.module.customer.dal.mysql.businessopportunity.CustomerBusinessOpportunityMapper;
 
 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
-import static cn.iocoder.yudao.module.employee.enums.ErrorCodeConstants.CUSTOMER_BUSINESS_OPPORTUNITY_NOT_EXISTS;
+import static cn.iocoder.yudao.module.customer.enums.ErrorCodeConstants.CUSTOMER_BUSINESS_OPPORTUNITY_NOT_EXISTS;
 
 /**
  * 客户商机 Service 实现类

+ 23 - 4
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/service/info/CustomerInfoService.java

@@ -1,10 +1,14 @@
 package cn.iocoder.yudao.module.customer.service.info;
 
-import javax.validation.*;
-
-import cn.iocoder.yudao.module.customer.controller.admin.info.vo.*;
-import cn.iocoder.yudao.module.customer.dal.dataobject.info.CustomerInfoDO;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.module.customer.controller.admin.info.vo.CustomerInfoPageReqVO;
+import cn.iocoder.yudao.module.customer.controller.admin.info.vo.CustomerInfoRespVO;
+import cn.iocoder.yudao.module.customer.controller.admin.info.vo.CustomerInfoSaveReqVO;
+import cn.iocoder.yudao.module.customer.dal.dataobject.info.CustomerInfoDO;
+
+import javax.validation.Valid;
+import java.util.Collection;
+import java.util.List;
 
 /**
  * 客户信息 Service 接口
@@ -75,4 +79,19 @@ public interface CustomerInfoService {
      */
     void updateOpenStatus(Long id, Integer status);
 
+    /**
+     * 根据id集合获得客户信息列表,,包括开启的和关闭的
+     *
+     * @param ids 客户信息id集合
+     * @return 客户信息列表
+     */
+    List<CustomerInfoDO> getCustomerInfoList(Collection<Long> ids);
+
+    /**
+     * 获得客户信息列表,用于其他模块
+     *
+     * @param isOpen 是否开启 0开启 1关闭
+     * @return 客户信息列表
+     */
+    List<CustomerInfoDO> getCustomerInfoListForSelect(Integer isOpen);
 }

+ 14 - 6
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/service/info/CustomerInfoServiceImpl.java

@@ -4,19 +4,17 @@ import cn.hutool.core.util.IdUtil;
 import cn.iocoder.yudao.framework.security.core.LoginUser;
 import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
 import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
-import cn.iocoder.yudao.module.customer.controller.admin.businessopportunity.vo.CustomerBusinessOpportunityRespVO;
-import cn.iocoder.yudao.module.customer.dal.dataobject.businessopportunity.CustomerBusinessOpportunityDO;
 import cn.iocoder.yudao.module.employee.api.EmployeeApi;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -24,14 +22,12 @@ import java.util.*;
 import cn.iocoder.yudao.module.customer.controller.admin.info.vo.*;
 import cn.iocoder.yudao.module.customer.dal.dataobject.info.CustomerInfoDO;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 
 import cn.iocoder.yudao.module.customer.dal.mysql.info.CustomerInfoMapper;
 
 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
-import static cn.iocoder.yudao.module.employee.enums.ErrorCodeConstants.CUSTOMER_BUSINESS_OPPORTUNITY_NOT_EXISTS;
-import static cn.iocoder.yudao.module.employee.enums.ErrorCodeConstants.CUSTOMER_INFO_NOT_EXISTS;
+import static cn.iocoder.yudao.module.customer.enums.ErrorCodeConstants.CUSTOMER_INFO_NOT_EXISTS;
 
 /**
  * 客户信息 Service 实现类
@@ -180,4 +176,16 @@ public class CustomerInfoServiceImpl implements CustomerInfoService {
         infoMapper.updateById(updateObj);
     }
 
+    @Override
+    public List<CustomerInfoDO> getCustomerInfoList(Collection<Long> ids) {
+        return infoMapper.selectBatchIds(ids);
+    }
+
+    @Override
+    public List<CustomerInfoDO> getCustomerInfoListForSelect(Integer isOpen) {
+        LambdaQueryWrapper<CustomerInfoDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(isOpen != null, CustomerInfoDO::getIsOpen, isOpen);
+        return infoMapper.selectList(lambdaQueryWrapper);
+    }
+
 }

+ 2 - 0
yudao-module-finance/yudao-module-contract-api/src/main/java/cn/iocoder/yudao/module/contract/enums/ErrorCodeConstants.java

@@ -6,12 +6,14 @@ public interface ErrorCodeConstants {
     // ========== 采购合同信息 1_052_000_001 ==========
     ErrorCode SUPPLIER_CONTRACT_NOT_EXISTS = new ErrorCode(1_052_000_001, "采购合同信息不存在");
     ErrorCode SUPPLIER_CONTRACT_NOT_CLOSED = new ErrorCode(1_052_000_002, "采购合同已经是开启状态");
+    ErrorCode SUPPLIER_CONTRACT_CODE_EXISTS = new ErrorCode(1_052_000_003, "采购合同编号已存在");
     // ========== 采购合同历史信息 1_052_001_001 ==========
     ErrorCode SUPPLIER_CONTRACT_HISTORY_NOT_EXISTS = new ErrorCode(1_052_001_001, "采购合同历史信息不存在");
 
     // ========== 销售合同信息 1_052_002_001 ==========
     ErrorCode CUSTOMER_CONTRACT_NOT_EXISTS = new ErrorCode(1_052_002_001, "销售合同信息不存在");
     ErrorCode CUSTOMER_CONTRACT_NOT_CLOSED = new ErrorCode(1_052_002_002, "销售合同已经是开启状态");
+    ErrorCode CUSTOMER_CONTRACT_CODE_EXISTS = new ErrorCode(1_052_002_003, "销售合同编号已存在");
     // ========== 销售合同历史信息 1_052_003_001 ==========
     ErrorCode CUSTOMER_CONTRACT_HISTORY_NOT_EXISTS = new ErrorCode(1_052_003_001, "销售合同历史信息不存在");
 

+ 5 - 0
yudao-module-finance/yudao-module-contract-biz/pom.xml

@@ -38,6 +38,11 @@
             <artifactId>yudao-module-employee-api</artifactId>
             <version>${revision}</version>
         </dependency>
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-module-customer-api</artifactId>
+            <version>${revision}</version>
+        </dependency>
 
         <!-- 业务组件 -->
         <dependency>

+ 14 - 0
yudao-module-finance/yudao-module-contract-biz/src/main/java/cn/iocoder/yudao/module/contract/controller/admin/customercontract/CustomerContractController.java

@@ -12,6 +12,8 @@ import cn.iocoder.yudao.module.contract.dal.dataobject.customercontract.Customer
 import cn.iocoder.yudao.module.contract.dal.dataobject.customercontract.CustomerContractHistoryDO;
 import cn.iocoder.yudao.module.contract.enums.ContractStatusEnum;
 import cn.iocoder.yudao.module.contract.service.customercontract.CustomerContractService;
+import cn.iocoder.yudao.module.customer.api.info.CustomerInfoApi;
+import cn.iocoder.yudao.module.customer.api.info.dto.CustomerInfoDTO;
 import cn.iocoder.yudao.module.employee.api.EmployeeApi;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
@@ -57,6 +59,9 @@ public class CustomerContractController {
     @Resource
     private FileApi fileApi;
 
+    @Resource
+    private CustomerInfoApi customerInfoApi;
+
 
     @GetMapping("/getCustomerContractCode")
     @Operation(summary = "获取销售合同编号")
@@ -120,6 +125,15 @@ public class CustomerContractController {
         if (Objects.nonNull(ownerDept)) {
             customerContractRespVO.setDeptName(ownerDept.getName());
         }
+        // 客户名称
+        Long customerId = customerContract.getCustomerId();
+        if (customerId != null) {
+            CustomerInfoDTO customerInfo = customerInfoApi.getCustomerInfo(customerId);
+            if (customerInfo != null) {
+                customerContractRespVO.setCustomerName(customerInfo.getCustomerName());
+            }
+        }
+
         // 合同状态描述
         Map<String, String> contractStatusMap = Arrays.stream(ContractStatusEnum.values())
                 .collect(Collectors.toMap(ContractStatusEnum::getStatus, ContractStatusEnum::getDesc));

+ 13 - 0
yudao-module-finance/yudao-module-contract-biz/src/main/java/cn/iocoder/yudao/module/contract/service/customercontract/CustomerContractServiceImpl.java

@@ -1,6 +1,7 @@
 package cn.iocoder.yudao.module.contract.service.customercontract;
 
 import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
 import cn.iocoder.yudao.framework.common.enums.GeneralStatusEnum;
 import cn.iocoder.yudao.framework.common.exception.ErrorCode;
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
@@ -24,6 +25,7 @@ import org.springframework.validation.annotation.Validated;
 import javax.annotation.Resource;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.ConcurrentModificationException;
 import java.util.List;
 import java.util.Objects;
 
@@ -68,6 +70,10 @@ public class CustomerContractServiceImpl implements CustomerContractService {
         if (Objects.isNull(loginEmployee)) {
             throw exception(new ErrorCode(EMPLOYEE_INFO_NOT_EXISTS.getCode(), "登录用户员工信息不存在"));
         }
+        String customerContractCode = createReqVO.getCustomerContractCode();
+        if (StrUtil.isNotBlank(customerContractCode)) {
+            validateCustomerContractCode(customerContractCode);
+        }
         // 插入
         CustomerContractDO customerContract = BeanUtils.toBean(createReqVO, CustomerContractDO.class);
         // uuid
@@ -105,6 +111,13 @@ public class CustomerContractServiceImpl implements CustomerContractService {
         return customerContract.getId();
     }
 
+    private void validateCustomerContractCode(String customerContractCode) {
+        Long aLong = customerContractMapper.selectCount(CustomerContractDO::getCustomerContractCode, customerContractCode);
+        if (aLong > 0) {
+            throw exception(CUSTOMER_CONTRACT_CODE_EXISTS);
+        }
+    }
+
     @Override
     public void updateCustomerContract(CustomerContractSaveReqVO updateReqVO) {
         // 校验存在

+ 12 - 0
yudao-module-finance/yudao-module-contract-biz/src/main/java/cn/iocoder/yudao/module/contract/service/suppliercontract/SupplierContractServiceImpl.java

@@ -1,6 +1,7 @@
 package cn.iocoder.yudao.module.contract.service.suppliercontract;
 
 import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
 import cn.iocoder.yudao.framework.common.enums.GeneralStatusEnum;
 import cn.iocoder.yudao.framework.common.exception.ErrorCode;
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
@@ -68,6 +69,10 @@ public class SupplierContractServiceImpl implements SupplierContractService {
         if (Objects.isNull(loginEmployee)) {
             throw exception(new ErrorCode(EMPLOYEE_INFO_NOT_EXISTS.getCode(), "登录用户员工信息不存在"));
         }
+        String supplierContractCode = createReqVO.getSupplierContractCode();
+        if (StrUtil.isNotBlank(supplierContractCode)) {
+            validateSupplierContractCode(supplierContractCode);
+        }
         // 插入
         SupplierContractDO supplierContract = BeanUtils.toBean(createReqVO, SupplierContractDO.class);
         // uuid
@@ -105,6 +110,13 @@ public class SupplierContractServiceImpl implements SupplierContractService {
         return supplierContract.getId();
     }
 
+    private void validateSupplierContractCode(String supplierContractCode) {
+        Long aLong = supplierContractMapper.selectCount(SupplierContractDO::getSupplierContractCode, supplierContractCode);
+        if (aLong > 0) {
+            throw exception(SUPPLIER_CONTRACT_CODE_EXISTS);
+        }
+    }
+
     @Override
     public void updateSupplierContract(SupplierContractSaveReqVO updateReqVO) {
         // 校验存在

+ 2 - 1
yudao-module-finance/yudao-module-contract-biz/src/main/resources/mapper/customercontract/CustomerContractMapper.xml

@@ -67,7 +67,7 @@
         ELSE '未知'
         END AS isFrameContractDesc,
         fcc.customer_id,
-        fcc.customer_name,
+        ci.customer_name,
         fcc.start_date,
         fcc.end_date,
         fcc.money,
@@ -107,6 +107,7 @@
         LEFT JOIN employee_info ei ON ei.id = fcc.owner_employee_id AND ei.deleted = 0
         LEFT JOIN system_dept sd ON sd.id = fcc.dept_id AND sd.deleted = 0
         LEFT JOIN employee_info ei2 ON ei2.id = fcc.creator AND ei2.deleted = 0
+        LEFT JOIN customer_info ci ON ci.id = fcc.customer_id AND ci.deleted = 0
         WHERE
         fcc.deleted = 0
         <if test="page.customerContractCode != null and page.customerContractCode != ''">

+ 0 - 1
yudao-module-personnel/yudao-module-employee-biz/src/main/java/cn/iocoder/yudao/module/employee/service/info/EmployeeInfoServiceImpl.java

@@ -242,7 +242,6 @@ public class EmployeeInfoServiceImpl implements EmployeeInfoService {
 
     @Override
     public EmployeeInfoDO getInfo(Long id) {
-        validateInfoExists(id);
         return infoMapper.selectById(id);
     }