1
heshaofeng
2025-12-19 60fb7d3d4a122880519f54acd8975165285a7fb7
1
已修改11个文件
183 ■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/extension/outbound/allocateoutboundOrder.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrderDetail.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Allocate/AllocateDto.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Allocate/Dt_AllocateOrderDetail.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/allocateoutboundOrder.js
@@ -324,6 +324,49 @@
              this.$refs.gridBody.open(row);
          }
      });
      let BatchOrderFeedbackToMesBtn = this.buttons.find(x => x.value == 'BatchOrderFeedbackToMes');
      if (BatchOrderFeedbackToMesBtn) {
        const _this = this;
        BatchOrderFeedbackToMesBtn.onClick = function () {
          let selectedRows = _this.$refs.table.getSelected();
          // æ ¡éªŒæ˜¯å¦æœ‰é€‰ä¸­æ•°æ®
          if (!selectedRows || selectedRows.length === 0) {
            return _this.$Message.warning('请先选择需要处理的单据');
          }
          if (selectedRows.length > 1) {
            return _this.$Message.warning('请选择一条数据');
          }
          _this.http
            .post(`api/MesFeedback/OutboundFeedback?orderNo=${selectedRows[0].orderNo}`, {}, "数据处理中...")
            .then((x) => {
              if (x.status) {
                _this.$Message.success('分批出库回调完成');
                _this.refresh();
              } else {
                return _this.$Message.error('分批出库回调失败');
              }
            })
            .catch((error) => {
            });
        };
      }
      let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'NoStockOut');
      if (TaskHandCompletedBtn) {
        TaskHandCompletedBtn.onClick = function () {
          this.$refs.gridHeader.open();
        }
      }
      var EmptyTrayOutboundBtn = this.buttons.find(x => x.value == "EmptyTrayOutbound");
      if (EmptyTrayOutboundBtn != null) {
        EmptyTrayOutboundBtn.onClick = () => {
          this.$refs.gridFooter.open();
        }
      }
      },
      onInited() {
        //框架初始化配置后
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue
@@ -305,6 +305,13 @@
          align: "left",
        },
        {
          field: "unit",
          title: "单位",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "orderDetailStatus",
          title: "订单明细状态",
          type: "string",
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/inbound/inboundOrderDetail.vue
@@ -157,6 +157,13 @@
          align: "left",
        },
        {
          field: "unit",
          title: "单位",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "orderDetailStatus",
          title: "订单明细状态",
          type: "string",
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs
@@ -329,7 +329,7 @@
                       SupplyCode=detail.SupplyCode,
                       WarehouseCode=detail.WarehouseCode,
                       Barcode=detail.Barcode,
                       OutBoxbarcodes="",
                       OutBoxbarcodes= detail.BoxSN,
                       BarcodeQty=(decimal)detail.BarcodeQty,
                       BarcodeUnit=detail.BarcodeUnit
                   }).ToList()
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs
@@ -1,10 +1,12 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Org.BouncyCastle.Asn1.Ocsp;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using SqlSugar;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
@@ -47,6 +49,21 @@
                {
                    return WebResponseContent.Instance.Error($"未找到对应的出库单信息");
                }
                List<Dt_MesReturnRecord> returnRecords = BaseDal.QueryData(x => x.OrderNo == orderNo && x.OrderId == outboundOrder.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;
                }
                BaseDal.UpdateData(returnRecords);
                HttpResponseResult<MesResponseDTO> httpResponseResult = new HttpResponseResult<MesResponseDTO>();
                string reqCode = Guid.NewGuid().ToString();
                string reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
@@ -62,7 +79,11 @@
                    string apiUrl = AppSettings.GetValue("MaterialOutboundFeedbackUrl");
                    returnDTO.ReqCode = reqCode;
                    returnDTO.ReqTime = reqTime;
                    requestData = returnDTO.Serialize();
                    JsonSerializerSettings settings = new JsonSerializerSettings
                    {
                        ContractResolver = new CamelCasePropertyNamesContractResolver()
                    };
                    requestData = JsonConvert.SerializeObject(returnDTO, settings);
                    lineNos = returnDTO.Details.Select(x => x.LineNo).ToList();
                    httpResponseResult = _httpClientHelper.Post<MesResponseDTO>(apiUrl, requestData);
                    httpResponseResult.ApiUrl = apiUrl;
@@ -82,7 +103,11 @@
                    string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl"); ;
                    returnDTO.ReqCode = reqCode;
                    returnDTO.ReqTime = reqTime;
                    requestData = returnDTO.Serialize();
                    JsonSerializerSettings settings = new JsonSerializerSettings
                    {
                        ContractResolver = new CamelCasePropertyNamesContractResolver()
                    };
                    requestData = JsonConvert.SerializeObject(returnDTO, settings);
                    lineNos = returnDTO.Details.Select(x => x.LineNo).ToList();
                    httpResponseResult = _httpClientHelper.Post<MesResponseDTO>(apiUrl, requestData);
                    httpResponseResult.ApiUrl = apiUrl;
@@ -123,37 +148,34 @@
                _unitOfWorkManage.BeginTran();
                _unitOfWorkManage.Db.Insertable(mesReturnRecord).ExecuteCommand();
                if (isSuccess)
                List<Dt_OutboundOrderDetail> outboundOrderDetails = outboundOrder.Details.Where(x => lineNos.Contains(x.lineNo)).ToList();
                outboundOrderDetails.ForEach(x =>
                {
                    List<Dt_OutboundOrderDetail> outboundOrderDetails = outboundOrder.Details.Where(x => lineNos.Contains(x.lineNo)).ToList();
                    outboundOrderDetails.ForEach(x =>
                    if (x.OverOutQuantity == x.OrderQuantity - x.MoveQty)
                    {
                        if (x.OverOutQuantity == x.OrderQuantity - x.MoveQty)
                        {
                            x.ReturnToMESStatus = isSuccess ? 1 : 2;
                        }
                        else
                        {
                            x.ReturnToMESStatus = isSuccess ? 3 : 4;
                        }
                        x.CurrentDeliveryQty = 0;
                        x.ReturnJsonData = "";
                    });
                    mesReturnRecord.ReturnType = outboundOrder.Details.Count == outboundOrderDetails.Count ? 1 : 2;
                    if (outboundOrder.Details.Count == outboundOrderDetails.Count && outboundOrderDetails.All(x => x.ReturnToMESStatus == 1 || x.ReturnToMESStatus == 2))
                    {
                        outboundOrder.ReturnToMESStatus = isSuccess ? 1 : 2;
                        x.ReturnToMESStatus = isSuccess ? 1 : 2;
                    }
                    else
                    {
                        outboundOrder.ReturnToMESStatus = isSuccess ? 3 : 4;
                        x.ReturnToMESStatus = isSuccess ? 3 : 4;
                    }
                    x.CurrentDeliveryQty = 0;
                    x.ReturnJsonData = "";
                });
                    _outboundOrderRepository.Db.Updateable(outboundOrderDetails).ExecuteCommand();
                    _outboundOrderRepository.UpdateData(outboundOrder);
                mesReturnRecord.ReturnType = outboundOrder.Details.Count == outboundOrderDetails.Count ? 1 : 2;
                if (outboundOrder.Details.Count == outboundOrderDetails.Count && outboundOrderDetails.All(x => x.ReturnToMESStatus == 1 || x.ReturnToMESStatus == 2))
                {
                    outboundOrder.ReturnToMESStatus = isSuccess ? 1 : 2;
                }
                else
                {
                    outboundOrder.ReturnToMESStatus = isSuccess ? 3 : 4;
                }
                _outboundOrderRepository.Db.Updateable(outboundOrderDetails).ExecuteCommand();
                _outboundOrderRepository.UpdateData(outboundOrder);
                _unitOfWorkManage.CommitTran();
@@ -203,7 +225,7 @@
                    Details = returnDetails,
                    FactoryArea = outboundOrder.FactoryArea,
                    OperationType = 1,
                    OrderNo = outboundOrder.OrderNo,
                    OrderNo = outboundOrder.UpperOrderNo,
                    FromWarehouse = fromWarehouse,
                    ToWarehouse = toWarehouse
                };
@@ -326,11 +348,11 @@
                {
                    Business_type = outboundOrder.BusinessType,
                    Details = returnDetails,
                    DocumentsNO = "",
                    DocumentsNO = _basicService.CreateCodeByRule("OutboundOrderRule"),
                    FactoryArea = outboundOrder.FactoryArea,
                    OperationType = 1,
                    Operator = App.User.UserName,
                    OrderNo = outboundOrder.OrderNo,
                    OrderNo = outboundOrder.UpperOrderNo,
                    Status = 1
                };
@@ -373,8 +395,12 @@
                string reqCode = Guid.NewGuid().ToString();
                string reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                string requestData = returnDTO.Serialize();
                JsonSerializerSettings settings = new JsonSerializerSettings
                {
                    ContractResolver = new CamelCasePropertyNamesContractResolver()
                };
                string requestData = JsonConvert.SerializeObject(returnDTO, settings);
                HttpResponseResult<MesResponseDTO> httpResponseResult = _httpClientHelper.Post<MesResponseDTO>(apiUrl, requestData);
                httpResponseResult.ApiUrl = apiUrl;
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_DTO/Allocate/AllocateDto.cs
@@ -129,6 +129,12 @@
        public string Barcode { get; set; }
        /// <summary>
        /// å¤–箱条码
        /// </summary>
        [JsonProperty("boxSN")]
        public string BoxSN { get; set; }
        /// <summary>
        /// æ‰¹æ¬¡å·
        /// </summary>
        [JsonProperty("batchNo")]
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_Model/Models/Allocate/Dt_AllocateOrderDetail.cs
@@ -90,6 +90,12 @@
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "条形码")]
        public string Barcode { get; set; }
        /// <summary>
        /// æ¡å½¢ç 
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "条形码")]
        public string BoxSN { get; set; }
        /// <summary>
        /// ä¾›åº”商编号
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs
@@ -429,6 +429,8 @@
                throw new Exception($"物料 {materielCalc.MaterielCode} å¯ç”¨åº“å­˜ {totalAvailableStock} ä¸è¶³å‡ºåº“数量 {materielCalc.UnallocatedQuantity}");
            }
            //decimal remainingQuantity = Math.Min(totalAvailableStock, materielCalc.UnallocatedQuantity);
            // éœ€åˆ†é…æ•°é‡
            decimal remainingQuantity = materielCalc.UnallocatedQuantity;
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -21,6 +21,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Org.BouncyCastle.Asn1.Ocsp;
using Org.BouncyCastle.Asn1.Pkcs;
using SqlSugar;
@@ -763,7 +764,11 @@
                    string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl"); ;
                    returnDTO.ReqCode = reqCode;
                    returnDTO.ReqTime = reqTime;
                    requestData = returnDTO.Serialize();
                    JsonSerializerSettings settings = new JsonSerializerSettings
                    {
                        ContractResolver = new CamelCasePropertyNamesContractResolver()
                    };
                    requestData = JsonConvert.SerializeObject(returnDTO, settings);
                    lineNos = returnDTO.Details.Select(x => x.LineNo).ToList();
                    httpResponseResult = _httpClientHelper.Post<MesResponseDTO>(apiUrl, requestData);
                    httpResponseResult.ApiUrl = apiUrl;
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs
@@ -85,7 +85,7 @@
                            BarcodeQty = barcodeDto.Qty,
                            BarcodeUnit = barcodeDto.Unit,
                            ValidDate = barcodeDto.validDate,
                            BoxSN = barcodeDto.BoxSN
                        };
                        allocateOrder.Details.Add(orderDetail);
                    }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs
@@ -11,6 +11,7 @@
using System.IO;
using WIDESEA_Model.Models;
using System;
using WIDESEA_IBasicService;
namespace WIDESEA_WMSServer.Controllers
{
@@ -24,12 +25,14 @@
        private readonly IInboundService _inboundService;
        private readonly IOutboundService _outboundService;
        private readonly ITaskService _taskService;
        private readonly IErpApiService _erpApiService;
        public PDAController(ITaskService taskService, IInboundService inboundService, IOutboundService outboundService)
        public PDAController(ITaskService taskService, IInboundService inboundService, IOutboundService outboundService,IErpApiService erpApiService)
        {
            _inboundService = inboundService;
            _outboundService = outboundService;
            _taskService = taskService;
            _erpApiService = erpApiService;
        }
        /// <summary>
@@ -109,5 +112,11 @@
            }
        }
        [HttpPost, HttpGet, Route("GetMaterialUnitAsync"), AllowAnonymous]
        public Task GetMaterialUnitAsync()
        {
            return _erpApiService.GetMaterialUnitAsync();
        }
    }
}