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.
92 lines
3.6 KiB
C#
92 lines
3.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using DSWeb.Areas.TruckMng.DAL.Comm;
|
|
using DSWeb.Areas.TruckMng.Models.Comm;
|
|
using DSWeb.TruckMng.Helper;
|
|
using HcUtility.Comm;
|
|
|
|
namespace DSWeb.Areas.TruckMng.Controllers
|
|
{
|
|
[JsonRequestBehavior]
|
|
public class MsChFeeController : Controller
|
|
{
|
|
//
|
|
// GET: /TruckMng/MsChFee/GetDataList
|
|
|
|
public ContentResult GetDataList(string billno)
|
|
{
|
|
string userid = Session["USERID"] == null ? "" : Session["USERID"].ToString();
|
|
var dataList = MsChFeeDAL.GetDataList("BsNo='"+billno+"'",userid);
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
|
|
public ContentResult GetDataList_bycondition(string condition)
|
|
{
|
|
string userid = Session["USERID"] == null ? "" : Session["USERID"].ToString();
|
|
var dataList = MsChFeeDAL.GetDataList(condition, userid);
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
|
|
public ContentResult GetAuditDataList(string billno)
|
|
{
|
|
string userid = Session["USERID"] == null ? "" : Session["USERID"].ToString();
|
|
var dataList = MsChFeeDAL.GetDataList("BsNo='" + billno + "' and (FeeStatus<>1 and FeeStatus<>6)",userid);
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
|
|
public ContentResult GetAuditDataList_ALL(string billno)
|
|
{
|
|
string userid = Session["USERID"] == null ? "" : Session["USERID"].ToString();
|
|
var dataList = MsChFeeDAL.GetDataList("BsNo='" + billno + "' ",userid);
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
|
|
/* public ContentResult GetSettlementDataList(string billno)
|
|
{
|
|
// var dataList = MsChFeeDAL.GetSettlementList("BsNo='" + billno + "' and (FeeStatus=0)");
|
|
|
|
// var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
// return new ContentResult() { Content = json };
|
|
}
|
|
*/
|
|
|
|
public ContentResult Audit(int newStatus, string list)
|
|
{
|
|
var chfeeList = JsonConvert.Deserialize<List<MsChFee>>(list);
|
|
|
|
DBResult result = MsChFeeDAL.Audit(newStatus, chfeeList);
|
|
|
|
var json = JsonConvert.Serialize(result);
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
|
|
public ContentResult IsFee(string billno)
|
|
{
|
|
var isFee = MsChFeeDAL.GetFeeCount(billno);
|
|
if (isFee)
|
|
{
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功" });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
else {
|
|
var json = JsonConvert.Serialize(new { Success = false, Message = "查询成功" });
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|