Commit 41501cff3843d5a2fd7899e093a8b2f6f5ceca0d

Authored by 房远帅
1 parent 47b880bf

采购:业务员报价看板-报价明细数据

... ... @@ -139,13 +139,14 @@ public class SalesmanQuotationController extends DefaultBaseController {
139 139 }
140 140
141 141 /**
142   - * 已成交报价明细
  142 + * 报价明细
143 143 */
144   - @ApiOperation("已成交报价明细")
  144 + @ApiOperation("报价明细")
145 145 @GetMapping("/concluded")
146   - public InvokeResult<List<SalesmanQuotationLine>> concluded() {
  146 + public InvokeResult<List<SalesmanQuotationLine>> concluded(@Valid QuerySalesmanQuotationVo vo) {
147 147 LocalDate today = LocalDate.now();
148   - List<SalesmanQuotationLine> salesmanQuotationLineList = salesmanQuotationLineService.queryCurrentDayList(today, "DEAL_CLOSED");
  148 + vo.setToday(today);
  149 + List<SalesmanQuotationLine> salesmanQuotationLineList = salesmanQuotationLineService.queryCurrentDayList(vo);
149 150 return InvokeResultBuilder.success(salesmanQuotationLineList);
150 151 }
151 152
... ...
... ... @@ -16,6 +16,7 @@ import com.lframework.xingyun.sc.procurement.mappers.quotation.SalesmanQuotation
16 16 import com.lframework.xingyun.sc.procurement.service.quotation.SalesmanQuotationLineService;
17 17 import com.lframework.xingyun.sc.procurement.vo.quotation.CreateSalesmanQuotationLineVo;
18 18 import com.lframework.xingyun.sc.procurement.vo.quotation.QuerySalesmanQuotationLineVo;
  19 +import com.lframework.xingyun.sc.procurement.vo.quotation.QuerySalesmanQuotationVo;
19 20 import com.lframework.xingyun.sc.procurement.vo.quotation.UpdateSalesmanQuotationLineVo;
20 21 import java.io.Serializable;
21 22 import java.time.LocalDate;
... ... @@ -46,12 +47,11 @@ public class SalesmanQuotationLineServiceImpl
46 47 /**
47 48 * 查询指定日期创建的业务员报价明细
48 49 *
49   - * @param day 日期
50 50 * @return 业务员报价明细列表
51 51 */
52 52 @Override
53   - public List<SalesmanQuotationLine> queryCurrentDayList(LocalDate day, String status) {
54   - return getBaseMapper().queryCurrentDayList(day, status);
  53 + public List<SalesmanQuotationLine> queryCurrentDayList(QuerySalesmanQuotationVo vo) {
  54 + return getBaseMapper().queryCurrentDayList(vo);
55 55 }
56 56
57 57 /**
... ...
... ... @@ -7,6 +7,7 @@ import com.lframework.xingyun.sc.procurement.entity.SalesmanQuotationLine;
7 7 import com.lframework.xingyun.sc.procurement.vo.quotation.QuerySalesmanQuotationLineVo;
8 8 import java.time.LocalDate;
9 9 import java.util.List;
  10 +import com.lframework.xingyun.sc.procurement.vo.quotation.QuerySalesmanQuotationVo;
10 11 import org.apache.ibatis.annotations.Param;
11 12
12 13 /**
... ... @@ -25,10 +26,9 @@ public interface SalesmanQuotationLineMapper extends BaseMapper<SalesmanQuotatio
25 26 /**
26 27 * 查询指定日期创建的业务员报价明细
27 28 *
28   - * @param day 日期
29 29 * @return 业务员报价明细表列表
30 30 */
31   - List<SalesmanQuotationLine> queryCurrentDayList(@Param("day") LocalDate day, @Param("status") String status);
  31 + List<SalesmanQuotationLine> queryCurrentDayList(@Param("qvo") QuerySalesmanQuotationVo qvo);
32 32
33 33 /**
34 34 * 查询当日业务报价成交区域汇总
... ...
... ... @@ -6,6 +6,7 @@ import com.lframework.xingyun.sc.procurement.dto.quotation.SalesmanQuotationDeal
6 6 import com.lframework.xingyun.sc.procurement.entity.SalesmanQuotationLine;
7 7 import com.lframework.xingyun.sc.procurement.vo.quotation.CreateSalesmanQuotationLineVo;
8 8 import com.lframework.xingyun.sc.procurement.vo.quotation.QuerySalesmanQuotationLineVo;
  9 +import com.lframework.xingyun.sc.procurement.vo.quotation.QuerySalesmanQuotationVo;
9 10 import com.lframework.xingyun.sc.procurement.vo.quotation.UpdateSalesmanQuotationLineVo;
10 11 import java.time.LocalDate;
11 12 import java.util.List;
... ... @@ -26,10 +27,9 @@ public interface SalesmanQuotationLineService extends BaseMpService<SalesmanQuot
26 27 /**
27 28 * 查询指定日期创建的业务员报价明细
28 29 *
29   - * @param day 日期
30 30 * @return 业务员报价明细列表
31 31 */
32   - List<SalesmanQuotationLine> queryCurrentDayList(LocalDate day, String status);
  32 + List<SalesmanQuotationLine> queryCurrentDayList(QuerySalesmanQuotationVo vo);
33 33
34 34 /**
35 35 * 查询当日业务报价成交区域汇总
... ...
... ... @@ -5,6 +5,8 @@ import com.lframework.starter.web.core.vo.PageVo;
5 5 import io.swagger.annotations.ApiModelProperty;
6 6 import java.io.Serializable;
7 7 import java.time.LocalDate;
  8 +import java.time.LocalDateTime;
  9 +
8 10 import lombok.Data;
9 11
10 12 /**
... ... @@ -55,13 +57,13 @@ public class QuerySalesmanQuotationVo extends PageVo implements BaseVo, Serializ
55 57 * 报价时间开始
56 58 */
57 59 @ApiModelProperty("报价时间开始")
58   - private LocalDate quoteDateStart;
  60 + private LocalDateTime quoteDateStart;
59 61
60 62 /**
61 63 * 报价时间结束
62 64 */
63 65 @ApiModelProperty("报价时间结束")
64   - private LocalDate quoteDateEnd;
  66 + private LocalDateTime quoteDateEnd;
65 67
66 68 /**
67 69 * 审核状态
... ... @@ -75,4 +77,16 @@ public class QuerySalesmanQuotationVo extends PageVo implements BaseVo, Serializ
75 77 @ApiModelProperty("状态")
76 78 private String status;
77 79
  80 + /**
  81 + * 业务员/供应商/品种
  82 + */
  83 + @ApiModelProperty("搜索关键词")
  84 + private String searchKey;
  85 +
  86 + /**
  87 + * 当日
  88 + */
  89 + @ApiModelProperty("当日")
  90 + private LocalDate today;
  91 +
78 92 }
... ...
... ... @@ -4,6 +4,7 @@ import com.lframework.starter.web.core.utils.JsonUtil;
4 4 import com.lframework.xingyun.sc.procurement.dto.quotation.QuotationLineRealtimeMessage;
5 5 import com.lframework.xingyun.sc.procurement.entity.SalesmanQuotationLine;
6 6 import com.lframework.xingyun.sc.procurement.service.quotation.SalesmanQuotationLineService;
  7 +import com.lframework.xingyun.sc.procurement.vo.quotation.QuerySalesmanQuotationVo;
7 8 import lombok.extern.slf4j.Slf4j;
8 9 import org.springframework.stereotype.Service;
9 10 import org.springframework.web.socket.TextMessage;
... ... @@ -89,7 +90,10 @@ public class SalesmanQuotationLineRealtimePushService {
89 90 */
90 91 private QuotationLineRealtimeMessage buildCurrentDayMessage(String eventType) {
91 92 LocalDate today = LocalDate.now();
92   - List<SalesmanQuotationLine> records = salesmanQuotationLineService.queryCurrentDayList(today,"QUOTED");
  93 + QuerySalesmanQuotationVo vo = new QuerySalesmanQuotationVo();
  94 + vo.setStatus("QUOTED");
  95 + vo.setToday(today);
  96 + List<SalesmanQuotationLine> records = salesmanQuotationLineService.queryCurrentDayList(vo);
93 97
94 98 QuotationLineRealtimeMessage message = new QuotationLineRealtimeMessage();
95 99 message.setMessageType("FULL_SYNC");
... ...
... ... @@ -87,9 +87,21 @@
87 87 <select id="queryCurrentDayList" resultMap="SalesmanQuotationLine">
88 88 <include refid="SalesmanQuotationLineSql1"/>
89 89 <where>
90   - DATE(sq.create_time) = #{day}
91   - <if test="status != null and status != ''">
92   - AND sq.status = #{status}
  90 +
  91 + <if test="qvo.status != null and qvo.status != ''">
  92 + AND sq.status = #{qvo.status}
  93 + </if>
  94 + <if test="qvo.searchKey != null and qvo.searchKey != ''">
  95 + AND (sq.quoter_name LIKE CONCAT('%', #{qvo.searchKey}, '%') OR pdc.unit_name LIKE CONCAT('%',
  96 + #{qvo.searchKey}, '%') OR br.product_name LIKE CONCAT('%',#{qvo.searchKey}, '%'))
  97 + </if>
  98 + <if test="qvo.quoteDateStart != null">
  99 + AND sq.quote_time >= #{qvo.quoteDateStart}
  100 + </if>
  101 + <if test="qvo.quoteDateEnd != null">
  102 + <![CDATA[
  103 + AND sq.quote_time <= #{qvo.quoteDateEnd}
  104 + ]]>
93 105 </if>
94 106 </where>
95 107 ORDER BY tb.create_time DESC, tb.quotation_id DESC
... ...