分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-05-23 cbd78ef6650440fcaa2f9eb8b47d16ad76cb4d77
添加叠盘区超时未使用空托入库
已修改5个文件
已添加11个文件
309 ■■■■■ 文件已修改
代码管理/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_management_time.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/dt_management_time.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/partial/dt_management_time.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/MappingConfiguration/System/dt_management_timeMapConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/EmptyPalletTask.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/GetStation/EmptyTrayIn.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/IRepositories/system/Idt_management_timeRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/IServices/system/Idt_management_timeService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/IServices/system/Partial/Idt_management_timeService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Repositories/system/dt_management_timeRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_management_timeService.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/system/dt_management_timeService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/System/Partial/dt_management_timeController.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/System/dt_management_timeController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_management_time.vue
@@ -30,7 +30,7 @@
                sortName: "management_id"
            });
            const editFormFields = ref({"management_numericalvalue":""});
            const editFormOptions = ref([[{"title":"数值","required":true,"field":"management_numericalvalue","type":"text"}]]);
            const editFormOptions = ref([[{"title":"数值","required":true,"field":"management_numericalvalue","type":"int"}]]);
            const searchFormFields = ref({"management_remark":""});
            const searchFormOptions = ref([[{"title":"说明","field":"management_remark","type":"like"}]]);
            const columns = ref([{field:'management_id',title:'主键',type:'int',width:80,hidden:true,readonly:true,require:true,align:'left'},
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/dt_management_time.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    [Entity(TableCnName = "时间管理",TableName = "dt_management_time")]
    public partial class dt_management_time:BaseEntity
    {
        /// <summary>
       ///主键
       /// </summary>
       [Key]
       [Display(Name ="主键")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int management_id { get; set; }
       /// <summary>
       ///名称
       /// </summary>
       [Display(Name ="名称")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       //[Required(AllowEmptyStrings=false)]
       public string management_name { get; set; }
       /// <summary>
       ///数值
       /// </summary>
       [Display(Name ="数值")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int management_numericalvalue { get; set; }
       /// <summary>
       ///时间单位
       /// </summary>
       [Display(Name ="时间单位")]
       [MaxLength(20)]
       [Column(TypeName="nvarchar(20)")]
       //[Required(AllowEmptyStrings=false)]
       public string management_unitoftime { get; set; }
       /// <summary>
       ///说明
       /// </summary>
       [Display(Name ="说明")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       public string management_remark { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs
@@ -78,7 +78,7 @@
        [Display(Name = "最后状态改变时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? lastUpdateTime { get; set; }
        public DateTime lastUpdateTime { get; set; }
        /// <summary>
        ///车轮数量
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/partial/dt_management_time.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    public partial class dt_management_time
    {
        //此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/MappingConfiguration/System/dt_management_timeMapConfig.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using WIDESEA_Entity.MappingConfiguration;
using WIDESEA_Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace WIDESEA_Entity.MappingConfiguration
{
    public class dt_management_timeMapConfig : EntityMappingConfiguration<dt_management_time>
    {
        public override void Map(EntityTypeBuilder<dt_management_time>
        builderTable)
        {
          //b.Property(x => x.StorageName).HasMaxLength(45);
        }
     }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/EmptyPalletTask.cs
@@ -8,7 +8,9 @@
using WIDESEA_Common;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.JobsPart.Common;
using WIDESEA_WCS.Repositories;
using WIDESEA_WMS.IRepositories;
using WIDESEA_WMS.Repositories;
using static System.Collections.Specialized.BitVector32;
@@ -28,12 +30,15 @@
                VOLContext Context = new VOLContext();
                Idt_agvtaskRepository agvtaskRepository = new dt_agvtaskRepository(Context);
                Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context);
                Idt_management_timeRepository timeRepository = new dt_management_timeRepository(Context);
                #region å ç›˜åŒºæ»¡5个入库 éœ€ä¼˜åŒ–
                var EmptyStations = stationinfoRepository.Find(x => x.stationCode.Contains("DD") && x.enable).ToList();
                var EmptyD = EmptyStations.Where(x => x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity == 5).FirstOrDefault();
                if (EmptyD != null) EmptyTray.CreateEmptyTrayIn(stationinfoRepository, EmptyD);
                //EmptyD = EmptyStations.Where(x => x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0&&x.lastUpdateTime.).FirstOrDefault();//时间超过6小时入库
                var val = timeRepository.Find(x => x.management_name == "StackingArea").FirstOrDefault().management_numericalvalue;
                EmptyD = EmptyStations.Where(x => x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity < 5 && x.lastUpdateTime.AddHours(val) < DateTime.Now).FirstOrDefault();//时间超过6小时入库
                if (EmptyD != null) EmptyTray.CreateEmptyTrayIn(stationinfoRepository, EmptyD);
                #endregion
                var agv_tasks = agvtaskRepository.Find(x => x.agv_taskstate == AGVTaskStateEnum.Queue.ToString() && x.agv_tasktype == AGVTaskTypeEnum.TaskType_EmptyPallet.ToString() && string.IsNullOrEmpty(x.agv_toaddress)).OrderByDescending(x => x.agv_grade).ThenBy(x => x.agv_createtime).ToList();
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs
@@ -225,6 +225,7 @@
                    //if (!station1.stationCode.Contains("X") && !station1.stationCode.Contains("S") && !station1.stationCode.Contains("W01001004") && !station1.stationCode.Contains("W01001005"))
                    //    station1.tray_type = string.Empty;
                }
                if (!station1.stationCode.Contains("DD"))
                station1.lastUpdateTime = DateTime.Now;
                stationinfoRepository.Update(station1, true);
            }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/GetStation/EmptyTrayIn.cs
@@ -80,7 +80,7 @@
                    #region åŒä¸€ä¸ªç©ºæ‰˜ä½åªèƒ½åŒæ—¶ç”Ÿæˆä¸€ä¸ªç©ºæ‰˜ä»»åŠ¡
                    if (agvtaskRepository.Find(x => x.agv_fromaddress == toEmptyStation.stationCode || x.agv_toaddress == toEmptyStation.stationCode).Any()) return;
                    #endregion
                    var quantity = 5 - toEmptyStation.quantity;
                    dt_agvtask agvtask = new dt_agvtask()
                    {
                        agv_fromaddress = EmptyStation.stationCode,
@@ -89,8 +89,8 @@
                        agv_grade = 3,
                        agv_createtime = DateTime.Now,
                        agv_taskstate = "Create",
                        //agv_materielid = station.stationType,
                        agv_qty = EmptyStation.quantity - toEmptyStation.quantity,
                        agv_qty = EmptyStation.quantity <= quantity ? EmptyStation.quantity : quantity,
                        //agv_qty = EmptyStation.quantity - toEmptyStation.quantity,
                        StarQuantity = toEmptyStation.quantity,
                        EndQuantity = toEmptyStation.quantity,
                        agv_tasktype = "TaskType_EmptyPallet",
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/IRepositories/system/Idt_management_timeRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Idt_management_timeRepository编写接口
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Extensions.AutofacManager;
namespace WIDESEA_WCS.IRepositories
{
    public partial interface Idt_management_timeRepository : IDependency,IRepository<dt_management_time>
    {
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/IServices/system/Idt_management_timeService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_management_timeService : IService<dt_management_time>
    {
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/IServices/system/Partial/Idt_management_timeService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
/*
*所有关于dt_management_time类的业务代码接口应在此处编写
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_management_timeService
    {
    }
 }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Repositories/system/dt_management_timeRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹dt_management_timeRepository编写代码
 */
using WIDESEA_WCS.IRepositories;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.Repositories
{
    public partial class dt_management_timeRepository : RepositoryBase<dt_management_time> , Idt_management_timeRepository
    {
    public dt_management_timeRepository(VOLContext dbContext)
    : base(dbContext)
    {
    }
    public static Idt_management_timeRepository Instance
    {
      get {  return AutofacContainerModule.GetService<Idt_management_timeRepository>(); } }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_management_timeService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
/*
 *所有关于dt_management_time类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*dt_management_timeService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
using System.Linq;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
using WIDESEA_Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_WCS.IRepositories;
namespace WIDESEA_WCS.Services
{
    public partial class dt_management_timeService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly Idt_management_timeRepository _repository;//访问数据库
        [ActivatorUtilitiesConstructor]
        public dt_management_timeService(
            Idt_management_timeRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
  }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/system/dt_management_timeService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下dt_management_timeService与Idt_management_timeService中编写
 */
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.IServices;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.Services
{
    public partial class dt_management_timeService : ServiceBase<dt_management_time, Idt_management_timeRepository>
    , Idt_management_timeService, IDependency
    {
    public dt_management_timeService(Idt_management_timeRepository repository)
    : base(repository)
    {
    Init(repository);
    }
    public static Idt_management_timeService Instance
    {
      get { return AutofacContainerModule.GetService<Idt_management_timeService>(); } }
    }
 }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/System/Partial/dt_management_timeController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
/*
 *接口编写处...
*如果接口需要做Action的权限验证,请在Action上使用属性
*如: [ApiActionPermission("dt_management_time",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IServices;
namespace WIDESEA_WCS.Controllers
{
    public partial class dt_management_timeController
    {
        private readonly Idt_management_timeService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        [ActivatorUtilitiesConstructor]
        public dt_management_timeController(
            Idt_management_timeService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/System/dt_management_timeController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果要增加方法请在当前目录下Partial文件夹dt_management_timeController编写
 */
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Controllers.Basic;
using WIDESEA_Entity.AttributeManager;
using WIDESEA_WCS.IServices;
namespace WIDESEA_WCS.Controllers
{
    [Route("api/dt_management_time")]
    [PermissionTable(Name = "dt_management_time")]
    public partial class dt_management_timeController : ApiBaseController<Idt_management_timeService>
    {
        public dt_management_timeController(Idt_management_timeService service)
        : base(service)
        {
        }
    }
}