From 8347f2fbddbd25369359dcb2da1233ac48a19fdc Mon Sep 17 00:00:00 2001 From: zhao Date: 星期一, 19 七月 2021 15:29:46 +0800 Subject: [PATCH] 迁移至svn --- HH.WMS.Entitys/HH.WMS.Entitys.csproj | 1 HH.WMS.BLL/Pda/ZCBLL.cs | 31 +++++++++++++++ HH.WMS.Entitys/Dto/XBQBitDto.cs | 16 ++++++++ HH.WMS.WebApi/Config.json | 10 +++++ HH.WMS.Entitys/Dto/ConnectBitDto.cs | 8 +-- HH.WMS.WebApi/Web.config | 8 ++-- 6 files changed, 65 insertions(+), 9 deletions(-) diff --git a/HH.WMS.BLL/Pda/ZCBLL.cs b/HH.WMS.BLL/Pda/ZCBLL.cs index afe1ceb..ec68809 100644 --- a/HH.WMS.BLL/Pda/ZCBLL.cs +++ b/HH.WMS.BLL/Pda/ZCBLL.cs @@ -245,6 +245,12 @@ List<OperateResult> ors = new List<OperateResult>(); if (transportReqs.Any()) { + var xbqBitStr = JsonHelper.GetValue("xbqBit"); + if (string.IsNullOrEmpty(xbqBitStr)) + throw new Exception("鏈壘鍒伴厤缃細xbqBit"); + + var xbqBits = JsonConvert.DeserializeObject<List<XBQBitDto>>(xbqBitStr); + foreach (var req in transportReqs) { string startBit = req.Location_From; @@ -286,7 +292,20 @@ } else if (section == TaskSectionConstants.BCP_KTCK) { + // 鍑哄簱 direction = Constants.Out; + // 鍏ュ簱浠诲姟鐨勮捣鐐规槸婊℃墭浣嶏紝鏌ユ壘鍏剁浉閭荤殑绌烘墭浣�+ var ktBit = xbqBits.FirstOrDefault(bit => bit.mtBit == inModel.startBit); + if (ktBit == null) + { + Log.Error("鏌ユ壘绾胯竟鍖虹┖鎵樼偣澶辫触", "锛岀┖鎵樼偣=null锛屽叆搴撲换鍔$殑绾胯竟鍖烘弧鎵樼偣锛� + inModel.startBit); + ors.Add(OperateResult.Error("鏌ユ壘绾胯竟鍖虹┖鎵樼偣澶辫触" + "锛岀┖鎵樼偣=null锛屽叆搴撲换鍔$殑绾胯竟鍖烘弧鎵樼偣锛� + inModel.startBit, req)); + continue; + } + // 淇敼鍑哄簱浠诲姟鐨勭粓鐐逛负绌烘墭浣�+ outModel.endBit = ktBit.ktBit; + outModel.startBit = ""; + outModel.remark += "锛屽崐鎴愬搧绌烘墭鍑哄簱"; } else if (section == TaskSectionConstants.BCP_MTRK) { @@ -334,6 +353,12 @@ { Log.Info("鍏ヤ綔涓氬尯寮�锛屼紶鍙傦細", JsonConvert.SerializeObject(inWorkAreaEntitys)); externalRes = BLLCreator.Create<WmsApiBaseBLL>().InWorkArea(inWorkAreaEntitys); + if (!externalRes.success) + { + Log.Error("鍏ヤ綔涓氬尯澶辫触锛屼紶鍙傦細", JsonConvert.SerializeObject(inWorkAreaEntitys) + externalRes.errMsg); + ors.Add(OperateResult.Error("鍏ヤ綔涓氬尯澶辫触锛� + externalRes.errMsg, req)); + continue; + } taskNo = inModel.taskNo; } catch (Exception ex) @@ -353,6 +378,12 @@ { Log.Info("鍑轰綔涓氬尯寮�锛屼紶鍙傦細", JsonConvert.SerializeObject(outWorkAreaEntitys)); externalRes = BLLCreator.Create<WmsApiBaseBLL>().OutWorkArea(outWorkAreaEntitys); + if (!externalRes.success) + { + Log.Error("鍑轰綔涓氬尯澶辫触锛屼紶鍙傦細", JsonConvert.SerializeObject(outWorkAreaEntitys) + externalRes.errMsg); + ors.Add(OperateResult.Error("鍑轰綔涓氬尯澶辫触锛� + externalRes.errMsg, req)); + continue; + } taskNo = outModel.taskNo; } catch (Exception ex) diff --git a/HH.WMS.Entitys/Dto/ConnectBitDto.cs b/HH.WMS.Entitys/Dto/ConnectBitDto.cs index 964e439..5d084db 100644 --- a/HH.WMS.Entitys/Dto/ConnectBitDto.cs +++ b/HH.WMS.Entitys/Dto/ConnectBitDto.cs @@ -6,11 +6,9 @@ namespace HH.WMS.Entitys.Dto { - public class ConnectBitDto + public class XBQBitDto { - public string tunnel { get; set; } - public string bit { get; set; } - public string readybit { get; set; } - public string tasktype { get; set; } + public string mtBit { get; set; } + public string ktBit { get; set; } } } diff --git a/HH.WMS.Entitys/Dto/XBQBitDto.cs b/HH.WMS.Entitys/Dto/XBQBitDto.cs new file mode 100644 index 0000000..964e439 --- /dev/null +++ b/HH.WMS.Entitys/Dto/XBQBitDto.cs @@ -0,0 +1,16 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HH.WMS.Entitys.Dto +{ + public class ConnectBitDto + { + public string tunnel { get; set; } + public string bit { get; set; } + public string readybit { get; set; } + public string tasktype { get; set; } + } +} diff --git a/HH.WMS.Entitys/HH.WMS.Entitys.csproj b/HH.WMS.Entitys/HH.WMS.Entitys.csproj index d4771d4..be7ee7c 100644 --- a/HH.WMS.Entitys/HH.WMS.Entitys.csproj +++ b/HH.WMS.Entitys/HH.WMS.Entitys.csproj @@ -66,6 +66,7 @@ <Compile Include="Algorithm\TN_AB_B_ITEM_PRICEEntity.cs" /> <Compile Include="Algorithm\TN_AB_B_LOCATION_LINKEntity.cs" /> <Compile Include="Algorithm\TN_AB_STOCKEntity.cs" /> + <Compile Include="Dto\XBQBitDto.cs" /> <Compile Include="Dto\ZCTransferDto.cs" /> <Compile Include="Entitys\Mes\TN_MES_TASK.cs" /> <Compile Include="External\ChangeWayResult.cs" /> diff --git a/HH.WMS.WebApi/Config.json b/HH.WMS.WebApi/Config.json index 3378880..f467454 100644 --- a/HH.WMS.WebApi/Config.json +++ b/HH.WMS.WebApi/Config.json @@ -28,5 +28,15 @@ "bit": "鎺ラ┏浣嶈揣浣�, "tasktype": "绌烘墭鍏ュ簱" } + ], + "xbqBit": [ + { + "mtBit": "XBQM01", + "ktBit": "XBQK01" + }, + { + "mtBit": "XBQM02", + "ktBit": "XBQK02" + } ] } \ No newline at end of file diff --git a/HH.WMS.WebApi/Web.config b/HH.WMS.WebApi/Web.config index 967229d..0345167 100644 --- a/HH.WMS.WebApi/Web.config +++ b/HH.WMS.WebApi/Web.config @@ -9,10 +9,10 @@ <add name="wmsConnection" connectionString="Data Source=192.168.1.199;Initial Catalog=ZC_WMS;User ID=sa;Password=test?123" providerName="System.Data.SqlClient"/> <!--<add name="middleConnection" connectionString="Data Source=192.168.1.199;Initial Catalog=GL_ZJK;User ID=sa;Password=test?123" providerName="System.Data.SqlClient"/>--> <add name="DataType" connectionString="MSSQL"/> - <add name="MIP" connectionString="192.168.1.198"/> + <add name="MIP" connectionString="192.168.1.100"/> <add name="MPORT" connectionString="27017"/> - <add name="MDB" connectionString="gl_mtl"/> - <add name="MUSER" connectionString="gl"/> + <add name="MDB" connectionString="zc_mtl"/> + <add name="MUSER" connectionString="ZC"/> <add name="MPWD" connectionString="123456"/> </connectionStrings> <appSettings> @@ -26,7 +26,7 @@ <add key="KdEAppKey" /> <add key="KdEReqURL" /> <add key="AppName" value="娴锋疆涓瓥" /> - <add key="AutobomApi" value="192.168.1.199:8362" /> + <add key="AutobomApi" value="192.168.1.199:8113" /> <add key="REDIS" value="123456@192.168.1.199:6379" /> <add key="REDIS_DB" value="1" /> <add key="UI_ROOT_PATH" value="E:\1.娴嬭瘯椤圭洰\31.璐佃疆\2.WMS\AutoWMS_UI" /> -- Gitblit v1.9.1