| | |
| | | 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.DiscountGoodsorderExportVO; |
| | | import com.doumee.dao.business.vo.GoodsorderExportVO; |
| | | import com.doumee.dao.business.vo.GoodsorderTotalDataVO; |
| | | import com.doumee.dao.business.web.request.GoodsorderBackDTO; |
| | | import com.doumee.dao.business.web.request.GoodsorderCanBanlanceDTO; |
| | | import com.doumee.dao.business.web.response.GoodsorderDetailDTO; |
| | | import com.doumee.dao.business.web.response.GoodsorderDetailVO; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import com.doumee.service.business.RefundService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private GoodsorderService goodsorderService; |
| | | @Autowired |
| | | private RefundService refundService; |
| | | |
| | | |
| | | @PreventRepeat |
| | |
| | | @PostMapping("/getTotalData") |
| | | @RequiresPermissions("business:goodsorder:query") |
| | | public ApiResponse<GoodsorderTotalDataVO> getTotalData (@RequestBody Goodsorder pageWrap) { |
| | | |
| | | pageWrap.setEndDate(pageWrap.getEndDate() != null ? pageWrap.getEndDate():pageWrap.getStartDate()); |
| | | return ApiResponse.success(goodsorderService.getTotalData(pageWrap)); |
| | | } |
| | | |
| | |
| | | @RequiresPermissions("business:goodsorder:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Goodsorder> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Goodsorder.class).exportWithFirstAndEnd(goodsorderService.findPage(pageWrap).getRecords(), "订单列表_"+System.currentTimeMillis(),"订单列表_"+ DateUtil.getPlusTime2(DateUtil.getCurrentDate()),null, response); |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation("套餐卡订单列表-导出Excel") |
| | | @PostMapping("/discountExportExcel") |
| | | @RequiresPermissions("business:goodsorder:exportExcel") |
| | | public void discountExportExcel (@RequestBody PageWrap<Goodsorder> pageWrap, HttpServletResponse response) { |
| | | List<Goodsorder> goodsorders = goodsorderService.findPage(pageWrap).getRecords(); |
| | | List<DiscountGoodsorderExportVO> discountGoodsorderExportVOList = new ArrayList<>(); |
| | | for (Goodsorder goodsorder:goodsorders) { |
| | | DiscountGoodsorderExportVO discountGoodsorderExportVO = new DiscountGoodsorderExportVO(); |
| | | BeanUtils.copyProperties(goodsorder,discountGoodsorderExportVO); |
| | | discountGoodsorderExportVO.setPayMoney(discountGoodsorderExportVO.getPayMoney()); |
| | | discountGoodsorderExportVOList.add(discountGoodsorderExportVO); |
| | | } |
| | | ExcelExporter.build(DiscountGoodsorderExportVO.class).exportWithFirstAndEnd(discountGoodsorderExportVOList, "订单列表_"+System.currentTimeMillis(),"订单列表_"+ DateUtil.getPlusTime2(DateUtil.getCurrentDate()),null, response); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("收款明细(微信对账明细)_分页查询") |
| | | @PostMapping("/pageAccountDetail") |
| | | @RequiresPermissions("business:goodsorder:query") |
| | | public ApiResponse<PageData<GoodsorderExportVO>> findPageAccountDetail(@RequestBody PageWrap<Goodsorder> pageWrap) { |
| | | return ApiResponse.success(goodsorderService.findAccountDetailPage(pageWrap)); |
| | | return ApiResponse.success(goodsorderService.findAccountDetailPage(pageWrap)); |
| | | } |
| | | @ApiOperation("收款明细(微信对账明细)_导出Excel") |
| | | @PostMapping("/exportAccountDetailExcel") |
| | | @RequiresPermissions("business:goodsorder:exportExcel") |
| | | public void exportAccountDetailExcel (@RequestBody PageWrap<Goodsorder> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(GoodsorderExportVO.class).exportWithFirstAndEnd(goodsorderService.findExportAccountDetailPage(pageWrap.getModel()), "账单收款明细_"+System.currentTimeMillis(),"账单收款明细_"+ DateUtil.getPlusTime2(DateUtil.getCurrentDate()),null, response); |
| | | ExcelExporter.build(GoodsorderExportVO.class).exportWithFirstAndEnd(goodsorderService.findExportAccountDetailPage(pageWrap.getModel()), "账单收款明细_"+System.currentTimeMillis(),"账单收款明细_"+ DateUtil.getPlusTime2(DateUtil.getCurrentDate()),null, response); |
| | | } |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | |
| | | return ApiResponse.success(goodsorderService.getGoodsorderDetailDTO(id)); |
| | | } |
| | | |
| | | @ApiOperation("订单详情-套餐卡") |
| | | @GetMapping("/discountOrderDetail") |
| | | @RequiresPermissions("business:goodsorder:query") |
| | | public ApiResponse<GoodsorderDetailVO> discountOrderDetail(@RequestParam String id) { |
| | | return ApiResponse.success(goodsorderService.getGoodsorderDetailForDisCount(id)); |
| | | } |
| | | |
| | | /** |
| | | * 强制结算订单 |
| | |
| | | @PostMapping("/backGoodsorder") |
| | | @RequiresPermissions("business:goodsorder:query") |
| | | public ApiResponse backGoodsorder(@RequestBody GoodsorderBackDTO goodsorderBackDTO){ |
| | | goodsorderService.backGoodsorder(goodsorderBackDTO.getOrderId(),goodsorderBackDTO.getMoney(),goodsorderBackDTO.getReason()); |
| | | goodsorderService.backGoodsorder(goodsorderBackDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |