fix:付款申请-发票信息预警调整

This commit is contained in:
maliang 2021-06-18 14:58:37 +08:00
parent 9ba3991562
commit f1b0a3b046
3 changed files with 74 additions and 2 deletions

View File

@ -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)){

View File

@ -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","");
}

View File

@ -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;
}
}