Commit afe1a933d83ced71d8bcddc60bb43c73604058e6

Authored by yeqianyong
1 parent f36d07d4

楚江ERP-客户开发调整

@@ -123,6 +123,12 @@ public class GetCustomerDevelopPlanBo extends BaseBo<CustomerDevelopPlan> { @@ -123,6 +123,12 @@ public class GetCustomerDevelopPlanBo extends BaseBo<CustomerDevelopPlan> {
123 private Double settleDays; 123 private Double settleDays;
124 124
125 /** 125 /**
  126 + * 责任人ID
  127 + */
  128 + @ApiModelProperty("责任人ID")
  129 + private String chargeUserId;
  130 +
  131 + /**
126 * 责任人 132 * 责任人
127 */ 133 */
128 @ApiModelProperty("责任人") 134 @ApiModelProperty("责任人")
@@ -26,7 +26,6 @@ import com.lframework.starter.common.utils.CollectionUtil; @@ -26,7 +26,6 @@ import com.lframework.starter.common.utils.CollectionUtil;
26 import io.swagger.annotations.Api; 26 import io.swagger.annotations.Api;
27 import org.apache.commons.collections4.CollectionUtils; 27 import org.apache.commons.collections4.CollectionUtils;
28 import org.apache.commons.lang3.StringUtils; 28 import org.apache.commons.lang3.StringUtils;
29 -import org.springframework.beans.factory.annotation.Autowired;  
30 import org.springframework.web.bind.annotation.DeleteMapping; 29 import org.springframework.web.bind.annotation.DeleteMapping;
31 import com.lframework.starter.web.core.components.resp.PageResult; 30 import com.lframework.starter.web.core.components.resp.PageResult;
32 import com.lframework.starter.web.core.components.resp.InvokeResult; 31 import com.lframework.starter.web.core.components.resp.InvokeResult;
@@ -66,7 +65,7 @@ public class CustomerDevelopPlanController extends DefaultBaseController { @@ -66,7 +65,7 @@ public class CustomerDevelopPlanController extends DefaultBaseController {
66 private TypeInfoService typeInfoService; 65 private TypeInfoService typeInfoService;
67 @Resource 66 @Resource
68 private ProductVarietyService productVarietyService; 67 private ProductVarietyService productVarietyService;
69 - @Autowired 68 + @Resource
70 private SysUserService sysUserService; 69 private SysUserService sysUserService;
71 70
72 71
@@ -25,6 +25,7 @@ import com.lframework.xingyun.sc.vo.customer.develop.QueryCustomerDevelopPlanVo; @@ -25,6 +25,7 @@ import com.lframework.xingyun.sc.vo.customer.develop.QueryCustomerDevelopPlanVo;
25 import com.lframework.xingyun.sc.vo.customer.develop.UpdateCustomerDevelopPlanVo; 25 import com.lframework.xingyun.sc.vo.customer.develop.UpdateCustomerDevelopPlanVo;
26 import org.springframework.stereotype.Service; 26 import org.springframework.stereotype.Service;
27 27
  28 +import java.util.ArrayList;
28 import java.util.List; 29 import java.util.List;
29 30
30 @Service 31 @Service
@@ -36,7 +37,33 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe @@ -36,7 +37,33 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe
36 public PageResult<CustomerDevelopPlan> query(Integer pageIndex, Integer pageSize, QueryCustomerDevelopPlanVo vo) { 37 public PageResult<CustomerDevelopPlan> query(Integer pageIndex, Integer pageSize, QueryCustomerDevelopPlanVo vo) {
37 Assert.greaterThanZero(pageIndex); 38 Assert.greaterThanZero(pageIndex);
38 Assert.greaterThanZero(pageSize); 39 Assert.greaterThanZero(pageSize);
39 - 40 + // 厂房类型处理
  41 + String workshopType = vo.getWorkshopType();
  42 + if ("TYPE_1".equals(workshopType)) {
  43 + // 一、二分厂
  44 + List<String> workshopNameList = new ArrayList<>();
  45 + workshopNameList.add("一分厂");
  46 + workshopNameList.add("二分厂");
  47 + vo.setWorkshopNames(workshopNameList);
  48 + } else if ("TYPE_2".equals(workshopType)) {
  49 + // 三、四分厂
  50 + List<String> workshopNameList = new ArrayList<>();
  51 + workshopNameList.add("三分厂");
  52 + workshopNameList.add("四分厂");
  53 + vo.setWorkshopNames(workshopNameList);
  54 + } else if ("TYPE_3".equals(workshopType)) {
  55 + // 紫铜分厂
  56 + List<String> workshopNameList = new ArrayList<>();
  57 + workshopNameList.add("紫铜分厂");
  58 + vo.setWorkshopNames(workshopNameList);
  59 + }
  60 + // 待办类型
  61 + String todoType = vo.getTodoType();
  62 + if ("COMPLETED".equals(todoType)) {
  63 +
  64 + } else if ("WAIT".equals(todoType)) {
  65 +
  66 + }
40 PageHelperUtil.startPage(pageIndex, pageSize); 67 PageHelperUtil.startPage(pageIndex, pageSize);
41 List<CustomerDevelopPlan> dataList = this.query(vo); 68 List<CustomerDevelopPlan> dataList = this.query(vo);
42 69
@@ -8,6 +8,8 @@ import com.lframework.starter.web.core.vo.BaseVo; @@ -8,6 +8,8 @@ import com.lframework.starter.web.core.vo.BaseVo;
8 import io.swagger.annotations.ApiModelProperty; 8 import io.swagger.annotations.ApiModelProperty;
9 9
10 import java.io.Serializable; 10 import java.io.Serializable;
  11 +import java.time.LocalDateTime;
  12 +import java.util.List;
11 13
12 @Data 14 @Data
13 public class QueryCustomerDevelopPlanVo extends SortPageVo implements BaseVo, Serializable { 15 public class QueryCustomerDevelopPlanVo extends SortPageVo implements BaseVo, Serializable {
@@ -41,4 +43,27 @@ public class QueryCustomerDevelopPlanVo extends SortPageVo implements BaseVo, Se @@ -41,4 +43,27 @@ public class QueryCustomerDevelopPlanVo extends SortPageVo implements BaseVo, Se
41 @IsEnum(message = "状态格式不正确!", enumClass = CustomerDevelopStatus.class) 43 @IsEnum(message = "状态格式不正确!", enumClass = CustomerDevelopStatus.class)
42 private Integer status; 44 private Integer status;
43 45
  46 + /**
  47 + * 时间范围(创建时间)
  48 + */
  49 + @ApiModelProperty("创建时间")
  50 + private LocalDateTime createStartTime;
  51 + private LocalDateTime createEndTime;
  52 +
  53 + /**
  54 + * 厂房类型
  55 + * TYPE_1:一、二分厂
  56 + * TYPE_2:三、四分厂
  57 + */
  58 + @ApiModelProperty("厂房类型")
  59 + private String workshopType;
  60 + private List<String> workshopNames;
  61 +
  62 + /**
  63 + * 待办类型
  64 + * COMPLETED:已办
  65 + * WAIT:待办
  66 + */
  67 + @ApiModelProperty("待办类型")
  68 + private String todoType;
44 } 69 }
@@ -62,6 +62,9 @@ @@ -62,6 +62,9 @@
62 62
63 <select id="query" resultMap="CustomerDevelopPlan"> 63 <select id="query" resultMap="CustomerDevelopPlan">
64 <include refid="CustomerDevelopPlan_sql"/> 64 <include refid="CustomerDevelopPlan_sql"/>
  65 + <if test = "vo.workshopType != null and vo.workshopType != ''">
  66 + LEFT JOIN base_data_workshop w ON tb.workshop_id = w.id
  67 + </if>
65 <where> 68 <where>
66 <if test="vo.customerId != null and vo.customerId != ''"> 69 <if test="vo.customerId != null and vo.customerId != ''">
67 AND tb.customer_id = #{vo.customerId} 70 AND tb.customer_id = #{vo.customerId}
@@ -75,6 +78,12 @@ @@ -75,6 +78,12 @@
75 <if test="vo.status != null and vo.status != ''"> 78 <if test="vo.status != null and vo.status != ''">
76 AND tb.status = #{vo.status} 79 AND tb.status = #{vo.status}
77 </if> 80 </if>
  81 + <if test = "vo.workshopType != null and vo.workshopType != ''">
  82 + AND w.name in
  83 + <foreach collection="vo.workshopNames" open="(" separator="," close=")" item="item">
  84 + #{item}
  85 + </foreach>
  86 + </if>
78 </where> 87 </where>
79 </select> 88 </select>
80 </mapper> 89 </mapper>