| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.importExcel.TBankFlowImportExcel; |
| | | import com.ruoyi.system.mapper.TBankFlowMapper; |
| | |
| | | .ge(StringUtils.isNotEmpty(query.getPayStartTime()),TBankFlow::getPayTime,query.getPayStartTime()) |
| | | .lt(StringUtils.isNotEmpty(query.getPayEndTime()),TBankFlow::getPayTime,query.getPayEndTime()) |
| | | .eq(null != query.getFlowStatus(),TBankFlow::getFlowStatus,query.getFlowStatus()) |
| | | .eq(StringUtils.isNotEmpty(query.getBusinessDeptId())&& !"0".equals(query.getBusinessDeptId()),TBankFlow::getBusinessDeptId,query.getBusinessDeptId()) |
| | | .orderByDesc(TBankFlow::getCreateTime); |
| | | return this.baseMapper.selectPage(pageInfo, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public TBankFlowStatisticsVo getPaymentStats(TBankFlowQuery query) { |
| | | return this.baseMapper.getPaymentStats(query); |
| | | return this.baseMapper.getPaymentStats(query,SecurityUtils.getBusinessDeptId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public List<TBankFlow> searchByBankSerialNumber(String bankSerialNumber) { |
| | | String businessDeptId = SecurityUtils.getBusinessDeptId(); |
| | | |
| | | LambdaQueryWrapper<TBankFlow> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.like(StringUtils.isNotEmpty(bankSerialNumber),TBankFlow::getBankSerialNumber,bankSerialNumber) |
| | | .eq(StringUtils.isNotEmpty(bankSerialNumber) && !"0".equals(bankSerialNumber),TBankFlow::getBusinessDeptId,businessDeptId) |
| | | .orderByDesc(TBankFlow::getPayTime); |
| | | |
| | | PageInfo<TBankFlow> pageInfo = new PageInfo<>(1, 20); |
| | | pageInfo = this.baseMapper.selectPage(pageInfo, queryWrapper); |
| | | return pageInfo.getRecords(); |
| | |
| | | |
| | | @Override |
| | | public void saveImportBatch(List<TBankFlowImportExcel> list, List<TBankFlowImportExcel> failList) { |
| | | String businessDeptId = SecurityUtils.getBusinessDeptId(); |
| | | for (TBankFlowImportExcel row : list) { |
| | | try { |
| | | TBankFlow preexist = findUniq(row.getBankSerialNumber()); |
| | |
| | | } |
| | | TBankFlow flow = new TBankFlow(); |
| | | BeanUtils.copyProperties(row,flow); |
| | | flow.setBusinessDeptId(businessDeptId); |
| | | try { |
| | | LocalDateTime parse = LocalDateTime.parse(row.getPayTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | flow.setPayTime(parse); |