| | |
| | | |
| | | /** |
| | | * 农事记录控制器 |
| | | * @since 2022-05-18 |
| | | * |
| | | * @author zhongrj |
| | | * @since 2022-05-18 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | |
| | | record.setLandId(recovery.getLandId()); |
| | | record.setOperator(recovery.getOperator()); |
| | | Strain strain = strainService.getById(recovery.getStrainId()); |
| | | record.setRemarks("品种: "+strain.getStrainName() +", 重量:"+recovery.getWeight()); |
| | | record.setContent("品种: " + strain.getStrainName() + ", 重量:" + recovery.getWeight()); |
| | | //新增 |
| | | farmingRecordService.save(record); |
| | | |
| | |
| | | |
| | | /** |
| | | * double 相加 |
| | | * |
| | | * @param d1 |
| | | * @param d2 |
| | | * @return |
| | |
| | | return R.status(recoveryService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 小程序采收详情列表自定义分页 |
| | | */ |
| | | @GetMapping("/pagec") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入recovery") |
| | | public R<IPage<RecoveryVO>> pagec(RecoveryVO recovery, Query query) { |
| | | IPage<RecoveryVO> pages = recoveryService.selectRecoveryPage(Condition.getPage(query), recovery); |
| | | for (int i = 0; i < pages.getRecords().size(); i++) { |
| | | String jobWay = pages.getRecords().get(i).getJobWay(); |
| | | if (jobWay.equals("0")) { |
| | | pages.getRecords().get(i).setLx("人工"); |
| | | } else { |
| | | pages.getRecords().get(i).setLx("机械"); |
| | | } |
| | | |
| | | } |
| | | return R.data(pages); |
| | | } |
| | | } |