增加对应资方产品信息;发起流程前增加资方校验;

This commit is contained in:
ap007 2021-07-16 14:45:33 +08:00
parent 9746c6733c
commit a437c080e1
10 changed files with 160 additions and 32 deletions

View File

@ -7,8 +7,9 @@
*/
String productId= CurPage.getParameter("productId");
ASObjectModel doTemp = new ASObjectModel("LB_PRODUCT_CORPUS_SOURCE");
// String coleditSource = "jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='corpus_source' and isinuse='1' and attribute='"+""+"'";
// doTemp.setColumnAttribute("CHANNEL_PRODUCT_ID","coleditsource","AccountCodeDirection");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
@ -36,11 +37,17 @@
function checkAll(){
//双循环来遍历查重
for(var i=0;i<getRowCount(0);i++){
var orderList = getItemValue(0,i,'ORDER_LIST');
var corpusSource = getItemValue(0,i,'CORPUS_SOURCE');
var channelProductId = getItemValue(0,i,'CHANNEL_PRODUCT_ID');
if(channelProductId.indexOf(corpusSource)==-1){
alert('只可以选择与资方对应的产品');
return;
}
for(var j = i+1; j < getRowCount(0); j++){
var orderList = getItemValue(0,i,'ORDER_LIST');
var corpusSource = getItemValue(0,i,'CORPUS_SOURCE');
var orderListLast = getItemValue(0,j,'ORDER_LIST');
var corpusSourceLast = getItemValue(0,j,'CORPUS_SOURCE');
if(i==0){
if(orderList==null||orderList==''||corpusSource==null||corpusSourceLast==''||orderListLast==null||orderListLast==''||corpusSourceLast==null||corpusSourceLast==''){
alert('资金来源或排序号不能为空');
@ -54,6 +61,7 @@
alert('资金来源不可以重复');
return;
}
}
}
return 's';

View File

@ -9,8 +9,7 @@
})
function newApply()
{
{
var userid="<%=CurUser.getUserID()%>";
var flowno="<%=CurPage.getParameter("ApplyType")%>";
var selname="";
@ -67,8 +66,9 @@
//todo 通过projectid先看corpus_source字段是否是带有外资方的项目如果时则去查找资方返回的对应的状态
// 如果通过则可以发起,如果暂时没有结果,则提示;如果审批失败,则按顺序转换资金方,然后重新发起业务申请后的另外一个资方的调用接口;
// 如果都失败最终转换为自有资金将corpus_source字段设为AP(在接口平台实现此功能);
var checkParam = 'project_id='+project_id;
var checkResult = RunJavaMethod('com.ap.CorpusSourceCheck','corpusApplyCheck',checkParam);
//project_id返回的是project_no字段不是project_id
var checkParam = 'projectId='+id;
var checkResult = RunJavaMethod('com.ap.CorpusSourceCheck','corpusContractApplyCheck',checkParam);
if(checkResult!='S'){
alert(checkResult);
return;

View File

@ -39,10 +39,20 @@
alert(checkTotal);
return ;
}
var disChannelType = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.DisChannelTypeCheck","getDisChannelType","contractId="+contract_id);
var disChannelType = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.DisChannelTypeCheck","getDisChannelType","contractId="+contract_id);
var gpsVendor = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.GpsVendorCheck","getGpsVendor","productId="+productId);
var sParams = "ContractId="+contract_id+",FlowKey="+contract_no+",ProjectId="+proj_id+",ProductId="+productId+",contract_number="+contract_number+",ProjectName="+(contract_no+"-"+customername)+",applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>,gpsVendor="+gpsVendor+",disChannelType="+disChannelType+",type=fundPay";
var corpusSource = RunJavaMethod("com.ap.CorpusSourceCheck","getCorpusSourceByProjectId","projectId="+proj_id);
//检查是否已与资方签署合同
if(corpusSource!='AP'){
var sResult = RunJavaMethod("com.ap.CorpusSourceCheck","corpusFundPaymentApplyCheck","projectId="+proj_id);
if(sResult!="S"){
alert(sResult);
return;
}
}
var sParams = "ContractId="+contract_id+",FlowKey="+contract_no+",ProjectId="+proj_id+",ProductId="+productId+",contract_number="+contract_number+",ProjectName="+(contract_no+"-"+customername)+",applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>,gpsVendor="+gpsVendor+",disChannelType="+disChannelType+",type=fundPay,corpusSource="+corpusSource;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);
var sReturnInfos=sReturnInfo.split("@");
if(sReturnInfos[0]=="success")

View File

@ -26,9 +26,14 @@
var SubjectName = sReturn[10];
var channel = sReturn[11];
if(""== SubjectId||null == SubjectId||"undefined" == SubjectId){
alert("该数据没有对应的主体,请联系管理员!");
alert("该数据没有对应的主体,请联系管理员!");
return ;
}
var corpusSource = RunJavaMethod("com.ap.CorpusSourceCheck","getCorpusSourceByProjectId","projectId="+id);
if(corpusSource=='PSBC'){
alert("资金方为邮储的订单不允许变更,请联系业务经理解决!");
return ;
}
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
sParams =sParams+",channel="+channel+",SubjectId="+SubjectId+",SubjectName="+SubjectName+",certtype="+certtype+",customertype="+CustomerType+",carAttributes="+carAttributes+",leasform="+leasehold+",operationType="+operationType+",ProjectId="+id+",ProductId="+product_id+",FlowKey="+project_id+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);

View File

@ -308,6 +308,8 @@
<attribute name="FC_LOAN_ID" label="资金渠道放款申请ID" type="STRING" length="32"/>
<attribute name="CHANNEL_NO" label="资金渠道编号" type="STRING" length="32"/>
<attribute name="CHANNEL_NAME" label="资金渠道名称" type="STRING" length="32"/>
<attribute name="CHANNEL_PRODUCT_ID" label="资金渠道产品编号" type="STRING" length="32"/>
<attribute name="CHANNEL_PRODUCT_DESC" label="资金渠道产品描述" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目ID" type="STRING" length="32"/>
<attribute name="PROJECT_NO" label="项目编号" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
@ -318,6 +320,7 @@
<attribute name="DISTRIBUTOR_NAME" label="经销商名称" type="STRING" length="32"/>
<attribute name="CUSTOMER_ID" label="客户ID" type="STRING" length="32"/>
<attribute name="CUSTOMER_NAME" label="客户名称" type="STRING" length="32"/>
<attribute name="FC_STAGE" label="当前订单状态0信审中1信审通过2合通签署成功3放款成功" type="STRING" length="32"/>
<attribute name="FC_STATUS" label="当前状态" type="STRING" length="32"/>
<attribute name="FC_REMARK" label="返回状态描述" type="STRING" length="32"/>
<attribute name="SUPPLEMENT_STS" label="是否需要补充资料清单" type="STRING" length="32"/>
@ -406,5 +409,19 @@
</managerProperties>
</manager>
</class>
<class name="LC_PROFIT_PLAN" label="资方分润计划信息" describe="资方分润计划信息" keyAttributes="ID">
<attributes>
<attribute name="ID" label="唯一标识" type="STRING" length="32" />
<attribute name="RENT_PLAN_ID" label="对应租金计划id" type="STRING" length="32"/>
<attribute name="PROFIT" label="分润金额" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lc_profit_plan"/>
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -263,6 +263,7 @@
<attributes>
<attribute name="ID" label="ID" type="STRING" length="32"/>
<attribute name="PRODUCT_ID" label="产品ID" type="STRING" length="32"/>
<attribute name="CHANNEL_PRODUCT_ID" label="对应渠道产品" type="STRING" length="32"/>
<attribute name="CORPUS_SOURCE" label="资金来源" type="STRING" length="32"/>
<attribute name="ORDER_LIST" label="资金顺序" type="STRING" length="20"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="30"/>

View File

@ -9,6 +9,7 @@ import com.amarsoft.awe.util.Transaction;
import jbo.com.tenwa.entity.comm.message.BT_BUSSINESS_MESSAGE_CONFIG;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import jbo.oti.FC_REQUEST;
import jbo.prd.LB_PRODUCT_CORPUS_SOURCE;
import java.util.List;
@ -74,36 +75,73 @@ public class CorpusSourceCheck {
return "AP";
}
public String corpusApplyCheck() {
/**
* 发起合同制作时检验资方是否信审通过
* @return
*/
public String corpusContractApplyCheck() {
String sResult;
Transaction Sqlca = Transaction.createTransaction("als");
try {
String corpusSource = Sqlca.getString("select corpus_source from lb_project_info where id = '" + projectId + "'");
if ("AP".equals(corpusSource) || "".equals(corpusSource) || corpusSource == null) {
if(projectId==null){
sResult = "未找到对应的项目编号,请联系系统管理员";
return sResult;
}
String fcStage = this.getFcStageByProjectId();
if ("AP".equals(fcStage)||"1".equals(fcStage)) {
sResult = "S";
} else {
String fcStatus = Sqlca.getString("select FC_STATUS from fc_request where del_flag='0' and project_id = '" + projectId + "'");
if (Integer.parseInt(fcStatus) == 1700) {
sResult = "S";
} else {
sResult = "资金方尚未审批结束,请稍后再试!";
}
sResult = "资金方尚未审批结束,请稍后再试!";
}
} catch (Exception e) {
sResult = "检验资金渠道信息出错,请联系系统管理员!";
e.printStackTrace();
} finally {
if (Sqlca != null) {
try {
Sqlca.commit();
Sqlca.disConnect();
} catch (JBOException e) {
e.printStackTrace();
}
}
return "检验资金渠道信息出错,请联系系统管理员!";
}
return sResult;
}
/**
* 发起放款申请制作时检验是否与资方签署合同
* @return
*/
public String corpusFundPaymentApplyCheck(){
String sResult = null;
try {
String fcStage = this.getFcStageByProjectId();
if("2".equals(fcStage)||"AP".equals(fcStage)){
return "S";
}else{
sResult = "客户还未和资方签署合同";
}
} catch (JBOException e) {
e.printStackTrace();
return "检验资金渠道信息出错,请联系系统管理员!";
}
return sResult;
}
public String getCorpusSourceByProjectId() throws JBOException {
String corpusSource = "AP";
BizObjectManager bomLPI = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME);
BizObject boLPI = bomLPI.createQuery("id=:projectId").setParameter("projectId", projectId).getSingleResult(false);
if (boLPI.getAttribute("CORPUS_SOURCE") != null) {
corpusSource = boLPI.getAttribute("CORPUS_SOURCE").toString();
}
return corpusSource;
}
public String getFcStageByProjectId() throws JBOException {
String fcStage = "-2" ;
String corpusSource = this.getCorpusSourceByProjectId();
if("AP".equals(corpusSource)){
fcStage = "AP" ;
}else{
BizObjectManager bomFR = JBOFactory.getBizObjectManager(FC_REQUEST.CLASS_NAME);
BizObject boFR = bomFR.createQuery("id=:projectId and del_flag='0'").setParameter("projectId", projectId).getSingleResult(false);
if(boFR!=null){
fcStage = boFR.getAttribute("FC_STAGE").toString();
}
}
return fcStage;
}
public String getProjectId() {
return projectId;
@ -112,4 +150,5 @@ public class CorpusSourceCheck {
public void setProjectId(String projectId) {
this.projectId = projectId;
}
}

View File

@ -29,6 +29,14 @@ public interface FC_REQUEST{
* ×ʽðÇþµÀÃû³Æ STRING(32)<br>
*/
public static final String CHANNEL_NAME = "CHANNEL_NAME";
/**
* 资金渠道产品ID STRING(32)<br>
*/
public static final String CHANNEL_PRODUCT_ID = "CHANNEL_PRODUCT_ID";
/**
* 资金渠道产品名称 STRING(32)<br>
*/
public static final String CHANNEL_PRODUCT_DESC = "CHANNEL_PRODUCT_DESC";
/**
* ÏîÄ¿ID STRING(32)<br>
*/
@ -70,10 +78,14 @@ public interface FC_REQUEST{
*/
public static final String CUSTOMER_NAME = "CUSTOMER_NAME";
/**
* µ±Ç°×´Ì¬ STRING(32)<br>
*/
* 当前状态 STRING(32)<br>
*/
public static final String FC_STATUS = "FC_STATUS";
/**
* 当前订单状态0信审中1信审通过2合通签署成功3放款成功 STRING(32)<br>
*/
public static final String FC_STAGE = "FC_STAGE";
/**
* ·µ»Ø×´Ì¬ÃèÊö STRING(32)<br>
*/
public static final String FC_REMARK = "FC_REMARK";

View File

@ -0,0 +1,32 @@
package jbo.oti;
/**
* 接口资料表 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LC_PROFIT_PLAN {
/**
* 接口资料表<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.oti.LC_PROFIT_PLAN";
/**
* 唯一标识 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 对应租金计划ID STRING(32)<br>
*/
public static final String RENT_PLAN_ID = "RENT_PLAN_ID";
/**
* 分润金额 STRING(32)<br>
*/
public static final String PROFIT = "PROFIT";
/**
* 创建时间 STRING(32)<br>
*/
public static final String INPUTTIME = "INPUTTIME";
}

View File

@ -21,6 +21,10 @@ public interface LB_PRODUCT_CORPUS_SOURCE{
* 产品ID STRING(32)<br>
*/
public static final String PRODUCT_ID = "PRODUCT_ID";
/**
* 对应邮储产品 STRING(32)<br>
*/
public static final String CHANNEL_PRODUCT_ID = "CHANNEL_PRODUCT_ID";
/**
* 资金来源 STRING(32)<br>
*/