|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
|
|
|
|
|
using DSWeb.Areas.OA.DAL.Baoxiao;
|
|
|
|
|
using DSWeb.Areas.OA.Models.Baoxiao;
|
|
|
|
|
using DSWeb.Areas.OA.Models.Comm;
|
|
|
|
|
using DSWeb.TruckMng.Comm.Cookie;
|
|
|
|
|
using DSWeb.TruckMng.Helper;
|
|
|
|
|
using DSWeb.TruckMng.Helper.Repository;
|
|
|
|
|
using DSWeb.Areas.CommMng.DAL;
|
|
|
|
|
|
|
|
|
|
using HcUtility.Comm;
|
|
|
|
|
using HcUtility.Core;
|
|
|
|
|
using Microsoft.Practices.EnterpriseLibrary.Data;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
|
|
|
|
using DSWeb.Areas.Import.Models.CwVouitems;
|
|
|
|
|
using DSWeb.Areas.Import.Models.CwDesign;
|
|
|
|
|
using DSWeb.Areas.Import.DAL.CwVouchersDAL;
|
|
|
|
|
using DSWeb.Areas.Import.Models.CwVouchers;
|
|
|
|
|
|
|
|
|
|
using DSWeb.EntityDA;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Areas.OA.Controllers
|
|
|
|
|
{
|
|
|
|
|
[JsonRequestBehavior]
|
|
|
|
|
public class BaoxiaoAuditController : Controller
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
// GET: /Import/XXH
|
|
|
|
|
public ActionResult Index()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// GET: /Import/XXH/Edit
|
|
|
|
|
public ActionResult Edit()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// GET:/Import/XXH/GetDataList
|
|
|
|
|
public ContentResult GetDataList(int start, int limit, string sort, string condition)
|
|
|
|
|
{
|
|
|
|
|
var workflowname = "BaoxiaoMod";
|
|
|
|
|
var corpid = Convert.ToString(Session["COMPANYID"]);
|
|
|
|
|
var userid = Convert.ToString(Session["USERID"]);
|
|
|
|
|
|
|
|
|
|
var dataList = BaoxiaoDAL.GetAuditDataList(condition, workflowname, corpid, userid, Convert.ToString(Session["SHOWNAME"]));
|
|
|
|
|
|
|
|
|
|
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 GetData(string handle, string condition)
|
|
|
|
|
{
|
|
|
|
|
Baoxiaomb head = null;
|
|
|
|
|
|
|
|
|
|
if (handle == "edit")
|
|
|
|
|
{
|
|
|
|
|
var list = BaoxiaoDAL.GetDataList(condition);
|
|
|
|
|
if (list.Count > 0)
|
|
|
|
|
head = list[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (head == null)
|
|
|
|
|
{
|
|
|
|
|
head = new Baoxiaomb();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var json = JsonConvert.Serialize(
|
|
|
|
|
new { Success = true, Message = "查询成功", data = head });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
public ContentResult GetFeeList(string BXGID)
|
|
|
|
|
{
|
|
|
|
|
var dataList = BaoxiaoDAL.GetFeeList("BXGID='" + BXGID + "'");
|
|
|
|
|
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
public ContentResult GetPayList(string BXGID)
|
|
|
|
|
{
|
|
|
|
|
var dataList = BaoxiaoDAL.GetPayList(BXGID);
|
|
|
|
|
|
|
|
|
|
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 WorkFlowName,string DEPTGID,string Reason, string chfeelist)
|
|
|
|
|
{
|
|
|
|
|
var chfeeList = JsonConvert.Deserialize<List<Baoxiaomb>>(chfeelist);
|
|
|
|
|
var USERID = Convert.ToString(CookieConfig.GetCookie_UserId(Request));
|
|
|
|
|
//var DEPTGID = Convert.ToString(Session["DEPTGID"]);
|
|
|
|
|
DBResult result = BaoxiaoDAL.Audit(newStatus, WorkFlowName, /*DEPTGID,*/ USERID, Reason, chfeeList);
|
|
|
|
|
|
|
|
|
|
var json = JsonConvert.Serialize(result);
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//public ContentResult AuditBack(int newStatus, string WorkFlowName, string chfeelist)
|
|
|
|
|
//{
|
|
|
|
|
// var chfeeList = JsonConvert.Deserialize<List<Baoxiaomb>>(chfeelist);
|
|
|
|
|
// var USERID = Convert.ToString(CookieConfig.GetCookie_UserId(Request));
|
|
|
|
|
// var COMPANYID = Convert.ToString(Session["COMPANYID"]);
|
|
|
|
|
// DBResult result = BaoxiaoDAL.Audit(newStatus, WorkFlowName, COMPANYID, USERID, chfeeList);
|
|
|
|
|
|
|
|
|
|
// var json = JsonConvert.Serialize(result);
|
|
|
|
|
// return new ContentResult() { Content = json };
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
#region 参照部分
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|