From a437c080e13ef9bbbbe5982b20505f9247557d2c Mon Sep 17 00:00:00 2001 From: ap007 Date: Fri, 16 Jul 2021 14:45:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=BA=94=E8=B5=84?= =?UTF-8?q?=E6=96=B9=E4=BA=A7=E5=93=81=E4=BF=A1=E6=81=AF=EF=BC=9B=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E6=B5=81=E7=A8=8B=E5=89=8D=E5=A2=9E=E5=8A=A0=E8=B5=84?= =?UTF-8?q?=E6=96=B9=E6=A0=A1=E9=AA=8C=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Apzl/productCorpus/LbCorpusSourceList.jsp | 14 +++- .../ContractApprovalApplyList.jsp | 8 +- .../Fund/FundPayment/FundPaymentApplyList.jsp | 14 +++- .../BusinessChangeApplyList.jsp | 7 +- WebContent/WEB-INF/etc/jbo/jbo_oti.xml | 17 ++++ WebContent/WEB-INF/etc/jbo/jbo_prd.xml | 1 + src/com/ap/CorpusSourceCheck.java | 79 ++++++++++++++----- src_jbo/jbo/oti/FC_REQUEST.java | 16 +++- src_jbo/jbo/oti/LC_PROFIT_PLAN.java | 32 ++++++++ src_jbo/jbo/prd/LB_PRODUCT_CORPUS_SOURCE.java | 4 + 10 files changed, 160 insertions(+), 32 deletions(-) create mode 100644 src_jbo/jbo/oti/LC_PROFIT_PLAN.java diff --git a/WebContent/Tenwa/Apzl/productCorpus/LbCorpusSourceList.jsp b/WebContent/Tenwa/Apzl/productCorpus/LbCorpusSourceList.jsp index e55d1bfe4..af1704c14 100644 --- a/WebContent/Tenwa/Apzl/productCorpus/LbCorpusSourceList.jsp +++ b/WebContent/Tenwa/Apzl/productCorpus/LbCorpusSourceList.jsp @@ -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"; 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; diff --git a/WebContent/Tenwa/Lease/Flow/Fund/FundPayment/FundPaymentApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Fund/FundPayment/FundPaymentApplyList.jsp index b851964ca..0bd1ccbbd 100644 --- a/WebContent/Tenwa/Lease/Flow/Fund/FundPayment/FundPaymentApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Fund/FundPayment/FundPaymentApplyList.jsp @@ -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") diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp index 65e62d83a..037230ef7 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp @@ -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); diff --git a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml index 0c7006747..b72a2d06b 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml @@ -308,6 +308,8 @@ + + @@ -318,6 +320,7 @@ + @@ -406,5 +409,19 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_prd.xml b/WebContent/WEB-INF/etc/jbo/jbo_prd.xml index e6d96e58d..c0bc15474 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_prd.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_prd.xml @@ -263,6 +263,7 @@ + diff --git a/src/com/ap/CorpusSourceCheck.java b/src/com/ap/CorpusSourceCheck.java index d9beda3a3..cdaa30927 100644 --- a/src/com/ap/CorpusSourceCheck.java +++ b/src/com/ap/CorpusSourceCheck.java @@ -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; } + } diff --git a/src_jbo/jbo/oti/FC_REQUEST.java b/src_jbo/jbo/oti/FC_REQUEST.java index fb67b5d28..cbc61e7c3 100644 --- a/src_jbo/jbo/oti/FC_REQUEST.java +++ b/src_jbo/jbo/oti/FC_REQUEST.java @@ -29,6 +29,14 @@ public interface FC_REQUEST{ * 资金渠道名称 STRING(32)
*/ public static final String CHANNEL_NAME = "CHANNEL_NAME"; + /** + * 资金渠道产品ID STRING(32)
+ */ + public static final String CHANNEL_PRODUCT_ID = "CHANNEL_PRODUCT_ID"; + /** + * 资金渠道产品名称 STRING(32)
+ */ + public static final String CHANNEL_PRODUCT_DESC = "CHANNEL_PRODUCT_DESC"; /** * 项目ID STRING(32)
*/ @@ -70,10 +78,14 @@ public interface FC_REQUEST{ */ public static final String CUSTOMER_NAME = "CUSTOMER_NAME"; /** - * 当前状态 STRING(32)
- */ + * 当前状态 STRING(32)
+ */ public static final String FC_STATUS = "FC_STATUS"; /** + * 当前订单状态:0信审中,1信审通过,2合通签署成功,3放款成功 STRING(32)
+ */ + public static final String FC_STAGE = "FC_STAGE"; + /** * 返回状态描述 STRING(32)
*/ public static final String FC_REMARK = "FC_REMARK"; diff --git a/src_jbo/jbo/oti/LC_PROFIT_PLAN.java b/src_jbo/jbo/oti/LC_PROFIT_PLAN.java new file mode 100644 index 000000000..d7c03c2ff --- /dev/null +++ b/src_jbo/jbo/oti/LC_PROFIT_PLAN.java @@ -0,0 +1,32 @@ +package jbo.oti; + +/** +* 接口资料表 - JBO命名常量类

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_PROFIT_PLAN { + /** + * 接口资料表

+ * 代表本类映射的BizObjectClass + */ + public static final String CLASS_NAME = "jbo.oti.LC_PROFIT_PLAN"; + /** + * 唯一标识 STRING(32)
+ */ + public static final String ID = "ID"; + /** + * 对应租金计划ID STRING(32)
+ */ + public static final String RENT_PLAN_ID = "RENT_PLAN_ID"; + /** + * 分润金额 STRING(32)
+ */ + public static final String PROFIT = "PROFIT"; + /** + * 创建时间 STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + + +} \ No newline at end of file diff --git a/src_jbo/jbo/prd/LB_PRODUCT_CORPUS_SOURCE.java b/src_jbo/jbo/prd/LB_PRODUCT_CORPUS_SOURCE.java index 5eceb647b..b87060eda 100644 --- a/src_jbo/jbo/prd/LB_PRODUCT_CORPUS_SOURCE.java +++ b/src_jbo/jbo/prd/LB_PRODUCT_CORPUS_SOURCE.java @@ -21,6 +21,10 @@ public interface LB_PRODUCT_CORPUS_SOURCE{ * 产品ID STRING(32)
*/ public static final String PRODUCT_ID = "PRODUCT_ID"; + /** + * 对应邮储产品 STRING(32)
+ */ + public static final String CHANNEL_PRODUCT_ID = "CHANNEL_PRODUCT_ID"; /** * 资金来源 STRING(32)
*/