dev
hanxuntao 1 month ago
commit f81f4cbf5e

@ -3118,7 +3118,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
BasicDataRefDAL.SaveLog(strJson, "", "乐企他用蓝票", "发出"); BasicDataRefDAL.SaveLog(strJson, "", "乐企他用蓝票", "发出");
result = BasicDataRefDAL.SendToDJY("", strJson, SendUser.USERID, "", "东胜乐企他用_蓝票",USERKEY,USERSECRET); result = BasicDataRefDAL.SendToLQTY("", strJson, SendUser.USERID, "", "东胜乐企他用_蓝票",USERKEY,USERSECRET);
if (result.Success && result.Data != null) if (result.Success && result.Data != null)
{ {
@ -3163,7 +3163,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
strJson = DSWeb.MvcShipping.Helper.JsonConvert.Serialize(sendobject); strJson = DSWeb.MvcShipping.Helper.JsonConvert.Serialize(sendobject);
result = BasicDataRefDAL.SendToDJY("", strJson, SendUser.USERID, "", "东胜乐企他用_冲红", USERKEY, USERSECRET); result = BasicDataRefDAL.SendToLQTY("", strJson, SendUser.USERID, "", "东胜乐企他用_冲红", USERKEY, USERSECRET);
return result; return result;
} }
@ -3185,7 +3185,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
// //
result = BasicDataRefDAL.SendToDJY("", strJson, SendUser.USERID, "", "东胜乐企他用_读取",USERKEY,USERSECRET); result = BasicDataRefDAL.SendToLQTY("", strJson, SendUser.USERID, "", "东胜乐企他用_读取",USERKEY,USERSECRET);
if (result.Data == null) { if (result.Data == null) {
result.Data = ""; result.Data = "";

@ -7679,9 +7679,10 @@ namespace DSWeb.Areas.CommMng.DAL
// return result.SetErrorInfo("系统参数ReceiveDjydc没有设为true"); // return result.SetErrorInfo("系统参数ReceiveDjydc没有设为true");
//} //}
} }
else { else
{
return result; return result;
} }
try try
@ -7761,6 +7762,8 @@ namespace DSWeb.Areas.CommMng.DAL
} }
else { else {
MsSysParamSetDAL.SaveSysParamValue("LQTYAPIURL", "乐企他用接口服务地址", "http://47.105.115.105:26650"); MsSysParamSetDAL.SaveSysParamValue("LQTYAPIURL", "乐企他用接口服务地址", "http://47.105.115.105:26650");
MsSysParamSetDAL.SaveSysParamValue("DJYAPIURL", "大简云接口服务地址", "http://47.105.115.105:26650");
} }
} }
catch(Exception e) catch(Exception e)
@ -7773,6 +7776,122 @@ namespace DSWeb.Areas.CommMng.DAL
} }
public static DBResult SendToLQTY(string APIUrl, string strJson, string USERID, string APINAME = "", string APIDETAILNAME = "", string USERKEY = "", string USERSECRET = "")
{
var result = new DBResult();
//var DJYUPDATE = MsSysParamSetDAL.GetData("PARAMNAME='DJYUPDATE'");
//if (DJYUPDATE.PARAMVALUE != "1") return result;
//var ReceiveDjydc = ConfigurationManager.AppSettings["ReceiveDjydc"];
//if (ReceiveDjydc != null && ReceiveDjydc.ToString().ToUpper() == "TRUE")
//{
// //if (ReceiveDjydc == "true")
// //{
// // //SaveLog("", "", "接收大简云订舱", "启动接收");
// //}
// //else
// //{
// // return result.SetErrorInfo("系统参数ReceiveDjydc没有设为true");
// //}
//}
//else {
// return result;
//}
try
{
var cdc = new CommonDataContext();
T_ALL_DA T_ALL_DA = new T_ALL_DA();
var DJYURL = MsSysParamSetDAL.GetData("PARAMNAME='LQTYAPIURL'");
var headers = new NameValueCollection();
if (!string.IsNullOrEmpty(DJYURL.PARAMVALUE))
{
// /Booking/CancelBooking
//string rtn = WebRequestHelper.DoPost(DJYURL.PARAMVALUE + APIUrl, strJson);
//
if (!string.IsNullOrWhiteSpace(USERKEY) && !string.IsNullOrWhiteSpace(USERSECRET))
{
headers["USER_KEY"] = USERKEY;
headers["USER_SECRET"] = USERSECRET;
}
else
{
if (!string.IsNullOrWhiteSpace(APINAME))
{
var accCfg = MsSysThirdPartyAccountDAL.MakeSureField(APINAME, USERID);
//枚举类型96050 维护api地址。有时一个业务有多个api但是使用同一组userkey和secret
//因此如果通过 apiname=第三方账号密码设置中的类型 找不到内容
//则通过枚举类型96050当中enumvalueid=apiname 查找 enumvaluename(在这里存放apiurl)
if (accCfg.Success)
{
var accCfgInfo = (SysThirdPartyAccount)accCfg.Data;
headers["USER_KEY"] = accCfgInfo.ACCOUNT;
headers["USER_SECRET"] = accCfgInfo.ACCOUNTPSW;
var enumValue = cdc.tSysEnumValue.Where(x => x.EnumTypeID == 96020 && x.EnumValueName == APINAME).ToList();
if (enumValue != null && enumValue.Count > 0)
{
APIUrl = enumValue[0].EnumValueName_2;
}
}
else
{
result.SetErrorInfo($"[{APINAME}]没有设置第三方账号;");
return result;
}
}
//headers["USER_KEY"] = "0c635164b5b140828d156f178c86113c";
//headers["USER_SECRET"] = "7d23ef98894358e261996f46fb7d63aa8428a3d558cb21ed116f88c77642ba781c361c94cb1a8031";
}
var apiurlList = cdc.tSysEnumValue.Where(x => x.EnumTypeID == 96050).ToList();
if (apiurlList != null && apiurlList.Count > 0 && apiurlList.Exists(x => x.EnumValueID == APIDETAILNAME))
{
APIUrl = apiurlList.First(x => x.EnumValueID == APIDETAILNAME).EnumValueName;
}
BasicDataRefDAL.SaveLog(DJYURL.PARAMVALUE + APIUrl + "////" + strJson, $"{APINAME};{APIDETAILNAME}", "大简云接口调用", "发送");
var rtn = DSWeb.Areas.MvcShipping.Comm.WebRequestHelper.DoPost_JSON_Header(DJYURL.PARAMVALUE + APIUrl, strJson, 30000, headers);
BasicDataRefDAL.SaveLog(rtn, $"{APINAME};{APIDETAILNAME}", "大简云接口调用", "返回");
result.OK("同步完成", rtn);
}
else
{
MsSysParamSetDAL.SaveSysParamValue("LQTYAPIURL", "乐企他用接口服务地址", "http://47.105.115.105:26650");
//MsSysParamSetDAL.SaveSysParamValue("DJYAPIURL", "大简云接口服务地址", "http://47.105.115.105:26650");
}
}
catch (Exception e)
{
result.SetErrorInfo(e.Message);
SaveLog(JsonConvert.Serialize(e), "", "SendToDJY", "错误");
}
return result;
}
public static void CheckWebconfig(string itemname, ref DBResult result) public static void CheckWebconfig(string itemname, ref DBResult result)
{ {
var item = ConfigurationManager.AppSettings[itemname]; var item = ConfigurationManager.AppSettings[itemname];

@ -42,6 +42,11 @@ using com.sun.tools.corba.se.idl.constExpr;
using static DSWeb.Common.DB.OP_SERVICEBILL_md; using static DSWeb.Common.DB.OP_SERVICEBILL_md;
using DSWeb.Areas.CommMng.Models; using DSWeb.Areas.CommMng.Models;
using DSWeb.Areas.Import.DAL.Comm; using DSWeb.Areas.Import.DAL.Comm;
using DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL;
using DSWeb.MvcShipping.Models.MsOpSeae;
using DSWeb.Areas.Dispatch.Models;
using DSWeb.MvcShipping.Models.MsChFee;
using static DSWeb.Areas.CommMng.DAL.PublicAPIDAL.OAHelper;
//using System.Web.Http; //using System.Web.Http;
namespace DSWeb.Areas.Dispatch.Controllers namespace DSWeb.Areas.Dispatch.Controllers
@ -207,6 +212,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
public int limit { get; set; } = 30; public int limit { get; set; } = 30;
public string bsno { get; set; }
} }
/// <summary> /// <summary>
@ -253,7 +259,6 @@ namespace DSWeb.Areas.Dispatch.Controllers
}); });
} }
if (QueryInfo.formname == "USER") if (QueryInfo.formname == "USER")
{ {
@ -383,7 +388,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
}); });
} }
if (QueryInfo.formname == "FRT ") if (QueryInfo.formname == "FRT")
{ {
var evList = new List<string> { var evList = new List<string> {
@ -398,6 +403,30 @@ namespace DSWeb.Areas.Dispatch.Controllers
BaseInfo = evList BaseInfo = evList
}); });
} }
if (QueryInfo.formname == "ORSTATUS")
{
var evList = new Dictionary<string,string> {
{"9", "录入状态" }
,{"1", "提交审核" }
,{"2", "驳回提交" }
,{"4", "退舱" }
,{"8", "确认订舱" }
,{"0", "审核通过" }
,{"", "全部" }
,{"-1", "不含退舱" }
};
//evList.Add("委托单位");
_result = Json(new
{
ErrorCode = 0,
Message = "获取成功",
BaseInfo = evList
});
}
return _result; return _result;
} }
catch (Exception e) catch (Exception e)
@ -415,6 +444,265 @@ namespace DSWeb.Areas.Dispatch.Controllers
return Json(new { ErrorCode = 500, Message = "发生错误" }, JsonRequestBehavior.AllowGet); return Json(new { ErrorCode = 500, Message = "发生错误" }, JsonRequestBehavior.AllowGet);
} }
/// <summary>
/// 获取费用列表
/// </summary>
/// <param name="CUSTOMERNAME"></param>
/// <returns></returns>
[HttpPost]
public ActionResult GetFeeList(EnumQueryInfo QueryInfo)
{
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
#region 测试逻辑
//var userinfo = cdc.VW_user .Where(x => x.CODENAME.ToUpper() == "ADMIN").FirstOrDefault();
#endregion
var _result = Json(new { });
try
{
var bsno= QueryInfo.bsno;
var List = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.GetDataList($" bsno='{bsno}' ", 1, "seaeOrder", userinfo.USERID, userinfo.SHOWNAME, userinfo.COMPANYID);
var List = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.GetDataList($" bsno='{bsno}' ", 2, "seaeOrder", userinfo.USERID, userinfo.SHOWNAME, userinfo.COMPANYID);
var evList = new List<DSWeb.MvcShipping.Models.MsChFee.MsChFee>();
if (List != null && List.Count > 0) {
evList.AddRange(List);
}
if (List != null && List.Count > 0)
{
evList.AddRange(List);
}
_result = Json(new
{
ErrorCode = 0,
Message = "获取成功",
BaseInfo = evList
});
return _result;
}
catch (Exception e)
{
BasicDataRefDAL.SaveLog(JsonConvert.SerializeObject(e), e.Message, "wxapp", "查询错误");
_result = Json(new
{
ErrorCode = 500,
Message = e.Message,
Data = e
});
}
return Json(new { ErrorCode = 500, Message = "发生错误" }, JsonRequestBehavior.AllowGet);
}
/// <summary>
/// 保存费用列表
/// </summary>
/// <param name="CUSTOMERNAME"></param>
/// <returns></returns>
[HttpPost]
public ActionResult SaveFeeList(EnumQueryInfo QueryInfo)
{
try
{
Stream postData = Request.InputStream;
StreamReader sRead = new StreamReader(postData);
string postContent = sRead.ReadToEnd();
sRead.Close();
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
string LANGUAGES = "";
string userid = userinfo.USERID;
var aaa = "";
var saveinfo = JsonConvert.DeserializeObject<SaveFeeListParam>(postContent);
var bodyList = saveinfo.Body;
var result = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.DoSave(saveinfo.bsno, userinfo.USERID, userinfo.COMPANYID, bodyList,"");
if (result.Success)
{
return Json(new { ErrorCode = 0, Message = result.Message, Data = result.Data });
}
else
{
return Json(new { ErrorCode = 500, Message = "保存错误:" + result.Message });
}
}
catch (Exception e)
{
return Json(new { ErrorCode = 500, Message = "发生错误:" + e.Message });
}
}
/// <summary>
/// 删除费用列表
/// </summary>
/// <param name="CUSTOMERNAME"></param>
/// <returns></returns>
[HttpPost]
public ActionResult DelFeeList(EnumQueryInfo QueryInfo)
{
try
{
Stream postData = Request.InputStream;
StreamReader sRead = new StreamReader(postData);
string postContent = sRead.ReadToEnd();
sRead.Close();
var searchParams = JsonConvert.DeserializeObject<DelFeeListParam>(postContent);
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
string LAN = Convert.ToString(Session["LANGUAGES"]);
var shanchuchenggong = "删除成功!";
if (LAN == "en-us")
{
shanchuchenggong = "Successfully deleted";
}
int iResult = 0;
var bodyList = searchParams.feeids;
var result = new DBResult();
if (bodyList != "" || bodyList != null)
{
iResult = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.DeleteFee(bodyList);
DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.p_op_gain(searchParams.bsno, userinfo.USERID);
}
if (iResult == 1)
{
result.Success = true;
result.Message = shanchuchenggong;
}
else if (iResult == 0)
{
result.Success = false;
result.Message = "出现错误,未删除!";
}
else if (iResult == -1)
{
result.Success = false;
result.Message = "有异常,删除失败!";
}
else if (iResult == -2)
{
result.Success = false;
result.Message = "删除异常,事务已回滚成功!";
}
return Json(new { ErrorCode = 0, result.Message });
}
catch (Exception e)
{
return Json(new { ErrorCode = 500, Message = "发生错误:" + e.Message });
}
}
/// <summary>
/// 获取ctn列表
/// </summary>
/// <param name="CUSTOMERNAME"></param>
/// <returns></returns>
[HttpPost]
public ActionResult GetCtnList(EnumQueryInfo QueryInfo)
{
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
#region 测试逻辑
//var userinfo = cdc.VW_user .Where(x => x.CODENAME.ToUpper() == "ADMIN").FirstOrDefault();
#endregion
var _result = Json(new { });
try
{
var evList = cdc.OP_CTN.Where(x => x.BSNO == QueryInfo.bsno).ToList();
_result = Json(new
{
ErrorCode = 0,
Message = "获取成功",
BaseInfo = evList
});
return _result;
}
catch (Exception e)
{
BasicDataRefDAL.SaveLog(JsonConvert.SerializeObject(e), e.Message, "wxapp", "查询错误");
_result = Json(new
{
ErrorCode = 500,
Message = e.Message,
Data = e
});
}
return Json(new { ErrorCode = 500, Message = "发生错误" }, JsonRequestBehavior.AllowGet);
}
#endregion #endregion
@ -3003,6 +3291,62 @@ namespace DSWeb.Areas.Dispatch.Controllers
} }
} }
[System.Web.Http.HttpPost]
public ActionResult SaveSeaeOrderList(EnumQueryInfo QueryInfo)
{
try
{
Stream postData = Request.InputStream;
StreamReader sRead = new StreamReader(postData);
string postContent = sRead.ReadToEnd();
sRead.Close();
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
#region 测试逻辑
//var userinfo = cdc.VW_user.Where(x=>x.CODENAME=="admin").FirstOrDefault();
#endregion
string LANGUAGES = "";
string userid = userinfo.USERID;
var aaa = "";
var saveinfo = JsonConvert.DeserializeObject<SaveSeaeOrderParam>(postContent);
var headData = saveinfo.Head;
var bodyList = saveinfo.Body;
var result = DSWeb.MvcShipping.DAL.MsSeaeOrderDAL.MsSeaeOrderDAL.DoSave(saveinfo.opstatus, userinfo.USERID, userinfo.SHOWNAME, headData, bodyList);
if (result.Success)
{
return Json(new { ErrorCode = 0,Message= result.Message, Data = result.Data });
}
else
{
return Json(new { ErrorCode = 500, Message = "保存错误:" + result.Message});
}
}
catch (Exception e)
{
return Json(new { ErrorCode = 500, Message = "发生错误:" + e.Message });
}
}
#endregion #endregion
@ -3035,7 +3379,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
result += $" >= '{SearchValue}'"; result += $" >= '{SearchValue}'";
} }
if (SearchType == "equal") if (SearchType == "equalandsmaller")
{ {
result += $" <= '{SearchValue}'"; result += $" <= '{SearchValue}'";
} }
@ -3055,4 +3399,30 @@ namespace DSWeb.Areas.Dispatch.Controllers
} }
} }
public class SaveParam
{
/// <summary>
/// add edit
/// </summary>
public string opstatus { get; set; }
}
public class SaveSeaeOrderParam: SaveParam
{
public MsSeaeOrder Head {get;set;}
public List<MsSeaeOrderCtn> Body { get; set; }
}
public class SaveFeeListParam : SaveParam
{
public string bsno { get; set; }
public List<MsChFee> Body { get; set; }
}
public class DelFeeListParam : SaveParam
{
public string bsno { get; set; }
public string feeids { get; set; }
}
} }

@ -401,7 +401,7 @@ namespace DSWeb.MvcShipping.Controllers
var json = JsonConvert.Serialize(new { Success = result.Success}); var json = JsonConvert.Serialize(new { Success = result.Success});
return new ContentResult() { Content = json }; return new ContentResult() { Content = json };
} }
public ContentResult GetAmendGainData(string bsno,string bltype="") public ContentResult GetAmendGainData(string bsno,string bltype="")
{ {
var dataList = new List<MsChFeeGain>(); var dataList = new List<MsChFeeGain>();
string LAN = Convert.ToString(Session["LANGUAGES"]); string LAN = Convert.ToString(Session["LANGUAGES"]);
@ -522,6 +522,20 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult Save(string bsno, string chfeebody,string isyj="0") public ContentResult Save(string bsno, string chfeebody,string isyj="0")
{ {
string LAN = Convert.ToString(Session["LANGUAGES"]); string LAN = Convert.ToString(Session["LANGUAGES"]);
var bodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody);
var result = MsChFeeDAL.DoSave(
bsno, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]), bodyList, LAN, isyj
);
var _r = BasicDataRefDAL.GetContentResult(result);
return _r;
/*
var custnamestr = "客户名称:"; var custnamestr = "客户名称:";
var xitongbucunzai = "系统中不存在,请检查"; var xitongbucunzai = "系统中不存在,请检查";
var yifeiyongsuoding = "已费用锁定,不允许添加修改费用!"; var yifeiyongsuoding = "已费用锁定,不允许添加修改费用!";
@ -531,7 +545,8 @@ namespace DSWeb.MvcShipping.Controllers
var feename = "费用名称"; var feename = "费用名称";
var notempty = "核算单位不能为空!"; var notempty = "核算单位不能为空!";
var blackname = "此客户为黑名单客户,请联系管理员!"; var blackname = "此客户为黑名单客户,请联系管理员!";
if (LAN == "en-us") { if (LAN == "en-us")
{
custnamestr = "Customer Name"; custnamestr = "Customer Name";
xitongbucunzai = "Not present in the system, please check"; xitongbucunzai = "Not present in the system, please check";
yifeiyongsuoding = "Fee locked, adding or modifying fees not allowed"; yifeiyongsuoding = "Fee locked, adding or modifying fees not allowed";
@ -542,11 +557,15 @@ namespace DSWeb.MvcShipping.Controllers
notempty = " Sale Corp Can not Empty"; notempty = " Sale Corp Can not Empty";
blackname = "This customer is on the blacklist. Please contact the administrator"; blackname = "This customer is on the blacklist. Please contact the administrator";
} }
var FEEMUSTBESALECORP= MsSysParamSetDAL.GetData("PARAMNAME='FEEMUSTBESALECORP'"); var FEEMUSTBESALECORP= MsSysParamSetDAL.GetData("PARAMNAME='FEEMUSTBESALECORP'");
int iResult = 0; int iResult = 0;
var bodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody); var bodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody);
var result =new DBResult(); var result =new DBResult();
T_ALL_DA T_ALL_DA = new T_ALL_DA(); T_ALL_DA T_ALL_DA = new T_ALL_DA();
decimal feetype = 0; decimal feetype = 0;
var custstr = ""; var custstr = "";
@ -582,8 +601,8 @@ namespace DSWeb.MvcShipping.Controllers
} }
} }
} }
if (custstr != "") { if (custstr != "") {
var jsonRespose2 = new JsonResponse var jsonRespose2 = new JsonResponse
{ {
@ -655,7 +674,7 @@ namespace DSWeb.MvcShipping.Controllers
//} //}
if (isyj == "1") if (isyj == "1")
{ {
var YJMUSTBEFEECLOSE = MsSysParamSetDAL.GetData("PARAMNAME='YJMUSTBEFEECLOSE'"); var YJMUSTBEFEECLOSE = MsSysParamSetDAL.GetData("PARAMNAME='YJMUSTBEFEECLOSE'");
@ -705,8 +724,6 @@ namespace DSWeb.MvcShipping.Controllers
} }
} }
if (bodyList != null) if (bodyList != null)
{ {
var type = bodyList[0].FeeType; var type = bodyList[0].FeeType;
@ -769,6 +786,8 @@ namespace DSWeb.MvcShipping.Controllers
}; };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
*/
} }
public ContentResult SavePiLiang(string bslist, string chfeebody, string optype) public ContentResult SavePiLiang(string bslist, string chfeebody, string optype)
@ -940,7 +959,12 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }
/// <summary>
/// data应该为形如 gid,gid的费用id
/// </summary>
/// <param name="bsno"></param>
/// <param name="data"></param>
/// <returns></returns>
public ContentResult Delete(string bsno,string data) public ContentResult Delete(string bsno,string data)
{ {
@ -959,8 +983,8 @@ namespace DSWeb.MvcShipping.Controllers
if (bodyList !="" ||bodyList != null) if (bodyList !="" ||bodyList != null)
{ {
iResult = MsChFeeDAL.DeleteFee(bodyList); iResult = MsChFeeDAL.DeleteFee(bodyList);
MsChFeeDAL.p_op_gain(bsno, Convert.ToString(Session["USERID"])); MsChFeeDAL.p_op_gain(bsno, Convert.ToString(Session["USERID"]));
} }
if (iResult == 1) if (iResult == 1)

@ -435,6 +435,11 @@ namespace DSWeb.MvcShipping.Controllers
var modb = new ModelObjectRepository(); var modb = new ModelObjectRepository();
var GID = headData.GID; var GID = headData.GID;
headData.SHORTNAME = headData.SHORTNAME.Trim();
headData.DESCRIPTION = headData.DESCRIPTION.Trim();
headData.ENFULLNAME = headData.ENFULLNAME.Trim();
DBResult result = modb.Save(headData DBResult result = modb.Save(headData
, ModelObjectConvert<MsClientAccount>.ToModelObjectList(bodyList) , ModelObjectConvert<MsClientAccount>.ToModelObjectList(bodyList)
, ModelObjectConvert<MsClientAccount>.ToModelObjectList(bodyListDel) , ModelObjectConvert<MsClientAccount>.ToModelObjectList(bodyListDel)

@ -170,135 +170,138 @@ namespace DSWeb.MvcShipping.Controllers
var isPost = true; var isPost = true;
var errorstr = ""; var errorstr = "";
var _result = MsSeaeOrderDAL.DoSave(opstatus, Convert.ToString(Session["USERID"]).ToString(), Convert.ToString(Session["SHOWNAME"]).ToString(), headData, bodyList);
if (headData.MBLNO != "" && headData.MBLNO != null) return BasicDataRefDAL.GetContentResult(_result);
{
var ct = MsSeaeOrderDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND MBLNO='" + headData.MBLNO + "' and ORSTATUS<>'4'");
if (ct != 0)
{
isPost = false;
errorstr = "主提单号重复";
}
}
if (string.IsNullOrWhiteSpace(headData.BSNO)) { //if (headData.MBLNO != "" && headData.MBLNO != null)
headData.BSNO = "topseae" + System.Guid.NewGuid().ToString(); //{
} // var ct = MsSeaeOrderDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND MBLNO='" + headData.MBLNO + "' and ORSTATUS<>'4'");
// if (ct != 0)
// {
// isPost = false;
// errorstr = "主提单号重复";
// }
//}
//if (string.IsNullOrWhiteSpace(headData.BSNO)) {
// headData.BSNO = "topseae" + System.Guid.NewGuid().ToString();
//}
if (opstatus == "add") //if (opstatus == "add")
{ //{
headData.ORDNO = PubSysDAL.GetBillNo("0309"); // headData.ORDNO = PubSysDAL.GetBillNo("0309");
headData.INPUTBY = Convert.ToString(Session["SHOWNAME"]); // headData.INPUTBY = Convert.ToString(Session["SHOWNAME"]);
headData.BSDATE = DateTime.Now; // headData.BSDATE = DateTime.Now;
headData.ORSTATUS ="9"; // headData.ORSTATUS ="9";
headData.ORSTATUSREF = "录入状态"; // headData.ORSTATUSREF = "录入状态";
headData.DbOperationType = DbOperationType.DbotIns; // headData.DbOperationType = DbOperationType.DbotIns;
} //}
else if (opstatus == "edit") //else if (opstatus == "edit")
{ //{
headData.DbOperationType = DbOperationType.DbotUpd; // headData.DbOperationType = DbOperationType.DbotUpd;
headData.ModelUIStatus = "E"; // headData.ModelUIStatus = "E";
} //}
else //else
{ //{
headData.DbOperationType = DbOperationType.DbotDel; // headData.DbOperationType = DbOperationType.DbotDel;
} //}
if (headData.ETD == "") headData.ETD = null; //if (headData.ETD == "") headData.ETD = null;
if (headData.STLDATE == "") headData.STLDATE = null; //if (headData.STLDATE == "") headData.STLDATE = null;
if (headData.ISSUEDATE == "") headData.ISSUEDATE = null; //if (headData.ISSUEDATE == "") headData.ISSUEDATE = null;
if (headData.CONFIRMDATE == "") headData.CONFIRMDATE = null; //if (headData.CONFIRMDATE == "") headData.CONFIRMDATE = null;
if (headData.AUDITDATE == "") headData.AUDITDATE = null; //if (headData.AUDITDATE == "") headData.AUDITDATE = null;
if (headData.PORTLOADID.Trim().Length> 5) { //if (headData.PORTLOADID.Trim().Length> 5) {
isPost = false; // isPost = false;
errorstr = "装货港代码不正确"; // errorstr = "装货港代码不正确";
} //}
if (headData.PORTDISCHARGEID.Trim().Length > 5) //if (headData.PORTDISCHARGEID.Trim().Length > 5)
{ //{
isPost = false; // isPost = false;
errorstr = "卸货港代码不正确"; // errorstr = "卸货港代码不正确";
} //}
if (headData.PLACERECEIPTID.Trim().Length > 5) //if (headData.PLACERECEIPTID.Trim().Length > 5)
{ //{
isPost = false; // isPost = false;
errorstr = "收货地代码不正确"; // errorstr = "收货地代码不正确";
} //}
if (headData.PLACEDELIVERYID.Trim().Length > 5) //if (headData.PLACEDELIVERYID.Trim().Length > 5)
{ //{
isPost = false; // isPost = false;
errorstr = "交货地代码不正确"; // errorstr = "交货地代码不正确";
} //}
if (headData.DESTINATIONID.Trim().Length > 5) //if (headData.DESTINATIONID.Trim().Length > 5)
{ //{
isPost = false; // isPost = false;
errorstr = "目的地代码不正确"; // errorstr = "目的地代码不正确";
} //}
if (headData.ETD != "" && headData.ETD !=null && headData.CUSTOMERNAME != "")// headData.STLDATE == "" && //if (headData.ETD != "" && headData.ETD !=null && headData.CUSTOMERNAME != "")// headData.STLDATE == "" &&
{ //{
//根据客户、开船日计算账期 // //根据客户、开船日计算账期
var _dmb = MsInfoClientDAL.GetSTLDATE(headData.CUSTOMERNAME, "海运出口", headData.ETD, headData.SALE); // var _dmb = MsInfoClientDAL.GetSTLDATE(headData.CUSTOMERNAME, "海运出口", headData.ETD, headData.SALE);
headData.STLNAME = _dmb.STLNAME; // headData.STLNAME = _dmb.STLNAME;
headData.STLDATE = _dmb.STLDATE; // headData.STLDATE = _dmb.STLDATE;
if (_dmb.STLNAME == "") // if (_dmb.STLNAME == "")
{ // {
headData.STLNAME = "现结买单"; // headData.STLNAME = "现结买单";
headData.STLDATE = headData.ETD; // headData.STLDATE = headData.ETD;
} // }
} //}
var ORDNO = headData.ORDNO; //var ORDNO = headData.ORDNO;
headData.VESSEL = MsBaseInfoDAL.DelPortCn(headData.VESSEL); //headData.VESSEL = MsBaseInfoDAL.DelPortCn(headData.VESSEL);
headData.PORTLOAD = MsBaseInfoDAL.DelPortCn(headData.PORTLOAD); //headData.PORTLOAD = MsBaseInfoDAL.DelPortCn(headData.PORTLOAD);
headData.PORTDISCHARGE = MsBaseInfoDAL.DelPortCn(headData.PORTDISCHARGE); //headData.PORTDISCHARGE = MsBaseInfoDAL.DelPortCn(headData.PORTDISCHARGE);
headData.PLACERECEIPT = MsBaseInfoDAL.DelPortCn(headData.PLACERECEIPT); //headData.PLACERECEIPT = MsBaseInfoDAL.DelPortCn(headData.PLACERECEIPT);
headData.PORTDISCHARGE = MsBaseInfoDAL.DelPortCn(headData.PORTDISCHARGE); //headData.PORTDISCHARGE = MsBaseInfoDAL.DelPortCn(headData.PORTDISCHARGE);
headData.DESTINATION = MsBaseInfoDAL.DelPortCn(headData.DESTINATION); //headData.DESTINATION = MsBaseInfoDAL.DelPortCn(headData.DESTINATION);
if (headData.FBP == "") headData.FBP = "0"; //if (headData.FBP == "") headData.FBP = "0";
if (headData.DESTFBP == "") headData.DESTFBP = "0"; //if (headData.DESTFBP == "") headData.DESTFBP = "0";
if (headData.PKGS == "") headData.PKGS = "0"; //if (headData.PKGS == "") headData.PKGS = "0";
if (headData.KGS == "") headData.KGS = "0"; //if (headData.KGS == "") headData.KGS = "0";
if (headData.CBM == "") headData.CBM = "0"; //if (headData.CBM == "") headData.CBM = "0";
if (headData.CONFIRMDATE == "") headData.CONFIRMDATE = null; //if (headData.CONFIRMDATE == "") headData.CONFIRMDATE = null;
if (headData.ISSUEDATE == "") headData.ISSUEDATE = null; //if (headData.ISSUEDATE == "") headData.ISSUEDATE = null;
if (isPost) //if (isPost)
{ //{
var cntr = ""; // var cntr = "";
if (bodyList != null) // if (bodyList != null)
{ // {
foreach (var enumValue in bodyList) // foreach (var enumValue in bodyList)
{ // {
cntr = cntr + enumValue.CTNALL + '*' + enumValue.CTNNUM + "/"; // cntr = cntr + enumValue.CTNALL + '*' + enumValue.CTNNUM + "/";
} // }
} // }
headData.CNTRTOTAL = cntr; // headData.CNTRTOTAL = cntr;
var modb = new ModelObjectDB(); // var modb = new ModelObjectDB();
DBResult result = modb.Save(headData); // DBResult result = modb.Save(headData);
if (result.Success == true) // if (result.Success == true)
{ // {
result = MsSeaeOrderDAL.SaveDetail(headData, bodyList, Convert.ToString(Session["USERID"])); // result = MsSeaeOrderDAL.SaveDetail(headData, bodyList, Convert.ToString(Session["USERID"]));
} // }
var jsonRespose = new JsonResponse // var jsonRespose = new JsonResponse
{ // {
Success = result.Success, // Success = result.Success,
Message = result.Message, // Message = result.Message,
Data = MsSeaeOrderDAL.GetData("ORDNO='" + ORDNO + "'", CookieConfig.GetCookie_UserId(Request)) // Data = MsSeaeOrderDAL.GetData("ORDNO='" + ORDNO + "'", CookieConfig.GetCookie_UserId(Request))
}; // };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; // return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} //}
else { //else {
var jsonRespose = new JsonResponse { Success = false, Message =errorstr+",不允许保存!" }; // var jsonRespose = new JsonResponse { Success = false, Message =errorstr+",不允许保存!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; // return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} //}
} }
public ContentResult DeleteDetail(string data) public ContentResult DeleteDetail(string data)

@ -31,11 +31,232 @@ using DSWeb.Areas.MvcShipping.DAL;
using DSWeb.Common.DB; using DSWeb.Common.DB;
using System.Linq; using System.Linq;
using DSWeb.MvcShipping.DAL.MsCodeGoodInv; using DSWeb.MvcShipping.DAL.MsCodeGoodInv;
using org.omg.CosNaming.NamingContextPackage;
using System.Web.Mvc;
namespace DSWeb.MvcShipping.DAL.MsChFeeDAL namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
{ {
public class MsChFeeDAL public class MsChFeeDAL
{ {
#region 保存 从controller层后移
/// <summary>
///
/// </summary>
/// <param name="bsno"></param>
/// <param name="userid"></param>
/// <param name="companyid"></param>
/// <param name="bodyList"></param>
/// <param name="LAN"></param>
/// <param name="isyj"></param>
/// <returns></returns>
public static DBResult DoSave(string bsno, string userid, string companyid, List<MsChFee> bodyList, string LAN, string isyj = "0")
{
var result = new DBResult();
var custnamestr = "客户名称:";
var xitongbucunzai = "系统中不存在,请检查";
var yifeiyongsuoding = "已费用锁定,不允许添加修改费用!";
var yiyuemojiezhuan = "已月末结转,不允许添加修改费用!";
var yiDRfeiyongsuoding = "应收费用已锁定,不允许添加修改费用!";
var yiCRfeiyongsuoding = "应付费用已锁定,不允许添加修改费用!";
var feename = "费用名称";
var notempty = "核算单位不能为空!";
var blackname = "此客户为黑名单客户,请联系管理员!";
if (LAN == "en-us")
{
custnamestr = "Customer Name";
xitongbucunzai = "Not present in the system, please check";
yifeiyongsuoding = "Fee locked, adding or modifying fees not allowed";
yiyuemojiezhuan = "Carried forward at the end of the month, adding or modifying fees is not allowed";
yiDRfeiyongsuoding = "DR are locked and cannot be added or modified";
yiCRfeiyongsuoding = "CR are locked and cannot be added or modified";
feename = "Fee Name";
notempty = " Sale Corp Can not Empty";
blackname = "This customer is on the blacklist. Please contact the administrator";
}
var FEEMUSTBESALECORP = MsSysParamSetDAL.GetData("PARAMNAME='FEEMUSTBESALECORP'");
int iResult = 0;
//var bodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody);
T_ALL_DA T_ALL_DA = new T_ALL_DA();
decimal feetype = 0;
var custstr = "";
if (bodyList != null)
{
foreach (var enumValue in bodyList)
{
feetype = enumValue.FeeType;
var BLCOUNT2 = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from info_client WHERE ISNULL(ISSTOP,0)=0 AND (SHORTNAME='" + enumValue.CustomerName + "' OR ESHORTNAME='" + enumValue.CustomerName + "')");
if (BLCOUNT2 == "0")
{
if (custstr == "") custstr = enumValue.CustomerName;
else custstr = custstr + "," + enumValue.CustomerName;
}
if (string.IsNullOrEmpty(enumValue.SALECORP) && FEEMUSTBESALECORP.PARAMVALUE == "1")
{
//var jsonRespose2 = new JsonResponse
//{
// Success = false,
// Message = feename + enumValue.FeeName + " " + notempty
//};
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
result.SetErrorInfo(feename + enumValue.FeeName + " " + notempty);
return result;
}
var resultblack = MsInfoClientDAL.GetClientBlackRdCount(enumValue.CustomerName, bsno);
if (resultblack)
{
//var jsonRespose2 = new JsonResponse
//{
// Success = false,
// Message = enumValue.CustomerName + ": " + blackname
//};
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
result.SetErrorInfo(enumValue.CustomerName + ": " + blackname);
return result;
}
}
}
if (custstr != "")
{
//var jsonRespose2 = new JsonResponse
//{
// Success = false,
// Message = custnamestr + custstr + " " + xitongbucunzai,
//};
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
result.SetErrorInfo(custnamestr + custstr + " " + xitongbucunzai);
return result;
}
if (isyj == "1")
{
var YJMUSTBEFEECLOSE = MsSysParamSetDAL.GetData("PARAMNAME='YJMUSTBEFEECLOSE'");
if (YJMUSTBEFEECLOSE.PARAMVALUE == "1")
{
var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from v_op_bill WHERE FEESTATUS=1 AND BSNO='" + bsno + "'");
if (BLCOUNT == "1")
{
//var jsonRespose2 = new JsonResponse
//{
// Success = false,
// Message = yifeiyongsuoding,
//};
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
result.SetErrorInfo(yifeiyongsuoding);
return result;
}
}
else
{
var nowperiod = DSWeb.MvcShipping.DAL.ChMonthCloseDAL.ChMonthCloseDAL.GetData("", companyid);
var ACCDATE = T_ALL_DA.GetStrSQL("ACCDATE", "select ACCDATE from v_op_bill WHERE BSNO='" + bsno + "'");
if (Convert.ToDateTime(nowperiod.PERIOD + "-01") > Convert.ToDateTime(ACCDATE + "-01"))
{
//var jsonRespose2 = new JsonResponse
//{
// Success = false,
// Message = yiyuemojiezhuan,
//};
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
result.SetErrorInfo(yiyuemojiezhuan);
return result;
}
}
}
else
{
var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from v_op_bill WHERE FEESTATUS=1 AND BSNO='" + bsno + "'");
if (BLCOUNT == "1")
{
//var jsonRespose2 = new JsonResponse
//{
// Success = false,
// Message = yifeiyongsuoding,
//};
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
result.SetErrorInfo(yifeiyongsuoding);
return result;
}
}
if (bodyList != null)
{
var type = bodyList[0].FeeType;
var BLCOUNT = "";
if (type == 1)
BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from op_close WHERE DRCLOSE=1 AND BSNO='" + bsno + "'");
else BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from op_close WHERE CRCLOSE=1 AND BSNO='" + bsno + "'");
if (BLCOUNT == "1")
{
if (type == 1)
{
//var jsonRespose2 = new JsonResponse
//{
// Success = false,
// Message = yiDRfeiyongsuoding,
//};
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
result.SetErrorInfo(yiDRfeiyongsuoding);
return result;
}
else
{
//var jsonRespose2 = new JsonResponse
//{
// Success = false,
// Message = yiCRfeiyongsuoding,
//};
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
result.SetErrorInfo(yiCRfeiyongsuoding);
return result;
}
}
iResult = MsChFeeDAL.SaveUpdateFee(bodyList, bsno, userid);
}
if (iResult == 1)
{
result.Success = true;
result.Message = "更新成功!";
MsChFeeDAL.p_op_gain(bsno, userid);//Convert.ToString(Session["USERID"]));
}
else if (iResult == 0)
{
result.Success = true;
result.Message = "更新成功!";
}
else if (iResult == -1)
{
result.Success = false;
result.Message = "有异常,插入失败!";
}
else if (iResult == -2)
{
result.Success = false;
result.Message = "插入异常,事务已回滚成功!";
}
return result;
}
#endregion
@ -763,7 +984,17 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
#region 查询费用数据 #region 查询费用数据
/// <summary>
/// 查询费用数据
/// </summary>
/// <param name="strCondition"></param>
/// <param name="type">1应收2应付</param>
/// <param name="optype">业务类型 op_seae 等等</param>
/// <param name="userid"></param>
/// <param name="username"></param>
/// <param name="companyid"></param>
/// <param name="lan"></param>
/// <returns></returns>
static public List<MsChFee> GetDataList(string strCondition,int type,string optype,string userid,string username,string companyid,string lan="") static public List<MsChFee> GetDataList(string strCondition,int type,string optype,string userid,string username,string companyid,string lan="")
{ {
//2017年5月2日14:31:54 需求编号SR2017041800010 -2 //2017年5月2日14:31:54 需求编号SR2017041800010 -2

@ -24,6 +24,8 @@ using DSWeb.Areas.Import.DAL.ReceiptDoc;
using MimeKit.Text; using MimeKit.Text;
using DSWeb.MvcShipping.DAL.MsInfoClient; using DSWeb.MvcShipping.DAL.MsInfoClient;
using DSWeb.MvcShipping.Models.MsOpSeai; using DSWeb.MvcShipping.Models.MsOpSeai;
using DSWeb.Areas.CommMng.DAL;
using DSWeb.MvcShipping.DAL.MsBaseInfoDAL;
namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
{ {
@ -545,6 +547,149 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
} }
#endregion #endregion
#region 保存
public static DBResult DoSave(string opstatus, string USERID, string INPUTBY, MsSeaeOrder headData, List<MsSeaeOrderCtn> bodyList)
{
var isPost = true;
var errorstr = "";
DBResult result = new DBResult();
if (headData.MBLNO != "" && headData.MBLNO != null)
{
var ct = MsSeaeOrderDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND MBLNO='" + headData.MBLNO + "' and ORSTATUS<>'4'");
if (ct != 0)
{
isPost = false;
errorstr = "主提单号重复";
}
}
if (string.IsNullOrWhiteSpace(headData.BSNO))
{
headData.BSNO = "topseae" + System.Guid.NewGuid().ToString();
}
if (opstatus == "add")
{
headData.ORDNO = PubSysDAL.GetBillNo("0309");
headData.INPUTBY = INPUTBY;
headData.BSDATE = DateTime.Now;
headData.ORSTATUS = "9";
headData.ORSTATUSREF = "录入状态";
headData.DbOperationType = DbOperationType.DbotIns;
}
else if (opstatus == "edit")
{
headData.DbOperationType = DbOperationType.DbotUpd;
headData.ModelUIStatus = "E";
}
else
{
headData.DbOperationType = DbOperationType.DbotDel;
}
if (headData.ETD == "") headData.ETD = null;
if (headData.STLDATE == "") headData.STLDATE = null;
if (headData.ISSUEDATE == "") headData.ISSUEDATE = null;
if (headData.CONFIRMDATE == "") headData.CONFIRMDATE = null;
if (headData.AUDITDATE == "") headData.AUDITDATE = null;
if (headData.PORTLOADID.Trim().Length > 5)
{
isPost = false;
errorstr = "装货港代码不正确";
}
if (headData.PORTDISCHARGEID.Trim().Length > 5)
{
isPost = false;
errorstr = "卸货港代码不正确";
}
if (headData.PLACERECEIPTID.Trim().Length > 5)
{
isPost = false;
errorstr = "收货地代码不正确";
}
if (headData.PLACEDELIVERYID.Trim().Length > 5)
{
isPost = false;
errorstr = "交货地代码不正确";
}
if (headData.DESTINATIONID.Trim().Length > 5)
{
isPost = false;
errorstr = "目的地代码不正确";
}
if (headData.ETD != "" && headData.ETD != null && headData.CUSTOMERNAME != "")// headData.STLDATE == "" &&
{
//根据客户、开船日计算账期
var _dmb = MsInfoClientDAL.GetSTLDATE(headData.CUSTOMERNAME, "海运出口", headData.ETD, headData.SALE);
headData.STLNAME = _dmb.STLNAME;
headData.STLDATE = _dmb.STLDATE;
if (_dmb.STLNAME == "")
{
headData.STLNAME = "现结买单";
headData.STLDATE = headData.ETD;
}
}
var ORDNO = headData.ORDNO;
headData.VESSEL = MsBaseInfoDAL.MsBaseInfoDAL.DelPortCn(headData.VESSEL);
headData.PORTLOAD = MsBaseInfoDAL.MsBaseInfoDAL.DelPortCn(headData.PORTLOAD);
headData.PORTDISCHARGE = MsBaseInfoDAL.MsBaseInfoDAL.DelPortCn(headData.PORTDISCHARGE);
headData.PLACERECEIPT = MsBaseInfoDAL.MsBaseInfoDAL.DelPortCn(headData.PLACERECEIPT);
headData.PORTDISCHARGE = MsBaseInfoDAL.MsBaseInfoDAL.DelPortCn(headData.PORTDISCHARGE);
headData.DESTINATION = MsBaseInfoDAL.MsBaseInfoDAL.DelPortCn(headData.DESTINATION);
if (headData.FBP == "") headData.FBP = "0";
if (headData.DESTFBP == "") headData.DESTFBP = "0";
if (headData.PKGS == "") headData.PKGS = "0";
if (headData.KGS == "") headData.KGS = "0";
if (headData.CBM == "") headData.CBM = "0";
if (headData.CONFIRMDATE == "") headData.CONFIRMDATE = null;
if (headData.ISSUEDATE == "") headData.ISSUEDATE = null;
if (isPost)
{
var cntr = "";
if (bodyList != null)
{
foreach (var enumValue in bodyList)
{
cntr = cntr + enumValue.CTNALL + '*' + enumValue.CTNNUM + "/";
}
}
headData.CNTRTOTAL = cntr;
var modb = new ModelObjectDB();
result = modb.Save(headData);
if (result.Success == true)
{
result = MsSeaeOrderDAL.SaveDetail(headData, bodyList, USERID);
}
if (result.Success == true) {
result.Success = true;
result.Message = "保存成功!";
result.Data = MsSeaeOrderDAL.GetData("ORDNO='" + ORDNO + "'", USERID);
}
return result;
}
else
{
result.SetErrorInfo(errorstr + ",不允许保存!");
return result;
}
}
#endregion
#region 明细表 #region 明细表
static public List<MsSeaeOrderCtn> GetBodyList(string strCondition) static public List<MsSeaeOrderCtn> GetBodyList(string strCondition)

@ -8516,7 +8516,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
}, },
CreateNewCustName: function () { CreateNewCustName: function () {
var form = _thisfee.NewCustNameShow.getForm(); var form = _thisfee.NewCustNameShow.getForm();
var CustomerName = form.findField('CustomerName').getValue(); var CustomerName = form.findField('CustomerName').getValue();
var type = form.findField('type').getValue(); var type = form.findField('type').getValue();

@ -711,7 +711,6 @@ Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, {
this.StoreStatus.add({ "ID": "", "STATUS": "全部" }); this.StoreStatus.add({ "ID": "", "STATUS": "全部" });
this.StoreStatus.add({ "ID": "-1", "STATUS": "不含退舱" }); this.StoreStatus.add({ "ID": "-1", "STATUS": "不含退舱" });
this.comboxStatus = Ext.create('DsExt.ux.RefTableCombox', { this.comboxStatus = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreStatus, store: this.StoreStatus,
fieldLabel: '订舱状态', fieldLabel: '订舱状态',

@ -205,6 +205,9 @@ namespace JobCreateFee
} }
catch (Exception e) catch (Exception e)
{ {
var hp = new YTFEEHelper();
hp.SendAlarmMail($"execute错误", $"{JsonConvert.SerializeObject(e)}");
log.Debug($"解析错误:{JsonConvert.SerializeObject(e) }"); log.Debug($"解析错误:{JsonConvert.SerializeObject(e) }");
} }
finally { finally {

Loading…
Cancel
Save