| | |
| | |  |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | { |
| | | return content.Error($"çæä»»å¡å¤±è´¥"); |
| | | } |
| | | tasks.ForEach(x => |
| | | { |
| | | x.Grade = 1; |
| | | }); |
| | | stockInfos.ForEach(x => |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | |
| | | } |
| | | if (outStockLockInfosMES != null && outStockLockInfosMES.Count() > 0) |
| | | { |
| | | Dt_AGVStationInfo aGVStationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x=>x.AGVStationCode==task.TargetAddress); |
| | | Dt_AGVStationInfo aGVStationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x=>x.AGVStationCode==task.TargetAddress || x.MESPointCode == task.TargetAddress); |
| | | MESDeliveryModel mESDeliveryModel = MESDeliveryUp(outStockLockInfosMES, aGVStationInfo.MESPointCode); |
| | | MESResponse response = _invokeMESService.MESDelivery(mESDeliveryModel).DeserializeObject<MESResponse>() ?? throw new Exception("æªè·åå°è¿åä¿¡æ¯"); |
| | | if (!response.Result) |
| | |
| | | taskType = outStockLockInfo.MachineName.ObjToInt() switch |
| | | { |
| | | (int)StationAreaEnum.äºæ¥¼çº¸è¢ => TaskTypeEnum.PaperYLOutZDGL, |
| | | (int)StationAreaEnum.äºæ¥¼æ 纺å¸è¢ => TaskTypeEnum.OutWFBGL, |
| | | (int)StationAreaEnum.䏿¥¼æ 纺æ·è => TaskTypeEnum.OutWFBLM, |
| | | (int)StationAreaEnum.䏿¥¼å°å· => TaskTypeEnum.PrintYLOutbound, |
| | | (int)StationAreaEnum.䏿¥¼åå => TaskTypeEnum.OutFenQie, |
| | | (int)StationAreaEnum.䏿¥¼çº¸å¼ æ·è => TaskTypeEnum.OutPaperLM, |
| | | _ => throw new Exception($"æªæ¾å°å å·¥ä¸å¿ä»»å¡ç±»ååé
") |
| | | }; |
| | | Dt_Task task = new() |
| | |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | //çæä»»å¡ãåºåçä¿¡æ¯ |
| | | (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutSGOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutSGTaskDataHandle(keys); |
| | | (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutSGOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?,string) result = OutSGTaskDataHandle(keys); |
| | | if (result.Item2 != null && result.Item2.Count > 0) |
| | | { |
| | | stockInfos.AddRange(result.Item2); |
| | |
| | | { |
| | | tasks.AddRange(result.Item1); |
| | | } |
| | | content.Message = result.Item6; |
| | | //å¤çåºåºæ°æ® |
| | | return GenerateOutboundTaskDataUpdate(tasks, stockInfos, outSGOrderDetails, outStockLockInfos, locationInfos); |
| | | return GenerateOutboundTaskDataUpdate(tasks, stockInfos, outSGOrderDetails, outStockLockInfos, locationInfos, result.Item6); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// <param name="stockSelectViews"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutSGOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) OutSGTaskDataHandle(int[] keys) |
| | | public (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutSGOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?,string) OutSGTaskDataHandle(int[] keys) |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_OutSGOrderDetail> outSGOrderDetails = _outboundRepository.OutSGOrderDetailRepository.QueryData(x => keys.Contains(x.Id)); |
| | |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | |
| | | //åé
åºå |
| | | (List<Dt_StockInfo>, List<Dt_OutSGOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutSGOrderDetailService.AssignStockOutbound(outSGOrderDetails); |
| | | (List<Dt_StockInfo>, List<Dt_OutSGOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>,string) result = _outboundService.OutSGOrderDetailService.AssignStockOutbound(outSGOrderDetails); |
| | | |
| | | //ä¿å缺æç¶æï¼æ 论æ¯å¦çæäºä»»å¡ |
| | | var shortageDetails = result.Item2.Where(x => x.OutSGOrderDetailStatus == OutOrderStatusEnum.缺æ.ObjToInt()).ToList(); |
| | | if (shortageDetails.Any()) |
| | | { |
| | | _outboundRepository.OutSGOrderDetailRepository.UpdateData(shortageDetails); |
| | | } |
| | | |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | //è·åä»»å¡ |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("æ åºå"); |
| | | //没æåºåï¼ä½å·²ç»å¨AssignStockOutboundæ¹æ³ä¸æ è®°äºç¼ºæç¶æï¼å¹¶ä¸å·²ç»ä¿å |
| | | orderDetails = result.Item2; |
| | | } |
| | | |
| | | return (tasks, stockInfos, orderDetails, outStockLockInfos, locationInfos); |
| | | return (tasks, stockInfos, orderDetails, outStockLockInfos, locationInfos, result.Item5); |
| | | } |
| | | /// <summary> |
| | | /// å¤çåºåºæ°æ® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutSGOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null) |
| | | public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutSGOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null, string message = "") |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | tasks.ForEach(x => |
| | | { |
| | | string orderNos = string.Join(",", outStockLockInfos.Where(t => t.PalletCode == x.PalletCode).Select(x => x.OrderNo).Distinct()); |
| | | List<Dt_OutStockLockInfo> outStockNos = outStockLockInfos.Where(t => t.PalletCode == x.PalletCode).ToList(); |
| | | List<int> outDetailIds = outStockNos.Select(t => t.OrderDetailId).ToList(); |
| | | int numberNo = outboundOrderDetails.Where(t => outDetailIds.Contains(t.Id)).OrderBy(x => x.Number).FirstOrDefault().Number; |
| | | string orderNos = string.Join(",", outStockNos.Select(t => t.OrderNo).Distinct()); |
| | | x.OrderNo = orderNos; |
| | | x.Grade = numberNo; |
| | | }); |
| | | } |
| | | BaseDal.AddData(tasks); |
| | |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | return WebResponseContent.Instance.OK(); |
| | | return WebResponseContent.Instance.OK(message); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | #region 颿é»è¾ |
| | | foreach (var item in stockInfos) |
| | | { |
| | | if (item.StockStatus==StockStatusEmun.åºåºå®æ.ObjToInt()) |
| | | if (item.StockStatus==StockStatusEmun.åºåºå®æ.ObjToInt() || item.StockStatus == StockStatusEmun.èåéææå.ObjToInt()) |
| | | { |
| | | item.StockLength = 0; |
| | | item.MaterielWeight = 0; |
| | | item.MaterielThickness = 0; |
| | | item.MaterielWide = 0; |
| | | item.StockOutLength = 0; |
| | | item.IsFull = WhetherEnum.True.ObjToInt(); |
| | | item.IsPick = WhetherEnum.True.ObjToInt(); |
| | | } |
| | | } |
| | | #endregion |
| | | List<Dt_OutLineView> outLineViewsDel = _outboundRepository.OutLineViewRepository.QueryData(x => stockInfos.Select(x=>x.PalletCode).Contains(x.PalletCode)); |
| | | //æ°æ®åºæä½ |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfos); |
| | | _outboundRepository.OutStockLockInfoRepository.UpdateData(outStockLockInfos); |
| | | _outboundRepository.OutSGOrderRepository.UpdateData(outSGOrders); |
| | | _outboundRepository.OutSGOrderDetailRepository.UpdateData(orderDetails); |
| | | _outboundRepository.OutLineViewRepository.DeleteData(outLineViewsDel); |
| | | _unitOfWorkManage.CommitTran(); |
| | | content.OK(ExistNoCodes.Count>0 ? string.Join(",", ExistNoCodes)+"èå坿£åºåä¸åå¨" : ""); |
| | | } |
| | |
| | | reseponse[i] = ints[i]; |
| | | } |
| | | content = CreateSGOutboundTasks(reseponse); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// å建éå®åºåº |
| | | /// </summary> |
| | | /// <param name="ids"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent CreateProDeliveryTasks(List<int> ids) |
| | | { |
| | | WebResponseContent content=new WebResponseContent(); |
| | | try |
| | | { |
| | | ////è·åéå®åºåºåæ® |
| | | //List<Dt_ProDeliveryOrder> deliveryOrders = BaseDal.Db.Queryable<Dt_ProDeliveryOrder>().Where(x=> ids.Contains(x.Id)).Includes(x=>x.Details).ToList(); |
| | | //Dt_ProDeliveryOrder? proDeliveryOrder = deliveryOrders.FirstOrDefault(x => x.ProDeliveryStatus != OutOrderStatusEnum.æªå¼å§.ObjToInt()); |
| | | //if (proDeliveryOrder != null) |
| | | //{ |
| | | // return content.Error($"åå·{proDeliveryOrder.DeliveryCode},订åç¶æ{(OutOrderStatusEnum)proDeliveryOrder.ProDeliveryStatus}"); |
| | | //} |
| | | //List<Dt_ProDeliveryOrderDetail> proDeliveryOrderDetails = deliveryOrders.SelectMany(x=>x.Details).ToList(); |
| | | //if (!proDeliveryOrderDetails.Any()) |
| | | //{ |
| | | // throw new Exception($"æªæ¾å°éåºåºçæç»ä¿¡æ¯"); |
| | | //} |
| | | //_unitOfWorkManage.BeginTran(); |
| | | //List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | //List<Dt_ProStockInfo>? stockInfos = null; |
| | | //List<Dt_ProDeliveryOrder>? Orders = null; |
| | | //List<Dt_ProDeliveryOrderDetail>? OrderDetails = null; |
| | | //List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | //List<Dt_LocationInfo>? locationInfos = null; |
| | | //{ |
| | | // //åé
åºå |
| | | // (List<Dt_ProStockInfo>, List<Dt_ProDeliveryOrder>, List<Dt_ProDeliveryOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.ProDeliveryOrderService.AssignProStockOutbound(deliveryOrders, proDeliveryOrderDetails); |
| | | // if (result.Item1 != null && result.Item1.Count > 0) |
| | | // { |
| | | // //åå»ºä»»å¡ |
| | | // tasks = GetTasks(result.Item1, result.Item3); |
| | | // result.Item3.ForEach(x => |
| | | // { |
| | | // x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | // }); |
| | | // stockInfos = result.Item1; |
| | | // Orders = result.Item2; |
| | | // outStockLockInfos = result.Item3; |
| | | // locationInfos = result.Item4; |
| | | // } |
| | | //} |
| | | //if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count > 0) |
| | | //{ |
| | | // BaseDal.AddData(tasks); |
| | | // stockInfos.ForEach(x => |
| | | // { |
| | | // x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | // }); |
| | | // WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | // if (!contentResponse.Status) |
| | | // { |
| | | // _unitOfWorkManage.RollbackTran(); |
| | | // return content.Error(contentResponse.Message); |
| | | // } |
| | | //} |
| | | //_unitOfWorkManage.CommitTran(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | _unitOfWorkManage.BeginTran(); |
| | | //æä½æ°æ®ï¼å¹¶åé
éæ±åºå |
| | | _outboundRepository.OutMESOrderRepository.AddData(AddoutMESOrders); |
| | | //List<Dt_OutMESOrder> mESOrders = _outboundRepository.OutMESOrderRepository.QueryData(x => AddoutMESOrders.Select(x => x.OutDetailId).Contains(x.OutDetailId)); |
| | | //{ |
| | | // List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | // List<Dt_ProStockInfo>? stockInfos = null; |
| | | // List<Dt_OutMESOrder>? Orders = null; |
| | | // List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | // List<Dt_LocationInfo>? locationInfos = null; |
| | | // { |
| | | // if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList().Count>0) |
| | | // { |
| | | // //åé
åºå |
| | | // (List<Dt_ProStockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignProStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList()); |
| | | // if (result.Item1 != null && result.Item1.Count > 0) |
| | | // { |
| | | // //åå»ºä»»å¡ |
| | | // tasks = GetTasks(result.Item1, result.Item3); |
| | | // result.Item3.ForEach(x => |
| | | // { |
| | | // x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | // }); |
| | | // stockInfos = result.Item1; |
| | | // Orders = result.Item2; |
| | | // outStockLockInfos = result.Item3; |
| | | // locationInfos = result.Item4; |
| | | // } |
| | | // } |
| | | // } |
| | | // if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count>0) |
| | | // { |
| | | // BaseDal.AddData(tasks); |
| | | // stockInfos.ForEach(x => |
| | | // { |
| | | // x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | // }); |
| | | // WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks); |
| | | List<Dt_OutMESOrder> mESOrders = _outboundRepository.OutMESOrderRepository.QueryData(x => AddoutMESOrders.Select(x => x.OutDetailId).Contains(x.OutDetailId)); |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_ProStockInfo>? stockInfos = null; |
| | | List<Dt_OutMESOrder>? Orders = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList().Count > 0) |
| | | { |
| | | //åé
åºå |
| | | (List<Dt_ProStockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignProStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList()); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | //åå»ºä»»å¡ |
| | | tasks = GetTasks(result.Item1, result.Item3); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | stockInfos = result.Item1; |
| | | Orders = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | } |
| | | } |
| | | } |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count > 0) |
| | | { |
| | | BaseDal.AddData(tasks); |
| | | stockInfos.ForEach(x => |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | }); |
| | | WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | // if (!contentResponse.Status) |
| | | // { |
| | | // _unitOfWorkManage.RollbackTran(); |
| | | // return content.Error(contentResponse.Message); |
| | | // } |
| | | // } |
| | | //} |
| | | //{ |
| | | // List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | // List<Dt_StockInfo>? stockInfos = null; |
| | | // List<Dt_OutMESOrder>? Orders = null; |
| | | // List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | // List<Dt_LocationInfo>? locationInfos = null; |
| | | // { |
| | | // if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList().Count > 0) |
| | | // { |
| | | // //åé
åºå |
| | | // (List<Dt_StockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList()); |
| | | // if (result.Item1 != null && result.Item1.Count > 0) |
| | | // { |
| | | // //åå»ºä»»å¡ |
| | | // tasks = GetTasks(result.Item1, result.Item3); |
| | | // result.Item3.ForEach(x => |
| | | // { |
| | | // x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | // }); |
| | | // stockInfos = result.Item1; |
| | | // Orders = result.Item2; |
| | | // outStockLockInfos = result.Item3; |
| | | // locationInfos = result.Item4; |
| | | // } |
| | | // } |
| | | // } |
| | | // if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count>0) |
| | | // { |
| | | // BaseDal.AddData(tasks); |
| | | // stockInfos.ForEach(x => |
| | | // { |
| | | // x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | // }); |
| | | // WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks); |
| | | // if (!contentResponse.Status) |
| | | // { |
| | | // _unitOfWorkManage.RollbackTran(); |
| | | // return content.Error(contentResponse.Message); |
| | | // } |
| | | // } |
| | | //} |
| | | if (!contentResponse.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content.Error(contentResponse.Message); |
| | | } |
| | | } |
| | | } |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_StockInfo>? stockInfos = null; |
| | | List<Dt_OutMESOrder>? Orders = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList().Count > 0) |
| | | { |
| | | //åé
åºå |
| | | (List<Dt_StockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList()); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | //åå»ºä»»å¡ |
| | | tasks = GetTasks(result.Item1, result.Item3); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | stockInfos = result.Item1; |
| | | Orders = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | } |
| | | } |
| | | } |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count > 0) |
| | | { |
| | | BaseDal.AddData(tasks); |
| | | stockInfos.ForEach(x => |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | }); |
| | | WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks); |
| | | if (!contentResponse.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content.Error(contentResponse.Message); |
| | | } |
| | | } |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content.OK(ErrorMsg.IsNullOrEmpty()? "æ¥æ¶æå" : $"ä¿¡æ¯ï¼{ErrorMsg}"); |
| | | } |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |