From a2b66285def8d8f170d6bbfe12474935777a8d11 Mon Sep 17 00:00:00 2001 From: liuz Date: Wed, 1 Aug 2018 09:32:18 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/jbo/jbo_customer.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml index afba61bc7..9624f0d54 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml @@ -2533,7 +2533,9 @@ - + + + @@ -2572,7 +2574,9 @@ - + + + @@ -2609,7 +2613,9 @@ - + + + From dcf8b368213c48835f9b0afbbeba6f6e50ca8dc7 Mon Sep 17 00:00:00 2001 From: amarsoft Date: Wed, 1 Aug 2018 09:33:23 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=87=AD=E8=AF=81=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreateVoucherCustCautionMoneyIncome.java | 6 ++-- .../IncomeVoucher.java | 7 ++-- .../CreateVoucherRentIncome.java | 32 ++++++++++++++----- .../CreateVoucherRentIncomeMission.java | 19 +++++++++++ 4 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java index 1c94cb51d..b3d21c5e9 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java @@ -42,9 +42,11 @@ public class CreateVoucherCustCautionMoneyIncome extends BaseBussiness{ param.clear(); map.put("FlowUnid", FlowUnid); map.put("FEE_TYPE", FeeType); + if("PZ2018073100000062".equals(VOUCHERNO)){ + sql="SELECT LFIT.FACT_MONEY AS MONEY,LFIT.FACT_MONEY/1.06 AS MONEYNOTAX,(LFIT.FACT_MONEY-LFIT.FACT_MONEY/1.06) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFIT.FEE_TYPE in ('feetype20','feetype21','feetype22','feetype23') AND LFIT.FLOWUNID=:FLOWUNID "; + }else{ sql= "SELECT LFIT.FACT_MONEY AS MONEY,LFIT.FACT_MONEY/1.06 AS MONEYNOTAX,(LFIT.FACT_MONEY-LFIT.FACT_MONEY/1.06) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFIT.FEE_TYPE=:FEE_TYPE AND LFIT.FLOWUNID=:FLOWUNID "; - - + } List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/IncomeVoucher.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/IncomeVoucher.java index 9c5885384..f26b20187 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/IncomeVoucher.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/IncomeVoucher.java @@ -16,11 +16,14 @@ public class IncomeVoucher extends BaseBussiness { cvci.CreateVoucher(FlowUnid, "PZ2018071100000012", "feetype2");//յͻ֤ cvci.CreateVoucher(FlowUnid, "PZ2018072100000023", "feetype1");//·̯ı֤ cvci.CreateVoucher(FlowUnid, "PZ2018072100000031", "feetype4");//ۿ + cvci.CreateVoucher(FlowUnid, "PZ2018072100000028", "feetype27");//Ϣ + cvci.CreateVoucher(FlowUnid, "PZ2018073100000062", null);//˰++װ + cvci.CreateVoucher(FlowUnid, "PZ2018073100000061", "feetype24");//GPS - CreateVoucherRentIncome cvri=new CreateVoucherRentIncome(); + /*CreateVoucherRentIncome cvri=new CreateVoucherRentIncome(); cvri.CreateVoucher(FlowUnid, "PZ2018072100000024");//յ cvri.CreateVoucher(FlowUnid, "PZ2018072100000025");//յϢ - +*/ return "true"; } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRentIncome.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRentIncome.java index cdf3b92da..01916f223 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRentIncome.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRentIncome.java @@ -7,6 +7,7 @@ import java.util.Map; import jbo.voucher.LV_VOUCHER_CONFIG; import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.JBOException; import com.amarsoft.awe.util.Transaction; import com.amarsoft.dict.als.cache.CacheLoaderFactory; import com.tenwa.comm.util.jboutil.DataOperatorUtil; @@ -14,13 +15,16 @@ import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; public class CreateVoucherRentIncome { - public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { + public void CreateVoucher(String VOUCHERNO){ Transaction Sqlca =null; + try{ Map map=new HashMap(); Map param=new HashMap(); Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource()); String MONEY=null; + String MONEYNOTAX=null; + String MONEYTAX=null; String ACCOUNT_DATE=null; String FACT_DATE=null; String CONTRACT_ID=null; @@ -37,12 +41,11 @@ public class CreateVoucherRentIncome { String BUSINESSTYPE=null; String sql=""; param.clear(); - map.put("FLOWUNID", FlowUnid); if("PZ2018072100000024".equals(VOUCHERNO)){ - sql= "SELECT LRIT.rent AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME_TEMP LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LrIT.FLOWUNID=:FLOWUNID"; + sql= "SELECT LRIT.rent AS MONEY,0 as MONEYNOTAX,0 as MONEYTAX, DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(sysdate(),'%Y/%m/%d') "; } if("PZ2018072100000025".equals(VOUCHERNO)){ - sql= "SELECT LrIT.penalty AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME_TEMP LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LrIT.FLOWUNID=:FLOWUNID"; + sql= "SELECT LrIT.penalty AS MONEY,ROUND(LrIT.penalty/1.06,2) AS MONEYNOTAX,LrIT.penalty-ROUND(LrIT.penalty/1.06,2) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')"; } List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); @@ -53,7 +56,9 @@ public class CreateVoucherRentIncome { MONEY=dataList.get(i).get("MONEY").toString(); if("".equals(MONEY)||MONEY==null) MONEY="0.00"; double mon=Double.parseDouble(MONEY); - if(mon>0){ + if(Math.abs(mon)>0){ + MONEYNOTAX=dataList.get(i).get("MONEYNOTAX").toString(); + MONEYTAX=dataList.get(i).get("MONEYTAX").toString(); ACCOUNT_DATE=dataList.get(i).get("ACCOUNT_DATE").toString(); FACT_DATE =dataList.get(i).get("FACT_DATE").toString(); CONTRACT_ID=dataList.get(i).get("CONTRACT_ID").toString(); @@ -70,6 +75,8 @@ public class CreateVoucherRentIncome { BUSINESSTYPE=dataList.get(i).get("BUSINESSTYPE"); param.put("FACT_MONEY",MONEY); + param.put("INTERESTNOTAX",MONEYNOTAX); + param.put("TAX",MONEYTAX); param.put("ACCOUNT_DATE",ACCOUNT_DATE); param.put("FACT_DATE",FACT_DATE); param.put("CONTRACT_ID",CONTRACT_ID); @@ -97,7 +104,6 @@ public class CreateVoucherRentIncome { //param.put("FUNDTYPE", ""); // Ӫ param.put("BUSINESSTYPE", "06"); - param.put("FlowUnid", FlowUnid); map.clear(); map.put("PROJ_TYPE", leas_form); map.put("VOUCHER_NO", VOUCHERNO); @@ -112,7 +118,17 @@ public class CreateVoucherRentIncome { Sqlca.commit(); } - String sMessage="true"; - return sMessage; + }catch (Exception e){ + e.printStackTrace(); + }finally{ + if(Sqlca!=null){ + try { + Sqlca.disConnect(); + } catch (JBOException e) { + e.printStackTrace(); + } + Sqlca = null; + } + } } } diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java new file mode 100644 index 000000000..9d1ca989d --- /dev/null +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java @@ -0,0 +1,19 @@ +package com.tenwa.lease.app.quartzmession; + +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; + +import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMonthSettlement; +import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRentIncome; + +public class CreateVoucherRentIncomeMission implements Job { + + @Override + public void execute(JobExecutionContext arg0) throws JobExecutionException { + CreateVoucherRentIncome cvri=new CreateVoucherRentIncome(); + cvri.CreateVoucher("PZ2018072100000024");//յ + cvri.CreateVoucher("PZ2018072100000025");//յϢ + } + +} From 2f4fe5b046abaaaf2249cce62e0f1bd034b88300 Mon Sep 17 00:00:00 2001 From: liujiaji Date: Wed, 1 Aug 2018 10:18:59 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=95=86=E5=8A=A1=E6=9D=A1=E4=BB=B6=20?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=8F=91=E8=B5=B7=20=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E7=85=A7=E7=89=87=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reckon/product/ProductCondition.java | 391 ++++++++++++++++++ .../product/ProductConditionService.java | 229 ++++++++++ .../impl/BusinessDocUploadServiceImpl.java | 12 +- .../LoanSimulationBasicInfoController.java | 17 + .../service/LoanSimulationBasicService.java | 5 + .../impl/LoanSimulationBasicServiceImpl.java | 222 +++------- .../business/start/init/InitDocListTools.java | 142 ++++--- .../impl/BusinessApplyStartServiceImpl.java | 31 +- 8 files changed, 814 insertions(+), 235 deletions(-) diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index 7a3583afc..6e83baa2d 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -8,6 +8,7 @@ import java.util.Map.Entry; import java.util.Vector; import jbo.sys.CODE_LIBRARY; +import apx.com.amarsoft.als.apzl.apply.business.loan.product.ProductBaseLoanTools; import com.amarsoft.app.als.sys.tools.DateUtil; import com.amarsoft.app.awe.config.InitDBType; @@ -47,6 +48,24 @@ public class ProductCondition { return sb.toString(); } + public String getProductRulesApp(List> appList,String productId,Vector vali) throws Exception{ + ProductBaseLoanTools.addAppList(appList, "LEASE_AMT_DATE", "coldefaultvalue", DateUtil.getToday()); + StringBuilder sb=new StringBuilder(); + sb.append("{"); + sb.append("'fund':"+this.getProductFundRulesApp(appList, productId,vali));//ʽ + sb.append(",'grace':"+this.getProductGraceRulesApp(appList, productId, vali));// + sb.append(",'method':"+this.getProductSettleRulesApp(appList, productId));//㷽ʽ + sb.append("}"); + setRentOrRateApp(appList, productId);//㷽 + this.getOtherRuleApp(appList, productId);// + this.getProductPenaRulesApp(appList, productId);//Ϣ + this.getProductAdjustRulesApp(appList, productId);//Ϣ + this.getGrossRulesApp(appList, productId);// +// this.setDateRule(doTemp, productId);// + this.getCautionRatioApp(appList, productId);//֤ + return sb.toString(); + } + /** * * @param doTemp @@ -109,6 +128,91 @@ public class ProductCondition { } } + public void setDateRuleApp(List> appList,String productId) throws Exception{ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0340"); + Map PLAN_DATE_HOILDAY = new HashMap(); + PLAN_DATE_HOILDAY.put("colname", "PLAN_DATE_HOILDAY"); + Map FIRST_PLAN_DATE = new HashMap(); + FIRST_PLAN_DATE.put("colname", "FIRST_PLAN_DATE"); + Map LAST_PLAN_DATE = new HashMap(); + LAST_PLAN_DATE.put("colname", "LAST_PLAN_DATE"); + Map INTEREST_DATE_HOLIDAY = new HashMap(); + INTEREST_DATE_HOLIDAY.put("colname", "INTEREST_DATE_HOLIDAY"); + Map FIRST_INTEREST_DATE = new HashMap(); + FIRST_INTEREST_DATE.put("colname", "INTEREST_DATE_HOLIDAY"); + Map LAST_INTEREST_DATA = new HashMap(); + LAST_INTEREST_DATA.put("colname", "LAST_INTEREST_DATA"); + Map RATE = new HashMap(); + Map ADDITIONAL_RATE = new HashMap(); + RATE.put("colname", "RATE"); + ADDITIONAL_RATE.put("colname", "ADDITIONAL_RATE"); + if(map.containsKey("PaymentDate")){// + Map plandatemap=map.get("PaymentDate"); + if(plandatemap.containsKey("HolidayAdjust")){ + PLAN_DATE_HOILDAY.put("coldefaultvalue", plandatemap.get("HolidayAdjust")); + appList.add(PLAN_DATE_HOILDAY); + }else{ + PLAN_DATE_HOILDAY.put("coldefaultvalue", "unchanged"); + appList.add(PLAN_DATE_HOILDAY); + } + if(plandatemap.containsKey("date_proc")){ + String s=plandatemap.get("date_proc"); + if(s.indexOf("1")>=0){ + FIRST_PLAN_DATE.put("colvisible", "1"); + FIRST_PLAN_DATE.put("colrequired", "1"); + appList.add(FIRST_PLAN_DATE); + } + if(s.indexOf("2")>=0){ + LAST_PLAN_DATE.put("colvisible", "1"); + LAST_PLAN_DATE.put("colrequired", "1"); + appList.add(LAST_PLAN_DATE); + } + if(s.indexOf("3")>=0){ + PLAN_DATE_HOILDAY.put("colvisible", "1"); + PLAN_DATE_HOILDAY.put("colrequired", "1"); + appList.add(PLAN_DATE_HOILDAY); + } + } + } + + if(map.containsKey("InterestDate")){//Ϣ + Map plandatemap=map.get("InterestDate"); + if(plandatemap.containsKey("HolidayAdjust")){ + INTEREST_DATE_HOLIDAY.put("coldefaultvalue", plandatemap.get("HolidayAdjust")); + appList.add(INTEREST_DATE_HOLIDAY); + }else{ + INTEREST_DATE_HOLIDAY.put("coldefaultvalue", "unchanged"); + appList.add(INTEREST_DATE_HOLIDAY); + } + if(plandatemap.containsKey("date_proc")){ + String s=plandatemap.get("date_proc"); + if(s.indexOf("1")>=0){ + + FIRST_INTEREST_DATE.put("colvisible", "1"); + FIRST_INTEREST_DATE.put("colrequired", "1"); + appList.add(FIRST_INTEREST_DATE); + } + if(s.indexOf("2")>=0){ + LAST_INTEREST_DATA.put("colvisible", "1"); + LAST_INTEREST_DATA.put("colrequired", "1"); + appList.add(LAST_INTEREST_DATA); + } + if(s.indexOf("3")>=0){ + INTEREST_DATE_HOLIDAY.put("colvisible", "1"); + INTEREST_DATE_HOLIDAY.put("colrequired", "1"); + appList.add(INTEREST_DATE_HOLIDAY); + } + + } + } + if(map.containsKey("RateInfo")){ + RATE.put("coldefaultvalue", map.get("RateInfo").get("RATE")); + ADDITIONAL_RATE.put("coldefaultvalue", map.get("RateInfo").get("AdditionalRate")); + appList.add(RATE); + appList.add(ADDITIONAL_RATE); + } + } + /** * Ŀ ʶ ڳܼ Ƿʾ * @param doTemp @@ -128,6 +232,20 @@ public class ProductCondition { doTemp.setVisible("FIRST_PAYMENT_TOTAL",false); } } + + public void getGrossRulesApp(List> appList,String productId) throws Exception{ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0330"); + if(!map.containsKey("GrossProfit")){ + ProductBaseLoanTools.addAppList(appList, "GROSS_PROFIT", "colvisible", "0"); + } + if(!map.containsKey("CleanCreditMoney")){ + ProductBaseLoanTools.addAppList(appList, "CLEAN_CREDIT_MONEY", "colvisible", "0"); + ProductBaseLoanTools.addAppList(appList, "CLEAN_CREDIT_RATIO", "colvisible", "0"); + } + if(!map.containsKey("PeriodBeginPayMoney")){ + ProductBaseLoanTools.addAppList(appList, "FIRST_PAYMENT_TOTAL", "colvisible", "0"); + } + } /** * 㷽 ѡ @@ -151,6 +269,25 @@ public class ProductCondition { } + + public void setRentOrRateApp(List> appList,String productId) throws Exception{ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0310"); + if(map.containsKey("ROR01")){ + if(map.get("ROR01").get("RentOrRate").length()>0){ + String[] rule=map.get("ROR01").get("RentOrRate").split(","); + String s=""; + for(int i=0;i0){s+=",";} + s+="'"+rule[i]+"'"; + } + ProductBaseLoanTools.addAppList(appList, "RENT_OR_RATE", "coleditsource", "jbo.sys.CODE_LIBRARY," + + "itemno,itemname,codeno='rent_or_rate' and itemno in ("+s+") order by sortno"); + } + } + + + } + /** * ȡƷõʽ * @param productId @@ -258,6 +395,78 @@ public class ProductCondition { sb.append("}"); return sb.toString(); } + + @SuppressWarnings("unchecked") + public String getProductFundRulesApp(List> appList,String productId,Vector vali) throws Exception{ + StringBuilder sb=new StringBuilder(); + sb.append("{"); + //ȡƷʽ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0315"); + //ȡҪͲƷʽ + String sql = "codeno='FeeType' and relativecode is not null and relativecode<>''"; + List feeList=JBOFactory.createBizObjectQuery(CODE_LIBRARY.CLASS_NAME,sql).getResultList(false); + String rule=""; + Map _FINA = new HashMap(); + for(BizObject fee:feeList){ + rule=""; + String col=fee.getAttribute("relativecode").getString();//ڱеֶ + String colName=fee.getAttribute("itemname").getString();// + String isFina=fee.getAttribute("attribute2").getString();//Ƿ + String fina = ProductParamUtil.getProductParameterValue(productId, "PRD0315",col,"FINAN"); + String cautionMoneymethod = ProductParamUtil.getProductParameterValue(productId, "PRD0315",col,"DepositStyle"); + if(!"".equals(cautionMoneymethod)&&cautionMoneymethod!=null){ + ProductBaseLoanTools.addAppList(appList, "CAUTION_MONEY_METHOD", "coldefaultvalue", cautionMoneymethod); + } + + if("Y".equals(fina)){ + fina = "finatype02"; + }else { + fina = "finatype01"; + } + if(fee.getAttribute("itemno").getString().equals("feetype10")){ + rule=prodSer.getEquipRuleApp(appList, map,col,vali); + }else{ + if(map.containsKey(col)){//Ʒ˸÷ + rule=prodSer.getFeeRuleApp(appList, map, col,colName,vali); + ProductBaseLoanTools.addAppList(appList, col+"_FINA", "coldefaultvalue", fina); + }else{ + if("FINA".equals(isFina)){ + ProductBaseLoanTools.addAppList(appList, col+"_FINA", "colvisible", "0"); + } + ProductBaseLoanTools.addAppList(appList, col, "colvisible", "0"); + + if(fee.getAttribute("itemno").getString().equals("feetype2")){ + ProductBaseLoanTools.addAppList(appList, "CAUTION_DEDUCTION_MONEY", "colvisible", "0"); + ProductBaseLoanTools.addAppList(appList, "CAUTION_MONEY_REMAIN", "colvisible", "0"); + ProductBaseLoanTools.addAppList(appList, "CAUTION_MONEY_METHOD", "colvisible", "0"); + ProductBaseLoanTools.addAppList(appList, "CAUTION_MONEY_METHOD", "colrequired", "0"); + } + if("FINAL_PAYMENT".equals(col)) { + Map _METHOD = new HashMap(); + _METHOD.put("colname", col+"_METHOD"); + _METHOD.put("colvisible", "0"); + _METHOD.put("colrequired", "0"); + appList.add(_METHOD); + } + rule=null; + } + } + if(rule!=null){ + if(sb.length()>1){sb.append(",");} + sb.append("'"+col+"':"+rule+""); + } + } + for(String key:map.keySet()){ + if(key.toUpperCase().indexOf("FEETYPE")>=0){ + rule=prodSer.getFeeRuleApp(appList, map, key,map.get(key).get("colheader"),vali); + if(sb.length()>1){sb.append(",");} + sb.append("'"+key.toUpperCase()+"':"+rule+""); + } + } + sb.append("}"); + return sb.toString(); + } + /** * ֵ * @param doTemp @@ -286,6 +495,27 @@ public class ProductCondition { } return FileOperatorUtil.getMapToJsonStr(rule); } + + public String getProductGraceRulesApp(List> appList,String productId,Vector vali) throws Exception{ + + Map rule=new HashMap(); + //ȡƷ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0311"); + if(map.isEmpty()){ + ProductBaseLoanTools.addAppList(appList, "GRACE", "colvisible", "0"); + }else if(map.containsKey("LT01")&&map.get("LT01").containsKey("isleaseterm")&&"N".equals(map.get("LT01").get("isleaseterm"))){ + ProductBaseLoanTools.addAppList(appList, "GRACE", "colvisible", "0"); + }else{ + if(map.containsKey("LT01")){ + String max=StringUtil.nullToString(map.get("LT01").get("leaseterm-MAX")); + if(max.length()>0){ + rule.put("max",""+max+"@<="); + } + } + } + return FileOperatorUtil.getMapToJsonStr(rule); + } + /** * һڻƻ ڶڻƻ ĩֵ Ƿʾ * @param doTemp @@ -305,6 +535,21 @@ public class ProductCondition { } } + + public void getOtherRuleApp(List> appList,String productId) throws Exception{ + + String[] param={"EQUIP_END_VALUE"}; + //ȡƷ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0311"); + for(int i=0;i> appList,String productId) throws Exception{ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0308"); + if(map.containsKey("PFD01")){//ⷣϢ + String day=map.get("PFD01").get("PenaltyFreeDays"); + if(day.length()>0){ + ProductBaseLoanTools.addAppList(appList, "FREE_DEFA_INTER_DAY", "coldefaultvalue", day); + } + if("N".equals(map.get("PFD01").get("AllowModify"))){ + ProductBaseLoanTools.addAppList(appList, "FREE_DEFA_INTER_DAY", "colreadonly", "1"); + } + } + if(map.containsKey("PENALTY_RATE_DAY")){//Ϣ + String rate=map.get("PENALTY_RATE_DAY").get("PENALTY_RATE_DAY"); + if(rate.length()>0){ + ProductBaseLoanTools.addAppList(appList, "PENA_RATE", "coldefaultvalue", rate); + } + if("N".equals(map.get("PENALTY_RATE_DAY").get("AllowModify"))){ + ProductBaseLoanTools.addAppList(appList, "PENA_RATE", "colreadonly", "1"); + } + } + } + /** * õϢ * @param doTemp @@ -363,6 +631,19 @@ public class ProductCondition { } } } + + public void getProductAdjustRulesApp(List> appList,String productId) throws Exception{ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0320"); + if(map.containsKey("ADJUST_INTEREST")){ + Map rule=map.get("ADJUST_INTEREST"); + if(null != rule.get("rate_float_type") && null != rule.get("adjust_style")) { + //Ϣʽ + ProductBaseLoanTools.addAppList(appList, "ADJUST_TYPE", "coldefaultvalue", rule.get("rate_float_type")); + //ϢЧڵ + ProductBaseLoanTools.addAppList(appList, "ADJUST_STYLE", "coldefaultvalue", rule.get("adjust_style")); + } + } + } /** * ü㷽ʽ * @param doTemp @@ -435,6 +716,71 @@ public class ProductCondition { return "{"+sJson+"}"; } + + public String getProductSettleRulesApp(List> appList,String productId) throws Exception{ + + //㷽ʽ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0301"); + //ֶ + Map> submap=ProductParamUtil.getProductComponentType(productId, "PRD0321"); + String s=""; + + String sJson=""; + for(Map.Entry> entry:map.entrySet()){ + if(s.length()>0)s+=","; + s+="'"+entry.getKey()+"'"; + if(sJson.length()>0)sJson+=","; + sJson+="'"+entry.getKey()+"':"+FileOperatorUtil.getMapToJsonStr(entry.getValue()); + String coldefaultvalue = ""; + for (Map app : appList) { + String colName = app.get("colname") == null ? "" : app.get("colname").toString(); + if ("SETTLE_METHOD".equals(colName)) { + coldefaultvalue = app.get("coldefaultvalue") == null ? "" : app.get("coldefaultvalue").toString(); + break; + } + } + if(entry.getKey().equals(coldefaultvalue)){ + Map values=entry.getValue(); + if(values.containsKey("HolidayAdjust")){ + ProductBaseLoanTools.addAppList(appList, "PLAN_DATE_HOILDAY", "coldefaultvalue", values.get("HolidayAdjust")); + } + if(values.containsKey("InterestHolidayAdjust")){ + ProductBaseLoanTools.addAppList(appList, "INTEREST_DATE_HOLIDAY", "coldefaultvalue", values.get("InterestHolidayAdjust")); + } + if(values.containsKey("RATE")){ + ProductBaseLoanTools.addAppList(appList, "RATE", "coldefaultvalue", values.get("RATE")); + } + if(values.containsKey("AdditionalRate")){ + ProductBaseLoanTools.addAppList(appList, "ADDITIONAL_RATE", "coldefaultvalue", values.get("AdditionalRate")); + } + if(values.containsKey("InterestDayType")){ + ProductBaseLoanTools.addAppList(appList, "INTEREST_DAY_TYPE", "coldefaultvalue", values.get("InterestDayType")); + } + } + //ǰռֱӶȡǰ + Map valMap = entry.getValue(); + for(Entry val : valMap.entrySet()) { + if("DefaultDueDay".equals(val.getKey())) { + if(!"02".equals(val.getValue())) { + sJson = sJson.replaceAll("}", ",ActualDay:" + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + "}"); + ProductBaseLoanTools.addAppList(appList, "DefaultDueDay", "colvisible", "0"); + ProductBaseLoanTools.addAppList(appList, "DefaultDueDay", "colrequired", "0"); + } + break; + } + } + } + if(submap.containsKey("ISSUBSECTION")){ + if(s.length()>0)s+=","; + s+="'even_subsection'"; + } + ProductBaseLoanTools.addAppList(appList, "SETTLE_METHOD", "colreadonly", "1"); + ProductBaseLoanTools.addAppList(appList, "SETTLE_METHOD", "coleditsource", "jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='settle_method' and itemno in ("+s+") order by sortno"); + ProductBaseLoanTools.addAppList(appList, "coldefaultvalue", "colreadonly", s.replaceAll("'", "")); + + return "{"+sJson+"}"; + } + /** * ȡƷ ʽ * @param doTemp @@ -455,6 +801,28 @@ public class ProductCondition { } } } + /** + * + * APP + * ȡƷ ʽ + * @param doTemp + * @param productId + * @return + * @throws Exception + */ + public void getProductFundRulesApp(List> appList, String productId) throws Exception{ + //ȡƷʽ + Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0315"); + for(String key:map.keySet()){ + if(!("EQUIP_AMT".equals(key)||"FIRST_PAYMENT".equals(key))){//豸׸ + if("feetype_test".equals(key)){//Է + this.prodSer.createFeeColRatioApp(appList, key, map.get(key)); + this.prodSer.createFeeColApp(appList, key, map.get(key)); + } + } + } + } + public String getSqlWhere(String condition){ String[] conds=condition.split(","); String s=""; @@ -488,4 +856,27 @@ public class ProductCondition { doTemp.setDefaultValue("YEAR_RATE",YEAR_RATE); } } + + public void getCautionRatioApp(List> appList, String productId) throws Exception{ + //ֶ + Map> productRates = ProductParamUtil.getProductComponentType(productId, "PRD0350"); + Map productRate = productRates.get("product_rate"); + if(productRate != null) { + String incomeNumber = productRate.get("INCOME_NUMBER") == null ? "0" : productRate.get("INCOME_NUMBER"); + ProductBaseLoanTools.addAppList(appList, "INCOME_NUMBER", "coldefaultvalue", incomeNumber); + String periodType = productRate.get("begin_end") == null ? "period_type_0" : productRate.get("begin_end"); + ProductBaseLoanTools.addAppList(appList, "PERIOD_TYPE", "coldefaultvalue", periodType); + String ProductType = productRate.get("ProductType") == null ? "0" : productRate.get("ProductType"); + String isReadOnly = productRate.get("ProductRateReadOnly") == null ? "Y" : productRate.get("ProductRateReadOnly"); + String YEAR_RATE = productRate.get("ProductRate") == null ? "0" : productRate.get("ProductRate"); + //Ϊ0Ϊ1 + if("1".equals(ProductType)){ + ProductBaseLoanTools.addAppList(appList, "YEAR_RATE", "colheader", ""); + } + if("Y".equals(isReadOnly)){ + ProductBaseLoanTools.addAppList(appList, "YEAR_RATE", "colreadyonly", "1"); + } + ProductBaseLoanTools.addAppList(appList, "YEAR_RATE", "coldefaultvalue", YEAR_RATE); + } + } } diff --git a/calc/com/tenwa/reckon/product/ProductConditionService.java b/calc/com/tenwa/reckon/product/ProductConditionService.java index 48e99d02a..e2d0601b1 100644 --- a/calc/com/tenwa/reckon/product/ProductConditionService.java +++ b/calc/com/tenwa/reckon/product/ProductConditionService.java @@ -1,9 +1,14 @@ package com.tenwa.reckon.product; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Vector; +import apx.com.amarsoft.als.apzl.apply.business.loan.product.ProductBaseLoanTools; +import apx.com.amarsoft.als.base.cache.instance.AppAweDoCache; + +import com.amarsoft.are.ARE; import com.amarsoft.awe.dw.ASColumn; import com.amarsoft.awe.dw.ASObjectModel; import com.amarsoft.awe.dw.ui.validator.ValidateRule; @@ -42,6 +47,31 @@ public class ProductConditionService { } return FileOperatorUtil.getMapToJsonStr(rule); } + + //ȡ豸 Ʒ + public String getEquipRuleApp(List> appList,Map> map,String col,Vector vali) throws Exception{ + Map rule=new HashMap(); + if(map.containsKey(col)){ + String min=StringUtil.nullToString(map.get(col).get("CostType08-MIN"));//Сֵ + String max=StringUtil.nullToString(map.get(col).get("CostType08-MAX"));//ֵ + String defaultValue=StringUtil.nullToString(map.get(col).get("CostType08"));//޶ֵ + if(min.length()>0){ + rule.put("min", "豸С"+min+"@>="); + } + if(max.length()>0){ + rule.put("max", "豸С"+max+"@<="); + } + + if(defaultValue.length()>0){ + ProductBaseLoanTools.addAppList(appList, col, "coldefaultvalue", defaultValue); + ProductBaseLoanTools.addAppList(appList, col, "colreadonly", "1"); + } + }else{ + rule.put("0", "豸0@>"); + } + ProductBaseLoanTools.addAppList(appList, col, "colvalidat", rule); + return FileOperatorUtil.getMapToJsonStr(rule); + } //ȡ豸 public String getFeeRule(ASObjectModel doTemp,Map> map,String col,String colName,Vector vali)throws Exception{ //CostType05 Ƿʾ CostType06 뷽ʽ CostType07 CostType08 ޶ CostType09 ޶ @@ -142,6 +172,135 @@ public class ProductConditionService { return "{"+sJson+"}"; } + @SuppressWarnings("unchecked") + public String getFeeRuleApp(List> appList,Map> map,String col,String colName,Vector vali)throws Exception{ + //CostType05 Ƿʾ CostType06 뷽ʽ CostType07 CostType08 ޶ CostType09 ޶ + Map rule=new HashMap(); + Map ratioRule=new HashMap(); + Map aweDo = AppAweDoCache.getAppAweDoCachePool(); + Map doTemplate = null; + List> doLibrary = null; + try { + doTemplate = (Map) aweDo.get("LoanSimulationBasicInfoApp"); + doLibrary = (List>) doTemplate.get("library"); + } catch (Exception e) { + ARE.getLog().error(e); + return ""; + } + String sontno2 = ""; + + String sontno3 = ""; + String sontno4 = ""; + String sontno5 = ""; + String groupId = ""; + for (Map colM2 : doLibrary) { + String colName2 = colM2.get("colname") == null ? "" : colM2.get("colname").toString(); + if (col.equalsIgnoreCase(colName2)) { + sontno2 = colM2.get("sortno") == null ? "" : colM2.get("sortno").toString(); + groupId = colM2.get("groupid") == null ? "" : colM2.get("groupid").toString(); + } + + if ("CAUTION_DEDUCTION_MONEY".equalsIgnoreCase(colName2)) sontno3 = colM2.get("sortno") == null ? "" : colM2.get("sortno").toString(); + if ("CAUTION_MONEY_REMAIN".equalsIgnoreCase(colName2)) sontno4 = colM2.get("sortno") == null ? "" : colM2.get("sortno").toString(); + if ("CAUTION_MONEY_METHOD".equalsIgnoreCase(colName2)) sontno5 = colM2.get("sortno") == null ? "" : colM2.get("sortno").toString(); + } + String sJson=""; + if(map.containsKey(col)){ + String min=StringUtil.nullToString(map.get(col).get("CostType08-MIN"));//Сֵ + String max=StringUtil.nullToString(map.get(col).get("CostType08-MAX"));//ֵ + String defaultValue=StringUtil.nullToString(map.get(col).get("CostType08"));//޶ֵ + String isShowRatio=StringUtil.nullToString(map.get(col).get("CostType05"));//Ƿʾ + String inputModel=StringUtil.nullToString(map.get(col).get("CostType06"));//뷽ʽ + String oder=StringUtil.nullToString(map.get(col).get("DISPLAY_ORDER"));// + if(!col.equals("FIRST_PAYMENT")){ + ProductBaseLoanTools.addAppList(appList, col, "sortno", oder+sontno2); + if(col.equals("CAUTION_MONEY")){ + Map CAUTION_DEDUCTION_MONEY = new HashMap(); + CAUTION_DEDUCTION_MONEY.put("colname", "CAUTION_DEDUCTION_MONEY"); + appList.add(CAUTION_DEDUCTION_MONEY); + ProductBaseLoanTools.addAppList(appList, CAUTION_DEDUCTION_MONEY.get("colname").toString(), "sortno", oder+sontno3); + Map CAUTION_MONEY_REMAIN = new HashMap(); + CAUTION_MONEY_REMAIN.put("colname", "CAUTION_MONEY_REMAIN"); + appList.add(CAUTION_MONEY_REMAIN); + ProductBaseLoanTools.addAppList(appList, CAUTION_MONEY_REMAIN.get("colname").toString(), "sortno", oder+sontno4); + Map CAUTION_MONEY_METHOD = new HashMap(); + CAUTION_MONEY_METHOD.put("colname", col); + appList.add(CAUTION_MONEY_METHOD); + ProductBaseLoanTools.addAppList(appList, CAUTION_MONEY_METHOD.get("colname").toString(), "sortno", oder+sontno5); + } + } + +// String groupId = doTemp.getColumnAttribute(col, "groupid"); + if("0070".equals(groupId)) { + rule.put("financing", "true"); + } + + String ratioMin=StringUtil.nullToString(map.get(col).get("CostType09-MIN"));//Сֵ + String ratioMax=StringUtil.nullToString(map.get(col).get("CostType09-MAX"));//Сֵ + String ratioDefaultValue=StringUtil.nullToString(map.get(col).get("CostType09"));//޶ֵ + + rule.put("ratioFee", StringUtil.nullToString(map.get(col).get("CostType07")));//ο + rule.put("ratioType", inputModel);//㷽ʽ + + rule.put("min", min); + rule.put("max", max); + rule.put("defaultValue", defaultValue); + String para=""; + if(min.length()>0){ + rule.put("min", colName+"С"+min+"@>="); + } + if(max.length()>0){ + rule.put("min", colName+"ܴ"+max+"@<="); + } + + //޶ + ratioRule.put("min", ratioMin); + ratioRule.put("max", ratioMax); + ratioRule.put("defaultValue", ratioDefaultValue); + para=""; + if(ratioMin.length()>0){ + ratioRule.put("min", colName+"С"+ratioMin+"%@>="); + } + if(ratioMax.length()>0){ + ratioRule.put("min", colName+"ܴ"+ratioMax+"%@<="); + } + + if("InputMode03".equals(inputModel)){// + rule.put("isShowRatio","true"); + if(defaultValue.length()>0){ + ProductBaseLoanTools.addAppList(appList, col, "defaultValue", defaultValue); + } + if(ratioDefaultValue.length()>0){ + ProductBaseLoanTools.addAppList(appList, col+"_RATIO", "defaultValue", ratioDefaultValue); + } + }else if("InputMode02".equals(inputModel)){// + rule.put("isShowRatio","true"); + ProductBaseLoanTools.addAppList(appList, col, "colreadonly", "1"); + if(ratioDefaultValue.length()>0){ + ProductBaseLoanTools.addAppList(appList, col+"_RATIO", "colreadonly", "1"); + ProductBaseLoanTools.addAppList(appList, col+"_RATIO", "defaultValue", ratioDefaultValue); + } + }else{ + rule.put("isShowRatio","true"); + ProductBaseLoanTools.addAppList(appList, col+"_RATIO", "colreadonly", "1"); + if(defaultValue.length()>0){ + ProductBaseLoanTools.addAppList(appList, col, "defaultValue", defaultValue); + ProductBaseLoanTools.addAppList(appList, col, "colreadonly", "1"); + ProductBaseLoanTools.addAppList(appList, col+"_FINA", "colreadonly", "1"); + } + if("N".equals(isShowRatio)){ + ProductBaseLoanTools.addAppList(appList, col, "colfilterrefid", ""); + rule.put("isShowRatio","false"); + } + } + for(Map.Entry entry:rule.entrySet()){ + sJson+="'"+entry.getKey()+"':'"+entry.getValue()+"',"; + } + sJson+="'ratioRule':"+FileOperatorUtil.getMapToJsonStr(ratioRule); + } + return "{"+sJson+"}"; + } + /** * ģֶУ * @param vali 򼯺 @@ -217,4 +376,74 @@ public class ProductConditionService { col.setAttribute("GROUPID", "fund_info");// return col; } + + public void createFeeColApp(List> appList, String colname,Map column){ + colname = colname.toUpperCase(); + //ʹ + ProductBaseLoanTools.addAppList(appList, colname, "COLNAME".toLowerCase(), colname); + //ʾ + ProductBaseLoanTools.addAppList(appList, colname, "COLINDEX".toLowerCase(), column.get("DISPLAY_ORDER")); + // + ProductBaseLoanTools.addAppList(appList, colname, "SORTNO".toLowerCase(), column.get("DISPLAY_ORDER")); + //ǷЧ 1 Ч 0 Ч + ProductBaseLoanTools.addAppList(appList, colname, "ISINUSE".toLowerCase(), "1"); + // JBO + ProductBaseLoanTools.addAppList(appList, colname, "COLACTUALNAME".toLowerCase(), "''"); + //ֵ + ProductBaseLoanTools.addAppList(appList, colname, "COLTYPE".toLowerCase(), "Number"); + //Ĭֵ + ProductBaseLoanTools.addAppList(appList, colname, "COLDEFAULTVALUE".toLowerCase(), "0"); + //ʾ + ProductBaseLoanTools.addAppList(appList, colname, "COLHEADER".toLowerCase(), column.get("colheader")); + //༭ʽ + ProductBaseLoanTools.addAppList(appList, colname, "COLEDITSTYLE".toLowerCase(), column.get("Text")); + //ʽ + ProductBaseLoanTools.addAppList(appList, colname, "COLCHECKFORMAT".toLowerCase(), "2"); + //뷽ʽ + ProductBaseLoanTools.addAppList(appList, colname, "COLALIGN".toLowerCase(), "1"); + //ɼ + ProductBaseLoanTools.addAppList(appList, colname, "COLVISIBLE".toLowerCase(), "1"); + //ֻ + ProductBaseLoanTools.addAppList(appList, colname, "COLREADONLY".toLowerCase(), "0"); + // + ProductBaseLoanTools.addAppList(appList, colname, "COLREQUIRED".toLowerCase(), "1"); + // + ProductBaseLoanTools.addAppList(appList, colname, "GROUPID".toLowerCase(), "fund_info"); + // + ProductBaseLoanTools.addAppList(appList, colname, "colfilterrefid".toLowerCase(), colname+"_RATIO"); + } + + public void createFeeColRatioApp(List> appList,String colname,Map column){ + colname = colname.toUpperCase(); + //ʹ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLNAME".toLowerCase(), colname+"_RATIO"); + //ʾ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLINDEX".toLowerCase(), column.get("DISPLAY_ORDER")); + // + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "SORTNO".toLowerCase(), column.get("DISPLAY_ORDER")); + //ǷЧ 1 Ч 0 Ч + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "ISINUSE".toLowerCase(), "1"); + // JBO + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLACTUALNAME".toLowerCase(), "''"); + //ֵ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLTYPE".toLowerCase(), "Number"); + //Ĭֵ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLDEFAULTVALUE".toLowerCase(), "0"); + //ʾ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLHEADER".toLowerCase(), column.get("colheader")); + //༭ʽ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLEDITSTYLE".toLowerCase(), column.get("Text")); + //ʽ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLCHECKFORMAT".toLowerCase(), "2"); + //뷽ʽ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLALIGN".toLowerCase(), "1"); + //ɼ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLVISIBLE".toLowerCase(), "0"); + //ֻ + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLREADONLY".toLowerCase(), "0"); + // + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "COLREQUIRED".toLowerCase(), "1"); + // + ProductBaseLoanTools.addAppList(appList, colname+"_RATIO", "GROUPID".toLowerCase(), "fund_info"); + } } diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/upload/service/impl/BusinessDocUploadServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/upload/service/impl/BusinessDocUploadServiceImpl.java index 69bf52edf..e2cf315cb 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/upload/service/impl/BusinessDocUploadServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/upload/service/impl/BusinessDocUploadServiceImpl.java @@ -31,14 +31,22 @@ public class BusinessDocUploadServiceImpl implements BusinessDocUploadService { private Map fieldMap; private List> fileList; + public void setFieldMap(Map fieldMap) { + this.fieldMap = fieldMap; + } + + public void setFileList(List> fileList) { + this.fileList = fileList; + } + @SuppressWarnings({ "unchecked", "deprecation" }) public Map upload(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx, Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception { Map testMap = (Map) MultipartDataUtil .readRequestParam(request, "UTF-8"); - fieldMap = (Map) testMap.get("fieldMap"); // - fileList = (List>) testMap.get("fileList"); // б + fieldMap = fieldMap == null ? (Map) testMap.get("fieldMap") : fieldMap; // + fileList = fileList == null ? (List>) testMap.get("fileList") : fileList; // б String applyType = "BusinessApplyApply"; String flowUnid = fieldMap.get("objectno") == null ? "" : fieldMap.get( "objectno").toString(); // ̺ diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/controller/LoanSimulationBasicInfoController.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/controller/LoanSimulationBasicInfoController.java index 93d109323..1bd1d5b23 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/controller/LoanSimulationBasicInfoController.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/controller/LoanSimulationBasicInfoController.java @@ -19,6 +19,23 @@ import com.base.util.ReturnMapUtil; @Path("/loan/simulation/basic") public class LoanSimulationBasicInfoController { + @Path("/product") + @POST + public Map product(@Context HttpServletRequest request, @Context HttpServletResponse response, + @Context JBOTransaction tx, @Context Transaction sqlca) throws Exception { + ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca); + ARE.getLog().info( + "[CONTROLLER] LoanSimulationBasicInfo run ................."); + ARE.getLog().info("[Path] /loan/simulation/basic/product" + " run ................."); + + LoanSimulationBasicService service = new LoanSimulationBasicServiceImpl(); + try { + return service.product(request, response, tx, sqlca, ReturnMapUtil); + } catch (Exception e) { + return ReturnMapUtil.rollback(e); + } + } + @Path("/query") @POST public Map queryInfo(@Context HttpServletRequest request, @Context HttpServletResponse response, diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/service/LoanSimulationBasicService.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/service/LoanSimulationBasicService.java index c31632f44..35a647414 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/service/LoanSimulationBasicService.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/service/LoanSimulationBasicService.java @@ -11,6 +11,11 @@ import com.amarsoft.awe.util.Transaction; import com.base.util.ReturnMapUtil; public interface LoanSimulationBasicService { + Map product(@Context HttpServletRequest request, + @Context HttpServletResponse response, @Context JBOTransaction tx, + @Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) + throws Exception; + Map queryInfo(@Context HttpServletRequest request, @Context HttpServletResponse response, @Context JBOTransaction tx, @Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/service/impl/LoanSimulationBasicServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/service/impl/LoanSimulationBasicServiceImpl.java index a8287f996..f8ca86e36 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/service/impl/LoanSimulationBasicServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/service/impl/LoanSimulationBasicServiceImpl.java @@ -1,5 +1,8 @@ package apx.com.amarsoft.als.apzl.apply.business.loan.service.impl; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; @@ -7,26 +10,67 @@ import javax.servlet.http.HttpServletResponse; import apx.com.amarsoft.als.apzl.apply.business.loan.manage.LoanSimulationBasicInfoAppInfoDoManage; import apx.com.amarsoft.als.apzl.apply.business.loan.manage.LoanSimulationBasicInfoAppInfoSaveDoManage; +import apx.com.amarsoft.als.apzl.apply.business.loan.product.ProductBaseLoanTools; import apx.com.amarsoft.als.apzl.apply.business.loan.service.LoanSimulationBasicService; import com.amarsoft.app.lc.workflow.action.GetFlowAction; 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.base.constant.RestfullConstant; +import com.base.util.JsonUtil; import com.base.util.MultipartDataUtil; import com.base.util.ReturnMapUtil; -import com.tenwa.reckon.bean.TabCalBean; import com.tenwa.reckon.executor.CreateTransactionExecutor; -import com.tenwa.reckon.util.TbBeanTools; -import com.tenwa.util.SerialNumberUtil; public class LoanSimulationBasicServiceImpl implements LoanSimulationBasicService { private Map fieldMap; + @SuppressWarnings("unchecked") + public Map product(HttpServletRequest request, + HttpServletResponse response, JBOTransaction tx, Transaction sqlca, + ReturnMapUtil ReturnMapUtil) throws Exception { + + Map testMap = (Map) MultipartDataUtil + .readRequestParam(request, "UTF-8"); + fieldMap = (Map) testMap.get("fieldMap"); + + String flowunid = fieldMap.get("objectNo".toLowerCase()) == null ? "" + : fieldMap.get("objectNo".toLowerCase()).toString(); + + fieldMap.put("flowunid".toLowerCase(), flowunid); + fieldMap.put("flowunid".toUpperCase(), flowunid); + fieldMap.put("flow_unid".toLowerCase(), flowunid); + fieldMap.put("flow_unid".toUpperCase(), flowunid); + + // ȡ ֵˮ + Map baseMap = ProductBaseLoanTools.deadWork(null, null, + null, null, null, flowunid, tx); + // ù + List> appList = new ArrayList>(); + + String calcRules = ProductBaseLoanTools + .getProductFundRules(appList, baseMap.get("productId").toString()); + + Map calcRulesMap = JsonUtil.str2JSONObject(calcRules); + + Map body = new HashMap(); + body.put("planCName", baseMap.get("planCName")); + body.put("plannumber", baseMap.get("plannumber")); + body.put("tb", baseMap.get("tb")); + body.put("calType", baseMap.get("calType")); + + body.put("productId", baseMap.get("productId")); + body.put("productDatas", appList); + body.put("productFundRules", calcRulesMap); + + ReturnMapUtil.setReturnMap(body, + RestfullConstant.baseProperty.get("success").toString(), ""); + return ReturnMapUtil.getReturnMap(); + } + @SuppressWarnings("unchecked") public Map queryInfo(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx, Transaction sqlca, @@ -37,65 +81,22 @@ public class LoanSimulationBasicServiceImpl implements String flowunid = fieldMap.get("objectNo".toLowerCase()) == null ? "" : fieldMap.get("objectNo".toLowerCase()).toString(); + String planCName = fieldMap.get("planCName".toLowerCase()) == null ? null + : fieldMap.get("planCName".toLowerCase()).toString(); // String plannumber = fieldMap.get("plannumber".toLowerCase()) == null ? null : fieldMap.get("plannumber".toLowerCase()).toString(); // - String productId = fieldMap.get("ProductId".toLowerCase()) == null ? null - : fieldMap.get("ProductId".toLowerCase()).toString(); - String calType = fieldMap.get("calType".toLowerCase()) == null ? null - : fieldMap.get("calType".toLowerCase()).toString(); + String conditionTB = fieldMap.get("tb".toLowerCase()) == null ? null + : fieldMap.get("tb".toLowerCase()).toString(); fieldMap.put("flowunid".toLowerCase(), flowunid); fieldMap.put("flowunid".toUpperCase(), flowunid); fieldMap.put("flow_unid".toLowerCase(), flowunid); fieldMap.put("flow_unid".toUpperCase(), flowunid); - /* ȡ */ - /* ݲж Ƿȥݿѯ */ - BizObject flow = GetFlowAction.getFlowBussinessObject(flowunid); - if (productId == null) { - productId = flow.getAttribute("productId").getString(); - } - if (calType == null) { - calType = "proj_process"; - } - - TabCalBean tcb = TbBeanTools.getTabInfo(calType); - String planCName = tcb.getPlanCName(); - // - if (plannumber == null) { - if ("pay_process".equals(calType) - || "onHire_process".equals(calType)) { - BizObject condtion = JBOFactory - .createBizObjectQuery( - "jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP", - "flowunid=:flowunid and PAYMENT_NUMBER is not null and length(PAYMENT_NUMBER)>0 ") - .setParameter("flowunid", flowunid) - .getSingleResult(false); - if (condtion != null) { - plannumber = condtion.getAttribute(planCName).getString(); - } - } else { -// String planType = ProductParamUtil.getProductParameterValue( -// productId, "PRD0314", "planinformation"); -// if ("SinglePlan".equals(planType)) { - BizObject condtion = JBOFactory - .createBizObjectQuery( - "jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP", - "flowunid=:flowunid") - .setParameter("flowunid", flowunid) - .getSingleResult(false); - if (condtion != null) { - plannumber = condtion.getAttribute(planCName) - .getString(); - } -// } - } - } - LoanSimulationBasicInfoAppInfoDoManage manage = new LoanSimulationBasicInfoAppInfoDoManage(); manage.setDono("LoanSimulationBasicInfoApp2"); manage.setsAddWhere(" and " + planCName + "='" + plannumber + "'"); - manage.setsJboClass(tcb.getCondition_tb()); + manage.setsJboClass(conditionTB); manage.setFieldMap(fieldMap); return manage.queryDefaultDo(request, sqlca, tx, ReturnMapUtil); } @@ -112,88 +113,20 @@ public class LoanSimulationBasicServiceImpl implements : fieldMap.get("objectNo".toLowerCase()).toString(); String plannumber = fieldMap.get("plannumber".toLowerCase()) == null ? null : fieldMap.get("plannumber".toLowerCase()).toString(); // - String productId = fieldMap.get("ProductId".toLowerCase()) == null ? null - : fieldMap.get("ProductId".toLowerCase()).toString(); - String calType = fieldMap.get("calType".toLowerCase()) == null ? null - : fieldMap.get("calType".toLowerCase()).toString(); + String planCName = fieldMap.get("planCName".toLowerCase()) == null ? null + : fieldMap.get("planCName".toLowerCase()).toString(); // + String conditionTB = fieldMap.get("tb".toLowerCase()) == null ? null + : fieldMap.get("tb".toLowerCase()).toString(); fieldMap.put("flowunid".toLowerCase(), flowunid); fieldMap.put("flowunid".toUpperCase(), flowunid); fieldMap.put("flow_unid".toLowerCase(), flowunid); fieldMap.put("flow_unid".toUpperCase(), flowunid); - /* ȡ */ - /* ݲж Ƿȥݿѯ */ - BizObject flow = GetFlowAction.getFlowBussinessObject(flowunid); - if (productId == null) { - productId = flow.getAttribute("productId").getString(); - } - if (calType == null) { - calType = "proj_process"; - } - - TabCalBean tcb = TbBeanTools.getTabInfo(calType); - String planCName = tcb.getPlanCName(); - // - if (plannumber == null) { - if ("pay_process".equals(calType) - || "onHire_process".equals(calType)) { - BizObject condtion = JBOFactory - .createBizObjectQuery( - "jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP", - "flowunid=:flowunid and PAYMENT_NUMBER is not null and length(PAYMENT_NUMBER)>0 ") - .setParameter("flowunid", flowunid) - .getSingleResult(false); - if (condtion != null) { - plannumber = condtion.getAttribute(planCName).getString(); - } - } else { -// String planType = ProductParamUtil.getProductParameterValue( -// productId, "PRD0314", "planinformation"); -// if ("SinglePlan".equals(planType)) { - BizObject condtion = JBOFactory - .createBizObjectQuery( - "jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP", - "flowunid=:flowunid") - .setParameter("flowunid", flowunid) - .getSingleResult(false); - if (condtion != null) { - plannumber = condtion.getAttribute(planCName) - .getString(); - } -// } - } - } - - // Զɷ - if (plannumber == null) { - String sSerialType = ""; - if ("proj_process".equals(calType)) { - BizObject proj = JBOFactory - .createBizObjectQuery( - "jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP", - "flowunid=:flowunid") - .setParameter("flowunid", flowunid) - .getSingleResult(false); - sSerialType = proj.getAttribute("PROJECT_NO").getString(); - } else { - BizObject contract = JBOFactory - .createBizObjectQuery( - "jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP", - "flowunid=:flowunid") - .setParameter("flowunid", flowunid) - .getSingleResult(false); - sSerialType = contract.getAttribute("CONTRACT_NO").getString(); - } - plannumber = SerialNumberUtil.getPlannumber(sSerialType, calType, - tx); - tx.commit(); - } - LoanSimulationBasicInfoAppInfoSaveDoManage manage = new LoanSimulationBasicInfoAppInfoSaveDoManage(); manage.setDono("LoanSimulationBasicInfoApp2"); manage.setAddWhere(" and " + planCName + "='" + plannumber + "'"); - manage.setsJboClass(tcb.getCondition_tb()); + manage.setsJboClass(conditionTB); manage.setFieldMap(fieldMap); String userId = request.getSession().getAttribute("userid").toString(); ASUser user = new ASUser(userId, sqlca); @@ -214,16 +147,14 @@ public class LoanSimulationBasicServiceImpl implements : fieldMap.get("objectNo".toLowerCase()).toString(); String plannumber = fieldMap.get("plannumber".toLowerCase()) == null ? null : fieldMap.get("plannumber".toLowerCase()).toString(); // - String productId = fieldMap.get("ProductId".toLowerCase()) == null ? null - : fieldMap.get("ProductId".toLowerCase()).toString(); - String calType = fieldMap.get("calType".toLowerCase()) == null ? null - : fieldMap.get("calType".toLowerCase()).toString(); fieldMap.put("flowunid".toLowerCase(), flowunid); fieldMap.put("flowunid".toUpperCase(), flowunid); fieldMap.put("flow_unid".toLowerCase(), flowunid); fieldMap.put("flow_unid".toUpperCase(), flowunid); + String productId = null; + String calType = null; /* ȡ */ /* ݲж Ƿȥݿѯ */ BizObject flow = GetFlowAction.getFlowBussinessObject(flowunid); @@ -234,39 +165,6 @@ public class LoanSimulationBasicServiceImpl implements calType = "proj_process"; } - TabCalBean tcb = TbBeanTools.getTabInfo(calType); - String planCName = tcb.getPlanCName(); - // - if (plannumber == null) { - if ("pay_process".equals(calType) - || "onHire_process".equals(calType)) { - BizObject condtion = JBOFactory - .createBizObjectQuery( - "jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP", - "flowunid=:flowunid and PAYMENT_NUMBER is not null and length(PAYMENT_NUMBER)>0 ") - .setParameter("flowunid", flowunid) - .getSingleResult(false); - if (condtion != null) { - plannumber = condtion.getAttribute(planCName).getString(); - } - } else { -// String planType = ProductParamUtil.getProductParameterValue( -// productId, "PRD0314", "planinformation"); -// if ("SinglePlan".equals(planType)) { - BizObject condtion = JBOFactory - .createBizObjectQuery( - "jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP", - "flowunid=:flowunid") - .setParameter("flowunid", flowunid) - .getSingleResult(false); - if (condtion != null) { - plannumber = condtion.getAttribute(planCName) - .getString(); - } -// } - } - } - CreateTransactionExecutor cte = new CreateTransactionExecutor(); cte.setCalType(calType); cte.setFlowunid(flowunid); diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/init/InitDocListTools.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/init/InitDocListTools.java index 6074355d7..0b070f7dc 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/init/InitDocListTools.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/init/InitDocListTools.java @@ -20,79 +20,85 @@ import com.tenwa.doc.action.DocListInitAction; public class InitDocListTools { @SuppressWarnings({ "rawtypes", "unchecked" }) - public static void initDocList(String flowUnid, String userId, String carAttributes) throws Exception { - BizObjectManager objectManage = JBOFactory - .getBizObjectManager(FLOW_OBJECT.CLASS_NAME); - BizObject object = objectManage.createQuery("OBJECTNO=:OBJECTNO") - .setParameter("OBJECTNO", flowUnid).getSingleResult(false); - if (null == object) - return; - String flowNo = object.getAttribute("flowno") == null ? "" : object - .getAttribute("flowno").toString(); - String sObjectType = object.getAttribute("ObjectType") == null ? "" - : object.getAttribute("ObjectType").toString(); - String productId = ""; - BizObject flow = GetFlowAction.getFlowBussinessObject(flowUnid); - if (null == flow) - return; - productId = flow.getAttribute("productId").getString(); - - BizObjectManager businessManage = JBOFactory - .getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME); - BizObject business = businessManage.createQuery("flow_unid=:flow_unid") - .setParameter("flow_unid", flowUnid).getSingleResult(false); - if (null == business) - return; - List list; + public static boolean initDocList(String flowUnid, String userId, String carAttributes) throws Exception { try { - list = ProductParamUtil.getProductDocInfo(productId, "PRD0412"); - } catch (Exception e) { - ARE.getLog().error(e); - return; - } - String type = ""; - String docList = ""; - for (int i = 0; i < list.size(); i++) { - Map map = (Map) list.get(i); - if ("BusinessApplyFlow".equals(map.get("FLOW_INFO").toString())) { - type = map.get("TYPE").toString(); - if ("SingleRow".equals(type)) { - docList = map.get("DOCLIST").toString(); - } else { - List l = (List) map.get("DOCCONFIG"); - docList = l.toString(); + BizObjectManager objectManage = JBOFactory + .getBizObjectManager(FLOW_OBJECT.CLASS_NAME); + BizObject object = objectManage.createQuery("OBJECTNO=:OBJECTNO") + .setParameter("OBJECTNO", flowUnid).getSingleResult(false); + if (null == object) + return false; + String flowNo = object.getAttribute("flowno") == null ? "" : object + .getAttribute("flowno").toString(); + String sObjectType = object.getAttribute("ObjectType") == null ? "" + : object.getAttribute("ObjectType").toString(); + String productId = ""; + BizObject flow = GetFlowAction.getFlowBussinessObject(flowUnid); + if (null == flow) + return false; + productId = flow.getAttribute("productId").getString(); + + BizObjectManager businessManage = JBOFactory + .getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME); + BizObject business = businessManage.createQuery("flow_unid=:flow_unid") + .setParameter("flow_unid", flowUnid).getSingleResult(false); + if (null == business) + return false; + List list; + try { + list = ProductParamUtil.getProductDocInfo(productId, "PRD0412"); + } catch (Exception e) { + ARE.getLog().error(e); + return false; + } + String type = ""; + String docList = ""; + for (int i = 0; i < list.size(); i++) { + Map map = (Map) list.get(i); + if ("BusinessApplyFlow".equals(map.get("FLOW_INFO").toString())) { + type = map.get("TYPE").toString(); + if ("SingleRow".equals(type)) { + docList = map.get("DOCLIST").toString(); + } else { + List l = (List) map.get("DOCCONFIG"); + docList = l.toString(); + } } } - } - String docClassItemno = docList;// CurPage.getParameter("docList"); - String[] itemnos=docClassItemno.split(","); - String s=""; - for(int i=0;i0){ - s=s.substring(0, s.length()-1); - } - - try { - ASUser CurUser = new ASUser(userId); - Map docParam=new HashMap(); - Map other=new HashMap(); - other.put("carAttributes", carAttributes); - docParam.put("ObjectType",sObjectType); - docParam.put("proj_id", flow.getAttribute("proj_id").getString()); - docParam.put("contract_id", flow.getAttribute("contract_id").getString()); - docParam.put("flow_unid", flowUnid); - docParam.put("inputtime", StringFunction.getTodayNow()); - docParam.put("inputuserid", CurUser.getUserID()); - docParam.put("inputorgid", CurUser.getOrgID()); - @SuppressWarnings("deprecation") - Configure CurConfig = Configure.getInstance(); - //жǷڣھʹñʱ - DocListInitAction.initDocList(docParam,other,docClassItemno,CurConfig); + String docClassItemno = docList;// CurPage.getParameter("docList"); + String[] itemnos=docClassItemno.split(","); + String s=""; + for(int i=0;i0){ + s=s.substring(0, s.length()-1); + } + + try { + ASUser CurUser = new ASUser(userId); + Map docParam=new HashMap(); + Map other=new HashMap(); + other.put("carAttributes", carAttributes); + docParam.put("ObjectType",sObjectType); + docParam.put("proj_id", flow.getAttribute("proj_id").getString()); + docParam.put("contract_id", flow.getAttribute("contract_id").getString()); + docParam.put("flow_unid", flowUnid); + docParam.put("inputtime", StringFunction.getTodayNow()); + docParam.put("inputuserid", CurUser.getUserID()); + docParam.put("inputorgid", CurUser.getOrgID()); + @SuppressWarnings("deprecation") + Configure CurConfig = Configure.getInstance(); + //жǷڣھʹñʱ + DocListInitAction.initDocList(docParam,other,docClassItemno,CurConfig); + } catch (Exception e) { + ARE.getLog().error(e); + return false; + } } catch (Exception e) { ARE.getLog().error(e); - return; + return false; } + return true; } } diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java index 79b35be73..f1e0dfdde 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java @@ -1,24 +1,29 @@ package apx.com.amarsoft.als.apzl.apply.business.start.service.impl; +import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import apx.com.amarsoft.als.apzl.apply.business.doc.upload.service.BusinessDocUploadService; +import apx.com.amarsoft.als.apzl.apply.business.doc.upload.service.impl.BusinessDocUploadServiceImpl; import apx.com.amarsoft.als.apzl.apply.business.start.bo.BusinessBO; -import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService; import apx.com.amarsoft.als.apzl.apply.business.start.init.InitDocListTools; +import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService; import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.awe.util.Transaction; import com.base.constant.RestfullConstant; +import com.base.util.DateUtil; import com.base.util.MultipartDataUtil; import com.base.util.ReturnMapUtil; public class BusinessApplyStartServiceImpl implements BusinessApplyStartService { private Map fieldMap; - + private List> fileList; @SuppressWarnings("unchecked") public Map applyStart(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx, Transaction sqlca, @@ -27,6 +32,7 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService Map testMap = (Map) MultipartDataUtil .readRequestParam(request, "UTF-8"); fieldMap = (Map) testMap.get("fieldMap"); + fileList = (List>) testMap.get("fileList"); BusinessBO bo = new BusinessBO(fieldMap, tx); tx.commit(); String sReturnInfo = bo.getMsg(); @@ -44,7 +50,26 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService ReturnMapUtil.setReturnMap(body, RestfullConstant.baseProperty.get("success").toString(), "ɹ"); - InitDocListTools.initDocList(params.get("FlowUnid"), fieldMap.get("userid").toString(), bo.getCarAttributes()); + // ظ + boolean flag = InitDocListTools.initDocList(params.get("FlowUnid"), + fieldMap.get("userid").toString(), bo.getCarAttributes()); + + String certType = bo.getCerttype(); + String date = DateUtil.getDateTime(new Date()); + if (flag && "ind01".equals(certType.toLowerCase()) + && (fileList != null && fileList.size() > 0)) { // ֤棩Ƭ + fieldMap.put("objectNo".toUpperCase(), params.get("FlowUnid")); + fieldMap.put("objectNo".toLowerCase(), params.get("FlowUnid")); + + fieldMap.put("docname".toUpperCase(), "֤棩"); + fieldMap.put("docname".toLowerCase(), "֤棩"); + + fieldMap.put("remark".toUpperCase(), "ҵֻAPP - ϴƬ - " + date); + fieldMap.put("remark".toLowerCase(), "ҵֻAPP - ϴƬ - " + date); + BusinessDocUploadServiceImpl service = new BusinessDocUploadServiceImpl(); + service.setFieldMap(fieldMap); + service.setFileList(fileList); + } } else if (sReturnInfo.startsWith("failed")) { ReturnMapUtil.setReturnMap(null, RestfullConstant.baseProperty.get("FAIL").toString(), From fcadd46bd846fad82386f2e05721f949b6045eae Mon Sep 17 00:00:00 2001 From: amarsoft Date: Wed, 1 Aug 2018 10:23:25 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=87=AD=E8=AF=81=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreateVoucherContractOnhireChange.java | 4 ++-- .../CreateVoucherContractTerminate.java | 8 ++++---- .../CreateVoucherCustCautionMoneyIncome.java | 4 ++-- .../CreateVoucherCustomerRentOrFee.java | 2 +- .../CreateVoucherProcess/CreateVoucherHandlingMoney.java | 2 +- .../CreateVoucherLoanDistributor.java | 2 +- .../CreateVoucherMonthSettlement.java | 4 ++-- .../CreateVoucherProcess/CreateVoucherRentIncome.java | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractOnhireChange.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractOnhireChange.java index 4ff270528..4963b23aa 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractOnhireChange.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractOnhireChange.java @@ -42,11 +42,11 @@ public class CreateVoucherContractOnhireChange { map.put("FlowUnid", FlowUnid); if("PZ2018072100000049".equals(VOUCHERNO)){ - sql="SELECT LRPT.SUMINTE - LRP.SUMINTE AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LB_CONTRACT_INFO LCI INNER JOIN (SELECT MAX(CONTRACT_ID) CONTRACT_ID,SUM(ROUND(INTEREST / 1.06, 2)) SUMINTE,FLOWUNID FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.CONTRACT_ID = LCI.ID INNER JOIN (SELECT CONTRACT_ID,SUM(ROUND(INTEREST / 1.06, 2)) SUMINTE FROM LC_RENT_PLAN GROUP BY CONTRACT_ID) LRP ON LRP.CONTRACT_ID = LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO = LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LRPT.FLOWUNID = :FLOWUNID "; + sql="SELECT LRPT.SUMINTE - LRP.SUMINTE AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LB_CONTRACT_INFO LCI INNER JOIN (SELECT MAX(CONTRACT_ID) CONTRACT_ID,SUM(ROUND(INTEREST / 1.06, 2)) SUMINTE,FLOWUNID FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.CONTRACT_ID = LCI.ID INNER JOIN (SELECT CONTRACT_ID,SUM(ROUND(INTEREST / 1.06, 2)) SUMINTE FROM LC_RENT_PLAN GROUP BY CONTRACT_ID) LRP ON LRP.CONTRACT_ID = LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO = LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LRPT.FLOWUNID = :FLOWUNID "; } if("PZ2018072100000050".equals(VOUCHERNO)){ - sql="SELECT LRPT.SUMINTE-LRP.SUMINTE AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME ,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LB_CONTRACT_INFO LCI INNER JOIN (SELECT MAX(CONTRACT_ID) CONTRACT_ID,SUM(INTEREST-ROUND(INTEREST/1.06,2))SUMINTE, FLOWUNID FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.CONTRACT_ID=LCI.ID INNER JOIN (SELECT CONTRACT_ID,SUM(INTEREST-ROUND(INTEREST/1.06,2)) SUMINTE FROM LC_RENT_PLAN GROUP BY CONTRACT_ID) LRP ON LRP.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LRPT.FLOWUNID=:FLOWUNID"; + sql="SELECT LRPT.SUMINTE-LRP.SUMINTE AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LB_CONTRACT_INFO LCI INNER JOIN (SELECT MAX(CONTRACT_ID) CONTRACT_ID,SUM(INTEREST-ROUND(INTEREST/1.06,2))SUMINTE, FLOWUNID FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.CONTRACT_ID=LCI.ID INNER JOIN (SELECT CONTRACT_ID,SUM(INTEREST-ROUND(INTEREST/1.06,2)) SUMINTE FROM LC_RENT_PLAN GROUP BY CONTRACT_ID) LRP ON LRP.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LRPT.FLOWUNID=:FLOWUNID"; } List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractTerminate.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractTerminate.java index 401e4355d..c4da09359 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractTerminate.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractTerminate.java @@ -40,19 +40,19 @@ public class CreateVoucherContractTerminate { map.put("FlowUnid", FlowUnid); //ؿ--յΥԼ if("PZ2018072100000026".equals(VOUCHERNO)){ - sql= "SELECT IFNULL(HANDLING_CHARGE,0) AS MONEY ,ROUND(IFNULL(HANDLING_CHARGE,0)/1.06,2) AS MONEYNOTAX,(IFNULL(HANDLING_CHARGE,0)-ROUND(IFNULL(HANDLING_CHARGE,0)/1.06,2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFRA.FLOWUNID=:FLOWUNID"; + sql= "SELECT IFNULL(HANDLING_CHARGE,0) AS MONEY ,ROUND(IFNULL(HANDLING_CHARGE,0)/1.06,2) AS MONEYNOTAX,(IFNULL(HANDLING_CHARGE,0)-ROUND(IFNULL(HANDLING_CHARGE,0)/1.06,2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFRA.FLOWUNID=:FLOWUNID"; } //յǰ if("PZ2018072100000027".equals(VOUCHERNO)){ - sql= "SELECT IFNULL(CORPUS_OVERAGE,0) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFRA.FLOWUNID=:FLOWUNID"; + sql= "SELECT IFNULL(CORPUS_OVERAGE,0) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFRA.FLOWUNID=:FLOWUNID"; } //ǰ-δʵϢ if("PZ2018072100000045".equals(VOUCHERNO)){ - sql="SELECT ROUND(IFNULL(AGREED_INTEREST,0)/1.06,2) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%M/%D') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%M/%D') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFRA.FLOWUNID=:FLOWUNID"; + sql="SELECT ROUND(IFNULL(AGREED_INTEREST,0)/1.06,2) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%M/%D') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%M/%D') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFRA.FLOWUNID=:FLOWUNID"; } //ǰ-δʵϢ˰ if("PZ2018072100000046".equals(VOUCHERNO)){ - sql="SELECT IFNULL(AGREED_INTEREST,0)-ROUND(IFNULL(AGREED_INTEREST,0)/1.06,2) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%M/%D') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%M/%D') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFRA.FLOWUNID=:FLOWUNID"; + sql="SELECT IFNULL(AGREED_INTEREST,0)-ROUND(IFNULL(AGREED_INTEREST,0)/1.06,2) AS MONEY ,0 AS MONEYNOTAX,0 AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%M/%D') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%M/%D') AS FACT_DATE,LCI.ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFRA.FLOWUNID=:FLOWUNID"; } List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java index b3d21c5e9..472f1d994 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java @@ -43,9 +43,9 @@ public class CreateVoucherCustCautionMoneyIncome extends BaseBussiness{ map.put("FlowUnid", FlowUnid); map.put("FEE_TYPE", FeeType); if("PZ2018073100000062".equals(VOUCHERNO)){ - sql="SELECT LFIT.FACT_MONEY AS MONEY,LFIT.FACT_MONEY/1.06 AS MONEYNOTAX,(LFIT.FACT_MONEY-LFIT.FACT_MONEY/1.06) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFIT.FEE_TYPE in ('feetype20','feetype21','feetype22','feetype23') AND LFIT.FLOWUNID=:FLOWUNID "; + sql="SELECT LFIT.FACT_MONEY AS MONEY,LFIT.FACT_MONEY/1.06 AS MONEYNOTAX,(LFIT.FACT_MONEY-LFIT.FACT_MONEY/1.06) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFIT.FEE_TYPE IN ('feetype20','feetype21','feetype22','feetype23') AND LFIT.FLOWUNID=:FLOWUNID"; }else{ - sql= "SELECT LFIT.FACT_MONEY AS MONEY,LFIT.FACT_MONEY/1.06 AS MONEYNOTAX,(LFIT.FACT_MONEY-LFIT.FACT_MONEY/1.06) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFIT.FEE_TYPE=:FEE_TYPE AND LFIT.FLOWUNID=:FLOWUNID "; + sql= "SELECT LFIT.FACT_MONEY AS MONEY,LFIT.FACT_MONEY/1.06 AS MONEYNOTAX,(LFIT.FACT_MONEY-LFIT.FACT_MONEY/1.06) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LFIT.FEE_TYPE=:FEE_TYPE AND LFIT.FLOWUNID=:FLOWUNID "; } List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java index c276a946b..1fcaffb93 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java @@ -49,7 +49,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { //String FlowUnid=this.getAttribute("FlowUnid").toString(); //String VOUCHERNO="PZ2018071000000005"; //String VOUCHERNO=this.getAttribute("VoucherNo").toString(); - String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_MONEY,LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL,LCCT.GPS_FEE_FINANCE,LRPT.INTEREST,LRPT.INTERESTNOTAX,LRPT.TAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LCCT.CONTRACT_ID LEFT JOIN (SELECT FLOWUNID,SUM(INTEREST) AS INTEREST,SUM(ROUND((INTEREST/1.06),2)) AS INTERESTNOTAX,SUM(INTEREST-ROUND((INTEREST/1.06),2)) AS TAX FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.FLOWUNID=LCCT.FLOWUNID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID"; + String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_MONEY,LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL,LCCT.GPS_FEE_FINANCE,LRPT.INTEREST,LRPT.INTERESTNOTAX,LRPT.TAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LCCT.CONTRACT_ID LEFT JOIN (SELECT FLOWUNID,SUM(INTEREST) AS INTEREST,SUM(ROUND((INTEREST/1.06),2)) AS INTERESTNOTAX,SUM(INTEREST-ROUND((INTEREST/1.06),2)) AS TAX FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.FLOWUNID=LCCT.FLOWUNID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID"; param.clear(); map.put("FLOWUNID", FlowUnid); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java index 9f52ee4e4..92fd907ad 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java @@ -44,7 +44,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { //String VOUCHERNO=this.getAttribute("VoucherNo").toString(); param.clear(); map.put("FlowUnid", FlowUnid); - sql= "SELECT LCCT.HANDLING_CHARGE_MONEY AS MONEY,LCCT.HANDLING_CHARGE_MONEY/1.06 AS HANDLFEENOTAX,(LCCT.HANDLING_CHARGE_MONEY-LCCT.HANDLING_CHARGE_MONEY/1.06)AS HANDLTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d')AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID"; + sql= "SELECT LCCT.HANDLING_CHARGE_MONEY AS MONEY,LCCT.HANDLING_CHARGE_MONEY/1.06 AS HANDLFEENOTAX,(LCCT.HANDLING_CHARGE_MONEY-LCCT.HANDLING_CHARGE_MONEY/1.06)AS HANDLTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d')AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID "; List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java index 3f2c3ecc8..e783a838a 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java @@ -55,7 +55,7 @@ public class CreateVoucherLoanDistributor { moneyDataSource="LCCT.CAUTION_MONEY"; } //sql= "SELECT "+moneyDataSource+ " AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CUSTOMERID,CIF.CUSTOMERNAME FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id WHERE LCCT.FLOWUNID=:FLOWUNID"; - sql="SELECT "+moneyDataSource+ " AS MONEY,ROUND("+moneyDataSource+ "/1.17,2) AS MONEYNOTAX, ("+moneyDataSource+ "-ROUND("+moneyDataSource+ "/1.17,2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID"; + sql="SELECT "+moneyDataSource+ " AS MONEY,ROUND("+moneyDataSource+ "/1.17,2) AS MONEYNOTAX, ("+moneyDataSource+ "-ROUND("+moneyDataSource+ "/1.17,2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID"; List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMonthSettlement.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMonthSettlement.java index e54e67ad8..196e229f0 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMonthSettlement.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMonthSettlement.java @@ -47,10 +47,10 @@ public class CreateVoucherMonthSettlement{ String moneyType="MONEY"; if("PZ2018071200000017".equals(voucherNo)) moneyType="FEEMONEY"; if("PZ2018071200000016".equals(voucherNo)) moneyType="MONEY"; - sql="SELECT CRM.INTEREST AS MONEY,CRM.FEE AS FEEMONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,CRM.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM CONTRACT_RENT_MONTH CRM LEFT JOIN LB_CONTRACT_INFO LCI ON CRM.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(STR_TO_DATE(CRM.END_DATE,'%Y/%m/%d'),'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')"; + sql="SELECT CRM.INTEREST AS MONEY,CRM.FEE AS FEEMONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,CRM.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM CONTRACT_RENT_MONTH CRM LEFT JOIN LB_CONTRACT_INFO LCI ON CRM.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(STR_TO_DATE(CRM.END_DATE,'%Y/%m/%d'),'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')"; if("PZ2018072100000055".equals(voucherNo)){ - sql="SELECT LRP.INTEREST-ROUND(LRP.INTEREST/1.06,2) AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID AS CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_RENT_PLAN LRP INNER JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LRP.CONTRACT_ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(SYSDATE(),'%Y/%m/%d')=DATE_FORMAT(STR_TO_DATE(LRP.PLAN_DATE,'%Y/%m/%d'),'%Y/%m/%d')"; + sql="SELECT LRP.INTEREST-ROUND(LRP.INTEREST/1.06,2) AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID AS CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_RENT_PLAN LRP INNER JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LRP.CONTRACT_ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(SYSDATE(),'%Y/%m/%d')=DATE_FORMAT(STR_TO_DATE(LRP.PLAN_DATE,'%Y/%m/%d'),'%Y/%m/%d')"; } List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRentIncome.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRentIncome.java index 01916f223..e9584a3e2 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRentIncome.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRentIncome.java @@ -42,10 +42,10 @@ public class CreateVoucherRentIncome { String sql=""; param.clear(); if("PZ2018072100000024".equals(VOUCHERNO)){ - sql= "SELECT LRIT.rent AS MONEY,0 as MONEYNOTAX,0 as MONEYTAX, DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(sysdate(),'%Y/%m/%d') "; + sql= "SELECT LRIT.rent AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX, DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d') "; } if("PZ2018072100000025".equals(VOUCHERNO)){ - sql= "SELECT LrIT.penalty AS MONEY,ROUND(LrIT.penalty/1.06,2) AS MONEYNOTAX,LrIT.penalty-ROUND(LrIT.penalty/1.06,2) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')"; + sql= "SELECT LrIT.penalty AS MONEY,ROUND(LrIT.penalty/1.06,2) AS MONEYNOTAX,LrIT.penalty-ROUND(LrIT.penalty/1.06,2) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE DATE_FORMAT(LrIT.hire_date,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')"; } List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); From dddfae284b6efc363c1635d35e791fff90a4f6a7 Mon Sep 17 00:00:00 2001 From: liujiaji Date: Wed, 1 Aug 2018 10:56:26 +0800 Subject: [PATCH 5/7] bug --- .../impl/BusinessDocUploadServiceImpl.java | 15 +- .../loan/product/ProductBaseLoanTools.java | 311 ++++++++++++++++++ .../impl/BusinessApplyStartServiceImpl.java | 45 +-- 3 files changed, 346 insertions(+), 25 deletions(-) create mode 100644 src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/product/ProductBaseLoanTools.java diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/upload/service/impl/BusinessDocUploadServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/upload/service/impl/BusinessDocUploadServiceImpl.java index e2cf315cb..99bf55c17 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/upload/service/impl/BusinessDocUploadServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/upload/service/impl/BusinessDocUploadServiceImpl.java @@ -43,10 +43,17 @@ public class BusinessDocUploadServiceImpl implements BusinessDocUploadService { public Map upload(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx, Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception { - Map testMap = (Map) MultipartDataUtil + + Map testMap = null; + + if (response != null) { + testMap = (Map) MultipartDataUtil .readRequestParam(request, "UTF-8"); - fieldMap = fieldMap == null ? (Map) testMap.get("fieldMap") : fieldMap; // - fileList = fileList == null ? (List>) testMap.get("fileList") : fileList; // б + } + + fieldMap = testMap != null ? (Map) testMap.get("fieldMap") : fieldMap; // + fileList = testMap != null ? (List>) testMap.get("fileList") : fileList; // б + String applyType = "BusinessApplyApply"; String flowUnid = fieldMap.get("objectno") == null ? "" : fieldMap.get( "objectno").toString(); // ̺ @@ -133,7 +140,7 @@ public class BusinessDocUploadServiceImpl implements BusinessDocUploadService { attr.setAttributeValue("FullPath",sFullPath); attr.setAttributeValue("Content_Type", file.get("fileContentType")); attr.setAttributeValue("FileSize", file.get("fileSize")); - tx.join(attrBm); +// tx.join(attrBm); attrBm.saveObject(attr); } diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/product/ProductBaseLoanTools.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/product/ProductBaseLoanTools.java new file mode 100644 index 000000000..1054fe517 --- /dev/null +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/product/ProductBaseLoanTools.java @@ -0,0 +1,311 @@ +package apx.com.amarsoft.als.apzl.apply.business.loan.product; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Vector; + +import jbo.sys.CODE_LIBRARY; +import apx.com.amarsoft.als.base.cache.instance.AppAweDoCache; + +import com.amarsoft.app.lc.workflow.action.GetFlowAction; +import com.amarsoft.are.ARE; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.BizObjectQuery; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.lang.StringX; +import com.amarsoft.awe.dw.ui.validator.ValidateRule; +import com.tenwa.reckon.bean.TabCalBean; +import com.tenwa.reckon.product.ProductCondition; +import com.tenwa.reckon.util.TbBeanTools; +import com.tenwa.util.SerialNumberUtil; + +public class ProductBaseLoanTools { + @SuppressWarnings("unchecked") + public static Map checkSource(Map app, + String colName, String operation, Object value) { + + if ("finatype01".equals(value)) { + ARE.getLog().info("finatype01"); + } + + if (operation.contains("defaultValue")) { + app.put("coldefaultvalue", value); + } else { + if (!"coldefaultvalue".equals(operation)) { + return app; + } + } + + Map donoTemp = (Map) (AppAweDoCache.getAppAweDoCachePool().get("LoanSimulationBasicInfoApp")); + List> libarary = (List>) (donoTemp.get("library")); + String source = ""; + String sourceType = ""; + + for (Map col : libarary) { + String sColName = col.get("colname") == null ? "" : col.get("colname").toString(); + if (sColName.equals(colName)) { + source = col.get("coleditsource") == null ? "" : col.get("coleditsource").toString(); + sourceType = col.get("coleditsourcetype") == null ? "" : col.get("coleditsourcetype").toString(); + break; + } + } + source = app.get("coleditsource") == null ? source : app.get("coleditsource").toString(); + sourceType = app.get("coleditsourcetype") == null ? sourceType : app.get("coleditsourcetype").toString(); + if (StringX.isSpace(source)) { + app.put("coldefaultitemno", value); + return app; + } + + if (StringX.isSpace(sourceType)) { + app.put("coldefaultitemno", value); + return app; + } + + if ("Code".equals(sourceType)) { // CODENO='SettleMethod' + try { + String itemno = value == null ? null : value.toString(); + BizObjectManager bom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME); + BizObject bo = bom.createQuery("CODENO=:CODENO and itemno=:itemno") + .setParameter("CODENO", source).setParameter("itemno", itemno) + .getSingleResult(false); + if (null == bo) { + app.put("coldefaultitemno", value); + return app; + } + app.put("coldefaultitemno", bo.getAttribute("itemname").getValue()); + return app; + } catch (JBOException e) { + ARE.getLog().error(e); + app.put("coldefaultitemno", value); + return app; + } + + } else if ("CodeTable".equals(sourceType)) { // ,,, + try { + String itemno = value == null ? null : value.toString(); + int size = source.split(",").length; + if (size > 0 && size % 2 == 0) { + String [] array = source.split(","); + for (int i = 0; i < size; i++) { + if (i!=0 && i + 1 > size) break; + String itemno2 = array[i]; + if (itemno2.equalsIgnoreCase(itemno)) { + app.put("coldefaultitemno", array[i+1]); + break; + } + i++; + } + if (null == app.get("coldefaultitemno")) { + app.put("coldefaultitemno", value); + return app; + } + } else { + app.put("coldefaultitemno", value); + return app; + } + } catch (Exception e) { + ARE.getLog().error(e); + app.put("coldefaultitemno", value); + return app; + } + } else if ("JBO".equals(sourceType)) { // jbo.app.tenwa.customer.DISTRIBUTOR_INFO,ID,DISTRIBUTOR_NAME,1=1 + + try { + String itemno = value == null ? null : value.toString(); + if (source.contains(",")) { + String[] arrayJbo = source.split(","); + if (arrayJbo.length >= 4) { + String sClass = arrayJbo[0]; + String sKey = arrayJbo[1]; + String sValue = arrayJbo[2]; + String sWhere = arrayJbo[3]; + if (arrayJbo.length > 4) { + for (int io = 4; io < arrayJbo.length; io++) { + sWhere += "," + arrayJbo[io]; + } + } + BizObjectManager bom = JBOFactory + .getBizObjectManager(sClass); + BizObjectQuery boq = bom.createQuery("SELECT " + + sKey + ", " + sValue + + " FROM O WHERE " + sWhere); + List bos = boq.getResultList(false); + for (BizObject bo : bos) { + // sDefult + if (itemno.equals(bo.getAttribute(sKey) + .getValue())) { + app.put("coldefaultitemno", bo.getAttribute(sValue) + .getValue()); + return app; + } + } + if (null == app.get("coldefaultitemno")) { + app.put("coldefaultitemno", value); + return app; + } + } + } + } catch (JBOException e) { + ARE.getLog().error(e); + app.put("coldefaultitemno", value); + return app; + } + + } else if ("@MIN_MAX".equals(sourceType)) { // 6,8 + try { + String itemno = value == null ? null : value.toString(); + int size = source.split(",").length; + if (size == 2) { + String [] array = source.split(","); + String itemno2 = array[0]; + String itemno3 = array[1]; + int min = Integer.valueOf(itemno2); + int max = Integer.valueOf(itemno3); + int iin = Integer.valueOf(itemno); + + if(min <= iin && iin <= max) { + app.put("coldefaultitemno", iin); + return app; + } else { + app.put("coldefaultitemno", value); + return app; + } + } else { + app.put("coldefaultitemno", value); + return app; + } + } catch (NumberFormatException e) { + ARE.getLog().error(e); + app.put("coldefaultitemno", value); + return app; + } + } + + return app; + } + + public static void addAppList(List> appList, + String colName, String operation, Object value) { + if (null == appList) + return; + if (null == colName) + return; + if (null == operation) + return; + boolean flag = false; + for (Map app : appList) { + String colName2 = app.get("colname") == null ? "" : app.get( + "colname").toString(); + if (colName.equals(colName2)) { + app.put(operation, value); + checkSource(app, colName, operation, value); + flag = true; + break; + } + } + if (!flag) { + Map app = new HashMap(); + app.put("colname", colName); + app.put(operation, value); + checkSource(app, colName, operation, value); + appList.add(app); + } + flag = false; + } + + // begin ù + public static String getProductFundRules(List> appList, + String productId) throws Exception { + if (null == appList) + appList = new ArrayList>(); + ProductCondition pc = new ProductCondition(); + pc.getProductFundRulesApp(appList, productId); + /* ģ */ + Vector vali = new Vector(); + String calcRules = pc.getProductRulesApp(appList, productId, vali); + return calcRules; + } + + // end + + // begin ȡ ֵˮ + public static Map deadWork(String productId, + String calType, String planCName, String plannumber, String tb, + String flowunid, JBOTransaction tx) throws Exception { + Map map = new HashMap(); + /* ȡ */ + /* ݲж Ƿȥݿѯ */ + BizObject flow = GetFlowAction.getFlowBussinessObject(flowunid); + if (productId == null) { + productId = flow.getAttribute("productId").getString(); + } + map.put("productId", productId); + if (calType == null) { + calType = "proj_process"; + } + map.put("calType", calType); + TabCalBean tcb = TbBeanTools.getTabInfo(calType); + planCName = tcb.getPlanCName(); + map.put("planCName", planCName); + // + if (plannumber == null) { + if ("pay_process".equals(calType) + || "onHire_process".equals(calType)) { + BizObject condtion = JBOFactory + .createBizObjectQuery( + "jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP", + "flowunid=:flowunid and PAYMENT_NUMBER is not null and length(PAYMENT_NUMBER)>0 ") + .setParameter("flowunid", flowunid) + .getSingleResult(false); + if (condtion != null) { + plannumber = condtion.getAttribute(planCName).getString(); + } + } else { + BizObject condtion = JBOFactory + .createBizObjectQuery( + "jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP", + "flowunid=:flowunid") + .setParameter("flowunid", flowunid) + .getSingleResult(false); + if (condtion != null) { + plannumber = condtion.getAttribute(planCName).getString(); + } + } + } + + // Զɷ + if (plannumber == null) { + String sSerialType = ""; + if ("proj_process".equals(calType)) { + BizObject proj = JBOFactory + .createBizObjectQuery( + "jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP", + "flowunid=:flowunid") + .setParameter("flowunid", flowunid) + .getSingleResult(false); + sSerialType = proj.getAttribute("PROJECT_NO").getString(); + } else { + BizObject contract = JBOFactory + .createBizObjectQuery( + "jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP", + "flowunid=:flowunid") + .setParameter("flowunid", flowunid) + .getSingleResult(false); + sSerialType = contract.getAttribute("CONTRACT_NO").getString(); + } + plannumber = SerialNumberUtil.getPlannumber(sSerialType, calType, + tx); + tx.commit(); + } + map.put("plannumber", plannumber); + tb = tcb.getCondition_tb(); + map.put("tb", tb); + return map; + } + // end +} diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java index f1e0dfdde..ff8dbd752 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java @@ -8,7 +8,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import apx.com.amarsoft.als.apzl.apply.business.doc.upload.service.BusinessDocUploadService; import apx.com.amarsoft.als.apzl.apply.business.doc.upload.service.impl.BusinessDocUploadServiceImpl; import apx.com.amarsoft.als.apzl.apply.business.start.bo.BusinessBO; import apx.com.amarsoft.als.apzl.apply.business.start.init.InitDocListTools; @@ -24,6 +23,7 @@ import com.base.util.ReturnMapUtil; public class BusinessApplyStartServiceImpl implements BusinessApplyStartService { private Map fieldMap; private List> fileList; + @SuppressWarnings("unchecked") public Map applyStart(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx, Transaction sqlca, @@ -40,6 +40,29 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService String serialNo = sReturnInfo.split("@")[1]; // ȡǰزFlowUnid Map params = bo.getParams(); + // ظ + boolean flag = InitDocListTools.initDocList(params.get("FlowUnid"), + fieldMap.get("userid").toString(), bo.getCarAttributes()); + + String certType = bo.getCerttype(); + String date = DateUtil.getDateTime(new Date()); + if (flag && "ind01".equals(certType.toLowerCase()) + && (fileList != null && fileList.size() > 0)) { // ֤棩Ƭ + fieldMap.put("objectNo".toUpperCase(), params.get("FlowUnid")); + fieldMap.put("objectNo".toLowerCase(), params.get("FlowUnid")); + + fieldMap.put("docname".toUpperCase(), "֤棩"); + fieldMap.put("docname".toLowerCase(), "֤棩"); + + fieldMap.put("remark".toUpperCase(), + "ҵֻAPP - ϴƬ - " + date); + fieldMap.put("remark".toLowerCase(), + "ҵֻAPP - ϴƬ - " + date); + BusinessDocUploadServiceImpl service = new BusinessDocUploadServiceImpl(); + service.setFieldMap(fieldMap); + service.setFileList(fileList); + service.upload(null, null, tx, sqlca, null); + } // ǰ̨ Map body = new HashMap(); body.put("flowUnid", params.get("FlowUnid")); @@ -50,26 +73,6 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService ReturnMapUtil.setReturnMap(body, RestfullConstant.baseProperty.get("success").toString(), "ɹ"); - // ظ - boolean flag = InitDocListTools.initDocList(params.get("FlowUnid"), - fieldMap.get("userid").toString(), bo.getCarAttributes()); - - String certType = bo.getCerttype(); - String date = DateUtil.getDateTime(new Date()); - if (flag && "ind01".equals(certType.toLowerCase()) - && (fileList != null && fileList.size() > 0)) { // ֤棩Ƭ - fieldMap.put("objectNo".toUpperCase(), params.get("FlowUnid")); - fieldMap.put("objectNo".toLowerCase(), params.get("FlowUnid")); - - fieldMap.put("docname".toUpperCase(), "֤棩"); - fieldMap.put("docname".toLowerCase(), "֤棩"); - - fieldMap.put("remark".toUpperCase(), "ҵֻAPP - ϴƬ - " + date); - fieldMap.put("remark".toLowerCase(), "ҵֻAPP - ϴƬ - " + date); - BusinessDocUploadServiceImpl service = new BusinessDocUploadServiceImpl(); - service.setFieldMap(fieldMap); - service.setFileList(fileList); - } } else if (sReturnInfo.startsWith("failed")) { ReturnMapUtil.setReturnMap(null, RestfullConstant.baseProperty.get("FAIL").toString(), From db66bd6e6603111ec092a679dc59ac783652e6f3 Mon Sep 17 00:00:00 2001 From: amarsoft Date: Wed, 1 Aug 2018 12:08:13 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=87=AD=E8=AF=81=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java | 2 +- .../CreateVoucherProcess/CreateVoucherHandlingMoney.java | 2 +- .../CreateVoucherProcess/CreateVoucherLoanDistributor.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java index 1fcaffb93..1f12d33ad 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java @@ -49,7 +49,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { //String FlowUnid=this.getAttribute("FlowUnid").toString(); //String VOUCHERNO="PZ2018071000000005"; //String VOUCHERNO=this.getAttribute("VoucherNo").toString(); - String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_MONEY,LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL,LCCT.GPS_FEE_FINANCE,LRPT.INTEREST,LRPT.INTERESTNOTAX,LRPT.TAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LCCT.CONTRACT_ID LEFT JOIN (SELECT FLOWUNID,SUM(INTEREST) AS INTEREST,SUM(ROUND((INTEREST/1.06),2)) AS INTERESTNOTAX,SUM(INTEREST-ROUND((INTEREST/1.06),2)) AS TAX FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.FLOWUNID=LCCT.FLOWUNID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID"; + String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_MONEY,LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL,LCCT.GPS_FEE_FINANCE,LRPT.INTEREST,LRPT.INTERESTNOTAX,LRPT.TAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT inner join lc_fund_income_temp lfit on lfit.contract_id=lcct.contract_id and lfit.fee_type='feetype10' LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LCCT.CONTRACT_ID LEFT JOIN (SELECT FLOWUNID,SUM(INTEREST) AS INTEREST,SUM(ROUND((INTEREST/1.06),2)) AS INTERESTNOTAX,SUM(INTEREST-ROUND((INTEREST/1.06),2)) AS TAX FROM LC_RENT_PLAN_TEMP GROUP BY FLOWUNID) LRPT ON LRPT.FLOWUNID=LCCT.FLOWUNID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE lfit.FLOWUNID=:FLOWUNID"; param.clear(); map.put("FLOWUNID", FlowUnid); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java index 92fd907ad..2025d371c 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java @@ -44,7 +44,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { //String VOUCHERNO=this.getAttribute("VoucherNo").toString(); param.clear(); map.put("FlowUnid", FlowUnid); - sql= "SELECT LCCT.HANDLING_CHARGE_MONEY AS MONEY,LCCT.HANDLING_CHARGE_MONEY/1.06 AS HANDLFEENOTAX,(LCCT.HANDLING_CHARGE_MONEY-LCCT.HANDLING_CHARGE_MONEY/1.06)AS HANDLTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d')AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID "; + sql= "SELECT LCCT.HANDLING_CHARGE_MONEY AS MONEY,LCCT.HANDLING_CHARGE_MONEY/1.06 AS HANDLFEENOTAX,(LCCT.HANDLING_CHARGE_MONEY-LCCT.HANDLING_CHARGE_MONEY/1.06)AS HANDLTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d')AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT INNER JOIN lc_fund_income_temp lfit ON lfit.contract_id=lcct.contract_id AND lfit.fee_type='feetype10' LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE lfit.FLOWUNID=:FLOWUNID"; List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java index e783a838a..c8723f5e8 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java @@ -55,7 +55,7 @@ public class CreateVoucherLoanDistributor { moneyDataSource="LCCT.CAUTION_MONEY"; } //sql= "SELECT "+moneyDataSource+ " AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CUSTOMERID,CIF.CUSTOMERNAME FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id WHERE LCCT.FLOWUNID=:FLOWUNID"; - sql="SELECT "+moneyDataSource+ " AS MONEY,ROUND("+moneyDataSource+ "/1.17,2) AS MONEYNOTAX, ("+moneyDataSource+ "-ROUND("+moneyDataSource+ "/1.17,2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE LCCT.FLOWUNID=:FLOWUNID"; + sql="SELECT "+moneyDataSource+ " AS MONEY,ROUND("+moneyDataSource+ "/1.06,2) AS MONEYNOTAX, ("+moneyDataSource+ "-ROUND("+moneyDataSource+ "/1.06,2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT INNER JOIN lc_fund_income_temp lfit ON lfit.contract_id=lcct.contract_id AND lfit.fee_type='feetype10' LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID WHERE lfit.FLOWUNID=:FLOWUNID"; List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); From a190cc8bae0169c58b48ec9d773a3f3f2c7053c3 Mon Sep 17 00:00:00 2001 From: luojian Date: Wed, 1 Aug 2018 13:42:42 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BC=A0=E9=98=85?= =?UTF-8?q?=E5=92=8C=E6=84=8F=E8=A7=81=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FlowManager/FlowPage/FlowPageViewTab.jsp | 3 ++ .../BusinessApplication/ApprovalForm.jsp | 54 ++++++++++++++++++- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp b/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp index 412eba8b7..6b5d97acc 100644 --- a/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp +++ b/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp @@ -42,6 +42,9 @@ break; } } + if("BusinessApplyApply".equals(startMap.get("ApplyType"))){ + flag = true; + } %> diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp index be30be110..5ef58648c 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp @@ -78,6 +78,9 @@ dwTemp.getDataObject().setReadOnly("INTEROPINION3", true); dwTemp.setGroupHidden("0050"); } + if(CurUser.hasRole("401")){ + dwTemp.setGroupHidden("0030,0040"); + } }else if("0050".equals(phaseNo)){// if(!"true".equals(ishistory)){ dwTemp.getDataObject().setVisible("firstchoice", true); @@ -146,6 +149,17 @@ $("#A_div_1240").attr("style","display:block;"); $("#A_div_1260").attr("style","display:block;"); } + if("true"=="<%=ishistory%>"&&<%=CurUser.hasRole("401")%>){ + $("#A_div_1130").attr("style","display:none;"); + $("#A_div_1140").attr("style","display:none;"); + $("#A_div_1210").attr("style","display:none;"); + $("#A_div_1150").attr("style","display:none;"); + $("#A_div_1160").attr("style","display:none;"); + $("#A_div_1230").attr("style","display:none;"); + $("#A_div_1170").attr("style","display:none;"); + $("#A_div_1180").attr("style","display:none;"); + $("#A_div_1250").attr("style","display:none;"); + } _user_validator[0]['rules']['FIRSTCHOICE']['required0'] = true; _user_validator[0]['messages']['FIRSTCHOICE']['required0'] = ''; _user_validator[0]['rules']['FIRSTOPINION']['required0'] = true; @@ -163,6 +177,17 @@ $("#A_div_1250").attr("style","display:block;"); $("#A_div_1260").attr("style","display:block;"); } + if("true"=="<%=ishistory%>"&&<%=CurUser.hasRole("401")%>){ + $("#A_div_1130").attr("style","display:none;"); + $("#A_div_1140").attr("style","display:none;"); + $("#A_div_1210").attr("style","display:none;"); + $("#A_div_1150").attr("style","display:none;"); + $("#A_div_1160").attr("style","display:none;"); + $("#A_div_1230").attr("style","display:none;"); + $("#A_div_1170").attr("style","display:none;"); + $("#A_div_1180").attr("style","display:none;"); + $("#A_div_1250").attr("style","display:none;"); + } _user_validator[0]['rules']['SECONDCHOICE']['required0'] = true; _user_validator[0]['messages']['SECONDCHOICE']['required0'] = '븴'; _user_validator[0]['rules']['SECONDOPINION']['required0'] = true; @@ -178,7 +203,17 @@ $("#SECONDOPINION").attr("disabled","disabled");// $("#INTEROPINION2").attr("disabled","disabled");//ڲ $("#DISTRIOPINION2").attr("disabled","disabled");// - + if("true"=="<%=ishistory%>"&&<%=CurUser.hasRole("401")%>){ + $("#A_div_1130").attr("style","display:none;"); + $("#A_div_1140").attr("style","display:none;"); + $("#A_div_1210").attr("style","display:none;"); + $("#A_div_1150").attr("style","display:none;"); + $("#A_div_1160").attr("style","display:none;"); + $("#A_div_1230").attr("style","display:none;"); + $("#A_div_1170").attr("style","display:none;"); + $("#A_div_1180").attr("style","display:none;"); + $("#A_div_1250").attr("style","display:none;"); + } _user_validator[0]['rules']['THIRDCHOICE']['required0'] = true; _user_validator[0]['messages']['THIRDCHOICE']['required0'] = '벿Ÿ'; _user_validator[0]['rules']['THIRDOPINION']['required0'] = true; @@ -200,7 +235,22 @@ $("#SECONDOPINION").attr("disabled","disabled");// $("#INTEROPINION2").attr("disabled","disabled");//ڲ $("#DISTRIOPINION2").attr("disabled","disabled");// - + if("BACK"=="<%=flowstate%>"||"ANYBACK"=="<%=flowstate%>"){ + $("#A_div_1130").attr("style","display:none;"); + $("#A_div_1140").attr("style","display:none;"); + $("#A_div_1210").attr("style","display:none;"); + } + if("true"=="<%=ishistory%>"&&<%=CurUser.hasRole("401")%>){ + $("#A_div_1130").attr("style","display:none;"); + $("#A_div_1140").attr("style","display:none;"); + $("#A_div_1210").attr("style","display:none;"); + $("#A_div_1150").attr("style","display:none;"); + $("#A_div_1160").attr("style","display:none;"); + $("#A_div_1230").attr("style","display:none;"); + $("#A_div_1170").attr("style","display:none;"); + $("#A_div_1180").attr("style","display:none;"); + $("#A_div_1250").attr("style","display:none;"); + } _user_validator[0]['rules']['FOURCHOICE']['required0'] = true; _user_validator[0]['messages']['FOURCHOICE']['required0'] = 'ܾ'; _user_validator[0]['rules']['FOUROPINION']['required0'] = true;