diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs index bb0314d5..c582884f 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs @@ -44,6 +44,7 @@ using DSWeb.Common.DB; using DSWeb.Common.Helper; using DSWeb.Areas.SysMng.DAL.SysUser; using DSWeb.Areas.Account.Models.BSNOLB; +using Quartz.Util; namespace DSWeb.MvcShipping.Controllers { @@ -3017,13 +3018,60 @@ namespace DSWeb.MvcShipping.Controllers { var condition = $" B.bsno='{headid}'"; var head = MsOpSeaiDAL.GetData(condition); + var json = ""; + var result = new DBResult(); - var dbresult = QY_addWarehouseNotice(head); + if (!BasicDataRefDAL.具有webconfig公司代码("HYRD")) + { - var json = JsonConvert.Serialize( - new { Success = dbresult.Success, Message = dbresult.Message, data = "" }); - return new ContentResult() { Content = json }; + var dbresult = QY_addWarehouseNotice(head); + + json = JsonConvert.Serialize( + new { Success = dbresult.Success, Message = dbresult.Message, data = "" }); + return new ContentResult() { Content = json }; + } + else { + //鸿亚润达 将opseai.wmsstatus修改 + //如无改为 发送至仓储 + //如有“发送至仓储”则改为 无 + //如有其他 则返回错误 + + if (string.IsNullOrWhiteSpace(head.WMSSTATUS)) + { + head.WMSSTATUS = "发送至仓储"; + + head.DbOperationType = DbOperationType.DbotUpd; + head.ModelUIStatus = "E"; + var modb = new ModelObjectDB(); + result = modb.Save(head); + result.OK("已发送至仓储业务"); + return BasicDataRefDAL.GetContentResult(result); + } + else { + if (head.WMSSTATUS == "发送至仓储") + { + head.WMSSTATUS = ""; + head.DbOperationType = DbOperationType.DbotUpd; + head.ModelUIStatus = "E"; + var modb = new ModelObjectDB(); + result = modb.Save(head); + result.OK("已取消发送"); + return BasicDataRefDAL.GetContentResult(result); + } + else { + var wmsstatus = head.WMSSTATUS; + result.SetErrorInfo($"该业务目前为[{wmsstatus}]状态,无法进行此操作"); + } + } + + + + return BasicDataRefDAL.GetContentResult(result); + } } + + + public static DBResult QY_addWarehouseNotice(MsOpSeai headData) { var result = new DBResult(); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs index f1789074..e94a312a 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs @@ -66,6 +66,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaiDAL //strSql.Append(",(CASE FEESTATUS WHEN 1 THEN '锁定' else '' end) as FEESTATUSREF "); + strSql.Append(" from VW_OP_SEAI LEFT JOIN v_op_gain_dr_INV I ON (I.BSNO=VW_OP_SEAI.BSNO) "); strSql.Append(" left join (select bsno, sum(case when[status] = '换单' then 1 else 0 end) CHANGEDOCSTATUS, sum(case when [status] = '海关放行' then 1 else 0 end) CUSTOMSSTATUS"); @@ -941,6 +942,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaiDAL if (reader["CANGDANSTATUS"] != DBNull.Value) data.CANGDANSTATUS = Convert.ToInt32(reader["CANGDANSTATUS"]); data.MDESCRIPTION = Convert.ToString(reader["MDESCRIPTION"]); + + data.WMSSTATUS = Convert.ToString(reader["WMSSTATUS"]); + #endregion headList.Add(data); } diff --git a/DSWeb/Areas/MvcShipping/Models/MsOpSeai/MsOpSeai.cs b/DSWeb/Areas/MvcShipping/Models/MsOpSeai/MsOpSeai.cs index b0823a2c..b7ab6f74 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOpSeai/MsOpSeai.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOpSeai/MsOpSeai.cs @@ -2723,6 +2723,12 @@ namespace DSWeb.MvcShipping.Models.MsOpSeai /// public decimal? OPWMS_IN_COUNT { get; set; } + /// + /// 20231109 记录是否发送给仓储业务 用于vue版仓储系统当中的查询 + /// + [ModelDB] + public string WMSSTATUS { get; set; } + public MsOpSeai() { @@ -2743,5 +2749,5 @@ namespace DSWeb.MvcShipping.Models.MsOpSeai public List GOODSDETAIL { get; set; } } - // - } + +} diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js index 12bf0a59..af10ad7d 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js @@ -1109,7 +1109,8 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { }, { fieldLabel: Zi.LAN.MBLFRT, //'MBLFRT', name: 'MBLFRT', hidden: true - }, this.comboxBSSTATUSREF, this.comboxFEESTATUSREF, { + } + , this.comboxBSSTATUSREF, this.comboxFEESTATUSREF, { fieldLabel: Zi.LAN.ACCDATE, //'会计期间', xtype: 'monthfield', editable: false, @@ -1183,7 +1184,11 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { }, { fieldLabel: Zi.LAN.APPLYNO, //'申请放箱号', name: 'APPLYNO' - },{ xtype: 'hiddenfield' }] + }, { + fieldLabel: '发仓储状态', //'MBLFRT', + name: 'WMSSTATUS', + readOnly: true, + }] }, { xtype: 'container', layout: 'hbox', @@ -5002,28 +5007,39 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { DsOpenMultiEditWin('/MvcContainer/MsOpCtnApply/CostEdit?opener=OPSEAI&APPLYNO=' + APPLYNO); }, onSendQY: function () { - var headid = this.editRecord.get('BSNO'); - Ext.Ajax.request({ - waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //'正在查询主表数据...', - url: '/MvcShipping/MsOpSeai/QY_addWarehouseNotice', - params: { - headid: headid - }, - callback: function (options, success, response) { - if (success) { - var jsonresult = Ext.JSON.decode(response.responseText); - if (jsonresult.Success) { - //显示成功 - Ext.Msg.show({ title: '发送至仓储系统', msg: "发送成功", icon: Ext.Msg.OK, buttons: Ext.Msg.OK }); + + if (this.opStatus == 'add') { + MsgTip("提示", "需要先保存业务", 1000); + return; + } else { + _this = this; + var headid = this.editRecord.get('BSNO'); + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //'正在查询主表数据...', + url: '/MvcShipping/MsOpSeai/QY_addWarehouseNotice', + params: { + headid: headid + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + //显示成功 + Ext.Msg.show({ title: '发送至仓储系统', msg: "发送成功:" + jsonresult.Message, icon: Ext.Msg.OK, buttons: Ext.Msg.OK }); + + condition = "BSNO='" + headid + "'"; + + this.LoadData(this.opStatus, condition); + } else { + Ext.Msg.show({ title: '发送至仓储系统', msg: "发送失败:" + jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.ERROR }); + } } else { - Ext.Msg.show({ title: '发送至仓储系统', msg: "发送失败:" + jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.ERROR }); + Ext.Msg.show({ title: '发送至仓储系统', msg: "发送失败", icon: Ext.Msg.ERROR, buttons: Ext.Msg.ERROR }); } - } else { - Ext.Msg.show({ title: '发送至仓储系统', msg: "发送失败", icon: Ext.Msg.ERROR, buttons: Ext.Msg.ERROR }); - } - }, - scope: this - }); + }, + scope: this + }); + } }, onaddYXClick: function () { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiIndex.js index 071bb352..73eb064b 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiIndex.js @@ -1111,7 +1111,14 @@ Ext.extend(Shipping.MsOpSeaiIndex, Ext.Panel, { header: Zi.LAN.OPWMS_IN_COUNT, width: 100 } - + , + { + sortable: true, + id: '', + dataIndex: 'WMSSTATUS', + header: Zi.LAN.WMSSTATUS, + width: 100 + } ]; this.Pagenum = Ext.create('Ext.form.field.Number', { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiModel.js index 804aaee4..8d1d818e 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiModel.js @@ -257,7 +257,8 @@ { name: 'CUSTOMSSTATUS', type: 'int' }, { name: 'CANGDANSTATUS', type: 'int' }, { name: 'DEST_RTCNT_TIME', type: 'string' }, - { name: 'OPWMS_IN_COUNT', type: 'string' } + { name: 'OPWMS_IN_COUNT', type: 'string' }, + { name: 'WMSSTATUS', type: 'string' } ] }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_en-us.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_en-us.js index bd012ed3..844e6857 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_en-us.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_en-us.js @@ -423,6 +423,9 @@ Zi.LAN.QueshiYaoShanChu2 = "票业务吗?"; Zi.LAN.OPWMS_IN_COUNT = "入库数量"; Zi.LAN.DeleteSuccess = "删除成功"; Zi.LAN.DeleteErro = "删除错误"; + +Zi.LAN.WMSSTATUS = "发仓储状态"; + //#endregion //Zi.LAN. = ""; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_zh-cn.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_zh-cn.js index 946e9adc..90a2a93d 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_zh-cn.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/Zi_zh-cn.js @@ -424,6 +424,8 @@ Zi.LAN.QueshiYaoShanChu2 = "票业务吗?"; Zi.LAN.OPWMS_IN_COUNT = "入库数量"; Zi.LAN.DeleteSuccess = "删除成功"; Zi.LAN.DeleteErro = "删除错误"; + +Zi.LAN.WMSSTATUS = "发仓储状态"; //#endregion //Zi.LAN. = ""; diff --git a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs index cbcc9a9c..f6ae9a7a 100644 --- a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs +++ b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs @@ -3407,12 +3407,21 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64" reqObj.Add("etps_category", etps_category);// var t_str = reqObj.ToString(Newtonsoft.Json.Formatting.None); + var useurl = ""; if (withdoc) - rtn = DSWeb.Areas.MvcShipping.Comm.WebRequestHelper.DoPost(_IURL_2, t_str, 180000); + { + useurl = _IURL_2; + //rtn = DSWeb.Areas.MvcShipping.Comm.WebRequestHelper.DoPost(_IURL_2, t_str, 180000); + } if (!withdoc) - rtn = DSWeb.Areas.MvcShipping.Comm.WebRequestHelper.DoPost(_IURL_2_Nodoc, t_str, 180000); + { + useurl = _IURL_2_Nodoc; + //rtn = DSWeb.Areas.MvcShipping.Comm.WebRequestHelper.DoPost(_IURL_2_Nodoc, t_str, 180000); + } + + rtn = DSWeb.Areas.MvcShipping.Comm.WebRequestHelper.DoPost(useurl, t_str, 180000); - BasicDataRefDAL.SaveLog("_IURL=" + _IURL + ";t_str=" + t_str + ";rtn=" + rtn, "单一窗口", "读取单一窗口", "二步申报"); + BasicDataRefDAL.SaveLog("_IURL=" + useurl + ";t_str=" + t_str + ";rtn=" + rtn, "单一窗口", "读取单一窗口", "二步申报"); return rtn;