| | |
| | | import org.springblade.modules.farmplant.vo.FarmPlantVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 农场养殖记录表服务实现类 |
| | | * @since 2022-05-12 |
| | |
| | | */ |
| | | @Override |
| | | public IPage<FarmPlantVO> selectFarmPlantPage(IPage<FarmPlantVO> page, FarmPlantVO farm) { |
| | | return page.setRecords(baseMapper.selectFarmPlantPage(page, farm)); |
| | | List<FarmPlantVO> farmPlantVOS = baseMapper.selectFarmPlantPage(page, farm); |
| | | //遍历 |
| | | farmPlantVOS.forEach(farmPlantVO -> { |
| | | if (farmPlantVO.getLandUnit().equals("0")){ |
| | | farmPlantVO.setArea(farmPlantVO.getArea()+"亩"); |
| | | } |
| | | if (farmPlantVO.getLandUnit().equals("1")){ |
| | | farmPlantVO.setArea(farmPlantVO.getArea()+"分"); |
| | | } |
| | | if (farmPlantVO.getLandUnit().equals("2")){ |
| | | farmPlantVO.setArea(farmPlantVO.getArea()+"平方米"); |
| | | } |
| | | }); |
| | | return page.setRecords(farmPlantVOS); |
| | | } |
| | | } |