From d6e2d94c191469ffa058228510640c0ba106d053 Mon Sep 17 00:00:00 2001 From: liuzhao Date: Wed, 10 Oct 2018 15:18:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E6=9C=AC=E6=96=B9=E9=93=B6=E8=A1=8C=E8=B4=A6=E5=8F=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backRentPrintInvoiceManager.java | 26 ++++-- .../rentPlanInvoiceDirectManager.java | 64 ++++++++++----- .../rentPlanInvoiceManager.java | 80 ++++++++----------- 3 files changed, 100 insertions(+), 70 deletions(-) diff --git a/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/backRentPrintInvoiceManager.java b/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/backRentPrintInvoiceManager.java index 700f067b9..73cd8985a 100644 --- a/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/backRentPrintInvoiceManager.java +++ b/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/backRentPrintInvoiceManager.java @@ -309,7 +309,7 @@ public class backRentPrintInvoiceManager extends BaseTable { */ public String invoiceConfirmSubmit(JBOTransaction tx) throws Exception { Transaction Sqlca = null; - BizObjectManager ownAccountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); + /*BizObjectManager ownAccountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); BizObject ownAccount = ownAccountManager .createQuery("state_=:state and acc_type=:acc_type and money_type=:money_type and account_type=:account_type") .setParameter("state", "0010").setParameter("acc_type", "0010") @@ -317,7 +317,7 @@ public class backRentPrintInvoiceManager extends BaseTable { .setParameter("account_type", "invoice").getSingleResult(false); if (ownAccount == null || "".equals(ownAccount)) { return "ÄúµÄ±¾·½ÒøÐÐÕË»§Îª¿Õ£¡"; - } + }*/ String[] rentInvoiceids = this.getIds().split("@"); List rentPlanIdList = new ArrayList(); @@ -327,12 +327,28 @@ public class backRentPrintInvoiceManager extends BaseTable { String customerid = ""; String customerName = ""; + String xhdwyhzh = ""; + String xhdwdzdh = ""; + String rentPlanstr = StringUtils.join(rentPlanIdList.toArray(), ","); BizObjectManager invoiceManager = JBOFactory.getBizObjectManager(VI_INVOICE_RENT_CONFIRM_PRINT.CLASS_NAME); @SuppressWarnings("unchecked") List checkInvoiceList = (List) invoiceManager.createQuery("SELECT O.contract_id,O.customer_name,O.CUSTOMER_ID FROM O WHERE O.id IN (" + rentPlanstr + ") GROUP BY O.contract_id").getResultList(false); for (BizObject bizObject : checkInvoiceList) { String contract_id = bizObject.getAttribute("contract_id").toString(); + + //²éѯ±¾·½ÒøÐÐÕ˺ź͵ØÖ·µç»° + BizObject rentIncome = JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_RENT_INCOME", "SELECT O.own_number,oi.lease_tel FROM lc_rent_income O LEFT JOIN own_info oi ON O.own_account=oi.own_name WHERE O.contract_id =:contract_id GROUP BY O.contract_id") + .setParameter("contract_id", contract_id).getSingleResult(false); + if(rentIncome==null){ + return "ÄúµÄ±¾·½ÒøÐÐÕË»§Îª¿Õ£¡"; + }else{ + //±¾·½ÒøÐÐÕ˺Š+ xhdwyhzh = rentIncome.getAttribute("own_number")==null? "" : rentIncome.getAttribute("own_number").toString(); + //µØÖ·µç»° + xhdwdzdh = rentIncome.getAttribute("lease_tel")==null? "" : rentIncome.getAttribute("lease_tel").toString(); + } + customerid = bizObject.getAttribute("CUSTOMER_ID").toString(); customerName = bizObject.getAttribute("customer_name").toString(); @@ -464,11 +480,11 @@ public class backRentPrintInvoiceManager extends BaseTable { tx.join(confirmManager); BizObject confirmBizObject = confirmManager.newObject(); - String ownId = ownAccount.getAttribute("own_id").toString(); + /*String ownId = ownAccount.getAttribute("own_id").toString(); BizObjectManager ownInfoManager = JBOFactory.getBizObjectManager(OWN_INFO.CLASS_NAME); BizObject ownInfo = ownInfoManager.createQuery("OWN_NUMBER=:OWN_NUMBER").setParameter("OWN_NUMBER", ownId).getSingleResult(false); String xhdwdzdh = ownInfo.getAttribute("LEASE_TEL").toString();// Ïú»õµ¥Î»µØÖ·µç»° - +*/ BizObjectManager customerPersonManager = JBOFactory.getBizObjectManager(CUSTOMER_PERSON.CLASS_NAME); BizObjectManager customerFamilyManager = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY.CLASS_NAME); @@ -515,7 +531,7 @@ public class backRentPrintInvoiceManager extends BaseTable { confirmBizObject.setAttributeValue("kplx", "0"); confirmBizObject.setAttributeValue("tspz", "00"); confirmBizObject.setAttributeValue("xhdwdzdh", xhdwdzdh); - confirmBizObject.setAttributeValue("xhdwyhzh", ownAccount.getAttribute("acc_number").toString()); + confirmBizObject.setAttributeValue("xhdwyhzh", xhdwyhzh); confirmBizObject.setAttributeValue("ghdwsbh", certid); confirmBizObject.setAttributeValue("ghdwmc", customerName); confirmBizObject.setAttributeValue("ghdwdzdh", address_tel); diff --git a/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/rentPlanInvoiceDirectManager.java b/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/rentPlanInvoiceDirectManager.java index 9e5a851a2..d5ec1f50f 100644 --- a/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/rentPlanInvoiceDirectManager.java +++ b/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/rentPlanInvoiceDirectManager.java @@ -271,14 +271,16 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ public String invoiceConfirmSubmitE(JBOTransaction tx) throws Exception{ Transaction Sqlca = null; - BizObjectManager ownAccountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); + + /*BizObjectManager ownAccountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); BizObject ownAccount = ownAccountManager.createQuery("state_=:state and acc_type=:acc_type and money_type=:money_type and account_type=:account_type") .setParameter("state", "0010").setParameter("acc_type", "0010") .setParameter("money_type", "01") .setParameter("account_type", "invoice").getSingleResult(false); if (ownAccount == null || "".equals(ownAccount)) { return "ÄúµÄ±¾·½ÒøÐÐÕË»§Îª¿Õ£¡"; - } + }*/ + String[] rentInvoiceids = this.getIds().split("@"); List rentPlanIdList = new ArrayList(); @@ -288,6 +290,8 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ String customerid = ""; String customerName = ""; + String xhdwyhzh = ""; + String xhdwdzdh = ""; String rentPlanstr = StringUtils.join(rentPlanIdList.toArray(), ","); BizObjectManager invoiceManager = JBOFactory.getBizObjectManager(VI_INVOICE_RENT_INCOME_CONFIRM_E.CLASS_NAME); @SuppressWarnings("unchecked") @@ -295,6 +299,19 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ //Ñ­»·±éÀúºÏͬ for (BizObject bizObject : checkInvoiceList) { String contract_id = bizObject.getAttribute("contract_id").toString(); + + //²éѯ±¾·½ÒøÐÐÕ˺ź͵ØÖ·µç»° + BizObject rent = JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_RENT_INCOME", "SELECT O.own_number,oi.lease_tel FROM lc_rent_income O LEFT JOIN own_info oi ON O.own_account=oi.own_name WHERE O.contract_id =:contract_id GROUP BY O.contract_id") + .setParameter("contract_id", contract_id).getSingleResult(false); + if(rent==null){ + return "ÄúµÄ±¾·½ÒøÐÐÕË»§Îª¿Õ£¡"; + }else{ + //±¾·½ÒøÐÐÕ˺Š+ xhdwyhzh = rent.getAttribute("own_number")==null? "" : rent.getAttribute("own_number").toString(); + //µØÖ·µç»° + xhdwdzdh = rent.getAttribute("lease_tel")==null? "" : rent.getAttribute("lease_tel").toString(); + } + customerid = bizObject.getAttribute("CUSTOMER_ID").toString(); customerName = bizObject.getAttribute("customer_name").toString(); @@ -411,11 +428,11 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ tx.join(confirmManager); BizObject confirmBizObject = confirmManager.newObject(); - String ownId = ownAccount.getAttribute("own_id").toString(); + /*String ownId = ownAccount.getAttribute("own_id").toString(); BizObjectManager ownInfoManager = JBOFactory.getBizObjectManager(OWN_INFO.CLASS_NAME); BizObject ownInfo = ownInfoManager.createQuery("OWN_NUMBER=:OWN_NUMBER").setParameter("OWN_NUMBER", ownId).getSingleResult(false); String xhdwdzdh = ownInfo.getAttribute("LEASE_TEL").toString();// Ïú»õµ¥Î»µØÖ·µç»° - +*/ BizObjectManager customerPersonManager = JBOFactory.getBizObjectManager(CUSTOMER_PERSON.CLASS_NAME); BizObjectManager customerFamilyManager = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY.CLASS_NAME); @@ -465,7 +482,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ confirmBizObject.setAttributeValue("kplx", "0"); confirmBizObject.setAttributeValue("tspz", "00"); confirmBizObject.setAttributeValue("xhdwdzdh", xhdwdzdh); - confirmBizObject.setAttributeValue("xhdwyhzh", ownAccount.getAttribute("acc_number").toString()); + confirmBizObject.setAttributeValue("xhdwyhzh", xhdwyhzh); confirmBizObject.setAttributeValue("ghdwsbh", certid); confirmBizObject.setAttributeValue("ghdwmc", customerName); confirmBizObject.setAttributeValue("ghdwdzdh", address_tel); @@ -537,14 +554,14 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ public String invoiceConfirmSubmit(JBOTransaction tx) throws Exception{ Transaction Sqlca = null; - BizObjectManager ownAccountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); + /*BizObjectManager ownAccountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); BizObject ownAccount = ownAccountManager.createQuery("state_=:state and acc_type=:acc_type and money_type=:money_type and account_type=:account_type") .setParameter("state", "0010").setParameter("acc_type", "0010") .setParameter("money_type", "01") .setParameter("account_type", "invoice").getSingleResult(false); if (ownAccount == null || "".equals(ownAccount)) { return "ÄúµÄ±¾·½ÒøÐÐÕË»§Îª¿Õ£¡"; - } + }*/ String[] rentInvoiceids = this.getIds().split("@"); List rentPlanIdList = new ArrayList(); @@ -554,6 +571,8 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ String customerid = ""; String customerName = ""; + String xhdwyhzh = ""; + String xhdwdzdh = ""; String rentPlanstr = StringUtils.join(rentPlanIdList.toArray(), ","); BizObjectManager invoiceManager = JBOFactory.getBizObjectManager(VI_INVOICE_RENT_INCOME_CONFIRM.CLASS_NAME); // tx.join(invoiceManager); @@ -562,6 +581,19 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ //Ñ­»·±éÀúºÏͬ for (BizObject bizObject : checkInvoiceList) { String contract_id = bizObject.getAttribute("contract_id").toString(); + + //²éѯ±¾·½ÒøÐÐÕ˺ź͵ØÖ·µç»° + BizObject rent = JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_RENT_INCOME", "SELECT O.own_number,oi.lease_tel FROM lc_rent_income O LEFT JOIN own_info oi ON O.own_account=oi.own_name WHERE O.contract_id =:contract_id GROUP BY O.contract_id") + .setParameter("contract_id", contract_id).getSingleResult(false); + if(rent==null){ + return "ÄúµÄ±¾·½ÒøÐÐÕË»§Îª¿Õ£¡"; + }else{ + //±¾·½ÒøÐÐÕ˺Š+ xhdwyhzh = rent.getAttribute("own_number")==null? "" : rent.getAttribute("own_number").toString(); + //µØÖ·µç»° + xhdwdzdh = rent.getAttribute("lease_tel")==null? "" : rent.getAttribute("lease_tel").toString(); + } + customerid = bizObject.getAttribute("CUSTOMER_ID").toString(); customerName = bizObject.getAttribute("customer_name").toString(); @@ -681,24 +713,20 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ tx.join(confirmManager); BizObject confirmBizObject = confirmManager.newObject(); - String ownId = ownAccount.getAttribute("own_id").toString(); + /*String ownId = ownAccount.getAttribute("own_id").toString(); BizObjectManager ownInfoManager = JBOFactory.getBizObjectManager(OWN_INFO.CLASS_NAME); BizObject ownInfo = ownInfoManager.createQuery("OWN_NUMBER=:OWN_NUMBER").setParameter("OWN_NUMBER", ownId).getSingleResult(false); String xhdwdzdh = ownInfo.getAttribute("LEASE_TEL").toString();// Ïú»õµ¥Î»µØÖ·µç»° - +*/ BizObjectManager customerPersonManager = JBOFactory.getBizObjectManager(CUSTOMER_PERSON.CLASS_NAME); BizObjectManager customerFamilyManager = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY.CLASS_NAME); - BizObject customerPerson = customerPersonManager - .createQuery( + BizObject customerPerson = customerPersonManager.createQuery( "SELECT o.certid,caa.fulladdress,o.mobile,ca.acc_number,ca.bank_name from o JOIN jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca ON ca.customerid=o.customerid JOIN jbo.app.tenwa.customer.CUSTOMER_ADDRESS caa ON caa.customerid=ca.customerid where o.customerid=:customerid") - .setParameter("customerid", customerid) - .getSingleResult(false); + .setParameter("customerid", customerid).getSingleResult(false); - BizObject customerFamily = customerFamilyManager - .createQuery("customerid=:customerid") - .setParameter("customerid", customerid) - .getSingleResult(false); + BizObject customerFamily = customerFamilyManager.createQuery("customerid=:customerid") + .setParameter("customerid", customerid).getSingleResult(false); String familyTel = ""; if (customerFamily != null) { familyTel = customerFamily.getAttribute("tel").toString(); @@ -744,7 +772,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{ confirmBizObject.setAttributeValue("kplx", "0"); confirmBizObject.setAttributeValue("tspz", "00"); confirmBizObject.setAttributeValue("xhdwdzdh", xhdwdzdh); - confirmBizObject.setAttributeValue("xhdwyhzh", ownAccount.getAttribute("acc_number").toString()); + confirmBizObject.setAttributeValue("xhdwyhzh", xhdwyhzh); confirmBizObject.setAttributeValue("ghdwsbh", certid); confirmBizObject.setAttributeValue("ghdwmc", customerName); confirmBizObject.setAttributeValue("ghdwdzdh", address_tel); diff --git a/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/rentPlanInvoiceManager.java b/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/rentPlanInvoiceManager.java index 2ab0411d7..c56b22fc1 100644 --- a/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/rentPlanInvoiceManager.java +++ b/src_tenwa/com/tenwa/apzl/invoicemanager/rentplaninvoice/rentPlanInvoiceManager.java @@ -308,7 +308,8 @@ public class rentPlanInvoiceManager extends BaseTable { */ public String invoiceConfirmSubmit(JBOTransaction tx) throws Exception { Transaction Sqlca = null; - BizObjectManager ownAccountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); + + /* BizObjectManager ownAccountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); BizObject ownAccount = ownAccountManager .createQuery("state_=:state and acc_type=:acc_type and money_type=:money_type and account_type=:account_type") .setParameter("state", "0010").setParameter("acc_type", "0010") @@ -316,7 +317,9 @@ public class rentPlanInvoiceManager extends BaseTable { .setParameter("account_type", "invoice").getSingleResult(false); if (ownAccount == null || "".equals(ownAccount)) { return "ÄúµÄ±¾·½ÒøÐÐÕË»§Îª¿Õ£¡"; - } + }*/ + + String[] rentInvoiceids = this.getIds().split("@"); List rentPlanIdList = new ArrayList(); @@ -328,22 +331,25 @@ public class rentPlanInvoiceManager extends BaseTable { String customerName = ""; String rentPlanstr = StringUtils.join(rentPlanIdList.toArray(), ","); BizObjectManager invoiceManager = JBOFactory.getBizObjectManager(VI_INVOICE_RENT_PLAN_CONFIRM.CLASS_NAME); - // tx.join(invoiceManager); @SuppressWarnings("unchecked") - List checkInvoiceList = (List) invoiceManager - .createQuery("SELECT O.contract_id,O.customer_name,O.CUSTOMER_ID FROM O WHERE O.id IN (" + rentPlanstr + ") GROUP BY O.contract_id") - .getResultList(false); - /* - * if(checkInvoiceList!=null &&checkInvoiceList.size()>1){ return - * "Ñ¡ÔñµÄ²»ÊÇͬһ¸ö¿Í»§£¡"; }else if(checkInvoiceList!=null - * &&checkInvoiceList.size()==1){ customerid = - * checkInvoiceList.get(0).getAttribute("CUSTOMER_ID").toString(); - * customerName = - * checkInvoiceList.get(0).getAttribute("customer_name").toString(); - * }else{ return "ERROR[02]"; } - */ + List checkInvoiceList = (List) invoiceManager.createQuery("SELECT O.contract_id,O.customer_name,O.CUSTOMER_ID FROM O WHERE O.id IN (" + rentPlanstr + ") GROUP BY O.contract_id").getResultList(false); + String xhdwyhzh = ""; + String xhdwdzdh = ""; for (BizObject bizObject : checkInvoiceList) { + //»ñÈ¡ºÏͬid String contract_id = bizObject.getAttribute("contract_id").toString(); + //²éѯ±¾·½ÒøÐÐÕ˺ź͵ØÖ·µç»° + BizObject rent = JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_RENT_INCOME", "SELECT O.own_number,oi.lease_tel FROM lc_rent_income O LEFT JOIN own_info oi ON O.own_account=oi.own_name WHERE O.contract_id =:contract_id GROUP BY O.contract_id") + .setParameter("contract_id", contract_id).getSingleResult(false); + if(rent==null){ + return "ÄúµÄ±¾·½ÒøÐÐÕË»§Îª¿Õ£¡"; + }else{ + //±¾·½ÒøÐÐÕ˺Š+ xhdwyhzh = rent.getAttribute("own_number")==null? "" : rent.getAttribute("own_number").toString(); + //µØÖ·µç»° + xhdwdzdh = rent.getAttribute("lease_tel")==null? "" : rent.getAttribute("lease_tel").toString(); + } + customerid = bizObject.getAttribute("CUSTOMER_ID").toString(); customerName = bizObject.getAttribute("customer_name").toString(); @@ -372,8 +378,6 @@ public class rentPlanInvoiceManager extends BaseTable { BizObjectManager invoiceRentManager = JBOFactory.getBizObjectManager(LI_RENT_INVOICE_INFO.CLASS_NAME); //˰ÂÊ Double sl = 0.00; - - for (int i = 0; i < ids.length; i++) { String invoiceId = ids[i];// li_rent_invoice_infoµÄid @@ -391,8 +395,7 @@ public class rentPlanInvoiceManager extends BaseTable { String taxType = ""; - BizObject invoiceRentBizObject = invoiceRentManager.createQuery("ID=:id ").setParameter("id", invoiceId) - .getSingleResult(false); + BizObject invoiceRentBizObject = invoiceRentManager.createQuery("ID=:id ").setParameter("id", invoiceId).getSingleResult(false); invoiceMoney = new BigDecimal(invoiceRentBizObject.getAttribute("INVOICE_MONEY").getString()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); TAX_TYPE = invoiceRentBizObject.getAttribute("TAX_TYPE").getString(); @@ -453,8 +456,7 @@ public class rentPlanInvoiceManager extends BaseTable { confirmDetailBizObject.setAttributeValue("spsm", ""); confirmDetailBizObject.setAttributeValue("ggxh", planList); - confirmDetailBizObject.setAttributeValue("invoice_confirm_id", - confirmId); + confirmDetailBizObject.setAttributeValue("invoice_confirm_id",confirmId); confirmDetailBizObject.setAttributeValue("sl", sl); confirmDetailBizObject.setAttributeValue("se", se); confirmDetailBizObject.setAttributeValue("hsbz", "0"); @@ -484,24 +486,18 @@ public class rentPlanInvoiceManager extends BaseTable { tx.join(confirmManager); BizObject confirmBizObject = confirmManager.newObject(); - String ownId = ownAccount.getAttribute("own_id").toString(); + /*String ownId = ownAccount.getAttribute("own_id").toString(); BizObjectManager ownInfoManager = JBOFactory.getBizObjectManager(OWN_INFO.CLASS_NAME); BizObject ownInfo = ownInfoManager.createQuery("OWN_NUMBER=:OWN_NUMBER").setParameter("OWN_NUMBER", ownId).getSingleResult(false); String xhdwdzdh = ownInfo.getAttribute("LEASE_TEL").toString();// Ïú»õµ¥Î»µØÖ·µç»° - +*/ BizObjectManager customerPersonManager = JBOFactory.getBizObjectManager(CUSTOMER_PERSON.CLASS_NAME); BizObjectManager customerFamilyManager = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY.CLASS_NAME); - BizObject customerPerson = customerPersonManager - .createQuery( - "SELECT o.certid,caa.fulladdress,o.mobile,ca.acc_number,ca.bank_name from o JOIN jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca ON ca.customerid=o.customerid JOIN jbo.app.tenwa.customer.CUSTOMER_ADDRESS caa ON caa.customerid=ca.customerid where o.customerid=:customerid") - .setParameter("customerid", customerid) - .getSingleResult(false); + BizObject customerPerson = customerPersonManager.createQuery("SELECT o.certid,caa.fulladdress,o.mobile,ca.acc_number,ca.bank_name from o JOIN jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca ON ca.customerid=o.customerid JOIN jbo.app.tenwa.customer.CUSTOMER_ADDRESS caa ON caa.customerid=ca.customerid where o.customerid=:customerid") + .setParameter("customerid", customerid).getSingleResult(false); - BizObject customerFamily = customerFamilyManager - .createQuery("customerid=:customerid") - .setParameter("customerid", customerid) - .getSingleResult(false); + BizObject customerFamily = customerFamilyManager.createQuery("customerid=:customerid").setParameter("customerid", customerid).getSingleResult(false); String familyTel = ""; if (customerFamily != null) { familyTel = customerFamily.getAttribute("tel").toString(); @@ -515,13 +511,10 @@ public class rentPlanInvoiceManager extends BaseTable { String address_tel = ""; if (customerPerson != null) { certid = customerPerson.getAttribute("certid").toString(); - fulladdress = customerPerson.getAttribute("fulladdress") - .toString(); + fulladdress = customerPerson.getAttribute("fulladdress").toString(); mobile = customerPerson.getAttribute("mobile").toString(); - acc_number = customerPerson.getAttribute("acc_number") - .toString(); - bank_name = customerPerson.getAttribute("bank_name") - .toString(); + acc_number = customerPerson.getAttribute("acc_number").toString(); + bank_name = customerPerson.getAttribute("bank_name").toString(); acc_bank = "[" + bank_name + "][" + acc_number + "]"; address_tel = "[" + mobile + "][" + fulladdress + "]"; @@ -543,7 +536,7 @@ public class rentPlanInvoiceManager extends BaseTable { confirmBizObject.setAttributeValue("kplx", "0"); confirmBizObject.setAttributeValue("tspz", "00"); confirmBizObject.setAttributeValue("xhdwdzdh", xhdwdzdh); - confirmBizObject.setAttributeValue("xhdwyhzh", ownAccount.getAttribute("acc_number").toString()); + confirmBizObject.setAttributeValue("xhdwyhzh", xhdwyhzh); confirmBizObject.setAttributeValue("ghdwsbh", certid); confirmBizObject.setAttributeValue("ghdwmc", customerName); confirmBizObject.setAttributeValue("ghdwdzdh", address_tel); @@ -586,18 +579,11 @@ public class rentPlanInvoiceManager extends BaseTable { if ("0".equals(returncode)) { System.out.println("[OK][SUCCESS]"); for (BizObject confirmDetailBizObject : confirmDetailList) { - String invoiceId = confirmDetailBizObject - .getAttribute("invoice_id").toString(); - // String invoice_type = - // confirmDetailBizObject.getAttribute("invoice_type").toString(); - + String invoiceId = confirmDetailBizObject.getAttribute("invoice_id").toString(); invoiceRentManager.createQuery("update o set INVOICE_STATUS=:invoicestatus where ID=:id ").setParameter("id",invoiceId) .setParameter("invoicestatus","3").executeUpdate(); - - } - // return "¿ªÆ±ÉêÇë³É¹¦"; } else { return returnmsg; } From 076e41193ee1a548944cdc843ac884a15ce375b4 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Wed, 10 Oct 2018 16:14:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E5=90=8C?= =?UTF-8?q?=E7=BB=88=E6=AD=A2=E6=A8=A1=E6=9D=BF=E5=B8=A6=E5=87=BA=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=A8=A1=E6=9D=BF=E5=92=8C=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=B7=BB=E5=8A=A0=E5=AE=89=E9=B9=8F=E5=85=AC?= =?UTF-8?q?=E5=8F=B8=E9=82=AE=E4=BB=B6=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jquery/plugins/jquery.validate.extend.js | 26 +++++++++---------- .../RentNotify/TriditionSuspensionList.jsp | 7 ++--- .../controller/RentNotinyDeleteAction.java | 7 ++++- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/WebContent/Frame/resources/js/jquery/plugins/jquery.validate.extend.js b/WebContent/Frame/resources/js/jquery/plugins/jquery.validate.extend.js index 0d058e960..65eb9f1b0 100644 --- a/WebContent/Frame/resources/js/jquery/plugins/jquery.validate.extend.js +++ b/WebContent/Frame/resources/js/jquery/plugins/jquery.validate.extend.js @@ -5,7 +5,7 @@ function isShortDate(value){ return /^[0-9]{4}\/[0-9]{2}\/[0-9]{2}$/g.test(value); } function isEmail(value){ - return /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/g.test(value); + return /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[-|_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/g.test(value); } function isEmpty(value){ //alert("isEmpty"); @@ -75,7 +75,7 @@ jQuery.validator.prototype.showLabel = function(element,message){ } this.toShow = this.toShow.add(label); }; -/*jquery.validate.js¹¦ÄÜÀ©Õ¹*/ +/*jquery.validate.js������չ*/ jQuery.validator.addMethod("maxlength",function(value,element,params){ if(!value) value = ""; var cArr = value.match(/[^\x00-\xff]/ig); @@ -108,21 +108,21 @@ jQuery.validator.addMethod("maxx",function(value,element,params){ return false; }); -//ͨ¹ýÔ¶³Ì¸³Öµ +//ͨ��Զ�̸�ֵ function setItemValueFromRemote(dwname,rowindex,fieldName,javaClassName,params){ var sValue = remoteFetch(dwname,rowindex,javaClassName,params); if(sValue!=null) setItemValue(dwname,rowindex,fieldName,sValue); } -//Ô¶³Ì»ñÈ¡Êý¾Ý +//Զ�̻�ȡ��� function remoteFetch(dwname,rowindex,javaClassName,params){ if(!isNaN(dwname))dwname = "myiframe" + dwname; var dwindex = dwname.substring(8); var sUrl = sWebRootPath + "/Frame/page/ow/RemoteFetch.jsp"; var param = "ClassName=" + javaClassName + "&rand="+Math.random(); - var result = ['error','ÎÞ·¨Á¬½Ó·þÎñÆ÷']; + var result = ['error','�޷����ӷ�����']; for(var i=0;i0)sParamValue=sParamValue.replace(/&/g, "¡Ñ¡Õ¡õ"); + if(sParamValue.length>0)sParamValue=sParamValue.replace(/&/g, "�ѡա�"); param += "&"+sParamName+"=" + sParamValue; } } @@ -266,7 +266,7 @@ jQuery.validator.addMethod("classcheck",function(value,element,params,index){ }); return result; }); -//Èç¹ûÊDZ£´æÔòÑéÖ¤·Ç¿Õ,Èç¹ûÔÝ´æÔò²»ÑéÖ¤ +//����DZ�������֤�ǿ�,����ݴ�����֤ jQuery.validator.addMethod("required0",function(value,element,param){ //alert(value +"|" + element.type + "|" + element.name + "|" +element.outerHTML); if(SAVE_TMP==true){ @@ -325,7 +325,7 @@ jQuery.validator.addMethod("expressions",function(value,element,expressions,inde } if(errorInfos.length>0){ //alert(element.parentNode.innerHTML); - element.setAttribute("errorInfo",errorInfos.join(',²¢ÇÒ')); + element.setAttribute("errorInfo",errorInfos.join(',����')); return false; } else @@ -358,7 +358,7 @@ function isSpecialCharacter(value){ } function addSpecialCharacterValidate(id2name){ - return; // ¹Ø±ÕÌØÊâУÑéÇë´ò¿ªÐÐÊ××¢ÊÍ + return; // �ر�����У���������ע�� if(!window._user_validator){ window._user_validator = new Array(); } @@ -375,7 +375,7 @@ function addSpecialCharacterValidate(id2name){ }else{ _user_validator[0]["rules"][id2name[i][0]]["SpecialCharacter"] = true; } - var message = id2name[i][1]+"²»ÔÊÐíÌØÊâ×Ö·û¡¾!#$%^&*()[]{}<>¡¿"; + var message = id2name[i][1]+"�����������ַ�!#$%^&*()[]{}<>��"; if(!_user_validator[0]["messages"][id2name[i][0]]){ _user_validator[0]["messages"][id2name[i][0]] = {"SpecialCharacter":message}; }else{ diff --git a/WebContent/Tenwa/Lease/Flow/RentNotify/TriditionSuspensionList.jsp b/WebContent/Tenwa/Lease/Flow/RentNotify/TriditionSuspensionList.jsp index d15e35ac8..757800d58 100644 --- a/WebContent/Tenwa/Lease/Flow/RentNotify/TriditionSuspensionList.jsp +++ b/WebContent/Tenwa/Lease/Flow/RentNotify/TriditionSuspensionList.jsp @@ -30,6 +30,7 @@ dwTemp.ReadOnly = "1"; dwTemp.setPageSize(50); // dwTemp.genHTMLObjectWindow(docname+","+contract_id); + dwTemp.genHTMLObjectWindow(flowunid); //0¡¢ÊÇ·ñչʾ 1¡¢ ȨÏÞ¿ØÖÆ 2¡¢ չʾÀàÐÍ 3¡¢°´Å¥ÏÔʾÃû³Æ 4¡¢°´Å¥½âÊÍÎÄ×Ö 5¡¢°´Å¥´¥·¢Ê¼þ´úÂë 6¡¢ 7¡¢ 8¡¢ 9¡¢Í¼±ê£¬CSS²ãµþÑùʽ 10¡¢·ç¸ñ String sButtons[][] =null; @@ -120,7 +121,7 @@ tempParam["OBJECTTYPE"]="TriditionSuspension"; tempParam["FLOW_UNID"]="<%=flowunid%>"; tempParam["PROJ_ID"]="<%=projid%>"; - tempParam["contract_id"]="<%=contract_id%>"; + tempParam["CONTRACT_ID"]="<%=contract_id%>"; //Éú³ÉÄ£°å¹Ì¶¨²ÎÊý tempParam["CurUserId"]="<%=CurUser.getUserID()%>"; tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>"; @@ -131,11 +132,11 @@ if(sparam.length>0){sparam+=",";} sparam+=key+"="+param[key]; } -// var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","plan_number="+plan_number+",plan_list="+plan_list); + var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","plan_number=<%=flowunid%>,plan_list=TriditionSuspension"); var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam); //wordתpdf var id = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","wordToPdfAnnex","FlowUnid=<%=flowunid%>,PLAN_LIST=TriditionSuspension"); - + alert("Éú³É³É¹¦£¡£¡£¡"); reloadSelf(); } diff --git a/src_core/com/tenwa/officetempalte/controller/RentNotinyDeleteAction.java b/src_core/com/tenwa/officetempalte/controller/RentNotinyDeleteAction.java index 53d583993..8da410a8d 100644 --- a/src_core/com/tenwa/officetempalte/controller/RentNotinyDeleteAction.java +++ b/src_core/com/tenwa/officetempalte/controller/RentNotinyDeleteAction.java @@ -44,7 +44,12 @@ public class RentNotinyDeleteAction { //¸ù¾Ýǰ̨²ÎÊýÉú³ÉÎĵµ public void deletequtation(JBOTransaction tx) throws Exception{ BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME); - BizObject DOCRELATIVE=bom.createQuery("plan_number=:plan_number and plan_list=:plan_list").setParameter("plan_number",plan_number).setParameter("plan_list", plan_list).getSingleResult(false); + BizObject DOCRELATIVE=null; + if("TriditionSuspension".equals(plan_list)){ + DOCRELATIVE=bom.createQuery("FLOW_UNID=:flowunid and OBJECTTYPE=:objecttype").setParameter("flowunid",plan_number).setParameter("objecttype", plan_list).getSingleResult(false); + }else{ + DOCRELATIVE=bom.createQuery("plan_number=:plan_number and plan_list=:plan_list").setParameter("plan_number",plan_number).setParameter("plan_list", plan_list).getSingleResult(false); + } if(DOCRELATIVE!=null){ String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString(); BizObjectManager bom1=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME);