|
|
@@ -3,6 +3,7 @@ package com.huyi.service.credit.controller;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.huyi.service.base.entity.*;
|
|
|
import com.huyi.service.base.service.*;
|
|
|
+import com.huyi.service.common.financeLog.FinanceLog;
|
|
|
import com.huyi.service.common.flowable.service.ApprovalService;
|
|
|
import com.huyi.service.constant.FileConstants;
|
|
|
import com.keao.tianhu.core.util.AmtUtil;
|
|
|
@@ -47,9 +48,8 @@ public class CreditHandleController extends BaseController {
|
|
|
//融信服务类
|
|
|
@Autowired
|
|
|
private IZcFinanceInfService financeInfService;
|
|
|
- //供应商授信服务类
|
|
|
@Autowired
|
|
|
- private IZcFinanceSupplierQuotaService financeSupplierQuotaService;
|
|
|
+ private FinanceLog financeLog;
|
|
|
//融信和应收账款的关系
|
|
|
@Autowired
|
|
|
private IZcFinanceBillRelService financeBillRelService;
|
|
|
@@ -127,6 +127,16 @@ public class CreditHandleController extends BaseController {
|
|
|
String zfpId = CommonUtil.objToString(map.get("zfpId"));
|
|
|
//获取当前时间
|
|
|
Date createTime = DateUtils.getNowDate();
|
|
|
+
|
|
|
+ //核心企业
|
|
|
+ SysCompany coreCompany = companyService.getById(finance.getZfiCoreId());
|
|
|
+ //核心企业名称
|
|
|
+ String coreName = coreCompany.getScyName();
|
|
|
+ //核心企业
|
|
|
+ SysCompany supplierCompany = companyService.getById(finance.getZfiSupplierId());
|
|
|
+ //核心企业名称
|
|
|
+ String supplierName = supplierCompany.getScyName();
|
|
|
+
|
|
|
//供应商申请并且通过
|
|
|
if("0".equals(zfiCreateType) && "00".equals(flag)){
|
|
|
//获取授信额度
|
|
|
@@ -182,6 +192,10 @@ public class CreditHandleController extends BaseController {
|
|
|
financeInf.setUpdateTime(createTime);
|
|
|
financeInf.setUpdateBy(CommonUtil.objToString(use.getUserId()));
|
|
|
financeInfService.updateById(financeInf);
|
|
|
+
|
|
|
+ /**融信操作日志*/
|
|
|
+ financeLog.addFinanceLog(zfiId, "融信确权【通过】,融信提交于《"+supplierName+"》签收", null, FinanceLog.STATUS_TWO);
|
|
|
+ financeLog.addFinanceLog(zfiId, "《"+supplierName+"》待签收", null, FinanceLog.STATUS_TWO);
|
|
|
}else if("2".equals(zfiCreateType) && "00".equals(flag)){//供应商开立并且通过
|
|
|
ZcFinanceInf financeInf = new ZcFinanceInf();
|
|
|
//编号
|
|
|
@@ -229,18 +243,15 @@ public class CreditHandleController extends BaseController {
|
|
|
String zfiNumber = CommonUtil.objToString(map.get("zfiNumber"));
|
|
|
//金额大写
|
|
|
String bigAmt = AmtUtil.convert(AmtUtil.moneyFormat(zfiAmount));
|
|
|
- //核心企业
|
|
|
- String zfiCoreId = CommonUtil.objToString(map.get("zfiCoreId"));
|
|
|
- SysCompany coreCompany = companyService.getById(zfiCoreId);
|
|
|
- //核心企业名称
|
|
|
- String coreName = "";
|
|
|
- if(coreCompany != null){
|
|
|
- coreName = coreCompany.getScyName();
|
|
|
- }
|
|
|
+
|
|
|
//给融资方经办人添加失效消息
|
|
|
String title = "【确权失败】您提交于"+coreName+"的【"+zfiNumber+"】,融信金额【"+AmtUtil.moneyFormat(zfiAmount)+"】,(大写:"+bigAmt+"),确权失败,该融信已失效";
|
|
|
remoteSystemService.sendNotice(zfiSupplierId,zfiId,title,"01","03","","0",handler,"", null, null);
|
|
|
|
|
|
+ /**融信操作日志*/
|
|
|
+ if ("0".equals(zfiCreateType)) {
|
|
|
+ financeLog.addFinanceLog(zfiId, "融信确权【拒绝】,融信失效,请联系《"+coreName+"》确认业务信息", null, FinanceLog.STATUS_TWO);
|
|
|
+ }
|
|
|
}else if("00".equals(flag)){
|
|
|
//调确权审批
|
|
|
approvalService.coreConfirmationApproval(map);
|