Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 1 month ago
parent
commit
0043c80ae9
  1. 6
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/FinKingDeeFeign.java
  2. 6
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/FinKingDeeFeignFallBack.java
  3. 10
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/stkmiscellaneous/StkMiscellaneous.java
  4. 11
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java
  5. 6
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkmiscellaneous/StkMiscellaneousService.java
  6. 11
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkmiscellaneous/data_FEntity.json
  7. 4
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkmiscellaneous/data_model.json
  8. 2
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkmisdelivery/StkMisDeliveryService.java
  9. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/LoanReturnInboundApply.java
  10. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/LoanReturnInboundApplyDetailsVo.java
  11. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/LoanReturnInboundApplyFeign.java
  12. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesnotapply/LoanSecondarySalesNotApplyFeign.java
  13. 44
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesnotapply/LoanSecondarySalesNotApplyPdfVo.java
  14. 9
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbecollectionapply/LoanBeCollectionApplyService.java
  15. 1
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoverduefin/LoanOverdueFinService.java
  16. 54
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java
  17. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java
  18. 10
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml
  19. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java
  20. 18
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyRest.java
  21. 156
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyService.java
  22. 82
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java
  23. 7
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesnotapply/LoanSecondarySalesNotApplyRest.java
  24. 132
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesnotapply/LoanSecondarySalesNotApplyService.java
  25. 3764
      anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/bzc.ftl
  26. 10
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatecheckapply/ScmSpecialrebateCheckapplyMapper.xml
  27. 20
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatecheckapplydetail/ScmSpecialrebateCheckapplydetailMapper.xml
  28. 36
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml
  29. 21
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java
  30. 20
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatecheckapplydetail/ScmVehrebateCheckapplydetailMapper.xml

6
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/FinKingDeeFeign.java

@ -23,6 +23,7 @@ import com.yxt.anrui.fin.api.kingdee.push.SalOutStockPushSalReturnStock;
import com.yxt.anrui.fin.api.kingdee.salesreturn.SalesReturn;
import com.yxt.anrui.fin.api.kingdee.saloutstock.SalOutStock;
import com.yxt.anrui.fin.api.kingdee.stkinstock.StkInStock;
import com.yxt.anrui.fin.api.kingdee.stkmiscellaneous.StkMiscellaneous;
import com.yxt.anrui.fin.api.kingdee.stktransferdirect.StkTransferDirect;
import com.yxt.anrui.fin.api.kingdee.voucher.CollectionVoucher;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
@ -365,4 +366,9 @@ public interface FinKingDeeFeign {
// ResultBean<String> draftSalesReturnOrders(@RequestBody @Valid SalesReturn salesReturn);
ResultBean<String> draftSalesReturnOrders(@RequestBody @Valid SalOutStockPushSalReturnStock salReturnStock) throws Exception;
@ApiOperation("其它入库单保存接口")
@PostMapping("/draftStkMiscellaneous")
@ResponseBody
ResultBean<String> draftStkMiscellaneous(@RequestBody @Valid StkMiscellaneous stkMiscellaneous);
}

6
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/FinKingDeeFeignFallBack.java

@ -23,6 +23,7 @@ import com.yxt.anrui.fin.api.kingdee.push.SalOutStockPushSalReturnStock;
import com.yxt.anrui.fin.api.kingdee.salesreturn.SalesReturn;
import com.yxt.anrui.fin.api.kingdee.saloutstock.SalOutStock;
import com.yxt.anrui.fin.api.kingdee.stkinstock.StkInStock;
import com.yxt.anrui.fin.api.kingdee.stkmiscellaneous.StkMiscellaneous;
import com.yxt.anrui.fin.api.kingdee.stktransferdirect.StkTransferDirect;
import com.yxt.anrui.fin.api.kingdee.voucher.CollectionVoucher;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
@ -334,5 +335,10 @@ implements FinKingDeeFeign{
return null;
}
@Override
public ResultBean<String> draftStkMiscellaneous(StkMiscellaneous stkMiscellaneous){
return null;
}
}

10
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/stkmiscellaneous/StkMiscellaneous.java

@ -1,5 +1,6 @@
package com.yxt.anrui.fin.api.kingdee.stkmiscellaneous;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -14,24 +15,25 @@ import java.util.List;
@Data
public class StkMiscellaneous {
@ApiModelProperty("编号")
private String FBillNo;
@ApiModelProperty("库存组织")
@JsonProperty("FStockOrgId")
private String FStockOrgId;
@ApiModelProperty("部门")
@JsonProperty("FDEPTID")
private String FDEPTID;
@ApiModelProperty("日期")
private String FDate;
@ApiModelProperty("货主")
@JsonProperty("FOwnerIdHead")
private String FOwnerIdHead;
@ApiModelProperty("备注")
private String FNOTE;
public List<StkMiscellaneousEntry> StkMiscellaneousEntry = new ArrayList<>();
public List<StkMiscellaneous.StkMiscellaneousEntry> StkMiscellaneousEntry = new ArrayList<>();
@Data
public class StkMiscellaneousEntry {
public static class StkMiscellaneousEntry {
//物料编码
private String FMATERIALID;

11
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java

@ -28,6 +28,7 @@ import com.yxt.anrui.fin.api.kingdee.push.SalOutStockPushSalReturnStock;
import com.yxt.anrui.fin.api.kingdee.salesreturn.SalesReturn;
import com.yxt.anrui.fin.api.kingdee.saloutstock.SalOutStock;
import com.yxt.anrui.fin.api.kingdee.stkinstock.StkInStock;
import com.yxt.anrui.fin.api.kingdee.stkmiscellaneous.StkMiscellaneous;
import com.yxt.anrui.fin.api.kingdee.stktransferdirect.StkTransferDirect;
import com.yxt.anrui.fin.api.kingdee.voucher.*;
import com.yxt.anrui.fin.biz.kingdee.appayable.APPayableService;
@ -54,6 +55,7 @@ import com.yxt.anrui.fin.biz.kingdee.receivablebill.ReceivableBillService;
import com.yxt.anrui.fin.biz.kingdee.salesreturn.SalesReturnOrdersService;
import com.yxt.anrui.fin.biz.kingdee.saloutstock.SalOutStockService;
import com.yxt.anrui.fin.biz.kingdee.stkinstock.STKInStockService;
import com.yxt.anrui.fin.biz.kingdee.stkmiscellaneous.StkMiscellaneousService;
import com.yxt.anrui.fin.biz.kingdee.stktransferdirect.StkTransferDirectService;
import com.yxt.anrui.fin.biz.kingdee.voucher.VoucherService;
import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign;
@ -216,6 +218,9 @@ public class FinKingDeeFeignRest implements FinKingDeeFeign {
@Autowired
private SysMappingFeign sysMappingFeign;
@Autowired
private StkMiscellaneousService stkMiscellaneousService;
@ApiOperation("入账暂存应付单的接口")
@PostMapping("/draftEntryBill")
@ResponseBody
@ -2008,6 +2013,12 @@ public class FinKingDeeFeignRest implements FinKingDeeFeign {
return pushReturnService.getReturnStock(salReturnStock);
}
@Override
public ResultBean<String> draftStkMiscellaneous(StkMiscellaneous stkMiscellaneous) {
log.info("FinKingDeeFeignRest-draftStkMiscellaneous:{}", JSONObject.toJSONString(stkMiscellaneous));
return stkMiscellaneousService.draftStkMiscellaneous(stkMiscellaneous);
}
@ApiOperation("暂存收款单的接口")
@PostMapping("/draftArReceivebill")
@ResponseBody

6
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkmiscellaneous/StkMiscellaneousService.java

@ -37,13 +37,16 @@ public class StkMiscellaneousService extends FinKingDeeService {
map_fEntityModel_.put("FDate", sdf.format(new Date()));
}
map_fEntityModel_.put("FBaseCurrId", "PRE001");
map_fEntityModel_.put("FOwnerIdHead",stkMiscellaneous.getFOwnerIdHead());
map_fEntityModel_.put("FDEPTID",stkMiscellaneous.getFDEPTID());
map_fEntityModel_.put("FNOTE",stkMiscellaneous.getFNOTE());
List<StkMiscellaneous.StkMiscellaneousEntry> stkMiscellaneousEntryList = stkMiscellaneous.getStkMiscellaneousEntry() == null ? new ArrayList<>() : stkMiscellaneous.getStkMiscellaneousEntry();
//准备 物料列表的数据
ResultBean<List<Map<String, String>>> vehicleListMap = createVehicleListsForReceivableBill(stkMiscellaneousEntryList);
if (!vehicleListMap.getSuccess()) {
return rb.setMsg(vehicleListMap.getMsg());
}
String kingDeeData = VoucherCastToKingDeeBillFields.getKingDeeData(map_fEntityModel_, vehicleListMap.getData());
String kingDeeData = StkMiscellaneousCastToKingDeeBillFields.getKingDeeData(map_fEntityModel_, vehicleListMap.getData());
try {
ResultBean<String> resultBean1 = accessKingDeeInterface(KingDeeBillId.STK_MISCELLANEOUS.getID(), kingDeeData, KingDeeBillUrl.SAVE_URL.getURL());
if (!resultBean1.getSuccess()) {
@ -72,6 +75,7 @@ public class StkMiscellaneousService extends FinKingDeeService {
m.put("FUnitID", c.getFUnitID());
m.put("FSTOCKID", c.getFSTOCKID());
m.put("FOWNERID", c.getFOWNERID());
m.put("FKEEPERID", c.getFOWNERID());
mapList.add(m);
}

11
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkmiscellaneous/data_FEntity.json

@ -6,9 +6,10 @@
"FUnitID": {
"FNumber": "@KD_FUnitID"
},
"FQty": {
"FNumber": "@KD_FQty"
},
"FQty": 1.0,
"FREALQTY": 1.0,
"FBASEQTY": 1.0,
"FBaseUnitID": { "FNumber": "liang" },
"FSTOCKID": {
"FNumber": "@KD_FSTOCKID"
},
@ -18,5 +19,7 @@
"FOWNERTYPEID": "BD_OwnerOrg",
"FOWNERID": {
"FNumber": "@KD_FOWNERID"
}
},
"FKEEPERTYPEID": "BD_KeeperOrg",
"FKEEPERID": {"FNumber": "@KD_FKEEPERID"}
}

4
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkmiscellaneous/data_model.json

@ -1,5 +1,4 @@
{
"FBillNo": "@KD_FBillNo",
"FBillTypeID": {
"FNUMBER": "QTRKD01_SYS"
},
@ -15,6 +14,9 @@
"FBaseCurrId": {
"FNumber": "PRE001"
},
"FDEPTID": {
"FNumber": "@KD_FDEPTID"
},
"FNOTE": "@KD_FNOTE",
"FEntity": [
]

2
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkmisdelivery/StkMisDeliveryService.java

@ -45,7 +45,7 @@ public class StkMisDeliveryService extends FinKingDeeService {
if (!vehicleListMap.getSuccess()) {
return rb.setMsg(vehicleListMap.getMsg());
}
String kingDeeData = VoucherCastToKingDeeBillFields.getKingDeeData(map_fEntityModel_, vehicleListMap.getData());
String kingDeeData = StkMisDeliveryCastToKingDeeBillFields.getKingDeeData(map_fEntityModel_, vehicleListMap.getData());
try {
ResultBean<String> resultBean1 = accessKingDeeInterface(KingDeeBillId.STK_MISCELLANEOUS.getID(), kingDeeData, KingDeeBillUrl.SAVE_URL.getURL());
if (!resultBean1.getSuccess()) {

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/LoanReturnInboundApply.java

@ -21,6 +21,8 @@ public class LoanReturnInboundApply extends BaseEntity {
private String createDeptSid;
@ApiModelProperty("申请人")
private String createByName;
@ApiModelProperty("申请编号")
private String billNo;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("车辆sid")

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/LoanReturnInboundApplyDetailsVo.java

@ -26,6 +26,8 @@ public class LoanReturnInboundApplyDetailsVo {
private String createByName;
@ApiModelProperty("发起日期")
private String createDate;
@ApiModelProperty("申请编号")
private String billNo;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("车辆sid")

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/LoanReturnInboundApplyFeign.java

@ -44,6 +44,11 @@ public interface LoanReturnInboundApplyFeign {
@DeleteMapping("/delBySids")
ResultBean delBySids(@RequestBody String[] sids);
@ApiOperation("生成pdf")
@PostMapping("/createPdf")
@ResponseBody
ResultBean<String> createPdf(@RequestParam("sid") String sid, @RequestParam("userName") String userName);
@ApiOperation("提交")
@PostMapping("/submitApply")
public ResultBean submitApply(@Valid @RequestBody SubmitReturnInbondApplyDto dto);

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesnotapply/LoanSecondarySalesNotApplyFeign.java

@ -69,6 +69,11 @@ public interface LoanSecondarySalesNotApplyFeign {
@ResponseBody
public ResultBean<LoanSecondarySalesNotApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
@ApiOperation("生成pdf")
@PostMapping("/createPdf")
@ResponseBody
ResultBean<String> createPdf(@RequestParam("sid") String sid, @RequestParam("userName") String userName);
@ApiOperation("提交审批流程")
@PostMapping("/submit")
public ResultBean submit(@RequestBody @Valid SubmitDto dto);

44
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesnotapply/LoanSecondarySalesNotApplyPdfVo.java

@ -0,0 +1,44 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.riskcenter.api.loansecondarysalesnotapply;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class LoanSecondarySalesNotApplyPdfVo implements Vo {
private Integer id;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("车牌号")
private String cph;
@ApiModelProperty("车辆类型")
private String lx;
@ApiModelProperty("车型")
private String cx;
}

9
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbecollectionapply/LoanBeCollectionApplyService.java

@ -59,7 +59,6 @@ import com.yxt.anrui.riskcenter.api.loanbecollectionapply.*;
import com.yxt.anrui.riskcenter.api.loanbecollectionapply.flowable.*;
import com.yxt.anrui.riskcenter.api.loanbecollectionrecord.LoanBeCollectionRecordVehInit;
import com.yxt.anrui.riskcenter.api.loanbecollectionveh.LoanBeCollectionVehDbrDetailsVo;
import com.yxt.anrui.riskcenter.api.loanvehclearanceveh.LoanVehClearanceLockCarVo;
import com.yxt.anrui.riskcenter.api.loanbecollectionveh.LoanBeCollectionVehDetailsVo;
import com.yxt.anrui.riskcenter.api.loanbecollectionveh.LoanBeCollectionVehDto;
import com.yxt.anrui.riskcenter.api.loanbecollectionveh.LoanBeCollectionVehFile;
@ -409,10 +408,12 @@ public class LoanBeCollectionApplyService extends MybatisBaseService<LoanBeColle
loanBeCollectionVehFiles.add(loanBeCollectionVehFile1);
//开票管理sid
FinVehicleInvoice finVehicleInvoice = finVehicleInvoiceFeign.selectByVinAndContractNo(busSalesOrderVehicle1.getLinkSid(), busSalesOrder.getContractNo()).getData();
if (finVehicleInvoice != null){
LoanBeCollectionVehFile loanBeCollectionVehFile2 = new LoanBeCollectionVehFile();
loanBeCollectionVehFile2.setName("开票信息");
loanBeCollectionVehFile2.setSid(finVehicleInvoice.getSid());
loanBeCollectionVehFiles.add(loanBeCollectionVehFile2);
}
//月还明细sid
LoanBeCollectionVehFile loanBeCollectionVehFile3 = new LoanBeCollectionVehFile();
loanBeCollectionVehFile3.setName("月还明细");
@ -420,12 +421,15 @@ public class LoanBeCollectionApplyService extends MybatisBaseService<LoanBeColle
loanBeCollectionVehFiles.add(loanBeCollectionVehFile3);
//金融方案sid
LoanSolutions loanSolutions = loanSolutionsService.selectBySaleOrderSid(busSalesOrder.getSid());
if (loanSolutions != null){
LoanBeCollectionVehFile loanBeCollectionVehFile4 = new LoanBeCollectionVehFile();
loanBeCollectionVehFile4.setName("金融方案");
loanBeCollectionVehFile4.setSid(loanSolutions.getSid());
loanBeCollectionVehFiles.add(loanBeCollectionVehFile4);
}
//家访考察报告sid
String jfkcSid = loanHomevisitInvestigateService.selectByBorrSid(busSalesOrderVehicle1.getBorrowerSid());
if (StringUtils.isNotBlank(jfkcSid)){
LoanBeCollectionVehFile loanBeCollectionVehFile5 = new LoanBeCollectionVehFile();
loanBeCollectionVehFile5.setName("家访考察报告");
loanBeCollectionVehFile5.setSid(jfkcSid);
@ -435,6 +439,7 @@ public class LoanBeCollectionApplyService extends MybatisBaseService<LoanBeColle
loanBeCollectionVehFile6.setName("家访考察资料");
loanBeCollectionVehFile6.setSid(jfkcSid);
loanBeCollectionVehFiles.add(loanBeCollectionVehFile6);
}
loanBeCollectionVehDetailsVo.setSids(loanBeCollectionVehFiles);
}
vo.setLoanBeCollectionVehDetails(loanBeCollectionVehDetailsVos);
@ -502,6 +507,7 @@ public class LoanBeCollectionApplyService extends MybatisBaseService<LoanBeColle
loanBeCollectionVehFiles.add(loanBeCollectionVehFile4);
//家访考察报告sid
String sid = loanHomevisitInvestigateService.selectByBorrSid(busSalesOrderVehicle.getBorrowerSid());
if (StringUtils.isNotBlank(sid)){
LoanBeCollectionVehFile loanBeCollectionVehFile5 = new LoanBeCollectionVehFile();
loanBeCollectionVehFile5.setName("家访考察报告");
loanBeCollectionVehFile5.setSid(sid);
@ -512,6 +518,7 @@ public class LoanBeCollectionApplyService extends MybatisBaseService<LoanBeColle
loanBeCollectionVehFile6.setSid(sid);
loanBeCollectionVehFiles.add(loanBeCollectionVehFile6);
loanBeCollectionVehDetailsVo.setSids(loanBeCollectionVehFiles);
}
loanBeCollectionVehDetailsVos.add(loanBeCollectionVehDetailsVo);
}
if (StringUtils.isNotBlank(yckzVinNo)) {

1
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoverduefin/LoanOverdueFinService.java

@ -772,7 +772,6 @@ public class LoanOverdueFinService extends MybatisBaseService<LoanOverdueFinMapp
NullPointerException nullPointerException = new NullPointerException();
}
String temp = getCellVal(row.getCell(i)).toString().trim();
temp = temp.replace(".0", "");
for (int j = 0; j < resultCell.length; j++) {
if (i == resultCell[j]) {
switch (i) {

54
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java

@ -7,16 +7,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
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.bussalesorder.BusSalesOrder;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign;
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.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailedjr.FinUncollectedReceivablesDetailedJR;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailedjr.FinUncollectedReceivablesDetailedJRFeign;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
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,11 +33,6 @@ 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.*;
import com.yxt.anrui.riskcenter.api.loanbuckleapply.app.AppBuckleDetailsVo;
import com.yxt.anrui.riskcenter.api.loanbuckleapply.app.AppRecordVo;
import com.yxt.anrui.riskcenter.api.loanbuckleapply.flow.*;
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.loanoutboundapply.LoanOutboundApplyDto;
@ -47,12 +42,8 @@ import com.yxt.anrui.riskcenter.api.loanredemptionapply.app.AppRedemptionDetails
import com.yxt.anrui.riskcenter.api.loanredemptionapply.app.AppVinListVo;
import com.yxt.anrui.riskcenter.api.loanredemptionapply.flow.*;
import com.yxt.anrui.riskcenter.api.loanredemptionveh.LoanRedemptionVeh;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistory;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistoryRecordVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails;
import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo;
import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger;
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList;
import com.yxt.anrui.riskcenter.api.loansubletapply.VehDisposal;
import com.yxt.anrui.riskcenter.biz.loanbuckleapplyrecord.LoanBuckleApplyRecordService;
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService;
@ -93,14 +84,10 @@ public class LoanRedemptionApplyService extends MybatisBaseService<LoanRedemptio
@Autowired
private SysUserFeign sysUserFeign;
@Autowired
private LoanRepaymentHistoryService loanRepaymentHistoryService;
@Autowired
private SysStaffOrgFeign sysStaffOrgFeign;
@Autowired
private SysOrganizationFeign sysOrganizationFeign;
@Autowired
private LoanBuckleApplyRecordService loanBuckleApplyRecordService;
@Autowired
private LoanFileService loanFileService;
@Autowired
private FileUploadComponent fileUploadComponent;
@ -115,14 +102,8 @@ public class LoanRedemptionApplyService extends MybatisBaseService<LoanRedemptio
@Autowired
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign;
@Autowired
private FinKingDeeFeign finKingDeeFeign;
@Autowired
private BusSalesOrderBorrowerFeign busSalesOrderBorrowerFeign;
@Autowired
private BusSalesOrderFeign busSalesOrderFeign;
@Autowired
private BasePurchaseSystemFeign basePurchaseSystemFeign;
@Autowired
private LoanRestoreReportApplyService loanRestoreReportApplyService;
@Autowired
private LoanRedemptionVehService loanRedemptionVehService;
@ -130,6 +111,8 @@ public class LoanRedemptionApplyService extends MybatisBaseService<LoanRedemptio
private LoanOutboundApplyService loanOutboundApplyService;
@Autowired
private CrmCustomerTempFeign crmCustomerTempFeign;
@Autowired
private FinUncollectedReceivablesDetailedJRFeign finUncollectedReceivablesDetailedJRFeign;
public PagerVo<LoanRedemptionApplyVo> listPage(PagerQuery<LoanRedemptionApplyQuery> pq) {
IPage<LoanRedemptionApply> page = PagerUtil.queryToPage(pq);
@ -804,6 +787,31 @@ public class LoanRedemptionApplyService extends MybatisBaseService<LoanRedemptio
LoanRedemptionApply redemptionApply = fetchBySid(businessSid);
redemptionApply.setClosingDate(new DateTime());
baseMapper.updateById(redemptionApply);
List<RedemptionVinList> redemptionVinLists = loanRedemptionVehService.selByMainSid(businessSid);
FinUncollectedReceivablesDetailedJR finUncollectedReceivablesDetailedJR = new FinUncollectedReceivablesDetailedJR();
finUncollectedReceivablesDetailedJR.setCreateByName(redemptionApply.getApplyName());
finUncollectedReceivablesDetailedJR.setCreateBySid(redemptionApply.getCreateBySid());
//查询销售订单信息
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.fetchBySalesOrderVehiclerSid(redemptionVinLists.get(0).getBusVinSid()).getData();
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(busSalesOrderVehicle.getSalesOrderSid()).getData();
finUncollectedReceivablesDetailedJR.setApplySid(redemptionApply.getSid());
String planSid = loanRepaymentPlanDetailsService.selByBusVinSidMax(busSalesOrderVehicle.getSid());
finUncollectedReceivablesDetailedJR.setBusSid(planSid);
finUncollectedReceivablesDetailedJR.setPayCostTitleKey("016");
finUncollectedReceivablesDetailedJR.setPayCostTitleValue("收回车辆费用");
finUncollectedReceivablesDetailedJR.setReveivableMoney(redemptionApply.getFees());
finUncollectedReceivablesDetailedJR.setCurrentReceivableMoney(redemptionApply.getFees());
finUncollectedReceivablesDetailedJR.setPurchaseSystemSid(busSalesOrder.getPurchaseSystemSid());
finUncollectedReceivablesDetailedJR.setPurchaseSystemName(busSalesOrder.getPurchaseSystemName());
finUncollectedReceivablesDetailedJR.setStaffUserSid(busSalesOrder.getCreateBySid());
finUncollectedReceivablesDetailedJR.setStaffName(busSalesOrder.getStaffName());
finUncollectedReceivablesDetailedJR.setStaffDeptSid(busSalesOrder.getOrgSid());
finUncollectedReceivablesDetailedJR.setStaffDeptName(busSalesOrder.getOrgName());
finUncollectedReceivablesDetailedJR.setUseOrgSid(redemptionApply.getUseOrgSid());
finUncollectedReceivablesDetailedJR.setUseOrgName(redemptionApply.getUseOrgName());
finUncollectedReceivablesDetailedJR.setOrgSidPath(redemptionApply.getOrgSidPath());
finUncollectedReceivablesDetailedJR.setKxState("01");
finUncollectedReceivablesDetailedJRFeign.save(finUncollectedReceivablesDetailedJR);
try {
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder()
.setNameFormat("demo-pool-%d").build();

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java

@ -113,4 +113,6 @@ public interface LoanRepaymentPlanDetailsMapper extends BaseMapper<LoanRepayment
String getBj(@Param("busVinSid") String busVinSid);
String selByBusVinSid(@Param("saleVehSid") String saleVehSid,@Param("date") String date);
String selByBusVinSidMax(String saleVehSid);
}

10
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

@ -1021,4 +1021,14 @@
WHERE busVinSid = #{saleVehSid}
AND dueDate LIKE CONCAT(#{date}, '%')
</select>
<select id="selByBusVinSidMax" resultType="java.lang.String">
SELECT
sid
FROM
loan_repayment_plan_details
WHERE busVinSid = #{saleVehSid}
ORDER BY period DESC
LIMIT 1
</select>
</mapper>

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java

@ -391,4 +391,8 @@ public class LoanRepaymentPlanDetailsService extends MybatisBaseService<LoanRepa
public String selByBusVinSid(String saleVehSid, String date) {
return baseMapper.selByBusVinSid(saleVehSid, date);
}
public String selByBusVinSidMax(String saleVehSid) {
return baseMapper.selByBusVinSidMax(saleVehSid);
}
}

18
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyRest.java

@ -59,6 +59,13 @@ public class LoanReturnInboundApplyRest implements LoanReturnInboundApplyFeign {
return loanReturnInboundApplyService.delAllBySids(sids);
}
@Override
public ResultBean<String> createPdf(String sid, String userName) {
ResultBean rb = ResultBean.fireFail();
String pdf = loanReturnInboundApplyService.createPdf(sid, userName);
return rb.success().setData(pdf);
}
@Override
public ResultBean submitApply(SubmitReturnInbondApplyDto dto) {
return loanReturnInboundApplyService.submitApply(dto);
@ -114,4 +121,15 @@ public class LoanReturnInboundApplyRest implements LoanReturnInboundApplyFeign {
return ResultBean.fireSuccess();
}
@ApiOperation(value = "财务推送其它入库单测试")
@PostMapping(value = "/pushStkIn")
public ResultBean pushStkIn(String sid){
LoanReturnInboundApply loanReturnInboundApply = loanReturnInboundApplyService.fetchBySid(sid);
loanReturnInboundApplyService.pushStkIn(loanReturnInboundApply);
return ResultBean.fireSuccess();
}
}

156
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyService.java

@ -18,8 +18,10 @@ import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFe
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusVinStateSetQuery;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordSourceLCVo;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.bdcustomer.BdCustomer;
import com.yxt.anrui.fin.api.kingdee.stkmiscellaneous.StkMiscellaneous;
import com.yxt.anrui.fin.api.kingdee.voucher.Voucher;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
@ -30,6 +32,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.SysStaffOrgFeign;
@ -44,19 +47,27 @@ import com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable.*;
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailer;
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailerDto;
import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger;
import com.yxt.anrui.riskcenter.api.loansecondarysalesnotapply.LoanSecondarySalesNotApplyDetailsVo;
import com.yxt.anrui.riskcenter.api.loansecondarysalesnotapply.LoanSecondarySalesNotApplyPdfVo;
import com.yxt.anrui.riskcenter.api.loansecondarysalesnotveh.LoanSecondarySalesNotVehDetailsVo;
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService;
import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService;
import com.yxt.anrui.riskcenter.biz.loanreturninboundtrailer.LoanReturnInboundTrailerService;
import com.yxt.anrui.riskcenter.biz.loanreturnvehledger.LoanReturnVehLedgerService;
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.WordUtils;
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.apache.tomcat.util.threads.ThreadPoolExecutor;
import org.springframework.beans.factory.annotation.Autowired;
@ -67,6 +78,8 @@ import java.util.*;
import java.util.concurrent.*;
import java.util.stream.Collectors;
import static java.util.Comparator.comparing;
/**
* @description:
* @author: dimengzhe
@ -109,7 +122,10 @@ public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturn
private BusSalesOrderFeign busSalesOrderFeign;
@Autowired
private BasePurchaseSystemFeign basePurchaseSystemFeign;
@Autowired
private MessageListFeign messageListFeign;
@Autowired
private com.yxt.anrui.portal.api.flow.FlowableFeign flowableFeignSp;
@Autowired
private LoanRepaymentPlanDetailsService loanRepaymentPlanDetailsService;
@ -610,6 +626,11 @@ public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturn
//TOdO:
pushRiskToFin(finalLoanReturnInboundApply);
});
Future future2 = pool.submit(() -> {
//推送其他入库单
//TOdO:
pushStkIn(finalLoanReturnInboundApply);
});
} catch (Exception e) {
e.printStackTrace();
}
@ -707,8 +728,6 @@ public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturn
all = lqMoney.add(wdqMoney).add(bjMoney);
List<Voucher.VoucherResultDetailDto> voucherResultDetailDtos = new ArrayList<>();
//借方
Voucher.VoucherResultDetailDto voucherResultDetailDtoJf = new Voucher.VoucherResultDetailDto();
@ -771,6 +790,27 @@ public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturn
}
public void pushStkIn(LoanReturnInboundApply loanReturnInboundApply) {
SysOrganizationVo sysOrg = sysOrganizationFeign.fetchBySid(loanReturnInboundApply.getUseOrgSid()).getData();
StkMiscellaneous stkMiscellaneous = new StkMiscellaneous();
List<StkMiscellaneous.StkMiscellaneousEntry> stkMiscellaneousEntryList = new ArrayList<>();
SysOrganizationVo sysOrgDept = sysOrganizationFeign.fetchBySid(loanReturnInboundApply.getCreateDeptSid()).getData();
stkMiscellaneous.setFStockOrgId(sysOrg.getOrgCode());
stkMiscellaneous.setFDEPTID(sysOrgDept.getOrgCode());
stkMiscellaneous.setFNOTE("");
stkMiscellaneous.setFDate(DateUtil.today());
stkMiscellaneous.setFOwnerIdHead(sysOrg.getOrgCode());
StkMiscellaneous.StkMiscellaneousEntry stkMiscellaneousEntry = new StkMiscellaneous.StkMiscellaneousEntry();
stkMiscellaneousEntry.setFMATERIALID(loanReturnInboundApply.getVinNo());
stkMiscellaneousEntry.setFUnitID("liang");
stkMiscellaneousEntry.setFSTOCKID("ARZSCK");
stkMiscellaneousEntry.setFOWNERID(sysOrg.getOrgCode());
stkMiscellaneousEntryList.add(stkMiscellaneousEntry);
stkMiscellaneous.setStkMiscellaneousEntry(stkMiscellaneousEntryList);
ResultBean resultBean = finKingDeeFeign.draftStkMiscellaneous(stkMiscellaneous);
}
private int submitBusinessData(SubmitReturnInbondApplyDto dto, LoanReturnInboundApply loanReturnInboundApply) {
int r = 0;
if (StringUtils.isBlank(dto.getSid())) {
@ -941,6 +981,116 @@ public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturn
return rb.success().setData(returnAppVo);
}
public String createPdf(String sid, String userName) {
LoanReturnInboundApplyDetailsQuery query = new LoanReturnInboundApplyDetailsQuery();
query.setSid(sid);
LoanReturnInboundApplyDetailsVo data = details(query).getData();
Map<String, Object> dataMap = new HashMap<String, Object>();
//分公司
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(data.getUseOrgSid()).getData();
dataMap.put("orgName", sysOrganizationVo.getName());
//创建部门
dataMap.put("deptName", data.getCreateDept());
//创建人
dataMap.put("createName", data.getCreateByName());
//创建日期
dataMap.put("createTime", data.getCreateDate());
//办结日期
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(sid);
dataMap.put("finishTime", loanReturnInboundApply.getCloseDate());
//审批编号
dataMap.put("billNo", data.getBillNo());
dataMap.put("zc", data.getVinNo());
dataMap.put("zch", data.getVehMark());
dataMap.put("djrq", data.getFirstDate());
dataMap.put("cx", data.getModelName());
dataMap.put("dgc", data.getTralier());
dataMap.put("name", data.getCustomerName());
dataMap.put("dkr", data.getLoanName());
dataMap.put("dkbh", data.getLoanContractNo());
dataMap.put("zf", data.getBankName());
dataMap.put("zfbh", data.getLocationName());
dataMap.put("sfbz", data.getParkFees());
//挂车
LoanReturnInboundTrailerDto loanReturnInboundTrailer = data.getLoanReturnInboundTrailer();
dataMap.put("gc", loanReturnInboundTrailer.getVinNo());
dataMap.put("gch", loanReturnInboundTrailer.getVehMark());
dataMap.put("gcj", loanReturnInboundTrailer.getInboundMoney());
dataMap.put("lx", loanReturnInboundTrailer.getTrailerType());
dataMap.put("bz", loanReturnInboundTrailer.getRemarks());
//已还与欠款情况
dataMap.put("yh", data.getAlRepaidMoney());
dataMap.put("yq", data.getCurrentBeMoney() + "/" + data.getWheFundOccMoney());
dataMap.put("wdq", data.getUnexpiredMoney());
dataMap.put("qs", data.getNper() + "/" + data.getCurrentPeriod());
dataMap.put("qhqs", data.getAlRepaidMoneyConPeriod());
dataMap.put("yqqs", data.getBeOverdueMoneyAndPeriod());
dataMap.put("remarks", data.getRemarks());
//获取审批记录
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignSp.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<FinPaymentrecordSourceLCVo> finPaymentrecordSourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
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");
finPaymentrecordSourceLCVo.setName(assigneeName);
finPaymentrecordSourceLCVo.setComment(comment1);
finPaymentrecordSourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
finPaymentrecordSourceLCVo.setName(processCommentVo.get("title").toString());
finPaymentrecordSourceLCVo.setComment(processCommentVo.get("content").toString());
finPaymentrecordSourceLCVo.setSpsj(processCommentVo.get("time").toString());
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
}
}
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
}
}
finPaymentrecordSourceLCVo.setName("系统");
finPaymentrecordSourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
finPaymentrecordSourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
}
}
finPaymentrecordSourceLCVos.sort(comparing(FinPaymentrecordSourceLCVo::getSpsj));
dataMap.put("lcList", finPaymentrecordSourceLCVos);
//下载人
dataMap.put("downName", userName);
//下载时间
dataMap.put("downTime", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
//获取模板
//模板路径
String sourcePath = "D:\\anrui\\upload\\template\\";
//生成word文件名
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String typeName = dateStr + seconds + ".doc";
//生成文件路径
String targetPath = sourcePath + dateStr;
WordUtils.creatWord(dataMap, "jhclrk", sourcePath, targetPath, typeName);
//新生成的word路径
String wordPath = targetPath + "\\" + typeName;
//生成出门证文件名
String pdfName = "交回车辆入库审批_" + dateStr + seconds + ".pdf";
WordUtils.doc2pdf(wordPath, targetPath, pdfName, userName);
return "/template/" + dateStr + "/" + pdfName;
}
/* public ResultBean<List<ReturnInboundVo>> getInboundList(String useOrgSid) {
ResultBean<List<ReturnInboundVo>> rb = ResultBean.fireFail();
List<String> busVinSid = baseMapper.selectVehInbound(useOrgSid);

82
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java

@ -9,6 +9,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.yxt.anrui.base.api.basevehmodelconfig.BaseVehmodelVo;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailedjr.FinUncollectedReceivablesDetailedJR;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailedjr.FinUncollectedReceivablesDetailedJRFeign;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -51,6 +56,7 @@ import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail;
import com.yxt.anrui.riskcenter.api.loansubletapply.LoanSubletApply;
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList;
import com.yxt.anrui.riskcenter.biz.loanoutboundapply.LoanOutboundApplyService;
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService;
import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService;
import com.yxt.anrui.riskcenter.biz.loanreturninboundapply.LoanReturnInboundApplyService;
import com.yxt.anrui.riskcenter.biz.loanreturnvehledger.LoanReturnVehLedgerService;
@ -127,6 +133,14 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
private SysNoticeFeign sysNoticeFeign;
@Autowired
private LoanSecondarySalesBiddingService loanSecondarySalesBiddingService;
@Autowired
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign;
@Autowired
private BusSalesOrderFeign busSalesOrderFeign;
@Autowired
private LoanRepaymentPlanDetailsService loanRepaymentPlanDetailsService;
@Autowired
private FinUncollectedReceivablesDetailedJRFeign finUncollectedReceivablesDetailedJRFeign;
public PagerVo<LoanSecondarySalesApplyVo> listPageVo(PagerQuery<LoanSecondarySalesApplyQuery> pq) {
LoanSecondarySalesApplyQuery query = pq.getParams();
@ -545,6 +559,74 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
loanSecondarySalesBiddingDto.setOrgPath(loanSecondarySalesApply.getOrgSidPath());
ResultBean resultBean1 = loanSecondarySalesBiddingService.saveBidding(loanSecondarySalesBiddingDto);
// pushVehOutBound(loanSecondarySalesApply);
FinUncollectedReceivablesDetailedJR finUncollectedReceivablesDetailedJR = new FinUncollectedReceivablesDetailedJR();
finUncollectedReceivablesDetailedJR.setCreateByName(loanSecondarySalesApply.getCreateByName());
finUncollectedReceivablesDetailedJR.setCreateBySid(loanSecondarySalesApply.getCreateBySid());
//查询销售订单信息
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.fetchBySalesOrderVehiclerSid(list.get(0).getBusVinSid()).getData();
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(busSalesOrderVehicle.getSalesOrderSid()).getData();
finUncollectedReceivablesDetailedJR.setApplySid(loanSecondarySalesApply.getSid());
String planSid = loanRepaymentPlanDetailsService.selByBusVinSidMax(busSalesOrderVehicle.getSid());
finUncollectedReceivablesDetailedJR.setBusSid(planSid);
finUncollectedReceivablesDetailedJR.setPurchaseSystemSid(busSalesOrder.getPurchaseSystemSid());
finUncollectedReceivablesDetailedJR.setPurchaseSystemName(busSalesOrder.getPurchaseSystemName());
finUncollectedReceivablesDetailedJR.setStaffUserSid(busSalesOrder.getCreateBySid());
finUncollectedReceivablesDetailedJR.setStaffName(busSalesOrder.getStaffName());
finUncollectedReceivablesDetailedJR.setStaffDeptSid(busSalesOrder.getOrgSid());
finUncollectedReceivablesDetailedJR.setStaffDeptName(busSalesOrder.getOrgName());
finUncollectedReceivablesDetailedJR.setUseOrgSid(loanSecondarySalesApply.getUseOrgSid());
finUncollectedReceivablesDetailedJR.setUseOrgName(loanSecondarySalesApply.getUseOrgName());
finUncollectedReceivablesDetailedJR.setOrgSidPath(loanSecondarySalesApply.getOrgSidPath());
finUncollectedReceivablesDetailedJR.setKxState("01");
if ("02".equals(loanSecondarySalesCost.getBankSettleCostAssumeKey())){
finUncollectedReceivablesDetailedJR.setPayCostTitleKey("017");
finUncollectedReceivablesDetailedJR.setPayCostTitleValue("预计资方结清费用");
finUncollectedReceivablesDetailedJR.setReveivableMoney(new BigDecimal(loanSecondarySalesCost.getBankSettleCostAssume()));
finUncollectedReceivablesDetailedJR.setCurrentReceivableMoney(new BigDecimal(loanSecondarySalesCost.getBankSettleCostAssume()));
finUncollectedReceivablesDetailedJRFeign.save(finUncollectedReceivablesDetailedJR);
}
if ("02".equals(loanSecondarySalesCost.getVehicleViolationCostAssumeKey())){
finUncollectedReceivablesDetailedJR.setPayCostTitleKey("018");
finUncollectedReceivablesDetailedJR.setPayCostTitleValue("车辆违章费用");
finUncollectedReceivablesDetailedJR.setReveivableMoney(new BigDecimal(loanSecondarySalesCost.getVehicleViolationCostAssume()));
finUncollectedReceivablesDetailedJR.setCurrentReceivableMoney(new BigDecimal(loanSecondarySalesCost.getVehicleViolationCostAssume()));
finUncollectedReceivablesDetailedJRFeign.save(finUncollectedReceivablesDetailedJR);
}
if ("02".equals(loanSecondarySalesCost.getInspectYearCostAssumeKey())){
finUncollectedReceivablesDetailedJR.setPayCostTitleKey("019");
finUncollectedReceivablesDetailedJR.setPayCostTitleValue("年检费");
finUncollectedReceivablesDetailedJR.setReveivableMoney(new BigDecimal(loanSecondarySalesCost.getInspectYearCostAssume()));
finUncollectedReceivablesDetailedJR.setCurrentReceivableMoney(new BigDecimal(loanSecondarySalesCost.getInspectYearCostAssume()));
finUncollectedReceivablesDetailedJRFeign.save(finUncollectedReceivablesDetailedJR);
}
if ("02".equals(loanSecondarySalesCost.getInsureCostAssumeKey())){
finUncollectedReceivablesDetailedJR.setPayCostTitleKey("020");
finUncollectedReceivablesDetailedJR.setPayCostTitleValue("保险费");
finUncollectedReceivablesDetailedJR.setReveivableMoney(new BigDecimal(loanSecondarySalesCost.getInsureCostAssume()));
finUncollectedReceivablesDetailedJR.setCurrentReceivableMoney(new BigDecimal(loanSecondarySalesCost.getInsureCostAssume()));
finUncollectedReceivablesDetailedJRFeign.save(finUncollectedReceivablesDetailedJR);
}
if ("02".equals(loanSecondarySalesCost.getOwnershipCostAssumeKey())){
finUncollectedReceivablesDetailedJR.setPayCostTitleKey("021");
finUncollectedReceivablesDetailedJR.setPayCostTitleValue("过户费");
finUncollectedReceivablesDetailedJR.setReveivableMoney(new BigDecimal(loanSecondarySalesCost.getOwnershipCostAssume()));
finUncollectedReceivablesDetailedJR.setCurrentReceivableMoney(new BigDecimal(loanSecondarySalesCost.getOwnershipCostAssume()));
finUncollectedReceivablesDetailedJRFeign.save(finUncollectedReceivablesDetailedJR);
}
if ("02".equals(loanSecondarySalesCost.getStopCostAssumeKey())){
finUncollectedReceivablesDetailedJR.setPayCostTitleKey("022");
finUncollectedReceivablesDetailedJR.setPayCostTitleValue("停车费");
finUncollectedReceivablesDetailedJR.setReveivableMoney(new BigDecimal(loanSecondarySalesCost.getStopCostAssume()));
finUncollectedReceivablesDetailedJR.setCurrentReceivableMoney(new BigDecimal(loanSecondarySalesCost.getStopCostAssume()));
finUncollectedReceivablesDetailedJRFeign.save(finUncollectedReceivablesDetailedJR);
}
if ("02".equals(loanSecondarySalesCost.getOtherCostAssumeKey())){
finUncollectedReceivablesDetailedJR.setPayCostTitleKey("023 ");
finUncollectedReceivablesDetailedJR.setPayCostTitleValue("其他费用");
finUncollectedReceivablesDetailedJR.setReveivableMoney(new BigDecimal(loanSecondarySalesCost.getOtherCostAssume()));
finUncollectedReceivablesDetailedJR.setCurrentReceivableMoney(new BigDecimal(loanSecondarySalesCost.getOtherCostAssume()));
finUncollectedReceivablesDetailedJRFeign.save(finUncollectedReceivablesDetailedJR);
}
} else {
//极光推送
loanSecondarySalesApply = fetchBySid(businessSid);

7
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesnotapply/LoanSecondarySalesNotApplyRest.java

@ -83,6 +83,13 @@ public class LoanSecondarySalesNotApplyRest implements LoanSecondarySalesNotAppl
return rb.success().setData(loanSecondarySalesNotApplyDetailsVo);
}
@Override
public ResultBean<String> createPdf(String sid, String userName) {
ResultBean rb = ResultBean.fireFail();
String pdf = loanSecondarySalesNotApplyService.createPdf(sid, userName);
return rb.success().setData(pdf);
}
@Override
public ResultBean submit(SubmitDto dto) {
return loanSecondarySalesNotApplyService.submit(dto);

132
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesnotapply/LoanSecondarySalesNotApplyService.java

@ -31,6 +31,10 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.buscenter.api.bussalesorderreturnveh.BusSalesOrderReturnVehDetailsVo;
import com.yxt.anrui.buscenter.api.bussalesorderreturnvehapply.BusSalesOrderReturnVehApplyDetailsVo;
import com.yxt.anrui.buscenter.api.bussalesorderreturnvehapply.BusSalesOrderReturnVehPdfVo;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordSourceLCVo;
import com.yxt.anrui.flowable.api.flow.FlowProcessMapQuery;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
@ -41,6 +45,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.SysStaffOrgFeign;
@ -64,9 +69,14 @@ import com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCos
import com.yxt.anrui.riskcenter.biz.loansecondarysalesnotveh.LoanSecondarySalesNotVehService;
import com.yxt.anrui.riskcenter.biz.loansecondarysalesveh.LoanSecondarySalesVehService;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.utils.ConstantUtils;
import com.yxt.common.base.utils.WordUtils;
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 com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
@ -82,6 +92,8 @@ import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
import static java.util.Comparator.comparing;
@Service
public class LoanSecondarySalesNotApplyService extends MybatisBaseService<LoanSecondarySalesNotApplyMapper, LoanSecondarySalesNotApply> {
@ -113,6 +125,10 @@ public class LoanSecondarySalesNotApplyService extends MybatisBaseService<LoanSe
private LoanSecondarySalesCostService loanSecondarySalesCostService;
@Autowired
private LoanRestoreReportApplyService loanRestoreReportApplyService;
@Autowired
private MessageListFeign messageListFeign;
@Autowired
private com.yxt.anrui.portal.api.flow.FlowableFeign flowableFeignSp;
public PagerVo<LoanSecondarySalesNotApplyVo> listPageVo(PagerQuery<LoanSecondarySalesNotApplyQuery> pq) {
LoanSecondarySalesNotApplyQuery query = pq.getParams();
@ -714,4 +730,120 @@ public class LoanSecondarySalesNotApplyService extends MybatisBaseService<LoanSe
flowFeign.delegate(delegateQuery);
return rb.success();
}
public String createPdf(String sid, String userName) {
LoanSecondarySalesNotApplyDetailsVo data = fetchDetailsVoBySid(sid);
Map<String, Object> dataMap = new HashMap<String, Object>();
//分公司
dataMap.put("orgName", data.getUseOrgName());
//创建部门
String deptName = "";
List<String> split = Arrays.asList(data.getOrgSidPath().split("/"));
if (split.size() > 1) {
//获取本级sid获取本级部门信息
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(split.size() - 2)).getData();
SysOrganizationVo sysOrganization1 = sysOrganizationFeign.fetchBySid(split.get(split.size() - 1)).getData();
deptName = sysOrganization.getName() + "/" + sysOrganization1.getName();
deptName = sysOrganization1.getName();
} else {
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(0)).getData();
deptName = sysOrganization.getName();
deptName = sysOrganization.getName();
}
dataMap.put("deptName", deptName);
//创建人
dataMap.put("createName", data.getCreateByName());
//创建日期
dataMap.put("createTime", data.getCreateTime());
//办结日期
dataMap.put("finishTime", data.getCloseDate());
//审批编号
dataMap.put("billNo", data.getBillNo());
List<LoanSecondarySalesNotApplyPdfVo> loanSecondarySalesNotApplyPdfVos = new ArrayList<>();
//循环获取车辆信息
Integer i = 1;
for (LoanSecondarySalesNotVehDetailsVo loanSecondarySalesNotVehDetailsVo : data.getLoanSecondarySalesNotVehList()) {
LoanSecondarySalesNotApplyPdfVo loanSecondarySalesNotApplyPdfVo = new LoanSecondarySalesNotApplyPdfVo();
loanSecondarySalesNotApplyPdfVo.setId(i);
i = i + 1;
loanSecondarySalesNotApplyPdfVo.setVinNo(loanSecondarySalesNotVehDetailsVo.getVinNo());
loanSecondarySalesNotApplyPdfVo.setCph(loanSecondarySalesNotVehDetailsVo.getVehMark());
loanSecondarySalesNotApplyPdfVo.setLx(loanSecondarySalesNotVehDetailsVo.getVehType());
loanSecondarySalesNotApplyPdfVo.setCx(loanSecondarySalesNotVehDetailsVo.getModelName());
loanSecondarySalesNotApplyPdfVos.add(loanSecondarySalesNotApplyPdfVo);
}
dataMap.put("wlList", loanSecondarySalesNotApplyPdfVos);
dataMap.put("name", data.getCustomerName());
dataMap.put("dkr", data.getLoanName());
dataMap.put("dkbh", data.getLoanContractNo());
dataMap.put("zf", data.getBankName());
dataMap.put("zfbh", data.getBankContractNo());
dataMap.put("qkhj", data.getArrearsAll());
dataMap.put("cdfy", data.getComBearMoney());
dataMap.put("ksje", data.getLossPrice());
dataMap.put("remarks", data.getRemarks());
//获取审批记录
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignSp.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<FinPaymentrecordSourceLCVo> finPaymentrecordSourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
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");
finPaymentrecordSourceLCVo.setName(assigneeName);
finPaymentrecordSourceLCVo.setComment(comment1);
finPaymentrecordSourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
finPaymentrecordSourceLCVo.setName(processCommentVo.get("title").toString());
finPaymentrecordSourceLCVo.setComment(processCommentVo.get("content").toString());
finPaymentrecordSourceLCVo.setSpsj(processCommentVo.get("time").toString());
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
}
}
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
}
}
finPaymentrecordSourceLCVo.setName("系统");
finPaymentrecordSourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
finPaymentrecordSourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
}
}
finPaymentrecordSourceLCVos.sort(comparing(FinPaymentrecordSourceLCVo::getSpsj));
dataMap.put("lcList", finPaymentrecordSourceLCVos);
//下载人
dataMap.put("downName", userName);
//下载时间
dataMap.put("downTime", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
//获取模板
//模板路径
String sourcePath = "D:\\anrui\\upload\\template\\";
//生成word文件名
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String typeName = dateStr + seconds + ".doc";
// 生成文件路径
String targetPath = sourcePath + dateStr;
WordUtils.creatWord(dataMap, "bzc", sourcePath, targetPath, typeName);
//新生成的word路径
String wordPath = targetPath + "\\" + typeName;
//生成出门证文件名
String pdfName = "二次销售车辆不追偿审批_" + dateStr + seconds + ".pdf";
WordUtils.doc2pdf(wordPath, targetPath, pdfName, userName);
return "/template/" + dateStr + "/" + pdfName;
}
}

3764
anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/bzc.ftl

File diff suppressed because it is too large

10
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatecheckapply/ScmSpecialrebateCheckapplyMapper.xml

@ -6,16 +6,16 @@
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmspecialrebatecheckapply.ScmSpecialrebateCheckapplyVo">
SELECT
ssc.*,
SUM(sscd.`estimateRebate`) estimateRebate,
SUM(sscd.estimateRebate) estimateRebate,
SUM(sscd.expectItureCost + sscd.expectTreatCost + sscd.expectSuppCost) as withholdCost,
SUM(sscd.`uploadMoney`) uploadMoney,
SUM(sscd.`stayDetermineMoney`) stayDetermineMoney,
SUM(sscd.`adjustmentMoney`) adjustmentMoney,
SUM(sscd.uploadMoney) uploadMoney,
SUM(sscd.stayDetermineMoney) stayDetermineMoney,
SUM(sscd.adjustmentMoney) adjustmentMoney,
SUM(sscd.onceItureCost + sscd.onceTreatCost + sscd.onceSuppCost + sscd.secondItureCost + sscd.secondTreatCost + sscd.secondSuppCost) AS money
FROM
scm_specialrebate_checkapply ssc
LEFT JOIN scm_specialrebate_checkapplydetail sscd
ON ssc.`sid` = sscd.`mainSid`
ON ssc.sid = sscd.mainSid
<where>
${ew.sqlSegment}
</where>

20
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatecheckapplydetail/ScmSpecialrebateCheckapplydetailMapper.xml

@ -13,8 +13,8 @@
SUM(ssc.estimateRebate) withRebate,
COUNT(*) num,
GROUP_CONCAT(ssc.specialRebateSid) specialRebateSid,
SUM(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney)) uploadMoney,
SUM(CAST(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoney,
SUM(IF(ssc.onceCheckState = 1, 0, ssc.stayDetermineMoney)) stayDetermineMoney,
SUM(CAST(ssc.adjustmentMoney AS DECIMAL(10, 2))) adjustmentMoney,
SUM(ssc.expectItureCost + ssc.expectTreatCost + ssc.expectSuppCost) AS withholdCost,
@ -38,8 +38,8 @@
SUM(ssc.estimateRebate) withRebate,
COUNT(*) num,
GROUP_CONCAT(ssc.specialRebateSid) specialRebateSid,
SUM(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney)) uploadMoney,
SUM(CAST(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoney,
SUM(IF(ssc.onceCheckState = 1, 0, ssc.stayDetermineMoney)) stayDetermineMoney,
SUM(CAST(ssc.adjustmentMoney AS DECIMAL(10, 2))) adjustmentMoney,
SUM(ssc.expectItureCost + ssc.expectTreatCost + ssc.expectSuppCost) AS withholdCost,
@ -78,8 +78,8 @@
COUNT(*) numTotal,
SUM(ssc.estimateRebate) withRebateTotal,
SUM(ssc.expectItureCost + ssc.expectTreatCost + ssc.expectSuppCost) AS withholdCostTotal,
SUM(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney)) uploadMoneyTotal,
SUM(CAST(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoneyTotal,
SUM(IF(ssc.onceCheckState = 1, ssc.secondItureCost + ssc.secondTreatCost + ssc.secondSuppCost,
ssc.onceItureCost + ssc.onceTreatCost + ssc.onceSuppCost + ssc.secondItureCost +
ssc.secondTreatCost + ssc.secondSuppCost)) AS moneyTotal,
@ -102,8 +102,8 @@
COUNT(*) num,
SUM(ssc.estimateRebate) withRebate,
SUM(ssc.expectItureCost + ssc.expectTreatCost + ssc.expectSuppCost) AS withholdCost,
SUM(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney)) uploadMoney,
SUM(CAST(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoney,
SUM(IF(ssc.onceCheckState = 1, ssc.secondItureCost + ssc.secondTreatCost + ssc.secondSuppCost,
ssc.onceItureCost + ssc.onceTreatCost + ssc.onceSuppCost + ssc.secondItureCost +
ssc.secondTreatCost + ssc.secondSuppCost)) AS money,
@ -128,8 +128,8 @@
COUNT(*) num,
SUM(ssc.estimateRebate) withRebate,
SUM(ssc.expectItureCost + ssc.expectTreatCost + ssc.expectSuppCost) AS withholdCost,
SUM(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney)) uploadMoney,
SUM(CAST(IF(ssc.onceCheckState = 1, ssc.secondaryUploadMoney,
ssc.uploadMoney + ssc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoney,
SUM(IF(ssc.onceCheckState = 1, ssc.secondItureCost + ssc.secondTreatCost + ssc.secondSuppCost,
ssc.onceItureCost + ssc.onceTreatCost + ssc.onceSuppCost + ssc.secondItureCost +
ssc.secondTreatCost + ssc.secondSuppCost)) AS money,

36
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml

@ -66,7 +66,41 @@
<select id="excelList" resultType="com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateExcelVo">
SELECT
*,
purchaseSystemName,
vinNo,
vehModelName,
palceGenDate,
rebateTypeValue,
rebateName,
estimateRebate,
uploadMoney,
secondaryUploadMoney,
stayDetermineMoney,
adjustmentMoney,
date_format(createTime, '%Y-%m-%d') as createTime,
withholdingDate,
uploadDate,
secondaryUploadDate,
case state
WHEN '0' THEN '未预提'
WHEN '1' THEN '预提中'
WHEN '2' THEN '待核对'
WHEN '3' THEN '核对中'
WHEN '4' THEN '已核对'
end as state,
case onceCheckState
WHEN '0' THEN '否'
WHEN '1' THEN '是'
WHEN '2' THEN '一次核对中'
end as onceCheckState,
manufactorSettlementPrice,
freight,
topAmount,
calculationModeValue,
calculationStandard,
remarks,
brandName,
createOrgName,
expectTreatCost + expectSuppCost AS withholdCost,
onceTreatCost + onceSuppCost + secondTreatCost + secondSuppCost AS money,
estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0) AS notUploadMoney,

21
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java

@ -2536,27 +2536,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
);
qw.orderByDesc("createTime");
List<ScmVehRebateExcelVo> scmVehRebateExcelVos = baseMapper.excelList(qw);
for (ScmVehRebateExcelVo scmVehRebateExcelVo : scmVehRebateExcelVos) {
if (scmVehRebateExcelVo.getState().equals("0")) {
scmVehRebateExcelVo.setState("未预提");
} else if (scmVehRebateExcelVo.getState().equals("1")) {
scmVehRebateExcelVo.setState("预提中");
} else if (scmVehRebateExcelVo.getState().equals("2")) {
scmVehRebateExcelVo.setState("待核对");
} else if (scmVehRebateExcelVo.getState().equals("3")) {
scmVehRebateExcelVo.setState("核对中");
} else if (scmVehRebateExcelVo.getState().equals("4")) {
scmVehRebateExcelVo.setState("已核对");
}
if (scmVehRebateExcelVo.getOnceCheckState().equals("0")) {
scmVehRebateExcelVo.setOnceCheckState("否");
} else if (scmVehRebateExcelVo.getOnceCheckState().equals("1")) {
scmVehRebateExcelVo.setOnceCheckState("是");
} else if (scmVehRebateExcelVo.getOnceCheckState().equals("2")) {
scmVehRebateExcelVo.setOnceCheckState("一次核对中");
}
scmVehRebateExcelVo.setCreateTime(DateUtil.formatDate(DateUtil.parse(scmVehRebateExcelVo.getCreateTime())));
}
return scmVehRebateExcelVos;
}
}

20
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatecheckapplydetail/ScmVehrebateCheckapplydetailMapper.xml

@ -28,8 +28,8 @@
SUM(CAST(svc.estimateRebate AS DECIMAL(10, 2))) withRebate,
COUNT(*) num,
GROUP_CONCAT(svc.vehRebateSid) vehRebateSid,
SUM(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney + svc.secondaryUploadMoney)) uploadMoney,
SUM(CAST(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney + svc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoney,
SUM(IF(svc.onceCheckState = 1, 0, svc.stayDetermineMoney)) stayDetermineMoney,
SUM(CAST(svc.adjustmentMoney AS DECIMAL(10, 2))) adjustmentMoney,
SUM(svc.expectTreatCost + svc.expectSuppCost) withholdCost,
@ -52,8 +52,8 @@
SUM(CAST(svc.estimateRebate AS DECIMAL(10, 2))) withRebate,
COUNT(*) num,
GROUP_CONCAT(svc.vehRebateSid) vehRebateSid,
SUM(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney + svc.secondaryUploadMoney)) uploadMoney,
SUM(CAST(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney + svc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoney,
SUM(IF(svc.onceCheckState = 1, 0, svc.stayDetermineMoney)) stayDetermineMoney,
SUM(CAST(svc.adjustmentMoney AS DECIMAL(10, 2))) adjustmentMoney,
SUM(svc.expectTreatCost + svc.expectSuppCost) withholdCost,
@ -82,9 +82,9 @@
COUNT(*) numTotal,
SUM(CAST(svc.estimateRebate AS DECIMAL(10, 2))) withRebateTotal,
SUM(svc.expectTreatCost + svc.expectSuppCost) withholdCostTotal,
SUM(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
SUM(CAST(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney +
svc.secondaryUploadMoney)) uploadMoneyTotal,
svc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoneyTotal,
SUM(IF(svc.onceCheckState = 1, svc.secondTreatCost + svc.secondSuppCost,
svc.onceTreatCost + svc.onceSuppCost + svc.secondTreatCost + svc.secondSuppCost)) moneyTotal,
SUM(IF(svc.onceCheckState = 1, 0, svc.stayDetermineMoney)) stayDetermineMoneyTotal,
@ -105,8 +105,8 @@
COUNT(*) num,
SUM(CAST(svc.estimateRebate AS DECIMAL(10, 2))) withRebate,
SUM(svc.expectTreatCost + svc.expectSuppCost) withholdCost,
SUM(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney + svc.secondaryUploadMoney)) uploadMoney,
SUM(CAST(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney + svc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoney,
SUM(IF(svc.onceCheckState = 1, svc.secondTreatCost + svc.secondSuppCost,
svc.onceTreatCost + svc.onceSuppCost + svc.secondTreatCost + svc.secondSuppCost)) money,
SUM(IF(svc.onceCheckState = 1, 0, svc.stayDetermineMoney)) stayDetermineMoney,
@ -129,8 +129,8 @@
COUNT(*) num,
SUM(CAST(svc.estimateRebate AS DECIMAL(10, 2))) withRebate,
SUM(svc.expectTreatCost + svc.expectSuppCost) withholdCost,
SUM(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney + svc.secondaryUploadMoney)) uploadMoney,
SUM(CAST(IF(svc.onceCheckState = 1, svc.secondaryUploadMoney,
svc.uploadMoney + svc.secondaryUploadMoney) AS DECIMAL(10, 2))) uploadMoney,
SUM(IF(svc.onceCheckState = 1, svc.secondTreatCost + svc.secondSuppCost,
svc.onceTreatCost + svc.onceSuppCost + svc.secondTreatCost + svc.secondSuppCost)) money,
SUM(IF(svc.onceCheckState = 1, 0, svc.stayDetermineMoney)) stayDetermineMoney,

Loading…
Cancel
Save