| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fzzy.igds.data.IgdsBaseParam; |
| | | import com.fzzy.igds.domain.InoutLossOver; |
| | | import com.fzzy.igds.domain.InoutStockChange; |
| | | import com.fzzy.igds.mapper.InoutLossOverMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.DateUtil; |
| | |
| | | inoutLossOverMapper.selectPage(page, queryWrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询库区下所有信息 |
| | | * 根据时间类型,获取数据 |
| | | * @param timeType |
| | | * @param param |
| | | * @return |
| | | */ |
| | | public List<InoutLossOver> listData(String companyId, String deptId) { |
| | | public List<InoutLossOver> getDataByTime(String timeType, IgdsBaseParam param) { |
| | | if(StringUtils.isBlank(timeType)){ |
| | | return null; |
| | | } |
| | | |
| | | QueryWrapper<InoutLossOver> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | if(StringUtils.isNotBlank(companyId)){ |
| | | queryWrapper.eq("company_id", companyId); |
| | | } |
| | | if(StringUtils.isNotBlank(deptId)){ |
| | | queryWrapper.eq("dept_id", deptId); |
| | | } |
| | | queryWrapper.orderByDesc("id"); |
| | | queryWrapper.likeRight("dept_id", param.getDeptId()); |
| | | queryWrapper.ge(timeType, param.getStart()); |
| | | queryWrapper.le(timeType, param.getEnd()); |
| | | queryWrapper.orderByAsc("loss_time"); |
| | | |
| | | return inoutLossOverMapper.selectList(queryWrapper); |
| | | } |