| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.sd.OrderDTO; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | |
| | | import com.example.erp.tools.DownExcel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | } |
| | | |
| | | @ApiOperation("根据id获取订单信息") |
| | | @SaCheckPermission("selectOrder.edit") |
| | | @PostMapping("/getOrderById/{id}") |
| | | public Result getOrderById(@PathVariable String id) { |
| | | return Result.seccess(orderService.getOrderById(id)); |
| | | } |
| | | |
| | | @ApiOperation("根据id获取订单明细信息") |
| | | @SaCheckPermission("selectOrder.edit") |
| | | @PostMapping("/getOrderDetailById/{id}") |
| | | public Result getOrderDetailById(@PathVariable String id) { |
| | | return Result.seccess(orderService.getOrderDetailById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("查询订单工艺") |
| | | @SaCheckPermission("updateOrderCraft.search") |
| | | @PostMapping("/getOrderCraftById/{id}") |
| | | public Result getOrderCraftById(@PathVariable String id) { |
| | | return Result.seccess(orderService.getOrderCraftById(id)); |
| | | } |
| | | |
| | | @PostMapping("/getOrderCraftDetailById/{id}") |
| | | public Result getOrderCraftDetailById(@PathVariable String id) { |
| | | return Result.seccess(orderService.getOrderCraftDetailById(id)); |
| | | } |
| | | @ApiOperation("审核订单") |
| | | @SaCheckPermission("createOrder.review") |
| | |
| | | } |
| | | @ApiOperation("订单报表导出") |
| | | @PostMapping("/exportOrderReport") |
| | | public void exportOrderReport(HttpServletResponse response) throws IOException, IllegalAccessException, InstantiationException { |
| | | DownExcel.download(response,Order.class, orderService.exportOrderReport(),"orderReport"); |
| | | public void exportOrderReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, OrderDTO.class, orderService.exportOrderReport(dates),"orderReport"); |
| | | } |
| | | |
| | | @ApiOperation("订单产品汇总报表导出") |
| | | @PostMapping("/exportOrderProductSummary") |
| | | public void exportOrderProductSummary(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, OrderDTO.class, orderService.exportOrderProductSummary(dates),"orderReport"); |
| | | } |
| | | |
| | | @ApiOperation("订单小片标签") |
| | | @PostMapping("/getOrderProductDetailTag/{orderId}") |
| | | public Result getOrderProductDetailTag(@PathVariable String orderId) { |
| | | return Result.seccess(orderService.getOrderProductDetailTag(orderId)); |
| | | } |
| | | |
| | | |
| | | } |