| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.config.SmsProperties; |
| | | import com.ruoyi.common.constant.AmountConstant; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | |
| | | import com.ruoyi.system.query.TBillQuery; |
| | | import com.ruoyi.system.query.TInvoiceToBillQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.TBillVO; |
| | | import com.taxi591.bankapi.dto.ChargeBillRequest; |
| | | import com.tencentcloudapi.sms.v20190711.SmsClient; |
| | | import com.tencentcloudapi.sms.v20190711.models.SendSmsRequest; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageInfo<TBill> getBillByInvoiceId(String invoiceId){ |
| | | invoiceId = "1889552849671061505"; |
| | | PageInfo<TBill> pageInfo = new PageInfo<>(); |
| | | ArrayList<TBill> bills = new ArrayList<>(); |
| | | public PageInfo<TBillDto> getBillByInvoiceId(String invoiceId){ |
| | | PageInfo<TBillDto> pageInfo = new PageInfo<>(); |
| | | ArrayList<TBillDto> bills = new ArrayList<>(); |
| | | TInvoiceToBillQuery query = new TInvoiceToBillQuery(); |
| | | query.setInvoiceId(invoiceId); |
| | | List<TInvoiceToBill> tInvoiceToBills = tInvoiceToBillService.makeQuery(query); |
| | | for (TInvoiceToBill tInvoiceToBill : tInvoiceToBills) { |
| | | TBill byId = getById(tInvoiceToBill.getBillId()); |
| | | bills.add(byId); |
| | | TBill bill = getById(tInvoiceToBill.getBillId()); |
| | | if (bill != null && bill.getId() != null){ |
| | | TBillDto detailByBillId = getDetailByBillId(bill.getId()); |
| | | bills.add(detailByBillId); |
| | | } |
| | | } |
| | | pageInfo.setRecords(bills); |
| | | return pageInfo; |
| | |
| | | for (String billId : dto.getBillIds()) { |
| | | TBillDto bill = getDetailByBillId(billId); |
| | | if (bill.getSmsLastTime()!=null |
| | | && (System.currentTimeMillis()-bill.getSmsLastTime().getTime()<smsUtil.getPro().getBillSmsDelayPeriod()*60*1000L)){ |
| | | && (System.currentTimeMillis()-bill.getSmsLastTime().getTime()<mailUtil.getPro().getBillSmsDelayPeriod()*60*1000L)){ |
| | | throw new ServiceException("有账单最近一次发送的时间是:"+DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,bill.getSmsLastTime())); |
| | | } |
| | | if (StringUtils.isEmpty(bill.getPhone())){ |