From b40f6746414edfeffff527a1fa6f9e4a1d4a58ad Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Wed, 18 Sep 2024 13:53:02 +0800 Subject: [PATCH] bug --- ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs | 2 ++ WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs | 1 + WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs index 09c14e01..59d4080c 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs @@ -112,6 +112,7 @@ namespace Tnb.ProductionMgr ISqlSugarClient db = _repository.AsSugarClient(); Dictionary? queryJson = !string.IsNullOrEmpty(input.queryJson) ? Newtonsoft.Json.JsonConvert.DeserializeObject>(input.queryJson) : new Dictionary(); string moCode = queryJson.ContainsKey("mo_code") ? queryJson["mo_code"].ToString() : ""; + string remark = queryJson.ContainsKey("remark") ? queryJson["remark"].ToString() : ""; string moStatus = queryJson.ContainsKey("mo_status") ? queryJson["mo_status"].ToString() : ""; string combineMoCode = queryJson.ContainsKey("combine_mo_code") ? queryJson["combine_mo_code"].ToString() : ""; string mo_type = queryJson.ContainsKey("mo_type") ? queryJson["mo_type"].ToString() : ""; @@ -142,6 +143,7 @@ namespace Tnb.ProductionMgr .LeftJoin((a, b, c, d, e) => a.mo_status == e.Id) .LeftJoin((a, b, c, d, e, f) => a.mo_type == f.Id) .WhereIF(!string.IsNullOrEmpty(moCode), (a, b, c, d, e) => a.mo_code.Contains(moCode)) + .WhereIF(!string.IsNullOrEmpty(remark), (a, b, c, d, e) => b.code.Contains(remark) || b.name.Contains(remark)) .WhereIF(!string.IsNullOrEmpty(combineMoCode), (a, b, c, d, e) => a.combine_mo_code.Contains(combineMoCode)) .WhereIF(!string.IsNullOrEmpty(moStatus), (a, b, c, d, e) => a.mo_status == moStatus) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index 4804d64b..85b3e82f 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -3282,6 +3282,7 @@ namespace Tnb.WarehouseMgr thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/generalin/save"; thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData); thirdWebapiRecord.create_time = DateTime.Now; + thirdWebapiRecord.remark = $"原材料转库单wms_material_transfer:{wmsMaterialTransfer.bill_code}"; await db.Insertable(thirdWebapiRecord).ExecuteCommandAsync(); } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs index 53d7b369..acc0503a 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs @@ -357,7 +357,7 @@ namespace Tnb.WarehouseMgr erpRequestDataDetails.Add(new Dictionary() { ["cbodytranstypecode"] = "4Y-01", - ["cbodywarehouseid"] = wmsRawmatTransferoutstockD.warehouse_instock_code, + ["cbodywarehouseid"] = wmsErpWarehouserelaHs.Find(x=>x.erp_warehousecode==wmsRawmatTransferoutstockD.erp_wh_type)?.erp_warehouseid ?? "", ["cmaterialoid"] = erpExtendFields.Find(x => x.table_id == item.material_id)?.cmaterialoid ?? "", ["cmaterialvid"] = erpExtendFields.Find(x => x.table_id == item.material_id)?.cmaterialvid ?? "", ["corpoid"] = erpOrg.corpoid, @@ -394,6 +394,7 @@ namespace Tnb.WarehouseMgr thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/transIn/save"; thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData); thirdWebapiRecord.create_time = DateTime.Now; + thirdWebapiRecord.remark = $"原材料调拨出库wms_rawmat_transferoutstock_h:{wmsRawmatTransferoutstockH.bill_code}"; await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync(); break; @@ -492,6 +493,7 @@ namespace Tnb.WarehouseMgr thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/generalout/save"; thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData); thirdWebapiRecord.create_time = DateTime.Now; + thirdWebapiRecord.remark = $"原材料转库单wms_material_transfer:{wmsMaterialTransfer.bill_code}"; await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync(); Logger.LogInformation("【WmsMaterialTransferService ModifyAsync】同步其它出库单到erp成功");