| | |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入sale") |
| | | public R submit(@Valid @RequestBody Sale sale) { |
| | | public R submit(@Valid @RequestBody SaleVO sale) { |
| | | boolean res = farmProductStockService.stockCompare(sale.getSaleNum(),sale.getStrainId()); |
| | | if (!res){ |
| | | throw new org.springblade.core.log.exception.ServiceException(StringUtil.format("当前库存不足!")); |
| | |
| | | |
| | | /** |
| | | * 统计市场流通/去年流通量/本月流通量 |
| | | * @param sale |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectMarketCirculate") |
| | | public R selectMarketCirculate() { |
| | | return R.data(saleService.selectMarketCirculate()); |
| | | public R selectMarketCirculate(SaleVO sale) { |
| | | return R.data(saleService.selectMarketCirculate(sale)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R selectMarketDistrict() { |
| | | return R.data(saleService.selectMarketDistrict()); |
| | | } |
| | | |
| | | } |