DS7Zhanhao
hanxuntao 2 years ago
parent 583e13394f
commit 4e6f6e7496

@ -9,7 +9,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<NameOfLastUsedPublishProfile>H:\DS7_dev\BookingWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>

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

@ -42058,6 +42058,71 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
}
#endregion
public static string IsCreateDSVGM(MsOpSeae bill, string type, string filetype, string filerole)
{
var error = "";
if (bill.MBLNO == null || bill.MBLNO == "")
{ error = error + "<br />主提单号不能为空"; }
if (GetCustEDICode(bill.CARRIER, "DJY") == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "船公司大简云代码不能为空"; }
if (bill.ETD == null || bill.ETD == "")
{
error = error + "<br />提单号:" + bill.MBLNO + "开船日期不能为空";
return error;
}
if (bill.KGS == "0")
{ error = error + "<br />提单号:" + bill.MBLNO + "总重量不能为空"; }
if (GetCustEDICode(bill.CARRIER, "DJY") == "HLC" || GetCustEDICode(bill.CARRIER, "DJY") == "WHL") {
if (bill.ORDERNO == null || bill.ORDERNO == "")
{ error = error + "<br />订舱编号不能为空"; }
}
var ctnlist = MsOpSeaeDAL.MsOpSeaeDAL.GetBodyList("BSNO='" + bill.BSNO + "'");
if (ctnlist.Count == 0) { error = error + "<br />提单号:" + bill.MBLNO + "集装箱信息不能为空"; };
foreach (var ctn in ctnlist)
{
if (ctn.SEALNO == null || ctn.SEALNO == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "封号不能为空"; }
if (ctn.CNTRNO == null || ctn.CNTRNO == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "箱号不能为空"; }
else
{
if (GetCtnEDICode(ctn.CTNALL, "YTEDI") == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "箱号:" + ctn.CNTRNO + "箱型EDI代码不能为空"; }
if (ctn.WEIGHTYPE == null || ctn.WEIGHTYPE == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "箱号:" + ctn.CNTRNO + "称重方式不能为空"; }
if (ctn.WEIGHKGS == null)
{ error = error + "<br />提单号:" + bill.MBLNO + "箱号:" + ctn.CNTRNO + "称重重量不能为空"; }
if (ctn.WEIGHATTN == null || ctn.WEIGHATTN == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "箱号:" + ctn.CNTRNO + "Shipper VGM 联系人不能为空"; }
if (ctn.WEIGHTEL == null || ctn.WEIGHTEL == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "箱号:" + ctn.CNTRNO + "VGM联系人的联系方式不能为空"; }
if (ctn.WEIGHSIGN == null || ctn.WEIGHSIGN == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "箱号:" + ctn.CNTRNO + "VGM负责人签名不能为空"; }
}
}
return error;
}
#region 亿通VGM
public static string IsCreateYTVGM(List<MsOpSeae> headData, string type, string filetype, string filerole)
{

Loading…
Cancel
Save