|
@@ -119,6 +119,14 @@ public class FlowableController extends BaseController
|
|
|
@RequestParam("id") String id,
|
|
|
@RequestParam("menuId") String menuId,
|
|
|
@RequestParam("companyId") String companyId) throws Exception {
|
|
|
+ //根据id获取融信信息
|
|
|
+ ZcFinanceInf financeInf = zcFinanceInfService.getById(id);
|
|
|
+ //核心企业id
|
|
|
+ String zfiCoreId = financeInf.getZfiCoreId();
|
|
|
+ //融资企业id
|
|
|
+ String zfiSupplierId = financeInf.getZfiSupplierId();
|
|
|
+ //创建类型
|
|
|
+ String zfiCreateType = financeInf.getZfiCreateType();
|
|
|
//核心企业融信开立审批
|
|
|
if("1000000000".equals(menuId)){
|
|
|
//修改
|
|
@@ -128,10 +136,6 @@ public class FlowableController extends BaseController
|
|
|
//审批通过
|
|
|
zcFinanceInf.setZfiCoreStatus("01");
|
|
|
zcFinanceInfService.updateById(zcFinanceInf);
|
|
|
- //根据id获取融信信息
|
|
|
- ZcFinanceInf financeInf = zcFinanceInfService.getById(id);
|
|
|
- //核心企业id
|
|
|
- String zfiCoreId = financeInf.getZfiCoreId();
|
|
|
//发起人
|
|
|
Long userId = Long.valueOf(financeInf.getCreateBy());
|
|
|
//融信编号
|
|
@@ -151,7 +155,7 @@ public class FlowableController extends BaseController
|
|
|
//发送盖章待办
|
|
|
String zfiId = id;
|
|
|
remoteSystemService.sendNotice(zfiCoreId, zfiId,
|
|
|
- "核心企业开立审批融信编号为" + zfiNumber + "的资料待盖章,审批发起人为" + userName,
|
|
|
+ "【核心开立】审批融信编号【" + zfiNumber + "】的资料待盖章,审批发起人为" + userName,
|
|
|
"00",null,"03","0", use.toString(),null, "01", "/credit/creditSeal/" + zfiId);
|
|
|
//向发起人发起最终结果
|
|
|
//发送人
|
|
@@ -164,8 +168,6 @@ public class FlowableController extends BaseController
|
|
|
ZcFinanceInf zcFinanceInf = zcFinanceInfService.getById(id);
|
|
|
zcFinanceInf.setZfiCoreStatus("01");
|
|
|
zcFinanceInfService.updateById(zcFinanceInf);
|
|
|
- //核心企业Id
|
|
|
- String zfiCoreId = zcFinanceInf.getZfiCoreId();
|
|
|
//融信编号
|
|
|
String zfiNumber = zcFinanceInf.getZfiNumber();
|
|
|
//发起人Id
|
|
@@ -184,7 +186,7 @@ public class FlowableController extends BaseController
|
|
|
Long use = list.get(0).getSucrUserId();
|
|
|
String zfiId = id;
|
|
|
remoteSystemService.sendNotice(zfiCoreId, zfiId,
|
|
|
- "确权审批融信编号为" + zfiNumber + "的资料待盖章,审批发起人为" + userName,
|
|
|
+ "【确权审批】融信编号【" + zfiNumber + "】的资料待盖章,审批发起人为" + userName,
|
|
|
"00",null,"03","0", use.toString(),null, "01", "/credit/confirmationAudit/" + zfiId);
|
|
|
//TODO 经办人发送最终消息通知
|
|
|
remoteSystemService.sendNotice(zfiCoreId, id,
|
|
@@ -202,8 +204,6 @@ public class FlowableController extends BaseController
|
|
|
//审批通过
|
|
|
zcFinanceInf.setZfiSupplierStatus("01");
|
|
|
zcFinanceInfService.update(zcFinanceInf,lambdaQueryWrapper);
|
|
|
- //查询发起人,融资企业Id
|
|
|
- ZcFinanceInf financeInf = zcFinanceInfService.getById(zfiId);
|
|
|
//发起人Id
|
|
|
Long user = Long.valueOf(financeInf.getCreateBy());
|
|
|
//融资企业
|
|
@@ -266,18 +266,18 @@ public class FlowableController extends BaseController
|
|
|
//调用平台审批
|
|
|
approvalService.addPlatformApproval(map);
|
|
|
}else {
|
|
|
- ZcFinanceInf financeInf = new ZcFinanceInf();
|
|
|
+ ZcFinanceInf financeInfs = new ZcFinanceInf();
|
|
|
//主键
|
|
|
- financeInf.setZfiId(zfiId);
|
|
|
+ financeInfs.setZfiId(zfiId);
|
|
|
//平台审批状态(00:审批中, 01:审批通过, 02:审批拒绝, 03:暂存)
|
|
|
- financeInf.setZfiPlatformStatus("01");
|
|
|
+ financeInfs.setZfiPlatformStatus("01");
|
|
|
//融资方审批状态(00:审批中, 01:审批通过, 02:审批拒绝, 03:暂存)
|
|
|
- financeInf.setZfiSupplierStatus("01");
|
|
|
+ financeInfs.setZfiSupplierStatus("01");
|
|
|
//融信状态(00:待确权 01:待签收 02:已生效 03:已失效 04:融资中 05:已融资 06:平台退回)
|
|
|
// financeInf.setZfiStatus("02");
|
|
|
//签收日期
|
|
|
// financeInf.setZfiSignDate(DateUtils.getNowDate());
|
|
|
- zcFinanceInfService.updateById(financeInf);
|
|
|
+ zcFinanceInfService.updateById(financeInfs);
|
|
|
//TODO 给融资企业经办人生成盖章待办
|
|
|
//融信编码
|
|
|
String zfiNumber = inf.getZfiNumber();
|
|
@@ -290,19 +290,24 @@ public class FlowableController extends BaseController
|
|
|
if(list.size()>0){
|
|
|
user = list.get(0).getSucrUserId();
|
|
|
}
|
|
|
- String title = "【合同签署】由【" + companyName +"】发起的融信【" + zfiNumber + "】资料待签署合同";
|
|
|
+ //核心企业名称
|
|
|
+ SysCompany coreCompany = sysCompanyService.getById(inf.getZfiCoreId());
|
|
|
+ String coreCompanyName = coreCompany.getScyName();
|
|
|
+ String title = "";
|
|
|
+ if("1".equals(zfiCreateType)){
|
|
|
+ title = "【合同签署】由【" + coreCompanyName +"】发起的融信【" + zfiNumber + "】资料待签署合同";
|
|
|
+ }else{
|
|
|
+ title = "【合同签署】由【" + companyName +"】发起的融信【" + zfiNumber + "】资料待签署合同";
|
|
|
+ }
|
|
|
+
|
|
|
remoteSystemService.sendNotice(company,zfiId,title,"00","","03","1",user.toString(),"", "01", "/credit/creditSeal/"+zfiId);
|
|
|
|
|
|
/**融信操作日志*/
|
|
|
- //融资企业名称
|
|
|
- SysCompany coreCompany = sysCompanyService.getById(inf.getZfiCoreId());
|
|
|
- String coreCompanyName = coreCompany.getScyName();
|
|
|
+
|
|
|
/* financeLog.addFinanceLog(zfiId, "平台资料审核【通过】,融信资料提交《"+coreCompanyName+"》确权", null, FinanceLog.STATUS_ONE);
|
|
|
financeLog.addFinanceLog(zfiId, "融信确权生效【审批中】融信资料提交于《"+coreCompanyName+"》确权", null, FinanceLog.STATUS_ONE);*/
|
|
|
}
|
|
|
//TODO 发起人最终结果【通过】消息通知
|
|
|
- //查询发起人,融资企业Id
|
|
|
- ZcFinanceInf financeInf = zcFinanceInfService.getById(zfiId);
|
|
|
//发起人Id
|
|
|
Long user = Long.valueOf(financeInf.getCreateBy());
|
|
|
//融信编号
|
|
@@ -334,8 +339,6 @@ public class FlowableController extends BaseController
|
|
|
String zfiProductId = inf.getZfiProductId();
|
|
|
//融信编号
|
|
|
String zfiNumber = inf.getZfiNumber();
|
|
|
- //供应商企业id
|
|
|
- String zfiSupplierId = inf.getZfiSupplierId();
|
|
|
//查询融资产品是否需要平台审批
|
|
|
ZcFinanceProduct zcFinanceProduct = iZcFinanceProductService.getById(zfiProductId);
|
|
|
//是否需平台审批(0:不需要,1:需要)
|
|
@@ -376,10 +379,19 @@ public class FlowableController extends BaseController
|
|
|
/*--------查询供应商企业名称-----------*/
|
|
|
//查询企业表
|
|
|
SysCompany supplierCompany = sysCompanyService.getById(zfiSupplierId);
|
|
|
- //企业名称
|
|
|
+ //融资企业名称
|
|
|
String supplierName = supplierCompany.getScyName();
|
|
|
+ //查询企业表
|
|
|
+ SysCompany coreCompany = sysCompanyService.getById(zfiCoreId);
|
|
|
+ //核心企业名称
|
|
|
+ String coreName = coreCompany.getScyName();
|
|
|
+ String title = "";
|
|
|
+ if("1".equals(zfiCreateType)){
|
|
|
+ title = "【合同签署】由【"+coreName+"】发起的融信【"+zfiNumber+"】资料待签署合同";
|
|
|
+ }else{
|
|
|
+ title = "【合同签署】由【"+supplierName+"】发起的融信【"+zfiNumber+"】资料待签署合同";
|
|
|
+ }
|
|
|
//标题
|
|
|
- String title = "【合同签署】由【"+supplierName+"】发起的融信【"+zfiNumber+"】资料待签署合同";
|
|
|
remoteSystemService.sendNotice(zfiSupplierId, zfiId,title,"00","","03","0",supplierUserId.toString(),"", "01", "/credit/addInformation/"+zfiId);
|
|
|
|
|
|
/**融信操作日志*/
|
|
@@ -398,12 +410,6 @@ public class FlowableController extends BaseController
|
|
|
ZcFinanceInf inf = zcFinanceInfService.getById(zfiId);
|
|
|
//融信编号
|
|
|
String zfiNumber = inf.getZfiNumber();
|
|
|
- //核心企业id
|
|
|
- String zfiCoreId = inf.getZfiCoreId();
|
|
|
- //供应商企业id
|
|
|
- String zfiSupplierId = inf.getZfiSupplierId();
|
|
|
- //融信创建(0:供应商申请, 1:核心企业开立, 2:供应商开立)
|
|
|
- String zfiCreateType = inf.getZfiCreateType();
|
|
|
/*----------查询核心企业经办人----------*/
|
|
|
//查询用户与企业关系表
|
|
|
LambdaQueryWrapper<SysUserCompanyRel>companyWrapper = new LambdaQueryWrapper<>();
|
|
@@ -510,7 +516,7 @@ public class FlowableController extends BaseController
|
|
|
//姓名
|
|
|
String userName = sysUser.getNickName();
|
|
|
remoteSystemService.sendNotice(zfiCoreId, zfiId,
|
|
|
- "确权审批融信编号为" + zfiNumber + "的资料待盖章,审批发起人为" + userName,
|
|
|
+ "【确权审批】融信编号【" + zfiNumber + "】的资料待盖章,审批发起人为" + userName,
|
|
|
"00",null,"03","0", use.toString(),null, "01", "/credit/confirmationAudit/" + zfiId);
|
|
|
//TODO 经办人发送最终消息通知
|
|
|
remoteSystemService.sendNotice(zfiCoreId, id,
|
|
@@ -561,8 +567,7 @@ public class FlowableController extends BaseController
|
|
|
userQueryWrapper.eq(SysUserCompanyRel::getSucrHandler,"1");
|
|
|
List<SysUserCompanyRel> userList = iSysUserCompanyRelService.findSysUserCompanyRels(userQueryWrapper);
|
|
|
String userId= String.valueOf(userList.get(0).getSucrUserId());
|
|
|
- //查询企业名称
|
|
|
- SysCompany sysCompany = sysCompanyService.getById(companyId);
|
|
|
+
|
|
|
LambdaQueryWrapper<ZcFinanceInf> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
lambdaQueryWrapper.eq(ZcFinanceInf::getZfiId,id);
|
|
|
ZcFinanceInf zcfInf = new ZcFinanceInf();
|
|
@@ -571,8 +576,20 @@ public class FlowableController extends BaseController
|
|
|
zcFinanceInfService.update(zcfInf,lambdaQueryWrapper);
|
|
|
//查询融信信息
|
|
|
ZcFinanceInf zcFinanceInf = zcFinanceInfService.getById(id);
|
|
|
+ //查询核心企业名称
|
|
|
+ SysCompany coreCompany = sysCompanyService.getById(zfiCoreId);
|
|
|
+ String coreName = coreCompany.getScyName();
|
|
|
+ //查询供应商企业名称
|
|
|
+ SysCompany supplierCompany = sysCompanyService.getById(zfiSupplierId);
|
|
|
+ String supplierName = supplierCompany.getScyName();
|
|
|
//待办标题
|
|
|
- String tittle = "【融资企业签收】由【"+sysCompany.getScyName() +"】发起的融信编号为【"+ zcFinanceInf.getZfiNumber()+"】的资料待签署";
|
|
|
+ String tittle = "";
|
|
|
+ if("1".equals(zfiCreateType)){
|
|
|
+ tittle = "【融资企业签收】由【"+coreName +"】发起的融信编号为【"+ zcFinanceInf.getZfiNumber()+"】的资料待签署";
|
|
|
+ }else {
|
|
|
+ tittle = "【融资企业签收】由【"+supplierName +"】发起的融信编号为【"+ zcFinanceInf.getZfiNumber()+"】的资料待签署";
|
|
|
+ }
|
|
|
+
|
|
|
remoteSystemService.sendNotice(companyId,id,tittle,"00","","03","0",userId,"", "01", "/credit/signFor/"+id);
|
|
|
//TODo 给融资企业生成盖章待办
|
|
|
}
|
|
@@ -726,7 +743,7 @@ public class FlowableController extends BaseController
|
|
|
//确权待办
|
|
|
String titles = "【内部审核退回】融信【"+ zfiNumber +"】内部审批退回,请维护资料后,再次提交内部审核。";
|
|
|
remoteSystemService.sendNotice(zfiCoreId, id,titles,
|
|
|
- "00",null,"02","0", user.toString(), null, null, "/credit/confirmationAudit/"+zfiId);
|
|
|
+ "00",null,"02","0", user.toString(), null, "01", "/credit/confirmationAudit/"+zfiId);
|
|
|
}
|
|
|
//融资企业融信申请拒绝
|
|
|
else if("1000000002".equals(menuId)){
|
|
@@ -915,7 +932,7 @@ public class FlowableController extends BaseController
|
|
|
//企业名称
|
|
|
String coreName = coreCompany.getScyName();
|
|
|
//标题
|
|
|
- String title = "【审批拒绝】【"+coreName +"】的融信【"+zfiNumber+"】审批被拒绝,拒绝的理由为:【"+reason+"】";
|
|
|
+ String title = "【审批拒绝】融信编号【"+zfiNumber+"】审批被拒绝,拒绝的理由为:【"+reason+"】";
|
|
|
remoteSystemService.sendNotice(zfiSupplierId, zfiId,title,"01","02","","0",supplierUserId.toString(),"", null, null);
|
|
|
|
|
|
/**融信操作日志*/
|
|
@@ -940,8 +957,7 @@ public class FlowableController extends BaseController
|
|
|
String zfiNumber = inf.getZfiNumber();
|
|
|
//融信创建(0:供应商申请, 1:核心企业开立, 2:供应商开立)
|
|
|
String zfiCreateType = inf.getZfiCreateType();
|
|
|
- //查询企业名称
|
|
|
- SysCompany sysCompany = sysCompanyService.getById(companyId);
|
|
|
+
|
|
|
LambdaQueryWrapper<ZcFinanceInf> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
lambdaQueryWrapper.eq(ZcFinanceInf::getZfiId,id);
|
|
|
ZcFinanceInf zcFinanceInf = new ZcFinanceInf();
|
|
@@ -962,7 +978,18 @@ public class FlowableController extends BaseController
|
|
|
notice.setStatus("1");
|
|
|
sysNoticeService.update(notice,noticeLambdaQueryWrapper);
|
|
|
//待办标题
|
|
|
- String tittle = "【融资签收】由【" + sysCompany.getScyName() + "】发起的:融信编号【" + zfiNumber + "】资料代签收";
|
|
|
+ //查询企业名称
|
|
|
+ SysCompany coreCompany = sysCompanyService.getById(inf.getZfiCoreId());
|
|
|
+ String coreName = coreCompany.getScyName();
|
|
|
+ SysCompany supplierCompany = sysCompanyService.getById(inf.getZfiSupplierId());
|
|
|
+ String supplierName = supplierCompany.getScyName();
|
|
|
+ String tittle = "";
|
|
|
+ if("1".equals(zfiCreateType)){
|
|
|
+ tittle = "【融资签收】由【" + coreName + "】发起的:融信编号【" + zfiNumber + "】资料代签收";
|
|
|
+ }else{
|
|
|
+ tittle = "【融资签收】由【" + supplierName + "】发起的:融信编号【" + zfiNumber + "】资料代签收";
|
|
|
+ }
|
|
|
+
|
|
|
remoteSystemService.sendNotice(companyId, id, tittle, "00", null, "03", "0", userId, null, "01", "/credit/signFor/"+id);
|
|
|
//TODO 给融资企业经办人签收待办
|
|
|
}//融资审批
|