| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fzzy.igds.constant.RedisConst; |
| | | import com.fzzy.igds.data.QuantityParam; |
| | | import com.fzzy.igds.domain.Quantity; |
| | | import com.fzzy.igds.domain.QuantityConf; |
| | | import com.fzzy.igds.mapper.QuantityConfMapper; |
| | | import com.fzzy.igds.mapper.QuantityMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | |
| | | private QuantityConfMapper quantityConfMapper; |
| | | @Resource |
| | | private RedisCache redisCache; |
| | | @Resource |
| | | private QuantityMapper quantityMapper; |
| | | |
| | | |
| | | /** |
| | | * 分页查询质量检测数据 |
| | | * |
| | | * @author sgj |
| | | * @date 2025/12/18 |
| | | */ |
| | | public void listPageQuantity(Page<Quantity> page, QuantityParam param) { |
| | | QueryWrapper<Quantity> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | param.setCompanyId(ContextUtil.getCompanyId()); |
| | | param.setDeptId(ContextUtil.subDeptId(null)); |
| | | queryWrapper.eq("company_id", param.getCompanyId()); |
| | | queryWrapper.eq("dept_id", param.getDeptId()); |
| | | |
| | | //仓库检索 |
| | | if (StringUtils.isNotBlank(param.getDepotId())) { |
| | | queryWrapper.eq("depot_id", param.getDepotId()); |
| | | } |
| | | //时间检索 |
| | | if(param.getStart() != null){ |
| | | queryWrapper.ge("receive_date", param.getStart()); |
| | | } |
| | | if(param.getEnd() != null){ |
| | | queryWrapper.le("receive_date", param.getEnd()); |
| | | } |
| | | queryWrapper.orderByAsc("receive_date"); |
| | | quantityMapper.selectPage(page, queryWrapper); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 查询配置信息,根据库区编码获取 |