| | |
| | | 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'}, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *å¦ææ°æ®åºå段åçååï¼è¯·å¨ä»£ç çå¨éæ°çææ¤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; } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | [Display(Name = "æåç¶ææ¹åæ¶é´")] |
| | | [Column(TypeName = "datetime")] |
| | | [Editable(true)] |
| | | public DateTime? lastUpdateTime { get; set; } |
| | | public DateTime lastUpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | ///车轮æ°é |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *å¦ææ°æ®åºå段åçååï¼è¯·å¨ä»£ç çå¨éæ°çææ¤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]屿§ï¼å¦åä¼å¼å¸¸ |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | 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(); |
| | |
| | | //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); |
| | | } |
| | |
| | | #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, |
| | |
| | | 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", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *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> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | */ |
| | | using WIDESEA_Core.BaseProvider; |
| | | using WIDESEA_Entity.DomainModels; |
| | | |
| | | namespace WIDESEA_WCS.IServices |
| | | { |
| | | public partial interface Idt_management_timeService : IService<dt_management_time> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *ææå
³äº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 |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *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>(); } } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *ææå
³äº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); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *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>(); } } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *æ¥å£ç¼åå¤... |
| | | *妿æ¥å£éè¦å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; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *妿è¦å¢å æ¹æ³è¯·å¨å½åç®å½ä¸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) |
| | | { |
| | | } |
| | | } |
| | | } |
| | | |