| | |
| | | import com.fzzy.igds.domain.PledgeContract; |
| | | import com.fzzy.igds.mapper.PledgeContractMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.DateUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | queryWrapper.orderByDesc("update_time"); |
| | | |
| | | return pledgeContractMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件查询 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public PledgeContract getOne(String id) { |
| | | |
| | | QueryWrapper<PledgeContract> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("id", id); |
| | | return pledgeContractMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | |
| | |
| | | * @param curTime |
| | | * @return |
| | | */ |
| | | public List<PledgeContract> getContractByPledge(Date curTime) { |
| | | public List<PledgeContract> getContractByPledge(Date curTime, String bankId) { |
| | | QueryWrapper<PledgeContract> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("company_id", ContextUtil.getCompanyId()); |
| | | |
| | |
| | | queryWrapper.like("status", Constant.YN_N); |
| | | |
| | | //质押期间 |
| | | queryWrapper.ge("pledge_start", curTime); |
| | | queryWrapper.le("pledge_end", curTime); |
| | | queryWrapper.le("pledge_start", curTime); |
| | | queryWrapper.ge("pledge_end", curTime); |
| | | if (StringUtils.isNotBlank(bankId)) { |
| | | queryWrapper.eq("pledge_bank", bankId); |
| | | } |
| | | |
| | | queryWrapper.orderByDesc("update_time"); |
| | | |