From f1b0a3b046949f43158885d12e08739933a5afa8 Mon Sep 17 00:00:00 2001 From: maliang Date: Fri, 18 Jun 2021 14:58:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BB=98=E6=AC=BE=E7=94=B3=E8=AF=B7-?= =?UTF-8?q?=E5=8F=91=E7=A5=A8=E4=BF=A1=E6=81=AF=E9=A2=84=E8=AD=A6=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FundPaymentInvoice/LBInvoiceList.jsp | 2 +- .../FundPaymentInvoice/LbInvoiceTemp.jsp | 2 +- .../project/commcheck/InvoiceInfoCheck.java | 72 +++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 src_tenwa/com/tenwa/lease/flow/project/commcheck/InvoiceInfoCheck.java diff --git a/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LBInvoiceList.jsp b/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LBInvoiceList.jsp index 4e37a2102..d4cc114c9 100644 --- a/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LBInvoiceList.jsp +++ b/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LBInvoiceList.jsp @@ -16,7 +16,7 @@ dwTemp.ReadOnly = "1"; //只读模式 dwTemp.ShowSummary="1";//显示汇总 dwTemp.setPageSize(10); - dwTemp.genHTMLObjectWindow(ContractId); + dwTemp.genHTMLObjectWindow(ContractId+","+FlowUnid); String flag = "false"; // if( flowNo!=null && "MortgageFileFlow".equals(flowNo)){ diff --git a/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp b/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp index 069a61bd8..48d4875da 100644 --- a/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp +++ b/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp @@ -164,7 +164,7 @@ function returnList(){ var sUrl="/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LBInvoiceList.jsp"; - var sParam = "FlowUnid=<%=FlowUnid%>&ContractId=<%=ContractId%>&FlowKey=<%=ContractNumber%>"; + var sParam = "FlowUnid=<%=FlowUnid%>&ContractId=<%=ContractId%>&FlowKey=<%=ContractNumber%>&phaseNo=<%=phaseNo%>"; //AsControl.OpenView("/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceList.jsp", sParam ,"_self",""); AsControl.OpenView(sUrl,sParam,"_self",""); } diff --git a/src_tenwa/com/tenwa/lease/flow/project/commcheck/InvoiceInfoCheck.java b/src_tenwa/com/tenwa/lease/flow/project/commcheck/InvoiceInfoCheck.java new file mode 100644 index 000000000..6ed4f4cb3 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commcheck/InvoiceInfoCheck.java @@ -0,0 +1,72 @@ +package com.tenwa.lease.flow.project.commcheck; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.util.ASResultSet; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.template.check.DefaultBussinessCheck; +import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO; +import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.Logger; + +/** + * 审批意见检查 + * + */ +public class InvoiceInfoCheck extends DefaultBussinessCheck{ + private static Logger logger=Logger.getLogger(CarTypeCheck.class); + @Override + public Object run(Transaction Sqlca) throws Exception { + String flowId=this.getAttribute("ObjectNo").toString(); + logger.info("CarTypeCheck#run -- 查询发票信息 flowId =" + flowId); + boolean flag = true; + String message = "发票信息校验通过!"; //d7477466031d4391abf001ca4d951f5c + String sql = "select car_type,project_id from lb_contract_info_temp where flowunid = '"+flowId+"'"; + SqlObject so = new SqlObject(sql); + ASResultSet result = Sqlca.getASResultSet(so); + String carType = null; + String projectId = null; + while(null != result && result.next()){ + carType = result.getString("CAR_TYPE"); + projectId = result.getString("project_id"); + } + logger.info("CarTypeCheck#run -- 查询发票信息 carType =" + carType); + //新车发票必填 + if(StringUtils.isNotEmpty(carType) && "new_car".equals(carType.toLowerCase())){ + logger.info("CarTypeCheck#run -- 新车发票必填"); + String sql2 = "select lii.Invoice_code,lii.Invoice_number,lii.Invoice_date,lii.Invoice_money " + + " from lb_equipment_car lec left join LB_INVOICE_INFO_TEMP lii on lec.contract_id=lii.contract_id and lec.id=lii.equipment_id " + + " where lec.project_id='"+projectId+"'"; + SqlObject so2 = new SqlObject(sql2); + ASResultSet result2 = Sqlca.getASResultSet(so2); + String invoiceCode = null; + String invoiceNumber = null; + String invoiceDate = null; + String InvoiceMoney = null; + while(null != result2 && result2.next()){ + logger.info("CarTypeCheck#run -- 查询发票信息"); + invoiceCode = result2.getString("Invoice_code"); + logger.info("CarTypeCheck#run -- 查询发票信息 invoiceCode =" + invoiceCode); + invoiceNumber = result2.getString("Invoice_number"); + logger.info("CarTypeCheck#run -- 查询发票信息 invoiceNumber =" + invoiceNumber); + invoiceDate = result2.getString("Invoice_date"); + logger.info("CarTypeCheck#run -- 查询发票信息 invoiceDate =" + invoiceDate); + InvoiceMoney = result2.getString("Invoice_money"); + logger.info("CarTypeCheck#run -- 查询发票信息 InvoiceMoney =" + InvoiceMoney); + + if(StringUtils.isEmpty(invoiceCode) || StringUtils.isEmpty(invoiceNumber) + || StringUtils.isEmpty(invoiceDate) || StringUtils.isEmpty(InvoiceMoney)){ + logger.info("CarTypeCheck#run -- 查询发票信息都为空"); + flag = false; + message = "车辆属性为新车,请先填写发票信息!"; + break; + } + } + } + putMsg(message); + setPass(flag); + return null; + } +}