diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpAirnController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpAirnController.cs index 6266014d..d5bb979b 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpAirnController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpAirnController.cs @@ -210,7 +210,7 @@ namespace DSWeb.MvcShipping.Controllers { var headData = JsonConvert.Deserialize(data); - + DBResult result=new DBResult(); var CargobodyList = JsonConvert.Deserialize>(CargoBody); var CargodelbodyList = JsonConvert.Deserialize>(CargoDelBody); @@ -220,6 +220,12 @@ namespace DSWeb.MvcShipping.Controllers //headData.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); } + var oldheadData = MsOpAirnDAL.GetData(" B.BSNO='" + headData.BSNO + "' "); + + //if (oldheadData.FEESTATUS == true) { + // result.SetErrorInfo("费用锁定的业务不允许修改"); + //} + var isPost = true; var errorstr = ""; //var isuse = false; @@ -263,7 +269,7 @@ namespace DSWeb.MvcShipping.Controllers var feecount = BasicDataRefDAL.GetExist("ch_fee", " BSNO='" + headData.BSNO + "' "); if (feecount > 0) { - var oldheadData = MsOpAirnDAL.GetData(" B.BSNO='" + headData.BSNO + "' "); + headData.BLFRT = oldheadData.BLFRT; headData.PFREIGHT = oldheadData.PFREIGHT; @@ -348,7 +354,7 @@ namespace DSWeb.MvcShipping.Controllers BasicDataRefDAL.SaveLog("opstatus="+ opstatus+":"+JsonConvert.Serialize(headData)+"//"+ JsonConvert.Serialize(CargobodyList), Convert.ToString(Session["SHOWNAME"]),"内贸空运","主单保存"); var modb = new ModelObjectRepository(); - DBResult result = modb.Save(headData, + result = modb.Save(headData, ModelObjectConvert.ToModelObjectList(CargobodyList), ModelObjectConvert.ToModelObjectList(CargodelbodyList) ); @@ -506,7 +512,6 @@ namespace DSWeb.MvcShipping.Controllers if (iscreatecustno == true) MsSysBillNoSetDAL.DeleteBsNo(headData.CUSTNO); - var result = new DBResult(); result.Success = false; result.Message = errorstr + "重复,不允许保存!"; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs index 5d168e94..b4651657 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs @@ -14552,6 +14552,22 @@ namespace DSWeb.MvcShipping.Controllers } #endregion + + #region ESL相关业务调用 + public ContentResult ESLWork(string WORKTYPE, string BSNO) + { + + var result = new DBResult(); + + result = MsOpSeaeDAL.ESLWork(WORKTYPE,BSNO, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"])); + + + var _result = BasicDataRefDAL.GetContentResult(result); + return _result; + } + + + #endregion public ContentResult PiLiangZhengPiaoTiJiao(string bsno, int statusvalue) { string message = ""; diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index b4aa4401..a62620cb 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -42,6 +42,7 @@ using DSWeb.Areas.MvcShipping.Comm; using DSWeb.Areas.MvcShipping.DB; using Org.BouncyCastle.Bcpg; using DSWeb.MvcShipping.DAL.MsCodeCtnEdi; +using DSWeb.MvcShipping.DAL.MsOpExpressDAL; namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL { @@ -7968,6 +7969,53 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL return result; } + + static public DBResult ESLWork(string WORKTYPE, string BSNO, string userid, string username, string copmpanyid) + { + var result = new DBResult(); + + //var accCfg = MsSysThirdPartyAccount.MsSysThirdPartyAccountDAL.GetData($" CUSTOMERNAME='{order.CARRIER}' and THIRDPARTY='船公司账号' and USERID='" + userid + "' "); + //if (accCfg == null || string.IsNullOrWhiteSpace(accCfg.ACCOUNT) || string.IsNullOrWhiteSpace(accCfg.ACCOUNTPSW)) + //{ + // result.SetErrorInfo($"未在第三方账号信息中配置船公司【{order.CARRIER}】的网站账号、密码(第三方账号每人维护各自信息,客户名称需选择船公司,第三方软件为【船公司账号】)"); + //} + + try + { + if (WORKTYPE == "ETA") + { + + } + + //舱位分配查询 + if (WORKTYPE == "CWFPCX") + { + + } + + //格式单批量接收 + if (WORKTYPE == "ETA") + { + + } + } + catch (Exception e) + { + result.SetErrorInfo(e.Message); + } + + return result; + } + + private static DBResult ESL_CANDO(string WORKTYPE, string BSNO, string userid, string username, string copmpanyid) + { + var result = new DBResult(); + + //看 + + return result; + } + } public class GLSFEEHead diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAirn/MsOpAirnMainEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAirn/MsOpAirnMainEdit.js index 47d20bfd..bf1e0cd1 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAirn/MsOpAirnMainEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAirn/MsOpAirnMainEdit.js @@ -799,6 +799,7 @@ Ext.extend(Shipping.MsOpAirnEdit, Ext.Panel, { }] }, { fieldLabel: '分单号', + readOnly: true, name: 'HBLNO' }, this.comboxStlName, { fieldLabel: '结算日期', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index 076df043..a4fa563d 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -2927,7 +2927,28 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { _this.onSendToDJY('del'); } } - + //, { + // text: Zi.LAN.ESL, //"ESL业务执行", + // menu: [ + // { + // text: Zi.LAN.ESL_ETA, //"ESL到港时间更新", + // handler: function (menu, event) { + // _this.ESLWork("ETA"); + // } + // }, + // { + // text: Zi.LAN.ESL_CWFPCX, //"ESL舱位分配查询", + // handler: function (menu, event) { + // _this.ESLWork("CWFPCX"); + // } + // }, { + // text: Zi.LAN.ESL_GSDXZ, //"ESL格式单批量接收", + // handler: function (menu, event) { + // _this.ESLWork("GSDXZ"); + // } + // } + // ] + //} , { text: '推送港联顺费用', handler: function (menu, event) { @@ -15989,6 +16010,59 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { }); } } + + , ESLWork: function (WORKTYPE) { + var selections = this.GridCheckBoxModel.selected.items; + if (selections.length == 0) { + Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要更新的业务! + return; + } + var BSNOStr = ''; + for (var i = 0; i < selections.length; i++) { + var rec = selections[i]; + var BSNO = "'" + rec.data.BSNO + "'"; + if (BSNOStr == '') + BSNOStr = BSNO; + else { + + BSNOStr = BSNOStr + ',' + BSNO; + } + } + + if (BSNOStr == '') { + Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + + } + else { + Ext.Ajax.request({ + waitMsg: '', + url: '/MvcShipping/MsOpSeae/ESLWork', + params: { + WORKTYPE: WORKTYPE, + BSNO: BSNOStr + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success != true) { + + Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + + } else { + + MsgTip("提示", result.Message, 2500); + + } + } else { + Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: result.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + }, + scope: this + }); + + + } }); function fnSearch() { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/Zi_en-us.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/Zi_en-us.js index 22656317..ddfdc55b 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/Zi_en-us.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/Zi_en-us.js @@ -683,4 +683,8 @@ Zi.LAN.rRECEIVERSALE = "接受方销售"; Zi.LAN.rRECEIVERDEPT = "接受方部门"; Zi.LAN.EDIRUSSIA = "俄罗斯(交通部)"; Zi.LAN.RememberQuery = "Save Query"; -Zi.LAN.IRCODE = "CSR/IR号"; \ No newline at end of file +Zi.LAN.IRCODE = "CSR/IR号"; +Zi.LAN.ESL = "ESL业务执行"; +Zi.LAN.ESL_ETA = "ESL到港时间更新"; +Zi.LAN.ESL_CWFPCX = "ESL舱位分配查询"; +Zi.LAN.ESL_GSDXZ = "ESL格式单批量接收"; \ No newline at end of file diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/Zi_zh-cn.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/Zi_zh-cn.js index 1c1bbf3d..415c7699 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/Zi_zh-cn.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/Zi_zh-cn.js @@ -711,6 +711,10 @@ Zi.LAN.rRECEIVERDEPT = "接受方部门"; Zi.LAN.EDIRUSSIA = "俄罗斯(交通部)"; Zi.LAN.RememberQuery = "记忆查询"; Zi.LAN.IRCODE = "CSR/IR号"; +Zi.LAN.ESL = "ESL业务执行"; +Zi.LAN.ESL_ETA = "ESL到港时间更新"; +Zi.LAN.ESL_CWFPCX = "ESL舱位分配查询"; +Zi.LAN.ESL_GSDXZ = "ESL格式单批量接收"; //Zi.LAN. = "";