Commit 31eb5ef1 authored by 332784038@qq.com's avatar 332784038@qq.com

完善订单查询数据

parent 32e33865
...@@ -3833,7 +3833,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -3833,7 +3833,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "</when>", // "</when>",
// "</script>" // "</script>"
// }) // })
StatisticsOrderVO statisticsMyOrder(@Param("query") OrderQueryDTO query); StatisticsOrderVO statisticsMyOrder(@Param("query") OrderQueryVO query);
/** /**
...@@ -4844,38 +4844,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -4844,38 +4844,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "where whl.dest_warehouse_id = #{query.destWarehouseId} ", // "where whl.dest_warehouse_id = #{query.destWarehouseId} ",
// "))", // "))",
// "</when>", // "</when>",
" <if test=\"query.startWarehouseId !=null and query.destWarehouseId !=null \">\n" + " <if test=\"query.startWarehouseIds !=null and query.destWarehouseIds !=null \">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.start_warehouse_id in\n" + " where whl.start_warehouse_id in\n" +
" <foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='warehouseId' collection='query.startWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{warehouseId}\n" + " #{warehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
" and whl.dest_warehouse_id in\n" + " and whl.dest_warehouse_id in\n" +
" <foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='destWarehouseId' collection='query.destWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{destWarehouseId}\n" + " #{destWarehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
" ))\n" + " ))\n" +
" </if>\n" + " </if>\n" +
" <if test=\"query.startWarehouseId !=null and query.destWarehouseId==null\">\n" + " <if test=\"query.startWarehouseIds !=null and query.destWarehouseIds==null\">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.start_warehouse_id in\n" + " where whl.start_warehouse_id in\n" +
" <foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='warehouseId' collection='query.startWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{warehouseId}\n" + " #{warehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
" ))\n" + " ))\n" +
" </if>\n" + " </if>\n" +
" <if test=\"query.startWarehouseId ==null and query.destWarehouseId !=null \">\n" + " <if test=\"query.startWarehouseIds ==null and query.destWarehouseIds !=null \">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.dest_warehouse_id in\n" + " where whl.dest_warehouse_id in\n" +
" <foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='destWarehouseId' collection='query.destWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{destWarehouseId}\n" + " #{destWarehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
...@@ -4919,7 +4919,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -4919,7 +4919,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
"</when>", "</when>",
"</script>" "</script>"
}) })
StatisticsOrderVO statisticsMyWarehouseIn(@Param("query") OrderQueryDTO query); StatisticsOrderVO statisticsMyWarehouseIn(@Param("query") OrderQueryVO query);
@ResultType(StatisticsOrderVO.class) @ResultType(StatisticsOrderVO.class)
@Select({ @Select({
...@@ -5766,38 +5766,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -5766,38 +5766,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "where whl.dest_warehouse_id = #{query.destWarehouseId} ", // "where whl.dest_warehouse_id = #{query.destWarehouseId} ",
// "))", // "))",
// "</when>", // "</when>",
" <if test=\"query.startWarehouseId !=null and query.destWarehouseId !=null \">\n" + " <if test=\"query.startWarehouseIds !=null and query.destWarehouseIds !=null \">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.start_warehouse_id in\n" + " where whl.start_warehouse_id in\n" +
" <foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='warehouseId' collection='query.startWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{warehouseId}\n" + " #{warehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
" and whl.dest_warehouse_id in\n" + " and whl.dest_warehouse_id in\n" +
" <foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='destWarehouseId' collection='query.destWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{destWarehouseId}\n" + " #{destWarehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
" ))\n" + " ))\n" +
" </if>\n" + " </if>\n" +
" <if test=\"query.startWarehouseId !=null and query.destWarehouseId==null\">\n" + " <if test=\"query.startWarehouseIds !=null and query.destWarehouseIds==null\">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.start_warehouse_id in\n" + " where whl.start_warehouse_id in\n" +
" <foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='warehouseId' collection='query.startWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{warehouseId}\n" + " #{warehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
" ))\n" + " ))\n" +
" </if>\n" + " </if>\n" +
" <if test=\"query.startWarehouseId ==null and query.destWarehouseId !=null \">\n" + " <if test=\"query.startWarehouseIds ==null and query.destWarehouseIds !=null \">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.dest_warehouse_id in\n" + " where whl.dest_warehouse_id in\n" +
" <foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='destWarehouseId' collection='query.destWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{destWarehouseId}\n" + " #{destWarehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
...@@ -5841,7 +5841,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -5841,7 +5841,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
"</when>", "</when>",
"</script>" "</script>"
}) })
StatisticsOrderVO statisticsMyPickUp(@Param("query") OrderQueryDTO query); StatisticsOrderVO statisticsMyPickUp(@Param("query") OrderQueryVO query);
@ResultType(OrderDO.class) @ResultType(OrderDO.class)
@Select({ @Select({
......
...@@ -314,7 +314,7 @@ public interface OrderQueryService { ...@@ -314,7 +314,7 @@ public interface OrderQueryService {
List<OrderDO> getOrderChildren(List<Long> orderIds); List<OrderDO> getOrderChildren(List<Long> orderIds);
StatisticsOrderVO statisticsOrder(OrderQueryVO query); StatisticsOrderVO statisticsOrder(OrderQueryVO query);
StatisticsOrderVO statisticsMyOrder(OrderQueryDTO query) ; StatisticsOrderVO statisticsMyOrder(OrderQueryVO query) ;
void exportOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException; void exportOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException;
......
...@@ -1767,8 +1767,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1767,8 +1767,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
} }
@Override @Override
public StatisticsOrderVO statisticsMyOrder(OrderQueryDTO query) { public StatisticsOrderVO statisticsMyOrder(OrderQueryVO query) {
caseStatus(query.getStatus(), query); // caseStatus(query.getStatus(), query);
StatisticsOrderVO vo = orderMapper.statisticsMyOrder(query); StatisticsOrderVO vo = orderMapper.statisticsMyOrder(query);
if (Objects.nonNull(vo)) { if (Objects.nonNull(vo)) {
vo.setTotalVolume(new BigDecimal(vo.getTotalVolume()).setScale(2, RoundingMode.HALF_UP).toString()); vo.setTotalVolume(new BigDecimal(vo.getTotalVolume()).setScale(2, RoundingMode.HALF_UP).toString());
......
...@@ -563,6 +563,12 @@ public class OrderQueryVO { ...@@ -563,6 +563,12 @@ public class OrderQueryVO {
@ApiModelProperty(value = "产品备案属性:1有牌,2无牌,3中性,4混牌") @ApiModelProperty(value = "产品备案属性:1有牌,2无牌,3中性,4混牌")
private List<Integer> productRecords; private List<Integer> productRecords;
@ApiModelProperty(value = "客户经理ids")
private List<Long> salesmanIds;
@ApiModelProperty(value = "渠道ids")
private List<Long> channelIds;
@ApiModelProperty(value = "审核类型(字典 order_approval_type) 0 为正常") @ApiModelProperty(value = "审核类型(字典 order_approval_type) 0 为正常")
private List<Integer> auditTypeList; private List<Integer> auditTypeList;
@ApiModelProperty(value = "订单状态详情见字典:order_status") @ApiModelProperty(value = "订单状态详情见字典:order_status")
......
...@@ -731,7 +731,7 @@ public class OrderController { ...@@ -731,7 +731,7 @@ public class OrderController {
@GetMapping("/dept/statistics") @GetMapping("/dept/statistics")
@ApiOperation("参数查询获得部门订单统计") @ApiOperation("参数查询获得部门订单统计")
public CommonResult<StatisticsOrderVO> statisticsDeptOrder(OrderQueryDTO query) { public CommonResult<StatisticsOrderVO> statisticsDeptOrder(OrderQueryVO query) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); // 获取当前登录用户ID LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); // 获取当前登录用户ID
query.setUserType(UserTypeEnum.ADMIN.getValue()); query.setUserType(UserTypeEnum.ADMIN.getValue());
// query.setSalesmanId(salesmanId); // query.setSalesmanId(salesmanId);
...@@ -761,7 +761,7 @@ public class OrderController { ...@@ -761,7 +761,7 @@ public class OrderController {
@GetMapping("/my/statistics") @GetMapping("/my/statistics")
@ApiOperation("参数查询获得我的订单统计") @ApiOperation("参数查询获得我的订单统计")
public CommonResult<StatisticsOrderVO> statisticsMyOrder(OrderQueryDTO query) { public CommonResult<StatisticsOrderVO> statisticsMyOrder(OrderQueryVO query) {
Long salesmanId = SecurityFrameworkUtils.getLoginUserId(); // 获取当前登录用户ID Long salesmanId = SecurityFrameworkUtils.getLoginUserId(); // 获取当前登录用户ID
query.setUserType(UserTypeEnum.ADMIN.getValue()); query.setUserType(UserTypeEnum.ADMIN.getValue());
// query.setSalesmanId(salesmanId); // query.setSalesmanId(salesmanId);
...@@ -772,7 +772,7 @@ public class OrderController { ...@@ -772,7 +772,7 @@ public class OrderController {
@GetMapping("/statistics") @GetMapping("/statistics")
@ApiOperation("参数查询订单管理统计") @ApiOperation("参数查询订单管理统计")
public CommonResult<StatisticsOrderVO> statisticsOrder(OrderQueryDTO query) { public CommonResult<StatisticsOrderVO> statisticsOrder(OrderQueryVO query) {
return success(orderQueryService.statisticsMyOrder(query)); return success(orderQueryService.statisticsMyOrder(query));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment