diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index c5a790c3..dde3c67c 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -2150,14 +2150,14 @@ namespace Tnb.ProductionMgr List> erpRequestDataDetails = new List>(); erpRequestDataDetails.Add(new Dictionary() { - ["bbchkflag"] = "N", - ["bbhasbckfled"] = "N", - ["bbhaspicked"] = "N", - ["bbinstock"] = "N", - ["bbisempass"] = "N", - ["bbotherreject"] = "N", - ["bbsetmark"] = "N", - ["bbstockbycheck"] = "N", + ["bbchkflag"] = false, + ["bbhasbckfled"] = false, + ["bbhaspicked"] = false, + ["bbinstock"] = false, + ["bbisempass"] = false, + ["bbotherreject"] = false, + ["bbsetmark"] = false, + ["bbstockbycheck"] = false, ["cbastunitid"] = "", ["cbbomversionid"] = "", ["cbdeptid"] = "", diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index e149b0a6..1bb08ab3 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -773,8 +773,10 @@ namespace Tnb.ProductionMgr [AllowAnonymous] public async Task SyncBaseData() { + string msg = ""; try { + int editCount = 0; string[] tables = new[] { "base_dictionarydata", "bas_material" }; var erpdb = _db.AsTenant().GetConnection("erpdb"); List list = await erpdb.Queryable().ToListAsync(); @@ -869,6 +871,7 @@ namespace Tnb.ProductionMgr .SetColumns(x => x.erp_modify_time == erpBdMaterial.MODIFIEDTIME) .Where(x => x.id == materialId) .ExecuteCommandAsync(); + editCount += updateRow; if (updateRow <= 0) { Log.Error($"未找到物料{erpBdMaterial.ID},跳过此条数据"); @@ -1019,6 +1022,8 @@ namespace Tnb.ProductionMgr await _db.Insertable(insertBasEbomDs).ExecuteCommandAsync(); await _db.Ado.CommitTranAsync(); + msg = $"新增物料${insertMaterial.Count}条,修改物料{editCount}条"; + Log.Information(msg); } catch (Exception e) { @@ -1027,7 +1032,7 @@ namespace Tnb.ProductionMgr throw Oops.Bah(e.Message); } - return "成功"; + return msg; } ///