diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileDownloadImportInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileDownloadImportInfo.jsp new file mode 100644 index 000000000..a0684f0d6 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileDownloadImportInfo.jsp @@ -0,0 +1,27 @@ +<%@page import="com.itextpdf.text.log.SysoCounter"%> +<%@ page contentType="text/html; charset=GBK"%><%@ +include + file="/Frame/resources/include/include_begin_info.jspf"%> +<% + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileDownloadImportList.jsp"; + String sTempletNo = "li_Property_importS";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + dwTemp.ReadOnly = "0";//只读模式 + dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID")); + + String sButtons[][] = { + {"true", "All", "Button", "保存","保存所有修改", "saveRecord()", "", "", "", ""}, + }; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/TestList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileDownloadImportList.jsp similarity index 81% rename from WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/TestList.jsp rename to WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileDownloadImportList.jsp index 3e53134df..2f802389a 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/TestList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileDownloadImportList.jsp @@ -1,24 +1,18 @@ <%@ page contentType="text/html; charset=GBK"%> <%@ include file="/Frame/resources/include/include_begin_list.jspf"%> - - - - - - <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%> <% - String PG_TITLE = "本方信息"; // 浏览器窗口标题 PG_TITLE + String PG_TITLE = "文件下载"; // 浏览器窗口标题 PG_TITLE %> - <% ASObjectModel doTemp = new ASObjectModel("li_Property_import"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.MultiSelect = true; //多选 dwTemp.ReadOnly = "1"; //只读模式 dwTemp.setPageSize(30); - dwTemp.genHTMLObjectWindow("id"); + dwTemp.genHTMLObjectWindow(""); %> <%/*~END~*/%> @@ -34,10 +28,6 @@ }; %> <%/*~END~*/%> - - - - <%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%> <%@include file="/Frame/resources/include/ui/include_list.jspf"%> <%/*~END~*/%> @@ -52,13 +42,35 @@ diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Testinfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Testinfo.jsp deleted file mode 100644 index b40768c7f..000000000 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Testinfo.jsp +++ /dev/null @@ -1,26 +0,0 @@ -<%@page import="com.itextpdf.text.log.SysoCounter"%> -<%@ page contentType="text/html; charset=GBK"%><%@ -include - file="/Frame/resources/include/include_begin_info.jspf"%> -<% - //获得参数 - String id = CurPage.getParameter("id"); - if (id == null) - id = ""; - ASObjectModel doTemp = new ASObjectModel("li_Property_importS"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); - dwTemp.Style = "2"; //设置DW风格 1:Grid 2:Freeform - dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写 - dwTemp.genHTMLObjectWindow(""); - - String sButtons[][] = {{"true", "All", "Button", "保存","保存所有修改", "saveRecord()", "", "", "", ""},}; -%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> - -<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml index 1f3914ec8..dd6fbb525 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml @@ -5360,25 +5360,26 @@ - - + + - - - - - + + + + + + + + + - + - - - diff --git a/src_core/com/tenwa/officetempalte/importcallback/impl/FileDownloadCallBack.java b/src_core/com/tenwa/officetempalte/importcallback/impl/FileDownloadCallBack.java new file mode 100644 index 000000000..827117101 --- /dev/null +++ b/src_core/com/tenwa/officetempalte/importcallback/impl/FileDownloadCallBack.java @@ -0,0 +1,151 @@ +package com.tenwa.officetempalte.importcallback.impl; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import jbo.app.tenwa.calc.LC_EBANK; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; +import jbo.voucher.LB_DISCOUNT; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.Transaction; +import com.amarsoft.context.ASUser; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.officetempalte.importcallback.impl.BaseImportExcelCallBack; + +public class FileDownloadCallBack extends BaseImportExcelCallBack{ + + @Override + public void run(ASUser CurUser, BizObject importObject,Map model, Integer rowIndex, JBOTransaction tx,Transaction Sqlca) throws Exception { + + } + + /** + * 贴息文件校验 + */ + @Override + public void runBefore(ASUser CurUser, Map model, List importObjects, JBOTransaction tx,Transaction Sqlca) throws Exception { + /*// 错误描述 + String error=""; + // 用于判断是否错 + boolean flag = false; + + *//** + * 获取网银信息, 并将网银编号及可核销金额存入map集合 + *//* + // 存储网银可核销金额 + Map Ebank_Map =new HashMap(); + List list=JBOFactory.createBizObjectQuery(LC_EBANK.CLASS_NAME,null).getResultList(false); + for(int i=0;i map= new HashMap(); + // 存放本次导入唯一网银流水号 + List DisCountEbandList = new ArrayList(); + for(BizObject bo:importObjects){ + // 获取本次导入的网银编号 + String ebankSn = bo.getAttribute("EBAND_NO").getString(); + // 没有新新增, 有就把贴息金额相加, 没有就直接存 + double DISCOUNT_MONEY=Double.parseDouble(bo.getAttribute("DISCOUNT_MONEY").getString()); + if(!DisCountEbandList.contains(ebankSn)) { + DisCountEbandList.add(ebankSn); + map.put(ebankSn, DISCOUNT_MONEY); + }else { + Double old_money = map.get(ebankSn); + map.put(ebankSn, old_money+=DISCOUNT_MONEY); + } + } + // 判断网银金额是否大于等于贴息金额 + for(String ss : DisCountEbandList) { + double Ebank_money = Ebank_Map.get(ss); + double DISCOUNT_MONEY =map.get(ss); + if(DISCOUNT_MONEY>Ebank_money) { + error+=",【"+ss+"】"; + flag=true; + } + } + if(flag) { + error = error.substring(1); + throw new BusinessException("网银:"+error+"可核销金额小于贴息金额 !"); + } + + + *//** + * 将业务合同号增加到集合中 + *//* + // 用于校验合同号是否存在 + List contractNo = new ArrayList(); + // 经所有业务合同号存入集合 + List ConList=JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO.CLASS_NAME,null).getResultList(false); + for(int i=0;i DcontractNo = new ArrayList(); + ListDiscountList=JBOFactory.createBizObjectQuery(LB_DISCOUNT.CLASS_NAME,null).getResultList(false); + // 将贴息已有的合同号存入集合 + for(int i=0;i