修改客户(马亮、张磊)内容
This commit is contained in:
parent
471813ae5d
commit
3958e9d289
@ -24,7 +24,7 @@
|
||||
if(contractId==null)contractId="";
|
||||
BizObjectManager ftManager = JBOFactory.getBizObjectManager("jbo.sys.FLOW_TASK");
|
||||
BizObjectManager fbo = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
|
||||
List<BizObject> opinionList = new ArrayList<>();
|
||||
List<BizObject> opinionList = new ArrayList<BizObject>();
|
||||
BizObject fboRes = fbo.createQuery("flow_name=:flow_name and contract_id=:contract_id").setParameter("contract_id", contractId).setParameter("flow_name", "마운<EBA788>헝(폼났)").getSingleResult(false);
|
||||
if(null != fboRes){
|
||||
sObjectNo = fboRes.getAttribute("flow_unid").getString();
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setRequired("EXPNUMBER", true);
|
||||
doTemp.setRequired("EXPCOMPANY", true);
|
||||
//doTemp.setRequired("EXPSTRATDATE", true);
|
||||
doTemp.setRequired("EXPSTRATDATE", true);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
@ -29,21 +29,21 @@
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
function recordsave(){
|
||||
if(getItemValue(0,getRow(),"EXPNUMBER")==""||getItemValue(0,getRow(),"EXPCOMPANY")==""){
|
||||
if(getItemValue(0,getRow(),"EXPNUMBER")==""||getItemValue(0,getRow(),"EXPCOMPANY")==""||getItemValue(0,getRow(),"EXPSTRATDATE")==""){
|
||||
alert("快递信息填写不完整!");
|
||||
return;
|
||||
}
|
||||
var myObject={};
|
||||
myObject.EXPNUMBER = getItemValue(0,getRow(),"EXPNUMBER");
|
||||
myObject.EXPCOMPANY = getItemValue(0,getRow(),"EXPCOMPANY");
|
||||
//myObject.EXPSTRATDATE = getItemValue(0,getRow(),"EXPSTRATDATE");
|
||||
myObject.EXPSTRATDATE = getItemValue(0,getRow(),"EXPSTRATDATE");
|
||||
AsDialog.ClosePage(myObject);
|
||||
|
||||
}
|
||||
|
||||
//window.onload=function(){
|
||||
window.onload=function(){
|
||||
//alert();
|
||||
//hideItem(0,"EXPENDDATE");
|
||||
//}
|
||||
hideItem(0,"EXPENDDATE");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -1,72 +1,74 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-27
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
String flowunid = CurPage.getParameter("ObjectNo");
|
||||
String PhaseNo = CurPage.getParameter("PhaseNo");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "ERPEditInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setReadOnly("EXPNUMBER", true);
|
||||
doTemp.setReadOnly("EXPCOMPANY", true);
|
||||
doTemp.setReadOnly("EXPSTRATDATE", true);
|
||||
doTemp.setRequired("EXPNUMBER", true);
|
||||
doTemp.setRequired("EXPCOMPANY", true);
|
||||
doTemp.setRequired("EXPSTRATDATE", true);
|
||||
doTemp.setRequired("EXPENDDATE", true);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("SerialNo"));
|
||||
|
||||
ASResultSet rs = Sqlca.getASResultSet("select O.EXPNUMBER,O.EXPCOMPANY,O.EXPSTRATDATE from LB_FILE_MAILARCHIVING_INFO_TEMP O " +
|
||||
"where FLOWUNID = '"+flowunid+"' AND O.EXPNUMBER IS NOT NULL LIMIT 1 " );
|
||||
rs.next();
|
||||
String EXPNUMBER = rs.getString("EXPNUMBER");
|
||||
String EXPCOMPANY = rs.getString("EXPCOMPANY");
|
||||
String EXPSTRATDATE = rs.getString("EXPSTRATDATE");
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","recordsave()","","","",""},
|
||||
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
function recordsave(){
|
||||
if(getItemValue(0,getRow(),"EXPENDDATE")==""){
|
||||
alert("快递信息填写不完整!");
|
||||
return;
|
||||
}
|
||||
|
||||
var EXPNUMBER = getItemValue(0,getRow(),"EXPNUMBER");
|
||||
var EXPCOMPANY = getItemValue(0,getRow(),"EXPCOMPANY");
|
||||
var EXPSTRATDATE = getItemValue(0,getRow(),"EXPSTRATDATE");
|
||||
var EXPENDDATE = getItemValue(0,getRow(),"EXPENDDATE");
|
||||
|
||||
// var selectedRow = getItemValueArray(0,'contract_id');
|
||||
// selectedRow = selectedRow+"";
|
||||
// selectedRow = selectedRow.replace(/,/g,'@');
|
||||
|
||||
var sParams = "EXPNUMBER="+EXPNUMBER+",EXPCOMPANY="+EXPCOMPANY+",EXPSTRATDATE="+EXPSTRATDATE+",EXPENDDATE="+EXPENDDATE+",flowunid=<%=flowunid%>,contractid=";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.DocMailAction","saveERPInfo",sParams);
|
||||
if('success'==sReturnInfo){
|
||||
alert("配置成功!");
|
||||
}
|
||||
}
|
||||
|
||||
window.onload=function(){
|
||||
setItemValue(0,0,"EXPNUMBER",'<%=EXPNUMBER%>');
|
||||
setItemValue(0,0,"EXPCOMPANY",'<%=EXPCOMPANY%>');
|
||||
setItemValue(0,0,"EXPSTRATDATE",'<%=EXPSTRATDATE%>');
|
||||
}
|
||||
</script>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-27
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
String flowunid = CurPage.getParameter("ObjectNo");
|
||||
String PhaseNo = CurPage.getParameter("PhaseNo");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "ERPEditInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setReadOnly("EXPNUMBER", true);
|
||||
doTemp.setReadOnly("EXPCOMPANY", true);
|
||||
doTemp.setReadOnly("EXPSTRATDATE", true);
|
||||
doTemp.setRequired("EXPNUMBER", true);
|
||||
doTemp.setRequired("EXPCOMPANY", true);
|
||||
doTemp.setRequired("EXPSTRATDATE", true);
|
||||
doTemp.setRequired("EXPENDDATE", true);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("SerialNo"));
|
||||
|
||||
ASResultSet rs = Sqlca.getASResultSet("select O.EXPNUMBER,O.EXPCOMPANY,O.EXPSTRATDATE,O.EXPENDDATE from LB_FILE_MAILARCHIVING_INFO_TEMP O " +
|
||||
"where FLOWUNID = '"+flowunid+"' AND O.EXPNUMBER IS NOT NULL LIMIT 1 " );
|
||||
rs.next();
|
||||
String EXPNUMBER = rs.getString("EXPNUMBER");
|
||||
String EXPCOMPANY = rs.getString("EXPCOMPANY");
|
||||
String EXPSTRATDATE = rs.getString("EXPSTRATDATE");
|
||||
String EXPENDDATE = rs.getString("EXPENDDATE");
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","recordsave()","","","",""},
|
||||
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
function recordsave(){
|
||||
if(getItemValue(0,getRow(),"EXPENDDATE")==""){
|
||||
alert("快递信息填写不完整!");
|
||||
return;
|
||||
}
|
||||
|
||||
var EXPNUMBER = getItemValue(0,getRow(),"EXPNUMBER");
|
||||
var EXPCOMPANY = getItemValue(0,getRow(),"EXPCOMPANY");
|
||||
var EXPSTRATDATE = getItemValue(0,getRow(),"EXPSTRATDATE");
|
||||
var EXPENDDATE = getItemValue(0,getRow(),"EXPENDDATE");
|
||||
|
||||
// var selectedRow = getItemValueArray(0,'contract_id');
|
||||
// selectedRow = selectedRow+"";
|
||||
// selectedRow = selectedRow.replace(/,/g,'@');
|
||||
|
||||
var sParams = "EXPNUMBER="+EXPNUMBER+",EXPCOMPANY="+EXPCOMPANY+",EXPSTRATDATE="+EXPSTRATDATE+",EXPENDDATE="+EXPENDDATE+",flowunid=<%=flowunid%>,contractid=";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.DocMailAction","saveERPInfo",sParams);
|
||||
if('success'==sReturnInfo){
|
||||
alert("配置成功!");
|
||||
}
|
||||
}
|
||||
|
||||
window.onload=function(){
|
||||
setItemValue(0,0,"EXPNUMBER",'<%=EXPNUMBER%>');
|
||||
setItemValue(0,0,"EXPCOMPANY",'<%=EXPCOMPANY%>');
|
||||
setItemValue(0,0,"EXPSTRATDATE",'<%=EXPSTRATDATE%>');
|
||||
setItemValue(0,0,"EXPENDDATE",'<%=EXPENDDATE%>');
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -13,6 +13,8 @@
|
||||
doTemp.setVisible("ARCHIVING_CABINET_NO", false);
|
||||
doTemp.setVisible("ARCHIVING_TIME", false);
|
||||
doTemp.setVisible("ARCHIVING_PERSON", false);
|
||||
doTemp.setVisible("is_delay", false);
|
||||
doTemp.setVisible("delay_date", false);
|
||||
}
|
||||
doTemp.setLockCount(2);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
|
||||
@ -21,7 +21,6 @@
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ContractId"));
|
||||
String vehiclelevel = Sqlca.getString("select LEC.vehiclelevel from LB_EQUIPMENT_CAR_TEMP LEC where contract_id='"+ContractId+"'");
|
||||
|
||||
String sButtons[][] = {
|
||||
{"false","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
@ -89,27 +88,35 @@
|
||||
function checkInvoiceNull(){
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.contract.check.ContractInfoCheck","checkCarType","contractid=<%=ContractId%>");
|
||||
if("EROOR"==sResult){//新车返回为Error
|
||||
//发票代码是否为空
|
||||
//发票代码是否为空 2222
|
||||
var invoiceCode = getItemValue(0,getRow(0),"Invoice_code");
|
||||
if (invoiceCode.length == 0){
|
||||
setErrorTips("Invoice_code","发票代码不能为空");
|
||||
return true;
|
||||
}else{
|
||||
setErrorTips("Invoice_code","");
|
||||
}
|
||||
var invoiceNumber = getItemValue(0,getRow(0),"Invoice_number");
|
||||
if (invoiceNumber.length == 0) {
|
||||
setErrorTips("Invoice_number","发票号码不能为空");
|
||||
return true;
|
||||
}else{
|
||||
setErrorTips("Invoice_number","");
|
||||
}
|
||||
/* var invoiceDate = getItemValue(0,getRow(0),"Invoice_date");
|
||||
var invoiceDate = getItemValue(0,getRow(0),"Invoice_date");
|
||||
if (invoiceDate.length == 0) {
|
||||
setErrorTips("Invoice_date","开票日期不能为空");
|
||||
return true;
|
||||
}else{
|
||||
setErrorTips("Invoice_date","");
|
||||
}
|
||||
var invoiceMoney = getItemValue(0,getRow(0),"Invoice_money");
|
||||
if (invoiceMoney.length == 0) {
|
||||
setErrorTips("Invoice_money","开票金额不能为空");
|
||||
return true;
|
||||
} */
|
||||
}else{
|
||||
setErrorTips("Invoice_money","");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -121,9 +128,9 @@
|
||||
|| checkInvoiceCodeBak()==false || checkInvoiceNumberBak()==false){
|
||||
return;
|
||||
}
|
||||
// if(checkInvoiceNull()){//车辆属性发票非空校验
|
||||
// return;
|
||||
// }
|
||||
if(checkInvoiceNull()){//车辆属性发票非空校验
|
||||
return;
|
||||
}
|
||||
var infoStatus = this.getInfoIsnull();
|
||||
if(infoStatus){
|
||||
as_save(0);
|
||||
@ -185,17 +192,5 @@
|
||||
document.getElementById("INVOICE_DATE").readOnly=true;
|
||||
document.getElementById("INVOICE_DATE_BAK").readOnly=true;
|
||||
})
|
||||
|
||||
window.onload = function(){
|
||||
//重卡发票信息
|
||||
<%--var vehiclelevel= "<%=vehiclelevel%>";--%>
|
||||
<%--if ('重卡' != vehiclelevel &&'重型'!=vehiclelevel) {--%>
|
||||
<%--hideItem(0, "Invoice_code_bak");--%>
|
||||
<%--hideItem(0, "Invoice_number_bak");--%>
|
||||
<%--hideItem(0, "Invoice_date_bak");--%>
|
||||
<%--hideItem(0, "Invoice_money_bak");--%>
|
||||
<%--hideItem(0, "tax_due_bak");--%>
|
||||
<%--}--%>
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -234,7 +234,11 @@
|
||||
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="FILE_NUMBER" label="档案编号" type="STRING" length="32"/>
|
||||
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
|
||||
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
|
||||
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
|
||||
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
|
||||
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
|
||||
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
|
||||
<attribute name="delay_date" label="档案收到时间" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
|
||||
@ -26,6 +26,10 @@
|
||||
<attribute name="pledge_date" label="抵押日期" type="STRING" length="100"/>
|
||||
<attribute name="is_delay" label="是否提交延迟申请" type="STRING" length="32"/>
|
||||
<attribute name="delay_date" label="延迟申请日期" type="STRING" length="32"/>
|
||||
<attribute name="frame_is_pledge" label="挂车-是否抵押" type="STRING" length="100"/>
|
||||
<attribute name="frame_pledge_date" label="挂车-抵押日期" type="STRING" length="100"/>
|
||||
<attribute name="frame_is_delay" label="挂车-是否提交延迟申请" type="STRING" length="32"/>
|
||||
<attribute name="frame_delay_date" label="挂车-延迟申请日期" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
@ -4392,6 +4396,10 @@
|
||||
<attribute name="pledge_date" label="抵押日期" type="STRING" length="100"/>
|
||||
<attribute name="is_delay" label="是否提交延迟申请" type="STRING" length="32"/>
|
||||
<attribute name="delay_date" label="延迟申请日期" type="STRING" length="32"/>
|
||||
<attribute name="frame_is_pledge" label="挂车-是否抵押" type="STRING" length="100"/>
|
||||
<attribute name="frame_pledge_date" label="挂车-抵押日期" type="STRING" length="100"/>
|
||||
<attribute name="frame_is_delay" label="挂车-是否提交延迟申请" type="STRING" length="32"/>
|
||||
<attribute name="frame_delay_date" label="挂车-延迟申请日期" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
|
||||
@ -93,4 +93,20 @@ public interface LB_FILE_MAILARCHIVING_INFO{
|
||||
* Òâ¼û½âÊÍ STRING(255)<br>
|
||||
*/
|
||||
public static final String opinion_comments = "opinion_comments";
|
||||
/**
|
||||
* 档案邮寄时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String EXPSTRATDATE = "EXPSTRATDATE";
|
||||
/**
|
||||
* 档案收到时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String EXPENDDATE = "EXPENDDATE";
|
||||
/**
|
||||
* 档案邮寄时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String is_delay = "is_delay";
|
||||
/**
|
||||
* 档案收到时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String delay_date = "delay_date";
|
||||
}
|
||||
@ -101,4 +101,20 @@ public interface LB_CAR_LICENSE_PLATE_INFO{
|
||||
* 延迟申请日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String delay_date = "delay_date";
|
||||
/**
|
||||
* 挂车-是否抵押 STRING(100)<br>
|
||||
*/
|
||||
public static final String frame_is_pledge = "frame_is_pledge";
|
||||
/**
|
||||
* 挂车-抵押日期 STRING(100)<br>
|
||||
*/
|
||||
public static final String frame_pledge_date = "frame_pledge_date";
|
||||
/**
|
||||
* 挂车-是否提交延迟申请 STRING(32)<br>
|
||||
*/
|
||||
public static final String frame_is_delay = "frame_is_delay";
|
||||
/**
|
||||
* 挂车-延迟申请日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String frame_delay_date = "frame_delay_date";
|
||||
}
|
||||
@ -105,4 +105,20 @@ public interface LB_CAR_LICENSE_PLATE_INFO_TEMP{
|
||||
* 延迟申请日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String delay_date = "delay_date";
|
||||
/**
|
||||
* 挂车-是否抵押 STRING(100)<br>
|
||||
*/
|
||||
public static final String frame_is_pledge = "frame_is_pledge";
|
||||
/**
|
||||
* 挂车-抵押日期 STRING(100)<br>
|
||||
*/
|
||||
public static final String frame_pledge_date = "frame_pledge_date";
|
||||
/**
|
||||
* 挂车-是否提交延迟申请 STRING(32)<br>
|
||||
*/
|
||||
public static final String frame_is_delay = "frame_is_delay";
|
||||
/**
|
||||
* 挂车-延迟申请日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String frame_delay_date = "frame_delay_date";
|
||||
}
|
||||
@ -152,6 +152,9 @@ public class DocMailAction {
|
||||
// for(int i=0;i<contractidlist.length;i++){
|
||||
// int j = lfmiBom.createQuery("update O set EXPNUMBER = '"+EXPNUMBER+"',EXPCOMPANY = '"+EXPCOMPANY+"' where contract_id = '"+contractidlist[i]+"' and flowunid = '"+flowunid+"'").executeUpdate();
|
||||
// }
|
||||
if (null==EXPENDDATE){
|
||||
EXPENDDATE="";
|
||||
}
|
||||
int j = lfmiBom.createQuery("update O set EXPNUMBER = '"+EXPNUMBER+"',EXPCOMPANY = '"+EXPCOMPANY+"'," +
|
||||
"EXPSTRATDATE = '"+EXPSTRATDATE+"',EXPENDDATE = '"+EXPENDDATE+"' where flowunid = '"+flowunid+"'").executeUpdate();
|
||||
//ÐÞ¸ÄÏîÄ¿ÃûÃû³Æ
|
||||
|
||||
@ -1,57 +1,68 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 审批意见检查
|
||||
*
|
||||
*/
|
||||
public class CarTypeCheck extends DefaultBussinessCheck{
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
String flowId=this.getAttribute("ObjectNo").toString();
|
||||
boolean flag = true;
|
||||
String message = "发票信息校验通过!";
|
||||
String sql = "select car_type,id from lb_contract_info_temp where flowunid = '"+flowId+"'";
|
||||
SqlObject so = new SqlObject(sql);
|
||||
ASResultSet result = Sqlca.getASResultSet(so);
|
||||
String carType = null;
|
||||
String contractId = null;
|
||||
while(null != result && result.next()){
|
||||
carType = result.getString("CAR_TYPE");
|
||||
contractId = result.getString("id");
|
||||
}
|
||||
//新车发票必填
|
||||
if(StringUtils.isNotEmpty(carType) && StringUtils.isNotEmpty(contractId) && "new_car".equals(carType.toLowerCase())){
|
||||
sql = "select Invoice_code,Invoice_number,Invoice_date,Invoice_money from LB_INVOICE_INFO_TEMP where contract_id = '"+contractId+"'";
|
||||
so = new SqlObject(sql);
|
||||
result = Sqlca.getASResultSet(so);
|
||||
String invoiceCode = null;
|
||||
String invoiceNumber = null;
|
||||
String invoiceDate = null;
|
||||
String InvoiceMoney = null;
|
||||
while(null != result && result.next()){
|
||||
invoiceCode = result.getString("Invoice_code");
|
||||
invoiceNumber = result.getString("Invoice_number");
|
||||
invoiceDate = result.getString("Invoice_date");
|
||||
InvoiceMoney = result.getString("Invoice_money");
|
||||
}
|
||||
if(StringUtils.isEmpty(invoiceCode) || StringUtils.isNotEmpty(invoiceNumber)
|
||||
|| StringUtils.isNotEmpty(invoiceDate) || StringUtils.isNotEmpty(InvoiceMoney)){
|
||||
flag = false;
|
||||
message = "车辆属性为新车,请先填写发票信息!";
|
||||
}
|
||||
}
|
||||
putMsg(message);
|
||||
setPass(flag);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
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 CarTypeCheck 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 = "发票信息校验通过!";
|
||||
String sql = "select car_type,id from lb_contract_info_temp where flowunid = '"+flowId+"'";
|
||||
SqlObject so = new SqlObject(sql);
|
||||
ASResultSet result = Sqlca.getASResultSet(so);
|
||||
String carType = null;
|
||||
String contractId = null;
|
||||
while(null != result && result.next()){
|
||||
carType = result.getString("CAR_TYPE");
|
||||
contractId = result.getString("id");
|
||||
}
|
||||
logger.info("CarTypeCheck#run -- 查询发票信息 carType =" + carType);
|
||||
//新车发票必填
|
||||
if(StringUtils.isNotEmpty(carType) && "new_car".equals(carType.toLowerCase())){
|
||||
logger.info("CarTypeCheck#run -- 新车发票必填");
|
||||
String sql2 = "select Invoice_code,Invoice_number,Invoice_date,Invoice_money from LB_INVOICE_INFO_TEMP where flow_unid = '"+flowId+"'";
|
||||
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 = "车辆属性为新车,请先填写发票信息!";
|
||||
}
|
||||
}
|
||||
putMsg(message);
|
||||
setPass(flag);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user