From 1e15302592c063176bae0c1e52a3ea34d2f85146 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Mon, 16 Apr 2018 11:22:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=BD=E6=BA=AF=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- B3ClientService/OfflinRpc/CarcassInStoreRpc.cs | 7 +++++-- B3ClientService/Tasks/SyncCarcassInStoreToTrackBack.cs | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/B3ClientService/OfflinRpc/CarcassInStoreRpc.cs b/B3ClientService/OfflinRpc/CarcassInStoreRpc.cs index 09b2736..5e5431a 100644 --- a/B3ClientService/OfflinRpc/CarcassInStoreRpc.cs +++ b/B3ClientService/OfflinRpc/CarcassInStoreRpc.cs @@ -151,8 +151,11 @@ namespace BWP.B3ClientService.Rpcs Update(id.Value, item, session); else Insert(item, session); - var log = new SyncCarcassInStoreLog { Code = item.BarCode, Date = item.InStoreTime.Value.ToString("yyyyMMdd") }; - session.Insert(log); + if (!string.IsNullOrEmpty(item.BarCode)) + { + var log = new SyncCarcassInStoreLog { Code = item.BarCode, Date = item.InStoreTime.Value.ToString("yyyyMMdd") }; + session.Insert(log); + } } session.Commit(); } diff --git a/B3ClientService/Tasks/SyncCarcassInStoreToTrackBack.cs b/B3ClientService/Tasks/SyncCarcassInStoreToTrackBack.cs index 2bbb23d..80e4e8e 100644 --- a/B3ClientService/Tasks/SyncCarcassInStoreToTrackBack.cs +++ b/B3ClientService/Tasks/SyncCarcassInStoreToTrackBack.cs @@ -19,7 +19,8 @@ namespace BWP.B3ClientService.Tasks var url = ServerHost.GetTraceServerUrl(); if (string.IsNullOrEmpty(url)) return; - url = url + "InsertInStore"; + url = url.Replace("CodeView", ""); + url = string.Format("{0}api/TraceBackInfo/InsertInStore", url); using (var session = Dmo.NewSession()) { var list = GetUnSyncdInfo(session);