| | |
| | | import org.springblade.modules.recovery.entity.Recovery; |
| | | import org.springblade.modules.recovery.service.RecoveryService; |
| | | import org.springblade.modules.recovery.vo.RecoveryVO; |
| | | import org.springblade.modules.stock.vo.StocksVO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return R.status(recoveryService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 数据统计采收详情 |
| | | */ |
| | | @PostMapping("/recoveryStatistics") |
| | | public R<IPage<RecoveryVO>> recoveryStatistics(RecoveryVO recoveryVO, Query query){ |
| | | IPage<RecoveryVO> pages = recoveryService.recoveryStatistics(Condition.getPage(query), recoveryVO); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 小程序采收详情列表自定义分页 |
| | |
| | | * @return |
| | | */ |
| | | RecoveryVO getRecoveryDetail(@Param("recoveryId") Integer recoveryId); |
| | | |
| | | IPage<RecoveryVO> recoveryStatistics(IPage<Object> page, @Param("recovery") RecoveryVO recoveryVO); |
| | | } |
| | |
| | | left join sys_land sl on sl.id = sr.land_id |
| | | where sr.id = #{recoveryId} |
| | | </select> |
| | | <select id="recoveryStatistics" resultType="org.springblade.modules.recovery.vo.RecoveryVO"> |
| | | SELECT sr.strain_id,SUM(sr.weight) AS weight,sr.dept_id,strain.strain_name,strain.url |
| | | FROM sys_recovery sr |
| | | LEFT JOIN sys_strain strain ON sr.strain_id = strain.id |
| | | WHERE 1=1 |
| | | <if test="recovery.deptId !=null and recovery.deptId !=''"> |
| | | AND sr.dept_id = #{recovery.deptId} |
| | | </if> |
| | | <if test="recovery.startTime != null and recovery.startTime !=''"> |
| | | AND DATE_FORMAT(sr.create_time,'%Y-%m-%d') >= #{recovery.startTime} |
| | | </if> |
| | | <if test="recovery.endTime != null and recovery.endTime !=''"> |
| | | and DATE_FORMAT(sr.create_time,'%Y-%m-%d') <= #{recovery.endTime} |
| | | </if> |
| | | GROUP BY strain_id |
| | | </select> |
| | | </mapper> |
| | |
| | | * @return |
| | | */ |
| | | RecoveryVO getRecoveryDetail(Integer recoveryId); |
| | | |
| | | IPage<RecoveryVO> recoveryStatistics(IPage<Object> page, RecoveryVO recoveryVO); |
| | | } |
| | |
| | | public RecoveryVO getRecoveryDetail(Integer recoveryId) { |
| | | return baseMapper.getRecoveryDetail(recoveryId); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<RecoveryVO> recoveryStatistics(IPage<Object> page, RecoveryVO recoveryVO) { |
| | | return baseMapper.recoveryStatistics(page,recoveryVO); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private String realName; |
| | | |
| | | private String weight; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private String startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private String endTime; |
| | | } |