ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js
@@ -16,7 +16,8 @@ modelFooter: '' }, tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) buttons: { view: [ buttons: { view: [ { name: 'ç»ç', type: 'primary', @@ -401,10 +402,36 @@ render(vnode, mountNode); } } ], box: [], detail: [] }, ], box: [], detail: [] }, methods: { //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ onInit() { this.columns.forEach(column => { if (column.field === 'orderStatistics') { column.formatter = (row) => { // æ ¡éªdetailsæ¯å¦åå¨ä¸ææ°æ® if (row.details && row.details.length > 0) { //æmaterielCodeåç»ç»è®¡orderQuantityæ»å const materielSumMap = row.details.reduce((acc, item) => { const materielCode = item.materielCode || 'æªç¥ç©æ'; const quantity = Number(item.orderQuantity) || 0; acc[materielCode] = (acc[materielCode] || 0) + quantity; return acc; }, {}); //æ¯ä¸ªç©æé¡¹çæç¬ç«divï¼è·¨è¡æ¾ç¤º const displayItems = Object.entries(materielSumMap).map(([code, total]) => { return `<div style="line-height: 1.5; white-space: normal;">${code}ï¼${total}个</div>`; }); const displayContent = displayItems.join(''); return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`; } else { return '<span style="color: #F56C6C">æ å ¥åºæç»</span>'; } }; } }); }, onInited() { @@ -419,7 +446,8 @@ let wheres = [{ 'name': 'orderType', 'value': '0', 'displayType': 'text'}]; 'displayType': 'text' }]; param.wheres.push(...wheres); @@ -452,4 +480,3 @@ } }; export default extension; ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js
@@ -384,15 +384,6 @@ //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ let wheres = [{ 'name': 'orderType', 'value': ['0','116'], 'displayType': 'text' }]; param.wheres.push(...wheres); return true; return true; }, ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue
@@ -79,7 +79,7 @@ const searchFormFields = ref({ inboundOrderNo: "", upperOrderNo: "", orderType: "0", orderType: "", orderStatus: "", createType: "", creater: "", @@ -169,6 +169,13 @@ bind: { key: "inboundState", data: [] }, }, { field: "orderStatistics", title: "åæ®ç©æç»è®¡", type: "string", width: 230, align: "left", }, { field: "createType", title: "å建æ¹å¼", type: "string", ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
@@ -223,7 +223,7 @@ if (string.IsNullOrEmpty(where)) where += $"{searchParametersList[i].Name} >= '{searchParametersList[i].Value}'"; else where += $" and {searchParametersList[i].Name} {searchParametersList[i].DisplayType.GetLinqCondition()} '{searchParametersList[i].Value}'"; where += $" and {searchParametersList[i].Name} >= '{searchParametersList[i].Value}'"; } else if (searchParametersList[i].DisplayType.GetLinqCondition() == LinqExpressionType.LessThanOrEqual) { ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs
@@ -958,10 +958,10 @@ case HtmlElementType.Contains: linqExpression = LinqExpressionType.In; break; case HtmlElementType.ThanOrEqual: case HtmlElementType.thanorequal: linqExpression = LinqExpressionType.ThanOrEqual; break; case HtmlElementType.LessOrequal: case HtmlElementType.lessorequal: linqExpression = LinqExpressionType.LessThanOrEqual; break; case HtmlElementType.GT: ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs
@@ -689,5 +689,41 @@ return WebResponseContent.Instance.OK("æçæ¤éæå"); } public override PageGridData<Dt_InboundOrder> GetPageData(PageDataOptions options) { string wheres = ValidatePageOptions(options); //è·åæåºå段 Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties); List<OrderByModel> orderByModels = new List<OrderByModel>(); foreach (var item in orderbyDic) { OrderByModel orderByModel = new() { FieldName = item.Key, OrderByType = item.Value }; orderByModels.Add(orderByModel); } int totalCount = 0; List<SearchParameters> searchParametersList = new List<SearchParameters>(); if (!string.IsNullOrEmpty(options.Wheres)) { try { searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>(); options.Filter = searchParametersList; } catch { } } var data = BaseDal.Db.Queryable<Dt_InboundOrder>() .WhereIF(!wheres.IsNullOrEmpty(), wheres) .OrderBy(orderByModels).Includes(x=>x.Details) .ToPageList(options.Page, options.Rows, ref totalCount); return new PageGridData<Dt_InboundOrder>(totalCount, data); } } } ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs
@@ -7,6 +7,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection.Metadata; using System.Text; using System.Text.Json; using System.Threading.Tasks; @@ -36,6 +37,7 @@ using WIDESEA_Model.Models; using WIDESEA_Model.Models.Basic; using WIDESEA_Model.Models.Check; using WIDESEA_Model.Models.Outbound; namespace WIDESEA_OutboundService { @@ -66,6 +68,7 @@ private readonly IReCheckOrderService _reCheckOrderService; private readonly ITask_HtyService _task_HtyService; private readonly ILogger<OutboundPickingService> _logger; private readonly IRepository<Dt_InterfaceLog> _interfaceLog; private Dictionary<string, string> stations = new Dictionary<string, string> { @@ -84,7 +87,7 @@ public OutboundPickingService(IRepository<Dt_PickingRecord> BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockInfoService stockInfoService, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IStockInfoDetailService stockInfoDetailService, ILocationInfoService locationInfoService, IOutboundOrderDetailService outboundOrderDetailService, ISplitPackageService splitPackageService, IOutboundOrderService outboundOrderService, IRepository<Dt_Task> taskRepository, IESSApiService eSSApiService, ILogger<OutboundPickingService> logger, IInvokeMESService invokeMESService, IDailySequenceService dailySequenceService, IAllocateService allocateService, IRepository<Dt_InboundOrder> inboundOrderRepository, IInboundOrderDetailService inboundOrderDetailService, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IReCheckOrderService reCheckOrderService, ITask_HtyService task_HtyService) : base(BaseDal) IRepository<Dt_Task> taskRepository, IESSApiService eSSApiService, ILogger<OutboundPickingService> logger, IInvokeMESService invokeMESService, IDailySequenceService dailySequenceService, IAllocateService allocateService, IRepository<Dt_InboundOrder> inboundOrderRepository, IInboundOrderDetailService inboundOrderDetailService, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IReCheckOrderService reCheckOrderService, ITask_HtyService task_HtyService,IRepository<Dt_InterfaceLog> interfaceLog) : base(BaseDal) { _unitOfWorkManage = unitOfWorkManage; _stockInfoService = stockInfoService; @@ -106,6 +109,7 @@ _warehouseAreaRepository = warehouseAreaRepository; _reCheckOrderService = reCheckOrderService; _task_HtyService = task_HtyService; _interfaceLog = interfaceLog; } @@ -2851,10 +2855,11 @@ var result1 = await _invokeMESService.FeedbackInbound(infeedmodel); if (result1 != null && result1.code == 200) { var orderIds = inboundOrderDetails.Select(x => x.Id).Distinct().ToList(); _inboundOrderRepository.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(); .Where(it => orderIds.Contains(it.Id)).ExecuteCommand(); } //åºåºåä¼ MES @@ -2873,7 +2878,7 @@ status = outboundOrder.OrderStatus, details = new List<FeedbackOutboundDetailsModel>() }; foreach (var detail in outboundOrder.Details) foreach (var detail in outboundOrderDetails) { // è·å该æç»å¯¹åºçæ¡ç ä¿¡æ¯ï¼ä»éå®è®°å½ï¼ var detailLocks = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>() @@ -2903,18 +2908,37 @@ }).ToList(); outfeedmodel.details.AddRange(groupdata); } //åå¨åä¼ åæ°ï¼ä¿è¯å¼å¸¸æå¨åä¼ Dt_InterfaceLog interfaceLog = new Dt_InterfaceLog { OrderNo = outboundOrder.UpperOrderNo, DocumentNo = documentNo, OrderType = "èæåºå ¥åº", Content = outfeedmodel.ToJson(), ReturnToMESStatus = 0, IsDeleted = false }; _interfaceLog.AddData(interfaceLog); var result = await _invokeMESService.FeedbackOutbound(outfeedmodel); if (result != null && result.code == 200) { var orderIds = outboundOrderDetails.Select(x => x.Id).Distinct().ToList(); await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() .SetColumns(x => x.ReturnToMESStatus == 1) .Where(x => x.OrderId == outboundOrder.Id) .Where(x => orderIds.Contains(x.Id)) .ExecuteCommandAsync(); await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() .SetColumns(x => x.ReturnToMESStatus == 1) .Where(x => x.Id == outboundOrder.Id) .ExecuteCommandAsync(); await _interfaceLog.Db.Updateable<Dt_InterfaceLog>() .SetColumns(x => x.ReturnToMESStatus == 1) .Where(x=>x.DocumentNo == documentNo) .ExecuteCommandAsync(); } return WebResponseContent.Instance.OK(); } ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs
@@ -42,7 +42,7 @@ //} int totalCount = 0; ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>(); ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x=>x.Details); ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>(); ISugarQueryable<Dt_StockInfoDetail> sugarQueryable2 = _dbBase.Queryable<Dt_StockInfoDetail>();