DS7_JinGang
dengyu 1 year ago
parent db145a9f39
commit d8614e2500

@ -78,7 +78,17 @@ namespace DSWeb.Areas.Account.Controllers
public ContentResult GetAuditDataList(int start, int limit, string sort, string condition, string isaudit)
{
var dataList = ChinvoiceapplicationDAL.GetAuditDataList(condition, Convert.ToString(Session["USERID"]), isaudit, Convert.ToString(Session["COMPANYID"]), sort);
var dataList = ChinvoiceapplicationDAL.GetAuditDataList(start, limit,condition, Convert.ToString(Session["USERID"]), isaudit, Convert.ToString(Session["COMPANYID"]), sort);
//var list = dataList.Skip(start).Take(limit);
var list = dataList;
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list }); //list.ToList()
return new ContentResult() { Content = json };
}
public ContentResult GetAuditDataList_App(int start, int limit, string sort, string condition, string isaudit, string userid, string companyid)
{
var dataList = ChinvoiceapplicationDAL.GetAuditDataList(start, limit, condition, userid, isaudit, companyid, sort);
var list = dataList.Skip(start).Take(limit);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });

@ -145,94 +145,7 @@ namespace DSWeb.Areas.Account.Controllers
return new ContentResult() { Content = json };
}
/// <summary>
/// 用于提供给app的查询入口
/// 需传入userid
/// </summary>
/// <param name="userid"></param>
/// <param name="condition"></param>
/// <returns></returns>
///
/*
public class AppParam {
public string userid { get; set; }
public string formname { get; set; }
public string isaudit { get; set; }
public string condition { get; set; }
}
public ContentResult AppInterface()
{
StreamReader sr = new StreamReader(Request.InputStream, Encoding.UTF8);
var strJson = new StringBuilder();
string line = null;
while (((line = sr.ReadLine())) != null)
{
strJson.Append(line);
}
var appparam = JsonConvert.Deserialize<AppParam>(strJson.ToString());
var cdc = new CommonDataContext();
string userid = appparam.userid;
string formname = appparam.formname;
string isaudit = appparam.isaudit;
string condition = appparam.condition;
var userlist = cdc.VW_user.Where(x => x.USERID == userid).ToList();
if (userlist == null || userlist.Count == 0)
{
var json0 = JsonConvert.Serialize(new { Success = false, Message = "没有找到用户" });
return new ContentResult() { Content = json0 };
}
var json = JsonConvert.Serialize(new { Success = true, Message = "未找到查询方法" });
var user = userlist[0];
if (formname == "查询列表") {
var dataList = ChpayapplicationDAL.GetAuditDataList(condition, user.USERID, isaudit, user.SHOWNAME, user.COMPANYID, null);
var json1 = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList() });
return new ContentResult() { Content = json1 };
}
if (formname == "查询明细")
{
var dataList = ChpayapplicationDAL.GetBodyAuditList(0, 9999, condition, "");
var json1 = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList() });
return new ContentResult() { Content = json1 };
}
if (formname == "审批通过")
{
var audithead = ChpayapplicationDAL.GetData(condition, user.USERID, user.SHOWNAME, user.COMPANYID);
var bodyList = new List<ChPayapplication>() { audithead };
DBResult result = ChpayapplicationDAL.AuditList(bodyList, Convert.ToString(Session["USERID"]));
return BasicDataRefDAL.GetContentResult(result);
}
if (formname == "驳回")
{
var audithead = ChpayapplicationDAL.GetData(condition, user.USERID, user.SHOWNAME, user.COMPANYID);
var bodyList = new List<ChPayapplication>() { audithead };
DBResult result = ChpayapplicationDAL.AuditBackList(bodyList, user.USERID, isaudit);
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
return new ContentResult() { Content = json };
}
*/
public ContentResult GetData(string handle, string condition)
{
ChPayapplication head = null;

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

@ -187,7 +187,7 @@ namespace DSWeb.Areas.CommMng.Controllers
}
/// <summary>
/// 付费发票审核
/// 往来单位审批
/// </summary>
/// <returns></returns>
public ContentResult InfoClientAuditInterface()
@ -256,6 +256,77 @@ namespace DSWeb.Areas.CommMng.Controllers
}
return new ContentResult() { Content = json };
}
/// <summary>
/// 发票申请审批
/// </summary>
/// <returns></returns>
public ContentResult InvApplicationAuditInterface()
{
StreamReader sr = new StreamReader(Request.InputStream, Encoding.UTF8);
var strJson = new StringBuilder();
string line = null;
while (((line = sr.ReadLine())) != null)
{
strJson.Append(line);
}
var appparam = JsonConvert.Deserialize<AppParam>(strJson.ToString());
var cdc = new CommonDataContext();
string userid = appparam.userid;
string formname = appparam.formname;
string isaudit = appparam.isaudit;
string condition = appparam.condition;
var userlist = cdc.VW_user.Where(x => x.USERID == userid).ToList();
if (userlist == null || userlist.Count == 0)
{
var json0 = JsonConvert.Serialize(new { Success = false, Message = "没有找到用户" });
return new ContentResult() { Content = json0 };
}
var json = JsonConvert.Serialize(new { Success = true, Message = "未找到查询方法" });
var user = userlist[0];
if (formname == "查询列表")
{
var dataList = ChpayapplicationDAL.GetAuditDataList(condition, user.USERID, isaudit, user.SHOWNAME, user.COMPANYID, null);
var json1 = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList() });
return new ContentResult() { Content = json1 };
}
if (formname == "查询明细")
{
var dataList = ChpayapplicationDAL.GetBodyAuditList(0, 9999, condition, "");
var json1 = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList() });
return new ContentResult() { Content = json1 };
}
if (formname == "审批通过")
{
var audithead = ChpayapplicationDAL.GetData(condition, user.USERID, user.SHOWNAME, user.COMPANYID);
var bodyList = new List<ChPayapplication>() { audithead };
DBResult result = ChpayapplicationDAL.AuditList(bodyList, user.USERID);
return BasicDataRefDAL.GetContentResult(result);
}
if (formname == "驳回")
{
var audithead = ChpayapplicationDAL.GetData(condition, user.USERID, user.SHOWNAME, user.COMPANYID);
var bodyList = new List<ChPayapplication>() { audithead };
DBResult result = ChpayapplicationDAL.AuditBackList(bodyList, user.USERID, isaudit);
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
return new ContentResult() { Content = json };
}
}
}

@ -3715,8 +3715,6 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
{
foreach (var port_decMergeListVo in port_decMergeListVoList)
{
var upd = false;

@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>配置文件1</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>H:\DS7_dev\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />

Loading…
Cancel
Save