| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç«å°ä¿¡æ¯"); |
| | | } |
| | | |
| | | string responseStr = HttpHelper.Get($"http://127.0.0.1:9293/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}"); |
| | | string responseStr = HttpHelper.Get($"http://127.0.0.1:9283/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}"); |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | if (responseContent != null && responseContent.Status && responseContent.Data != null) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public string? RequestAssignLocation(int taskNum, string roadwayNo) |
| | | { |
| | | string responseStr = HttpHelper.Get($"http://127.0.0.1:9293/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}"); |
| | | string responseStr = HttpHelper.Get($"http://127.0.0.1:9283/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}"); |
| | | |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | if (responseContent != null && responseContent.Status && responseContent.Data != null) |
| | |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "åºå主é®", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 90, |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "purchaseType", data: [] }, |
| | | bind: { key: "", data: [{key:'S',value:"æ åå
¥åº"},{key:'V',value:"å¯å®è¡¥ç»å
¥åº"}] }, |
| | | }, |
| | | |
| | | { |
| | | field: "supplierCode", |
| | | title: "ä¾åºåç¼å·", |
| | |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åºç¼å·", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 200, |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "purchaseDetailStatus", |
| | |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "purchaseOrderStatus", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | services.AddSingleton(x => |
| | | { |
| | | WebSocketServer socketServer = new WebSocketServer(); |
| | | socketServer.ServerStart(9296); |
| | | socketServer.ServerStart(port); |
| | | return socketServer; |
| | | }); |
| | | } |
| | |
| | | /// æµè¯æ¶æ¹æ¬¡å· |
| | | /// </summary> |
| | | public string ToolCode { get; set; } |
| | | /// <summary> |
| | | /// æµè¯æ¶ç©æåç§° |
| | | /// </summary> |
| | | public string MaterialName { get; set; } |
| | | ///// <summary> |
| | | ///// æµè¯æ¶ç©æåç§° |
| | | ///// </summary> |
| | | //public string MaterialName { get; set; } |
| | | /// <summary> |
| | | /// åå§å¯¿å½ |
| | | /// </summary> |
| | |
| | | { |
| | | purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Receiving.ObjToInt(); |
| | | } |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty); //+ model.Quantity; |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty)+ model.Quantity; |
| | | if (purchaseOrder.OrderQuantity == sumQty) |
| | | { |
| | | purchaseOrder.PurchaseOrderStatus = PurchaseOrderStatusEnum.Received.ObjToInt(); |
| | |
| | | { |
| | | purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Received.ObjToInt(); |
| | | } |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty);// + model.Quantity; |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty) + model.Quantity; |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.AddData(receiveOrderDetail); |
| | | if (purchaseOrder.OrderQuantity == sumQty) |
| | |
| | | //å建å
¥åºå |
| | | CreateInboundOrder(orderId); |
| | | //æ¶è´§æ¨éè³ERP æµè¯æ³¨é |
| | | //_invokeERPService.InvokeMatReceiveApi(receiveModel); |
| | | _invokeERPService.InvokeMatReceiveApi(receiveModel); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(lotNo)) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode)).Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode && v.BatchNo == lotNo)).ToList(); |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode)).Includes(x => x.Details).Where(x => x.Details.OrderBy(x=>x.EffectiveDate).Any(v => v.MaterielCode == materielCode && v.BatchNo == lotNo)).ToList(); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | foreach (var model in stockInfo.Details) |
| | | { |
| | | TestSynStock(new TestToolSynInfo() { ToolCode = model.BatchNo,MaterialName=model.MaterielName ,Life = int.TryParse(model.Remark, out int val) ? val : 1000 }); |
| | | TestSynStock(new TestToolSynInfo() { ToolCode = model.BatchNo,Life = int.TryParse(model.Remark, out int val) ? val : 1000 }); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | } |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt()) |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus!=StockStatusEmun.åºåºå®æ.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æçç¶æä¸æ£ç¡®,ä¸å¯ç³è¯·å
¥åº"); |
| | | } |
| | |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_External.ERPService; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundRepository; |
| | |
| | | private readonly IBasicService _basicService; |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly IInboundService _inboundService; |
| | | private readonly IInvokeERPService _invokeERPService; |
| | | |
| | | public ErpController(IBasicService basicService, IOutboundService outboundService, IInboundService inboundService) |
| | | public ErpController(IBasicService basicService, IOutboundService outboundService, IInboundService inboundService, |
| | | IInvokeERPService invokeERPService) |
| | | { |
| | | _basicService = basicService; |
| | | _outboundService = outboundService; |
| | | _inboundService = inboundService; |
| | | _invokeERPService = invokeERPService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | [HttpPost, Route("InvokeOutStandardsApi"), AllowAnonymous] |
| | | public string InvokeOutStandardsApi(ERPIssueModel issueModel) |
| | | { |
| | | return _invokeERPService.InvokeOutStandardsApi(issueModel); |
| | | } |
| | | } |
| | | } |