| | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | * 查询销售台账列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SalesLedger salesLedger) |
| | | public TableDataInfo list(SalesLedgerDto salesLedgerDto) |
| | | { |
| | | startPage(); |
| | | List<SalesLedger> list = salesLedgerService.selectSalesLedgerList(salesLedger); |
| | | List<SalesLedger> list = salesLedgerService.selectSalesLedgerList(salesLedgerDto); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | * 查询销售台账和产品父子列表 |
| | | */ |
| | | @GetMapping("/getSalesLedgerWithProducts") |
| | | public TableDataInfo getSalesLedgerWithProducts() |
| | | { |
| | | startPage(); |
| | | List<SalesLedgerDto> list = salesLedgerService.getSalesLedgerWithProducts(); |
| | | return getDataTable(list); |
| | | public SalesLedgerDto getSalesLedgerWithProducts(SalesLedgerDto salesLedgerDto){ |
| | | return salesLedgerService.getSalesLedgerWithProducts(salesLedgerDto); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Log(title = "销售台账", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SalesLedger salesLedger) |
| | | public void export(HttpServletResponse response, SalesLedgerDto salesLedgerDto) |
| | | { |
| | | List<SalesLedger> list = salesLedgerService.selectSalesLedgerList(salesLedger); |
| | | List<SalesLedger> list = salesLedgerService.selectSalesLedgerList(salesLedgerDto); |
| | | ExcelUtil<SalesLedger> util = new ExcelUtil<SalesLedger>(SalesLedger.class); |
| | | util.exportExcel(response, list, "销售台账数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取销售台账详细信息 |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(salesLedgerService.selectSalesLedgerById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return toAjax(salesLedgerService.deleteSalesLedgerByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 查询销售台账不分页 |
| | | * @param salesLedgerDto |
| | | * @return |
| | | */ |
| | | @GetMapping("/listNoPage") |
| | | public AjaxResult listNoPage(SalesLedgerDto salesLedgerDto){ |
| | | List<SalesLedger> list = salesLedgerService.selectSalesLedgerList(salesLedgerDto); |
| | | return AjaxResult.success(list); |
| | | } |
| | | } |