| | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | 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.exception.ServiceException; |
| | | import com.example.erp.service.sd.OrderService; |
| | | 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; |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | public Result deleteOrder(@PathVariable String id) { |
| | | return Result.seccess(orderService.deleteOrder(id)); |
| | | } |
| | | |
| | | @ApiOperation("订单作废") |
| | | @PostMapping("/cancelOrder/{id}") |
| | | public Result cancelOrder(@PathVariable String id) { |
| | | return Result.seccess(orderService.cancelOrder(id)); |
| | | } |
| | | |
| | | @ApiOperation("根据id获取订单信息") |
| | | @PostMapping("/getOrderById/{id}") |
| | | public Result getOrderById(@PathVariable String id) { |
| | |
| | | public Result updateOrderMoney(@RequestBody Map<String,Object> map) { |
| | | return Result.seccess(orderService.updateOrderMoney(map)); |
| | | } |
| | | |
| | | @ApiOperation("查询订单报表") |
| | | @PostMapping("/getOrderReport/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getOrderReport(@PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable List<String> selectDate, |
| | | @RequestBody OrderDetail orderDetail) { |
| | | return Result.seccess(orderService.getOrderReport(pageNum,pageSize,selectDate,orderDetail)); |
| | | |
| | | } |
| | | @ApiOperation("订单报表导出") |
| | | @PostMapping("/exportOrderReport") |
| | | public void exportOrderReport(HttpServletResponse response) throws IOException, IllegalAccessException, InstantiationException { |
| | | DownExcel.download(response,Order.class, orderService.exportOrderReport(),"orderReport"); |
| | | } |
| | | } |