1.其它支付-网银多余退回初版
This commit is contained in:
parent
a2c809038c
commit
7a5bf31dff
76
WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCEbankTemp.jsp
Normal file
76
WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCEbankTemp.jsp
Normal file
@ -0,0 +1,76 @@
|
||||
<%@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("LCEbankListRebackTemp");
|
||||
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)){
|
||||
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","撤销","撤销","deleteProcess()","","","","btn_icon_delete",""}
|
||||
};
|
||||
}else if("0040".equals(phaseNo)){
|
||||
sButtons = new String[][]{
|
||||
{"true","","Button","保存","保存","as_save(0)","","","","btn_icon_save",""},
|
||||
};
|
||||
}
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function deleteProcess(){
|
||||
var ebankNumber = getItemValueArray(0,"EBANK_NUMBER")+","+TablePage.getCheckedItemValueArrayWithOtherPage("EBANK_NUMBER",s_c_p[0]);
|
||||
if("," == ebankNumber){
|
||||
alert("请先选择需要撤回的选项");
|
||||
return;
|
||||
}
|
||||
debugger;
|
||||
ebankNumber = ebankNumber.replace(/,/ig,"@");
|
||||
if(ebankNumber.startsWith("@")){
|
||||
ebankNumber = ebankNumber.substring(1);
|
||||
}
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.rent.rentreback.OtherPayMethod","deleteProcess",
|
||||
"ebankNumbers="+ebankNumber+",flowunid=<%=flowunid%>");
|
||||
if("success"==sResult){
|
||||
as_delete(0);
|
||||
alert("撤销成功!");
|
||||
reloadSelf();
|
||||
TablePage.pageCheckedData = {};
|
||||
TablePage.pageUncheckedData = {};
|
||||
}else{
|
||||
alert("撤销失败!");
|
||||
TablePage.pageCheckedData = {};
|
||||
TablePage.pageUncheckedData = {};
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -5,7 +5,6 @@
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function newApply(){
|
||||
debugger;
|
||||
var userid="<%=CurUser.getUserID()%>";
|
||||
var orgid="<%=CurUser.getOrgID()%>";
|
||||
var sParams = "applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
dwTemp.MultiSelect = true;
|
||||
}
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
dwTemp.genHTMLObjectWindow(flowunid);
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
|
||||
@ -6,14 +6,14 @@
|
||||
//dwTemp.MultiSelect = true; //多选
|
||||
String flowunid = CurPage.getAttribute("FlowUnid");
|
||||
String PhaseNo = CurPage.getParameter("PhaseNo");
|
||||
String temp = "true";
|
||||
if("0020".equals(PhaseNo)){
|
||||
temp = "false";
|
||||
String temp = "false";
|
||||
if("0010".equals(PhaseNo)){
|
||||
temp = "true";
|
||||
};
|
||||
//参数: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"},
|
||||
{temp, "网银数据", "AsControl.OpenComp('/Tenwa/Lease/Flow/Rent/RentReback/SurplusRebackList.jsp', 'FlowUnid="+flowunid+"', 'TabContentFrame')","false"},
|
||||
{"true", "多余退回计划", "AsControl.OpenComp('/Tenwa/Lease/Flow/Rent/RentReback/LCEbankTemp.jsp', 'FlowUnid="+flowunid+"', 'TabContentFrame')", "false"},
|
||||
};
|
||||
|
||||
//参数:0.是否显示, 1.权限, 2.类型, 3.按钮文字, 4.说明文字, 5.事件, 6.快捷键, 7.资源路径, 8.资源路径参数, 9.图标, 10.风格
|
||||
@ -30,7 +30,7 @@
|
||||
//CurPage.setAttribute("TabStripType", "strip");
|
||||
|
||||
// First-num 默认为0
|
||||
CurPage.setAttribute("First", "2");
|
||||
CurPage.setAttribute("First", "0");
|
||||
|
||||
%>
|
||||
<%@ include file="/Frame/resources/include/ui/include_tabstrip.jspf"%>
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
<%@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("LCEbankListReback");
|
||||
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(flowunid);
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","生成多余退回计划","生成多余退回计划","createReback()","","","","btn_icon_add",""}
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function createReback(){
|
||||
debugger;
|
||||
var id = getItemValueArray(0,"id")+","+TablePage.getCheckedItemValueArrayWithOtherPage("id",s_c_p[0]);
|
||||
var mayopeMoney = getItemValueArray(0,"MAYOPE_MONEY")+","+TablePage.getCheckedItemValueArrayWithOtherPage("MAYOPE_MONEY",s_c_p[0]);
|
||||
if("," == id){
|
||||
alert("请先选择需要支付的退款金额");
|
||||
return;
|
||||
}
|
||||
id = id.replace(/,/ig,"@");
|
||||
mayopeMoney = mayopeMoney.replace(/,/ig,"@");
|
||||
if(id.startsWith("@")){
|
||||
id = id.substring(1);
|
||||
}
|
||||
if(mayopeMoney.startsWith("@")){
|
||||
mayopeMoney = mayopeMoney.substring(1);
|
||||
}
|
||||
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.rent.rentreback.OtherPayMethod","createRebackList",
|
||||
"ids="+id+",mayopeMoney="+mayopeMoney+",flowunid=<%=flowunid%>");
|
||||
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,50 @@
|
||||
package com.tenwa.lease.flow.rent.rentreback;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_EBANK;
|
||||
import jbo.app.tenwa.calc.LC_EBANK_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_RENT_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_RENT_INCOME_TEMP;
|
||||
import jbo.com.tenwa.entity.comm.flow.LC_SPLITTING_PAY;
|
||||
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.JBOFactory;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
|
||||
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
|
||||
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
|
||||
|
||||
public class CopyLCEbankTempToForml extends BaseBussiness{
|
||||
public Object run(Transaction Sqlca) throws Exception{
|
||||
this.initBussinessParam(Sqlca);
|
||||
String sFlowUnid = (String)this.getAttribute("ObjectNo");
|
||||
SqlObject so = new SqlObject("delete from lc_ebank_process where flowunid='"+sFlowUnid+"'");
|
||||
Sqlca.executeSQL(so);
|
||||
List<BizObject> letArray = JBOFactory.createBizObjectQuery(LC_EBANK_TEMP.CLASS_NAME, "FLOWUNID=:FLOWUNID").setParameter("FLOWUNID", sFlowUnid).getResultList(false);
|
||||
for(BizObject bol:letArray){
|
||||
String id = bol.getAttribute("EBANK_NUMBER").toString();
|
||||
Map<String,String> fromCondtion = new HashMap<String, String>();
|
||||
fromCondtion.put("FLOWUNID", id);
|
||||
fromCondtion.put("EBANK_NUMBER", id);
|
||||
Map<String,String> toCondition = new HashMap<String,String>();
|
||||
toCondition.put("ID", id);
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
otherProperty.put("ID", id);
|
||||
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
|
||||
service.copyEbankInfo(Sqlca, fromCondtion, toCondition, otherProperty, ServiceOperatorEnum.TempToFormal);
|
||||
}
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,8 +3,10 @@ package com.tenwa.lease.flow.rent.rentreback;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_EBANK_PROCESS;
|
||||
import jbo.app.tenwa.customer.LPOUNDAGE_MAINTENANCE;
|
||||
import jbo.com.tenwa.entity.comm.flow.LC_SPLITTING_PAY_TEMP;
|
||||
|
||||
@ -14,6 +16,12 @@ import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
|
||||
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
|
||||
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
|
||||
import com.tenwa.quartz.DateUtil;
|
||||
|
||||
public class OtherPayMethod {
|
||||
|
||||
@ -21,7 +29,12 @@ public class OtherPayMethod {
|
||||
private String planIDs;
|
||||
private String interestSPs;
|
||||
private String serviceType;
|
||||
private String ids;
|
||||
private String mayopeMoney;
|
||||
private String ebankNumbers;
|
||||
|
||||
|
||||
|
||||
public String createSplittingPayTemp(JBOTransaction tx){
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
|
||||
String currentDate = df.format(new Date());
|
||||
@ -65,6 +78,61 @@ public class OtherPayMethod {
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
|
||||
public String createRebackList(JBOTransaction tx){
|
||||
String idArray[] = ids.split("@");
|
||||
String m_Money[] = mayopeMoney.split("@");
|
||||
int failNmber = 0;
|
||||
for(int i=0;i<idArray.length;i++){
|
||||
Map<String,String> fromCondtion = new HashMap<String, String>();
|
||||
fromCondtion.put("id",idArray[i]);
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
otherProperty.put("FlowUnid", flowunid);
|
||||
otherProperty.put("MAYOPE_MONEY", "0.00");
|
||||
otherProperty.put("RETURN_MONEY", m_Money[i]);
|
||||
|
||||
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
|
||||
try {
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(LC_EBANK_PROCESS.CLASS_NAME);
|
||||
tx.join(bom);
|
||||
BizObject bo = bom.newObject();
|
||||
bo.setAttributeValue("EBANK_NUMBER", idArray[i]);
|
||||
bo.setAttributeValue("FLOW_NAME" ,"其它支付");
|
||||
bo.setAttributeValue("FLOWUNID" ,flowunid);
|
||||
bo.setAttributeValue("INPUTTIME", DateUtil.getDateTime(new Date()));
|
||||
bom.saveObject(bo);
|
||||
service.copyEbankInfo(tx, fromCondtion, null,otherProperty, ServiceOperatorEnum.FormalToTemp);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
failNmber++;
|
||||
}
|
||||
}
|
||||
if(failNmber==0){
|
||||
return "success";
|
||||
}
|
||||
if(failNmber==idArray.length){
|
||||
return "操作失败";
|
||||
}else{
|
||||
return "部分操作成功";
|
||||
}
|
||||
}
|
||||
public String deleteProcess(JBOTransaction tx){
|
||||
if(ebankNumbers!=null||"".equals(ebankNumbers)){
|
||||
|
||||
if(ebankNumbers.endsWith("@")){
|
||||
ebankNumbers = ebankNumbers.substring(0, ebankNumbers.length()-1);
|
||||
};
|
||||
String ebankNumber = ebankNumbers.replace("@", "','");
|
||||
try {
|
||||
SqlObject so = new SqlObject("delete from lc_ebank_process where ebank_number in ('"+ebankNumber+"')");
|
||||
Transaction.createTransaction(tx).executeSQL(so);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "error";
|
||||
}
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
public String getFlowunid() {
|
||||
return flowunid;
|
||||
}
|
||||
@ -89,7 +157,29 @@ public class OtherPayMethod {
|
||||
public void setServiceType(String serviceType) {
|
||||
this.serviceType = serviceType;
|
||||
}
|
||||
|
||||
|
||||
public String getIds() {
|
||||
return ids;
|
||||
}
|
||||
|
||||
public void setIds(String ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
public String getEbankNumbers() {
|
||||
return ebankNumbers;
|
||||
}
|
||||
|
||||
public void setEbankNumbers(String ebankNumbers) {
|
||||
this.ebankNumbers = ebankNumbers;
|
||||
}
|
||||
|
||||
public String getMayopeMoney() {
|
||||
return mayopeMoney;
|
||||
}
|
||||
|
||||
public void setMayopeMoney(String mayopeMoney) {
|
||||
this.mayopeMoney = mayopeMoney;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user