Pārlūkot izejas kodu

文档需求提交

wucl 2 gadi atpakaļ
vecāks
revīzija
a85d6db861
21 mainītis faili ar 421 papildinājumiem un 85 dzēšanām
  1. 83 0
      biz-base/src/main/java/com/dayou/controller/BusinessReplyController.java
  2. 0 1
      biz-base/src/main/java/com/dayou/controller/ItemController.java
  3. 2 2
      biz-base/src/main/java/com/dayou/controller/VisitController.java
  4. 2 0
      biz-base/src/test/java/BrokerageTest.java
  5. 16 0
      dao/src/main/java/com/dayou/mapper/BusinessReplyMapper.java
  6. 1 1
      dao/src/main/java/com/dayou/mapper/ItemMapper.java
  7. 1 1
      dao/src/main/java/com/dayou/mapper/VisitMapper.java
  8. 29 0
      dao/src/main/resources/mapper/BusinessReplyMapper.xml
  9. 76 25
      dao/src/main/resources/mapper/ItemMapper.xml
  10. 9 3
      dao/src/main/resources/mapper/VisitMapper.xml
  11. 67 0
      domain/src/main/java/com/dayou/entity/BusinessReply.java
  12. 26 0
      domain/src/main/java/com/dayou/enums/BusinessReplyEnum.java
  13. 5 0
      domain/src/main/java/com/dayou/vo/ItemVO.java
  14. 1 0
      domain/src/main/java/com/dayou/vo/VisitVO.java
  15. 28 0
      service/src/main/java/com/dayou/service/IBusinessReplyService.java
  16. 1 1
      service/src/main/java/com/dayou/service/IVisitService.java
  17. 68 0
      service/src/main/java/com/dayou/service/impl/BusinessReplyServiceImpl.java
  18. 0 20
      service/src/main/java/com/dayou/service/impl/ItemServiceImpl.java
  19. 3 27
      service/src/main/java/com/dayou/service/impl/ItemStageServiceImpl.java
  20. 1 2
      service/src/main/java/com/dayou/service/impl/MarketStatServiceImpl.java
  21. 2 2
      service/src/main/java/com/dayou/service/impl/VisitServiceImpl.java

+ 83 - 0
biz-base/src/main/java/com/dayou/controller/BusinessReplyController.java

@@ -0,0 +1,83 @@
+package com.dayou.controller;
+
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springframework.web.bind.annotation.RestController;
+import com.dayou.controller.BaseController;
+import com.dayou.service.IBusinessReplyService;
+import com.dayou.entity.BusinessReply;
+import com.dayou.common.RestResponse;
+import org.springframework.web.bind.annotation.*;
+import com.dayou.utils.ConvertUtil;
+import com.dayou.utils.HttpKit;
+import com.dayou.exception.ErrorCode;
+import java.util.Date;
+import java.util.List;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import org.springframework.http.MediaType;
+import org.springframework.web.multipart.MultipartFile;
+/**
+ * 业务回复表
+ *
+ * @author wucl
+ * @since 2023-03-23
+ */
+@RestController
+@RequestMapping("businessReply")
+@Slf4j
+public class BusinessReplyController extends BaseController {
+    @Autowired
+    private IBusinessReplyService businessReplyService;
+
+    /**
+    * 业务回复表列表
+    */
+    @GetMapping("")
+    public RestResponse<Page<BusinessReply>> page(BusinessReply businessReply, Page page){
+        Page<BusinessReply> pages=businessReplyService.selectPage(page,businessReply);
+        return RestResponse.data(pages);
+    }
+
+    /**
+     * 业务回复表详情
+     */
+    @GetMapping("/{id}")
+    public RestResponse<BusinessReply> detail(@PathVariable Long id){
+        BusinessReply xBusinessReply =businessReplyService.detail(id);
+        return RestResponse.data(xBusinessReply);
+     }
+
+    /**
+     * 业务回复表新增
+     */
+    @PostMapping("")
+    public RestResponse<Boolean> save(@RequestBody BusinessReply businessReply) {
+        Boolean ret = businessReplyService.reply(businessReply);
+        return RestResponse.data(ret);
+    }
+
+    /**
+     * 业务回复表更新
+     */
+    @PutMapping("")
+    public RestResponse<Boolean> update(@RequestBody BusinessReply businessReply) {
+        Boolean ret = businessReplyService.update(businessReply);
+        return RestResponse.data(ret);
+    }
+
+    /**
+     * 业务回复表删除
+     */
+    @DeleteMapping("/{id}")
+    public RestResponse<Boolean> delete(@PathVariable Long id) {
+        Boolean ret = businessReplyService.delete(id);
+        return RestResponse.data(ret);
+    }
+
+
+}
+

+ 0 - 1
biz-base/src/main/java/com/dayou/controller/ItemController.java

@@ -48,7 +48,6 @@ public class ItemController extends BaseController {
 
     /**
     * 项目信息表列表(项目所属部门是自己的部门的项目)
-     * //todo 项目类型和业务来源需处理
     */
     @DataPermission(department = true,postChild = false)
     @GetMapping("")

+ 2 - 2
biz-base/src/main/java/com/dayou/controller/VisitController.java

@@ -42,8 +42,8 @@ public class VisitController extends BaseController {
     */
     @DataPermission
     @GetMapping("")
-    public RestResponse<Page<VisitVO>> page(VisitVO visit, Page page){
-        Page<VisitVO> pages=visitService.selectPage(page,visit);
+    public RestResponse<Page<VisitVO>> page(VisitVO visit, Page page,String keyword){
+        Page<VisitVO> pages=visitService.selectPage(page,visit,keyword);
         return RestResponse.data(pages);
     }
 

+ 2 - 0
biz-base/src/test/java/BrokerageTest.java

@@ -63,4 +63,6 @@ public class BrokerageTest {
         itemBrokerageSequenceService.doAbleItemBrokerageSettle();
     }
 
+    //冒泡排序
+
 }

+ 16 - 0
dao/src/main/java/com/dayou/mapper/BusinessReplyMapper.java

@@ -0,0 +1,16 @@
+package com.dayou.mapper;
+
+import com.dayou.entity.BusinessReply;
+import com.dayou.dao.CustomBaseMapper;
+
+/**
+ * <p>
+ * 业务回复表 Mapper 接口
+ * </p>
+ *
+ * @author wucl
+ * @since 2023-03-23
+ */
+public interface BusinessReplyMapper extends CustomBaseMapper<BusinessReply> {
+
+}

+ 1 - 1
dao/src/main/java/com/dayou/mapper/ItemMapper.java

@@ -31,7 +31,7 @@ public interface ItemMapper extends CustomBaseMapper<Item> {
 
     Page<ItemVO> getXPage(Page page, @Param("item")ItemDTO item);
 
-    List<Item> xSelectList(@Param("item")ItemStageVO item);
+    List<ItemVO> xSelectList(@Param("item")ItemStageVO item);
 
     List<ItemBrokerageGeneral> getLastMonthItems(@Param("lastMonth23") LocalDate lastMonth23, @Param("userId") Long userId,@Param("marketerStatus") String marketerStatus );
 

+ 1 - 1
dao/src/main/java/com/dayou/mapper/VisitMapper.java

@@ -16,7 +16,7 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface VisitMapper extends CustomBaseMapper<Visit> {
 
-    Page<VisitVO> page(Page page, @Param("visit") VisitVO visit);
+    Page<VisitVO> page(Page page, @Param("visit") VisitVO visit, @Param("keyword") String keyword);
 
     VisitVO detail(@Param("id") Long id);
 }

+ 29 - 0
dao/src/main/resources/mapper/BusinessReplyMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dayou.mapper.BusinessReplyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dayou.entity.BusinessReply">
+        <result column="id" property="id" />
+        <result column="deleted" property="deleted" />
+        <result column="created" property="created" />
+        <result column="modified" property="modified" />
+        <result column="biz_type" property="bizType" />
+        <result column="biz_table_id" property="bizTableId" />
+        <result column="parent_id" property="parentId" />
+        <result column="content" property="content" />
+        <result column="replier_id" property="replierId" />
+        <result column="receiver_id" property="receiverId" />
+        <result column="state" property="state" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id,
+        deleted,
+        created,
+        modified,
+        biz_type, biz_table_id, parent_id, content, replier_id, receiver_id, state
+    </sql>
+
+</mapper>

+ 76 - 25
dao/src/main/resources/mapper/ItemMapper.xml

@@ -40,6 +40,65 @@
         i.client_name, i.mobile, i.client_manager, i.skiller, i.sign_date, i.payment_method, i.amount, i.state,i.department_id,i.contract_url,i.user_id,i.customer_id
     </sql>
 
+    <sql id="Common_query_item">
+        SELECT
+        <include refid="Base_Column_List"/>
+        , d.name as departmentName,dd1.name as cateName,dd2.name as businessSourceName,
+        (select name from item_stage s where curDate() &gt;= s.start_date and curDate() &lt;= s.end_date and s.item_id = i.id) as stageName,
+        ( SELECT
+        s.id
+        FROM
+        item_stage s
+        WHERE
+        curDate() &gt;= s.start_date
+        AND curDate() &lt;= s.end_date
+        AND s.item_id = i.id
+        ) AS stageId,
+
+        (	CASE when  ((SELECT count(*) FROM item_stage s
+        WHERE
+        s.item_id = i.id
+        AND curDate() &gt;= ( SELECT min( start_date ) FROM item_stage WHERE item_id = i.id )
+        AND curDate() &lt;= ( SELECT max( end_date ) FROM item_stage WHERE item_id = i.id )
+        )=0
+
+        AND
+
+        ( SELECT count(*) FROM item_stage s WHERE s.item_id = i.id ) !=0 )
+
+        THEN
+        '已完成'
+
+        WHEN
+        (SELECT
+        count(*)
+        FROM
+        item_stage s
+        WHERE
+        s.item_id = i.id
+        AND curDate() &gt;= ( SELECT min( start_date ) FROM item_stage WHERE item_id = i.id )
+        AND curDate() &lt;= ( SELECT max( end_date ) FROM item_stage WHERE item_id = i.id ) )
+        !=0
+        THEN
+        '进行中'
+        WHEN
+        (SELECT
+        count(*)
+        FROM
+        item_stage s
+        WHERE
+        s.item_id = i.id)= 0
+        THEN
+        '未开始'
+        ELSE ''
+        END
+        ) AS itemStatus
+        FROM
+        item i left join department d on i.department_id = d.id  left join dict_data dd1 on i.cate = dd1.id
+        left join dict_data dd2 on i.business_source = dd2.id
+        where i.deleted = 0 and dd1.deleted =0 and dd2.deleted = 0
+    </sql>
+
     <select id="stat" resultType="com.dayou.vo.ItemStatVO">
         SELECT
                 ( SELECT count(*) FROM item WHERE state = '已完成' AND deleted = 0 ) AS doneNum,
@@ -60,15 +119,7 @@
     </select>
 
     <select id="getPage" resultType="com.dayou.vo.ItemVO">
-        SELECT
-            <include refid="Base_Column_List"/> , d.name as departmentName,dd1.name as cateName,dd2.name as businessSourceName,
-        (select name from item_stage s where curDate() &gt;= s.start_date and curDate() &lt;= s.end_date and s.item_id = i.id) as stageName,
-        (select id from item_stage s where curDate() &gt;= s.start_date and curDate() &lt;= s.end_date and s.item_id  and s.item_id = i.id) as stageId
-        FROM
-            item i left join department d on i.department_id = d.id  left join dict_data dd1 on i.cate = dd1.id
-        left join dict_data dd2 on i.business_source = dd2.id
-        WHERE
-        i.deleted = 0 and dd1.deleted =0 and dd2.deleted = 0
+        <include refid="Common_query_item"/>
         <if test="item!=null and item.name!=null and item.name!='' ">
             and i.name like concat ('%',#{item.name},'%')
         </if>
@@ -90,20 +141,14 @@
                 #{departmentId}
             </foreach>
         </if>
-
+        <if test="item!=null and item.state!=null and item.state!='' ">
+            GROUP BY i.id
+            HAVING itemStatus =#{item.state}
+        </if>
     </select>
 
     <select id="getXPage" resultType="com.dayou.vo.ItemVO">
-        SELECT
-        <include refid="Base_Column_List"/> , d.name as departmentName,dd1.name as cateName,dd2.name as businessSourceName,
-        (select name from item_stage s where curDate() &gt;= s.start_date and curDate() &lt;= s.end_date and s.item_id = i.id) as stageName,
-        (select id from item_stage s where curDate() &gt;= s.start_date and curDate() &lt;= s.end_date and s.item_id  and s.item_id = i.id) as stageId
-        FROM
-        item i left join department d on i.department_id = d.id
-                                      left join dict_data dd1 on i.cate = dd1.id
-                                      left join dict_data dd2 on i.business_source = dd2.id
-        WHERE
-        i.deleted = 0 and dd1.deleted =0 and dd2.deleted = 0
+        <include refid="Common_query_item"/>
         <if test="item!=null and item.name!=null and item.name!='' ">
             and i.name like concat ('%',#{item.name},'%')
         </if>
@@ -133,7 +178,7 @@
         <if test="item!=null and item.userIds!=null and item.userIds.size!=0 and item!=null and item.departmentIds!=null and item.departmentIds.size!=0">
             and (
             <if test="item!=null and item.userIds!=null and item.userIds.size!=0">
-                 EXISTS ( SELECT item_id FROM item_user iu WHERE iu.item_id = i.id AND iu.user_id in
+                EXISTS ( SELECT item_id FROM item_user iu WHERE iu.item_id = i.id AND iu.user_id in
                 <foreach collection="item.userIds" open="(" close=")" separator="," item="userId">
                     #{userId}
                 </foreach>
@@ -147,12 +192,14 @@
             </if>
             )
         </if>
+        <if test="item!=null and item.state!=null and item.state!='' ">
+            GROUP BY i.id
+            HAVING itemStatus =#{item.state}
+        </if>
     </select>
 
-    <select id="xSelectList" parameterType="com.dayou.vo.ItemStageVO" resultType="com.dayou.entity.Item">
-        select <include refid="Base_Column_List"/> ,dd1.name as cateName,dd2.name as businessSourceName from item i  left join dict_data dd1 on i.cate = dd1.id
-        left join dict_data dd2 on i.business_source = dd2.id
-        where i.deleted = 0 and dd1.deleted =0 and dd2.deleted = 0
+    <select id="xSelectList" parameterType="com.dayou.vo.ItemStageVO" resultType="com.dayou.vo.ItemVO">
+        <include refid="Common_query_item"/>
         <if test="item!=null and item.userIds!=null and item.userIds.size!=0 and item!=null and item.departmentIds!=null and item.departmentIds.size==0">
             <if test="item!=null and item.userIds!=null and item.userIds.size!=0">
                 and EXISTS ( SELECT item_id FROM item_user iu WHERE iu.item_id = i.id AND iu.user_id in
@@ -187,6 +234,10 @@
             </if>
             )
         </if>
+        <if test="item!=null and item.state!=null and item.state!='' ">
+            GROUP BY i.id
+            HAVING itemStatus =#{item.state}
+        </if>
     </select>
 
 

+ 9 - 3
dao/src/main/resources/mapper/VisitMapper.xml

@@ -31,12 +31,18 @@
             c.department as customerDepartment,c.position as customerPosition,c.level as customerLevel
         from visit v left join customer c on v.customer_id = c.id left join user u on u.id = v.user_id
         where v.deleted = 0 and c.deleted = 0
-        <if test="visit!=null and visit.customerName!=null and visit.customerName!='' ">
-            and c.name like concat ('%',#{visit.customerName},'%')
-        </if>
         <if test="visit!=null and visit.visitType!=null and visit.visitType!='' ">
             and v.visit_type = #{visit.visitType}
         </if>
+        <if test="keyword!=null and keyword!='' ">
+            and(
+                c.name like concat ('%',#{keyword},'%')
+                or c.level like concat('%',#{keyword},'%')
+                or c.department like concat('%',#{keyword},'%')
+                or c.position like concat('%',#{keyword},'%')
+                or c.section like concat('%',#{keyword},'%')
+            )
+        </if>
         <if test="visit!=null and visit.userIds!=null and visit.userIds.size!=0">
             and v.user_id in
             <foreach collection="visit.userIds" open="(" close=")" separator="," item="userId">

+ 67 - 0
domain/src/main/java/com/dayou/entity/BusinessReply.java

@@ -0,0 +1,67 @@
+package com.dayou.entity;
+import com.dayou.common.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import com.dayou.annotation.ExcelSheet;
+import com.dayou.annotation.ExportCell;
+import com.dayou.annotation.ImportCell;
+/**
+ * <p>
+ * 业务回复表
+ * </p>
+ *
+ * @author wucl
+ * @since 2023-03-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ExcelSheet(sheetName = "业务回复表")
+public class BusinessReply extends BaseEntity {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 业务类型
+     */
+    @ImportCell
+    @ExportCell(columnName = "业务类型")
+    private String bizType;
+
+    /**
+     * 业务表id
+     */
+    private Long bizTableId;
+
+    /**
+     * 父级id
+     */
+    private Long parentId;
+
+    /**
+     * 内容
+     */
+    @ImportCell
+    @ExportCell(columnName = "内容")
+    private String content;
+
+    /**
+     * 回复者id
+     */
+    private Long replierId;
+
+    /**
+     * 接受者id
+     */
+    @ImportCell
+    @ExportCell(columnName = "接受者id")
+    private Integer receiverId;
+
+    /**
+     * 状态(已读,未读)
+     */
+    @ImportCell
+    @ExportCell(columnName = "状态(已读,未读)")
+    private Boolean state;
+
+
+}

+ 26 - 0
domain/src/main/java/com/dayou/enums/BusinessReplyEnum.java

@@ -0,0 +1,26 @@
+package com.dayou.enums;
+
+/**
+ * 类说明:
+ *
+ * @author: wucl
+ * @since: 2023/3/23
+ * created with IntelliJ IDEA.
+ */
+public enum BusinessReplyEnum {
+
+    MARKET_LOG_REPLY("市场部日志回复","MARKET_LOG_REPLY"),
+
+    MARKET_VISIT_REPLY("市场部拜访记录回复","MARKET_VISIT_REPLY"),
+
+    ;
+
+    private String name;
+
+    private String code;
+
+    BusinessReplyEnum(String name, String code) {
+        this.name = name;
+        this.code = code;
+    }
+}

+ 5 - 0
domain/src/main/java/com/dayou/vo/ItemVO.java

@@ -41,4 +41,9 @@ public class ItemVO extends Item {
      * 业务来源
      */
     private String businessSourceName;
+
+    /**
+     * 项目状态
+     */
+    private String itemStatus;
 }

+ 1 - 0
domain/src/main/java/com/dayou/vo/VisitVO.java

@@ -35,4 +35,5 @@ public class VisitVO extends Visit {
     private String customerPosition;
 
     private String customerLevel;
+
 }

+ 28 - 0
service/src/main/java/com/dayou/service/IBusinessReplyService.java

@@ -0,0 +1,28 @@
+package com.dayou.service;
+import com.dayou.entity.BusinessReply;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.web.multipart.MultipartFile;
+/**
+ * <p>
+ * 业务回复表 服务类
+ * </p>
+ *
+ * @author wucl
+ * @since 2023-03-23
+ */
+public interface IBusinessReplyService extends IService<BusinessReply> {
+
+        Page<BusinessReply> selectPage(Page page,BusinessReply businessReply);
+
+        BusinessReply detail(Long id);
+
+        Boolean reply(BusinessReply businessReply);
+
+        Boolean update(BusinessReply businessReply);
+
+        Boolean delete(Long id);
+
+}

+ 1 - 1
service/src/main/java/com/dayou/service/IVisitService.java

@@ -16,7 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
  */
 public interface IVisitService extends IService<Visit> {
 
-        Page<VisitVO> selectPage(Page page, VisitVO visit);
+        Page<VisitVO> selectPage(Page page, VisitVO visit,String keyword);
 
         VisitVO detail(Long id);
 

+ 68 - 0
service/src/main/java/com/dayou/service/impl/BusinessReplyServiceImpl.java

@@ -0,0 +1,68 @@
+package com.dayou.service.impl;
+
+import com.dayou.common.BaseEntity;
+import com.dayou.entity.BusinessReply;
+import com.dayou.mapper.BusinessReplyMapper;
+import com.dayou.service.IBusinessReplyService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.dayou.utils.ExcelUtil;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.web.multipart.MultipartFile;
+import java.util.List;
+import java.util.ArrayList;
+import org.springframework.transaction.annotation.Transactional;
+import com.dayou.enums.BatchTaskTypeEnum;
+
+/**
+ * <p>
+ * 业务回复表 服务实现类
+ * </p>
+ *
+ * @author wucl
+ * @since 2023-03-23
+ */
+@Service
+public class BusinessReplyServiceImpl extends ServiceImpl<BusinessReplyMapper, BusinessReply> implements IBusinessReplyService {
+
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public Page<BusinessReply> selectPage(Page page,BusinessReply businessReply){
+        return this.page(page, new QueryWrapper<BusinessReply>(businessReply));
+    }
+
+
+    @Override
+    public BusinessReply detail(Long id){
+        this.update(new LambdaUpdateWrapper<BusinessReply>().set(BusinessReply::getState,1).eq(BaseEntity::getId,id));
+        return this.getById(id);
+    }
+
+    @Override
+    public Boolean reply(BusinessReply businessReply){
+        return  this.save(businessReply);
+    }
+
+    @Override
+    public Boolean update(BusinessReply businessReply){
+        return  this.updateById(businessReply);
+    }
+
+    @Override
+    public Boolean delete(Long id){
+        //逻辑删除
+        return this.removeById(id);
+    }
+}

+ 0 - 20
service/src/main/java/com/dayou/service/impl/ItemServiceImpl.java

@@ -61,17 +61,7 @@ public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements II
     @Override
     @SuppressWarnings("unchecked")
     public Page<ItemVO> selectPage(Page page, ItemDTO item){
-        String state = item.getState();
         Page<ItemVO> result = itemMapper.getPage(page, item);
-        List<ItemVO> records = result.getRecords();
-        records.stream().forEach(x->{
-            String itemState = getItemState(x.getId());
-            x.setState(itemState);
-        });
-        if (StrUtil.isNotBlank(state)){
-            records = records.stream().filter(x -> x.getState().equals(state)).collect(Collectors.toList());
-            result.setRecords(records);
-        }
         return result;
 
     }
@@ -144,17 +134,7 @@ public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements II
      */
     @Override
     public Page<ItemVO> xSelectPage(Page page, ItemDTO item) {
-        String state = item.getState();
         Page<ItemVO> result = itemMapper.getXPage(page, item);
-        List<ItemVO> records = result.getRecords();
-        records.stream().forEach(x->{
-            String itemState = getItemState(x.getId());
-            x.setState(itemState);
-        });
-        if (StrUtil.isNotBlank(state)){
-            records = records.stream().filter(x -> x.getState().equals(state)).collect(Collectors.toList());
-            result.setRecords(records);
-        }
         return result;
     }
 

+ 3 - 27
service/src/main/java/com/dayou/service/impl/ItemStageServiceImpl.java

@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.dayou.service.IItemStageUserService;
 import com.dayou.vo.ItemStageUserVO;
 import com.dayou.vo.ItemStageVO;
+import com.dayou.vo.ItemVO;
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -183,8 +184,7 @@ public class ItemStageServiceImpl extends ServiceImpl<ItemStageMapper, ItemStage
     public List<List<ItemStageVO>> stageList(ItemStageVO stageVO) {
         String state = stageVO.getState();
         List<List<ItemStageVO>> list = new ArrayList<>();
-        List<Item> items = itemMapper.xSelectList(stageVO);
-
+        List<ItemVO> items = itemMapper.xSelectList(stageVO);
 
         items.stream().forEach(x->{
             List<ItemStageVO> itemStageVOS = listByItemId(x.getId());
@@ -198,31 +198,7 @@ public class ItemStageServiceImpl extends ServiceImpl<ItemStageMapper, ItemStage
                 list.add(itemList);
             }else {
                 if (CollectionUtils.isNotEmpty(itemStageVOS)){
-                    LocalDate startDate = itemStageVOS.get(0).getStartDate();
-                    LocalDate endDate = itemStageVOS.get(itemStageVOS.size() - 1).getEndDate();
-                    LocalDate now = LocalDate.now();
-                    ItemStateEnum stateEnum = ItemStateEnum.getName(state);
-                    switch (stateEnum){
-                        case PENDING:
-                            if ((now.isAfter(startDate) || now.isEqual(startDate))
-                                    &&
-                                    (now.isBefore(endDate) || now.isEqual(endDate))){
-                                list.add(itemStageVOS);
-                            }
-                            break;
-                        case COMPLETED:
-                            if (now.isAfter(endDate)){
-                                list.add(itemStageVOS);
-                            }
-                            break;
-                        case UNPLAYED:
-                            if (now.isBefore(startDate)){
-                                list.add(itemStageVOS);
-                            }
-                            break;
-                        default:
-
-                    }
+                    list.add(itemStageVOS);
                 }
             }
         });

+ 1 - 2
service/src/main/java/com/dayou/service/impl/MarketStatServiceImpl.java

@@ -28,8 +28,7 @@ public class MarketStatServiceImpl implements IMarketStatService {
     @Override
     public MarketStatVO marketStat(MarketStatDTO dto) {
 
-        //todo 市场部首页统计时间段修改,只把月回款修改了,年回款和年签约还没有改
-        LocalDate lastMonth23 = LocalDate.now();
+        LocalDate lastMonth23 = null;
         if (dto.getMonth()==null || dto.getYear()==null){
             lastMonth23 = DateUtils.getLastMonth23(LocalDate.now().getYear(), LocalDate.now().getMonthValue() - 1);
         }else {

+ 2 - 2
service/src/main/java/com/dayou/service/impl/VisitServiceImpl.java

@@ -42,8 +42,8 @@ public class VisitServiceImpl extends ServiceImpl<VisitMapper, Visit> implements
 
     @Override
     @SuppressWarnings("unchecked")
-    public Page<VisitVO> selectPage(Page page, VisitVO visit){
-        Page<VisitVO> result = visitMapper.page(page,visit);
+    public Page<VisitVO> selectPage(Page page, VisitVO visit,String keyword){
+        Page<VisitVO> result = visitMapper.page(page,visit,keyword);
         return result;
     }