|
|
@@ -26,6 +26,7 @@ import com.cyksj.mapper.manage.statistics.StatisticsUserDataMapper;
|
|
|
import com.cyksj.mapper.stock.GoodsDonStockRecordMapper;
|
|
|
import com.cyksj.model.entity.*;
|
|
|
import com.cyksj.model.excel.ExcelAccountData;
|
|
|
+import com.cyksj.model.excel.ExcelServiceMonthStatisticsData;
|
|
|
import com.cyksj.model.excel.ExcelSheetAndData;
|
|
|
import com.cyksj.model.request.BatchServiceReq;
|
|
|
import com.cyksj.model.request.RedBookReq;
|
|
|
@@ -295,6 +296,31 @@ public class StatisticsDataController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(view);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 导出客服每月订单数据统计
|
|
|
+ */
|
|
|
+ @GetMapping("/export/service/orders")
|
|
|
+ public void exportServiceMonthStatisticsData(Integer type, String monthDate, String customerService, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ DateTime month = null;
|
|
|
+ if (StrUtil.isEmpty(monthDate)) {
|
|
|
+ month = DateTime.now();
|
|
|
+ } else {
|
|
|
+ month = DateUtil.parse(monthDate, "yyyy-MM-dd");
|
|
|
+ }
|
|
|
+ DateTime beginOfMonth = DateUtil.beginOfMonth(month);
|
|
|
+ DateTime endOfMonth = DateUtil.endOfMonth(month);
|
|
|
+ MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap())
|
|
|
+ .field(ExcelServiceMonthStatisticsData::getRecordCreatedTime, beginOfMonth, endOfMonth).op(Operator.Between);
|
|
|
+ if (type == 1) {
|
|
|
+ builder.field(ExcelServiceMonthStatisticsData::getBeforeServiceName, customerService).op(Operator.Equal);
|
|
|
+ } else if (type == 2) {
|
|
|
+ builder.field(ExcelServiceMonthStatisticsData::getAfterServiceName, customerService).op(Operator.Equal);
|
|
|
+ }
|
|
|
+ builder.field(ExcelServiceMonthStatisticsData::getStatus, Constant.noOrderAllStatus).op(Operator.NotIn);
|
|
|
+ List<ExcelServiceMonthStatisticsData> excelServiceMonthStatisticsData = beanSearcher.searchAll(ExcelServiceMonthStatisticsData.class, builder.build());
|
|
|
+ EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, ExcelServiceMonthStatisticsData.class, excelServiceMonthStatisticsData, "客服每月订单数据统计", "客服每月订单数据统计", ExcelTypeEnum.XLSX, null);
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping("/get/stock")
|
|
|
public Result<List<StatisticsStockView>> getStock(HttpServletRequest request, @RequestParam(defaultValue = "0") Long startTime,@RequestParam(defaultValue = "0") Long endTime){
|
|
|
List<GoodsDonStock> goodsDonStocks = beanSearcher.searchAll(GoodsDonStock.class, MapUtils.flatBuilder(request.getParameterMap()).build());
|