From 2ccdd08b0b0bcb712fe0fe73f4e54aed98ba210b Mon Sep 17 00:00:00 2001 From: zhangbb Date: Fri, 14 Sep 2018 10:47:19 +0800 Subject: [PATCH 01/10] =?UTF-8?q?1.=E9=BB=98=E8=AE=A4=E8=BF=98=E6=AC=BE?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E6=94=B9=E4=B8=BA=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/etc/app/component/component-parameter-config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index 002bf0d1a..4f5d10941 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -19,7 +19,7 @@ - + From 6181b5e18131eb4fdaf380bf02aaaf5832a0e58c Mon Sep 17 00:00:00 2001 From: xiezhiwen Date: Fri, 14 Sep 2018 16:13:42 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=87=AD=E8=AF=81=E4=BD=A3=E9=87=91?= =?UTF-8?q?=E5=88=86=E5=BD=95=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreateVoucherCustomerRentOrFee.java | 1 - .../CreateVoucherToCommission.java | 4 - .../auxiliaryInfo/auxiliaryBusinessType.java | 18 +-- .../serviceImp/CreateVoucherServiceImpl.java | 7 + .../VoucherSysJointNCServiceImpl.java | 141 +++++++++++------- 5 files changed, 100 insertions(+), 71 deletions(-) diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java index 2bbcca50b..418c7dfe5 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java @@ -62,7 +62,6 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { } param.clear(); map.put("FLOWUNID", FlowUnid); - System.out.println(); List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherToCommission.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherToCommission.java index d4acef7a4..2160df90b 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherToCommission.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherToCommission.java @@ -128,7 +128,6 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { param.put("CUSTID",DISTRIBUTOR_ID); param.put("CUSTNAME",DISTRIBUTOR_NAME); param.put("CUSTOMERTYPE",CUSTOMERTYPE); - param.put("BUSINESSTYPE",BUSINESSTYPE); if("1".equals(BUSINESSTYPE)){ param.put("LEASFORMASSET", "04"); // 融资租赁资产 @@ -139,9 +138,6 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { param.put("LEASINCOMEFORM", "01"); // B端 } } - //param.put("FUNDTYPE", ""); // 主营类型 - param.put("BUSINESSTYPE", "06"); - param.put("FlowUnid", FlowUnid); map.clear(); map.put("PROJ_TYPE", leas_form); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryBusinessType.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryBusinessType.java index f55ed66b0..a8d706f08 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryBusinessType.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryBusinessType.java @@ -9,13 +9,13 @@ import com.tenwa.voucher.service.VoucherJavaParamService; public class auxiliaryBusinessType implements VoucherJavaParamService { -@Override -public Map getJavaParam(JBOTransaction tx, - Map param) throws BusinessException { - MapreturnValue=new HashMap(); - String PLAN_LIST=param.get("PLAN_LIST"); - returnValue.put("PLAN_LIST",PLAN_LIST); - - return returnValue; -} + @Override + public Map getJavaParam(JBOTransaction tx,Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String PLAN_LIST=param.get("PLAN_LIST"); + String BUSINESSTYPE=param.get("BUSINESSTYPE"); + returnValue.put("PLAN_LIST",PLAN_LIST); + returnValue.put("BUSINESSTYPE",BUSINESSTYPE); + return returnValue; + } } diff --git a/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java b/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java index 810147dcd..d2c67a35b 100644 --- a/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java +++ b/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java @@ -21,6 +21,7 @@ import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.lang.DataElement; import com.amarsoft.are.log.Log; import com.amarsoft.awe.Configure; import com.tenwa.comm.exception.BusinessException; @@ -293,6 +294,12 @@ public class CreateVoucherServiceImpl { subData.put("F6",sub.getAttribute("id").getString());//科目编码 subData.put("F1",dataTemp.get("ACCOUNT_DATE"));//会计处理日 String VOUCHERNO = param.get("VOUCHERNO"); + String sort = bo.getAttribute("SORT_NUMBER").getString(); + if("1".equals(sort)) { + param.put("BUSINESSTYPE", "9201"); + }else if("2".equals(sort)) { + param.put("BUSINESSTYPE", "92"); + } if("1".equals(bo.getAttribute("LOAN_DIRECTION").getString())){//借贷方向 subData.put("F7", dataTemp.get("MONEY"));//借方金额 subData.put("F8", "0");//贷方金额 diff --git a/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java b/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java index b39007fc0..b5aead4b3 100644 --- a/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java +++ b/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java @@ -15,6 +15,8 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.UUID; + import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; @@ -56,10 +58,15 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { Transaction Sqlca = null; Sqlca = Transaction.createTransaction(tx); Map map = new HashMap(); + // 获取vi_voucher_v8视图中的数据 List> list= getDataList(Sqlca);// 获取所有凭证编号 + // 生成凭证信息xml文件 DOM4JcreateToVoucher(Sqlca,list,map); + // 生成客户信息xml文件 DOM4JcreateToCustomer(Sqlca); + // 生成经销商信息xml文件 DOM4JcreateToSupplier(Sqlca); + // 生成辅助合同信息xml文件 DOM4JcreateToDefdoc(Sqlca,list,map); tx.commit(); } catch (Exception e) { @@ -82,8 +89,6 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { } /** * 获取数据库凭证信息表所有的待传F3凭证编号 - * @param tx - * @return * @throws Exception */ private static List> getDataList(JBOTransaction tx) throws Exception{ @@ -97,29 +102,34 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { * @throws Exception */ private static void DOM4JcreateToVoucher(Transaction Sqlca,List>list, Map map) throws Exception { + // 本地xml存放文件夹, 没有就创建 File file2 = new File("D:\\voucherXml_NC"); - if (!file2.exists()) { - file2.mkdirs(); - } - Document document=null; - File file=null; - XMLWriter writer=null; - String SUBJECT_ID=null; - String OWNED_COMPANY = null; - String ACC_YEAR = null; - String ACC_MONTH = null; - String VOUCHING_PERSON = null; - Date time = new Date(); // 获取当前时间对象, 并格式化 - SimpleDateFormat formatter1 = new SimpleDateFormat("yyyyMMddHHmmss"); - String year_month_day = formatter1.format(time); // 年月日 - String timeAll = ""; - int a = list.size(); // 获取凭证编号的长度 - int b=1000; // 设置当前xml生成的条数 - int c = (int)(a / b); // 获取循环次数, 最大循环值=c+1 - for (int i = 0; i <=c; i++) { // 外围循环/ 决定生成几个xml - document = DocumentHelper.createDocument(); // 生成每个xml的头 - Element root = document.addElement("ufinterface"); - root.addAttribute("account", "0001"); + if (!file2.exists()) {file2.mkdirs();}// 判断是否存在, 如果不存在就创建该文件夹 + // 定义全局对象 + Document document=null; // xml文件头 + File file=null; // 生成的xml文件路径 + XMLWriter writer=null; // 输出对象 + String str=""; // xml主键id + String SUBJECT_ID=null; // 获取科目id + String OWNED_COMPANY = null; // 所属公司 + String ACC_YEAR = null; // 会计期间/年 + String ACC_MONTH = null; // 会计期间/月 + String tableName="VOUCHER_V8"; // 表名 + String flag="V8_FLAG"; // 状态名 + String xmlId=""; // xml的id字段名 + String updSql=""; // 定义更新语句对象 + SqlObject sql; // sqlObject对象 + Date time = new Date(); // 获取当前时间对象, 并格式化 + SimpleDateFormat formatter1 = new SimpleDateFormat("yyyyMMddHHmmss");// 年月日时分秒 + String year_month_day = formatter1.format(time); // 年月日时分秒 + String timeAll = ""; // 制单日期 + int a = list.size(); // v8视图总数据量/ xml中生成的总条数 + int b=1000; // 设置当前xml生成的条数 + int c = (int)(a / b); // 获取生成xml文件的数量, 最大循环值=c+1 + for (int i = 0; i <=c; i++) { + document = DocumentHelper.createDocument(); // 创建Document对象 + Element root = document.addElement("ufinterface"); // 设置xml头 + root.addAttribute("account", "0001"); // 设置xml头属性 root.addAttribute("billtype", "vouchergl"); root.addAttribute("businessunitcode", "develop"); root.addAttribute("filename", ""); @@ -130,7 +140,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { root.addAttribute("replace", "Y"); root.addAttribute("roottag", ""); root.addAttribute("sender", "001"); - for (int x = i * b; x < (i + 1) * b && x < a; x++) {// 决定当前xml生成的数据量 + for (int x = i * b; x < (i + 1) * b && x < a; x++) { // 决定当前xml生成的数据量 // 获取凭证编号 String F3=list.get(x).get("F3"); map.clear(); @@ -144,18 +154,17 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { // 获取v8表公共信息 for (Map map2 : v2) { - OWNED_COMPANY=map2.get("f49");//本方id - ACC_YEAR = map2.get("f51");// 会计期间/年 - ACC_MONTH =map2.get("f52");// 会计期间/月 - VOUCHING_PERSON =map2.get("f12");// 制单人 - timeAll =map2.get("f15");// 制单时间 + OWNED_COMPANY=map2.get("f49"); // 本方id + ACC_YEAR = map2.get("f51"); // 会计期间/年 + ACC_MONTH =map2.get("f52"); // 会计期间/月 + timeAll =map2.get("f15"); // 制单时间 } BizObject own = JBOFactory.createBizObjectQuery(OWN_INFO.CLASS_NAME, "id=:OWNED_COMPANY").setParameter("OWNED_COMPANY", OWNED_COMPANY).getSingleResult(false); Element voucher = root.addElement("voucher"); Element voucherHead = voucher.addElement("voucher_head"); Element pkVoucher = voucherHead.addElement("pk_voucher");// 凭证主键/非空 - //pkVoucher.setText(list.get(x).get("ID").toString()); - pkVoucher.setText((x+1)+"凭证主键 如果没有那就是新增,有就是修改 可空"); + str=UUID.randomUUID().toString().replace("-", ""); + pkVoucher.setText(str); Element pk_vouchertype = voucherHead.addElement("pk_vouchertype");// 凭证类别, 默认01/非空 pk_vouchertype.setText("1");//---------------------------------------------------------------------- Element year = voucherHead.addElement("year");// 会计年度/非空 @@ -405,14 +414,18 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { Element pk_innercorp2 = cashflowitem2.addElement("pk_innercorp");// 内部单位主键,最大长度为64,类型为:String pk_innercorp2.setText(""); } + // 执行update操作, 将生成的xml标签id存入v8表 + /*updSql="UPDATE "+tableName+" SET xmlId='"+str+"' WHERE F3 ='"+F3+"' "; + sql = new SqlObject(updSql); + Sqlca.executeSQL(sql);*/ } - String URL="D:\\voucherXml_NC\\APleasing_VOUCHER_"+year_month_day+".xml"; + String URL="data\\files\\apzl_leasing\\tmp\\XZW\\APleasing_VOUCHER_"+year_month_day+".xml"; file=new File(URL); writer = new XMLWriter(new FileOutputStream(file), OutputFormat.createPrettyPrint()); writer.setEscapeText(false);// 字符是否转义,默认true writer.write(document); writer.close(); - InterActionToNC(Sqlca,URL); + InterActionToNC(Sqlca,URL,tableName,flag,xmlId); } } /** @@ -421,25 +434,28 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { * @throws Exception */ private static void DOM4JcreateToCustomer(Transaction Sqlca) throws Exception{ + // 判断该文件夹是否存在, 如果不存在就创建 File file2 = new File("D:\\voucherXml_NC"); - if(file2==null || "".equals(file2)) { - file2.mkdirs();//创建父文件夹 - } + if(file2.exists()) {file2.mkdirs();} // 定义全局对象 - File file=null; - XMLWriter writer=null; - // 获取当前时间对象, 并格式化 - Date time = new Date(); + // 生成xml的路劲 + File file=null; + // 输出对象 + XMLWriter writer=null; + // 表名 + String tableName="CUSTOMER_INFO"; + // 状态字段 + String flag="FLAG"; + // xml传输id字段 + String xmlId=""; + // 获取时间对象, 格式为--年月日时分秒 SimpleDateFormat formatter1 = new SimpleDateFormat("yyyyMMddHHmmss"); - // 年月日 - String year_month_day = formatter1.format(time); - String cust_id=""; - String updateSql=""; + String year_month_day = formatter1.format(new Date()); String customer_num=""; String customername=""; String customertype=""; // 查询未传入客户信息 - String sql="SELECT customer_num,customername,customertype,customerid FROM CUSTOMER_INFO WHERE (FLAG='' OR FLAG IS NULL)"; + String sql="SELECT customer_num,customername,customertype,customerid FROM CUSTOMER_INFO WHERE FLAG <>'1' "; List> rs = DataOperatorUtil.getDataBySql(Sqlca,sql,null); // 客户xml头 Document document= DocumentHelper.createDocument(); // 生成每个xml的头 @@ -715,13 +731,13 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { SqlObject updSql=new SqlObject(updateSql); Sqlca.executeSQL(updSql);*/ } - String URL="D:\\voucherXml_NC\\APleasing_Customer_"+year_month_day+".xml"; + String URL="data\\files\\apzl_leasing\\tmp\\XZW\\APleasing_Customer_"+year_month_day+".xml"; file=new File(URL); writer = new XMLWriter(new FileOutputStream(file), OutputFormat.createPrettyPrint()); writer.setEscapeText(false);// 字符是否转义,默认true writer.write(document); writer.close(); - InterActionToNC(Sqlca,URL); + InterActionToNC(Sqlca,URL,tableName,flag,xmlId); } /** * 供应商信息xml生成, 每1000条生成一个xml @@ -735,6 +751,9 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { } File file = null; XMLWriter writer = null; + String tableName="DISTRIBUTOR_INFO";// 表名 + String flag="FLAG"; // 状态名 + String xmlId=""; // xml传输id String DISTRIBUTOR_NAME = ""; // 经销商名称 String DISTRIBUTOR_CODING = ""; // 经销商id String DISTRIBUTOR_ADDRESS=""; // 地区编码 @@ -770,7 +789,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { root.addAttribute("replace", "Y"); root.addAttribute("roottag", ""); root.addAttribute("sender", "001"); - String sql="SELECT DISTRIBUTOR_NAME,DISTRIBUTOR_CODING,DISTRIBUTOR_ADDRESS,FACT_ADDR,PROVINCES,POSTCODE,REGISTERED_ADDR,BUSINESS_SCOPE,SUBSIDIARY_COMPANY,TYPE,BUSINESS_LICENSE_NO,DISTRIBUTOR_STATUS,E_MAIL,FAX_NUMBER,REGISTERED_ASSET,DISTRIBUTORER,MBAFC_EARLYDISBURSEMENT_TYPE,URL,FLAG FROM DISTRIBUTOR_INFO WHERE (FLAG='' OR FLAG IS NULL)"; + String sql="SELECT DISTRIBUTOR_NAME,DISTRIBUTOR_CODING,DISTRIBUTOR_ADDRESS,FACT_ADDR,PROVINCES,POSTCODE,REGISTERED_ADDR,BUSINESS_SCOPE,SUBSIDIARY_COMPANY,TYPE,BUSINESS_LICENSE_NO,DISTRIBUTOR_STATUS,E_MAIL,FAX_NUMBER,REGISTERED_ASSET,DISTRIBUTORER,MBAFC_EARLYDISBURSEMENT_TYPE,URL,FLAG FROM DISTRIBUTOR_INFO WHERE FLAG<>'1'"; List> rs = DataOperatorUtil.getDataBySql(Sqlca,sql,null); for(int i=0; i>list, Map map) throws Exception{ Document document=null; File file=null; XMLWriter writer=null; + String tableName="VOUCHER_V8";// 表名 + String flag="V8_FLAG"; // 状态名 + String xmlId=""; // xml传输id Date time = new Date(); // 获取当前时间对象, 并格式化 File file2 = new File("D:\\voucherXml_NC"); if(file2==null || "".equals(file2)) { @@ -990,20 +1017,20 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { Element memo = billhead.addElement("memo");// 备注,最大长度为200,类型为:String memo.setText(""); } - String URL="D:\\voucherXml_NC\\APleasing_Defdoc_"+year_month_day+".xml"; + String URL="data\\files\\apzl_leasing\\tmp\\XZW\\APleasing_Defdoc_"+year_month_day+".xml"; file=new File(URL); writer = new XMLWriter(new FileOutputStream(file), OutputFormat.createPrettyPrint()); writer.setEscapeText(false);// 字符是否转义,默认true writer.write(document); writer.close(); - InterActionToNC(Sqlca,URL); + InterActionToNC(Sqlca,URL,tableName,flag,xmlId); } } /** * 像NC传输xml, 获取NC回执xml信息, 根据回执信息更改状态 */ - public static void InterActionToNC(Transaction Sqlca,String OutURL) { + public static void InterActionToNC(Transaction Sqlca,String inputURL,String tableName,String flag,String xmlId) { try { // 定义全局变量 String sql=""; @@ -1022,7 +1049,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { /** * 读取本地生成的xml, 传输到NC */ - File file = new File(OutURL); + File file = new File(inputURL); BufferedOutputStream out = new BufferedOutputStream(connection.getOutputStream()); BufferedInputStream input = new BufferedInputStream(new FileInputStream(file)); int length; @@ -1080,7 +1107,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { }else if(resSuc.equals("Y")){ System.out.println("导入成功"); //接下来的代码,修改状态 - sql="UPDATE 表名 set 字段 = '1' WHERE 状态字段 <> '1'"; + sql="UPDATE tableName set flag = '1' WHERE flag <> '1'"; updSql = new SqlObject(sql); Sqlca.executeSQL(updSql); List list1 = root.elements(); @@ -1090,7 +1117,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { resultcode = el.element("resultcode").getStringValue(); if(!"1".equals(resultcode)) { bdocid = el.element("bdocid").getStringValue(); - sql=" UPDATE 表名 SET 字段='"+resultcode+"' WHERE 标签id='"+bdocid+"' "; + sql=" UPDATE tableName SET flag='"+resultcode+"' WHERE xmlId='"+bdocid+"' "; updSql = new SqlObject(sql); Sqlca.executeSQL(updSql); } From 50bbffd93eab28afc3d7a812c626d8bb7d5b38b9 Mon Sep 17 00:00:00 2001 From: xiezhiwen Date: Fri, 14 Sep 2018 16:15:54 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=87=AD=E8=AF=81=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceImp/VoucherSysJointNCServiceImpl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java b/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java index b5aead4b3..f9dbadb23 100644 --- a/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java +++ b/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java @@ -103,8 +103,8 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { */ private static void DOM4JcreateToVoucher(Transaction Sqlca,List>list, Map map) throws Exception { // 本地xml存放文件夹, 没有就创建 - File file2 = new File("D:\\voucherXml_NC"); - if (!file2.exists()) {file2.mkdirs();}// 判断是否存在, 如果不存在就创建该文件夹 + //File file2 = new File("D:\\voucherXml_NC"); + //if (!file2.exists()) {file2.mkdirs();}// 判断是否存在, 如果不存在就创建该文件夹 // 定义全局对象 Document document=null; // xml文件头 File file=null; // 生成的xml文件路径 @@ -435,8 +435,8 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { */ private static void DOM4JcreateToCustomer(Transaction Sqlca) throws Exception{ // 判断该文件夹是否存在, 如果不存在就创建 - File file2 = new File("D:\\voucherXml_NC"); - if(file2.exists()) {file2.mkdirs();} + //File file2 = new File("D:\\voucherXml_NC"); + //if(file2.exists()) {file2.mkdirs();} // 定义全局对象 // 生成xml的路劲 File file=null; @@ -745,10 +745,10 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { * @throws Exception */ private static void DOM4JcreateToSupplier(Transaction Sqlca) throws Exception{ - File file2 = new File("D:\\voucherXml_NC"); - if(file2==null || "".equals(file2)) { - file2.mkdirs();//创建父文件夹 - } + //File file2 = new File("D:\\voucherXml_NC"); + //if(file2==null || "".equals(file2)) { + // file2.mkdirs();//创建父文件夹 + //} File file = null; XMLWriter writer = null; String tableName="DISTRIBUTOR_INFO";// 表名 From 0212932d85afcb2dd245f995d92221f59b641871 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Fri, 14 Sep 2018 16:53:01 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AdjustInterest/TodoAdjustInterestList.jsp | 19 +++++++++++++++++-- .../LCAdjustContractRollBack.jsp | 18 +++++++++++++++++- .../ContractEnd/ContractEndApplyList.jsp | 12 +++++++++++- .../ContractOnhireChangeApplyList.jsp | 2 +- ...TriditionContractOnhireChangeApplyList.jsp | 12 +++++++++++- .../TraditionContractTerminateApplyList.jsp | 12 +++++++++++- .../CustomerFamilyJoinTempInfo.jsp | 7 +++++++ .../Flow/Rent/RentIncome/VILCRentPlanList.jsp | 18 +++++++++++++++++- 8 files changed, 92 insertions(+), 8 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/AdjustInterest/TodoAdjustInterestList.jsp b/WebContent/Tenwa/Lease/Flow/AdjustInterest/TodoAdjustInterestList.jsp index 2d3b33e3b..7d794835b 100644 --- a/WebContent/Tenwa/Lease/Flow/AdjustInterest/TodoAdjustInterestList.jsp +++ b/WebContent/Tenwa/Lease/Flow/AdjustInterest/TodoAdjustInterestList.jsp @@ -7,16 +7,31 @@ */ String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 + String applytype = CurPage.getParameter("ApplyType"); String ishistory=CurPage.getParameter("IsHistory"); String RightType=CurPage.getParameter("RightType"); ASObjectModel doTemp = new ASObjectModel("TodoAdjustInterestList"); - + //判断业务类型 + String businessType=""; + String orgId=CurUser.getOrgID().substring(0,7); + if("AdjustInterestCarApply".equals(applytype)){ + businessType="1"; + }else{ + if("8009010".equals(orgId)){ + businessType="2"; + }else if("8009011".equals(orgId)){ + businessType="3"; + }else{ + businessType=""; + } + } + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.MultiSelect = true; dwTemp.Style="1"; //--设置为Grid风格-- dwTemp.ReadOnly = "1"; //只读模式 dwTemp.setPageSize(10); - dwTemp.genHTMLObjectWindow(sFlowUnid+","+sFlowUnid); + dwTemp.genHTMLObjectWindow(businessType+","+sFlowUnid+","+sFlowUnid); if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ isShowButton=false; } diff --git a/WebContent/Tenwa/Lease/Flow/AdjustRollBack/LCAdjustContractRollBack.jsp b/WebContent/Tenwa/Lease/Flow/AdjustRollBack/LCAdjustContractRollBack.jsp index d3bace029..aef322c7f 100644 --- a/WebContent/Tenwa/Lease/Flow/AdjustRollBack/LCAdjustContractRollBack.jsp +++ b/WebContent/Tenwa/Lease/Flow/AdjustRollBack/LCAdjustContractRollBack.jsp @@ -6,18 +6,34 @@ History Log: */ String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 + String applytype = CurPage.getParameter("ApplyType"); String ishistory=CurPage.getParameter("IsHistory"); String RightType=CurPage.getParameter("RightType"); ASObjectModel doTemp = new ASObjectModel("LCAdjustContractRoll"); if(null!=ishistory&&ishistory.equals("true")){ doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory");//如果是历史则新显示历史数据 } + //判断业务类型 + String businessType=""; + String orgId=CurUser.getOrgID().substring(0,7); + if("AdjustRollBackApply".equals(applytype)){ + businessType="1"; + }else{ + if("8009010".equals(orgId)){ + businessType="2"; + }else if("8009011".equals(orgId)){ + businessType="3"; + }else{ + businessType=""; + } + } + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.MultiSelect = true; dwTemp.Style="1"; //--设置为Grid风格-- dwTemp.ReadOnly = "1"; //只读模式 dwTemp.setPageSize(10); - dwTemp.genHTMLObjectWindow(sFlowUnid); + dwTemp.genHTMLObjectWindow(sFlowUnid+","+businessType); if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ isShowButton=false; } diff --git a/WebContent/Tenwa/Lease/Flow/Contract/ContractEnd/ContractEndApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/ContractEnd/ContractEndApplyList.jsp index 9e94cc142..e0dc21e30 100644 --- a/WebContent/Tenwa/Lease/Flow/Contract/ContractEnd/ContractEndApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Contract/ContractEnd/ContractEndApplyList.jsp @@ -5,7 +5,17 @@ /*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/ function newApply() { - AsDialog.OpenSelector("SelectContractForEnd","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ + var orgId="<%=CurUser.getOrgID()%>".substring(0,7); + var businessType=""; + if(orgId=="8009010"){ + businessType="2"; + }else if(orgId=="8009011"){ + businessType="3"; + }else{ + alert("当前用户不能发起申请!"); + return; + } + AsDialog.OpenSelector("SelectContractForEnd","businessType,"+businessType,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){ //alert(getHtmlMessage('1'));//请选择一条信息! return; diff --git a/WebContent/Tenwa/Lease/Flow/Contract/ContractOnhireChange/ContractOnhireChangeApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/ContractOnhireChange/ContractOnhireChangeApplyList.jsp index 20e8473d5..a1890dbb3 100644 --- a/WebContent/Tenwa/Lease/Flow/Contract/ContractOnhireChange/ContractOnhireChangeApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Contract/ContractOnhireChange/ContractOnhireChangeApplyList.jsp @@ -5,7 +5,7 @@ /*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/ function newApply() { - AsDialog.OpenSelector("TriditionselectContractOnhireChange","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ + AsDialog.OpenSelector("selectContractOnhireChange","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){ //alert(getHtmlMessage('1'));//请选择一条信息! return; diff --git a/WebContent/Tenwa/Lease/Flow/Contract/ContractOnhireChange/TriditionContractOnhireChangeApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/ContractOnhireChange/TriditionContractOnhireChangeApplyList.jsp index 20e8473d5..1d1642861 100644 --- a/WebContent/Tenwa/Lease/Flow/Contract/ContractOnhireChange/TriditionContractOnhireChangeApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Contract/ContractOnhireChange/TriditionContractOnhireChangeApplyList.jsp @@ -5,7 +5,17 @@ /*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/ function newApply() { - AsDialog.OpenSelector("TriditionselectContractOnhireChange","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ + var orgId="<%=CurUser.getOrgID()%>".substring(0,7); + var businessType=""; + if(orgId=="8009010"){ + businessType="2"; + }else if(orgId=="8009011"){ + businessType="3"; + }else{ + alert("当前用户不能发起申请!"); + return; + } + AsDialog.OpenSelector("TriditionselectContractOnhireChange","businessType,"+businessType,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){ //alert(getHtmlMessage('1'));//请选择一条信息! return; diff --git a/WebContent/Tenwa/Lease/Flow/Contract/TraditionContractTerminate/TraditionContractTerminateApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/TraditionContractTerminate/TraditionContractTerminateApplyList.jsp index c2a8ffb82..041716859 100644 --- a/WebContent/Tenwa/Lease/Flow/Contract/TraditionContractTerminate/TraditionContractTerminateApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Contract/TraditionContractTerminate/TraditionContractTerminateApplyList.jsp @@ -5,7 +5,17 @@ /*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/ function newApply() { - AsDialog.OpenSelector("selectTraditionContractPaymentPlanTerminate","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ + var orgId="<%=CurUser.getOrgID()%>".substring(0,7); + var businessType=""; + if(orgId=="8009010"){ + businessType="2"; + }else if(orgId=="8009011"){ + businessType="3"; + }else{ + alert("当前用户不能发起申请!"); + return; + } + AsDialog.OpenSelector("selectTraditionContractPaymentPlanTerminate","businessType,"+businessType,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){ //alert(getHtmlMessage('1'));//请选择一条信息! return; diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp index 2db3c0922..6df1d4837 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp @@ -205,6 +205,13 @@ if(!checkCertidRepeat()){ return; } + var assurerelation = getItemValue(0,0,"ASSURE_RELATION"); + if(assurerelation.length>10){ + setErrorTips("ASSURE_RELATION","关系输入过长!!"); + return; + }else{ + setErrorTips("ASSURE_RELATION",""); + } /*var ID = getItemValue(0,getRow(0),'ID'); if("undefined"==ID||""==ID || null==ID){ AsDebug.showMessage("提示","请选中一条数据!","","",true); diff --git a/WebContent/Tenwa/Lease/Flow/Rent/RentIncome/VILCRentPlanList.jsp b/WebContent/Tenwa/Lease/Flow/Rent/RentIncome/VILCRentPlanList.jsp index 84e85b93d..4a8870eb1 100644 --- a/WebContent/Tenwa/Lease/Flow/Rent/RentIncome/VILCRentPlanList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Rent/RentIncome/VILCRentPlanList.jsp @@ -5,9 +5,25 @@ String flowunid = CurPage.getParameter("FlowUnid"); String rightType = CurPage.getParameter("RightType"); + String applytype = CurPage.getParameter("ApplyType"); String factDate = JBOFactory.createBizObjectQuery(LC_EBANK_TEMP.CLASS_NAME, "flowunid=:flowunid") .setParameter("flowunid", flowunid).getSingleResult(false).getAttribute("FACT_DATE").getString(); CurPage.setAttribute("fact_date", factDate); + + //判断业务类型 + String businessType=""; + String orgId=CurUser.getOrgID().substring(0,7); + if("FundCollectionApply".equals(applytype)){ + businessType="1"; + }else{ + if("8009010".equals(orgId)){ + businessType="2"; + }else if("8009011".equals(orgId)){ + businessType="3"; + }else{ + businessType=""; + } + } ASObjectModel doTemp = new ASObjectModel("VILCRentPlanList"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--设置为Grid风格-- @@ -16,7 +32,7 @@ dwTemp.MultiSelect = true; } dwTemp.setPageSize(10); - dwTemp.genHTMLObjectWindow(factDate); + dwTemp.genHTMLObjectWindow(businessType+","+factDate); //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 String sButtons[][] = { From dc7d67f71682e1287b932eaa4f8166f6839ae2af Mon Sep 17 00:00:00 2001 From: zhangjun Date: Fri, 14 Sep 2018 17:56:36 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E5=87=AD=E8=AF=81=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=EF=BC=8C=E5=87=AD=E8=AF=81=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../voucher/serviceImp/VoucherSysJointNCServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java b/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java index f9dbadb23..1f4bec6d4 100644 --- a/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java +++ b/src_core/com/tenwa/voucher/serviceImp/VoucherSysJointNCServiceImpl.java @@ -419,7 +419,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { sql = new SqlObject(updSql); Sqlca.executeSQL(sql);*/ } - String URL="data\\files\\apzl_leasing\\tmp\\XZW\\APleasing_VOUCHER_"+year_month_day+".xml"; + String URL="//data//files//apzl_leasing//tmp//XZW//APleasing_VOUCHER_"+year_month_day+".xml"; file=new File(URL); writer = new XMLWriter(new FileOutputStream(file), OutputFormat.createPrettyPrint()); writer.setEscapeText(false);// 字符是否转义,默认true @@ -731,7 +731,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { SqlObject updSql=new SqlObject(updateSql); Sqlca.executeSQL(updSql);*/ } - String URL="data\\files\\apzl_leasing\\tmp\\XZW\\APleasing_Customer_"+year_month_day+".xml"; + String URL="//data//files//apzl_leasing//tmp//XZW//APleasing_Customer_"+year_month_day+".xml"; file=new File(URL); writer = new XMLWriter(new FileOutputStream(file), OutputFormat.createPrettyPrint()); writer.setEscapeText(false);// 字符是否转义,默认true @@ -939,7 +939,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { Sqlca.executeSQL(updSql);*/ } //String f="D:\\voucherXml_NC\\APleasing_Supplier_"+year_month_day+".xml"; - String f="data\\files\\apzl_leasing\\tmp\\XZW\\APleasing_Supplier_"+year_month_day+".xml"; + String f="//data//files//apzl_leasing//tmp//XZW//APleasing_Supplier_"+year_month_day+".xml"; file=new File(f); writer = new XMLWriter(new FileOutputStream(file), OutputFormat.createPrettyPrint()); writer.setEscapeText(false);// 字符是否转义,默认true @@ -1017,7 +1017,7 @@ public class VoucherSysJointNCServiceImpl implements VoucherSysJointNCService { Element memo = billhead.addElement("memo");// 备注,最大长度为200,类型为:String memo.setText(""); } - String URL="data\\files\\apzl_leasing\\tmp\\XZW\\APleasing_Defdoc_"+year_month_day+".xml"; + String URL="//data//files//apzl_leasing//tmp//XZW//APleasing_Defdoc_"+year_month_day+".xml"; file=new File(URL); writer = new XMLWriter(new FileOutputStream(file), OutputFormat.createPrettyPrint()); writer.setEscapeText(false);// 字符是否转义,默认true From 913dec001494ccf9c06b1d46f3b523d26c86b3ad Mon Sep 17 00:00:00 2001 From: liuzhao Date: Sun, 16 Sep 2018 10:22:19 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=8F=91=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Apzl/InvoiceManager/InvoiceRentDirect.jsp | 6 +- .../InvoiceManager/InvoiceRentPlanConfirm.jsp | 2 +- .../ConfirmInvoice/InvoiceConfirmList.jsp | 49 +- .../servlet/InvoiceDownloadServlet.java | 24 +- .../servlet/InvoiceLotDownloadServlet.java | 136 ++ .../com/tenwa/app/invoice/utils/FileCopy.java | 21 + .../app/invoice/utils/FilesToZipUtils.java | 128 ++ .../rentPlanInvoiceDirectManager.java | 4 +- .../rentPlanInvoiceManager.java | 1236 ++++++++++------- 9 files changed, 1079 insertions(+), 527 deletions(-) create mode 100644 src_invoice/com/tenwa/app/invoice/servlet/InvoiceLotDownloadServlet.java create mode 100644 src_invoice/com/tenwa/app/invoice/utils/FileCopy.java create mode 100644 src_invoice/com/tenwa/app/invoice/utils/FilesToZipUtils.java diff --git a/WebContent/Tenwa/Apzl/InvoiceManager/InvoiceRentDirect.jsp b/WebContent/Tenwa/Apzl/InvoiceManager/InvoiceRentDirect.jsp index 5bf3e3381..2531312d9 100644 --- a/WebContent/Tenwa/Apzl/InvoiceManager/InvoiceRentDirect.jsp +++ b/WebContent/Tenwa/Apzl/InvoiceManager/InvoiceRentDirect.jsp @@ -34,13 +34,9 @@ var planIds = ""; for(var i = 0;i < sParm.length; i++){ - //if(planIds.length == 0){ - //planIds += sParm[i] +"@"; - //}else{ planIds += sParm[i] +"@"; - //} } - //alert(planIds); + planIds = planIds.substr(0,planIds.length-1); //alert(planIds); spara = "planIds="+planIds+",CurUserID=<%=CurUser.getUserID()%>"; diff --git a/WebContent/Tenwa/Apzl/InvoiceManager/InvoiceRentPlanConfirm.jsp b/WebContent/Tenwa/Apzl/InvoiceManager/InvoiceRentPlanConfirm.jsp index ab9deaf04..7d4d0f3b8 100644 --- a/WebContent/Tenwa/Apzl/InvoiceManager/InvoiceRentPlanConfirm.jsp +++ b/WebContent/Tenwa/Apzl/InvoiceManager/InvoiceRentPlanConfirm.jsp @@ -24,7 +24,7 @@ %><%@include file="/Frame/resources/include/ui/include_list.jspf"%>