From a6abc298f3b20f63cd45f0da1dbf388c2ac698c6 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Thu, 6 Jul 2023 17:37:28 +0800 Subject: [PATCH] 1 --- .../Chfee_invoice_HangXin/ChInvoiceBLEdit.js | 45 ++-- .../Account/Viewsjs/Chfee_lock/Chfee_lock.js | 5 + DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs | 2 + .../Controllers/MsOpSeaeController.cs | 74 ++++-- .../MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs | 236 ++++++++++++++++-- .../Models/MsOpSeae/MsOpSeaeDetail.cs | 36 +++ 6 files changed, 342 insertions(+), 56 deletions(-) diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceBLEdit.js index bbd8fbcf..24b99233 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceBLEdit.js @@ -633,22 +633,16 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, { } }); + this.storeInvCategory = Ext.create('DsExt.ux.RefTableStore', { model: 'DsExtEnumModel', - proxy: { - url: '/CommMng/PubSys/GetEnumValueList' - } - }); - this.storeInvCategory.load({ - params: { - enumTypeId: 97008 - } + proxy: { url: '/CommMng/PubSys/GetEnumValueList' } }); + this.storeInvCategory.load({ params: { enumTypeId: 97008 } }); this.comboxInvCategory = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '类型', labelWidth: labelwidth_sale, - flex: 1, store: this.storeInvCategory, forceSelection: true, name: 'INVOICECATEGORY', @@ -656,6 +650,29 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, { displayField: 'EnumValueName' }); + //this.storeInvCategory = Ext.create('DsExt.ux.RefTableStore', { + // model: 'DsExtEnumModel', + // proxy: { + // url: '/CommMng/PubSys/GetEnumValueList' + // } + //}); + //this.storeInvCategory.load({ + // params: { + // enumTypeId: 97008 + // } + //}); + + //this.comboxInvCategory = Ext.create('DsExt.ux.RefTableCombox', { + // fieldLabel: '类型', + // labelWidth: labelwidth_sale, + // flex: 1, + // store: this.storeInvCategory, + // forceSelection: true, + // name: 'INVOICECATEGORY', + // valueField: 'EnumValueId', + // displayField: 'EnumValueName' + //}); + this.StoreInvNo = Ext.create('DsExt.ux.RefTableStore', { model: 'MsChInvoiceNo', proxy: { @@ -757,11 +774,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, { url: '/CommMng/PubSys/GetEnumValueList' } }); - this.storeInvCategory.load({ - params: { - enumTypeId: 80007 - } - }); + //this.storeInvCategory.load({ + // params: { + // enumTypeId: 80007 + // } + //}); //#endregion diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js b/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js index d4686110..03313447 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js @@ -151,6 +151,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { remoteSort: true, proxy: { type: 'ajax', + timeout: 120000, url: '/Account/Chfee_lock/BsListData', reader: { id: '', @@ -2575,6 +2576,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { Ext.Ajax.request({ waitMsg: '正在锁定...', url: '/Account/Chfee_lock/SelLock', + timeout: 120000, params: { data: jsonbodyAddDatas, type: type @@ -2670,6 +2672,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { Ext.Ajax.request({ waitMsg: '正在锁定...', url: '/Account/Chfee_lock/SelFeeLock', + timeout: 120000, params: { data: jsonbodyAddDatas, isAccDate: _this.IsAccDate, @@ -2726,6 +2729,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { Ext.Ajax.request({ waitMsg: '正在锁定...', url: '/Account/Chfee_lock/AllLock', + timeout: 120000, params: { billsql: _this.sqlcontext, type: type @@ -2777,6 +2781,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { Ext.Ajax.request({ waitMsg: '正在锁定...', url: '/Account/Chfee_lock/onFeeLockAll', + timeout: 120000, params: { billsql: _this.sqlcontext, isAccDate: _this.IsAccDate, diff --git a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs index 1dc3c9cf..58c9eff9 100644 --- a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs @@ -3315,6 +3315,8 @@ namespace DSWeb.Areas.CommMng.DAL data.CTN = Convert.ToString(reader["CTN"]); if (reader["DLIKGS"] != DBNull.Value) data.DLIKGS = Convert.ToDecimal(reader["DLIKGS"]); + if (reader["CTNWEIGHT"] != DBNull.Value) + data.CTNWEIGHT = Convert.ToDecimal(reader["CTNWEIGHT"]); #endregion headList.Add(data); } diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs index 44c6bbd1..c1408679 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs @@ -2060,9 +2060,22 @@ namespace DSWeb.MvcShipping.Controllers public ContentResult DeleteList(string data) { + string LAN = Convert.ToString(Session["LANGUAGES"]); var headData = JsonConvert.Deserialize>(data); var errstr = ""; var itemClass = ""; + var strpc = "此票业务存在派车信息,请先删除派车信息!"; + var strfp = "此票拼箱主票存在分票业务,请先删除分票信息!"; + var strsccg = "删除成功!"; + var strfy = "存在费用,请先删除费用才能删除此票业务!"; + if (LAN == "en-us") + { + strpc = "This bill has truck information. Please delete the delivery truck first!"; + strfp = "This LCL has ticket splitting business. Please delete the ticket splitting information first!"; + strsccg = "Successfully deleted!"; + strfy = "There are fees present. Please delete the fees before deleting this transaction!"; + } + var BSNOLIST = new List(); if (headData != null) { @@ -2108,7 +2121,7 @@ namespace DSWeb.MvcShipping.Controllers } else { - var jsonRespose3 = new JsonResponse { Success = false, Message = "此票业务存在派车信息,请先删除派车信息!" }; + var jsonRespose3 = new JsonResponse { Success = false, Message = strpc }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) }; } @@ -2121,7 +2134,7 @@ namespace DSWeb.MvcShipping.Controllers } else { - var jsonRespose2 = new JsonResponse { Success = false, Message = "此票拼箱主票存在分票业务,请先删除分票信息!" }; + var jsonRespose2 = new JsonResponse { Success = false, Message = strfp }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; } @@ -2154,8 +2167,8 @@ namespace DSWeb.MvcShipping.Controllers if (BSNOLIST != null && BSNOLIST.Count != 0) MsOpSeaeEdiPortDAL.SendToDJYDel(BSNOLIST, Convert.ToString(Session["COMPANYID"])); - if (errstr == "") errstr = "删除成功!"; - else errstr = errstr + "存在费用,请先删除费用才能删除此票业务!"; + if (errstr == "") errstr = strsccg; + else errstr = errstr + strfy; if (itemClass == "网上订舱不能删除") { errstr = "网上订舱不能删除"; } var jsonRespose = new JsonResponse { Success = true, Message = errstr }; @@ -2165,13 +2178,26 @@ namespace DSWeb.MvcShipping.Controllers public ContentResult DeleteDetail(string data) { + string LAN = Convert.ToString(Session["LANGUAGES"]); + + var strsccg = "删除成功!"; + if (LAN == "en-us") { + strsccg = "Successfully deleted!"; + } var head = JsonConvert.Deserialize(data); DBResult result = MsOpSeaeDAL.DeleteDetail2(head, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["COMPANYID"])); - var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; + var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message.Replace("操作成功", strsccg) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } public ContentResult DeleteDetailList(string data) { + string LAN = Convert.ToString(Session["LANGUAGES"]); + + var strsccg = "删除成功!"; + if (LAN == "en-us") + { + strsccg = "Successfully deleted!"; + } var head = JsonConvert.Deserialize>(data); #region 2018年2月7日17:32:48 鼎世 李进举 //导入主单信息删除原有集装箱分箱信息 @@ -2194,12 +2220,13 @@ namespace DSWeb.MvcShipping.Controllers // DBResult result = MsOpSeaeDAL.DeleteDetail2(enumValue, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["COMPANYID"])); // } //} - var jsonRespose = new JsonResponse { Success = true, Message = "删除成功!" }; + var jsonRespose = new JsonResponse { Success = true, Message = strsccg }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } public ContentResult DeleteOpCtnDetail(string data) { + var head = JsonConvert.Deserialize(data); var modb = new ModelObjectDB(); DBResult result = modb.Delete(head); @@ -2208,6 +2235,13 @@ namespace DSWeb.MvcShipping.Controllers } public ContentResult DeleteOpManifestDetail(string data) { + string LAN = Convert.ToString(Session["LANGUAGES"]); + + var strsccg = "删除成功!"; + if (LAN == "en-us") + { + strsccg = "Successfully deleted!"; + } var head = JsonConvert.Deserialize>(data); if (head != null) @@ -2220,7 +2254,7 @@ namespace DSWeb.MvcShipping.Controllers } } - var jsonRespose = new JsonResponse { Success = true, Message = "删除成功!" }; + var jsonRespose = new JsonResponse { Success = true, Message = strsccg }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } @@ -9525,15 +9559,15 @@ namespace DSWeb.MvcShipping.Controllers return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } + var codectnlist=BasicDataRefDAL.GetCodeCtnList(); - - //List sheets = ExcelSheetName(filename); - //if (sheets.Count == 0) - //{ - // jsonRespose.Success = false; - // jsonRespose.Message = "上传的Excel不包含数据02"; - // return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; - //} + //List sheets = ExcelSheetName(filename); + //if (sheets.Count == 0) + //{ + // jsonRespose.Success = false; + // jsonRespose.Message = "上传的Excel不包含数据02"; + // return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + //} Workbook workbook = excel.Workbooks.Open(excelFilePath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); Worksheet mySheet = workbook.Sheets[1] as Worksheet; @@ -9671,6 +9705,14 @@ namespace DSWeb.MvcShipping.Controllers var tmpkgs = GetExcelValue(mySheet, "V" + excelline.ToString()); if (!string.IsNullOrEmpty(tmpkgs)) data.WEIGHKGS = Convert.ToDecimal(tmpkgs); + if (data.WEIGHKGS == 0) { + var ctn = codectnlist.Find(x => x.CTN == data.CTNALL); + if (ctn != null) { + data.WEIGHKGS = ctn.CTNWEIGHT; + } + + } + bodyList.Add(data); @@ -14677,7 +14719,7 @@ namespace DSWeb.MvcShipping.Controllers { //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); +// MakeFee_VGM(headlist, type); } return BasicDataRefDAL.GetContentResult(_r); } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index c1f52cae..056a8572 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -7643,8 +7643,189 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL } } + public static DBResult SendVGM(string BSNO, string userid, string companyid, string CarrierEDICode) + { + + RespCommonData resp = new RespCommonData(); + + var result = new DBResult(true, ""); + + var order = MsOpSeaeDAL.GetData($" B.BSNO='{BSNO}'", userid); + var ctns = MsOpSeaeDAL.GetBodyList($" BSNO='{BSNO}'"); + + var paraVgmSendService = MsSysParamSetDAL.GetDataByName("bookingSendVgmServiceUrl"); +// var paraMyshippingUrlService = MsSysParamSetDAL.GetDataByName("DJYURL"); + + #region 检测能否发出 + + if (string.IsNullOrEmpty(paraVgmSendService.PARAMVALUE) + ) + { + + result.SetErrorInfo("请正确配置vgm发送服务及大简云url地址"); + } + + if (string.IsNullOrEmpty(order.MBLNO)) + { + result.SetErrorInfo("提单号不能为空"); + } + + if (string.IsNullOrEmpty(order.CARRIER) || string.IsNullOrEmpty(CarrierEDICode)) + { + result.SetErrorInfo("船公司不能为空"); + } + + + //var accType = AccountConfigType.CmaWeb.ToString(); + var accCfg = MsSysThirdPartyAccount.MsSysThirdPartyAccountDAL.GetData($" CUSTOMERNAME='{order.CARRIER}' and THIRDPARTY='船公司账号' and USERID='" + userid + "' "); + if (accCfg == null || string.IsNullOrWhiteSpace(accCfg.ACCOUNT) || string.IsNullOrWhiteSpace(accCfg.ACCOUNTPSW)) + { + accCfg = MsSysThirdPartyAccount.MsSysThirdPartyAccountDAL.GetData($" CUSTOMERNAME='{order.CARRIER}' and THIRDPARTY='船公司账号'"); + if (accCfg == null || string.IsNullOrWhiteSpace(accCfg.ACCOUNT) || string.IsNullOrWhiteSpace(accCfg.ACCOUNTPSW)) + { + result.SetErrorInfo($"未在第三方账号信息中配置船公司【{order.CARRIER}】的网站账号、密码(第三方账号每人维护各自信息,客户名称需选择船公司,第三方软件为【船公司账号】)"); + } + } + + //var yardset = MsCodeYardDataSetDAL.GetDataList($" YARD='{order.YARD}'", companyid); + //if (yardset == null || yardset.Count == 0) + //{ + // result.SetErrorInfo("场站代号未找到"); + //} + + var userbaseinfo = BasicDataRefDAL.GetUserLinkRef("u.GID='" + userid + "'"); + if (userbaseinfo == null || string.IsNullOrWhiteSpace(userbaseinfo.Tel) || string.IsNullOrWhiteSpace(userbaseinfo.Email)) + { + result.SetErrorInfo("请维护用户基础信息中的电话和邮箱"); + } + + CtnCanSend(CarrierEDICode, ctns, ref result); + + if (!result.Success) return result; + + #endregion + + var cdc = new CommonDataContext(); + var vwuser = cdc.VW_user.FirstOrDefault(x => x.USERID == userid); + + //var company = MsCompanysDAL.MsCompanysDAL.GetNoPicData("GID='" + companyid + "'"); + + int idx = 1; + + var Etdstr = GetDateStr(order.ETD); + var VgmEndTimeStr = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"); + + string GetDateStr(string datestr) + { + return !string.IsNullOrWhiteSpace(datestr) ? Convert.ToDateTime(datestr).ToString("yyyy-MM-dd") : string.Empty; + } + var strSendObj = ""; + if (CarrierEDICode.ToLower() == "cma") + { - public static DBResult SendVGM(string BSNO, string userid, string companyid,string CarrierEDICode) + List> data_list = new List>(); + foreach (var ctn in ctns) + { + var newctnlist = new List(); + newctnlist.Add(order.MBLNO); + newctnlist.Add(ctn.CNTRNO); + if (order.ISCONTAINERSOC) + newctnlist.Add("Y"); + else + newctnlist.Add("N"); + newctnlist.Add(ctn.KGS.ToString()); + newctnlist.Add(ctn.WEIGHKGS.ToString()); + newctnlist.Add("KGM"); + newctnlist.Add(ctn.WEIGHSIGN); + newctnlist.Add(ctn.WEIGHTYPE == "累加" ? "SM2" : "SM1"); + data_list.Add(newctnlist); + } + + var SENDGID = Guid.NewGuid().ToString(); + var customername = MsSysParamSetDAL.GetData("PARAMNAME='DSVGMID'").PARAMVALUE; + var password = MsSysParamSetDAL.GetData("PARAMNAME='DSVGMKEY'").PARAMVALUE; + //调用接口 + var sendObj = new + { + gid = SENDGID, + User = customername, + Secret = password, + web_code = CarrierEDICode.ToLower(), + web_user = accCfg.ACCOUNT, + web_pwd = accCfg.ACCOUNTPSW, + data_list = data_list + }; + + strSendObj = JsonConvert.Serialize(sendObj); + } + else { + + List data_list = new List(); + foreach (var ctn in ctns) + { + var newctnlist = new VgmData_list(); + newctnlist.booking_no = order.MBLNO; + newctnlist.container_no = ctn.CNTRNO; + newctnlist.weight_type = (ctn.WEIGHTYPE == "累加" ? "SM2" : "SM1"); + newctnlist.unit = ctn.KINDPKGS; + newctnlist.weight = ctn.KGS.ToString(); + newctnlist.signatory = ctn.WEIGHSIGN; + newctnlist.reference_id = ctn.WEIGHSIGN; + newctnlist.e_mail_notification = userbaseinfo.Email; + data_list.Add(newctnlist); + } + + var SENDGID = Guid.NewGuid().ToString(); + var customername = MsSysParamSetDAL.GetData("PARAMNAME='DSVGMID'").PARAMVALUE; + var password = MsSysParamSetDAL.GetData("PARAMNAME='DSVGMKEY'").PARAMVALUE; + //调用接口 + var sendObj = new + { + gid = SENDGID, + User = customername, + Secret = password, + web_code = CarrierEDICode.ToLower(), + web_user = accCfg.ACCOUNT, + web_pwd = accCfg.ACCOUNTPSW, + data_list = data_list + }; + + strSendObj = JsonConvert.Serialize(sendObj); + + } + strSendObj = strSendObj.Replace("\r\n", ""); + //log.Debug($"准备发送vgm:{strSendObj}"); + try + { + BasicDataRefDAL.SaveLog(strSendObj, "", "VGM直发", "发送"); + var rtn = WebRequestHelper.DoPost(paraVgmSendService.PARAMVALUE, strSendObj, timeout: 5000); + BasicDataRefDAL.SaveLog(rtn, "", "VGM直发", "返回"); + //log.Debug($"发送vgm返回:{rtn}"); + var jobjRtn = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(rtn, new { status =0, message = string.Empty, data = string.Empty }); + if (!(jobjRtn.status==1)) + { + return result.SetErrorInfo($"直发VGM错误:{jobjRtn.message}"); + } + else + { + T_ALL_DA T_ALL_DA = new T_ALL_DA(); + var blUpSQL = " insert into sys_vgm_log(GID,MBLNO,STATUS,LOGTIME,LOGCONTENT,CREATEUSER) values(NEWID(),'" + order.MBLNO + "','发送','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + order.BSNO + "','" + userid + "')"; + bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); + result.OK($"发送完成");//:[{ jobjRtn.message}] + } + + + } + catch (Exception ex) + { + result.SetErrorInfo(ex.Message); + } + + return result; + } + + + public static DBResult SendVGM2(string BSNO, string userid, string companyid,string CarrierEDICode) { RespCommonData resp = new RespCommonData(); @@ -7850,53 +8031,56 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL } */ - if (CarrierEDICode.ToUpper() == "ESL") + if (CarrierEDICode.ToUpper() == "CMA") { //船公司ESL只需要指定 提单号 箱号 毛重kgs , //故做如下限制 foreach (var ctn in ctns) { - if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型"); - if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零"); + //if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型"); + //if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零"); if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空"); - if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零"); - //if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空"); - //if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零"); - //if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零"); - } - } - else - if (CarrierEDICode.ToUpper() == "ONE") - { - //船公司ONE只需要指定 提单号 箱号 毛重kgs , - - //故做如下限制 - foreach (var ctn in ctns) - { - if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型"); - if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零"); - if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空"); if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零"); + //if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零"); + if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零"); //if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空"); //if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零"); //if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零"); } } + //else + //if (CarrierEDICode.ToUpper() == "ONE") + //{ + // //船公司ONE只需要指定 提单号 箱号 毛重kgs , + + // //故做如下限制 + // foreach (var ctn in ctns) + // { + // //if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型"); + // //if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零"); + // if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空"); + // if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零"); + + // //if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空"); + // //if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零"); + // //if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零"); + // } + //} else { //对所有未指定的其他船公司而言: foreach (var ctn in ctns) { - if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型"); - if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零"); + //if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型"); + //if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零"); if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空"); - if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空"); + //if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空"); if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零"); - if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零"); - if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零"); + //if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零"); + //if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零"); } } } diff --git a/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeaeDetail.cs b/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeaeDetail.cs index e829c9e7..5dc34e4d 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeaeDetail.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeaeDetail.cs @@ -1015,5 +1015,41 @@ namespace DSWeb.MvcShipping.Models.MsOpSeae public System.Collections.Generic.List message { get; set; } public string status { get; set; } } + + public class VgmData_list + { + /// + /// + /// + public string booking_no { get; set; } + /// + /// + /// + public string container_no { get; set; } + /// + /// + /// + public string weight_type { get; set; } + /// + /// + /// + public string unit { get; set; } + /// + /// + /// + public string weight { get; set; } + /// + /// + /// + public string signatory { get; set; } + /// + /// + /// + public string reference_id { get; set; } + /// + /// + /// + public string e_mail_notification { get; set; } + } // }