diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index 2e9f4af0..8419caba 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -3662,6 +3662,7 @@ namespace DSWeb.Common.DB /// 收货地 /// public string PLACERECEIPTID { get; set; } + //public string PLACERECEIPTCODE { get; set; } public string SERVICE { get; set; } public string BLFRT { get; set; } diff --git a/DSWeb/Areas/CommMng/DAL/PubSysDAL.cs b/DSWeb/Areas/CommMng/DAL/PubSysDAL.cs index 09412bf5..120100b2 100644 --- a/DSWeb/Areas/CommMng/DAL/PubSysDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/PubSysDAL.cs @@ -534,7 +534,7 @@ namespace DSWeb.Areas.CommMng.DAL if (InWorking_CustOrderStatus(headinfo.Data.BSNO)) { - Task.Run(() => { Do_DingCangToDS7(itemstr); }); + Task.Run(() => { Do_CustOrderStatusToDS7(itemstr); }); return; } diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs index 3d30b0bf..adc5a406 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs @@ -13711,11 +13711,21 @@ namespace DSWeb.MvcShipping.Controllers var head = MsOpSeaeDAL.GetData($" B.BSNO='{usedata.BSNO}'", CookieConfig.GetCookie_UserId(Request)); head.MBLNO = string.IsNullOrWhiteSpace(usedata.MBLNO) ? head.MBLNO : usedata.MBLNO; + head.ORDERNO = head.MBLNO; + head.EDI_TIME = usedata.EDI_TIME == null ? head.EDI_TIME : ((DateTime)usedata.EDI_TIME).ToString("yyyy-MM-dd HH:mm:ss"); + head.CLOSEDOCDATE = head.EDI_TIME; + head.VGM_TIME = usedata.VGM_TIME == null ? head.EDI_TIME : ((DateTime)usedata.VGM_TIME).ToString("yyyy-MM-dd HH:mm:ss"); + head.VESSEL = string.IsNullOrWhiteSpace(usedata.VESSEL) ? head.VESSEL : usedata.VESSEL; head.VOYNO = string.IsNullOrWhiteSpace(usedata.VOYNO) ? head.VOYNO : usedata.VOYNO; - head.ATD = usedata.ATD == null ? head.EDI_TIME : ((DateTime)usedata.ATD).ToString("yyyy-MM-dd HH:mm:ss"); + + if (usedata.ATD != null) { + head.ATD = ((DateTime)usedata.ATD).ToString("yyyy-MM-dd HH:mm:ss"); + } + //head.ATD = usedata.ATD == null ? head.EDI_TIME : ((DateTime)usedata.ATD).ToString("yyyy-MM-dd HH:mm:ss"); + head.CARRIER = string.IsNullOrWhiteSpace(usedata.CARRIER) ? head.CARRIER : usedata.CARRIER; head.TRANSNO = string.IsNullOrWhiteSpace(usedata.TRANSNO) ? head.TRANSNO : usedata.TRANSNO; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitController.cs index 6f36a3d1..7d177840 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitController.cs @@ -4702,10 +4702,10 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append("SUM(G.RMBDR) as RMBDR,SUM(G.RMBCR) AS RMBCR,SUM(G.STLRMBDR) STLRMBDR,SUM(G.STLRMBCR) STLRMBCR,SUM(G.USDDR) AS USDDR,SUM(G.USDCR) AS USDCR,SUM(G.STLUSDDR) STLUSDDR,SUM(G.STLUSDCR) STLUSDCR,SUM(G.OTDR) AS OTDR,SUM(G.OTCR) AS OTCR,SUM(G.STLOTDR) STLOTDR,SUM(G.STLOTCR) STLOTCR,SUM(G.TTLDR) AS TTLDR,SUM(G.TTLCR) AS TTLCR,SUM(G.STLTTLDR) STLTTLDR,SUM(G.STLTTLCR) STLTTLCR"); //else // strSql.Append("COUNT(DISTINCT B.BSNO) AS BLCOUNT,SUM(G.RMBDR) as RMBDR,SUM(G.RMBCR) AS RMBCR,SUM(G.STLRMBDR) STLRMBDR,SUM(G.STLRMBCR) STLRMBCR,SUM(G.USDDR) AS USDDR,SUM(G.USDCR) AS USDCR,SUM(G.STLUSDDR) STLUSDDR,SUM(G.STLUSDCR) STLUSDCR,SUM(G.OTDR) AS OTDR,SUM(G.OTCR) AS OTCR,SUM(G.STLOTDR) STLOTDR,SUM(G.STLOTCR) STLOTCR,SUM(G.TTLDR) AS TTLDR,SUM(G.TTLCR) AS TTLCR,SUM(G.STLTTLDR) STLTTLDR,SUM(G.STLTTLCR) STLTTLCR"); - strSql.Append($",SUM(CASE WHEN A.OPTYPE='普通货' THEN A.NETWEIGHT ELSE 0 END) AS NETWEIGHT,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.TEU ELSE 0 END) AS TEU,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR1 ELSE 0 END) AS CNTR1,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN B.CNTR2 ELSE 0 END) AS CNTR2,"); - strSql.Append($"SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR3 ELSE 0 END) AS CNTR3,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR4 ELSE 0 END) AS CNTR4,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR5 ELSE 0 END) AS CNTR5,"); - strSql.Append($"SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR6 ELSE 0 END) AS CNTR6,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR7 ELSE 0 END) AS CNTR7,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR8 ELSE 0 END) AS CNTR8,"); - strSql.Append($"SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR9 ELSE 0 END) AS CNTR9,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.CNTR10 ELSE 0 END) AS CNTR10,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句} THEN A.OTCNTR ELSE 0 END) AS OTCNTR"); + strSql.Append($",SUM(CASE WHEN A.OPTYPE='普通货' THEN A.NETWEIGHT ELSE 0 END) AS NETWEIGHT,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.TEU ELSE 0 END) AS TEU,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR1 ELSE 0 END) AS CNTR1,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN B.CNTR2 ELSE 0 END) AS CNTR2,"); + strSql.Append($"SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR3 ELSE 0 END) AS CNTR3,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR4 ELSE 0 END) AS CNTR4,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR5 ELSE 0 END) AS CNTR5,"); + strSql.Append($"SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR6 ELSE 0 END) AS CNTR6,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR7 ELSE 0 END) AS CNTR7,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR8 ELSE 0 END) AS CNTR8,"); + strSql.Append($"SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR9 ELSE 0 END) AS CNTR9,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.CNTR10 ELSE 0 END) AS CNTR10,SUM(CASE WHEN A.OPTYPE='普通货' AND {BLTYPE子句} AND {去除删单子句_B} THEN A.OTCNTR ELSE 0 END) AS OTCNTR"); strSql.Append(",SUM(ISNULL(G.USDDR-G.USDCR,0)) AS USDPROFIT,SUM(ISNULL(G.RMBDR-G.RMBCR,0)) AS RMBPROFIT,SUM(ISNULL(G.OTDR-G.OTCR,0)) AS OTPROFIT,SUM(ISNULL(G.TTLDR-G.TTLCR,0)) AS TTLPROFIT "); strSql.Append(",SUM(ISNULL(G.RMBDR-G.STLRMBDR,0)) AS RMBNODR,SUM(ISNULL(G.USDDR-G.STLUSDDR,0)) AS USDNODR,SUM(ISNULL(G.OTDR-G.STLOTDR,0)) AS OTNODR,SUM(ISNULL(G.TTLDR-G.STLTTLDR,0)) AS TTLNODR"); strSql.Append(",SUM(ISNULL(G.RMBCR-G.STLRMBCR,0)) AS RMBNOCR,SUM(ISNULL(G.USDCR-G.STLUSDCR,0)) AS USDNOCR,SUM(ISNULL(G.OTCR-G.STLOTCR,0)) AS OTNOCR,SUM(ISNULL(G.TTLCR-G.STLTTLCR,0)) AS TTLNOCR"); diff --git a/DSWeb/Areas/MvcShipping/DAL/DJYORDER/DJYORDERDAL.cs b/DSWeb/Areas/MvcShipping/DAL/DJYORDER/DJYORDERDAL.cs index f96fad14..8f7e1612 100644 --- a/DSWeb/Areas/MvcShipping/DAL/DJYORDER/DJYORDERDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/DJYORDER/DJYORDERDAL.cs @@ -316,6 +316,9 @@ namespace DSWeb.Areas.MvcShipping.DAL.DJYORDER_CONTRACTNO //20240429 增加判断 判断船名航次是否正确 //如不正确则弹出选框令用户自行选择 选框内容为吴广接口返回的船名航次列表 result = hp.CheckShipinfo_EMC(USERID); + + hp.设置收货地_EMC(USERID); + if (!result.Success) { return result; diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index 81b06784..6f9c0702 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -8351,7 +8351,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL if (!string.IsNullOrWhiteSpace(收货地)) { var 收货地映射 = MsOpSeaeEdiPortDAL.MsOpSeaeEdiPortDAL.GetPortEDICode2(result.OpseaeDjyOrderHead.PLACERECEIPTID, 大简云EDINAME); - result.OpseaeHead.PORTLOADID = 收货地映射; + result.OpseaeHead.PLACERECEIPTID = 收货地映射; //result.OpseaeHead.PORTLOAD = 起始港映射; if (string.IsNullOrWhiteSpace(收货地映射)) { @@ -8607,7 +8607,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL if (!string.IsNullOrWhiteSpace(收货地)) { var 收货地映射 = MsOpSeaeEdiPortDAL.MsOpSeaeEdiPortDAL.GetPortEDICode2(result.OpseaeDjyOrderHead.PLACERECEIPTID, 大简云EDINAME); - result.OpseaeHead.PORTLOADID = 收货地映射; + result.OpseaeHead.PLACERECEIPTID = 收货地映射; //result.OpseaeHead.PORTLOAD = 起始港映射; if (string.IsNullOrWhiteSpace(收货地映射)) { @@ -8624,6 +8624,12 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL { canmake.SetErrorInfo($"没有设置起始港[{起始港}]的代码对应。"); } + + if (!string.IsNullOrWhiteSpace(result.OpseaeHead.PORTLOADID) && string.IsNullOrWhiteSpace(result.OpseaeHead.PLACERECEIPTID)) + { + result.OpseaeHead.PLACERECEIPTID = result.OpseaeHead.PORTLOADID; + } + //2 var 卸货港 = result.OpseaeDjyOrderHead.PORTDISCHARGEID; var 卸货港映射 = MsOpSeaeEdiPortDAL.MsOpSeaeEdiPortDAL.GetPortEDICode2(result.OpseaeDjyOrderHead.PORTDISCHARGEID, 大简云EDINAME); @@ -8814,6 +8820,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL PILCODE = result.OpseaeHead.CONTRACTNO, CARGOID = result.OpseaeHead.CARGOID, PORTLOADID = result.OpseaeHead.PORTLOADID, + PLACERECEIPTID = string.IsNullOrWhiteSpace( result.OpseaeHead.PLACERECEIPTID)? result.OpseaeHead.PORTLOADID: result.OpseaeHead.PLACERECEIPTID, PORTDISCHARGEID = result.OpseaeHead.PORTDISCHARGEID, DESTINATIONID = result.OpseaeHead.DESTINATIONID, SERVICE = result.OpseaeHead.SERVICE, @@ -9117,7 +9124,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL //20240704 签约方,订舱网点,提单签发地,默认带出上一票的值 var cdc = new CommonDataContext(); - var lastrecList = cdc.OP_SEAE_DJYORDER.Where(x => x.CreateID == SendUser.USERID).ToList(); + var lastrecList = cdc.OP_SEAE_DJYORDER.Where(x => x.CreateID == SendUser.USERID && x.ISLAST==true && ((x.signType!=null &&x.signType!="")|| (x.bookingAddr != null && x.bookingAddr != "")|| (x.billSignLoc != null && x.billSignLoc != ""))).ToList(); if (lastrecList != null && lastrecList.Count > 0) { @@ -9317,7 +9324,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL _result.Add("billCount", OpseaeDjyOrderHead.billCount.ToString()); _result.Add("acceptNotify", OpseaeDjyOrderHead.acceptNotify.ToString()); _result.Add("signType", OpseaeDjyOrderHead.signType); - _result.Add("PLACERECEIPTID", OpseaeDjyOrderHead.PLACERECEIPTID); + _result.Add("PLACERECEIPTCODE", OpseaeDjyOrderHead.PLACERECEIPTID); _result.Add("ShipperSex", OpseaeDjyOrderHead.ShipperSex); _result.Add("BookingSex", OpseaeDjyOrderHead.BookingSex); @@ -10002,6 +10009,31 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL return result; } + public DBResult 设置收货地_EMC(string USERID) + { + + var result = new DBResult(); + try + { + var cdc = new CommonDataContext(); + if (!string.IsNullOrWhiteSpace(OpseaeDjyOrderHead.PLACERECEIPTID)) + { + OpseaeDjyOrderHead.PLACERECEIPTID = cdc.code_disport_edi.FirstOrDefault(x => x.EDINAME == 大简云EDINAME && x.PORTID == OpseaeDjyOrderHead.PLACERECEIPTID).EDICODE; + } + + + + + } + catch (Exception e) + { + result.SetErrorInfo(e.Message); + } + + return result; + } + + /// /// 从大简云接口 http://118.190.144.189:6001/commondb/OpenGetMappingPortLoad?Code=CNCKG&Module=DjyCustBooking&CarrierCode=COSCO /// http://118.190.144.189:6001/commondb/OpenGetMappingPort?Code=ALDRZ&Module=DjyCustBooking&CarrierCode=COSCO diff --git a/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs b/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs index f1bb8550..e5cd0015 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs @@ -1404,7 +1404,7 @@ namespace DSWeb.MvcShipping.Models.MsOpSeae private string _orderno = ""; /// - /// 订舱编号 + /// 订舱编号 在彩虹海运出口界面是BC /// [ModelDB] public string ORDERNO diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js index 9be79057..a4aed0fb 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js @@ -1859,7 +1859,7 @@ ShowSyncBcForm = function (BSNO) name: 'CARRIER' }, { - fieldLabel: '预抵日期', + fieldLabel: 'ETD', name: 'ATD' } ] @@ -1930,7 +1930,7 @@ ShowSyncBcForm = function (BSNO) text: "关闭", minWidth: 70, handler: function () { - me.winUserInfoShow.close(); + winUserInfoShow.close(); } } ] diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index 84d7252c..955ad463 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -24042,7 +24042,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { name: 'CARRIER' }, { - fieldLabel: '预抵日期', + fieldLabel: 'ETD', name: 'ATD' } ] @@ -24114,7 +24114,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { text: "关闭", minWidth: 70, handler: function () { - me.winUserInfoShow.close(); + winUserInfoShow.close(); } } ] diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/formDjyOrder_EMC.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/formDjyOrder_EMC.js index 1bb290cd..5dc2c2b7 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/formDjyOrder_EMC.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/formDjyOrder_EMC.js @@ -188,7 +188,22 @@ Ext.extend(Shipping.formDjyOrder_EMC, Ext.Panel, { dataIndex: 'KGS', header: Zi.LAN.KGS3, //'重量', width: 100 - }]; + }]; + + + this.storeBodyList = Ext.create('Ext.data.Store', { + model: 'MsOpSeaeDetail', + remoteSort: true, + proxy: { + type: 'ajax', + url: '/MvcShipping/MsOpSeae/GetBodyList', + reader: { + id: 'BSNO,CTNCODE,CTN_ID', + root: 'data', + totalProperty: 'totalCount' + } + } + }); this.gridList_OrderCtn = new Ext.grid.GridPanel({ title: "箱信息", @@ -1860,6 +1875,14 @@ Ext.extend(Shipping.formDjyOrder_EMC, Ext.Panel, { } }); + var BSNO = this.seaeHeadData.BSNO; + + this.storeBodyList.load({ + params: { condition: "BSNO='" + BSNO + "'" } + }); + + this.LoadUploadFile(BSNO); + //this.GetDjyOrderDataBySeae(); } diff --git a/DSWeb/Global.asax.cs b/DSWeb/Global.asax.cs index 3dfd91cd..1dc12959 100644 --- a/DSWeb/Global.asax.cs +++ b/DSWeb/Global.asax.cs @@ -24,6 +24,8 @@ using RabbitMQ.Client; using RabbitMQ.Client.Events; using System.Text; using DSWeb.Areas.CommMng.DAL; +using NPOI.OpenXmlFormats.Wordprocessing; +using DSWeb.MvcShipping.Helper; namespace DSWeb { @@ -348,7 +350,7 @@ namespace DSWeb //LoggerHelper loggerHelper = new LoggerHelper("接收大简云订舱"); - //SaveLog(strBodyZip, "", "接收大简云订舱", "压缩内容"); + //BasicDataRefDAL.SaveLog(strBodyZip, "", "接收大简云订舱", "压缩内容"); var strBody = Areas.CommMng.DAL.BasicDataRefDAL.Decompress(strBodyZip); @@ -363,14 +365,16 @@ namespace DSWeb } catch (Exception ex) { - var excep = ex; - while (excep != null) - { - //logger.Error(excep.Message); - //logger.Error(excep.StackTrace); + //var excep = ex; + //while (excep != null) + //{ + // //logger.Error(excep.Message); + // //logger.Error(excep.StackTrace); - excep = excep.InnerException; - } + // excep = excep.InnerException; + //} + + BasicDataRefDAL.SaveLog(JsonConvert.Serialize(ex), "", "接收大简云订舱", "错误"); } }; @@ -440,14 +444,7 @@ namespace DSWeb } catch (Exception ex) { - var excep = ex; - while (excep != null) - { - //logger.Error(excep.Message); - //logger.Error(excep.StackTrace); - - excep = excep.InnerException; - } + BasicDataRefDAL.SaveLog(JsonConvert.Serialize(ex), "", "接收大简云订舱审核", "错误"); } }; diff --git a/DSWeb/Web.config b/DSWeb/Web.config index 9b2a7ff3..d6db2156 100644 --- a/DSWeb/Web.config +++ b/DSWeb/Web.config @@ -135,7 +135,7 @@ --> - +