Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 1 year ago
parent
commit
5c3c2b4177
  1. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincollectionconfirmation/FinCollectionConfirmationFeign.java
  2. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincollectionconfirmation/FinCollectionConfirmationFeignFallback.java
  3. 32
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincollectionconfirmation/rsk/FinRskPdfVehVo.java
  4. 5
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationRest.java
  5. 113
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  6. 2126
      anrui-fin/anrui-fin-biz/src/main/resources/ftl/rskjiguang.ftl
  7. 3056
      anrui-fin/anrui-fin-biz/src/main/resources/ftl/rskzhenshi.ftl
  8. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/wx/WxSysUserRest.java
  9. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanbuckleapply/LoanBuckleApplyFeign.java
  10. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanbuckleapply/LoanBuckleApplyFeignFallback.java
  11. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyFallback.java
  12. 4
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyFeign.java
  13. 20
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanmonthlyaccrualapply/MonthlyAccrualSourceLCVo.java
  14. 8
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java
  15. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java
  16. 29
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanVoucherPdf.java
  17. 4
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantransferpaymentapply/LoanTransferPaymentApplyFeign.java
  18. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantransferpaymentapply/LoanTransferPaymentApplyFeignFallback.java
  19. 1
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantransferpaymentapply/LoanTransferPaymentRecordVo.java
  20. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbuckleapply/LoanBuckleApplyRest.java
  21. 173
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbuckleapply/LoanBuckleApplyService.java
  22. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyRest.java
  23. 175
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java
  24. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java
  25. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java
  26. 763
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java
  27. 3
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loantransferpaymentapply/LoanTransferPaymentApplyMapper.xml
  28. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loantransferpaymentapply/LoanTransferPaymentApplyRest.java
  29. 191
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loantransferpaymentapply/LoanTransferPaymentApplyService.java
  30. 2831
      anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/monthApply2.ftl
  31. 2527
      anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/monthBuckle.ftl
  32. 3455
      anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/monthapply.ftl
  33. 3958
      anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/repayment1.ftl
  34. 6512
      anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/repayment2.ftl
  35. 9047
      anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/repayment3.ftl
  36. 3127
      anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/transferPay.ftl
  37. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmapplyinbound/ScmApplyInboundQuery.java
  38. 12
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmapplyinbound/ScmApplyInboundService.java
  39. 66
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrack.java
  40. 67
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrackDetailsVo.java
  41. 67
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrackDto.java
  42. 65
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrackQuery.java
  43. 67
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrackVo.java
  44. 62
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbilltrack/AsBusrepairBillTrackMapper.java
  45. 13
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbilltrack/AsBusrepairBillTrackMapper.xml
  46. 93
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbilltrack/AsBusrepairBillTrackRest.java
  47. 100
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbilltrack/AsBusrepairBillTrackService.java
  48. 1
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asservicetype/AsServiceTypeService.java
  49. 2
      yxt-as/src/main/java/com/yxt/anrui/as/feign/flowable/flow/ProcDefEnum.java
  50. 3
      工作内容需要的文档/单据模板/财务凭证打印模板/代付审批/transferPay.ftl
  51. 48
      工作内容需要的文档/单据模板/财务凭证打印模板/代付审批/代收代付.docx
  52. 2523
      工作内容需要的文档/单据模板/财务凭证打印模板/划扣/monthBuckle.ftl
  53. 37
      工作内容需要的文档/单据模板/财务凭证打印模板/划扣/月还划扣.docx
  54. 3455
      工作内容需要的文档/单据模板/财务凭证打印模板/月还计提/monthapply.ftl
  55. 38
      工作内容需要的文档/单据模板/财务凭证打印模板/月还计提/月还计提.docx
  56. 3958
      工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/repayment1.ftl
  57. 6512
      工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/repayment2.ftl
  58. 9047
      工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/repayment3.ftl
  59. 78
      工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/还款计划1.docx
  60. 143
      工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/还款计划2.docx
  61. 208
      工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/还款计划3.docx
  62. 3
      工作内容需要的文档/单据模板/财务凭证打印模板/金融收款单/rskjiguang.ftl
  63. 3
      工作内容需要的文档/单据模板/财务凭证打印模板/金融收款单/rskzhenshi.ftl
  64. 11
      工作内容需要的文档/单据模板/财务凭证打印模板/金融收款单/金融收款单模板(激光打印机).doc
  65. 10
      工作内容需要的文档/单据模板/财务凭证打印模板/金融收款单/金融收款单模板(针式打印机).doc

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincollectionconfirmation/FinCollectionConfirmationFeign.java

@ -100,6 +100,11 @@ public interface FinCollectionConfirmationFeign {
@ResponseBody
ResultBean<PdfPath> createPdf(@RequestParam("skdSid") String skdSid, @RequestParam("printerType") String printerType);
@ApiOperation("生成金融收款单pdf")
@PostMapping("/createPdfRsk")
@ResponseBody
ResultBean<PdfPath> createPdfRsk(@RequestParam("skdSid") String skdSid, @RequestParam("printerType") String printerType);
@ApiOperation("重推收款单")
@PostMapping("/ctskd")
@ResponseBody

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincollectionconfirmation/FinCollectionConfirmationFeignFallback.java

@ -99,6 +99,11 @@ public class FinCollectionConfirmationFeignFallback implements FinCollectionConf
return null;
}
@Override
public ResultBean<PdfPath> createPdfRsk(String skdSid, String printerType) {
return null;
}
@Override
public ResultBean ctskd(String skdSid) {
return null;

32
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincollectionconfirmation/rsk/FinRskPdfVehVo.java

@ -0,0 +1,32 @@
package com.yxt.anrui.fin.api.fincollectionconfirmation.rsk;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/4/12 16:14
*/
@Data
public class FinRskPdfVehVo {
@ApiModelProperty("序号")
private String id; // 序号
@ApiModelProperty("贷款人")
private String borrowerName; // 贷款人
@ApiModelProperty("资方")
private String bankName; // 资方
@ApiModelProperty("消贷合同号")
private String contractNo; // 消贷合同号
@ApiModelProperty("车架号")
private String vinNo; // 车架号
@ApiModelProperty("收款项目")
private String collPro; // 收款项目
@ApiModelProperty("收款金额")
private String collMoney; // 收款金额
@ApiModelProperty("收款账号")
private String collNum; // 收款账号
@ApiModelProperty("期数")
private String period; // 收款账号
}

5
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationRest.java

@ -122,6 +122,11 @@ public class FinCollectionConfirmationRest implements FinCollectionConfirmationF
return finCollectionConfirmationService.createPdf(skdSid, printerType);
}
@Override
public ResultBean<PdfPath> createPdfRsk(String skdSid, String printerType) {
return finCollectionConfirmationService.createPdfRsk(skdSid,printerType);
}
@Override
public ResultBean ctskd(String skdSid) {
return finCollectionConfirmationService.ctskd(skdSid);

113
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -110,12 +110,10 @@ import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeign;
import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail;
import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherpolicy;
import com.yxt.common.base.config.component.DocPdfComponent;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.HanZiConverterPinYin;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.TransformMoney;
import com.yxt.common.base.utils.WordUtils;
import com.yxt.common.base.utils.*;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
@ -127,6 +125,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -209,6 +209,9 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
private FinPaymentrecordService finPaymentrecordService;
@Autowired
private LoanPushFundHistoryFeign loanPushFundHistoryFeign;
@Autowired
private DocPdfComponent docPdfComponent;
private QueryWrapper<FinCollectionConfirmation> createQueryWrapper(FinCollectionConfirmationQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
@ -3180,6 +3183,102 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
return rb.success().setData(pdfPath);
}
public ResultBean<PdfPath> createPdfRsk(String skdSid, String printerType) {
ResultBean rb = ResultBean.fireFail();
PdfPath pdfPath = new PdfPath();
//获取收款单信息
FinCollectionConfirmation finCollectionConfirmationDetailsVo = fetchBySid(skdSid);
//获取车辆入库单车辆信息查询
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetaileds = finSelectedReceivablesDetailedService.fetchByCillSid(finCollectionConfirmationDetailsVo.getSid());
Map<String, Object> dataMap = new HashMap();
dataMap.put("collDate", finCollectionConfirmationDetailsVo.getCollectionDate());
dataMap.put("payee", finCollectionConfirmationDetailsVo.getPayerName());
dataMap.put("billNo", finCollectionConfirmationDetailsVo.getBillNo());
dataMap.put("settleType", finCollectionConfirmationDetailsVo.getCollectionTypeValue());
dataMap.put("remarks", finCollectionConfirmationDetailsVo.getRemarks());
List<FinRskPdfVehVo> finCollectionConfirmationMaterials = new ArrayList<>();
int id = 0;
//循环获取车辆信息
for (FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo : finSelectedReceivablesDetaileds) {
String planSid = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (finSelectedReceivablesDetailedVo.getReceivablesName().equals("月还")) {
planSid = finSelectedReceivablesDetailedVo.getReceivablesSid();
} else {
FinUncollectedReceivablesDetailedJR jr = finUncollectedReceivablesDetailedJRService.fetchBySid(finSelectedReceivablesDetailedVo.getReceivablesSid());
if (jr != null) {
planSid = jr.getBusSid();
}
}
LoanRepaymentPlanDetails plan = loanRepaymentPlanDetailsFeign.fetchDetails(planSid).getData();
if (null != plan) {
FinRskPdfVehVo r = new FinRskPdfVehVo();
id = id + 1;
if (StringUtils.isNotBlank(plan.getVinNo())) {
r.setVinNo(plan.getVinNo());
}
r.setId(String.valueOf(id));
if (StringUtils.isNotBlank(plan.getBorrowerName())) {
r.setBorrowerName(plan.getBorrowerName());
}
if (StringUtils.isNotBlank(plan.getBankName())) {
r.setBankName(plan.getBankName());
}
if (StringUtils.isNotBlank(plan.getLoanContractNo())) {
r.setContractNo(plan.getLoanContractNo());
}
if (StringUtils.isNotBlank(plan.getPeriod())) {
r.setPeriod(plan.getPeriod());
}
r.setCollPro(finSelectedReceivablesDetailedVo.getReceivablesName());
r.setCollMoney(finSelectedReceivablesDetailedVo.getSubscriptionMoney());
r.setCollNum(finCollectionConfirmationDetailsVo.getCollectionBankNum());
finCollectionConfirmationMaterials.add(r);
}
}
dataMap.put("wlList", finCollectionConfirmationMaterials);
dataMap.put("zcollMoney", finCollectionConfirmationDetailsVo.getCollectionMoney().toString());
String tPriceDX = TransformMoney.transform(finCollectionConfirmationDetailsVo.getCollectionMoney().toString());
dataMap.put("tPriceDX", tPriceDX);
dataMap.put("makeName", finCollectionConfirmationDetailsVo.getCreateByName() + DateUtil.formatDate(new Date()));
dataMap.put("confirmName", finCollectionConfirmationDetailsVo.getConfirmName() + finCollectionConfirmationDetailsVo.getConfirmDate());
String temp = "/template/";
String targetPath = docPdfComponent.getUploadTemplateUrl();
try {
//获取模板
String streamPath = "";
if (printerType.equals("针孔式打印机")) {
streamPath = "ftl/rskzhenshi.ftl";
} else if (printerType.equals("激光打印机")) {
streamPath = "ftl/rskjiguang.ftl";
}
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(streamPath);
//生成word文件名
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String typeName = dateStr + seconds + ".doc";
File file = new File(targetPath + "templateVouchers" + seconds + ".ftl");
File dir = new File(targetPath);
WordConvertUtils.inputStreamToFile(inputStream, file);
WordConvertUtils.creatWord1(dataMap, file, targetPath, typeName, dir);
//新生成的word路径
String wordPath = targetPath + typeName;
String pdfName = "收款单_" + dateStr + seconds + ".pdf";
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName);
pdfPath.setPdfPath(temp + pdfName);
} catch (NoClassDefFoundError e) {
e.printStackTrace();
}
String downNum = finCollectionConfirmationDetailsVo.getDownNum();
if (StringUtils.isBlank(downNum)) {
downNum = "1";
} else {
downNum = String.valueOf((Integer.parseInt(downNum) + 1));
}
baseMapper.updateDown(skdSid, downNum);
return rb.success().setData(pdfPath);
}
public ResultBean updateVin(String vinNo, String contractNo, String temporaryNo) {
ResultBean rb = ResultBean.fireFail();
int i = baseMapper.updateVin(vinNo, contractNo, temporaryNo);
@ -3935,11 +4034,11 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
CollectionVoucher.CollectionVoucherDetail d = getFundVoucher(v, collectionDate, planDetails);
if (null != d) {
CollectionVoucher.CollectionVoucherDetail v1 = new CollectionVoucher.CollectionVoucherDetail();
BeanUtil.copyProperties(d,v1);
BeanUtil.copyProperties(d, v1);
v1.setSceneCode(SceneCodeEnum.FUND_VOUCHER1.getCode());
voucherDetails.add(v1);
CollectionVoucher.CollectionVoucherDetail v2 = new CollectionVoucher.CollectionVoucherDetail();
BeanUtil.copyProperties(d,v2);
BeanUtil.copyProperties(d, v2);
v2.setSceneCode(SceneCodeEnum.FUND_VOUCHER2.getCode());
collectionAfterVoucherDetails.add(v2);
}
@ -5661,4 +5760,6 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
vo.setDownLoadUrl(fils);
return rb.success().setData(vo);
}
}

2126
anrui-fin/anrui-fin-biz/src/main/resources/ftl/rskjiguang.ftl

File diff suppressed because it is too large

3056
anrui-fin/anrui-fin-biz/src/main/resources/ftl/rskzhenshi.ftl

File diff suppressed because it is too large

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/wx/WxSysUserRest.java

@ -315,7 +315,7 @@ public class WxSysUserRest implements WxSysUserFeign {
wxHomePageVo.setHeadImage(fileUploadComponent.getUrlPrefix() + wxHomePageVo.getHeadImage());
}
//2018.08.24-2038.08.24
String idTerm = wxHomePageVo.getIdTerm();
/*String idTerm = wxHomePageVo.getIdTerm();
List<String> split = Arrays.asList(idTerm.split("-"));
if (split.size() == 2) {
String idTermEnd = split.get(1);
@ -325,7 +325,7 @@ public class WxSysUserRest implements WxSysUserFeign {
isHave = true;
wxHomePageVo.setMessage("您的身份证将在" + days + "天后到期,请及时更新信息");
}
}
}*/
wxHomePageVo.setIsHave(isHave);
return new ResultBean<WxHomePageVo>().success().setData(wxHomePageVo);
}

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanbuckleapply/LoanBuckleApplyFeign.java

@ -50,6 +50,11 @@ public interface LoanBuckleApplyFeign {
@ResponseBody
public ResultBean<LoanBuckleApplyInit> buckleDetails(@RequestParam("sid") String sid);
@ApiOperation("下载月还划扣审批dpf")
@PostMapping("/buckleCreatePdf")
public ResultBean<String> buckleCreatePdf(@RequestParam("sid") String sid);
@ApiOperation("批量删除")
@DeleteMapping("/deleteBySids")
@ResponseBody

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanbuckleapply/LoanBuckleApplyFeignFallback.java

@ -36,6 +36,11 @@ public class LoanBuckleApplyFeignFallback implements LoanBuckleApplyFeign {
return null;
}
@Override
public ResultBean<String> buckleCreatePdf(String sid) {
return null;
}
@Override
public ResultBean deleteBySids(String[] sids) {
return null;

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyFallback.java

@ -41,6 +41,11 @@ public class LoanMonthlyAccrualApplyFallback implements LoanMonthlyAccrualApplyF
return null;
}
@Override
public ResultBean<String> accrualCreatePdf(String sid) {
return null;
}
@Override
public ResultBean submitRecordApplication(SubmitAccrualDto dto) {
return null;

4
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyFeign.java

@ -53,6 +53,10 @@ public interface LoanMonthlyAccrualApplyFeign {
@ResponseBody
public ResultBean deleteBySids(@RequestBody String[] sids);
@ApiOperation("下载月还审批dpf")
@PostMapping("/accrualCreatePdf")
public ResultBean<String> accrualCreatePdf(@RequestParam("sid") String sid);
//---------------------------流程---------------------------------------
@ApiOperation("提交")

20
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanmonthlyaccrualapply/MonthlyAccrualSourceLCVo.java

@ -0,0 +1,20 @@
package com.yxt.anrui.riskcenter.api.loanmonthlyaccrualapply;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/4/12 10:18
*/
@Data
public class MonthlyAccrualSourceLCVo {
@ApiModelProperty(value = "审批人姓名")
private String name;
@ApiModelProperty(value = "审批人意见")
private String comment;
@ApiModelProperty(value = "审批时间")
private String spsj;
}

8
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java

@ -38,6 +38,12 @@ public interface LoanRepaymentScheduleFeign {
@ResponseBody
public ResultBean<String> loanCreateSchedulePdf(@RequestBody LoanCreateSchedulePdfVo dto);
@ApiOperation("生成还款计划凭证pdf")
@PostMapping("/createRepaymentVoucher")
@ResponseBody
public ResultBean<String> createRepaymentVoucher(@RequestBody String[] sids);
@ApiOperation("查看多台还款计划表")
@GetMapping("/viewVinsSchedule")
@ResponseBody
@ -78,7 +84,7 @@ public interface LoanRepaymentScheduleFeign {
@ApiOperation("查看单台还款计划表")
@GetMapping("/getRepaymentPlanListByVinNo")
@ResponseBody
public ResultBean<List<AppRepaymentPlanListDetailsVo>> getRepaymentPlanListByVinNo(@RequestParam("vinNo") String vinNo,@RequestParam("sid") String sid);
public ResultBean<List<AppRepaymentPlanListDetailsVo>> getRepaymentPlanListByVinNo(@RequestParam("vinNo") String vinNo, @RequestParam("sid") String sid);
}

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java

@ -26,6 +26,11 @@ public class LoanRepaymentScheduleFeignFallback implements LoanRepaymentSchedule
return null;
}
@Override
public ResultBean<String> createRepaymentVoucher(String[] sids) {
return null;
}
@Override
public ResultBean<LoanCreateScheduleVinsVo> viewVinsSchedule(String salesOrderSid) {
return null;

29
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanVoucherPdf.java

@ -0,0 +1,29 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/4/11 14:30
*/
@Data
public class LoanVoucherPdf {
private String createTime;
private String loanContractNo;
private String salesDept;
private String bankName;
private String customer;
private String borrowerName;
private String vinNo;
private String period;
private String amount;
private String dueDate;
private String fMoney;
private String mMoney;
private String lMoney;
private String template; //模板表格号
private String page;
}

4
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantransferpaymentapply/LoanTransferPaymentApplyFeign.java

@ -43,6 +43,10 @@ public interface LoanTransferPaymentApplyFeign {
@ResponseBody
public ResultBean<String> saveTransferPayment(@RequestBody LoanTransferPaymentApplyDto dto);
@ApiOperation("下载月还划扣审批dpf")
@PostMapping("/paymentCreatePdf")
public ResultBean<String> paymentCreatePdf(@RequestParam("sid") String sid);
@ApiOperation("详情查看")
@GetMapping("/paymentDetails")
@ResponseBody

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantransferpaymentapply/LoanTransferPaymentApplyFeignFallback.java

@ -30,6 +30,11 @@ public class LoanTransferPaymentApplyFeignFallback implements LoanTransferPaymen
return null;
}
@Override
public ResultBean<String> paymentCreatePdf(String sid) {
return null;
}
@Override
public ResultBean<LoanTransferPaymentApplyInit> paymentDetails(String sid) {
return null;

1
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantransferpaymentapply/LoanTransferPaymentRecordVo.java

@ -43,5 +43,6 @@ public class LoanTransferPaymentRecordVo {
@ApiModelProperty("转付账户账号")
private String accountNumber;
private String vinNo;
private String salesDept;
}

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbuckleapply/LoanBuckleApplyRest.java

@ -51,6 +51,11 @@ public class LoanBuckleApplyRest implements LoanBuckleApplyFeign {
return loanBuckleApplyService.buckleDetails(sid);
}
@Override
public ResultBean<String> buckleCreatePdf(String sid) {
return loanBuckleApplyService.buckleCreatePdf(sid);
}
@Override
public ResultBean deleteBySids(String[] sids) {
return loanBuckleApplyService.deleteBySids(sids);

173
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbuckleapply/LoanBuckleApplyService.java

@ -2,6 +2,7 @@ package com.yxt.anrui.riskcenter.biz.loanbuckleapply;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -11,19 +12,15 @@ import com.yxt.anrui.base.api.basepurchasesystem.BasePurchaseSystemFeign;
import com.yxt.anrui.base.common.enums.BillTypeEnum;
import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.base.common.utils.domain.BillNo;
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile;
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign;
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerDetailsVo;
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFeign;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.buscenter.api.bussolutionschange.BusSolutionsChangeFiles;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.bdcustomer.BdCustomer;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.fin.api.kingdee.voucher.SceneCodeEnum;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -33,6 +30,7 @@ import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo;
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo;
import com.yxt.anrui.flowable.api.utils.ProcDefEnum;
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.portal.api.flow.PCHistTaskListAndCommentList;
import com.yxt.anrui.portal.api.sysorganization.*;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
@ -47,7 +45,7 @@ import com.yxt.anrui.riskcenter.api.loanbuckleapplyrecord.LoanBuckleApplyRecord;
import com.yxt.anrui.riskcenter.api.loanbuckleplanhistory.LoanBucklePlanHistory;
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile;
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualrecord.LoanMonthlyAccrualRecord;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualapply.MonthlyAccrualSourceLCVo;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistory;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistoryRecordVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForLateVoucher;
@ -57,26 +55,36 @@ import com.yxt.anrui.riskcenter.biz.loanbuckleplanhistory.LoanBucklePlanHistoryS
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService;
import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService;
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService;
import com.yxt.common.base.config.component.DocPdfComponent;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.ConstantUtils;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.WordConvertUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.messagecenter.api.message.Message;
import com.yxt.messagecenter.api.message.MessageFeign;
import com.yxt.messagecenter.api.message.MessageFlowVo;
import com.yxt.messagecenter.api.message.MessageFlowableQuery;
import com.yxt.messagecenter.api.messagelist.MessageList;
import com.yxt.messagecenter.api.messagelist.MessageListFeign;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.*;
import java.util.stream.Collectors;
import static java.util.Comparator.comparing;
/**
* @description:
* @author: fzz
@ -85,6 +93,12 @@ import java.util.stream.Collectors;
@Service
public class LoanBuckleApplyService extends MybatisBaseService<LoanBuckleApplyMapper, LoanBuckleApply> {
@Autowired
private MessageListFeign messageListFeign;
@Autowired
private com.yxt.anrui.portal.api.flow.FlowableFeign flowableFeignPro;
@Autowired
private DocPdfComponent docPdfComponent;
@Autowired
private MessageFeign messageFeign;
@Autowired
@ -1216,4 +1230,153 @@ public class LoanBuckleApplyService extends MybatisBaseService<LoanBuckleApplyMa
}
public ResultBean<String> buckleCreatePdf(String sid) {
ResultBean rb = ResultBean.fireFail();
String finalPath = "";
String filePath = "";
Map<String, Object> dataMap = new HashMap();
List<Map<String, Object>> newList = new ArrayList<>();
LoanBuckleApply data = fetchBySid(sid);
if (null != data) {
List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.BUCKLE_APPLY.getAttachType());
if (!files.isEmpty()) {
List<String> stringList = new ArrayList<>();
for (LoanFile file : files) {
if (StringUtils.isNotBlank(file.getFileName()) && StringUtils.isNotBlank(file.getFileType())) {
stringList.add(file.getFileName() + "." + file.getFileType());
}
}
if (!stringList.isEmpty()) {
filePath = String.join(",", stringList);
}
}
if (null != data.getApplyDate()) {
dataMap.put("createTime", DateUtil.formatDate(data.getApplyDate()));
}
if (StringUtils.isNotBlank(data.getUseOrgName())) {
dataMap.put("company", data.getUseOrgName());
}
if (StringUtils.isNotBlank(data.getApplyName())) {
dataMap.put("applyName", data.getApplyName());
}
if (StringUtils.isNotBlank(data.getDept())) {
dataMap.put("dept", data.getDept());
}
if (StringUtils.isNotBlank(data.getBillNo())) {
dataMap.put("billNo", data.getBillNo());
}
if (StringUtils.isNotBlank(data.getRemarks())) {
dataMap.put("remarks", data.getRemarks());
}
if (StringUtils.isNotBlank(filePath)) {
dataMap.put("filePath", filePath);
}
//获取审批记录
if (StringUtils.isNotBlank(data.getProcInstId())) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
String comment1 = (String) comment.get("comment");
sourceLCVo.setName(assigneeName);
sourceLCVo.setComment(comment1);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
sourceLCVos.add(sourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
}
}
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
}
}
sourceLCVo.setName("系统");
sourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
sourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
sourceLCVos.add(sourceLCVo);
}
}
sourceLCVos.sort(comparing(MonthlyAccrualSourceLCVo::getSpsj));
dataMap.put("lcList", sourceLCVos);
}
List<LoanBuckleApplyRecord> records = loanBuckleApplyRecordService.selByMainSid(sid);
if (!records.isEmpty()) {
int sortNo = 1;
for (LoanBuckleApplyRecord applyRecord : records) {
Map<String, Object> map = new HashMap<>();
String recordSid = applyRecord.getRepaymentHistorySid();
LoanRepaymentPlanDetails details = loanRepaymentPlanDetailsService.fetchBySid(recordSid);
if (null != details) {
map.put("sortNo", String.valueOf(sortNo++));
if (StringUtils.isNotBlank(details.getLoanContractNo())) {
map.put("loanNo", details.getLoanContractNo());
}
if (StringUtils.isNotBlank(details.getVinNo())) {
map.put("vinNo", details.getVinNo());
}
if (StringUtils.isNotBlank(details.getBankName())) {
map.put("bankName", details.getBankName());
}
if (StringUtils.isNotBlank(details.getBankContractNo())) {
map.put("bankNo", details.getBankContractNo());
}
if (StringUtils.isNotBlank(details.getBorrowerName())) {
map.put("borrowerName", details.getBorrowerName());
}
if (StringUtils.isNotBlank(details.getPeriod())) {
map.put("period", details.getPeriod());
}
if (null != applyRecord.getActualMoney()) {
map.put("dueMoney", applyRecord.getActualMoney());
}
if (StringUtils.isNotBlank(details.getDept())) {
map.put("saleDept", details.getDept());
}
}
newList.add(map);
}
}
dataMap.put("newList", newList);
String temp = "/template/";
String targetPath = docPdfComponent.getUploadTemplateUrl();
try {
//获取模板
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/vouchers/monthBuckle.ftl");
//生成word文件名
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String typeName = dateStr + seconds + ".doc";
File file = new File(targetPath + "templateVouchers" + seconds + ".ftl");
File dir = new File(targetPath);
WordConvertUtils.inputStreamToFile(inputStream, file);
WordConvertUtils.creatWord1(dataMap, file, targetPath, typeName, dir);
//新生成的word路径
String wordPath = targetPath + typeName;
String pdfName = "月还划扣审批" + dateStr + seconds + ".pdf";
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName);
finalPath = temp + pdfName;
} catch (NoClassDefFoundError e) {
e.printStackTrace();
finalPath = targetPath;
}
}
return rb.success().setData(finalPath);
}
}

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyRest.java

@ -51,6 +51,11 @@ public class LoanMonthlyAccrualApplyRest implements LoanMonthlyAccrualApplyFeign
return loanMonthlyAccrualApplyService.deleteBySids(sids);
}
@Override
public ResultBean<String> accrualCreatePdf(String sid) {
return loanMonthlyAccrualApplyService.accrualCreatePdf(sid);
}
@Override
public ResultBean submitRecordApplication(SubmitAccrualDto dto) {
return loanMonthlyAccrualApplyService.submitRecordApplication(dto);

175
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java

@ -30,6 +30,7 @@ import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo;
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo;
import com.yxt.anrui.flowable.api.utils.ProcDefEnum;
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.portal.api.flow.PCHistTaskListAndCommentList;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
@ -47,28 +48,34 @@ import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService;
import com.yxt.anrui.riskcenter.biz.loanmonthlyaccrualrecord.LoanMonthlyAccrualRecordService;
import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService;
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService;
import com.yxt.common.base.config.component.DocPdfComponent;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.ConstantUtils;
import com.yxt.common.base.utils.DateUtils;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.WordConvertUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.messagecenter.api.message.MessageFeign;
import com.yxt.messagecenter.api.message.MessageFlowVo;
import com.yxt.messagecenter.api.message.MessageFlowableQuery;
import com.yxt.messagecenter.api.message.PushMessageQuery;
import com.yxt.messagecenter.api.message.*;
import com.yxt.messagecenter.api.messagelist.MessageList;
import com.yxt.messagecenter.api.messagelist.MessageListFeign;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.*;
import java.util.stream.Collectors;
import static java.util.Comparator.comparing;
/**
* @description:
* @author: fzz
@ -76,7 +83,10 @@ import java.util.stream.Collectors;
**/
@Service
public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonthlyAccrualApplyMapper, LoanMonthlyAccrualApply> {
@Autowired
private DocPdfComponent docPdfComponent;
@Autowired
private com.yxt.anrui.portal.api.flow.FlowableFeign flowableFeignPro;
@Autowired
private MessageFeign messageFeign;
@Autowired
@ -111,6 +121,8 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
private BusSalesOrderFeign busSalesOrderFeign;
@Autowired
private BasePurchaseSystemFeign basePurchaseSystemFeign;
@Autowired
private MessageListFeign messageListFeign;
public ResultBean<LoanMonthlyAccrualApplyInit> accrualInit(String orgPath) {
ResultBean<LoanMonthlyAccrualApplyInit> rb = ResultBean.fireFail();
@ -1032,4 +1044,157 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
}
return rb.success().setData(vo);
}
public ResultBean<String> accrualCreatePdf(String sid) {
ResultBean rb = ResultBean.fireFail();
String finalPath = "";
String filePath = "";
Map<String, Object> dataMap = new HashMap();
List<Map<String, Object>> newList = new ArrayList<>();
LoanMonthlyAccrualApply data = fetchBySid(sid);
if (null != data) {
List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.ACCRUALAPPLY.getAttachType());
if (!files.isEmpty()) {
List<String> stringList = new ArrayList<>();
for (LoanFile file : files) {
if (StringUtils.isNotBlank(file.getFileName()) && StringUtils.isNotBlank(file.getFileType())) {
stringList.add(file.getFileName() + "." + file.getFileType());
}
}
if (!stringList.isEmpty()) {
filePath = String.join(",", stringList);
}
}
if (null != data.getApplyDate()) {
dataMap.put("createTime", DateUtil.formatDate(data.getApplyDate()));
}
if (StringUtils.isNotBlank(data.getUseOrgName())) {
dataMap.put("company", data.getUseOrgName());
}
if (StringUtils.isNotBlank(data.getApplyName())) {
dataMap.put("applyName", data.getApplyName());
}
if (StringUtils.isNotBlank(data.getDept())) {
dataMap.put("dept", data.getDept());
}
if (StringUtils.isNotBlank(data.getBillNo())) {
dataMap.put("billNo", data.getBillNo());
}
if (StringUtils.isNotBlank(data.getRemarks())) {
dataMap.put("remarks", data.getRemarks());
}
if (StringUtils.isNotBlank(filePath)) {
dataMap.put("filePath", filePath);
}
//获取审批记录
if (StringUtils.isNotBlank(data.getProcInstId())) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
String comment1 = (String) comment.get("comment");
sourceLCVo.setName(assigneeName);
sourceLCVo.setComment(comment1);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
sourceLCVos.add(sourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
}
}
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
}
}
sourceLCVo.setName("系统");
sourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
sourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
sourceLCVos.add(sourceLCVo);
}
}
sourceLCVos.sort(comparing(MonthlyAccrualSourceLCVo::getSpsj));
dataMap.put("lcList", sourceLCVos);
}
List<LoanMonthlyAccrualRecord> records = loanMonthlyAccrualRecordService.selByMainSid(sid);
if (!records.isEmpty()) {
int sortNo = 1;
for (LoanMonthlyAccrualRecord accrualRecord : records) {
Map<String, Object> map = new HashMap<>();
String recordSid = accrualRecord.getRecordSid();
LoanRepaymentPlanDetails details = loanRepaymentPlanDetailsService.fetchBySid(recordSid);
if (null != details) {
map.put("sortNo", String.valueOf(sortNo++));
if (StringUtils.isNotBlank(details.getLoanContractNo())) {
map.put("loanNo", details.getLoanContractNo());
}
if (StringUtils.isNotBlank(details.getVinNo())) {
map.put("vinNo", details.getVinNo());
}
if (StringUtils.isNotBlank(details.getBankName())) {
map.put("bankName", details.getBankName());
}
if (StringUtils.isNotBlank(details.getBankContractNo())) {
map.put("bankNo", details.getBankContractNo());
}
if (StringUtils.isNotBlank(details.getBorrowerName())) {
map.put("borrowerName", details.getBorrowerName());
}
if (StringUtils.isNotBlank(details.getPeriod())) {
map.put("period", details.getPeriod());
}
if (null != details.getDueDate()) {
map.put("dueDate", DateUtil.formatDate(details.getDueDate()));
}
if (null != details.getDueMoney()) {
map.put("dueMoney", details.getDueMoney());
}
if (StringUtils.isNotBlank(details.getDept())) {
map.put("saleDept", details.getDept());
}
}
newList.add(map);
}
}
dataMap.put("newList", newList);
String temp = "/template/";
String targetPath = docPdfComponent.getUploadTemplateUrl();
try {
//获取模板
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/vouchers/monthapply.ftl");
//生成word文件名
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String typeName = dateStr + seconds + ".doc";
File file = new File(targetPath + "templateVouchers" + seconds + ".ftl");
File dir = new File(targetPath);
WordConvertUtils.inputStreamToFile(inputStream, file);
WordConvertUtils.creatWord1(dataMap, file, targetPath, typeName, dir);
//新生成的word路径
String wordPath = targetPath + typeName;
String pdfName = "月还计提审批" + dateStr + seconds + ".pdf";
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName);
finalPath = temp + pdfName;
} catch (NoClassDefFoundError e) {
e.printStackTrace();
finalPath = targetPath;
}
}
return rb.success().setData(finalPath);
}
}

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

@ -935,7 +935,9 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
qw.ne("h.buckleKey", "002");
qw.ne("h.buckleKey", "003");
qw.eq("h.updateState", "1");
qw.notIn("h.sid", selNotRuleForBuckSids);
if (!selNotRuleForBuckSids.isEmpty()) {
qw.notIn("h.sid", selNotRuleForBuckSids);
}
List<RepaymentHistoryVoForBuckle> histories = baseMapper.selbuckleNewInitList(qw);
Map<String, BigDecimal> countMoney = new HashMap<>();
Map<String, List<String>> sids = new HashMap<>();

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java

@ -37,6 +37,11 @@ public class LoanRepaymentScheduleRest implements LoanRepaymentScheduleFeign {
return loanRepaymentScheduleService.loanCreateSchedulePdf(dto);
}
@Override
public ResultBean<String> createRepaymentVoucher(String[] sids) {
return loanRepaymentScheduleService.createRepaymentVoucher(sids);
}
@Override
public ResultBean<LoanCreateScheduleVinsVo> viewVinsSchedule(String salesOrderSid) {
return loanRepaymentScheduleService.viewVinsSchedule(salesOrderSid);

763
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java

@ -1246,6 +1246,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
return rb.success().setData(returnPath);
}
public void pushScheduleVoucher(LoanRepaymentSchedule schedule) {
String salesOrderSid = schedule.getSalesOrderSid();
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData();
@ -1528,6 +1529,766 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
}
}
public List<LoanVoucherPdf> returnVoucherPdf(LoanRepaymentSchedule schedule) {
List<LoanVoucherPdf> pdfs = new ArrayList<>();
String salesOrderSid = schedule.getSalesOrderSid();
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData();
String loanContractSid = schedule.getLoanContractSid();
List<BusSalesOrderVehicle> vehicles = busSalesOrderVehicleFeign.selectListByOrderSidAndXdConSid(salesOrderSid, loanContractSid).getData();
String bankName = "";
String otherBankName = "";
String isOtherPolicy = schedule.getIsOtherPolicy();
String sameBank = schedule.getSameBank();
BigDecimal amountMain = new BigDecimal("0.00");
BigDecimal amountOther = new BigDecimal("0.00");
if (isOtherPolicy.equals("0")) {
int mainPeriod = Integer.parseInt(schedule.getMainPeriod());
int midPeriod = mainPeriod - 2;
BigDecimal mainFirstRepay = schedule.getMainFirstRepay();
BigDecimal mainMidRepay = schedule.getMainMidRepay();
BigDecimal mainLastRepay = schedule.getMainLastRepay();
amountMain = mainMidRepay.multiply(new BigDecimal(midPeriod)).add(mainFirstRepay).add(mainLastRepay);
} else if (isOtherPolicy.equals("1")) {
if (isOtherPolicy.equals("1")) {
if (sameBank.equals("0")) {
LoanSolutions loanSolutions = loanSolutionsService.selectBySaleOrderSid(salesOrderSid);
//查看是否有其他融
LoanSolutionsOtherpolicy otherpolicy = loanSolutionsOtherpolicyService.selectByLoanSid(loanSolutions.getSid());
if (null != otherpolicy) {
if (StringUtils.isNotBlank(otherpolicy.getOtherPolicyPeriod())) {
String otherPolicySid = otherpolicy.getOtherPolicySid();
LoanFinOtherPolicy loanFinOtherPolicy = loanFinOtherPolicyService.fetchBySid(otherPolicySid);
if (loanFinOtherPolicy != null) {
if (StringUtils.isNotBlank(loanFinOtherPolicy.getBankSid())) {
String otherBankSid = loanFinOtherPolicy.getBankSid();
LoanFinBank loanFinBank = loanFinBankService.fetchBySid(otherBankSid);
if (null != loanFinBank) {
otherBankName = loanFinBank.getBankShortName();
}
}
}
}
}
int mainPeriod = Integer.parseInt(schedule.getMainPeriod());
int midPeriod = mainPeriod - 2;
BigDecimal mainFirstRepay = schedule.getMainFirstRepay();
BigDecimal mainMidRepay = schedule.getMainMidRepay();
BigDecimal mainLastRepay = schedule.getMainLastRepay();
amountMain = mainMidRepay.multiply(new BigDecimal(midPeriod)).add(mainFirstRepay).add(mainLastRepay);
int otherPeriod = Integer.parseInt(schedule.getOtherPeriod());
int midOtherPeriod = otherPeriod - 2;
BigDecimal otherFirstRepay = schedule.getOtherFirstRepay();
BigDecimal otherMidRepay = schedule.getOtherMidRepay();
BigDecimal otherLastRepay = schedule.getOtherLastRepay();
amountOther = otherMidRepay.multiply(new BigDecimal(midOtherPeriod)).add(otherFirstRepay).add(otherLastRepay);
}
if (sameBank.equals("1")) {
int mainPeriod = Integer.parseInt(schedule.getMainPeriod());
int midPeriod = mainPeriod - 2;
BigDecimal mainFirstRepay = schedule.getMainFirstRepay();
BigDecimal mainMidRepay = schedule.getMainMidRepay();
BigDecimal mainLastRepay = schedule.getMainLastRepay();
amountMain = mainMidRepay.multiply(new BigDecimal(midPeriod)).add(mainFirstRepay).add(mainLastRepay);
int otherPeriod = Integer.parseInt(schedule.getOtherPeriod());
int midOtherPeriod = otherPeriod - 2;
BigDecimal otherFirstRepay = schedule.getOtherFirstRepay();
BigDecimal otherMidRepay = schedule.getOtherMidRepay();
BigDecimal otherLastRepay = schedule.getOtherLastRepay();
amountOther = otherMidRepay.multiply(new BigDecimal(midOtherPeriod)).add(otherFirstRepay).add(otherLastRepay);
amountMain = amountMain.add(amountOther);
}
}
}
LoanFinBank loanFinBank = loanFinBankService.selBankByOrderSid(salesOrderSid);
if (null != loanFinBank) {
bankName = loanFinBank.getBankShortName();
}
if (null != salesOrder) {
if (!vehicles.isEmpty()) {
for (BusSalesOrderVehicle busSalesOrderVehicle : vehicles) {
if (isOtherPolicy.equals("0")) {
LoanVoucherPdf pdf = new LoanVoucherPdf();
if (null != schedule.getCreateTime()) {
pdf.setCreateTime(DateUtil.formatDate(schedule.getCreateTime()));
}
if (StringUtils.isNotBlank(schedule.getLoanContractNo())) {
pdf.setLoanContractNo(schedule.getLoanContractNo());
}
if (StringUtils.isNotBlank(salesOrder.getOrgName())) {
pdf.setSalesDept(salesOrder.getOrgName());
}
pdf.setBankName(bankName);
if (StringUtils.isNotBlank(salesOrder.getCustomerName())) {
pdf.setCustomer(salesOrder.getCustomerName());
}
if (StringUtils.isNotBlank(schedule.getBorrowerName())) {
pdf.setBorrowerName(schedule.getBorrowerName());
}
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) {
pdf.setVinNo(busSalesOrderVehicle.getLinkNo());
}
if (StringUtils.isNotBlank(schedule.getMainPeriod())) {
pdf.setPeriod(schedule.getMainPeriod());
}
if (null != schedule.getMainRepayDate()) {
pdf.setDueDate(DateUtil.formatDate(schedule.getMainRepayDate()));
}
if (null != schedule.getMainFirstRepay()) {
pdf.setFMoney(schedule.getMainFirstRepay().toString());
}
if (null != schedule.getMainMidRepay()) {
pdf.setMMoney(schedule.getMainMidRepay().toString());
}
if (null != schedule.getMainLastRepay()) {
pdf.setLMoney(schedule.getMainLastRepay().toString());
}
pdf.setAmount(amountMain.toString());
pdfs.add(pdf);
}
if (isOtherPolicy.equals("1")) {
if (sameBank.equals("0")) {
for (int i = 0; i <= 1; i++) {
LoanVoucherPdf pdf = new LoanVoucherPdf();
if (null != schedule.getCreateTime()) {
pdf.setCreateTime(DateUtil.formatDate(schedule.getCreateTime()));
}
if (StringUtils.isNotBlank(schedule.getLoanContractNo())) {
pdf.setLoanContractNo(schedule.getLoanContractNo());
}
if (StringUtils.isNotBlank(salesOrder.getOrgName())) {
pdf.setSalesDept(salesOrder.getOrgName());
}
if (StringUtils.isNotBlank(salesOrder.getCustomerName())) {
pdf.setCustomer(salesOrder.getCustomerName());
}
if (StringUtils.isNotBlank(schedule.getBorrowerName())) {
pdf.setBorrowerName(schedule.getBorrowerName());
}
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) {
pdf.setVinNo(busSalesOrderVehicle.getLinkNo());
}
if (i == 0) {
if (StringUtils.isNotBlank(bankName)) {
pdf.setBankName(bankName);
}
pdf.setAmount(amountMain.toString());
if (StringUtils.isNotBlank(schedule.getMainPeriod())) {
pdf.setPeriod(schedule.getMainPeriod());
}
if (null != schedule.getMainRepayDate()) {
pdf.setDueDate(DateUtil.formatDate(schedule.getMainRepayDate()));
}
if (null != schedule.getMainFirstRepay()) {
pdf.setFMoney(schedule.getMainFirstRepay().toString());
}
if (null != schedule.getMainMidRepay()) {
pdf.setMMoney(schedule.getMainMidRepay().toString());
}
if (null != schedule.getMainLastRepay()) {
pdf.setLMoney(schedule.getMainLastRepay().toString());
}
} else if (i == 1) {
if (StringUtils.isNotBlank(otherBankName)) {
pdf.setBankName(otherBankName);
}
pdf.setAmount(amountOther.toString());
if (StringUtils.isNotBlank(schedule.getMainPeriod())) {
pdf.setPeriod(schedule.getMainPeriod());
}
if (null != schedule.getOtherRepayDate()) {
pdf.setDueDate(DateUtil.formatDate(schedule.getOtherRepayDate()));
}
if (null != schedule.getOtherFirstRepay()) {
pdf.setFMoney(schedule.getOtherFirstRepay().toString());
}
if (null != schedule.getOtherMidRepay()) {
pdf.setMMoney(schedule.getOtherMidRepay().toString());
}
if (null != schedule.getOtherLastRepay()) {
pdf.setLMoney(schedule.getOtherLastRepay().toString());
}
}
pdfs.add(pdf);
}
}
if (sameBank.equals("1")) {
LoanVoucherPdf pdf = new LoanVoucherPdf();
if (null != schedule.getCreateTime()) {
pdf.setCreateTime(DateUtil.formatDate(schedule.getCreateTime()));
}
if (StringUtils.isNotBlank(schedule.getLoanContractNo())) {
pdf.setLoanContractNo(schedule.getLoanContractNo());
}
if (StringUtils.isNotBlank(salesOrder.getOrgName())) {
pdf.setSalesDept(salesOrder.getOrgName());
}
pdf.setBankName(bankName);
if (StringUtils.isNotBlank(salesOrder.getCustomerName())) {
pdf.setCustomer(salesOrder.getCustomerName());
}
if (StringUtils.isNotBlank(schedule.getBorrowerName())) {
pdf.setBorrowerName(schedule.getBorrowerName());
}
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) {
pdf.setVinNo(busSalesOrderVehicle.getLinkNo());
}
if (StringUtils.isNotBlank(schedule.getMainPeriod()) && StringUtils.isNotBlank(schedule.getOtherPeriod())) {
pdf.setPeriod(schedule.getMainPeriod() + "/" + schedule.getOtherPeriod());
}
if (null != schedule.getMainRepayDate()) {
pdf.setDueDate(DateUtil.formatDate(schedule.getMainRepayDate()));
}
if (null != schedule.getMainFirstRepay() && null != schedule.getOtherFirstRepay()) {
pdf.setFMoney(schedule.getMainFirstRepay().toString() + "/" + schedule.getOtherFirstRepay());
}
if (null != schedule.getMainMidRepay() && null != schedule.getOtherMidRepay()) {
pdf.setMMoney(schedule.getMainMidRepay().toString() + "/" + schedule.getOtherMidRepay());
}
if (null != schedule.getMainLastRepay() && null != schedule.getOtherLastRepay()) {
pdf.setLMoney(schedule.getMainLastRepay().toString() + "/" + schedule.getOtherLastRepay());
}
pdf.setAmount(amountMain.toString());
pdfs.add(pdf);
}
}
}
}
}
return pdfs;
}
public String returnVoucherFilePath(List<LoanVoucherPdf> pdfVos, String page) {
String path = "";
if (!pdfVos.isEmpty()) {
Map<String, Object> dataMap = new HashMap<String, Object>();
for (LoanVoucherPdf pdfVo : pdfVos) {
if (null != pdfVo) {
if (pdfVo.getTemplate().equals("1")) {
dataMap.put("createTime1", pdfVo.getCreateTime());
dataMap.put("loanContractNo1", pdfVo.getLoanContractNo());
dataMap.put("salesDept1", pdfVo.getSalesDept());
dataMap.put("bankName1", pdfVo.getBankName());
dataMap.put("customer1", pdfVo.getCustomer());
dataMap.put("borrowerName1", pdfVo.getBorrowerName());
dataMap.put("vinNo1", pdfVo.getVinNo());
dataMap.put("period1", pdfVo.getPeriod());
dataMap.put("amount1", pdfVo.getAmount());
dataMap.put("dueDate1", pdfVo.getDueDate());
dataMap.put("fMoney1", pdfVo.getFMoney());
dataMap.put("mMoney1", pdfVo.getMMoney());
dataMap.put("lMoney1", pdfVo.getLMoney());
} else if (pdfVo.getTemplate().equals("2")) {
dataMap.put("createTime2", pdfVo.getCreateTime());
dataMap.put("loanContractNo2", pdfVo.getLoanContractNo());
dataMap.put("salesDept2", pdfVo.getSalesDept());
dataMap.put("bankName2", pdfVo.getBankName());
dataMap.put("customer2", pdfVo.getCustomer());
dataMap.put("borrowerName2", pdfVo.getBorrowerName());
dataMap.put("vinNo2", pdfVo.getVinNo());
dataMap.put("period2", pdfVo.getPeriod());
dataMap.put("amount2", pdfVo.getAmount());
dataMap.put("dueDate2", pdfVo.getDueDate());
dataMap.put("fMoney2", pdfVo.getFMoney());
dataMap.put("mMoney2", pdfVo.getMMoney());
dataMap.put("lMoney2", pdfVo.getLMoney());
;
} else if (pdfVo.getTemplate().equals("3")) {
dataMap.put("createTime3", pdfVo.getCreateTime());
dataMap.put("loanContractNo3", pdfVo.getLoanContractNo());
dataMap.put("salesDept3", pdfVo.getSalesDept());
dataMap.put("bankName3", pdfVo.getBankName());
dataMap.put("customer3", pdfVo.getCustomer());
dataMap.put("borrowerName3", pdfVo.getBorrowerName());
dataMap.put("vinNo3", pdfVo.getVinNo());
dataMap.put("period3", pdfVo.getPeriod());
dataMap.put("amount3", pdfVo.getAmount());
dataMap.put("dueDate3", pdfVo.getDueDate());
dataMap.put("fMoney3", pdfVo.getFMoney());
dataMap.put("mMoney3", pdfVo.getMMoney());
dataMap.put("lMoney3", pdfVo.getLMoney());
}
}
}
String targetPath = docPdfComponent.getUploadTemplateUrl();
try {
String resourceAsStreamPath = "";
if (page.equals("1")) {
resourceAsStreamPath = "ftl/vouchers/repayment1.ftl";
} else if (page.equals("2")) {
resourceAsStreamPath = "ftl/vouchers/repayment2.ftl";
} else if (page.equals("3")) {
resourceAsStreamPath = "ftl/vouchers/repayment3.ftl";
}
//获取模板
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(resourceAsStreamPath);
//生成word文件名
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String typeName = dateStr + seconds + ".doc";
File file = new File(targetPath + "templateVouchers" + seconds + ".ftl");
File dir = new File(targetPath);
WordConvertUtils.inputStreamToFile(inputStream, file);
WordConvertUtils.creatWord1(dataMap, file, targetPath, typeName, dir);
//新生成的word路径
String wordPath = targetPath + typeName;
String pdfName = "还款计划表凭证" + dateStr + seconds + ".pdf";
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName);
path = targetPath + pdfName;
} catch (NoClassDefFoundError e) {
e.printStackTrace();
path = targetPath;
}
return path;
}
return path;
}
public ResultBean<String> createRepaymentVoucher(String[] sids) {
ResultBean rb = ResultBean.fireFail();
List<LoanVoucherPdf> pdfs = new ArrayList<>();
String filePath = "/template/";
List<File> fileList2 = new ArrayList<>();
String finalPath = "";
List<File> delFile = new ArrayList<>();
for (String sid : sids) {
List<File> fileList1 = new ArrayList<>();
LoanRepaymentSchedule repaymentSchedule = baseMapper.selectByContractSid(sid);
if (null != repaymentSchedule) {
List<LoanVoucherPdf> pdfList = returnVoucherPdf(repaymentSchedule);
if (!pdfList.isEmpty()) {
int num = 0;
int c = pdfList.size() % 3;
if (c == 0) {
num = pdfList.size() / 3;
} else {
num = (pdfList.size() / 3) + 1;
}
if (pdfList.size() == 1) {
for (LoanVoucherPdf pdf : pdfList) {
pdf.setTemplate("1");
pdf.setPage("1");
}
String s = returnVoucherFilePath(pdfList, "1");
File file1 = new File(s);
fileList1.add(file1);
} else if (pdfList.size() == 2) {
for (int i = 0; i < pdfList.size(); i++) {
LoanVoucherPdf pdf = pdfList.get(i);
if (i == 0) {
pdf.setTemplate("1");
} else if (i == 1) {
pdf.setTemplate("2");
}
pdf.setPage("1");
}
String s = returnVoucherFilePath(pdfList, "2");
File file1 = new File(s);
fileList1.add(file1);
} else if (pdfList.size() >= 3) {
for (int i = 0; i < num; i++) {
List<LoanVoucherPdf> newPdfList = new ArrayList<>();
if (i == num - 1 && num != 1) {
String page = "";
if (c == 1) {
page = "1";
} else if (c == 2) {
page = "2";
}
if (pdfList.size() > (num - 1) * 3) {
LoanVoucherPdf a = pdfList.get((num - 1) * 3);
if (a != null) {
a.setTemplate("1");
a.setPage(page);
newPdfList.add(a);
}
}
if (pdfList.size() > (num - 1) * 3 + 1) {
LoanVoucherPdf a1 = pdfList.get((num - 1) * 3 + 1);
if (a1 != null) {
a1.setTemplate("2");
a1.setPage(page);
newPdfList.add(a1);
}
}
if (pdfList.size() > (num - 1) * 3 + 2) {
LoanVoucherPdf a2 = pdfList.get((num - 1) * 3 + 2);
if (a2 != null) {
a2.setTemplate("3");
a2.setPage(page);
newPdfList.add(a2);
}
}
String s = returnVoucherFilePath(newPdfList, page);
File file1 = new File(s);
fileList1.add(file1);
} else if (i == 0) {
LoanVoucherPdf a = pdfList.get(i);
LoanVoucherPdf a1 = pdfList.get(i + 1);
LoanVoucherPdf a2 = pdfList.get(i + 2);
if (a != null) {
a.setTemplate("1");
a.setPage("3");
newPdfList.add(a);
}
if (a1 != null) {
a1.setTemplate("2");
a1.setPage("3");
newPdfList.add(a1);
}
if (a2 != null) {
a2.setTemplate("3");
a2.setPage("3");
newPdfList.add(a2);
}
String s = returnVoucherFilePath(newPdfList, "3");
File file1 = new File(s);
fileList1.add(file1);
} else {
LoanVoucherPdf a = pdfList.get(i * 3);
LoanVoucherPdf a1 = pdfList.get(i * 3 + 1);
LoanVoucherPdf a2 = pdfList.get(i * 3 + 2);
if (a != null) {
a.setTemplate("1");
a.setPage("3");
newPdfList.add(a);
}
if (a1 != null) {
a1.setTemplate("2");
a1.setPage("3");
newPdfList.add(a1);
}
if (a2 != null) {
a2.setTemplate("3");
a2.setPage("3");
newPdfList.add(a2);
}
String s = returnVoucherFilePath(newPdfList, "3");
File file1 = new File(s);
fileList1.add(file1);
}
}
}
if (fileList1.size() == 1) {
for (File file : fileList1) {
fileList2.add(file);
delFile.add(file);
}
} else if (fileList1.size() > 1) {
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String targetPath = docPdfComponent.getUploadTemplateUrl();
try {
File file = WordConvertUtils.mulFile2One(fileList1, targetPath + dateStr + seconds + "还款计划凭证.pdf");
if (null != file) {
fileList2.add(file);
delFile.add(file);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
} else {
return rb.setMsg("所选数据中包含未生成还款计划数据,无法下载");
}
}
if (!fileList2.isEmpty()) {
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String targetPath = docPdfComponent.getUploadTemplateUrl();
try {
File file = WordConvertUtils.mulFile2One(fileList2, targetPath + dateStr + seconds + "还款计划凭证.pdf");
System.out.println("===============================");
System.out.println(file.getAbsolutePath());
System.out.println("===============================");
} catch (Exception e) {
e.printStackTrace();
}
if (fileList2.size() > 0) {
finalPath = filePath + dateStr + seconds + "还款计划凭证.pdf";
}
if (!delFile.isEmpty()) {
for (File file : delFile) {
file.delete();
}
}
}
return rb.success().setData(finalPath);
}
//合并推送凭证
public void pushScheduleVoucher2(LoanRepaymentSchedule schedule) {
String salesOrderSid = schedule.getSalesOrderSid();
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData();
String loanContractSid = schedule.getLoanContractSid();
List<BusSalesOrderVehicle> vehicles = busSalesOrderVehicleFeign.selectListByOrderSidAndXdConSid(salesOrderSid, loanContractSid).getData();
String bankName = "";
String otherBankName = "";
String isOtherPolicy = schedule.getIsOtherPolicy();
String sameBank = schedule.getSameBank();
BigDecimal amountMain = new BigDecimal("0.00");
BigDecimal amountOther = new BigDecimal("0.00");
if (isOtherPolicy.equals("0")) {
int mainPeriod = Integer.parseInt(schedule.getMainPeriod());
int midPeriod = mainPeriod - 2;
BigDecimal mainFirstRepay = schedule.getMainFirstRepay();
BigDecimal mainMidRepay = schedule.getMainMidRepay();
BigDecimal mainLastRepay = schedule.getMainLastRepay();
amountMain = mainMidRepay.multiply(new BigDecimal(midPeriod)).add(mainFirstRepay).add(mainLastRepay);
} else if (isOtherPolicy.equals("1")) {
if (isOtherPolicy.equals("1")) {
if (sameBank.equals("0")) {
LoanSolutions loanSolutions = loanSolutionsService.selectBySaleOrderSid(salesOrderSid);
//查看是否有其他融
LoanSolutionsOtherpolicy otherpolicy = loanSolutionsOtherpolicyService.selectByLoanSid(loanSolutions.getSid());
if (null != otherpolicy) {
if (StringUtils.isNotBlank(otherpolicy.getOtherPolicyPeriod())) {
String otherPolicySid = otherpolicy.getOtherPolicySid();
LoanFinOtherPolicy loanFinOtherPolicy = loanFinOtherPolicyService.fetchBySid(otherPolicySid);
if (loanFinOtherPolicy != null) {
if (StringUtils.isNotBlank(loanFinOtherPolicy.getBankSid())) {
String otherBankSid = loanFinOtherPolicy.getBankSid();
LoanFinBank loanFinBank = loanFinBankService.fetchBySid(otherBankSid);
if (null != loanFinBank) {
otherBankName = loanFinBank.getBankShortName();
}
}
}
}
}
int mainPeriod = Integer.parseInt(schedule.getMainPeriod());
int midPeriod = mainPeriod - 2;
BigDecimal mainFirstRepay = schedule.getMainFirstRepay();
BigDecimal mainMidRepay = schedule.getMainMidRepay();
BigDecimal mainLastRepay = schedule.getMainLastRepay();
amountMain = mainMidRepay.multiply(new BigDecimal(midPeriod)).add(mainFirstRepay).add(mainLastRepay);
int otherPeriod = Integer.parseInt(schedule.getOtherPeriod());
int midOtherPeriod = otherPeriod - 2;
BigDecimal otherFirstRepay = schedule.getOtherFirstRepay();
BigDecimal otherMidRepay = schedule.getOtherMidRepay();
BigDecimal otherLastRepay = schedule.getOtherLastRepay();
amountOther = otherMidRepay.multiply(new BigDecimal(midOtherPeriod)).add(otherFirstRepay).add(otherLastRepay);
}
if (sameBank.equals("1")) {
int mainPeriod = Integer.parseInt(schedule.getMainPeriod());
int midPeriod = mainPeriod - 2;
BigDecimal mainFirstRepay = schedule.getMainFirstRepay();
BigDecimal mainMidRepay = schedule.getMainMidRepay();
BigDecimal mainLastRepay = schedule.getMainLastRepay();
amountMain = mainMidRepay.multiply(new BigDecimal(midPeriod)).add(mainFirstRepay).add(mainLastRepay);
int otherPeriod = Integer.parseInt(schedule.getOtherPeriod());
int midOtherPeriod = otherPeriod - 2;
BigDecimal otherFirstRepay = schedule.getOtherFirstRepay();
BigDecimal otherMidRepay = schedule.getOtherMidRepay();
BigDecimal otherLastRepay = schedule.getOtherLastRepay();
amountOther = otherMidRepay.multiply(new BigDecimal(midOtherPeriod)).add(otherFirstRepay).add(otherLastRepay);
amountMain = amountMain.add(amountOther);
}
}
}
LoanFinBank loanFinBank = loanFinBankService.selBankByOrderSid(salesOrderSid);
if (null != loanFinBank) {
bankName = loanFinBank.getBankShortName();
}
if (null != salesOrder) {
if (!vehicles.isEmpty()) {
for (BusSalesOrderVehicle busSalesOrderVehicle : vehicles) {
GeneralVoucher generalVoucher = new GeneralVoucher();
List<GeneralVoucher.GeneralVoucherDetail> voucherDetails = new ArrayList<>();
String useOrgSid = salesOrder.getUseOrgSid();
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData();
if (null != organizationVo) {
generalVoucher.setUseOrgCode(organizationVo.getOrgCode());
}
if (isOtherPolicy.equals("0")) {
String deptSid = salesOrder.getOrgSid();
GeneralVoucher.GeneralVoucherDetail voucherDetail = new GeneralVoucher.GeneralVoucherDetail();
if (StringUtils.isNotBlank(bankName)) {
voucherDetail.setBankName(bankName);
}
SysOrganizationVo organizationDeptVo = sysOrganizationFeign.fetchBySid(deptSid).getData();
if (null != organizationDeptVo) {
voucherDetail.setDeptCode(organizationDeptVo.getOrgCode());
}
// String busVinSid = vehicle.getSid();
// BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(busVinSid).getData();
if (null != busSalesOrderVehicle) {
String customerNumber = "";
//判断财务系统是否有客户
Boolean aBoolean = finKingDeeFeign.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData();
String linkNo = "";
BusSalesOrderBorrowerDetailsVo borrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(busSalesOrderVehicle.getBorrowerSid()).getData();
if (!aBoolean) {
// List<BdCustomer> bdCustomers = new ArrayList<>();
BdCustomer bdCustomer = new BdCustomer();
bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo());
bdCustomer.setFShortName(salesOrder.getContractNo());
BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData();
bdCustomer.setTOrgIds(data.getOrgCode());
if (org.apache.commons.lang3.StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) {
String vinNo = busSalesOrderVehicle.getLinkNo();
if (vinNo.length() > 8) {
linkNo = vinNo.substring(vinNo.length() - 8);
} else {
linkNo = busSalesOrderVehicle.getLinkNo();
}
if (null != borrowerDetailsVo) {
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo);
}
} else {
if (null != borrowerDetailsVo) {
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo());
}
}
// bdCustomers.add(bdCustomer);
ResultBean<String> resultBean = finKingDeeFeign.draftBdCustomer(bdCustomer);
if (resultBean.getSuccess()) {
customerNumber = bdCustomer.getFNumber();
}
} else {
customerNumber = busSalesOrderVehicle.getTemporaryNo();
}
voucherDetail.setCustomerCode(customerNumber);
}
voucherDetail.setAmount(amountMain);
voucherDetails.add(voucherDetail);
generalVoucher.setVoucherDetails(voucherDetails);
}
if (isOtherPolicy.equals("1")) {
if (sameBank.equals("0")) {
for (int i = 0; i <= 1; i++) {
String deptSid = salesOrder.getOrgSid();
GeneralVoucher.GeneralVoucherDetail voucherDetail = new GeneralVoucher.GeneralVoucherDetail();
if (i == 0) {
if (StringUtils.isNotBlank(bankName)) {
voucherDetail.setBankName(bankName);
}
} else if (i == 1) {
if (StringUtils.isNotBlank(otherBankName)) {
voucherDetail.setBankName(otherBankName);
}
}
SysOrganizationVo organizationDeptVo = sysOrganizationFeign.fetchBySid(deptSid).getData();
if (null != organizationDeptVo) {
voucherDetail.setDeptCode(organizationDeptVo.getOrgCode());
}
// String busVinSid = vehicle.getSid();
// BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(busVinSid).getData();
if (null != busSalesOrderVehicle) {
String customerNumber = "";
//判断财务系统是否有客户
Boolean aBoolean = finKingDeeFeign.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData();
String linkNo = "";
BusSalesOrderBorrowerDetailsVo borrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(busSalesOrderVehicle.getBorrowerSid()).getData();
if (!aBoolean) {
// List<BdCustomer> bdCustomers = new ArrayList<>();
BdCustomer bdCustomer = new BdCustomer();
bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo());
bdCustomer.setFShortName(salesOrder.getContractNo());
BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData();
bdCustomer.setTOrgIds(data.getOrgCode());
if (org.apache.commons.lang3.StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) {
String vinNo = busSalesOrderVehicle.getLinkNo();
if (vinNo.length() > 8) {
linkNo = vinNo.substring(vinNo.length() - 8);
} else {
linkNo = busSalesOrderVehicle.getLinkNo();
}
if (null != borrowerDetailsVo) {
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo);
}
} else {
if (null != borrowerDetailsVo) {
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo());
}
}
// bdCustomers.add(bdCustomer);
ResultBean<String> resultBean = finKingDeeFeign.draftBdCustomer(bdCustomer);
if (resultBean.getSuccess()) {
customerNumber = bdCustomer.getFNumber();
}
} else {
customerNumber = busSalesOrderVehicle.getTemporaryNo();
}
voucherDetail.setCustomerCode(customerNumber);
}
if (i == 0) {
voucherDetail.setAmount(amountMain);
} else if (i == 1) {
voucherDetail.setAmount(amountOther);
}
voucherDetails.add(voucherDetail);
generalVoucher.setVoucherDetails(voucherDetails);
}
}
if (sameBank.equals("1")) {
String deptSid = salesOrder.getOrgSid();
GeneralVoucher.GeneralVoucherDetail voucherDetail = new GeneralVoucher.GeneralVoucherDetail();
if (StringUtils.isNotBlank(bankName)) {
voucherDetail.setBankName(bankName);
}
SysOrganizationVo organizationDeptVo = sysOrganizationFeign.fetchBySid(deptSid).getData();
if (null != organizationDeptVo) {
voucherDetail.setDeptCode(organizationDeptVo.getOrgCode());
}
// String busVinSid = vehicle.getSid();
// BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(busVinSid).getData();
if (null != busSalesOrderVehicle) {
String customerNumber = "";
//判断财务系统是否有客户
Boolean aBoolean = finKingDeeFeign.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData();
String linkNo = "";
BusSalesOrderBorrowerDetailsVo borrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(busSalesOrderVehicle.getBorrowerSid()).getData();
if (!aBoolean) {
// List<BdCustomer> bdCustomers = new ArrayList<>();
BdCustomer bdCustomer = new BdCustomer();
bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo());
bdCustomer.setFShortName(salesOrder.getContractNo());
BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData();
bdCustomer.setTOrgIds(data.getOrgCode());
if (org.apache.commons.lang3.StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) {
String vinNo = busSalesOrderVehicle.getLinkNo();
if (vinNo.length() > 8) {
linkNo = vinNo.substring(vinNo.length() - 8);
} else {
linkNo = busSalesOrderVehicle.getLinkNo();
}
if (null != borrowerDetailsVo) {
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo);
}
} else {
if (null != borrowerDetailsVo) {
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo());
}
}
// bdCustomers.add(bdCustomer);
ResultBean<String> resultBean = finKingDeeFeign.draftBdCustomer(bdCustomer);
if (resultBean.getSuccess()) {
customerNumber = bdCustomer.getFNumber();
}
} else {
customerNumber = busSalesOrderVehicle.getTemporaryNo();
}
voucherDetail.setCustomerCode(customerNumber);
}
voucherDetail.setAmount(amountMain);
voucherDetails.add(voucherDetail);
generalVoucher.setVoucherDetails(voucherDetails);
}
}
finKingDeeFeign.saveScheduleVoucher(generalVoucher);
}
}
}
}
/**
* 根据首期还款日+主产品期数推算主产品月还日期
*
@ -2470,4 +3231,6 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
List<LoanRepaymentHistory> repaymentHistories = baseMapper.selHistoryBySid(sid);
return rb.success().setData(repaymentHistories);
}
}

3
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loantransferpaymentapply/LoanTransferPaymentApplyMapper.xml

@ -69,7 +69,8 @@
r.accountType,
r.accountTypeKey,
r.account,
r.accountNumber
r.accountNumber,
p.dept as salesDept
FROM loan_repayment_history AS h
LEFT JOIN loan_repayment_plan_details AS p ON h.planDetailSid = p.sid
LEFT JOIN loan_transfer_payment_record AS r ON h.sid = r.repaymentHistorySid

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loantransferpaymentapply/LoanTransferPaymentApplyRest.java

@ -44,6 +44,11 @@ public class LoanTransferPaymentApplyRest implements LoanTransferPaymentApplyFei
return loanTransferPaymentApplyService.saveTransferPayment(dto);
}
@Override
public ResultBean<String> paymentCreatePdf(String sid) {
return loanTransferPaymentApplyService.paymentCreatePdf(sid);
}
@Override
public ResultBean<LoanTransferPaymentApplyInit> paymentDetails(String sid) {
return loanTransferPaymentApplyService.paymentDetails(sid);

191
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loantransferpaymentapply/LoanTransferPaymentApplyService.java

@ -2,6 +2,7 @@ package com.yxt.anrui.riskcenter.biz.loantransferpaymentapply;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.math.Money;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -37,6 +38,7 @@ import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo;
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo;
import com.yxt.anrui.flowable.api.utils.ProcDefEnum;
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.portal.api.flow.PCHistTaskListAndCommentList;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
@ -44,12 +46,14 @@ import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.riskcenter.api.loanbuckleapply.LoanBuckleApply;
import com.yxt.anrui.riskcenter.api.loanbuckleapplyrecord.LoanBuckleApplyRecord;
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile;
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualapply.AppAccrualRecordVo;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualapply.AppMonthAccrualDetailsVo;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualapply.LoanMonthlyAccrualApply;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualapply.MonthlyAccrualSourceLCVo;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualrecord.LoanMonthlyAccrualRecord;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistory;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails;
@ -60,21 +64,29 @@ import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService;
import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService;
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService;
import com.yxt.anrui.riskcenter.biz.loantransferpaymentrecord.LoanTransferPaymentRecordService;
import com.yxt.common.base.config.component.DocPdfComponent;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.ConstantUtils;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.WordConvertUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.messagecenter.api.message.Message;
import com.yxt.messagecenter.api.message.MessageFeign;
import com.yxt.messagecenter.api.message.MessageFlowVo;
import com.yxt.messagecenter.api.message.MessageFlowableQuery;
import com.yxt.messagecenter.api.messagelist.MessageList;
import com.yxt.messagecenter.api.messagelist.MessageListFeign;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
@ -82,6 +94,8 @@ import java.util.concurrent.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import static java.util.Comparator.comparing;
/**
* @description:
* @author: fzz
@ -90,6 +104,12 @@ import java.util.stream.Collectors;
@Service
public class LoanTransferPaymentApplyService extends MybatisBaseService<LoanTransferPaymentApplyMapper, LoanTransferPaymentApply> {
@Autowired
private MessageListFeign messageListFeign;
@Autowired
private com.yxt.anrui.portal.api.flow.FlowableFeign flowableFeignPro;
@Autowired
private DocPdfComponent docPdfComponent;
@Autowired
private LoanTransferPaymentRecordService loanTransferPaymentRecordService;
@Autowired
@ -1277,4 +1297,175 @@ public class LoanTransferPaymentApplyService extends MybatisBaseService<LoanTran
}
public ResultBean<String> paymentCreatePdf(String sid) {
ResultBean rb = ResultBean.fireFail();
String finalPath = "";
String filePath = "";
Map<String, Object> dataMap = new HashMap();
List<Map<String, Object>> newList = new ArrayList<>();
LoanTransferPaymentApply data = fetchBySid(sid);
if (null != data) {
List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.TRANSFERPAYMENT.getAttachType());
if (!files.isEmpty()) {
List<String> stringList = new ArrayList<>();
for (LoanFile file : files) {
if (StringUtils.isNotBlank(file.getFileName()) && StringUtils.isNotBlank(file.getFileType())) {
stringList.add(file.getFileName() + "." + file.getFileType());
}
}
if (!stringList.isEmpty()) {
filePath = String.join(",", stringList);
}
}
if (null != data.getApplyDate()) {
dataMap.put("createTime", DateUtil.formatDate(data.getApplyDate()));
}
if (StringUtils.isNotBlank(data.getUseOrgName())) {
dataMap.put("company", data.getUseOrgName());
}
if (StringUtils.isNotBlank(data.getApplyName())) {
dataMap.put("applyName", data.getApplyName());
}
if (StringUtils.isNotBlank(data.getDept())) {
dataMap.put("dept", data.getDept());
}
if (StringUtils.isNotBlank(data.getBillNo())) {
dataMap.put("billNo", data.getBillNo());
}
if (StringUtils.isNotBlank(data.getPayForm())) {
dataMap.put("payWay", data.getPayForm());
}
if (StringUtils.isNotBlank(data.getPayRemarks())) {
dataMap.put("remarks", data.getPayRemarks());
}
if (StringUtils.isNotBlank(data.getRemarks())) {
dataMap.put("otherShow", data.getRemarks());
}
if (StringUtils.isNotBlank(filePath)) {
dataMap.put("filePath", filePath);
}
BigDecimal sumMoney = new BigDecimal(0);
//获取审批记录
if (StringUtils.isNotBlank(data.getProcInstId())) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
String comment1 = (String) comment.get("comment");
sourceLCVo.setName(assigneeName);
sourceLCVo.setComment(comment1);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
sourceLCVos.add(sourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
}
}
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
}
}
sourceLCVo.setName("系统");
sourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
sourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
sourceLCVos.add(sourceLCVo);
}
}
sourceLCVos.sort(comparing(MonthlyAccrualSourceLCVo::getSpsj));
dataMap.put("lcList", sourceLCVos);
}
List<LoanTransferPaymentRecord> records = loanTransferPaymentRecordService.selByMainSid(sid);
if (!records.isEmpty()) {
int sortNo = 1;
for (LoanTransferPaymentRecord applyRecord : records) {
Map<String, Object> map = new HashMap<>();
String recordSid = applyRecord.getRepaymentHistorySid();
LoanTransferPaymentRecordVo details = baseMapper.paymentDetails(applyRecord.getSid());
if (null != details) {
map.put("sortNo", String.valueOf(sortNo++));
if (StringUtils.isNotBlank(details.getLoanContractNo())) {
map.put("loanNo", details.getLoanContractNo());
}
if (StringUtils.isNotBlank(details.getVinNo())) {
map.put("vinNo", details.getVinNo());
}
if (StringUtils.isNotBlank(details.getBankName())) {
map.put("bankName", details.getBankName());
}
if (StringUtils.isNotBlank(details.getBankContractNo())) {
map.put("bankNo", details.getBankContractNo());
}
if (StringUtils.isNotBlank(details.getBorrowerName())) {
map.put("borrowerName", details.getBorrowerName());
}
if (StringUtils.isNotBlank(details.getPeriod())) {
map.put("period", details.getPeriod());
}
if (StringUtils.isNotBlank(details.getActualDate())) {
map.put("return", details.getActualDate());
}
if (StringUtils.isNotBlank(details.getActualMoney())) {
map.put("realMoney", details.getActualMoney());
}
if (StringUtils.isNotBlank(details.getAccountNumber())) {
map.put("accNumber", details.getAccountNumber());
}
BigDecimal money = new BigDecimal(0);
if (StringUtils.isNotBlank(details.getTransferPrincipal())) {
money = new BigDecimal(details.getTransferPrincipal());
}
if (StringUtils.isNotBlank(details.getDefaultInterest())) {
money = new BigDecimal(details.getDefaultInterest()).add(money);
}
map.put("transferMoney", money);
sumMoney = sumMoney.add(money);
if (StringUtils.isNotBlank(details.getSalesDept())) {
map.put("saleDept", details.getSalesDept());
}
}
newList.add(map);
}
}
dataMap.put("newList", newList);
String temp = "/template/";
String targetPath = docPdfComponent.getUploadTemplateUrl();
try {
//获取模板
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/vouchers/transferPay.ftl");
//生成word文件名
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String typeName = dateStr + seconds + ".doc";
File file = new File(targetPath + "templateVouchers" + seconds + ".ftl");
File dir = new File(targetPath);
WordConvertUtils.inputStreamToFile(inputStream, file);
WordConvertUtils.creatWord1(dataMap, file, targetPath, typeName, dir);
//新生成的word路径
String wordPath = targetPath + typeName;
String pdfName = "代付审批" + dateStr + seconds + ".pdf";
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName);
finalPath = temp + pdfName;
} catch (NoClassDefFoundError e) {
e.printStackTrace();
finalPath = targetPath;
}
}
return rb.success().setData(finalPath);
}
}

2831
anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/monthApply2.ftl

File diff suppressed because it is too large

2527
anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/monthBuckle.ftl

File diff suppressed because it is too large

3455
anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/monthapply.ftl

File diff suppressed because it is too large

3958
anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/repayment1.ftl

File diff suppressed because it is too large

6512
anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/repayment2.ftl

File diff suppressed because it is too large

9047
anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/repayment3.ftl

File diff suppressed because it is too large

3127
anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/vouchers/transferPay.ftl

File diff suppressed because it is too large

6
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmapplyinbound/ScmApplyInboundQuery.java

@ -30,6 +30,12 @@ public class ScmApplyInboundQuery implements Query {
private String modelName;
@ApiModelProperty("排产申请编号")
private String pcApplicationCode;
@ApiModelProperty("申请开始时间")
private String createStartTime; // 申请开始时间
@ApiModelProperty("申请结束时间")
private String createEndTime; // 申请结束时间
@ApiModelProperty("流程状态")
private String nodeState;
@ApiModelProperty("创建组织sid")
private String createOrgSid;
}

12
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmapplyinbound/ScmApplyInboundService.java

@ -155,6 +155,7 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<ScmApplyInbound> qw = new QueryWrapper<>();
qw.eq("sai.useOrgSid", query.getCreateOrgSid());
if (StringUtils.isNotBlank(query.getPurchaseOrderNo())) {
qw.like("sai.purchaseOrderNo", query.getPurchaseOrderNo());
}
@ -164,7 +165,14 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa
if (StringUtils.isNotBlank(query.getPcApplicationCode())) {
qw.like("sai.pcApplicationCode", query.getPcApplicationCode());
}
qw.eq("sai.useOrgSid", query.getCreateOrgSid());
if (StringUtils.isNotBlank(query.getNodeState())) {
qw.like("sai.nodeState", query.getNodeState());
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (sai.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(createEndTime), "date_format (sai.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
return qw;
}
@ -1042,7 +1050,7 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa
}
//判断相同车架号在整个集团中是否存在非退库的
Integer count = baseVehicleFeign.selectVinNo(scmApplyInboundVehicleDto.getVinNo().substring(scmApplyInboundVehicleDto.getVinNo().length() - 8)).getData();
if (count > 0){
if (count > 0) {
return new ResultBean().fail().setMsg(scmApplyInboundVehicleDto.getVinNo() + "在集团中存在未退库的车辆,无法入库");
}
}

66
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrack.java

@ -0,0 +1,66 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.api.asbusrepairbilltrack;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: anrui-as(工单回访记录) <br/>
* File: AsBusrepairBillTrack.java <br/>
* Class: com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrack <br/>
* Description: 工单回访记录. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-12 15:18:53 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "工单回访记录", description = "工单回访记录")
@TableName("as_busrepair_bill_track")
public class AsBusrepairBillTrack extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("回访人")
private String createByName; // 回访人
@ApiModelProperty("工单sid")
private String billSid; // 工单sid
@ApiModelProperty("客户sid")
private String customerSid; // 客户sid
@ApiModelProperty("结果")
private String result; // 结果
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
}

67
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrackDetailsVo.java

@ -0,0 +1,67 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.api.asbusrepairbilltrack;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: anrui-as(工单回访记录) <br/>
* File: AsBusrepairBillTrackVo.java <br/>
* Class: com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackVo <br/>
* Description: 工单回访记录 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-12 15:18:54 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "工单回访记录 视图数据详情", description = "工单回访记录 视图数据详情")
public class AsBusrepairBillTrackDetailsVo implements Vo {
private String sid; // sid
@ApiModelProperty("回访人")
private String createByName; // 回访人
@ApiModelProperty("工单sid")
private String billSid; // 工单sid
@ApiModelProperty("客户sid")
private String customerSid; // 客户sid
@ApiModelProperty("结果")
private String result; // 结果
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
}

67
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrackDto.java

@ -0,0 +1,67 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.api.asbusrepairbilltrack;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: anrui-as(工单回访记录) <br/>
* File: AsBusrepairBillTrackDto.java <br/>
* Class: com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackDto <br/>
* Description: 工单回访记录 数据传输对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-12 15:18:53 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "工单回访记录 数据传输对象", description = "工单回访记录 数据传输对象")
public class AsBusrepairBillTrackDto implements Dto {
private String sid; // sid
@ApiModelProperty("回访人")
private String createByName; // 回访人
@ApiModelProperty("工单sid")
private String billSid; // 工单sid
@ApiModelProperty("客户sid")
private String customerSid; // 客户sid
@ApiModelProperty("结果")
private String result; // 结果
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
}

65
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrackQuery.java

@ -0,0 +1,65 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.api.asbusrepairbilltrack;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: anrui-as(工单回访记录) <br/>
* File: AsBusrepairBillTrackQuery.java <br/>
* Class: com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackQuery <br/>
* Description: 工单回访记录 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-12 15:18:53 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "工单回访记录 查询条件", description = "工单回访记录 查询条件")
public class AsBusrepairBillTrackQuery implements Query {
@ApiModelProperty("回访人")
private String createByName; // 回访人
@ApiModelProperty("工单sid")
private String billSid; // 工单sid
@ApiModelProperty("客户sid")
private String customerSid; // 客户sid
@ApiModelProperty("结果")
private String result; // 结果
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
}

67
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbilltrack/AsBusrepairBillTrackVo.java

@ -0,0 +1,67 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.api.asbusrepairbilltrack;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: anrui-as(工单回访记录) <br/>
* File: AsBusrepairBillTrackVo.java <br/>
* Class: com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackVo <br/>
* Description: 工单回访记录 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-12 15:18:54 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "工单回访记录 视图数据对象", description = "工单回访记录 视图数据对象")
public class AsBusrepairBillTrackVo implements Vo {
private String sid; // sid
@ApiModelProperty("回访人")
private String createByName; // 回访人
@ApiModelProperty("工单sid")
private String billSid; // 工单sid
@ApiModelProperty("客户sid")
private String customerSid; // 客户sid
@ApiModelProperty("结果")
private String result; // 结果
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
}

62
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbilltrack/AsBusrepairBillTrackMapper.java

@ -0,0 +1,62 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.biz.asbusrepairbilltrack;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrack;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackVo;
import java.util.List;
/**
* Project: anrui-as(工单回访记录) <br/>
* File: AsBusrepairBillTrackMapper.java <br/>
* Class: com.yxt.anrui.as.biz.asbusrepairbilltrack.AsBusrepairBillTrackMapper <br/>
* Description: 工单回访记录. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-12 15:18:54 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface AsBusrepairBillTrackMapper extends BaseMapper<AsBusrepairBillTrack> {
IPage<AsBusrepairBillTrackVo> selectPageVo(IPage<AsBusrepairBillTrack> page, @Param(Constants.WRAPPER) Wrapper<AsBusrepairBillTrack> qw);
List<AsBusrepairBillTrackVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<AsBusrepairBillTrack> qw);
@Select("select * from as_busrepair_bill_track")
List<AsBusrepairBillTrackVo> selectListVo();
}

13
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbilltrack/AsBusrepairBillTrackMapper.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.as.biz.asbusrepairbilltrack.AsBusrepairBillTrackMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackVo">
SELECT * FROM as_busrepair_bill_track <where> ${ew.sqlSegment} </where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackVo">
SELECT * FROM as_busrepair_bill_track <where> ${ew.sqlSegment} </where>
</select>
</mapper>

93
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbilltrack/AsBusrepairBillTrackRest.java

@ -0,0 +1,93 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.biz.asbusrepairbilltrack;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackQuery;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackVo;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackDetailsVo;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackDto;
/**
* Project: anrui-as(工单回访记录) <br/>
* File: AsBusrepairBillTrackFeignFallback.java <br/>
* Class: com.yxt.anrui.as.biz.asbusrepairbilltrack.AsBusrepairBillTrackRest <br/>
* Description: 工单回访记录. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-12 15:18:54 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "工单回访记录")
@RestController
@RequestMapping("v1/asbusrepairbilltrack")
public class AsBusrepairBillTrackRest {
@Autowired
private AsBusrepairBillTrackService asBusrepairBillTrackService;
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<AsBusrepairBillTrackVo>> listPage(@RequestBody PagerQuery<AsBusrepairBillTrackQuery> pq){
ResultBean rb = ResultBean.fireFail();
PagerVo<AsBusrepairBillTrackVo> pv = asBusrepairBillTrackService.listPageVo(pq);
return rb.success().setData(pv);
}
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody AsBusrepairBillTrackDto dto){
ResultBean rb = ResultBean.fireFail();
asBusrepairBillTrackService.saveOrUpdateDto(dto);
return rb.success();
}
@ApiOperation("根据sid批量删除")
@DeleteMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids){
ResultBean rb = ResultBean.fireFail();
asBusrepairBillTrackService.delBySids(sids);
return rb.success();
}
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean<AsBusrepairBillTrackDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){
ResultBean rb = ResultBean.fireFail();
AsBusrepairBillTrackDetailsVo vo = asBusrepairBillTrackService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
}
}

100
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbilltrack/AsBusrepairBillTrackService.java

@ -0,0 +1,100 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.biz.asbusrepairbilltrack;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrack;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackQuery;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackVo;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackDetailsVo;
import com.yxt.anrui.as.api.asbusrepairbilltrack.AsBusrepairBillTrackDto;
import org.springframework.stereotype.Service;
/**
* Project: anrui-as(工单回访记录) <br/>
* File: AsBusrepairBillTrackService.java <br/>
* Class: com.yxt.anrui.as.biz.asbusrepairbilltrack.AsBusrepairBillTrackService <br/>
* Description: 工单回访记录 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-12 15:18:54 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class AsBusrepairBillTrackService extends MybatisBaseService<AsBusrepairBillTrackMapper, AsBusrepairBillTrack> {
public PagerVo<AsBusrepairBillTrackVo> listPageVo(PagerQuery<AsBusrepairBillTrackQuery> pq) {
AsBusrepairBillTrackQuery query = pq.getParams();
QueryWrapper<AsBusrepairBillTrack> qw = new QueryWrapper<>();
IPage<AsBusrepairBillTrack> page = PagerUtil.queryToPage(pq);
IPage<AsBusrepairBillTrackVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<AsBusrepairBillTrackVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(AsBusrepairBillTrackDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(AsBusrepairBillTrackDto dto){
AsBusrepairBillTrack entity = new AsBusrepairBillTrack();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(AsBusrepairBillTrackDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
AsBusrepairBillTrack entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public AsBusrepairBillTrackDetailsVo fetchDetailsVoBySid(String sid){
AsBusrepairBillTrack entity = fetchBySid(sid);
AsBusrepairBillTrackDetailsVo vo = new AsBusrepairBillTrackDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
}

1
yxt-as/src/main/java/com/yxt/anrui/as/biz/asservicetype/AsServiceTypeService.java

@ -86,6 +86,7 @@ public class AsServiceTypeService extends MybatisBaseService<AsServiceTypeMapper
String orgPath = dto.getOrgPath();
String createOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(createOrgSid).getData();
dto.setUseOrgSid(createOrgSid);
dto.setCreateOrgSid(createOrgSid);
dto.setCreateOrgName(sysOrganizationVo.getName());
this.insertByDto(dto);

2
yxt-as/src/main/java/com/yxt/anrui/as/feign/flowable/flow/ProcDefEnum.java

@ -82,7 +82,7 @@ public enum ProcDefEnum {
LOANCASECLOSEAPPLY("案件结案申请", "process_llaxpwkd:1:8220008"),
LOANLAWSUITAPPLY("诉讼申请", "process_xc4lp97d:1:8380004"),
LOANCASEENTRUSTLAWYERAPPLY("案件委托律师", "process_oe3nvzgn:1:8525004"),
ASARREARSOUTAPPLY("欠款出厂申请", ""),
ASARREARSOUTAPPLY("欠款出厂申请", "process_u14c671d:1:10442504"),
/******************************测试流程id*********************************************/

3
工作内容需要的文档/单据模板/财务凭证打印模板/代付审批/transferPay.ftl

File diff suppressed because one or more lines are too long

48
工作内容需要的文档/单据模板/财务凭证打印模板/代付审批/代收代付.docx

@ -0,0 +1,48 @@
代付审批
${company!}
申请时间:${createTime!}
审批编号:${billNo!}
申请人:
${applyName!}
申请部门:
${dept!}
财务付款形式:
${payWay!}
打款时需要备注内容:
${remarks!}
代付总金额:
${amount!}
其他说明:
${otherShow!}
附件:
${filePath!}
审批流程
${lc.comment!}
${lc.name!}
${lc.spsj!}
代付明细
序号
贷款合同号
资方
资方合同号
车架号
贷款人
期数
实还日期
实还金额
转付金额
转付账号账户
销售部门
${list.sortNo!}
${list.loanNo!}
${list.bankName!}
${list.bankNo!}
${list.vinNo!}
${list.borrowerName!}
${list.period!}
${list.return!}
${list.realMoney!}
${list.transferMoney!}
${list.accNumber!}
${list.saleDept!}

2523
工作内容需要的文档/单据模板/财务凭证打印模板/划扣/monthBuckle.ftl

File diff suppressed because it is too large

37
工作内容需要的文档/单据模板/财务凭证打印模板/划扣/月还划扣.docx

@ -0,0 +1,37 @@
月还划扣审批
${company!}
申请时间:${createTime!}
审批编号:${billNo!}
申请人:
${applyName!}
申请部门:
${dept!}
备注:
${remarks!}
附件:
${filePath!}
审批流程
${lc.comment!}
${lc.name!}
${lc.spsj!}
划扣明细
序号
贷款合同号
资方
资方合同号
车架号
贷款人
期数
实还金额
销售部门
${list.sortNo!}
${list.loanNo!}
${list.bankName!}
${list.bankNo!}
${list.vinNo!}
${list.borrowerName!}
${list.period!}
${list.dueMoney!}
${list.saleDept!}

3455
工作内容需要的文档/单据模板/财务凭证打印模板/月还计提/monthapply.ftl

File diff suppressed because it is too large

38
工作内容需要的文档/单据模板/财务凭证打印模板/月还计提/月还计提.docx

@ -0,0 +1,38 @@
月还计提审批
${company!}
申请时间:${createTime!}
审批编号:${billNo!}
申请人:
${applyName!}
申请部门:
${dept!}
备注:
${remarks!}
附件:
${filePath!}
审批流程
${lc.comment!}
${lc.name!}
${lc.spsj!}
本月应还记录
序号
贷款合同号
资方
资方合同号
车架号
贷款人
期数
应还日期
应还金额
销售部门
${list.sortNo!}
${list.loanNo!}
${list.bankName!}
${list.bankNo!}
${list.vinNo!}
${list.borrowerName!}
${list.period!}
${list.dueDate!}
${list.dueMoney!}
${list.saleDept!}

3958
工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/repayment1.ftl

File diff suppressed because it is too large

6512
工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/repayment2.ftl

File diff suppressed because it is too large

9047
工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/repayment3.ftl

File diff suppressed because it is too large

78
工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/还款计划1.docx

@ -0,0 +1,78 @@
客户还款计划表
生成日期:
${createTime1!}
消贷合同编号:
${loanContractNo1!}
销售部门:
${salesDept1!}
资方:
${bankName1!}
客户:
${customer1!}
贷款人:
${borrowerName1!}
车架号:
${vinNo1!}
期数:
${period1!}
还款总金额:
${amount1!}
首期还款日:
${dueDate1!}
首期月还:
${fMoney1!}
期间月还:
${mMoney1!}
末期月还:
${lMoney1!}

143
工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/还款计划2.docx

@ -0,0 +1,143 @@
客户还款计划表
生成日期:
${createTime1!}
消贷合同编号:
${loanContractNo1!}
销售部门:
${salesDept1!}
资方:
${bankName1!}
客户:
${customer1!}
贷款人:
${borrowerName1!}
车架号:
${vinNo1!}
期数:
${period1!}
还款总金额:
${amount1!}
首期还款日:
${dueDate1!}
首期月还:
${fMoney1!}
期间月还:
${mMoney1!}
末期月还:
${lMoney1!}
客户还款计划表
生成日期:
${createTime2!}
消贷合同编号:
${loanContractNo2!}
销售部门:
${salesDept2!}
资方:
${bankName2!}
客户:
${customer2!}
贷款人:
${borrowerName2!}
车架号:
${vinNo2!}
期数:
${period2!}
还款总金额:
${amount2!}
首期还款日:
${dueDate2!}
首期月还:
${fMoney2!}
期间月还:
${mMoney2!}
末期月还:
${lMoney2!}

208
工作内容需要的文档/单据模板/财务凭证打印模板/还款计划/还款计划3.docx

@ -0,0 +1,208 @@
客户还款计划表
生成日期:
${createTime1!}
消贷合同编号:
${loanContractNo1!}
销售部门:
${salesDept1!}
资方:
${bankName1!}
客户:
${customer1!}
贷款人:
${borrowerName1!}
车架号:
${vinNo1!}
期数:
${period1!}
还款总金额:
${amount1!}
首期还款日:
${dueDate1!}
首期月还:
${fMoney1!}
期间月还:
${mMoney1!}
末期月还:
${lMoney1!}
客户还款计划表
生成日期:
${createTime2!}
消贷合同编号:
${loanContractNo2!}
销售部门:
${salesDept2!}
资方:
${bankName2!}
客户:
${customer2!}
贷款人:
${borrowerName2!}
车架号:
${vinNo2!}
期数:
${period2!}
还款总金额:
${amount2!}
首期还款日:
${dueDate2!}
首期月还:
${fMoney2!}
期间月还:
${mMoney2!}
末期月还:
${lMoney2!}
客户还款计划表
生成日期:
${createTime3!}
消贷合同编号:
${loanContractNo3!}
销售部门:
${salesDept3!}
资方:
${bankName3!}
客户:
${customer3!}
贷款人:
${borrowerName3!}
车架号:
${vinNo3!}
期数:
${period3!}
还款总金额:
${amount3!}
首期还款日:
${dueDate3!}
首期月还:
${fMoney2!}
期间月还:
${mMoney3!}
末期月还:
${lMoney3!}

3
工作内容需要的文档/单据模板/财务凭证打印模板/金融收款单/rskjiguang.ftl

File diff suppressed because one or more lines are too long

3
工作内容需要的文档/单据模板/财务凭证打印模板/金融收款单/rskzhenshi.ftl

File diff suppressed because one or more lines are too long

11
工作内容需要的文档/单据模板/财务凭证打印模板/金融收款单/金融收款单模板(激光打印机).doc

@ -0,0 +1,11 @@
|收款单 |
|收款日期:|${collDate!} |付款方|${payee!} |单据编 |${billNo!} |
| | |: | |号: | |
|结算方式:|${settleType!} |备注:|${remarks!} |
|序号 |贷款人 |
-----------------------
第 1 页 共 1 页

10
工作内容需要的文档/单据模板/财务凭证打印模板/金融收款单/金融收款单模板(针式打印机).doc

@ -0,0 +1,10 @@
|收款单 |
|收款日期:|${collDate!} |付款方: |${payee!} |单据编号: |${billNo!} |
|结算方式:|${settleType!} |备注: |${remarks!} |
|序号 |贷款人 |
-----------------------
第 1 页 共 1 页
Loading…
Cancel
Save