| | |
| | | using LogLibrary.Log; |
| | | using MailKit; |
| | | using MailKit.Net.Smtp; |
| | | using MailKit.Search; |
| | | using Microsoft.AspNetCore.Http; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
| | | using Org.BouncyCastle.Asn1.X509; |
| | | using Org.BouncyCastle.Bcpg; |
| | | using SixLabors.ImageSharp; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Reflection.Metadata; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.AllocateEnum; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.Helper; |
| | |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO.Allocate; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Mes; |
| | | using WIDESEA_DTO.ReturnMES; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Basic; |
| | | using WIDESEA_Model.Models.Check; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | |
| | | private IStockService _stockService; |
| | | private readonly IRepository<Dt_AllocateMaterialInfo> _allocateMaterialInfo; |
| | | private readonly HttpClientHelper _httpClientHelper; |
| | | public InboundService(IUnitOfWorkManage unitOfWorkManage, IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_LocationType> locationTypeRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IStockService stockService, IRepository<Dt_Task> taskRepository,IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfo, HttpClientHelper httpClientHelper) |
| | | private readonly IRepository<Dt_MesReturnRecord> _mesReturnRecord; |
| | | private readonly ILocationInfoService _locationInfoService; |
| | | private readonly IRepository<Dt_TakeStockOrder> _takeStockOrder; |
| | | private readonly IRepository<Dt_StockInfoDetail> _stockInfoDetailRepository; |
| | | private readonly IRepository<Dt_AllocateOrder> _allocateOrderRepository; |
| | | public InboundService(IUnitOfWorkManage unitOfWorkManage, IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_LocationType> locationTypeRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IStockService stockService, IRepository<Dt_Task> taskRepository,IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfo, HttpClientHelper httpClientHelper, IRepository<Dt_MesReturnRecord> mesReturnRecord,ILocationInfoService locationInfoService,IRepository<Dt_TakeStockOrder> takeStockOrder,IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRepository<Dt_AllocateOrder> allocateOrderRepository) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | InboundOrderDetailService = inboundOrderDetailService; |
| | |
| | | _taskRepository = taskRepository; |
| | | _allocateMaterialInfo = allocateMaterialInfo; |
| | | _httpClientHelper = httpClientHelper; |
| | | _mesReturnRecord = mesReturnRecord; |
| | | _locationInfoService = locationInfoService; |
| | | _takeStockOrder = takeStockOrder; |
| | | _stockInfoDetailRepository = stockInfoDetailRepository; |
| | | _allocateOrderRepository = allocateOrderRepository; |
| | | } |
| | | |
| | | public async Task<WebResponseContent> GroupPallet(GroupPalletDto palletDto) |
| | | public async Task<WebResponseContent> |
| | | GroupPallet(GroupPalletDto palletDto) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | |
| | | } |
| | | |
| | | Dt_InboundOrder inboundOrder = new Dt_InboundOrder(); |
| | | |
| | | var details = _inboundOrderDetailRepository.QueryData(x => (x.OutBoxbarcodes == palletDto.Barcode|| x.Barcode == palletDto.Barcode) && x.OrderDetailStatus == (int)InOrderStatusEnum.æªå¼å§); |
| | | |
| | | |
| | | if (details.Count() <= 0) |
| | | { |
| | | return content.Error("æªæ¾å°è¯¥æ¡ç åæ®ä¿¡æ¯è¯·ç¡®è®¤æ¯å¦å·²ç»ç»ç宿"); |
| | | |
| | | var inbounddetail = _inboundOrderDetailRepository.QueryFirst(x => x.Barcode == palletDto.Barcode || x.OutBoxbarcodes == palletDto.Barcode); |
| | | if (inbounddetail == null) |
| | | { |
| | | return content.Error($"æ¡ç {palletDto.Barcode}ä¸åå¨"); |
| | | } |
| | | var inbound = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.Id == inbounddetail.OrderId).First(); |
| | | if (inbound == null) |
| | | { |
| | | return content.Error("åæ®ä¸è½ä¸ºç©º"); |
| | | } |
| | | |
| | | var detail = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().LeftJoin<Dt_InboundOrder>((d, o) => d.OrderId == o.Id).Where((d, o) => d.OrderId == inbound.Id |
| | | && d.ReceiptQuantity != 0 |
| | | && d.OverInQuantity == 0).Select((d, o) => new |
| | | { |
| | | orderNo = o.InboundOrderNo, |
| | | d.Barcode, |
| | | d.MaterielCode, |
| | | d.BatchNo, |
| | | d.ReceiptQuantity, |
| | | d.Unit, |
| | | d.SupplyCode, |
| | | d.WarehouseCode |
| | | }).ToList(); |
| | | var palletId = _stockInfoDetailRepository.QueryFirst(x => x.Barcode == palletDto.Barcode); |
| | | if (palletId == null) |
| | | { |
| | | return content.Error($"æ¡ç {palletDto.Barcode}å·²ç»ç"); |
| | | } |
| | | var pallet = _stockInfoRepository.QueryFirst(x => x.Id == palletId.StockId); |
| | | return content.Error($"æ¡ç {palletDto.Barcode}å·²ç»ç»å°{pallet.PalletCode}", detail); |
| | | } |
| | | inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Includes(x=>x.Details).Where(x => x.Id == details.First().OrderId).First(); |
| | | |
| | |
| | | { |
| | | return content.Error("æªæ¾å°è¯¥æ¡ç 主åä¿¡æ¯"); |
| | | } |
| | | if(inboundOrder.OrderStatus == (int)InOrderStatusEnum.æå¨å
³é) |
| | | { |
| | | return content.Error("è¯¥åæ®çç¶æä¸è½ç»ç"); |
| | | } |
| | | var warehouse =_warehouseAreaRepository.QueryFirst(x => x.Code == palletDto.WarehouseType); |
| | | if(inboundOrder.BusinessType=="11" && inboundOrder.FactoryArea != warehouse.FactoryArea) |
| | | { |
| | | return content.Error($"å½åååºä¸ä¸è´"); |
| | | } |
| | | |
| | | if(inboundOrder.BusinessType != "11") |
| | | { |
| | | var warehouseType = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => (x.Barcode == palletDto.Barcode || x.OutBoxbarcodes == palletDto.Barcode)&& x.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt()).Select(x => x.WarehouseCode).First(); |
| | | |
| | | if (string.IsNullOrEmpty(warehouseType)) |
| | | { |
| | | return content.Error($"æªæ¥è¯¢å°æ¡ç [{palletDto.Barcode}]对åºçä»åºä¿¡æ¯ï¼ä¸å
许ç»ç"); |
| | | } |
| | | |
| | | if (!warehouseType.Equals(palletDto.WarehouseType)) |
| | | { |
| | | return content.Error($"该æ¡ç æå±ä»åºä¸º{warehouseType}ä¸å½åä»åº{palletDto.WarehouseType}ä¸ä¸è´ï¼ä¸å
许ç»ç"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | Dt_StockInfo? stockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.PalletCode == palletDto.PalletCode).FirstAsync(); |
| | | |
| | | List<string?> materielCodes = details.GroupBy(x => x.Barcode).Select(x => x.Key).ToList(); |
| | |
| | | stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = Convert.ToInt32(palletDto.locationType) }; |
| | | stockInfo.Details = new List<Dt_StockInfoDetail>(); |
| | | } |
| | | //else |
| | | //{ |
| | | // var allowStatus = new[] |
| | | // { |
| | | // (int)StockStatusEmun.ç»çæå, |
| | | // (int)StockStatusEmun.æºä»å
¥æºä»ç»çæå, |
| | | // (int)StockStatusEmun.æå¨ç»çæå |
| | | // }; |
| | | |
| | | if (stockInfo != null && stockInfo.Details.Count>0 && stockInfo.Details.FirstOrDefault()?.WarehouseCode != palletDto.WarehouseType) |
| | | // if (!allowStatus.Contains(stockInfo.StockStatus)) |
| | | // { |
| | | // return content.Error($"该æç{stockInfo.PalletCode}ç¶æä¸å
许ç»ç"); |
| | | // } |
| | | //} |
| | | |
| | | if (inboundOrder.BusinessType != MESDocumentType.PurchaseInbound.ToString() && stockInfo != null && stockInfo.Details.Count > 0 && stockInfo.Details.FirstOrDefault()?.WarehouseCode != palletDto.WarehouseType) |
| | | { |
| | | return content.Error($"该æçç»çä»åºä¸º{stockInfo.Details.FirstOrDefault()?.WarehouseCode}ä¸å½åä»åº{palletDto.WarehouseType}ä¸ä¸è´ï¼ä¸å
许ç»ç"); |
| | | } |
| | | var isWarehouse = _inboundOrderDetailRepository.QueryFirst(x => x.OrderId == inboundOrder.Id && !string.IsNullOrEmpty(x.WarehouseCode)); |
| | | if (isWarehouse != null && inboundOrder.BusinessType == "11" && isWarehouse.WarehouseCode != palletDto.WarehouseType) |
| | | { |
| | | return content.Error($"ä¸ä¸ªéè´åæ®éé¢ä¸å
许ç»ç两个ä»åºï¼è¯·éæ°éæ©ä»åºï¼ä¸ä¸ä¸ªç»çä»åºä¸º{isWarehouse.WarehouseCode}"); |
| | | } |
| | | |
| | | if (inboundOrder.BusinessType == "11" && inboundOrder.IsTestMaterials == 1 && palletDto.WarehouseType != "1076" && palletDto.WarehouseType != "5057") |
| | | { |
| | | return content.Error($"è¯¥åæ®ä¸ºè¯äº§ç©æï¼éè¦å
¥åºå°è¯äº§ä»ï¼è¯·éæ°æ ¹æ®ååºéæ©è¯äº§ä»åºè¿è¡ç»çå
¥åº"); |
| | | } |
| | | if (inboundOrder.IsTestMaterials == 0 && (palletDto.WarehouseType == "1076" || palletDto.WarehouseType == "5057")) |
| | | { |
| | | return content.Error($"è¯¥åæ®ä¸ºéè¯äº§ç©æï¼ä¸è½å
¥å°è¯äº§ä»ï¼è¯·éæ°æ ¹æ®ä»åºè¿è¡ç»çå
¥åº"); |
| | | } |
| | | if (!_locationInfoService.QueryLocationCount(Convert.ToInt32(palletDto.locationType))) |
| | | { |
| | | return content.Error($"该åºåº{palletDto.locationType}ä¸åå¨ç©ºé²åºä½"); |
| | | } |
| | | |
| | | var nullpallet =_stockInfoRepository.QueryFirst(x => x.PalletType == -1 && x.PalletCode == palletDto.PalletCode); |
| | | if (nullpallet != null) |
| | | { |
| | | return content.Error($"该æç{palletDto.PalletCode}å·²ç»è¿è¡ç©ºæç»ç,ä¸è½å¨è¿è¡ç»ç"); |
| | | } |
| | | var outbundPallet = _stockInfoRepository.QueryFirst(x => x.StockStatus == (int)StockStatusEmun.åºåºå®æ && x.PalletCode == palletDto.PalletCode); |
| | | if (outbundPallet != null) |
| | | { |
| | | return content.Error($"该æç{palletDto.PalletCode}æªè¿è¡å空箱,ä¸è½è¿è¡ç»ç"); |
| | | } |
| | | |
| | | foreach (var item in details) |
| | | { |
| | | var datevaliDate = _inboundOrderRepository.Db.Queryable<Dt_MaterialExpirationDate>().Where(x => x.MaterialCode.Contains(item.MaterielCode.Substring(0, 6))).First(); |
| | | if (datevaliDate == null) |
| | | { |
| | | return content.Error($"è¯¥ç©æ{item.MaterielCode}æªæ¾å°MESæ¨éçææææ°æ®ï¼è¯·å
æ·»å è¯¥ç©æçæææåç»çå
¥åº"); |
| | | } |
| | | stockInfo.Details.Add(new Dt_StockInfoDetail |
| | | { |
| | | StockId = stockInfo == null ? 0 : stockInfo.Id, |
| | | Barcode = item.Barcode, |
| | | MaterielCode = item.MaterielCode, |
| | | MaterielName = item.MaterielName, |
| | | BatchNo = item.BatchNo, |
| | | Unit = item.Unit, |
| | | InboundOrderRowNo = item.lineNo, |
| | |
| | | Status = 0, |
| | | OrderNo = inboundOrder.InboundOrderNo, |
| | | BusinessType = inboundOrder.BusinessType, |
| | | |
| | | ValidDate = inboundOrder.BusinessType == BusinessTypeEnum.å¤é¨ä»åºè°æºä».ToString() ? item.ValidDate : datevaliDate == null ? null : Convert.ToDateTime(DateTime.Now).AddDays(Convert.ToDouble(datevaliDate.ValidityDays)), |
| | | }); |
| | | |
| | | item.ReceiptQuantity = item.BarcodeQty; |
| | |
| | | { |
| | | return content.Error("已䏿¶çæçä¸è½å次ç»ç"); |
| | | } |
| | | |
| | | var nullpallet = _stockInfoRepository.QueryFirst(x => x.PalletType == -1 && x.PalletCode == palletDto.PalletCode); |
| | | if (nullpallet != null) |
| | | { |
| | | return content.Error($"该æç{palletDto.PalletCode}å·²ç»è¿è¡ç©ºæç»ç,ä¸è½å¨è¿è¡ç»ç"); |
| | | } |
| | | var outbundPallet = _stockInfoRepository.QueryFirst(x => x.StockStatus == (int)StockStatusEmun.åºåºå®æ && x.PalletCode == palletDto.PalletCode); |
| | | if (outbundPallet != null) |
| | | { |
| | | return content.Error($"该æç{palletDto.PalletCode}æªè¿è¡å空箱,ä¸è½è¿è¡ç»ç"); |
| | | } |
| | | if (_stockService.StockInfoDetailService.ExistBarcodes(palletDto.Barcode)) |
| | | { |
| | | return content.Error($"{palletDto.Barcode} æ¡ç å¨åºåä¸å·²åå¨"); |
| | |
| | | { |
| | | return content.Error($"æªæ¾å°è¯¥æ¡ç {palletDto.Barcode}éè°å
¥æºä»çä¿¡æ¯"); |
| | | } |
| | | |
| | | if(allocateMaterialInfo.WarehouseCode != palletDto.WarehouseType) |
| | | { |
| | | return content.Error($"该æ¡ç è°å
¥ä»åºä¸º{allocateMaterialInfo.WarehouseCode},ä¸éæ©ç{palletDto.WarehouseType}ä»åºä¸ä¸è´"); |
| | | } |
| | | stockInfo.Details.Add(new Dt_StockInfoDetail |
| | | { |
| | | StockId = stockInfo == null ? 0 : stockInfo.Id, |
| | |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent BatchInOrderFeedbackToMes(string OrderNo) |
| | | public WebResponseContent BatchInOrderFeedbackToMes(int id) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>() |
| | | .Where(x => x.InboundOrderNo == OrderNo) |
| | | Dt_InboundOrder inboundOrder = null; |
| | | var allocateOrder = _allocateOrderRepository.Db.Queryable<Dt_AllocateOrder>().Where(x => x.Id == id).First(); |
| | | if (allocateOrder != null) |
| | | { |
| | | inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == allocateOrder.OrderNo).First(); |
| | | if (inboundOrder.IsBatch == 0 && inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | return content = WebResponseContent.Instance.OK($"è¯¥åæ®å±äºä¸åæ¹èªå¨åä¼ ï¼ä¸å¯æå¨åæ¹åä¼ "); |
| | | } |
| | | }else |
| | | { |
| | | inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>() |
| | | .Where(x => x.Id == id) |
| | | .First(); |
| | | if (inboundOrder.IsBatch == 0 && inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | return content = WebResponseContent.Instance.OK($"è¯¥åæ®å±äºä¸åæ¹èªå¨åä¼ ï¼ä¸å¯æå¨åæ¹åä¼ "); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | List<Dt_MesReturnRecord> returnRecords = _mesReturnRecord.QueryData(x => x.OrderNo == inboundOrder.InboundOrderNo && x.OrderId == inboundOrder.Id && x.ReturnStatus == 2); |
| | | foreach (var item in returnRecords) |
| | | { |
| | | HttpResponseResult<MesResponseDTO> httpResponse = _httpClientHelper.Post<MesResponseDTO>(item.ApiUrl, item.RequestData); |
| | | item.ReturnCount += 1; |
| | | bool success = httpResponse.IsSuccess && httpResponse.Data.Code == "200"; |
| | | item.ReturnStatus = success ? 1 : 2; |
| | | item.HttpStatusCode = httpResponse.StatusCode.ObjToInt(); |
| | | item.LastReturnTime = DateTime.Now; |
| | | item.ResponseData = httpResponse.Content; |
| | | item.SuccessTime = httpResponse.IsSuccess ? DateTime.Now : null; |
| | | |
| | | //List<Dt_InboundOrderDetail> details=new List<Dt_InboundOrderDetail>(); |
| | | //foreach (var y in item.DetailsId.Split(',')) |
| | | //{ |
| | | // details.Add( _inboundOrderDetailRepository.QueryFirst(x => x.Id == Convert.ToInt32(y))); |
| | | //} |
| | | } |
| | | _mesReturnRecord.UpdateData(returnRecords); |
| | | //éæ°åè°å®æçåæ®ï¼æ´æ°åºåç¶æ |
| | | foreach (var returnRecord in returnRecords) |
| | | { |
| | | if (returnRecord.ReturnStatus == 1) |
| | | { |
| | | _stockInfoRepository.Db.Updateable<Dt_StockInfoDetail>().SetColumns(it => new Dt_StockInfoDetail |
| | | { |
| | | Status = StockStatusEmun.å
¥åºå®æ.ObjToInt() |
| | | }).Where(it => it.OrderNo == returnRecord.OrderNo && returnRecord.RequestData.Contains(it.Barcode)).ExecuteCommand(); |
| | | } |
| | | } |
| | | |
| | | var inboundOrderDetail = _inboundOrderRepository.Db.Queryable<Dt_InboundOrderDetail>() |
| | | .Where(x => x.OrderId == inboundOrder.Id && x.OrderDetailStatus==(int)OrderDetailStatusEnum.Over && x.ReturnToMESStatus == 0) |
| | | .Where(x => x.OrderId == inboundOrder.Id && x.OrderDetailStatus == (int)OrderDetailStatusEnum.Over && x.ReturnToMESStatus == 0) |
| | | .ToList(); |
| | | |
| | | var stocks = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == 6) |
| | | .Where(it => SqlFunc.Subqueryable<Dt_StockInfoDetail>().Where(s => s.StockId == it.Id && s.OrderNo == OrderNo).Any()) |
| | | var stocks = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == (int)StockStatusEmun.å
¥åºå®æ) |
| | | .Where(it => SqlFunc.Subqueryable<Dt_StockInfoDetail>().Where(s => s.StockId == it.Id && s.OrderNo == inboundOrder.InboundOrderNo && s.Status == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt()).Any()) |
| | | .ToList(); |
| | | |
| | | var stockIds = stocks.Select(s => s.Id).ToList(); |
| | |
| | | inbound => inbound.Barcode, |
| | | stockdetail => stockdetail.Barcode, |
| | | (inbound, stockdetail) => inbound.Id) |
| | | .ToList(); |
| | | |
| | | var inbounddetailBarcode = inboundOrderDetail |
| | | .Join(allDetailsData, |
| | | inbound => inbound.Barcode, |
| | | stockdetail => stockdetail.Barcode, |
| | | (inbound, stockdetail) => stockdetail.Barcode) |
| | | .ToList(); |
| | | |
| | | var detail = allDetailsData.Where(x => matchedData.Contains(x.Barcode)).ToList(); |
| | |
| | | |
| | | if (allocatefeedmodel.Details.Count <= 0) |
| | | { |
| | | throw new Exception("æªæ¾å°éè¦åä¼ çæ°æ®"); |
| | | if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1)) |
| | | { |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 1; |
| | | } |
| | | else if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 3; |
| | | } |
| | | else |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 0; |
| | | } |
| | | } |
| | | else if (returnRecords.Count(x => x.ReturnStatus == 2) > 0) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 4; |
| | | } |
| | | else if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 2)) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 2; |
| | | } |
| | | _inboundOrderRepository.UpdateData(inboundOrder); |
| | | return WebResponseContent.Instance.OK($"è¯¥åæ®æ²¡æéè¦åä¼ æç»ï¼åä¼ {returnRecords.Count()}æ¡ï¼åä¼ æå{returnRecords.Count(x => x.ReturnStatus == 1)}æ¡ï¼åä¼ å¤±è´¥{returnRecords.Count(x => x.ReturnStatus == 2)}æ¡"); |
| | | } |
| | | |
| | | var response = responseModel(inboundOrder, 3,null, allocatefeedmodel); |
| | | var response = responseModel(inboundOrder, 3, null, allocatefeedmodel); |
| | | |
| | | if (response != null && response.IsSuccess) |
| | | if (response != null && response.IsSuccess && response.Data.Code == "200") |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | .Where(it => it.OrderId == inboundOrder.Id && inbounddetailID.Contains(it.Id)).ExecuteCommand(); |
| | | |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 3 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 0 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | |
| | | _stockInfoRepository.Db.Updateable<Dt_StockInfoDetail>().SetColumns(it => new Dt_StockInfoDetail |
| | | { |
| | | Status = StockStatusEmun.å
¥åºå®æ.ObjToInt() |
| | | }).Where(it => it.OrderNo == inboundOrder.InboundOrderNo && inbounddetailBarcode.Contains(it.Barcode)).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }) |
| | | .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand(); |
| | | |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 4 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 0 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | return content.Error("åä¼ MES失败"); |
| | | } |
| | | } |
| | | else |
| | |
| | | details = FeedbackInboundDetailsModelDto(detail) |
| | | }; |
| | | |
| | | if (feedmodel.details.Count<=0) |
| | | if (feedmodel.details.Count <= 0) |
| | | { |
| | | throw new Exception("æªæ¾å°éè¦åä¼ çæ°æ®"); |
| | | if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1)) |
| | | { |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 1; |
| | | } |
| | | else if(inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 3; |
| | | } |
| | | else |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 0; |
| | | } |
| | | } |
| | | else if (returnRecords.Count(x => x.ReturnStatus == 2) > 0) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 4; |
| | | } |
| | | else if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 2)) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 2; |
| | | } |
| | | _inboundOrderRepository.UpdateData(inboundOrder); |
| | | return WebResponseContent.Instance.OK($"è¯¥åæ®æ²¡æéè¦åä¼ æç»ï¼åä¼ {returnRecords.Count()}æ¡ï¼åä¼ æå{returnRecords.Count(x => x.ReturnStatus == 1)}æ¡ï¼åä¼ å¤±è´¥{returnRecords.Count(x => x.ReturnStatus == 2)}æ¡"); |
| | | } |
| | | var response = responseModel(inboundOrder, 3, feedmodel); |
| | | |
| | | if (response != null && response.IsSuccess) |
| | | if (response != null && response.IsSuccess && response.Data.Code == "200") |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand(); |
| | | |
| | | if(inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else if(inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 3}) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 0 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | |
| | | _stockInfoRepository.Db.Updateable<Dt_StockInfoDetail>().SetColumns(it => new Dt_StockInfoDetail |
| | | { |
| | | Status = StockStatusEmun.å
¥åºå®æ.ObjToInt() |
| | | }).Where(it => it.OrderNo == inboundOrder.InboundOrderNo && inbounddetailBarcode.Contains(it.Barcode)).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }) |
| | | .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand(); |
| | | |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 4 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 0 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | return content.Error("åä¼ MES失败"); |
| | | } |
| | | } |
| | |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | public List<AllocateDtoDetail> GetAllocateDtoDetails(List<Dt_StockInfoDetail> stockInfoDetails) |
| | | { |
| | |
| | | |
| | | return httpResponseResult; |
| | | } |
| | | |
| | | public async Task<WebResponseContent> StockTakeGroupPallet(GroupPalletDto palletDto) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | (bool, string, object?) result2 = ModelValidate.ValidateModelData(palletDto); |
| | | if (!result2.Item1) return content.Error(result2.Item2); |
| | | |
| | | // éªè¯ä»åºç¼å·æ¯å¦åå¨ |
| | | var code = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>() |
| | | .Where(x => x.Code == palletDto.WarehouseType) |
| | | .Select(x => x.Code) |
| | | .First(); |
| | | if (string.IsNullOrEmpty(code)) |
| | | { |
| | | return content.Error($"ä»åºä¸æ²¡æè¯¥{palletDto.WarehouseType}ç¼å·ã"); |
| | | } |
| | | |
| | | // æ¥è¯¢å½åæççåºåä¿¡æ¯ |
| | | Dt_StockInfo? stockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>() |
| | | .Includes(x => x.Details) |
| | | .Where(x => x.PalletCode == palletDto.PalletCode) |
| | | .FirstAsync(); |
| | | |
| | | // éªè¯æçæ¯å¦å·²çæä»»å¡ |
| | | if (_taskRepository.QueryFirst(x => x.PalletCode == palletDto.PalletCode) != null) |
| | | { |
| | | return content.Error($"该æçå·²çæä»»å¡"); |
| | | } |
| | | |
| | | // éªè¯æçæ¯å¦å·²ä¸æ¶ï¼å·²ä¸æ¶ä¸è½ç»çï¼ |
| | | if (stockInfo != null && !string.IsNullOrEmpty(stockInfo.LocationCode) && stockInfo.StockStatus != (int)StockStatusEmun.ç»çæå) |
| | | { |
| | | return content.Error("已䏿¶çæçä¸è½å次ç»ç"); |
| | | } |
| | | var nullpallet = _stockInfoRepository.QueryFirst(x => x.PalletType == -1 && x.PalletCode == palletDto.PalletCode); |
| | | if (nullpallet != null) |
| | | { |
| | | return content.Error($"该æç{palletDto.PalletCode}å·²ç»è¿è¡ç©ºæç»ç,ä¸è½å¨è¿è¡ç»ç"); |
| | | } |
| | | var outbundPallet = _stockInfoRepository.QueryFirst(x => x.StockStatus == (int)StockStatusEmun.åºåºå®æ && x.PalletCode == palletDto.PalletCode); |
| | | if (outbundPallet != null) |
| | | { |
| | | return content.Error($"该æç{palletDto.PalletCode}æªè¿è¡å空箱,ä¸è½è¿è¡ç»ç"); |
| | | } |
| | | Dt_StockInfoDetail stockInfoDetail = _stockService.StockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>() |
| | | .Where(x => x.Barcode == palletDto.Barcode && x.StockId == 0) |
| | | .First(); |
| | | if (stockInfoDetail == null) |
| | | { |
| | | return content.Error($"{palletDto.Barcode} æ¡ç å·²å
³èå
¶ä»æçï¼æ æ³ç»ç"); |
| | | } |
| | | |
| | | Dt_TakeStockOrder takeStockOrder = _takeStockOrder.Db.Queryable<Dt_TakeStockOrder>() |
| | | .Where(x => x.OrderNo == stockInfoDetail.OrderNo) |
| | | .First(); |
| | | if (takeStockOrder == null) |
| | | { |
| | | return content.Error($"{palletDto.Barcode} ä¸å±äºçç¹åæ®ä¸çæ¡ç ï¼ä¸å
许çäºç»ç"); |
| | | } |
| | | if (stockInfo == null) |
| | | { |
| | | stockInfo = new Dt_StockInfo() |
| | | { |
| | | PalletType = (int)PalletTypeEnum.None, |
| | | LocationType = Convert.ToInt32(palletDto.locationType), |
| | | PalletCode = palletDto.PalletCode, |
| | | StockStatus = (int)StockStatusEmun.ç»çæå, |
| | | Details = new List<Dt_StockInfoDetail>() |
| | | }; |
| | | } |
| | | |
| | | if (stockInfo.Details.Count > 0 && stockInfo.Details.FirstOrDefault()?.WarehouseCode != palletDto.WarehouseType) |
| | | { |
| | | return content.Error($"该æçç»çä»åºä¸º{stockInfo.Details.FirstOrDefault()?.WarehouseCode}ä¸å½åä»åº{palletDto.WarehouseType}ä¸ä¸è´ï¼ä¸å
许ç»ç"); |
| | | } |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | try |
| | | { |
| | | if (stockInfo.Id == 0) |
| | | { |
| | | int newStockId = await _stockInfoRepository.Db.Insertable(stockInfo).ExecuteReturnIdentityAsync(); |
| | | stockInfo.Id = newStockId; |
| | | } |
| | | |
| | | stockInfoDetail.StockId = stockInfo.Id; |
| | | |
| | | await _stockService.StockInfoDetailService.Db.Updateable(stockInfoDetail) |
| | | .Where(x => x.Id == stockInfoDetail.Id) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | if (stockInfo.Id != 0 && stockInfo.Details != null && !stockInfo.Details.Contains(stockInfoDetail)) |
| | | { |
| | | stockInfo.Details.Add(stockInfoDetail); |
| | | |
| | | await _stockInfoRepository.Db.Updateable(stockInfo) |
| | | .IgnoreColumns(x => x.Details) |
| | | .ExecuteCommandAsync(); |
| | | } |
| | | |
| | | // æäº¤äºå¡ |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | // äºå¡åæ» |
| | | _unitOfWorkManage.RollbackTran(); |
| | | throw; // æç»å¤å±catchå¤çæ¥å¿ |
| | | } |
| | | |
| | | // æ¥è¯¢ææ°çåºåä¿¡æ¯ï¼å
å«å
³èçæç»ï¼ |
| | | Dt_StockInfo? NewstockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>() |
| | | .Includes(x => x.Details) |
| | | .Where(x => x.PalletCode == palletDto.PalletCode) |
| | | .FirstAsync(); |
| | | |
| | | return WebResponseContent.Instance.OK(data: NewstockInfo.Details.OrderByDescending(x => x.Id)); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | LogFactory.GetLog($"ç»çä¿¡æ¯").Info(true, $"ãå¼å¸¸ãï¼ã{ex.Message}ã{Environment.NewLine}ã{ex.StackTrace}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | public async Task<WebResponseContent> ReCheckGroupPallet(GroupPalletDto palletDto) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | (bool, string, object?) result2 = ModelValidate.ValidateModelData(palletDto); |
| | | if (!result2.Item1) return content.Error(result2.Item2); |
| | | |
| | | var code = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>().Where(x => x.Code == palletDto.WarehouseType).Select(x => x.Code).First(); |
| | | if (string.IsNullOrEmpty(code)) |
| | | { |
| | | return content.Error($"ä»åºä¸æ²¡æè¯¥{palletDto.WarehouseType}ç¼å·ã"); |
| | | } |
| | | |
| | | Dt_StockInfo? stockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.PalletCode == palletDto.PalletCode).FirstAsync(); |
| | | |
| | | if (_taskRepository.QueryFirst(x => x.PalletCode == palletDto.PalletCode) != null) |
| | | { |
| | | return content.Error($"该æçå·²çæä»»å¡"); |
| | | } |
| | | if (stockInfo != null && !string.IsNullOrEmpty(stockInfo.LocationCode) && stockInfo.StockStatus != (int)StockStatusEmun.ç»çæå) |
| | | { |
| | | return content.Error("已䏿¶çæçä¸è½å次ç»ç"); |
| | | } |
| | | |
| | | if (stockInfo == null) |
| | | { |
| | | stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = Convert.ToInt32(palletDto.locationType) }; |
| | | stockInfo.Details = new List<Dt_StockInfoDetail>(); |
| | | } |
| | | |
| | | if (stockInfo != null && stockInfo.Details.Count > 0 && stockInfo.Details.FirstOrDefault()?.WarehouseCode != palletDto.WarehouseType) |
| | | { |
| | | return content.Error($"该æçç»çä»åºä¸º{stockInfo.Details.FirstOrDefault()?.WarehouseCode}ä¸å½åä»åº{palletDto.WarehouseType}ä¸ä¸è´ï¼ä¸å
许ç»ç"); |
| | | } |
| | | var nullpallet = _stockInfoRepository.QueryFirst(x => x.PalletType == -1 && x.PalletCode == palletDto.PalletCode); |
| | | if (nullpallet != null) |
| | | { |
| | | return content.Error($"该æç{palletDto.PalletCode}å·²ç»è¿è¡ç©ºæç»ç,ä¸è½å¨è¿è¡ç»ç"); |
| | | } |
| | | var outbundPallet = _stockInfoRepository.QueryFirst(x => x.StockStatus == (int)StockStatusEmun.åºåºå®æ && x.PalletCode == palletDto.PalletCode); |
| | | if (outbundPallet != null) |
| | | { |
| | | return content.Error($"该æç{palletDto.PalletCode}æªè¿è¡å空箱,ä¸è½è¿è¡ç»ç"); |
| | | } |
| | | Dt_StockInfoDetail stockInfoDetail = _stockInfoRepository.Db.Queryable<Dt_StockInfoDetail>().Where(x => x.Barcode == palletDto.Barcode && x.Status == StockStatusEmun.鿣ä¸.ObjToInt()).First(); |
| | | if(stockInfoDetail == null) |
| | | { |
| | | return content.Error("æªæ¾å°åºåä¸éæ£å»ç»çæ¡ç "); |
| | | } |
| | | Dt_ReCheckOrder reCheckOrder = _stockInfoRepository.Db.Queryable<Dt_ReCheckOrder>().Where(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.BatchNo == stockInfoDetail.BatchNo && x.OrderNo == stockInfoDetail.OrderNo && (x.Result == 1 || x.Result == 2 )).First(); |
| | | if(reCheckOrder == null) |
| | | { |
| | | return content.Error($"è¯¥éæ£æ¡ç çæ¹æ¬¡å¨éæ£å䏿ªæ¿å°éæ£ç»æï¼è¯·æ£æ¥éæ£åä¸ç©æ{stockInfoDetail.MaterielCode}å{stockInfoDetail.BatchNo}ç©ææ¹æ¬¡ç¶æ"); |
| | | } |
| | | |
| | | int newStatus = reCheckOrder.Result == 1 ? StockStatusEmun.å
¥åºå®æ.ObjToInt(): StockStatusEmun.æå¨å»ç».ObjToInt(); |
| | | |
| | | stockInfo.Details.Add(new Dt_StockInfoDetail |
| | | { |
| | | StockId = stockInfo == null ? 0 : stockInfo.Id, |
| | | Barcode = stockInfoDetail.Barcode, |
| | | MaterielCode = stockInfoDetail.MaterielCode, |
| | | MaterielName = stockInfoDetail.MaterielName, |
| | | BatchNo = stockInfoDetail.BatchNo, |
| | | Unit = stockInfoDetail.Unit, |
| | | SupplyCode = stockInfoDetail.SupplyCode, |
| | | WarehouseCode = stockInfoDetail.WarehouseCode, |
| | | StockQuantity = stockInfoDetail.StockQuantity, |
| | | BarcodeQty = stockInfoDetail.BarcodeQty, |
| | | BarcodeUnit = stockInfoDetail.BarcodeUnit, |
| | | FactoryArea = stockInfoDetail.FactoryArea, |
| | | Status = newStatus, |
| | | OrderNo = stockInfoDetail.OrderNo, |
| | | BusinessType = "30", |
| | | ValidDate = stockInfoDetail.ValidDate |
| | | }); |
| | | _stockInfoRepository.Db.Deleteable<Dt_StockInfoDetail>().Where(x => x.Barcode == stockInfoDetail.Barcode).ExecuteCommand(); |
| | | if (stockInfo.Id == 0) |
| | | { |
| | | stockInfo.PalletCode = palletDto.PalletCode; |
| | | stockInfo.StockStatus = (int)StockStatusEmun.鿣åºå宿; |
| | | } |
| | | stockInfo.PalletType = (int)PalletTypeEnum.None; |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockService.StockInfoService.AddMaterielGroup(stockInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | | |
| | | Dt_StockInfo oldStockInfo = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.Id == stockInfoDetail.StockId).Includes(x=>x.Details).First(); |
| | | if (oldStockInfo.Details.Count <= 0) |
| | | { |
| | | oldStockInfo.PalletType = (int)PalletTypeEnum.Empty; |
| | | } |
| | | _stockInfoRepository.UpdateData(oldStockInfo); |
| | | |
| | | Dt_StockInfo? NewstockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.PalletCode == palletDto.PalletCode).FirstAsync(); |
| | | |
| | | return WebResponseContent.Instance.OK(data: NewstockInfo.Details.OrderByDescending(x => x.Id)); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | LogFactory.GetLog($"ç»çä¿¡æ¯").Info(true, $"ãå¼å¸¸ãï¼ã{ex.Message}ã{Environment.NewLine}ã{ex.StackTrace}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |