| | |
| | | </span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-link |
| | | <!-- <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px" |
| | | @click="getData(false)" |
| | | >{{ kcname }}</el-link |
| | | > |
| | | > --> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | |
| | | @click="getData" |
| | | >å·æ°</el-link |
| | | > |
| | | <el-link |
| | | <!-- <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="revokeAssign" |
| | | >æ¤éåé
</el-link |
| | | > |
| | | > --> |
| | | </el-col> |
| | | </el-row> |
| | | </el-alert> |
| | |
| | | </el-table> |
| | | </div> |
| | | <template #footer> |
| | | <el-button type="primary" size="small" @click="outbound" |
| | | <!-- <el-button type="primary" size="small" @click="outbound" |
| | | >ç´æ¥åºåº</el-button |
| | | > |
| | | <el-button type="primary" size="small" @click="lockStock" |
| | | >éå®åºå</el-button |
| | | > |
| | | > --> |
| | | <el-button type="danger" size="small" @click="showDetialBox = false" |
| | | >å
³é</el-button |
| | | > |
| | |
| | | return this.$message.error("请å¾é"); |
| | | } |
| | | let url = this.pkcx |
| | | ? "api/Task/GeneratePKOutboundTask?orderDetailId=" |
| | | ? "api/Task/GenerateOutboundTask?orderDetailId=" |
| | | : "api/Task/GenerateOutboundTask?orderDetailId="; |
| | | this.http |
| | | .post(url + this.row.id, this.selection, "æ°æ®å¤çä¸") |
| | |
| | | getData(a) { |
| | | if (!a) this.pkcx = !this.pkcx; |
| | | let url = this.pkcx |
| | | ? "api/StockInfo/GetPKStockSelectViews?materielCode=" |
| | | ? "api/StockInfo/GetStockSelectViews?materielCode=" |
| | | : "api/StockInfo/GetStockSelectViews?materielCode="; |
| | | this.kcname = this.pkcx ? "ç«åºåºå" : "å¹³åºåºå"; |
| | | this.http |
| | |
| | | using Microsoft.Extensions.Logging; |
| | | using SqlSugar; |
| | | using SqlSugar.Extensions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.AllocateEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | |
| | | public IRepository<Dt_AllocateOrder> Repository => BaseDal; |
| | | |
| | | |
| | | public WebResponseContent ReceiveAllocateOrder(Dt_AllocateOrder allocateOrder, int operateType) |
| | | public async Task<WebResponseContent> ReceiveAllocateOrder(Dt_AllocateOrder allocateOrder, int operateType) |
| | | { |
| | | try |
| | | { |
| | | return operateType switch |
| | | { |
| | | 1 => AddAllocateOrder(allocateOrder), |
| | | 2 => UpdateAllocateOrder(allocateOrder), |
| | | 1 => await AddAllocateOrder(allocateOrder), |
| | | 2 => await UpdateAllocateOrder(allocateOrder), |
| | | 3 => DeleteAllocateOrder(allocateOrder), |
| | | |
| | | _ => WebResponseContent.Instance.OK(), |
| | |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent AddAllocateOrder(Dt_AllocateOrder allocateOrder) |
| | | public async Task<WebResponseContent> AddAllocateOrder(Dt_AllocateOrder allocateOrder) |
| | | { |
| | | try |
| | | { |
| | |
| | | Db.InsertNav(allocateOrder).Include(x => x.Details).ExecuteCommand(); |
| | | if (Enum.TryParse<BusinessTypeEnum>(allocateOrder.BusinessType, out var businessType)) |
| | | { |
| | | if (businessType == BusinessTypeEnum.å¤é¨ä»åºè°æºä») |
| | | if (businessType == BusinessTypeEnum.æºä»è°å¤é¨ä»åº) |
| | | { |
| | | var inboundOrders = ConvertToInboundOrders(allocateOrder); |
| | | _inboundService.InbounOrderService.ReceiveInboundOrder(inboundOrders, 1); |
| | | await _inboundService.InbounOrderService.ReceiveInboundOrder(inboundOrders, 1); |
| | | } |
| | | else if (businessType == BusinessTypeEnum.æºä»è°å¤é¨ä»åº) |
| | | else if (businessType == BusinessTypeEnum.å¤é¨ä»åºè°æºä») |
| | | { |
| | | var outboundOrders = ConvertToOutboundOrders(allocateOrder); |
| | | _outboundService.OutboundOrderService.ReceiveOutboundOrder(outboundOrders, 1); |
| | | await _outboundService.OutboundOrderService.ReceiveOutboundOrder(outboundOrders, 1); |
| | | } |
| | | else |
| | | { |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent UpdateAllocateOrder(Dt_AllocateOrder model) |
| | | public async Task<WebResponseContent> UpdateAllocateOrder(Dt_AllocateOrder model) |
| | | { |
| | | try |
| | | { |
| | |
| | | InboundOrderNo=allocateOrder.OrderNo, |
| | | UpperOrderNo=allocateOrder.UpperOrderNo, |
| | | SupplierId=allocateOrder.SupplierId, |
| | | OrderType=allocateOrder.OrderType, |
| | | OrderType=InOrderTypeEnum.Allocat.ObjToInt(), |
| | | OrderStatus=allocateOrder.OrderStatus, |
| | | CreateType=allocateOrder.CreateType, |
| | | BusinessType=allocateOrder.BusinessType, |
| | |
| | | OrderDetailStatus=detail.OrderDetailStatus, |
| | | Unit=detail.Unit, |
| | | RowNo=0, |
| | | SupplyCode="", |
| | | SupplyCode=detail.SupplyCode, |
| | | WarehouseCode=detail.WarehouseCode, |
| | | Barcode=detail.Barcode, |
| | | OutBoxbarcodes="", |
| | |
| | | WarehouseId = allocateOrder.WarehouseId, |
| | | OrderNo = allocateOrder.OrderNo, |
| | | UpperOrderNo = allocateOrder.UpperOrderNo, |
| | | OrderType = allocateOrder.OrderType, |
| | | OrderType = OutOrderTypeEnum.Allocate.ObjToInt(), |
| | | OrderStatus = allocateOrder.OrderStatus, |
| | | CreateType = allocateOrder.CreateType, |
| | | BusinessType = allocateOrder.BusinessType, |
| | |
| | | OrderDetailStatus = detail.OrderDetailStatus, |
| | | Unit = detail.Unit, |
| | | RowNo = 0, |
| | | SupplyCode = "", |
| | | SupplyCode = detail.SupplyCode, |
| | | WarehouseCode = detail.WarehouseCode, |
| | | |
| | | }).ToList() |
| | |
| | | [Description("è°æ¨å
¥åºå")] |
| | | Allocat = 115, |
| | | |
| | | [Description("鿣ååº")] |
| | | ReCheck =116, |
| | | |
| | | /// <summary> |
| | | /// éå®éè´§å |
| | | /// </summary> |
| | |
| | | [Description("è°æ¨åºåºå")] |
| | | Allocate = 215, |
| | | |
| | | |
| | | [Description("鿣åºåºå")] |
| | | ReCheck = 216, |
| | | |
| | | /// <summary> |
| | | /// éå®åºåºå |
| | | /// </summary> |
| | |
| | | [JsonProperty("batchNo")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [JsonProperty("supplyCode")] |
| | | public string SupplyCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ°é |
| | | /// </summary> |
| | |
| | | |
| | | public string MaterielName { get; set; } |
| | | |
| | | public float UseableQuantity { get; set; } |
| | | public decimal UseableQuantity { get; set; } |
| | | |
| | | public string PalletCode { get; set; } |
| | | |
| | |
| | | { |
| | | IRepository<Dt_AllocateOrder> Repository { get; } |
| | | |
| | | WebResponseContent ReceiveAllocateOrder(Dt_AllocateOrder allocateOrder, int operateType); |
| | | Task<WebResponseContent> ReceiveAllocateOrder(Dt_AllocateOrder allocateOrder, int operateType); |
| | | } |
| | | } |
| | |
| | | IRepository<Dt_OutStockLockInfo> Repository { get; } |
| | | |
| | | Task<List<Dt_OutStockLockInfo>> GetByOrderDetailId(int orderDetailId); |
| | | |
| | | List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum? outStockStatus); |
| | | Task<List<Dt_OutStockLockInfo>> GetByPalletCode(string palletCode, int? status = null); |
| | | |
| | | Task<LockInfoDetailDto> GetLockInfoDetail(int lockInfoId); |
| | |
| | | { |
| | | IRepository<Dt_OutboundOrder> Repository { get; } |
| | | |
| | | WebResponseContent ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType); |
| | | Task<WebResponseContent> ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType); |
| | | |
| | | Task<WebResponseContent> GetById(int id); |
| | | } |
| | |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockService |
| | |
| | | IRepository<Dt_StockInfo> Repository { get; } |
| | | Dt_StockInfo? GetStockByPalletCode(string palletCode); |
| | | |
| | | List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes); |
| | | List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, string supplyCode, List<string> locationCodes); |
| | | |
| | | List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo); |
| | | List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo,string supplyCode); |
| | | |
| | | void AddMaterielGroup(Dt_StockInfo stockInfo); |
| | | (List<Dt_StockInfo>, Dictionary<int, decimal>) GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, decimal needQuantity, out decimal residueQuantity); |
| | | |
| | | List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode); |
| | | } |
| | | } |
| | |
| | | inboundOrderDetail.BarcodeUnit = item.BarcodeUnit; |
| | | inboundOrderDetail.BarcodeQty = item.BarcodeQty; |
| | | inboundOrderDetail.OrderQuantity = item.OrderQuantity; |
| | | |
| | | var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync(item.MaterielCode, item.BarcodeQty); |
| | | inboundOrderDetail.Unit = purchaseToStockResult.Unit; |
| | | inboundOrderDetail.OrderQuantity = purchaseToStockResult.Quantity; |
| | | |
| | | updateInboundOrderDetails.Add(inboundOrderDetail); |
| | | detailIds.Add(inboundOrderDetail.Id); |
| | |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åä¼ MES |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä¼ MES")] |
| | | public int ReturnToMESStatus { get; set; } = 0; |
| | | |
| | | /// <summary> |
| | | /// è°æ¨åæç» |
| | | /// </summary> |
| | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¡å½¢ç ")] |
| | | public string Barcode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ä¾åºåç¼å· |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "supplyCode", ColumnDescription = "ä¾åºåç¼å·")] |
| | | public string? SupplyCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡å½¢ç æ°é |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 255, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä¼ MES |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä¼ MES")] |
| | | public int ReturnToMESStatus { get; set; } = 0; |
| | | } |
| | | } |
| | |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æä½è
")] |
| | | public string Operator { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä¼ MES |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä¼ MES")] |
| | | public int ReturnToMESStatus { get; set; } = 0; |
| | | /// <summary> |
| | | /// å
¥åºåæç» |
| | | /// </summary> |
| | |
| | | public string BarcodeUnit { get; set; } = null!; |
| | | |
| | | /// <summary> |
| | | /// åä¼ MES |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä¼ MES")] |
| | | public int ReturnToMESStatus { get; set; } = 0; |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æä½è
")] |
| | | public string Operator { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä¼ MES |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä¼ MES")] |
| | | public int ReturnToMESStatus { get; set; } = 0; |
| | | /// <summary> |
| | | /// åºåºåæç» |
| | | /// </summary> |
| | |
| | | public string? SupplyCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ°é |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "barcodeQty", ColumnDescription = "æ°é")] |
| | | public decimal BarcodeQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "barcodeUnit", ColumnDescription = "åä½")] |
| | | public string BarcodeUnit { get; set; } = null!; |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "barcodemoveQty", ColumnDescription = "æ°é")] |
| | | public decimal BarcodeMoveQty { get; set; } |
| | | /// <summary> |
| | | /// ä»åº |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "warehouseCode", ColumnDescription = "ä»åº")] |
| | | public string? WarehouseCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä¼ MES |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä¼ MES")] |
| | | public int ReturnToMESStatus { get; set; } = 0; |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum? outStockStatus) |
| | | { |
| | | return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && outStockStatus == null ? true : x.Status == outStockStatus.ObjToInt()); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | // æç©æåæ¹æ¬¡åç»å¤ç |
| | | var groupDetails = outboundOrderDetails |
| | | .GroupBy(x => new { x.MaterielCode, x.BatchNo }) |
| | | .GroupBy(x => new { x.MaterielCode, x.BatchNo ,x.SupplyCode}) |
| | | .Select(x => new |
| | | { |
| | | MaterielCode = x.Key.MaterielCode, |
| | | BatchNo = x.Key.BatchNo, |
| | | SupplyCode = x.Key.SupplyCode, |
| | | Details = x.ToList(), |
| | | TotalNeedQuantity = x.Sum(v => v.OrderQuantity - v.OverOutQuantity - v.LockQuantity-v.MoveQty) |
| | | }) |
| | |
| | | var needQuantity = item.TotalNeedQuantity; |
| | | |
| | | // è·åå¯ç¨åºåï¼æå
è¿å
åºæåºï¼ |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(item.MaterielCode, item.BatchNo); |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(item.MaterielCode, item.BatchNo,item.SupplyCode); |
| | | if (!stockInfos.Any()) |
| | | { |
| | | throw new Exception($"ç©æ[{item.MaterielCode}]æ¹æ¬¡[{item.BatchNo}]æªæ¾å°å¯åé
åºå"); |
| | |
| | | using WIDESEA_Core.DB; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Seed; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | |
| | | public IRepository<Dt_OutboundOrder> Repository => BaseDal; |
| | | private readonly ILogger<OutboundOrderService> _logger; |
| | | private readonly IRepository<Dt_OutboundOrderDetail> _outboundOrderDetailRepository; |
| | | |
| | | public OutboundOrderService(IRepository<Dt_OutboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> outboundOrderDetailRepository, ILogger<OutboundOrderService> logger) : base(BaseDal) |
| | | private readonly IMaterialUnitService _materialUnitService; |
| | | public OutboundOrderService(IRepository<Dt_OutboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> outboundOrderDetailRepository, ILogger<OutboundOrderService> logger, IMaterialUnitService materialUnitService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _outboundOrderDetailRepository = outboundOrderDetailRepository; |
| | | _logger = logger; |
| | | _materialUnitService = materialUnitService; |
| | | } |
| | | |
| | | public WebResponseContent ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType) |
| | | public async Task<WebResponseContent> ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType) |
| | | { |
| | | try |
| | | { |
| | | return operateType switch |
| | | { |
| | | 1 => AddOutboundOrder(model), |
| | | 2 => UpdateOutboundOrder(model), |
| | | 1 => await AddOutboundOrder(model), |
| | | 2 => await UpdateOutboundOrder(model), |
| | | 3 => DeleteOutboundOrder(model), |
| | | |
| | | _ => WebResponseContent.Instance.OK(), |
| | |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent AddOutboundOrder(Dt_OutboundOrder model) |
| | | public async Task<WebResponseContent> AddOutboundOrder(Dt_OutboundOrder model) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"åºåºåå·éå¤"); |
| | | } |
| | | foreach (var item in model.Details) |
| | | { |
| | | var issueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeQty); |
| | | item.Unit = issueoStockResult.Unit; |
| | | item.OrderQuantity = issueoStockResult.Quantity; |
| | | var moveissueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeMoveQty); |
| | | item.MoveQty = moveissueoStockResult.Quantity; |
| | | } |
| | | |
| | | |
| | | model.OrderNo = CreateCodeByRule(nameof(RuleCodeEnum.OutboundOrderRule)); |
| | | Db.InsertNav(model).Include(x => x.Details).ExecuteCommand(); |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent UpdateOutboundOrder(Dt_OutboundOrder model) |
| | | public async Task<WebResponseContent> UpdateOutboundOrder(Dt_OutboundOrder model) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åºåºåæç»ä¿¡æ¯"); |
| | | } |
| | | List<Dt_OutboundOrderDetail> inboundOrderDetails = new List<Dt_OutboundOrderDetail>(); |
| | | List<Dt_OutboundOrderDetail> updateInboundOrderDetails = new List<Dt_OutboundOrderDetail>(); |
| | | List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>(); |
| | | List<Dt_OutboundOrderDetail> updateoutboundOrderDetails = new List<Dt_OutboundOrderDetail>(); |
| | | List<int> detailIds = new List<int>(); |
| | | foreach (var item in model.Details) |
| | | { |
| | |
| | | BatchNo = item.BatchNo, |
| | | Unit = item.Unit, |
| | | WarehouseCode = item.WarehouseCode, |
| | | MoveQty=item.MoveQty, |
| | | OrderQuantity = item.OrderQuantity |
| | | MoveQty = item.MoveQty, |
| | | OrderQuantity = item.OrderQuantity, |
| | | BarcodeMoveQty = item.MoveQty, |
| | | BarcodeQty = item.OrderQuantity, |
| | | BarcodeUnit = item.Unit, |
| | | }; |
| | | inboundOrderDetails.Add(outboundOrderDetail); |
| | | var issueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeQty); |
| | | item.Unit = issueoStockResult.Unit; |
| | | item.OrderQuantity = issueoStockResult.Quantity; |
| | | var moveissueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeMoveQty); |
| | | item.MoveQty = moveissueoStockResult.Quantity; |
| | | |
| | | outboundOrderDetails.Add(outboundOrderDetail); |
| | | } |
| | | else |
| | | { |
| | |
| | | outboundOrderDetail.WarehouseCode = item.WarehouseCode; |
| | | outboundOrderDetail.MoveQty = item.MoveQty; |
| | | outboundOrderDetail.OrderQuantity = item.OrderQuantity; |
| | | outboundOrderDetail.BarcodeMoveQty = item.MoveQty; |
| | | outboundOrderDetail.BarcodeQty = item.OrderQuantity; |
| | | outboundOrderDetail.BarcodeUnit = item.Unit; |
| | | var issueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeQty); |
| | | outboundOrderDetail.Unit = issueoStockResult.Unit; |
| | | outboundOrderDetail.OrderQuantity = issueoStockResult.Quantity; |
| | | var moveissueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeMoveQty); |
| | | outboundOrderDetail.MoveQty = moveissueoStockResult.Quantity; |
| | | |
| | | updateInboundOrderDetails.Add(outboundOrderDetail); |
| | | |
| | | updateoutboundOrderDetails.Add(outboundOrderDetail); |
| | | detailIds.Add(outboundOrderDetail.Id); |
| | | } |
| | | } |
| | |
| | | _outboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.èªå¨å é¤); |
| | | } |
| | | |
| | | _outboundOrderDetailRepository.UpdateData(updateInboundOrderDetails); |
| | | _outboundOrderDetailRepository.AddData(inboundOrderDetails); |
| | | _outboundOrderDetailRepository.UpdateData(updateoutboundOrderDetails); |
| | | _outboundOrderDetailRepository.AddData(outboundOrderDetails); |
| | | |
| | | BaseDal.UpdateData(outboundOrder); |
| | | _unitOfWorkManage.CommitTran(); |
| | |
| | | { |
| | | try |
| | | { |
| | | var outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x => x.UpperOrderNo == model.UpperOrderNo).Includes(x => x.Details).First(); |
| | | var outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x => x.UpperOrderNo == model.UpperOrderNo).Includes(x => x.Details).First(); |
| | | if (outboundOrder == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åºåºåä¿¡æ¯"); |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åºåºåæç»ä¿¡æ¯"); |
| | | } |
| | | |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | //BaseDal.DeleteAndMoveIntoHty(outboundOrder, OperateTypeEnum.èªå¨å é¤); |
| | | foreach (var item in outboundOrder.Details) |
| | |
| | | /// </summary> |
| | | public async Task<WebResponseContent> GetById(int id) |
| | | { |
| | | var order = await Db.Queryable<Dt_OutboundOrder>().FirstAsync(o=>o.Id==id); |
| | | var order = await Db.Queryable<Dt_OutboundOrder>().FirstAsync(o => o.Id == id); |
| | | if (order == null) |
| | | { |
| | | return WebResponseContent.Instance.Error("æªæ¾å°åºåºåä¿¡æ¯"); |
| | |
| | | var outboundOrder = _stockInfoService.Db.Queryable<Dt_OutboundOrder>().First(x => x.OrderNo == orderNo); |
| | | |
| | | |
| | | if (outboundOrder != null && outboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | if (outboundOrder != null && outboundOrder.OrderStatus == OutOrderStatusEnum.åºåºå®æ.ObjToInt()) |
| | | { |
| | | var feedmodel = new FeedbackOutboundRequestModel |
| | | |
| | | if (outboundOrder.OrderType == OutOrderTypeEnum.Allocate.ObjToInt().ObjToInt())//è°æ¨åºåº |
| | | { |
| | | reqCode = Guid.NewGuid().ToString(), |
| | | reqTime = DateTime.Now.ToString(), |
| | | business_type = outboundOrder.BusinessType, |
| | | factoryArea = outboundOrder.FactoryArea, |
| | | operationType = 1, |
| | | Operator = outboundOrder.Operator, |
| | | orderNo = outboundOrder.UpperOrderNo, |
| | | status = outboundOrder.OrderStatus, |
| | | details = new List<FeedbackOutboundDetailsModel>() |
| | | |
| | | }; |
| | | var lists = _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>().Where(x => x.OrderNo == orderNo).ToList(); |
| | | } |
| | | else if (outboundOrder.OrderType == OutOrderTypeEnum.ReCheck.ObjToInt()) //鿣åºåº |
| | | { |
| | | |
| | | var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.lineNo, item.Unit, item.WarehouseCode }) |
| | | .Select(group => new FeedbackOutboundDetailsModel |
| | | { |
| | | materialCode = group.Key.MaterielCode, |
| | | lineNo = group.Key.lineNo, |
| | | warehouseCode = group.Key.WarehouseCode, |
| | | currentDeliveryQty = group.Sum(x => x.OrderQuantity), |
| | | // warehouseCode= "1072", |
| | | unit = group.Key.Unit, |
| | | barcodes = group.Select(row => new WIDESEA_DTO.Outbound.BarcodesModel |
| | | } |
| | | else |
| | | { |
| | | var feedmodel = new FeedbackOutboundRequestModel |
| | | { |
| | | reqCode = Guid.NewGuid().ToString(), |
| | | reqTime = DateTime.Now.ToString(), |
| | | business_type = outboundOrder.BusinessType, |
| | | factoryArea = outboundOrder.FactoryArea, |
| | | operationType = 1, |
| | | Operator = outboundOrder.Operator, |
| | | orderNo = outboundOrder.UpperOrderNo, |
| | | status = outboundOrder.OrderStatus, |
| | | details = new List<FeedbackOutboundDetailsModel>() |
| | | |
| | | }; |
| | | var lists = _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>().Where(x => x.OrderNo == orderNo).ToList(); |
| | | |
| | | var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.lineNo, item.Unit, item.WarehouseCode }) |
| | | .Select(group => new FeedbackOutboundDetailsModel |
| | | { |
| | | barcode = row.CurrentBarcode, |
| | | supplyCode = row.SupplyCode, |
| | | batchNo = row.BatchNo, |
| | | unit = row.Unit, |
| | | qty = row.AssignQuantity |
| | | }).ToList() |
| | | }).ToList(); |
| | | feedmodel.details = groupedData; |
| | | materialCode = group.Key.MaterielCode, |
| | | lineNo = group.Key.lineNo, |
| | | warehouseCode = group.Key.WarehouseCode, |
| | | currentDeliveryQty = group.Sum(x => x.OrderQuantity), |
| | | // warehouseCode= "1072", |
| | | unit = group.Key.Unit, |
| | | barcodes = group.Select(row => new WIDESEA_DTO.Outbound.BarcodesModel |
| | | { |
| | | barcode = row.CurrentBarcode, |
| | | supplyCode = row.SupplyCode, |
| | | batchNo = row.BatchNo, |
| | | unit = row.Unit, |
| | | qty = row.AssignQuantity |
| | | }).ToList() |
| | | }).ToList(); |
| | | feedmodel.details = groupedData; |
| | | |
| | | _invokeMESService.FeedbackOutbound(feedmodel); |
| | | _invokeMESService.FeedbackOutbound(feedmodel); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) { |
| | |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | private readonly IRecordService _recordService; |
| | | public IRepository<Dt_StockInfo> Repository => BaseDal; |
| | | private readonly IRepository<Dt_StockInfoDetail> _stockInfoDetailRepository; |
| | | |
| | | private readonly IOutboundOrderService _outboundOrderService; |
| | | private readonly ILocationInfoService _locationInfoService; |
| | | public StockInfoService(IRepository<Dt_StockInfo> BaseDal, IMapper mapper, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRecordService recordService, ILocationInfoService locationInfoService) : base(BaseDal) |
| | | public StockInfoService(IRepository<Dt_StockInfo> BaseDal, IMapper mapper, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRecordService recordService, ILocationInfoService locationInfoService, IOutboundOrderService outboundOrderService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _stockInfoDetailRepository = stockInfoDetailRepository; |
| | | _recordService = recordService; |
| | | _locationInfoService = locationInfoService; |
| | | _outboundOrderService = outboundOrderService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | return await query.OrderBy(x => x.ProductionDate).ToListAsync(); |
| | | } |
| | | public List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes) |
| | | public List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, string supplyCode, List<string> locationCodes) |
| | | { |
| | | var query = Db.Queryable<Dt_StockInfo>() |
| | | .Where(x => locationCodes.Contains(x.LocationCode) |
| | |
| | | query = query.Where(x => x.Details.Any(d => d.BatchNo == lotNo)); |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(supplyCode)) |
| | | { |
| | | query = query.Where(x => x.Details.Any(d => d.SupplyCode == supplyCode)); |
| | | } |
| | | |
| | | var stocks = query.ToList(); |
| | | |
| | | return stocks.OrderBy(x => x.Details.Where(d => d.MaterielCode == materielCode && |
| | | (string.IsNullOrEmpty(lotNo) || d.BatchNo == lotNo)).Min(d => d.ProductionDate)).ToList(); |
| | | return stocks.OrderBy(x => x.Details.Where(d => d.MaterielCode == materielCode && (string.IsNullOrEmpty(supplyCode) || d.SupplyCode == supplyCode) && |
| | | (string.IsNullOrEmpty(lotNo) || d.BatchNo == lotNo)).Min(d => d.CreateDate)).ToList(); |
| | | //ISugarQueryable<Dt_LocationInfo> sugarQueryable = Db.Queryable<Dt_LocationInfo>().Where(x => locationCodes.Contains(x.LocationCode)); |
| | | //ISugarQueryable<Dt_StockInfo> sugarQueryable1 = Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode)); |
| | | //return sugarQueryable.InnerJoin(sugarQueryable1, (a, b) => a.LocationCode == b.LocationCode).Select((a, b) => b).OrderBy(a => a.CreateDate).Includes(a => a.Details).ToList(); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo) |
| | | public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string supplyCode) |
| | | { |
| | | List<string> locationCodes = _locationInfoService.GetCanOutLocationCodes(); |
| | | |
| | | return GetStockInfos(materielCode, batchNo, locationCodes); |
| | | return GetStockInfos(materielCode, batchNo,supplyCode, locationCodes); |
| | | } |
| | | |
| | | public Dt_StockInfo GetPalletStockInfo(int locationType) |
| | |
| | | |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.LocationType == locationType && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || EnableStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | /// <param name="materielCode"></param> |
| | | /// <returns></returns> |
| | | public List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode) |
| | | { |
| | | try |
| | | { |
| | | Dt_OutboundOrder outboundOrder = _outboundOrderService.Repository.QueryFirst(x => x.Id == orderId); |
| | | if (outboundOrder == null) |
| | | { |
| | | throw new Exception($"æªæ¾å°åºåºåä¿¡æ¯"); |
| | | } |
| | | |
| | | List<string> locationCodes = _locationInfoService.GetCanOutLocationCodes(); |
| | | |
| | | return BaseDal.QueryTabs<Dt_StockInfo, Dt_StockInfoDetail, StockSelectViewDTO>((a, b) => a.Id == b.StockId, (a, b) => new StockSelectViewDTO |
| | | { |
| | | LocationCode = a.LocationCode, |
| | | MaterielCode = b.MaterielCode, |
| | | MaterielName = b.MaterielName, |
| | | PalletCode = a.PalletCode, |
| | | UseableQuantity = b.StockQuantity - b.OutboundQuantity |
| | | }, a => locationCodes.Contains(a.LocationCode), b => b.StockQuantity > b.OutboundQuantity && b.MaterielCode == materielCode, x => true).GroupBy(x => x.PalletCode).Select(x => new StockSelectViewDTO |
| | | { |
| | | LocationCode = x.FirstOrDefault()?.LocationCode ?? "", |
| | | MaterielCode = x.FirstOrDefault()?.MaterielCode ?? "", |
| | | MaterielName = x.FirstOrDefault()?.MaterielName ?? "", |
| | | PalletCode = x.Key, |
| | | UseableQuantity = x.Sum(x => x.UseableQuantity) |
| | | }).ToList(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IOutboundService\WIDESEA_IOutboundService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IRecordService\WIDESEA_IRecordService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IStockService\WIDESEA_IStockService.csproj" /> |
| | | </ItemGroup> |
| | |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent InboundTaskCompleted(Dt_Task task) |
| | | public async Task<WebResponseContent> InboundTaskCompleted(Dt_Task task) |
| | | { |
| | | decimal beforeQuantity = 0; |
| | | |
| | |
| | | { |
| | | foreach (var inboundOrder in inboundOrders) |
| | | { |
| | | if (inboundOrder != null && inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | if (inboundOrder.OrderType == InOrderTypeEnum.Allocat.ObjToInt())//è°æ¨å
¥åº |
| | | { |
| | | var feedmodel = new FeedbackInboundRequestModel |
| | | |
| | | } |
| | | else if (inboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()) //鿣å
¥åº |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (inboundOrder != null && inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | reqCode = Guid.NewGuid().ToString(), |
| | | reqTime = DateTime.Now.ToString(), |
| | | business_type = inboundOrder.BusinessType, |
| | | factoryArea = inboundOrder.FactoryArea, |
| | | operationType = 1, |
| | | Operator = inboundOrder.Operator, |
| | | orderNo = inboundOrder.UpperOrderNo, |
| | | status = inboundOrder.OrderStatus, |
| | | details = new List<FeedbackInboundDetailsModel>() |
| | | var feedmodel = new FeedbackInboundRequestModel |
| | | { |
| | | reqCode = Guid.NewGuid().ToString(), |
| | | reqTime = DateTime.Now.ToString(), |
| | | business_type = inboundOrder.BusinessType, |
| | | factoryArea = inboundOrder.FactoryArea, |
| | | operationType = 1, |
| | | Operator = inboundOrder.Operator, |
| | | orderNo = inboundOrder.UpperOrderNo, |
| | | status = inboundOrder.OrderStatus, |
| | | details = new List<FeedbackInboundDetailsModel>() |
| | | |
| | | }; |
| | | }; |
| | | |
| | | var groupedData = inboundOrder.Details.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.lineNo, item.BarcodeUnit, item.WarehouseCode }) |
| | | .Select(group => new FeedbackInboundDetailsModel |
| | | { |
| | | materialCode = group.Key.MaterielCode, |
| | | supplyCode = group.Key.SupplyCode, |
| | | batchNo = group.Key.BatchNo, |
| | | lineNo = group.Key.lineNo, |
| | | warehouseCode = group.Key.WarehouseCode, |
| | | qty=group.Sum(x=>x.BarcodeQty), |
| | | // warehouseCode= "1072", |
| | | unit = group.Key.BarcodeUnit, |
| | | barcodes = group.Select(row => new FeedbackBarcodesModel |
| | | var groupedData = inboundOrder.Details.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.lineNo, item.BarcodeUnit, item.WarehouseCode }) |
| | | .Select(group => new FeedbackInboundDetailsModel |
| | | { |
| | | barcode = row.Barcode, |
| | | qty = row.BarcodeQty |
| | | }).ToList() |
| | | }).ToList(); |
| | | feedmodel.details = groupedData; |
| | | materialCode = group.Key.MaterielCode, |
| | | supplyCode = group.Key.SupplyCode, |
| | | batchNo = group.Key.BatchNo, |
| | | lineNo = group.Key.lineNo, |
| | | warehouseCode = group.Key.WarehouseCode, |
| | | qty = group.Sum(x => x.BarcodeQty), |
| | | // warehouseCode= "1072", |
| | | unit = group.Key.BarcodeUnit, |
| | | barcodes = group.Select(row => new FeedbackBarcodesModel |
| | | { |
| | | barcode = row.Barcode, |
| | | qty = row.BarcodeQty |
| | | }).ToList() |
| | | }).ToList(); |
| | | feedmodel.details = groupedData; |
| | | |
| | | _invokeMESService.FeedbackInbound(feedmodel); |
| | | var result= await _invokeMESService.FeedbackInbound(feedmodel); |
| | | if (result != null && result.code == 200) |
| | | { |
| | | _inboundOrderService.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id== inboundOrder.Id).ExecuteCommand(); |
| | | _inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | var newTask = new Dt_Task() |
| | | { |
| | | { |
| | | CurrentAddress = stationCode, |
| | | Grade = 0, |
| | | NextAddress = stations.GetValueOrDefault(stationCode) ?? "", |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Data.Common; |
| | | using System.Diagnostics.Eventing.Reader; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | |
| | | } |
| | | |
| | | [HttpPost, Route("ReceiveAllocateOrder"), MethodParamsValidate, AllowAnonymous] |
| | | public WebResponseContent ReceiveAllocateOrder([FromBody] AllocateDto model) |
| | | public async Task<WebResponseContent> ReceiveAllocateOrder([FromBody] AllocateDto model) |
| | | { |
| | | Dt_AllocateOrder allocateOrder = new Dt_AllocateOrder |
| | | { |
| | |
| | | MaterielCode = detailDto.MaterialCode, |
| | | LineNo = detailDto.LineNo, |
| | | OrderQuantity = detailDto.Qty, |
| | | SupplyCode= barcodeDto.SupplyCode, |
| | | Unit = detailDto.Unit, |
| | | Barcode = barcodeDto.Barcode, |
| | | BatchNo = barcodeDto.BatchNo, |
| | |
| | | } |
| | | allocateOrder.Details.AddRange(allocateOrder.Details); |
| | | } |
| | | var content = Service.ReceiveAllocateOrder(allocateOrder, model.OperationType); |
| | | var content =await Service.ReceiveAllocateOrder(allocateOrder, model.OperationType); |
| | | |
| | | if (content.Status) return WebResponseContent.Instance.OK(200); |
| | | else return WebResponseContent.Instance.Error(content.Message); |
| | |
| | | { |
| | | } |
| | | |
| | | |
| | | [HttpGet("getOutStockLockInfo")] |
| | | public async Task<WebResponseContent> GetOutStockLockInfo(string orderDetailId) |
| | | |
| | | [HttpGet("getOutStockLockInfo")] |
| | | public async Task<WebResponseContent> GetOutStockLockInfo(string orderDetailId) |
| | | { |
| | | var list = await Service.GetByOrderDetailId(orderDetailId.ObjToInt()); |
| | | |
| | | return WebResponseContent.Instance.OK(null, list); |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("GetByOrderDetailId"), AllowAnonymous] |
| | | public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId) |
| | | { |
| | | return Service.GetByOrderDetailId(orderDetailId, null); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveOutBoundOrder"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent ReceiveOutBoundOrder([FromBody] OutboundRequestModel model) |
| | | public async Task<WebResponseContent> ReceiveOutBoundOrder([FromBody] OutboundRequestModel model) |
| | | { |
| | | _logger.LogInformation("OutboundOrderController ReceiveOutBoundOrder: " + JsonConvert.SerializeObject(model)); |
| | | Dt_OutboundOrder dt_OutboundOrder = new Dt_OutboundOrder() { Details = new List<Dt_OutboundOrderDetail>() }; |
| | |
| | | Unit = detailitem.unit, |
| | | WarehouseCode = detailitem.warehouseCode, |
| | | MoveQty = detailitem.moveQty, |
| | | BarcodeMoveQty=detailitem.moveQty, |
| | | BarcodeQty=detailitem.qty, |
| | | BarcodeUnit=detailitem.unit, |
| | | OrderQuantity = detailitem.qty |
| | | }; |
| | | dt_OutboundOrder.Details.Add(inboundOrderDetail); |
| | |
| | | dt_OutboundOrder.IsBatch = model.isBatch; |
| | | dt_OutboundOrder.FactoryArea = model.factoryArea; |
| | | |
| | | var content = Service.ReceiveOutboundOrder(dt_OutboundOrder, model.operationType); |
| | | var content =await Service.ReceiveOutboundOrder(dt_OutboundOrder, model.operationType); |
| | | |
| | | if (content.Status) return WebResponseContent.Instance.OK(200); |
| | | else return WebResponseContent.Instance.Error(content.Message); |
| | |
| | | public StockInfoController(IStockInfoService service) : base(service) |
| | | { |
| | | } |
| | | /// <summary> |
| | | /// æ¥è¯¢è®¢åç«åºåºåè§å¾ |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | /// <param name="materielCode"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("GetStockSelectViews")] |
| | | public List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode) |
| | | { |
| | | return Service.GetStockSelectViews(orderId, materielCode); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |