| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.model.Goodsorder; |
| | | import com.doumee.dao.business.model.WxBillDetail; |
| | | import com.doumee.dao.business.vo.BikeIncomeReportVO; |
| | | import com.doumee.dao.business.vo.DiscountGoodsorderExportVO; |
| | | import com.doumee.dao.business.vo.GoodsorderExportVO; |
| | | import com.doumee.dao.business.vo.GoodsorderTotalDataVO; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | |
| | | public ApiResponse<PageData<Goodsorder>> findPage (@RequestBody PageWrap<Goodsorder> pageWrap) { |
| | | return ApiResponse.success(goodsorderService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("线上交易汇总数据接口") |
| | | @PostMapping("/getTotalData") |
| | | @RequiresPermissions("business:goodsorder:query") |
| | |
| | | pageWrap.setEndDate(pageWrap.getEndDate() != null ? pageWrap.getEndDate():pageWrap.getStartDate()); |
| | | return ApiResponse.success(goodsorderService.getTotalData(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("订单列表-导出Excel") |
| | | @PostMapping("/exportExcel") |
| | |
| | | for (Goodsorder goodsorder:goodsorders) { |
| | | DiscountGoodsorderExportVO discountGoodsorderExportVO = new DiscountGoodsorderExportVO(); |
| | | BeanUtils.copyProperties(goodsorder,discountGoodsorderExportVO); |
| | | discountGoodsorderExportVO.setPayMoney(discountGoodsorderExportVO.getPayMoney()); |
| | | discountGoodsorderExportVO.setPayMoney(discountGoodsorderExportVO.getMoney()); |
| | | discountGoodsorderExportVO.setOrigin(Constants.ZERO); |
| | | discountGoodsorderExportVOList.add(discountGoodsorderExportVO); |
| | | } |
| | | ExcelExporter.build(DiscountGoodsorderExportVO.class).exportWithFirstAndEnd(discountGoodsorderExportVOList, "订单列表_"+System.currentTimeMillis(),"订单列表_"+ DateUtil.getPlusTime2(DateUtil.getCurrentDate()),null, response); |
| | |
| | | public ApiResponse<PageData<GoodsorderExportVO>> findPageAccountDetail(@RequestBody PageWrap<Goodsorder> pageWrap) { |
| | | return ApiResponse.success(goodsorderService.findAccountDetailPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("收款明细(微信对账明细)_导出Excel") |
| | | @PostMapping("/exportAccountDetailExcel") |
| | | @RequiresPermissions("business:goodsorder:exportExcel") |
| | |
| | | @PostMapping("/backGoodsorder") |
| | | @RequiresPermissions("business:goodsorder:query") |
| | | public ApiResponse backGoodsorder(@RequestBody GoodsorderBackDTO goodsorderBackDTO){ |
| | | if(Objects.nonNull(goodsorderBackDTO) && Objects.isNull(goodsorderBackDTO.getBackType())){ |
| | | goodsorderBackDTO.setBackType(Constants.ONE); |
| | | } |
| | | goodsorderService.backGoodsorder(goodsorderBackDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | public ApiResponse<GoodsorderCanBanlanceDTO> getGoodsorderCanBanlanceDTO(@RequestParam String orderId){ |
| | | return ApiResponse.success(goodsorderService.getGoodsorderCanBanlanceDTO(orderId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("车型收入分析") |
| | | @PostMapping("/getBikeIncomeReportVOList") |
| | | public ApiResponse<List<List<String>>> getBikeIncomeReportVOList (@RequestBody Goodsorder goodsorder) { |
| | | return ApiResponse.success(goodsorderService.getBikeIncomeReportVOList(goodsorder.getStartDate(),goodsorder.getEndDate())); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("车型收入分析-导出Excel") |
| | | @PostMapping("/bikeIncomeExportExcel") |
| | | public void exportExcel (@RequestBody Goodsorder goodsorder, HttpServletResponse response) { |
| | | goodsorderService.excel(goodsorder.getStartDate(),goodsorder.getEndDate(),response); |
| | | } |
| | | } |