diff --git a/WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCEbankTemp.jsp b/WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCEbankTemp.jsp index 91a54be5a..c6091a20b 100644 --- a/WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCEbankTemp.jsp +++ b/WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCEbankTemp.jsp @@ -1,76 +1,120 @@ -<%@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"; - dwTemp.ReadOnly = "1"; - if("0040".equals(phaseNo)){ - dwTemp.ReadOnly = "0"; - } - if(!"ReadOnly".equals(rightType)){ - dwTemp.MultiSelect = true; - } - - 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"%> - +<%@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"); + + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + + dwTemp.Style="1"; + dwTemp.ShowSummary = "1"; + dwTemp.ReadOnly = "1"; + if("0010".equals(phaseNo)||"0040".equals(phaseNo)){ + dwTemp.ReadOnly = "0"; + } + if(!"ReadOnly".equals(rightType)){ + dwTemp.MultiSelect = true; + } + + 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",""}, + {"true","","Button","导出excel","导出excel","exportExcel()","","","","btn_icon_up",""} + }; + }else if("0040".equals(phaseNo)){ + sButtons = new String[][]{ + {"true","","Button","保存","保存","as_save(0)","","","","btn_icon_save",""}, + {"true","","Button","导出excel","导出excel","exportExcel()","","","","btn_icon_up",""} + }; + }else{ + sButtons = new String[][]{}; + } +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCSplittingPayTemp.jsp b/WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCSplittingPayTemp.jsp index 9aefbb8ee..d87eb3e5e 100644 --- a/WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCSplittingPayTemp.jsp +++ b/WebContent/Tenwa/Lease/Flow/Rent/RentReback/LCSplittingPayTemp.jsp @@ -1,75 +1,150 @@ -<%@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)){ - 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{ - sButtons = new String[][]{ - {"true","","Button","保存","保存","as_save(0)","","","","btn_icon_save",""}, - }; - } -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - +<%@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"); + + doTemp.setHtmlEvent("service_money", "onchange", "getSplittingMoney"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + + dwTemp.Style="1"; + dwTemp.ShowSummary = "1"; + if(!"ReadOnly".equals(rightType)){ + dwTemp.MultiSelect = true; + } + dwTemp.ReadOnly = "1"; + if("0010".equals(phaseNo)||"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",""}, + {"true","","Button","批量修改","批量修改","batchModify()","","","","btn_icon_detail",""}, + {"true","","Button","导出excel","导出excel","exportExcel()","","","","btn_icon_up",""} + }; + }else{ + sButtons = new String[][]{ + {"true","","Button","保存","保存","as_save(0)","","","","btn_icon_save",""}, + {"true","","Button","导出excel","导出excel","exportExcel()","","","","btn_icon_up",""} + }; + } +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src_tenwa/com/tenwa/lease/flow/rent/rentreback/OtherPayMethod.java b/src_tenwa/com/tenwa/lease/flow/rent/rentreback/OtherPayMethod.java index 1ad4bd559..7cf101f29 100644 --- a/src_tenwa/com/tenwa/lease/flow/rent/rentreback/OtherPayMethod.java +++ b/src_tenwa/com/tenwa/lease/flow/rent/rentreback/OtherPayMethod.java @@ -1,254 +1,255 @@ -package com.tenwa.lease.flow.rent.rentreback; - -import java.math.BigDecimal; -import java.sql.SQLException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import jbo.app.tenwa.calc.LC_EBANK_PROCESS; -import jbo.app.tenwa.calc.LC_RENT_INCOME; -import jbo.app.tenwa.calc.LC_RENT_PLAN; -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; -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 { - - private String flowunid; - private String planIDs; - private String interestSPs; - private String serviceType; - private String ids; - private String mayopeMoney; - private String ebankNumbers; - - - - public String createSplittingPayTemp(JBOTransaction tx) throws JBOException{ - BigDecimal ratio = null; - String[] planID = planIDs.split("@"); - String chargeWay = "AutoBuckle"; - for(int i=0;i fromCondtion = new HashMap(); - fromCondtion.put("id",idArray[i]); - Map otherProperty = new HashMap(); - 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); - 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 BigDecimal getRatio(JBOTransaction tx,String serviceType){ - SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd"); - String currentDate = df.format(new Date()); - BizObjectManager lm; - BigDecimal ratio = null; - 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); - String rate = boRatio.getAttribute("rate")==null?"0":boRatio.getAttribute("rate").toString(); - ratio = (new BigDecimal(rate)).divide(new BigDecimal("100"), 6, BigDecimal.ROUND_HALF_UP); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - return ratio; - } - public String getRatio(String serviceType){ - SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd"); - String currentDate = df.format(new Date()); - BizObjectManager lm; - String rate = null; - try { - lm = JBOFactory.getBizObjectManager(LPOUNDAGE_MAINTENANCE.CLASS_NAME); - 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")==null?"0":boRatio.getAttribute("rate").toString(); - - } catch (Exception e) { - e.printStackTrace(); - return null; - } - return rate; - } - 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; - } - - 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; - } - - - - - - - - -} +package com.tenwa.lease.flow.rent.rentreback; + +import java.math.BigDecimal; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import jbo.app.tenwa.calc.LC_EBANK_PROCESS; +import jbo.app.tenwa.calc.LC_RENT_INCOME; +import jbo.app.tenwa.calc.LC_RENT_PLAN; +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; +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 { + + private String flowunid; + private String planIDs; + private String interestSPs; + private String serviceType; + private String ids; + private String mayopeMoney; + private String ebankNumbers; + + + + public String createSplittingPayTemp(JBOTransaction tx) throws JBOException{ + BigDecimal ratio = null; + String[] planID = planIDs.split("@"); + String chargeWay = "AutoBuckle"; + for(int i=0;i fromCondtion = new HashMap(); + fromCondtion.put("id",idArray[i]); + Map otherProperty = new HashMap(); + 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); + 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 BigDecimal getRatio(JBOTransaction tx,String serviceType){ + SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd"); + String currentDate = df.format(new Date()); + BizObjectManager lm; + BigDecimal ratio = null; + 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); + String rate = boRatio.getAttribute("rate")==null?"0":boRatio.getAttribute("rate").toString(); + ratio = (new BigDecimal(rate)).divide(new BigDecimal("100"), 6, BigDecimal.ROUND_HALF_UP); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + return ratio; + } + public String getRatio(String serviceType){ + SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd"); + String currentDate = df.format(new Date()); + BizObjectManager lm; + String rate = null; + try { + lm = JBOFactory.getBizObjectManager(LPOUNDAGE_MAINTENANCE.CLASS_NAME); + 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")==null?"0":boRatio.getAttribute("rate").toString(); + + } catch (Exception e) { + e.printStackTrace(); + return null; + } + return rate; + } + 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; + } + + 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; + } + + + + + + + + +}