schangxiang@126.com
2024-09-04 f5d543382c2e2bf2a1892f81de395fc107654c6c
出库统计
已添加2个文件
已修改3个文件
126 ■■■■■ 文件已修改
iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/Dto/OutBoundWorkPieceInfoCountInput.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/Dto/OutBoundWorkPieceInfoCountOutput.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWara.SCADA.Code/iWare.Wms.Application/Service/WorkPieceOutbound/WorkPieceOutboundService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWara.SCADA.Code/iWare.Wms.Application/iWare.Wms.Application.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/Dto/OutBoundWorkPieceInfoCountInput.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using iWare.Wms.Core;
using iWare.Wms.Core.Enum;
namespace iWare.Wms.Application
{
    public class OutBoundWorkPieceInfoCountInput
    {
        /// <summary>
        /// æ—¥æœŸ
        /// </summary>
        public DateTimeOffset Date { get; set; }
    }
}
iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/Dto/OutBoundWorkPieceInfoCountOutput.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using iWare.Wms.Core;
using iWare.Wms.Core.Enum;
using Microsoft.EntityFrameworkCore;
namespace iWare.Wms.Application
{
    public class OutBoundWorkPieceInfoCountOutput
    {
        /// <summary>
        /// å‡ºåº“人名称
        /// </summary>
        [Comment("出库人名称")]
        [MaxLength(32)]
        public string WorkPieceOutboundUserName { get; set; }
        /// <summary>
        /// æ•°é‡
        /// </summary>
        public int Count { get; set; }
    }
}
iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs
@@ -873,6 +873,50 @@
        }
        /// <summary>
        /// å‡ºåº“统计
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost("getOutBoundWorkPieceInfoCountList")]
        [DisableOpLog]
        public async Task<List<OutBoundWorkPieceInfoCountOutput>> GetOutBoundWorkPieceInfoCountList([FromBody] OutBoundWorkPieceInfoCountInput input)
        {
            /*
         //测试
         List<OutBoundWorkPieceInfoCountOutput> outBoundWorkPieceInfoCountOutputs = new List<OutBoundWorkPieceInfoCountOutput>();
         outBoundWorkPieceInfoCountOutputs.Add(new OutBoundWorkPieceInfoCountOutput()
         {
             Count = 10,
             WorkPieceOutboundUserName = "AAA"
         });
         outBoundWorkPieceInfoCountOutputs.Add(new OutBoundWorkPieceInfoCountOutput()
         {
             Count = 99,
             WorkPieceOutboundUserName = "BBb"
         });
         return outBoundWorkPieceInfoCountOutputs;
         //*/
            //DateTimeOffset now = DateTimeOffset.Now; // èŽ·å–å½“å‰æ—¶é—´ï¼ŒåŒ…æ‹¬æ—¶åŒºåç§»é‡
            DateTimeOffset now = input.Date; // èŽ·å–å½“å‰æ—¶é—´ï¼ŒåŒ…æ‹¬æ—¶åŒºåç§»é‡
            DateTimeOffset startOfDay = new DateTimeOffset(now.Year, now.Month, now.Day, 0, 0, 0, now.Offset); // å½“天开始时间
            DateTimeOffset endOfDay = new DateTimeOffset(now.Year, now.Month, now.Day, 23, 59, 59, now.Offset); // å½“天结束时间
            List<WorkPieceOutbound> db_itemModelList = await _workPieceOutboundRep.Where(w => w.CreatedTime >= startOfDay
            && w.CreatedTime <= endOfDay && w.IsDeleted == false).ToListAsync();
            //汇总分组
            var groupList = db_itemModelList.GroupBy(g => g.WorkPieceOutboundUserName).Select(s => new OutBoundWorkPieceInfoCountOutput()
            {
                WorkPieceOutboundUserName = s.Key,
                Count = s.ToList().Count
            }).ToList();
            return groupList;
            //*/
        }
        #endregion
    }
iWara.SCADA.Code/iWare.Wms.Application/Service/WorkPieceOutbound/WorkPieceOutboundService.cs
@@ -44,6 +44,7 @@
            var workPieceOutbounds = await _workPieceOutboundRep.DetachedEntities
                                     .Where(!string.IsNullOrEmpty(input.WorkPieceID), u => u.WorkPieceID.Contains(input.WorkPieceID))
                                     .Where(!string.IsNullOrEmpty(input.OP80NewCode), u => u.OP80NewCode.Contains(input.OP80NewCode))
                                     .Where(!string.IsNullOrEmpty(input.WorkPieceOutboundUserName), u => u.WorkPieceOutboundUserName.Contains(input.WorkPieceOutboundUserName))
                                     .Where(!string.IsNullOrEmpty(input.StartTimeBeginTime.ToString()), u => u.WorkPieceOutboundTime >= input.StartTimeBeginTime)
                                     .Where(!string.IsNullOrEmpty(input.StartTimeEndTime.ToString()), u => u.WorkPieceOutboundTime <= input.StartTimeEndTime)
                                     .OrderBy(PageInputOrder.OrderBuilder<WorkPieceOutboundSearch>(input))
iWara.SCADA.Code/iWare.Wms.Application/iWare.Wms.Application.xml
@@ -390,6 +390,13 @@
            <param name="input"></param>
            <returns></returns>
        </member>
        <member name="M:iWare.Wms.Application.Service.Pda.PdaService.GetOutBoundWorkPieceInfoCountList(iWare.Wms.Application.OutBoundWorkPieceInfoCountInput)">
            <summary>
            å‡ºåº“统计
            </summary>
            <param name="input"></param>
            <returns></returns>
        </member>
        <member name="P:iWare.Wms.Application.Service.System.LowCode.Dto.ContrastLowCode_Database.TableName">
            <summary>
            è¡¨å
@@ -5104,6 +5111,21 @@
            <param name="input"></param>
            <returns></returns>
        </member>
        <member name="P:iWare.Wms.Application.OutBoundWorkPieceInfoCountInput.Date">
            <summary>
            æ—¥æœŸ
            </summary>
        </member>
        <member name="P:iWare.Wms.Application.OutBoundWorkPieceInfoCountOutput.WorkPieceOutboundUserName">
            <summary>
            å‡ºåº“人名称
            </summary>
        </member>
        <member name="P:iWare.Wms.Application.OutBoundWorkPieceInfoCountOutput.Count">
            <summary>
            æ•°é‡
            </summary>
        </member>
        <member name="T:iWare.Wms.Application.OutStoreInput">
            <summary>
            å‡ºåº“执行输入参数