You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/TruckMng/Controllers/MsWlBsAuditController.cs

70 lines
2.6 KiB
C#

3 years ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DSWeb.Areas.TruckMng.DAL.MsWlBs;
using DSWeb.Areas.TruckMng.DAL.MsWlBsAudit;
using DSWeb.Areas.TruckMng.Models.MsWlBsAudit;
using DSWeb.TruckMng.Helper;
using HcUtility.Comm;
using DSWeb.TruckMng.Comm.Cookie;
namespace DSWeb.Areas.TruckMng.Controllers
{
[JsonRequestBehavior]
public class MsWlBsAuditController : Controller
{
//
// GET: /TruckMng/MsWlBsAudit/
public ActionResult Index()
{
return View();
}
public ContentResult GetDataList(int start, int limit, string sort, string condition)
{
var dataList = MsWlBsAuditDAL.GetDataList(condition, Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), CookieConfig.GetCookie_OrgCode(Request),sort);
var list = dataList.Skip(start).Take(limit);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
return new ContentResult() { Content = json };
}
public ContentResult Lock(string jsonbilllist, string lockType, string newStatus)
{
var billlist = JsonConvert.Deserialize<List<MsWlBizBill>>(jsonbilllist);
DBResult result = MsWlBsAuditDAL.Lock(billlist, lockType, newStatus);
var json = JsonConvert.Serialize(result);
return new ContentResult() { Content = json };
}
public ContentResult GetFixFeeDataList(string billno, string billtype)
{
if (billtype == "0")
{
var dataList = MsWlBsDAL.GetBodyList("BillNo='" + billno + "'");
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
return new ContentResult() { Content = json };
}
else if (billtype == "1")
{
var dataList = MsWlPcDAL.GetBodyList("BillNo='" + billno + "'");
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
return new ContentResult() { Content = json };
}
else
{
var json = JsonConvert.Serialize(new { Success = false, Message = "输入的类型不存在" });
return new ContentResult() { Content = json };
}
}
}
}