zhaopeiqing пре 7 месеци
родитељ
комит
79f7693106

+ 1 - 1
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/businessopportunity/vo/CustomerBusinessOpportunityPageReqVO.java

@@ -55,7 +55,7 @@ public class CustomerBusinessOpportunityPageReqVO extends PageParam {
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
     private LocalDate[] estimatedDealTime;
 
-    @Schema(description = "商机等级")
+    @Schema(description = "商机等级:1-潜在,2-可能,3-重点跟进")
     private String opportunityLevel;
 
     @Schema(description = "备注")

+ 1 - 1
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/businessopportunity/vo/CustomerBusinessOpportunityRespVO.java

@@ -74,7 +74,7 @@ public class CustomerBusinessOpportunityRespVO {
     @JsonFormat(pattern = "yyyy-MM-dd")
     private LocalDate estimatedDealTime;
 
-    @Schema(description = "商机等级")
+    @Schema(description = "商机等级:1-潜在,2-可能,3-重点跟进")
     @ExcelProperty("商机等级")
     private String opportunityLevel;
 

+ 1 - 2
yudao-module-customer/yudao-module-customer-biz/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/businessopportunity/vo/CustomerBusinessOpportunitySaveReqVO.java

@@ -25,7 +25,6 @@ public class CustomerBusinessOpportunitySaveReqVO {
     @Schema(description = "商机名称", example = "王五")
     private String opportunityName;
 
-    @Schema(description = "项目类型", example = "1")
     private String projectType;
 
     private Long creatorEmployeeId;
@@ -50,7 +49,7 @@ public class CustomerBusinessOpportunitySaveReqVO {
     @NotNull(message = "预计进单时间不能为空")
     private LocalDate estimatedDealTime;
 
-    @Schema(description = "商机等级")
+    @Schema(description = "商机等级:1-潜在,2-可能,3-重点跟进")
     private String opportunityLevel;
 
     @Schema(description = "备注")

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

@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.customer.controller.admin.info;
 import cn.iocoder.yudao.module.customer.controller.admin.businessopportunity.vo.CustomerBusinessOpportunityRespVO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
@@ -110,4 +111,11 @@ public class CustomerInfoController {
                         BeanUtils.toBean(list, CustomerInfoRespVO.class));
     }
 
+    @GetMapping("/getCustomerCode")
+    @Operation(summary = "获取客户编号")
+    @ApiOperationSupport(order = 1)
+    public CommonResult<String> getCustomerCode() {
+        return success(infoService.getCustomerCode());
+    }
+
 }

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

@@ -22,7 +22,6 @@ public class CustomerInfoSaveReqVO {
     @Schema(description = "客户名称", example = "张三")
     private String customerName;
 
-    @Schema(description = "客户状态", example = "1")
     private String customerStatus;
 
     private Long creatorEmployeeId;
@@ -43,10 +42,8 @@ public class CustomerInfoSaveReqVO {
     @Schema(description = "员工人数")
     private Integer workforce;
 
-    @Schema(description = "行业")
     private String trade;
 
-    @Schema(description = "企业性质")
     private String customerNature;
 
     @Schema(description = "客户地址")
@@ -61,11 +58,9 @@ public class CustomerInfoSaveReqVO {
     @Schema(description = "客户联系人办公地址")
     private String companyPersonAddress;
 
-    @Schema(description = "客户来源")
     private String customerFrom;
 
     @Schema(description = "是否开启 0开启1关闭", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "是否开启 0开启1关闭不能为空")
     private Integer isOpen;
 
     @Schema(description = "备注")

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

@@ -62,4 +62,12 @@ public interface CustomerInfoService {
      */
     PageResult<CustomerInfoDO> getInfoPage(CustomerInfoPageReqVO pageReqVO);
 
+    /**
+     * 获取客户编号
+     * 客户编号是标识客户信息的唯一代码
+     *
+     * @return 客户编号
+     */
+    String getCustomerCode();
+
 }

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

@@ -18,6 +18,8 @@ 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;
 import java.util.*;
 import cn.iocoder.yudao.module.customer.controller.admin.info.vo.*;
 import cn.iocoder.yudao.module.customer.dal.dataobject.info.CustomerInfoDO;
@@ -158,4 +160,11 @@ public class CustomerInfoServiceImpl implements CustomerInfoService {
         return infoMapper.selectPage(pageReqVO);
     }
 
+    @Override
+    public String getCustomerCode() {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
+        String format = formatter.format(LocalDateTime.now());
+        return format + IdUtil.fastSimpleUUID();
+    }
+
 }