|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
using DSWeb.EntityDA;
|
|
|
|
|
using DSWeb.Models;
|
|
|
|
|
using DSWeb.TruckMng.Comm.Cookie;
|
|
|
|
|
using DSWeb.TruckMng.Helper;
|
|
|
|
|
using WebSqlHelper;
|
|
|
|
|
using System.Web.Configuration;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Web.UI.MobileControls.Adapters;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using DSWeb.Areas.CommMng.DAL;
|
|
|
|
|
using DSWeb.Areas.CommMng.Models;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Areas.CommMng.Controllers
|
|
|
|
|
{
|
|
|
|
|
[JsonRequestBehavior]
|
|
|
|
|
public class PublicAPIController : Controller
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public ContentResult SETTLE_DATA_POST()
|
|
|
|
|
{
|
|
|
|
|
//var jsonRespose = new JsonResponse { Success = false, Message = "" };
|
|
|
|
|
|
|
|
|
|
var sr = new StreamReader(Request.InputStream, Encoding.UTF8);
|
|
|
|
|
var strJson = sr.ReadToEnd();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var usercode = CookieConfig.GetCookie_UserCode(Request);
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var headinfo = JsonConvert.Deserialize<GuanMaoYun_Head>(strJson);
|
|
|
|
|
var jsonRespose = PublicAPIDAL.GuanMaoYun_Head_Save(headinfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
|
|
|
|
{
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = false, Message = "" };
|
|
|
|
|
jsonRespose.Success = false;
|
|
|
|
|
jsonRespose.Message = "上传出错";
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public ContentResult SETTLE_FEE_POST()
|
|
|
|
|
{
|
|
|
|
|
//var jsonRespose = new JsonResponse { Success = false, Message = "" };
|
|
|
|
|
|
|
|
|
|
var sr = new StreamReader(Request.InputStream, Encoding.UTF8);
|
|
|
|
|
var strJson = sr.ReadToEnd();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var usercode = CookieConfig.GetCookie_UserCode(Request);
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var headinfo = JsonConvert.Deserialize<GuanMaoYun_Fee>(strJson);
|
|
|
|
|
var jsonRespose = PublicAPIDAL.GuanMaoYun_Fee_Save(headinfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = false, Message = "" };
|
|
|
|
|
jsonRespose.Success = false;
|
|
|
|
|
jsonRespose.Message = "上传出错:["+e.Message+"]";
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|