|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
using DSWeb.MvcShipping.DAL.MsAnnounce;
|
|
|
|
|
using DSWeb.Areas.MvcShipping.DAL.MsOpCtnFeeSearchDAL;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using HcUtility.Comm;
|
|
|
|
|
using HcUtility.Core;
|
|
|
|
|
using System.Web.Script.Serialization;
|
|
|
|
|
using DSWeb.EntityDA;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using DSWeb.Areas.CommMng.Models;
|
|
|
|
|
using Microsoft.Practices.EnterpriseLibrary.Data;
|
|
|
|
|
using DSWeb.Areas.MvcShipping.DAL.Message;
|
|
|
|
|
using DSWeb.MvcShipping.DAL.MsSysBillNoSet;
|
|
|
|
|
using DSWeb.MvcShipping.DAL.MsCodeFtpSet;
|
|
|
|
|
|
|
|
|
|
using DSWeb.TruckMng.Comm.Cookie;
|
|
|
|
|
using DSWeb.TruckMng.Helper;
|
|
|
|
|
using DSWeb.TruckMng.Helper.Repository;
|
|
|
|
|
using DSWeb.Areas.MvcShipping.Models.MsOpCtnFeeModelModel;
|
|
|
|
|
using DSWeb.Areas.MvcShipping.Models.MsOpCtnFeeSearch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class MsOpCtnFeeSearchController : Controller
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
// GET:
|
|
|
|
|
public ActionResult Index ( )
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// GET: /
|
|
|
|
|
public ActionResult Edit ( )
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
public ActionResult InEdit ( )
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
public ContentResult GetDataList ( int start, int limit, string sort, string condition )
|
|
|
|
|
{
|
|
|
|
|
int count = 0;
|
|
|
|
|
var dataList = MsOpCtnFeeSearchDAL.GetFeeDataList(condition);
|
|
|
|
|
var timeStamp = DateTime.Now.ToShortDateString();
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data = dataList.ToList(), timeStamp = timeStamp });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ContentResult GetData ( string condition )
|
|
|
|
|
{
|
|
|
|
|
int count = 0;
|
|
|
|
|
var dataList = MsOpCtnFeeSearchDAL.GetFeeDataList(condition);
|
|
|
|
|
if (dataList.Count>0)
|
|
|
|
|
{
|
|
|
|
|
var timeStamp = DateTime.Now.ToShortDateString();
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data = dataList[0], timeStamp = timeStamp });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var timeStamp = DateTime.Now.ToShortDateString();
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = false, Message = "没有数据", totalCount = count, data = "", timeStamp = timeStamp });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//GetCtnDataList
|
|
|
|
|
public ContentResult GetCtnDataList ( string condition )
|
|
|
|
|
{
|
|
|
|
|
int count = 0;
|
|
|
|
|
var dataList = MsOpCtnFeeSearchDAL.GetCtnDataList(condition);
|
|
|
|
|
var timeStamp = DateTime.Now.ToShortDateString();
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data = dataList.ToList(), timeStamp = timeStamp });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ContentResult Save (string opstatus,string data, string details,string duizhangriqi)
|
|
|
|
|
{
|
|
|
|
|
var head = JsonConvert.Deserialize<MsOpCtnFee>(data);
|
|
|
|
|
var body = JsonConvert.Deserialize<List<MsOpCtnFeeSearch>>(details);
|
|
|
|
|
string RepairID = "";
|
|
|
|
|
var rst = MsOpCtnFeeSearchDAL.Save(head,body, duizhangriqi, opstatus);
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = rst, Message = rst ? "保存成功" : "保存成功", Data = RepairID });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ContentResult GetDetailsWithMBLNOAndXiangHao ( string mblno, string xianghao )
|
|
|
|
|
{
|
|
|
|
|
var dataList = MsOpCtnFeeSearchDAL.GetDetailsWithMBLNOAndXiangHao(mblno,xianghao);
|
|
|
|
|
var timeStamp = DateTime.Now.ToShortDateString();
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList(), timeStamp = timeStamp });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ContentResult GetDuiZhangFee ( string details)
|
|
|
|
|
{
|
|
|
|
|
List<MsOpCtnFeeSearch> body = JsonConvert.Deserialize<List<MsOpCtnFeeSearch>>(details);
|
|
|
|
|
float rst = MsOpCtnFeeSearchDAL.GetTotalRealWithMsOpCtnFeeSearchList(body);
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = rst.ToString()});
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|