| | |
| | | } |
| | | |
| | | /** |
| | | * 获取农事记录详情带中文 |
| | | * @param farmingRecordVO |
| | | * @return |
| | | */ |
| | | @GetMapping("/details") |
| | | public R details(FarmingRecordVO farmingRecordVO){ |
| | | return R.data(farmService.getDetails(farmingRecordVO)); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | |
| | | @ApiOperation(value = "分页", notes = "传入farm") |
| | | public R<IPage<FarmingRecordVO>> page(FarmingRecordVO farm, Query query) { |
| | | IPage<FarmingRecordVO> pages = farmService.selectFarmingRecordPage(Condition.getPage(query), farm); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | @GetMapping("/pageNz") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入farm") |
| | | public R<IPage<FarmingRecordVO>> pageNz(FarmingRecordVO farm, Query query) { |
| | | IPage<FarmingRecordVO> pages = farmService.selectFarmingRecordPageByNz(Condition.getPage(query), farm); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | soldrService.dels(id); |
| | | } else { |
| | | soldrecordService.updateSold(amount1 - farm.getSnum(), id, detail.getCensus() - v); |
| | | detail.setAmount1(detail.getAmount1()-farm.getSnum()); |
| | | soldrService.updateById(detail); |
| | | } |
| | | } |
| | | return R.status(farmService.save(farm)); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getFarmingCount") |
| | | public R getFarmingCount(String deptId) { |
| | | return R.data(farmService.getFarmingCount(deptId)); |
| | | public R getFarmingCount(String farmId) { |
| | | return R.data(farmService.getFarmingCount(farmId)); |
| | | } |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getFarmingStatis") |
| | | public R getFarmingStatis(String deptId) { |
| | | return R.data(farmService.getFarmingStatis(deptId)); |
| | | public R getFarmingStatis(String farmId) { |
| | | return R.data(farmService.getFarmingStatis(farmId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 大屏农资使用概况统计 |
| | | * |
| | | * @param farmId 农场id |
| | | * @return |
| | | */ |
| | | @GetMapping("/getStockCount") |
| | | public R getStockCount(String deptId) { |
| | | public R getStockCount(String farmId) { |
| | | //今年 |
| | | Double aDouble = farmService.selectJyCount(deptId); |
| | | Double aDouble = farmService.selectJyCount(farmId); |
| | | //去年 |
| | | Double aDouble1 = farmService.selectQyCount(deptId); |
| | | Double aDouble1 = farmService.selectQyCount(farmId); |
| | | //本月 |
| | | Double aDouble2 = farmService.selectByCount(deptId); |
| | | Double aDouble2 = farmService.selectByCount(farmId); |
| | | Map map = new HashMap(); |
| | | map.put("jn", aDouble); |
| | | map.put("qn", aDouble1); |