|
|
|
@ -2943,11 +2943,27 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
|
|
|
|
|
|
|
|
|
|
#region 发票审核列表
|
|
|
|
|
|
|
|
|
|
static public List<ChInvoiceapplication> GetAuditDataList(string strCondition, string userid, string isaudit,string companyid,string sort = null)
|
|
|
|
|
static public List<ChInvoiceapplication> GetAuditDataList(int start,int limit, string strCondition, string userid, string isaudit,string companyid,string sort = null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var strSql = new StringBuilder();
|
|
|
|
|
strSql.Append(" SELECT i.GID,i.BILLNO,i.BILLSTATUS,i.CUSTOMERNAME,i.ACTUALCUSTOMERNAME,i.CURRENCY,i.INVOICENO,i.INVOICECUSTNAME,i.INVOICECATEGORY ");
|
|
|
|
|
|
|
|
|
|
strSql.Append(@"SELECT * from (SELECT row_number() over (");
|
|
|
|
|
|
|
|
|
|
var sortstring = DatasetSort.Getsortstring(sort);
|
|
|
|
|
if (!string.IsNullOrEmpty(sortstring))
|
|
|
|
|
{
|
|
|
|
|
strSql.Append(" order by " + sortstring);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
strSql.Append(" order by APPLYTIME desc ");
|
|
|
|
|
}
|
|
|
|
|
strSql.Append(@") as num , ");
|
|
|
|
|
|
|
|
|
|
//strSql.Append(" SELECT ");
|
|
|
|
|
|
|
|
|
|
strSql.Append(" i.GID,i.BILLNO,i.BILLSTATUS,i.CUSTOMERNAME,i.ACTUALCUSTOMERNAME,i.CURRENCY,i.INVOICENO,i.INVOICECUSTNAME,i.INVOICECATEGORY ");
|
|
|
|
|
strSql.Append(" ,i.BSNO,i.MBLNO,i.VESSELVOYAGE,i.POL,i.POD,i.ETD,i.APPLYAMOUNT,i.INVAMOUNT,i.AMOUNTCAPITAL,i.OTCURRAMOUNT");
|
|
|
|
|
strSql.Append(" ,i.APPLICANT,i.APPLYTIME,i.ENTERTIME,i.OPERATOR,i.OPERATETIME,i.RECVCURR,i.FEEAMOUNT ");
|
|
|
|
|
strSql.Append(" ,i.REMARK,i.SHENREMARK,i.COMPANYID,i.ISAPPLY,i.CUSTRATENO,i.CUSTADDRTEL,i.CUSTBANK,i.RATE,'' INVOICENOREF,null INVDATE ");
|
|
|
|
@ -2959,12 +2975,12 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
|
|
|
|
|
|
|
|
|
|
strSql.Append(",PUSHMODE,PUSHMOBILE,PUSHEMAIL,dbo.F_getEnumValue(0,80002,i.PUSHMODE) as PUSHMODEREF,'' as NOSTL");
|
|
|
|
|
strSql.Append(" FROM ch_fee_invoiceapplication i left join workflow_using wu on wu.bsno=i.billno where 1=1 ");
|
|
|
|
|
|
|
|
|
|
if (isaudit=="1")
|
|
|
|
|
strSql.Append(" and i.BILLSTATUS=2 and dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + userid + "',wu.stepno)>0 ");
|
|
|
|
|
else if (isaudit == "2")
|
|
|
|
|
// strSql.Append(" and i.BILLSTATUS=0 AND I.BILLNO IN (select distinct billno from workflow_do where auditor='" + userid + "' ) ");
|
|
|
|
|
strSql.Append(" and i.BILLSTATUS=0 ");
|
|
|
|
|
|
|
|
|
|
else if (isaudit == "")
|
|
|
|
|
{
|
|
|
|
|
var rangstr = GetRangDAListStr("", userid,"", companyid);
|
|
|
|
@ -2981,16 +2997,19 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
|
|
|
|
|
strSql.Append(" and " + strCondition);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var sortstring = DatasetSort.Getsortstring(sort);
|
|
|
|
|
if (!string.IsNullOrEmpty(sortstring))
|
|
|
|
|
{
|
|
|
|
|
strSql.Append(" order by " + sortstring);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
strSql.Append(" order by APPLYTIME desc ");
|
|
|
|
|
//var sortstring = DatasetSort.Getsortstring(sort);
|
|
|
|
|
//if (!string.IsNullOrEmpty(sortstring))
|
|
|
|
|
//{
|
|
|
|
|
// strSql.Append(" order by " + sortstring);
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// strSql.Append(" order by APPLYTIME desc ");
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
strSql.Append(@")as t ");
|
|
|
|
|
strSql.Append(string.Format("where t.num>{0} and t.num<={1} ", start, start + limit));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return SetData(strSql);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|