|
@@ -282,6 +282,64 @@ public class PayInvoiceServiceImpl implements PayinvoiceService {
|
|
|
return printInvoiceDataAccountBaseInfo;
|
|
|
}
|
|
|
|
|
|
+ public PrintInvoiceData getPrintDataOfTransLongquan(String payseriesno){
|
|
|
+ //获取缴费信息
|
|
|
+ PrintInvoiceData printInvoiceData=payInvoiceMapper.countTransactiondetails(payseriesno);
|
|
|
+ PrintInvoiceData printDataLongquan;
|
|
|
+ if(printInvoiceData != null && printInvoiceData.getAccountId() != null){
|
|
|
+ //获取用户信息
|
|
|
+ printDataLongquan = payInvoiceMapper.getAccountInfoPrint(printInvoiceData.getAccountId());
|
|
|
+
|
|
|
+ //获取应收/水量信息
|
|
|
+ PrintInvoiceData payInvoiceReceivable = payInvoiceMapper.getPayInvoiceReceivable(payseriesno);
|
|
|
+ //拼装数据
|
|
|
+ DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+ if(payInvoiceReceivable != null){
|
|
|
+ printDataLongquan.setLastreading(payInvoiceReceivable.getLastreading());
|
|
|
+ printDataLongquan.setReading(payInvoiceReceivable.getReading());
|
|
|
+ printDataLongquan.setPayamount(payInvoiceReceivable.getPayamount());
|
|
|
+ printDataLongquan.setPrice1(payInvoiceReceivable.getPrice1());
|
|
|
+ printDataLongquan.setReceivablefee1(payInvoiceReceivable.getReceivablefee1());
|
|
|
+ printDataLongquan.setPrice3(payInvoiceReceivable.getPrice3());
|
|
|
+ printDataLongquan.setReceivablefee3(payInvoiceReceivable.getReceivablefee3());
|
|
|
+ printDataLongquan.setPrice4(payInvoiceReceivable.getPrice4());
|
|
|
+ printDataLongquan.setReceivablefee4(payInvoiceReceivable.getReceivablefee4());
|
|
|
+ printDataLongquan.setReceivablefee(payInvoiceReceivable.getReceivablefee());
|
|
|
+ if(printInvoiceData.getApprovetime()!=null){
|
|
|
+ printDataLongquan.setApproveDate(df.format(printInvoiceData.getApprovetime()));
|
|
|
+ }else{
|
|
|
+ printDataLongquan.setApproveDate(df.format(LocalDateTime.now()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ printDataLongquan.setTransamount(printInvoiceData.getTransamount());
|
|
|
+ printDataLongquan.setLastRemaining(printInvoiceData.getLastRemaining());
|
|
|
+ printDataLongquan.setRemaining(printInvoiceData.getRemaining());
|
|
|
+ printDataLongquan.setCreateBy(printInvoiceData.getCreateBy());
|
|
|
+
|
|
|
+ if(printInvoiceData.getCreateDate()!=null){
|
|
|
+ printDataLongquan.setCreateDate(printInvoiceData.getCreateDate());
|
|
|
+ printDataLongquan.setPaydate(df.format(printInvoiceData.getCreateDate()));
|
|
|
+ }else{
|
|
|
+ printDataLongquan.setCreateDate(LocalDateTime.now());
|
|
|
+ printDataLongquan.setPaydate(df.format(LocalDateTime.now()));
|
|
|
+ }
|
|
|
+ if(payInvoiceReceivable != null && payInvoiceReceivable.getApprovetime() != null){
|
|
|
+ printDataLongquan.setApprovetime(payInvoiceReceivable.getApprovetime());
|
|
|
+ printDataLongquan.setApproveDate(df.format(payInvoiceReceivable.getApprovetime()));
|
|
|
+ }else{
|
|
|
+ printDataLongquan.setApprovetime(LocalDateTime.now());
|
|
|
+ printDataLongquan.setApproveDate(df.format(LocalDateTime.now()));
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ throw new ServiceException(ResultStatus.OPERATE_RECORD_NOT_EXIT);
|
|
|
+ }
|
|
|
+ printDataLongquan.setPrintType(1);
|
|
|
+ printDataLongquan.setPayseriesno(payseriesno);
|
|
|
+ printDataLongquan.setInvoiceNo(
|
|
|
+ DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS").format(LocalDateTime.now())+""+(int)(Math.random()*1000));
|
|
|
+ return printDataLongquan;
|
|
|
+ }
|
|
|
/**
|
|
|
* 打印收据——缴纳欠费(transtype == null || (transtype ==2 ||transtype ==4))
|
|
|
* @param payseriesno
|