|
|
@ -13705,7 +13705,11 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
var opseae = MsOpSeaeDAL.GetData("BSNO='"+bsno+"'");
|
|
|
|
var opseae = MsOpSeaeDAL.GetData("BSNO='"+bsno+"'");
|
|
|
|
MsOpSeaVgm opSeaVgm = new MsOpSeaVgm();
|
|
|
|
MsOpSeaVgm opSeaVgm = new MsOpSeaVgm();
|
|
|
|
opSeaVgm.MBLNO = mblno;
|
|
|
|
opSeaVgm.MBLNO = mblno;
|
|
|
|
|
|
|
|
if (opseae.MBLNO == null || opseae.MBLNO == "")
|
|
|
|
|
|
|
|
{ error = error + "<br />主提单号不能为空"; }
|
|
|
|
opSeaVgm.CARRIER =MsOpSeaeEdiDAL.GetCustEDICode(opseae.CARRIER,"DJY");
|
|
|
|
opSeaVgm.CARRIER =MsOpSeaeEdiDAL.GetCustEDICode(opseae.CARRIER,"DJY");
|
|
|
|
|
|
|
|
if (opSeaVgm.CARRIER == "")
|
|
|
|
|
|
|
|
{ error = error + "<br />船公司大简云代码不能为空"; }
|
|
|
|
opSeaVgm.ZongZhongLiang = opseae.KGS.ToString();
|
|
|
|
opSeaVgm.ZongZhongLiang = opseae.KGS.ToString();
|
|
|
|
if (opseae.KGS.ToString() == "0")
|
|
|
|
if (opseae.KGS.ToString() == "0")
|
|
|
|
{ error = error + "<br />总总量不能为空"; }
|
|
|
|
{ error = error + "<br />总总量不能为空"; }
|
|
|
@ -13716,19 +13720,28 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
opSeaVgm.ChuanMing = opseae.VESSEL;
|
|
|
|
opSeaVgm.ChuanMing = opseae.VESSEL;
|
|
|
|
opSeaVgm.HangCi = opseae.VOYNO;
|
|
|
|
opSeaVgm.HangCi = opseae.VOYNO;
|
|
|
|
opSeaVgm.ORDERNO = opseae.ORDERNO;
|
|
|
|
opSeaVgm.ORDERNO = opseae.ORDERNO;
|
|
|
|
|
|
|
|
if (opSeaVgm.CARRIER == "HLC" || opSeaVgm.CARRIER == "WHL")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (opSeaVgm.ORDERNO == null || opSeaVgm.ORDERNO == "")
|
|
|
|
|
|
|
|
{ error = error + "<br />订舱编号不能为空"; }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
opSeaVgm.VGMCLOSETIME = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
|
|
|
|
opSeaVgm.VGMCLOSETIME = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
|
|
|
|
var MsOpSeaVgmCtnList = new List<MsOpSeaVgmCtn>();
|
|
|
|
var MsOpSeaVgmCtnList = new List<MsOpSeaVgmCtn>();
|
|
|
|
List<MsOpSeaeDetail> ctnlist = MsOpSeaeDAL.GetBodyList("bsno='"+bsno+"'");
|
|
|
|
List<MsOpSeaeDetail> ctnlist = MsOpSeaeDAL.GetBodyList("bsno='"+bsno+"'");
|
|
|
|
|
|
|
|
if (ctnlist==null||ctnlist.Count == 0) { error = error + "<br />集装箱信息不能为空"; };
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var ctnitems in ctnlist) {
|
|
|
|
foreach (var ctnitems in ctnlist) {
|
|
|
|
MsOpSeaVgmCtn OpSeaVgmCtn = new MsOpSeaVgmCtn();
|
|
|
|
MsOpSeaVgmCtn OpSeaVgmCtn = new MsOpSeaVgmCtn();
|
|
|
|
OpSeaVgmCtn.CNTRNO = ctnitems.CNTRNO;
|
|
|
|
OpSeaVgmCtn.CNTRNO = ctnitems.CNTRNO;
|
|
|
|
if (ctnitems.CNTRNO == "")
|
|
|
|
if (ctnitems.CNTRNO == "")
|
|
|
|
{ error = error + "<br />箱号不能为空"; }
|
|
|
|
{ error = error + "<br />箱号不能为空"; }
|
|
|
|
OpSeaVgmCtn.CTNALL = ctnitems.CTNALL;
|
|
|
|
OpSeaVgmCtn.CTNALL = ctnitems.CTNALL;
|
|
|
|
if (ctnitems.CNTRNO == "")
|
|
|
|
if (ctnitems.CTNALL == "")
|
|
|
|
{ error = error + "<br />箱型不能为空"; }
|
|
|
|
{ error = error + "<br />箱型不能为空"; }
|
|
|
|
OpSeaVgmCtn.SEALNO = ctnitems.SEALNO;
|
|
|
|
OpSeaVgmCtn.SEALNO = ctnitems.SEALNO;
|
|
|
|
if (ctnitems.CNTRNO == "")
|
|
|
|
if (ctnitems.SEALNO == "")
|
|
|
|
{ error = error + "<br />封号不能为空"; }
|
|
|
|
{ error = error + "<br />封号不能为空"; }
|
|
|
|
OpSeaVgmCtn.ChengZhongZhongLiang = ctnitems.WEIGHKGS.ToString();
|
|
|
|
OpSeaVgmCtn.ChengZhongZhongLiang = ctnitems.WEIGHKGS.ToString();
|
|
|
|
if (ctnitems.WEIGHKGS.ToString() == "0"|| ctnitems.WEIGHKGS.ToString() == "")
|
|
|
|
if (ctnitems.WEIGHKGS.ToString() == "0"|| ctnitems.WEIGHKGS.ToString() == "")
|
|
|
@ -13767,12 +13780,10 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string rtn = WebRequestHelper.DoPost(DsVgmUrl, dict, 30 * 1000);
|
|
|
|
string rtn = WebRequestHelper.DoPost(DsVgmUrl, dict, 30 * 1000);
|
|
|
|
if (rtn == "操作太频繁" || rtn == "参数有误" || rtn == "参数有误!" || rtn == "身份验证错误!" || rtn == "箱号格式错误!" || rtn == "箱号重复" || rtn == "封号重复")
|
|
|
|
|
|
|
|
{
|
|
|
|
var objRtn = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(rtn, new { Success = "", Message = "" });
|
|
|
|
var json = JsonConvert.Serialize(new { Success = false, Message = rtn });
|
|
|
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
if (objRtn.Success=="true") {
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
var headlist = MsOpSeaeDAL.GetDataList(" BSNO='" + bsno + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["CODENAME"]), Convert.ToString(Session["COMPANYID"]));
|
|
|
|
var headlist = MsOpSeaeDAL.GetDataList(" BSNO='" + bsno + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["CODENAME"]), Convert.ToString(Session["COMPANYID"]));
|
|
|
|
//9原始 2增加 3删除 4更新
|
|
|
|
//9原始 2增加 3删除 4更新
|
|
|
|
MakeFee_VGM(headlist, type);
|
|
|
|
MakeFee_VGM(headlist, type);
|
|
|
@ -13829,11 +13840,7 @@ namespace DSWeb.MvcShipping.Controllers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string rtn = WebRequestHelper.DoPost(DsVgmUrl, dict, 30 * 1000);
|
|
|
|
string rtn = WebRequestHelper.DoPost(DsVgmUrl, dict, 30 * 1000);
|
|
|
|
if (rtn == "操作太频繁" || rtn == "参数有误" || rtn == "参数有误!" || rtn == "身份验证错误!" || rtn == "箱号格式错误!" || rtn == "箱号重复" || rtn == "封号重复")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = false, Message = rtn });
|
|
|
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return new ContentResult() { Content = rtn };
|
|
|
|
return new ContentResult() { Content = rtn };
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|