| | |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 农事记录控制器 |
| | |
| | | } |
| | | |
| | | /** |
| | | * xcx数据统计采收详情 |
| | | */ |
| | | @GetMapping("/recoveryStatisticsx") |
| | | public R recoveryStatisticsx( RecoveryVO recoveryVO, Query query){ |
| | | IPage<RecoveryVO> pages = recoveryService.recoveryStatisticsx(Condition.getPage(query), recoveryVO); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 小程序采收详情列表自定义分页 |
| | | */ |
| | | @GetMapping("/pagec") |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.recovery.entity.Recovery; |
| | | import org.springblade.modules.recovery.vo.RecoveryVO; |
| | | import org.springblade.modules.stock.vo.StocksVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | RecoveryVO getRecoveryDetail(@Param("recoveryId") Integer recoveryId); |
| | | |
| | | IPage<RecoveryVO> recoveryStatistics(IPage<Object> page, @Param("recovery") RecoveryVO recoveryVO); |
| | | |
| | | IPage<RecoveryVO> recoveryStatisticsx(IPage<Object> page, @Param("recovery")RecoveryVO recoveryVO); |
| | | } |
| | |
| | | <if test="recovery.endTime != null and recovery.endTime !=''"> |
| | | and DATE_FORMAT(sr.create_time,'%Y-%m-%d') <= #{recovery.endTime} |
| | | </if> |
| | | GROUP BY strain_id |
| | | GROUP BY sr.strain_id |
| | | </select> |
| | | <select id="recoveryStatisticsx" 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 sr.strain_id |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.recovery.entity.Recovery; |
| | | import org.springblade.modules.recovery.vo.RecoveryVO; |
| | | import org.springblade.modules.stock.vo.StocksVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 采收记录服务类 |
| | |
| | | RecoveryVO getRecoveryDetail(Integer recoveryId); |
| | | |
| | | IPage<RecoveryVO> recoveryStatistics(IPage<Object> page, RecoveryVO recoveryVO); |
| | | |
| | | IPage<RecoveryVO> recoveryStatisticsx(IPage<Object> page, RecoveryVO recoveryVO); |
| | | } |
| | |
| | | import org.springblade.modules.recovery.mapper.RecoveryMapper; |
| | | import org.springblade.modules.recovery.service.RecoveryService; |
| | | import org.springblade.modules.recovery.vo.RecoveryVO; |
| | | import org.springblade.modules.stock.vo.StocksVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | public IPage<RecoveryVO> recoveryStatistics(IPage<Object> page, RecoveryVO recoveryVO) { |
| | | return baseMapper.recoveryStatistics(page,recoveryVO); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<RecoveryVO> recoveryStatisticsx(IPage<Object> page, RecoveryVO recoveryVO) { |
| | | return baseMapper.recoveryStatisticsx(page,recoveryVO); |
| | | } |
| | | } |