1.其他支付初版
This commit is contained in:
parent
cf7c5884c6
commit
30153e57c7
@ -0,0 +1,52 @@
|
||||
<%@page import="jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP"%>
|
||||
<%@page import="jbo.app.tenwa.calc.LC_EBANK_PROCESS"%>
|
||||
<%@page import="jbo.app.tenwa.calc.LC_EBANK_TEMP"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String phaseNo = CurPage.getParameter("PhaseNo");
|
||||
String rightType = CurPage.getParameter("RightType");
|
||||
String ishistory = CurPage.getParameter("IsHistory");
|
||||
String sTempletNo = CurPage.getParameter("TempletNo");//模板号
|
||||
ASObjectModel doTemp = new ASObjectModel("LCSplittingPayTempList");
|
||||
if(null!=ishistory&&ishistory.equals("true")){
|
||||
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory");
|
||||
}
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
|
||||
dwTemp.Style="1";
|
||||
dwTemp.ShowSummary = "1";
|
||||
if(!"ReadOnly".equals(rightType) && !"0020".equals(phaseNo)){
|
||||
dwTemp.MultiSelect = true;
|
||||
}
|
||||
dwTemp.ReadOnly = "1";
|
||||
if("0040".equals(phaseNo)){
|
||||
dwTemp.ReadOnly = "0";
|
||||
}
|
||||
dwTemp.setPageSize(50);
|
||||
ASDataObject ado = dwTemp.getDataObject();
|
||||
|
||||
dwTemp.genHTMLObjectWindow(flowunid);
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String[][] sButtons = null;
|
||||
if("ReadOnly".equals(rightType)){
|
||||
sButtons = new String[][]{
|
||||
};
|
||||
}else if("0010".equals(phaseNo)){
|
||||
sButtons = new String[][]{
|
||||
{"true","","Button","保存","保存","as_save(0)","","","","btn_icon_save",""}
|
||||
{"true","","Button","撤销","撤销","as_delete(0)","","","","btn_icon_delete",""}
|
||||
};
|
||||
}else{
|
||||
sButtons = new String[][]{
|
||||
{"true","","Button","保存","保存","as_save(0)","","","","btn_icon_save",""},
|
||||
};
|
||||
}
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -6,7 +6,10 @@
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function newApply(){
|
||||
debugger;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow","");
|
||||
var userid="<%=CurUser.getUserID()%>";
|
||||
var orgid="<%=CurUser.getOrgID()%>";
|
||||
var sParams = "applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);
|
||||
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
|
||||
var sReturnInfos=sReturnInfo.split("@");
|
||||
if(sReturnInfos[0]=="success")
|
||||
|
||||
38
WebContent/Tenwa/Lease/Flow/Rent/RentReback/Splitting.jsp
Normal file
38
WebContent/Tenwa/Lease/Flow/Rent/RentReback/Splitting.jsp
Normal file
@ -0,0 +1,38 @@
|
||||
<%@page import="com.amarsoft.are.util.json.JSONEncoder"%>
|
||||
<%@page import="jbo.app.tenwa.calc.LC_EBANK_TEMP"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/IncludeBegin.jsp"%>
|
||||
<%
|
||||
//dwTemp.MultiSelect = true; //多选
|
||||
String flowunid = CurPage.getAttribute("FlowUnid");
|
||||
String PhaseNo = CurPage.getParameter("PhaseNo");
|
||||
String temp = "true";
|
||||
if("0020".equals(PhaseNo)){
|
||||
temp = "false";
|
||||
};
|
||||
//参数:0.是否显示, 1.标题, 2.JS事件字符串表示(TabContentFrame会替换为真实名称), 3. 是否缓存(默认是), 4. 是否有关闭按钮(默认无), 5. Strip高度(默认600px)
|
||||
String sTabStrip[][] = {
|
||||
{temp, "分润计划", "AsControl.OpenComp('/Tenwa/Lease/Flow/Rent/RentReback/SplittingList.jsp', 'FlowUnid="+flowunid+"', 'TabContentFrame')","false"},
|
||||
{"true", "分润支付数据", "AsControl.OpenComp('/Tenwa/Lease/Flow/Rent/RentReback/LCSplittingPayTemp.jsp', 'FlowUnid="+flowunid+"', 'TabContentFrame')", "false"},
|
||||
// {"true", "分润支付汇总数据", "AsControl.OpenComp('/Tenwa/Lease/Flow/Rent/RentReback/LCSplittingPayTemp.jsp', 'FlowUnid="+flowunid+"', 'TabContentFrame')", "false"},
|
||||
};
|
||||
|
||||
//参数:0.是否显示, 1.权限, 2.类型, 3.按钮文字, 4.说明文字, 5.事件, 6.快捷键, 7.资源路径, 8.资源路径参数, 9.图标, 10.风格
|
||||
String sButtons[][] = {
|
||||
};
|
||||
|
||||
// BeforeTabStripHtml-html
|
||||
CurPage.setAttribute("BeforeTabStripHtml", Button.getHtmlText(sButtons, CurUser, CurPage, CurConfig));
|
||||
|
||||
// TabStrip-JSON
|
||||
CurPage.setAttribute("TabStrip", JSONEncoder.encode(sTabStrip));
|
||||
|
||||
// TabStripType-tab/strip 默认为tab
|
||||
//CurPage.setAttribute("TabStripType", "strip");
|
||||
|
||||
// First-num 默认为0
|
||||
CurPage.setAttribute("First", "0");
|
||||
|
||||
%>
|
||||
<%@ include file="/Frame/resources/include/ui/include_tabstrip.jspf"%>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
@ -0,0 +1,60 @@
|
||||
<%@page import="jbo.app.tenwa.calc.LC_EBANK_PROCESS"%>
|
||||
<%@page import="jbo.app.tenwa.calc.LC_EBANK_TEMP"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String rightType = CurPage.getParameter("RightType");
|
||||
String applytype = CurPage.getParameter("ApplyType");
|
||||
|
||||
ASObjectModel doTemp = new ASObjectModel("SplittingList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
if(!"ReadOnly".equals(rightType)){
|
||||
dwTemp.MultiSelect = true;
|
||||
}
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","生成分润支付数据","生成分润支付数据","createSplittingPay()","","","","btn_icon_add",""}
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function createSplittingPay(){
|
||||
var id = getItemValueArray(0,"id")+","+TablePage.getCheckedItemValueArrayWithOtherPage("id",s_c_p[0]);
|
||||
if("," == id){
|
||||
alert("请先选择需要支付的数据");
|
||||
return;
|
||||
}
|
||||
var interestSP = getItemValueArray(0,"INTEREST_sp")+","+TablePage.getCheckedItemValueArrayWithOtherPage("INTEREST_sp",s_c_p[0]);
|
||||
id = id.replace(/,/ig,"@");
|
||||
interestSP = interestSP.replace(/,/ig,"@");
|
||||
if(id.startsWith("@")){
|
||||
id = id.substring(1);
|
||||
interestSP = interestSP.substring(1);
|
||||
}
|
||||
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.rent.rentreback.OtherPayMethod","createSplittingPayTemp",
|
||||
"planIDs="+id+",interestSPs="+interestSP+",flowunid=<%=flowunid%>,serviceType=AutoBuckle");
|
||||
if("success"==sResult){
|
||||
alert("操作成功,请到分润支付数据中查看!");
|
||||
reloadSelf();
|
||||
TablePage.pageCheckedData = {};
|
||||
TablePage.pageUncheckedData = {};
|
||||
}else{
|
||||
alert(sResult);
|
||||
TablePage.pageCheckedData = {};
|
||||
TablePage.pageUncheckedData = {};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,37 @@
|
||||
<%@page import="com.amarsoft.are.util.json.JSONEncoder"%>
|
||||
<%@page import="jbo.app.tenwa.calc.LC_EBANK_TEMP"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/IncludeBegin.jsp"%>
|
||||
<%
|
||||
//dwTemp.MultiSelect = true; //多选
|
||||
String flowunid = CurPage.getAttribute("FlowUnid");
|
||||
String PhaseNo = CurPage.getParameter("PhaseNo");
|
||||
String temp = "true";
|
||||
if("0020".equals(PhaseNo)){
|
||||
temp = "false";
|
||||
};
|
||||
//参数:0.是否显示, 1.标题, 2.JS事件字符串表示(TabContentFrame会替换为真实名称), 3. 是否缓存(默认是), 4. 是否有关闭按钮(默认无), 5. Strip高度(默认600px)
|
||||
String sTabStrip[][] = {
|
||||
{temp, "网银数据", "AsControl.OpenComp('/Tenwa/Lease/Flow/Rent/RentReback/SplittingList.jsp', 'FlowUnid="+flowunid+"', 'TabContentFrame')","false"},
|
||||
{"true", "剩余退回数据", "AsControl.OpenComp('/Tenwa/Lease/Flow/Rent/RentIncome/LCRentIncomeTempList.jsp', 'FlowUnid="+flowunid+"', 'TabContentFrame')", "false"},
|
||||
};
|
||||
|
||||
//参数:0.是否显示, 1.权限, 2.类型, 3.按钮文字, 4.说明文字, 5.事件, 6.快捷键, 7.资源路径, 8.资源路径参数, 9.图标, 10.风格
|
||||
String sButtons[][] = {
|
||||
};
|
||||
|
||||
// BeforeTabStripHtml-html
|
||||
CurPage.setAttribute("BeforeTabStripHtml", Button.getHtmlText(sButtons, CurUser, CurPage, CurConfig));
|
||||
|
||||
// TabStrip-JSON
|
||||
CurPage.setAttribute("TabStrip", JSONEncoder.encode(sTabStrip));
|
||||
|
||||
// TabStripType-tab/strip 默认为tab
|
||||
//CurPage.setAttribute("TabStripType", "strip");
|
||||
|
||||
// First-num 默认为0
|
||||
CurPage.setAttribute("First", "2");
|
||||
|
||||
%>
|
||||
<%@ include file="/Frame/resources/include/ui/include_tabstrip.jspf"%>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
@ -1371,6 +1371,41 @@
|
||||
|
||||
</package>
|
||||
<package name="jbo.com.tenwa.entity.comm.flow" >
|
||||
<class name="LC_SPLITTING_PAY" label="" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="id" type="STRING" length="32"/>
|
||||
<attribute name="plan_id" label="租金计划ID" type="STRING" length="32"/>
|
||||
<attribute name="splitting_money" label="支付分润金额" type="DOUBLE" length="18" scale="2"/>
|
||||
<attribute name="service_ratio" label="手续费费率" type="DOUBLE" length="18" scale="6"/>
|
||||
<attribute name="service_money" label="手续费" type="DOUBLE" length="18" scale="2"/>
|
||||
<attribute name="pay_date" label="支付日期" type="STRING" length="20"/>
|
||||
<attribute name="inputtime" label="输入时间" type="STRING" length="20"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lc_splitting_pay" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="LC_SPLITTING_PAY_TEMP" label="" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="id" type="STRING" length="32"/>
|
||||
<attribute name="plan_id" label="租金计划ID" type="STRING" length="32"/>
|
||||
<attribute name="splitting_money" label="支付分润金额" type="DOUBLE" length="18" scale="2"/>
|
||||
<attribute name="service_ratio" label="手续费费率" type="DOUBLE" length="18" scale="6"/>
|
||||
<attribute name="service_money" label="手续费" type="DOUBLE" length="18" scale="2"/>
|
||||
<attribute name="pay_date" label="支付日期" type="STRING" length="20"/>
|
||||
<attribute name="flowunid" label="流程Id" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="输入时间" type="STRING" length="20"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lc_splitting_pay_temp" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="LB_PAYMENTOFCLAIMS_INFO" label="保险理赔结清" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
@ -1564,4 +1599,5 @@
|
||||
</manager>
|
||||
</class>
|
||||
</package>
|
||||
|
||||
</jbo>
|
||||
|
||||
@ -0,0 +1,101 @@
|
||||
package com.tenwa.lease.flow.rent.rentreback;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
|
||||
import jbo.app.tenwa.customer.LPOUNDAGE_MAINTENANCE;
|
||||
import jbo.com.tenwa.entity.comm.flow.LC_SPLITTING_PAY_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
|
||||
public class OtherPayMethod {
|
||||
|
||||
private String flowunid;
|
||||
private String planIDs;
|
||||
private String interestSPs;
|
||||
private String serviceType;
|
||||
|
||||
public String createSplittingPayTemp(JBOTransaction tx){
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
|
||||
String currentDate = df.format(new Date());
|
||||
BizObjectManager lm;
|
||||
BigDecimal ratio = null;
|
||||
String rate = "0";
|
||||
try {
|
||||
lm = JBOFactory.getBizObjectManager(LPOUNDAGE_MAINTENANCE.CLASS_NAME,tx);
|
||||
String getServiceRatioSQL = "select rate from O where charge_way='"+serviceType+"' AND start_date<='"+currentDate+"' AND expiry_date>='"+currentDate+"'";
|
||||
BizObject boRatio = lm.createQuery(getServiceRatioSQL).getSingleResult(false);
|
||||
rate = boRatio.getAttribute("rate").toString();
|
||||
ratio = (new BigDecimal(rate)).divide(new BigDecimal("100"), 6, BigDecimal.ROUND_HALF_UP);
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
return "获取手续费费率失败";
|
||||
}
|
||||
if(ratio!=null){
|
||||
String[] interestSP = interestSPs.split("@");
|
||||
String[] planID = planIDs.split("@");
|
||||
if(interestSP.length==planID.length){
|
||||
for(int i=0;i<planID.length;i++){
|
||||
String serviceMoney = (new BigDecimal(interestSP[i])).multiply(ratio).setScale(2, BigDecimal.ROUND_HALF_UP).toString();
|
||||
String splitting_money = (new BigDecimal(interestSP[i])).subtract(new BigDecimal(serviceMoney)).toString();
|
||||
String plan_id = planID[i];
|
||||
try {
|
||||
BizObjectManager bomLspt = JBOFactory.getBizObjectManager(LC_SPLITTING_PAY_TEMP.CLASS_NAME,tx);
|
||||
BizObject bolspt = bomLspt.newObject();
|
||||
bolspt.setAttributeValue("plan_id", plan_id);
|
||||
bolspt.setAttributeValue("splitting_money", splitting_money);
|
||||
bolspt.setAttributeValue("service_ratio", rate);
|
||||
bolspt.setAttributeValue("service_money", serviceMoney);
|
||||
bolspt.setAttributeValue("flowunid", flowunid);
|
||||
bolspt.setAttributeValue("inputtime", StringFunction.getTodayNow());
|
||||
bomLspt.saveObject(bolspt);
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
return "插入临时表失败";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
public String getFlowunid() {
|
||||
return flowunid;
|
||||
}
|
||||
public void setFlowunid(String flowunid) {
|
||||
this.flowunid = flowunid;
|
||||
}
|
||||
public String getPlanIDs() {
|
||||
return planIDs;
|
||||
}
|
||||
public void setPlanIDs(String planIDs) {
|
||||
this.planIDs = planIDs;
|
||||
}
|
||||
public String getInterestSPs() {
|
||||
return interestSPs;
|
||||
}
|
||||
public void setInterestSPs(String interestSPs) {
|
||||
this.interestSPs = interestSPs;
|
||||
}
|
||||
public String getServiceType() {
|
||||
return serviceType;
|
||||
}
|
||||
public void setServiceType(String serviceType) {
|
||||
this.serviceType = serviceType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user