diff --git a/WebContent/Tenwa/Comm/Document/LBDocumentInfo.jsp b/WebContent/Tenwa/Comm/Document/LBDocumentInfo.jsp index 758597896..d7b5dfcf9 100644 --- a/WebContent/Tenwa/Comm/Document/LBDocumentInfo.jsp +++ b/WebContent/Tenwa/Comm/Document/LBDocumentInfo.jsp @@ -25,6 +25,10 @@ if("N".equals(isProduct)){ doc = "'004','004001'"; doTemp.setDefaultValue("DOC_TYPE", "004"); + doTemp.setDefaultValue("ONE_CLASSIFY", "004"); + doTemp.setDefaultValue("DOC_NAME", "004"); + /* doTemp.setReadOnly("ONE_CLASSIFY", true); + doTemp.setReadOnly("DOC_NAME", true); */ } doTemp.setHtmlEvent("DOC_TYPE","onchange","cleanSelect","0"); doTemp.setHtmlEvent("one_Classify","onchange","cleanSelect","1"); @@ -58,7 +62,7 @@ setItemValue(0,0,"InputOrg","<%=CurUser.getOrgName()%>"); setItemValue(0,0,"InputTime","<%=StringFunction.getToday()%>"); - cleanSelect(0); + cleanSelect(0); hideItem(0,"CUST_ID"); }); diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp index 02774ece6..8f3a2f59e 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp @@ -112,8 +112,8 @@ if(CheckPhoneCode(workTel)){ return true; }else{ - //setErrorTips("WORKTEL","单位电话格式不正确!"); - alert("单位电话格式不正确!"); + setErrorTips("WORKTEL","单位电话格式不正确!"); +// alert("单位电话格式不正确!"); return false; } } @@ -121,7 +121,8 @@ function checkMobileRepeat(){//校验担保人手机号重复 var customerType = "03"; var mobile = getItemValue(0,getRow(),"MOBILE"); - var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=sFlowUnid%>"; + var id = getItemValue(0,getRow(),"id"); + var sParams ="certId="+id+ ",mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=sFlowUnid%>"; var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobileRepeat",sParams); if(sReturnInfo=="8"){ /* alert("该手机号已重复!"); @@ -147,10 +148,10 @@ if(falgs==false){ return; } -// var WorkTelResult = checkWorkTel(); -// if(WorkTelResult==false){ -// return; -// } + var WorkTelResult = checkWorkTel(); + if(WorkTelResult==false){ + return; + } as_save(0,"goBack()"); } @@ -160,6 +161,6 @@ var sparam="FlowUnid="+getItemValue(0,0,"FLOWUNID")+"&ProjectId="+getItemValue(0,0,"project_id")+"&RightType="+'<%=RightType%>'; AsControl.OpenView(url,sparam,"_self",""); } - + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp index 4b999f119..cd5b97e31 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp @@ -107,7 +107,8 @@ function checkTelRepeat(){//校验共同申请人手机号重复 var customerType = "03"; var tel = getItemValue(0,getRow(),"tel"); - var sParams = "mobile="+tel+",customerType="+customerType+",flowunid="+"<%=FlowUnid%>"; + var id = getItemValue(0,getRow(),"id"); + var sParams = "certId="+id+",mobile="+tel+",customerType="+customerType+",flowunid="+"<%=FlowUnid%>"; var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobileRepeat",sParams); if(sReturnInfo=="8"){ setErrorTips("tel","该手机号已重复!"); diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index 4d75d5a02..efe97a877 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -399,12 +399,18 @@ //校验公司电话区号 var workTel = getItemValue(0,0,"WORKTEL"); - if(typeof(workTel)!=undefined && mobile != ''){ + /* if(typeof(workTel)!=undefined && mobile != ''){ var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CheckCustomerInfo","CheckWorkTelInfo","workTel="+workTel); if(result=="false"){ alert("公司电话格式不正确!请输入区号-固定电话号!"); return; } + } */ + if(CheckPhoneCode(workTel)){ + }else{ + setErrorTips("WORKTEL","公司电话格式不正确!"); + //alert("公司电话格式不正确!"); + return; } <%-- var idexpiry=getItemValue(0,getRow(),"IDEXPIRY"); diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 0fe035083..4c163be09 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -1399,6 +1399,7 @@ + @@ -1463,6 +1464,7 @@ + diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml index 91f7418f8..c2983d929 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml @@ -4140,6 +4140,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/calc/com/tenwa/reckon/executor/rentTerminate/RentTerminateExe.java b/calc/com/tenwa/reckon/executor/rentTerminate/RentTerminateExe.java index e16b88c9b..272b6def8 100644 --- a/calc/com/tenwa/reckon/executor/rentTerminate/RentTerminateExe.java +++ b/calc/com/tenwa/reckon/executor/rentTerminate/RentTerminateExe.java @@ -31,13 +31,14 @@ public class RentTerminateExe { private void before(ConditionBean cb,BizObject bo,TabCalBean tcb) throws Exception{ String payMoneyday =bo.getAttribute("PAYDAY_ADJUST").getString(); + String contractTotal=bo.getAttribute("CONTRACT_TOTAL").getString(); BigDecimal discussrent = new BigDecimal(bo.getAttribute("AGREED_INTEREST").getString()).add(new BigDecimal(bo.getAttribute("REPURCHASE_MONEY").getString())); BizObjectManager bm=JBOFactory.getBizObjectManager(tcb.getRentPlan_tb(), tx); StringBuffer sql = new StringBuffer(); sql.append(" select ifnull(max(ifnull(plan_list,0)),0) + 1 as plan_list from "+Tools.getTable(tcb.getRentPlan_tb())) .append(" where flowunid = '" + tcb.getDocId() + "' ") - .append(" and plan_date <= '" + payMoneyday + "' "); + .append(" and plan_date < '" + payMoneyday + "' "); if("ORACLE".equals(InitDBType.DBTYPE)){ sql=new StringBuffer(sql.toString().replaceAll("ifnull", "nvl")); } @@ -77,12 +78,12 @@ public class RentTerminateExe { rentNew.setAttributeValue("plan_list", rent_list); rentNew.setAttributeValue("plan_date",payMoneyday); rentNew.setAttributeValue("plan_status","未回笼"); - rentNew.setAttributeValue("rent", discussrent); + rentNew.setAttributeValue("rent", contractTotal); rentNew.setAttributeValue("PENALTY",bo.getAttribute("AGREED_PENALTY").getString()); rentNew.setAttributeValue("corpus_business", endCorpus); rentNew.setAttributeValue("year_rate", yearRate); rentNew.setAttributeValue("interest_business", endInterest); - rentNew.setAttributeValue("interest", endInterest); + rentNew.setAttributeValue("interest", new BigDecimal(contractTotal).subtract(endCorpus).toString()); rentNew.setAttributeValue("corpus", endCorpus); rentNew.setAttributeValue("ALL_REMAIN_CORPUS", corpusMoney); bm.saveObject(rentNew); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractTerminate.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherContractTerminate.java index c4da09359..be7f6ce4f 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.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"; + 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 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_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.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"; + 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 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_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.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"; + 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 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_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.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"; + 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 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_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/CreateVoucherCustomerRentOrFee.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java index 1f12d33ad..bc68c137b 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java @@ -29,6 +29,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { String PURCHASE_TAX=null; String INCIDENTAL=null; String GPS_FEE_FINANCE=null; + String TABLEWARE_FEE=null; String INTEREST=null; String INTERESTNOTAX=null; String TAX=null; @@ -49,7 +50,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 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"; + String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_MONEY,LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL,LCCT.GPS_FEE as GPS_FEE_FINANCE,LCCT.TABLEWARE_FEE,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 (SELECT contract_id,FLOWUNID FROM lc_fund_income_temp WHERE fee_type='feetype10' GROUP BY contract_id,FLOWUNID) lfit on lfit.contract_id=lcct.contract_id 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); @@ -66,6 +67,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { PURCHASE_TAX=dataList.get(i).get("PURCHASE_TAX").toString(); INCIDENTAL=dataList.get(i).get("INCIDENTAL").toString(); GPS_FEE_FINANCE=dataList.get(i).get("GPS_FEE_FINANCE"); + TABLEWARE_FEE=dataList.get(i).get("TABLEWARE_FEE"); INTEREST=dataList.get(i).get("INTEREST").toString(); INTERESTNOTAX=dataList.get(i).get("INTERESTNOTAX").toString(); TAX=dataList.get(i).get("TAX").toString(); @@ -94,6 +96,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { param.put("PURCHASE_TAX",PURCHASE_TAX); param.put("INCIDENTAL",INCIDENTAL); param.put("GPS_FEE_FINANCE",GPS_FEE_FINANCE); + param.put("TABLEWARE_FEE",TABLEWARE_FEE); param.put("INTEREST",INTEREST); param.put("INTERESTNOTAX",INTERESTNOTAX); param.put("TAX",TAX); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java index 2025d371c..53e9166b8 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java @@ -87,8 +87,8 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); param.put("CARID",CARID); param.put("CARMODEL",CARMODEL); - param.put("CUSTID",CUSTID); - param.put("CUSTNAME",CUSTNAME); + param.put("CUSTID",DISTRIBUTOR_ID); + param.put("CUSTNAME",DISTRIBUTOR_NAME); param.put("CUSTOMERTYPE",CUSTOMERTYPE); param.put("BUSINESSTYPE",BUSINESSTYPE); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/AccountPayLend.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/FundGPSFee.java similarity index 77% rename from src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/AccountPayLend.java rename to src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/FundGPSFee.java index 2fa54f565..a2be1230d 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/AccountPayLend.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/FundGPSFee.java @@ -7,15 +7,14 @@ import com.amarsoft.are.jbo.JBOTransaction; import com.tenwa.comm.exception.BusinessException; import com.tenwa.voucher.service.VoucherJavaParamService; -public class AccountPayLend implements VoucherJavaParamService{ +public class FundGPSFee implements VoucherJavaParamService{ @Override public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { MapreturnValue=new HashMap(); returnValue.putAll(param); - //f10:车款-首付款 - returnValue.put("MONEY",param.get("f10")); + returnValue.put("MONEY",param.get("GPS_FEE_FINANCE")); return returnValue; } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherFee.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherFee.java index ec856933f..ad63f7093 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherFee.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherFee.java @@ -18,11 +18,11 @@ public class OtherFee implements VoucherJavaParamService{ String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM")==null?"0.00":param.get("INSURANCE_PREMIUM"); String PURCHASE_TAX=param.get("PURCHASE_TAX")==null?"0.00":param.get("PURCHASE_TAX"); String INCIDENTAL=param.get("INCIDENTAL")==null?"0.00":param.get("INCIDENTAL"); - String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE")==null?"0.00":param.get("GPS_FEE_FINANCE"); + String TABLEWARE_FEE=param.get("TABLEWARE_FEE")==null?"0.00":param.get("TABLEWARE_FEE"); BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM) .add(new BigDecimal(PURCHASE_TAX)) .add(new BigDecimal(INCIDENTAL)) - .add(new BigDecimal(GPS_FEE_FINANCE)); + .add(new BigDecimal(TABLEWARE_FEE)); returnValue.putAll(param); returnValue.put("FUNDTYPE","01"); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java index c8723f5e8..e059fbda0 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java @@ -54,10 +54,17 @@ public class CreateVoucherLoanDistributor { if("PZ2018070900000004".equals(VOUCHERNO)||"PZ2018071000000006".equals(VOUCHERNO)){ moneyDataSource="LCCT.CAUTION_MONEY"; } + if("PZ2018073100000061".equals(VOUCHERNO)){ + moneyDataSource="LCCT.GPS_FEE"; + } + if("PZ2018073100000062".equals(VOUCHERNO)){ + moneyDataSource="(LCCT.PURCHASE_TAX+LCCT.INSURANCE_PREMIUM+LCCT.INCIDENTAL+LCCT.TABLEWARE_FEE)"; + } //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.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"; + 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 (select contract_id,FLOWUNID from lc_fund_income_temp where fee_type='feetype10' group by contract_id,FLOWUNID) lfit ON lfit.contract_id=lcct.contract_id 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(); String VOUCHER_TYPE="1";// 凭证分类 金蝶 String userid ="admin"; @@ -96,8 +103,12 @@ public class CreateVoucherLoanDistributor { param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); param.put("CARID",CARID); param.put("CARMODEL",CARMODEL); - param.put("CUSTID",CUSTID); - param.put("CUSTNAME",CUSTNAME); + param.put("CUSTID",DISTRIBUTOR_ID); + param.put("CUSTNAME",DISTRIBUTOR_NAME); + /*if("PZ2018070900000002".equals(VOUCHERNO)||"PZ2018072400000060".equals(VOUCHERNO)){ + param.put("CUSTID",CUSTID); + param.put("CUSTNAME",CUSTNAME); + }*/ param.put("CUSTOMERTYPE",CUSTOMERTYPE); param.put("BUSINESSTYPE",BUSINESSTYPE); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractOnhireVoucher.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractOnhireVoucher.java index 55f81cec3..391c5f5a7 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractOnhireVoucher.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractOnhireVoucher.java @@ -19,6 +19,8 @@ public class ContractOnhireVoucher extends BaseBussiness { cvld.CreateVoucher(FlowUnid, "PZ2018070900000003");//经销商支付的预付款(首付) cvld.CreateVoucher(FlowUnid, "PZ2018070900000004");//记录保证金(合同结束后要退回给客户,或者冲抵其他款项) cvld.CreateVoucher(FlowUnid, "PZ2018071000000006");//给经销商放款冲抵客户保证金 + cvld.CreateVoucher(FlowUnid, "PZ2018073100000062");//购置税+保险+装饰 + cvld.CreateVoucher(FlowUnid, "PZ2018073100000061");//GPS CreateVoucherCustomerRentOrFee cvcr=new CreateVoucherCustomerRentOrFee(); cvcr.CreateVoucher(FlowUnid, "PZ2018071000000005");//客户支付的应收账款总金额 diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/IncomeVoucher.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/IncomeVoucher.java index f26b20187..09ac4c392 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/IncomeVoucher.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/IncomeVoucher.java @@ -17,8 +17,7 @@ public class IncomeVoucher extends BaseBussiness { 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(); cvri.CreateVoucher(FlowUnid, "PZ2018072100000024");//收到租金 diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/RedIncomeVoucher.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/RedIncomeVoucher.java new file mode 100644 index 000000000..d63d9402b --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/RedIncomeVoucher.java @@ -0,0 +1,30 @@ +package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMethodSettle; + +import com.amarsoft.awe.util.Transaction; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherCustCautionMoneyIncome; +import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRedRentIncome; +import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRentIncome; + +public class RedIncomeVoucher extends BaseBussiness { + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + String FlowUnid=this.getAttribute("FlowUnid").toString(); + /*** + * 回款反冲的凭证生成 + */ + CreateVoucherCustCautionMoneyIncome cvci=new CreateVoucherCustCautionMoneyIncome(); + cvci.CreateVoucher(FlowUnid, "PZ2018072100000034", "feetype2");//收到客户保证金 + cvci.CreateVoucher(FlowUnid, "PZ2018072100000036", "feetype1");//按月分摊的保证金 + cvci.CreateVoucher(FlowUnid, "PZ2018072100000043", "feetype4");//都到留购价款 + cvci.CreateVoucher(FlowUnid, "PZ2018072100000041", "feetype27");//贴息 + + + CreateVoucherRedRentIncome cvri=new CreateVoucherRedRentIncome(); + cvri.CreateVoucher(FlowUnid, "PZ2018072100000037");//收到租金 + cvri.CreateVoucher(FlowUnid, "PZ2018072100000038");//收到逾期利息 + + return "true"; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRedRentIncome.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRedRentIncome.java new file mode 100644 index 000000000..09421ddc0 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherRedRentIncome.java @@ -0,0 +1,136 @@ +package com.tenwa.voucher.CreateVoucherProcess; + +import java.util.HashMap; +import java.util.List; +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; +import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; + +public class CreateVoucherRedRentIncome { + + public void CreateVoucher(String FlowUnid,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; + String CONTRACT_NUMBER=null; + String PROJECT_NAME=null; + String leas_form=null; + String DISTRIBUTOR_ID=null; + String DISTRIBUTOR_NAME=null; + String CARID=null; + String CARMODEL=null; + String CUSTID=null; + String CUSTNAME=null; + String CUSTOMERTYPE=null; + String BUSINESSTYPE=null; + String sql=""; + param.clear(); + map.clear(); + map.put("FLOWUNID", FlowUnid); + if("PZ2018072100000037".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.CERTID AS 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"; + } + if("PZ2018072100000038".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.CERTID AS 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"; + } + List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); + + CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); + String VOUCHER_TYPE="1";// 凭证分类 金蝶 + String userid ="admin"; + for (int i=0;i0){ + 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(); + CONTRACT_NUMBER=dataList.get(i).get("CONTRACT_NUMBER").toString(); + PROJECT_NAME=dataList.get(i).get("PROJECT_NAME").toString(); + leas_form=dataList.get(i).get("LEAS_FORM").toString(); + DISTRIBUTOR_ID=dataList.get(i).get("DISTRIBUTOR_ID"); + DISTRIBUTOR_NAME=dataList.get(i).get("DISTRIBUTOR_NAME"); + CARID=dataList.get(i).get("CARID"); + CARMODEL=dataList.get(i).get("MODEL"); + CUSTID=dataList.get(i).get("CUSTOMERID"); + CUSTNAME=dataList.get(i).get("CUSTOMERNAME"); + CUSTOMERTYPE=dataList.get(i).get("CUSTOMERTYPE"); + 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); + param.put("CONTRACT_NUMBER",CONTRACT_NUMBER); + param.put("PROJECT_NAME",PROJECT_NAME); + param.put("LEAS_FORM",leas_form); + param.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID); + param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); + param.put("CARID",CARID); + param.put("CARMODEL",CARMODEL); + param.put("CUSTID",CUSTID); + param.put("CUSTNAME",CUSTNAME); + param.put("CUSTOMERTYPE",CUSTOMERTYPE); + param.put("BUSINESSTYPE",BUSINESSTYPE); + + if("1".equals(BUSINESSTYPE)){ + param.put("LEASFORMASSET", "04"); // 融资租赁资产 + param.put("DEPT", "02"); // 部门 + if("03".equals(CUSTOMERTYPE)){ // 如果是个人业务 + param.put("LEASINCOMEFORM", "02"); // C端 + }else if("01".equals(CUSTOMERTYPE)){ + param.put("LEASINCOMEFORM", "01"); // B端 + } + } + //param.put("FUNDTYPE", ""); // 主营类型 + param.put("BUSINESSTYPE", "06"); + + map.clear(); + map.put("PROJ_TYPE", leas_form); + map.put("VOUCHER_NO", VOUCHERNO); + BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca); + + if(vouch!=null){ + vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); + }} + } + + if(Sqlca!=null){ + Sqlca.commit(); + } + + }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/collectaudit/cache/CollectAuditInfoCache.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java index eec395d97..12dc402d4 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java @@ -11,6 +11,7 @@ import java.util.regex.Pattern; import jbo.app.tenwa.calc.LC_RENT_PLAN; import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT; +import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG; import jbo.com.tenwa.lease.comm.LB_CLEAR_FILE_RECORD; import jbo.com.tenwa.lease.comm.LB_INTFACE_FILE_RECORD; import jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN; @@ -24,6 +25,7 @@ import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.util.StringFunction; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; import com.gnete.security.crypt.Crypt; @@ -637,11 +639,17 @@ public class CollectAuditInfoCache { .setParameter("COLLECT_MSG", "批量代收,收款成功") .setParameter("BATCH_STATUS", "complete")//更新批量处理状态-完成 .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); + bo.setAttributeValue("COLLECT_STATUS", "批量收款"); + bo.setAttributeValue("COLLECT_MSG", "批量代收,收款成功"); + bo.setAttributeValue("BATCH_STATUS", "complete"); + saveBuckle(bo,tx,i+""); }else if (map.containsKey("RET_CODE") && ("2007".equals(map.get("RET_CODE")) || "2005".equals(map.get("RET_CODE")) || "2003".equals(map.get("RET_CODE")) || "2001".equals(map.get("RET_CODE")) || "2000".equals(map.get("RET_CODE")))){ //更新银联处理中的反馈信息 bc.createQuery("update O set O.COLLECT_MSG=:COLLECT_MSG where O.id=:id") .setParameter("COLLECT_MSG", map.get("ERR_MSG")) .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); + bo.setAttributeValue("COLLECT_MSG", map.get("ERR_MSG")); + saveBuckle(bo,tx,i+""); }else{ //更新收付状态 bc.createQuery("update O set O.COLLECT_STATUS=:COLLECT_STATUS ,O.COLLECT_MSG=:COLLECT_MSG,O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO='',O.BATCH_SN='' where O.id=:id") @@ -649,6 +657,10 @@ public class CollectAuditInfoCache { .setParameter("COLLECT_MSG", map.get("ERR_MSG")) .setParameter("BATCH_STATUS", "")//清空批量处理状态 .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); + bo.setAttributeValue("COLLECT_STATUS", "未收款"); + bo.setAttributeValue("COLLECT_MSG", map.get("ERR_MSG")); + bo.setAttributeValue("BATCH_STATUS", ""); + saveBuckle(bo,tx,i+""); } }else if (snArray.length > 1) { if (map.containsKey("RET_CODE") && "0000".equals(map.get("RET_CODE"))) { @@ -662,6 +674,10 @@ public class CollectAuditInfoCache { .setParameter("COLLECT_MSG", "批量代收,收款成功") .setParameter("BATCH_STATUS", "complete")//更新批量处理状态-完成 .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); + bo.setAttributeValue("COLLECT_STATUS", "批量收款"); + bo.setAttributeValue("COLLECT_MSG", "批量代收,收款成功"); + bo.setAttributeValue("BATCH_STATUS", "complete"); + saveBuckle(bo,tx,i+""); }else{ //更新收付状态 bc.createQuery("update O set O.COLLECT_STATUS=:COLLECT_STATUS ,O.COLLECT_MSG=:COLLECT_MSG,O.BATCH_STATUS=:BATCH_STATUS where O.id=:id") @@ -669,12 +685,18 @@ public class CollectAuditInfoCache { .setParameter("COLLECT_MSG", map.get("ERR_MSG")) .setParameter("BATCH_STATUS", "complete")//清空批量处理状态-完成 .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); + bo.setAttributeValue("COLLECT_STATUS", "部分收款"); + bo.setAttributeValue("COLLECT_MSG", map.get("ERR_MSG")); + bo.setAttributeValue("BATCH_STATUS", "complete"); + saveBuckle(bo,tx,i+""); } }else if (map.containsKey("RET_CODE") && ("2007".equals(map.get("RET_CODE")) || "2005".equals(map.get("RET_CODE")) || "2003".equals(map.get("RET_CODE")) || "2001".equals(map.get("RET_CODE")) || "2000".equals(map.get("RET_CODE")))){ //更新银联处理中的反馈信息 bc.createQuery("update O set O.COLLECT_MSG=:COLLECT_MSG where O.id=:id") .setParameter("COLLECT_MSG", map.get("ERR_MSG")) .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); + bo.setAttributeValue("COLLECT_MSG", map.get("ERR_MSG")); + saveBuckle(bo,tx,i+""); }else{//批量拆分多笔扣款,如果扣款成功条数未 0 ,则更新扣款状态为 未扣款 if (i == snArray.length && n == 0) { //更新收付状态 @@ -683,6 +705,10 @@ public class CollectAuditInfoCache { .setParameter("COLLECT_MSG", map.get("ERR_MSG")) .setParameter("BATCH_STATUS", "")//清空批量处理状态 .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); + bo.setAttributeValue("COLLECT_STATUS", "未收款"); + bo.setAttributeValue("COLLECT_MSG", map.get("ERR_MSG")); + bo.setAttributeValue("BATCH_STATUS", ""); + saveBuckle(bo,tx,i+""); } } } @@ -695,6 +721,25 @@ public class CollectAuditInfoCache { return "success"; } + public void saveBuckle(BizObject bo,JBOTransaction tx,String batch_sn) throws JBOException{ + BizObjectManager blog = JBOFactory.getBizObjectManager(LB_BUCKLE_LOG.CLASS_NAME, tx); + BizObject blbo = blog.newObject(); + String collect = bo.getAttribute("COLLECT_STATUS").getString(); + if(collect!=""){ + blbo.setAttributeValue("COLLECT_STATUS", bo.getAttribute("COLLECT_STATUS").getString()); + blbo.setAttributeValue("COLLECT_MSG", bo.getAttribute("COLLECT_MSG").getString()); + blbo.setAttributeValue("BATCH_STATUS", bo.getAttribute("BATCH_STATUS").getString()); + } + blbo.setAttributeValue(LB_BUCKLE_LOG.BATCH_SN, batch_sn); + blbo.setAttributeValue(LB_BUCKLE_LOG.BATCH_NO, bo.getAttribute("BATCH_NO").getString()); + blbo.setAttributeValue(LB_BUCKLE_LOG.RENT_ID, bo.getAttribute("ID").getString()); + blbo.setAttributeValue(LB_BUCKLE_LOG.inputuserid, "syetem"); + blbo.setAttributeValue(LB_BUCKLE_LOG.inputorgid, "system"); + blbo.setAttributeValue(LB_BUCKLE_LOG.inputtime, StringFunction.getTodayNow()); + blbo.setAttributeValue(LB_BUCKLE_LOG.updatetime, System.currentTimeMillis()); + blog.saveObject(blbo); + } + /** * 批量代收查询接口 * @param tx diff --git a/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPaymentCar.java b/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPaymentCar.java index 83abe623e..3aceaa3a0 100644 --- a/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPaymentCar.java +++ b/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPaymentCar.java @@ -193,6 +193,7 @@ public class FundPaymentCar { boLFITOut.setAttributeValue("APPLY_PERSON", userId); boLFITOut.setAttributeValue("APPLY_DEPT", orgId); boLFITOut.setAttributeValue("MEMO", "抵扣融资款"); + boLFITOut.setAttributeValue("FUND_FEETYPE", boLFP.getAttribute("FEE_TYPE").getString()); boLFITOut.setAttributeValue("ROLL_BACK", 0); boLFITOut.setAttributeValue("FLOWUNID", flowunid); boLFITOut.setAttributeValue("IS_FLOWING", 0); diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java index 37b0d277a..0c66dc696 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java @@ -88,7 +88,32 @@ public class CustomerInfoCheck { if(mobilePT==null && mobileFT==null && mobileLUT==null){ this.repeatResult = "7"; }else{ - this.repeatResult = "8"; + if(certId!=null){ + boolean falg = false; + if(mobilePT!=null){ + String id = mobilePT.getAttribute("ID").getString(); + if(id.equals(certId)){ + falg=true; + } + }else if(mobileFT!=null){ + String id = mobileFT.getAttribute("ID").getString(); + if(id.equals(certId)){ + falg=true; + } + }else if(mobileLUT!=null){ + String id = mobileLUT.getAttribute("ID").getString(); + if(id.equals(certId)){ + falg=true; + } + } + if(falg){ + this.repeatResult = "7"; + }else{ + this.repeatResult = "8"; + } + }else{ + this.repeatResult = "8"; + } } } return repeatResult; diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java index 6cdacb97b..fbe816033 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java @@ -301,6 +301,9 @@ public class CustomerInfoManage { try{ BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME,tx); BizObject bo = bom.createQuery("flowunid=:flowunid and customerid=:customerid and Spouse_<>'Y' ").setParameter("flowunid", flowunid).setParameter("customerid", customerid).getSingleResult(true); + if(bo==null){ + return "ERROR"; + } bom.deleteObject(bo); }catch(Exception e){ e.printStackTrace();