| 项目代码/WMS/WMSServer/WIDESEA_Common/BDC/BDCEnum.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WMS/WMSServer/WIDESEA_IStorageBasicRepository/BasicInfo/IDt_BDCConfigurationRepository.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WMS/WMSServer/WIDESEA_IStorageBasicService/BasicInfo/IDt_BDCConfigurationService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WMS/WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_BDCConfiguration.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/removeWorkOrderInfo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WMS/WMSServer/WIDESEA_StorageBasicRepository/BasicInfo/Dt_BDCConfigurationRepository.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目资料/项目图纸/零跑金华四厂BDC4巷道方案20250829.dwg | 补丁 | 查看 | 原始文档 | blame | 历史 |
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Common/BDC/BDCEnum.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEA_Common { public enum BodyType { WhiteBody = 1, PaintedBody, } public enum BodyStatus { InWeldingShop = 1, InBDC, InPaintingShop, InAssemblyShop, Completed } } ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_IStorageBasicRepository/BasicInfo/IDt_BDCConfigurationRepository.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,31 @@ #region << ç æ¬ 注 é >> /*---------------------------------------------------------------- * å½å空é´ï¼WIDESEAWCS_ITaskInfoRepository * å建è ï¼è¡ç«¥åº * å建æ¶é´ï¼2024/8/2 16:13:36 * çæ¬ï¼V1.0.0 * æè¿°ï¼ * * ---------------------------------------------------------------- * ä¿®æ¹äººï¼ * ä¿®æ¹æ¶é´ï¼ * çæ¬ï¼V1.0.1 * ä¿®æ¹è¯´æï¼ * *----------------------------------------------------------------*/ #endregion << ç æ¬ 注 é >> using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEAWCS_Model.Models; namespace WIDESEAWCS_BasicInfoRepository { public interface IDt_BDCConfigurationRepository : IRepository<Dt_BDCConfiguration> { } } ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_IStorageBasicService/BasicInfo/IDt_BDCConfigurationService.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,82 @@ #region << ç æ¬ 注 é >> /*---------------------------------------------------------------- * å½å空é´ï¼WIDESEAWCS_ITaskInfoService * å建è ï¼è¡ç«¥åº * å建æ¶é´ï¼2024/8/2 16:13:36 * çæ¬ï¼V1.0.0 * æè¿°ï¼ * * ---------------------------------------------------------------- * ä¿®æ¹äººï¼ * ä¿®æ¹æ¶é´ï¼ * çæ¬ï¼V1.0.1 * ä¿®æ¹è¯´æï¼ * *----------------------------------------------------------------*/ #endregion << ç æ¬ 注 é >> using WIDESEAWCS_Model.Models; namespace WIDESEAWCS_BasicInfoService { public interface IDt_BDCConfigurationService : IService<Dt_BDCConfiguration> { /// <summary> /// è·åå½åçæçç¼åé ç½® /// </summary> Task<Dt_BDCConfiguration> GetCurrentConfiguration(); /// <summary> /// æ´æ°ç¼åé ç½® /// </summary> Task<Dt_BDCConfiguration> UpdateConfiguration(int maxWhiteBody, int maxPaintedBody, int maxBatteryCase, int maxEmptySled, string updatedBy); /// <summary> /// æ£æ¥ç½è½¦èº«æ¯å¦å¯ä»¥å ¥åºï¼æªè¶ è¿æå¤§ç¼åæ°ï¼ /// </summary> Task<bool> CanAddWhiteBody(); /// <summary> /// æ£æ¥å½©è½¦èº«æ¯å¦å¯ä»¥å ¥åºï¼æªè¶ è¿æå¤§ç¼åæ°ï¼ /// </summary> Task<bool> CanAddPaintedBody(); /// <summary> /// æ£æ¥çµæ± 壳æ¯å¦å¯ä»¥å ¥åºï¼æªè¶ è¿æå¤§ç¼åæ°ï¼ /// </summary> //Task<bool> CanAddBatteryCase(); /// <summary> /// æ£æ¥ç©ºæ»æ©æ¯å¦å¯ä»¥å ¥åºï¼æªè¶ è¿æå¤§ç¼åæ°ï¼ /// </summary> Task<bool> CanAddEmptySled(); /// <summary> /// è·åå½åç½è½¦èº«ç¼åæ°é /// </summary> int GetWhiteBodyCount(); /// <summary> /// è·åå½å彩车身ç¼åæ°é /// </summary> int GetPaintedBodyCount(); /// <summary> /// è·åå½åçµæ± 壳ç¼åæ°é /// </summary> int GetBatteryCaseCount(); /// <summary> /// è·åå½åç©ºæ»æ©ç¼åæ°é /// </summary> int GetEmptySledCount(); /// <summary> /// çæåºå容鿥å /// </summary> //Task<InventoryCapacityReport> GenerateCapacityReport(); } } ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_BDCConfiguration.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,67 @@ using SqlSugar; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEA_Model.Models { /// <summary> /// BDCç¼åé ç½®ï¼åå¨åç±»ç©æçæå¤§ç¼åæ°ééå¶ /// </summary> [SugarTable(nameof(Dt_BDCConfiguration), "BDCç¼åé ç½®")] public class Dt_BDCConfiguration { [Key] public int Id { get; set; } /// <summary> /// é ç½®åç§° /// </summary> [Required] [MaxLength(100)] public string Name { get; set; } = "Default Configuration"; /// <summary> /// ç½è½¦èº«æå¤§ç¼åæ° /// </summary> [Range(0, int.MaxValue)] public int MaxWhiteBodyCache { get; set; } = 100; /// <summary> /// 彩车身æå¤§ç¼åæ° /// </summary> [Range(0, int.MaxValue)] public int MaxPaintedBodyCache { get; set; } = 100; /// <summary> /// çµæ± 壳æå¤§ç¼åæ° /// </summary> [Range(0, int.MaxValue)] public int MaxBatteryCaseCache { get; set; } = 50; /// <summary> /// ç©ºæ»æ©æå¤§ç¼åæ° /// </summary> [Range(0, int.MaxValue)] public int MaxEmptySledCache { get; set; } = 30; /// <summary> /// æåæ´æ°æ¶é´ /// </summary> public DateTime LastUpdatedTime { get; set; } = DateTime.Now; /// <summary> /// æ´æ°äºº /// </summary> [MaxLength(50)] public string UpdatedBy { get; set; } = "System"; /// <summary> /// æ¯å¦å¯ç¨ /// </summary> public int IsActive { get; set; } } } ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/removeWorkOrderInfo.cs
@@ -8,8 +8,12 @@ namespace WIDESEA_StoragIntegrationServices { /// <summary> /// BDC请æ±çè£ ç¹å¾ä¸å /// æ¥å£æè¿°: 车身è¿å ¥BDCæ¶ï¼BDC读å车身ä¸çä¸ç»´æ¡ç åMES请æ±çè£ ç¹å¾ä¿¡æ¯ /// 订åã工忤æ /// æ¥å£æè¿°:éç¥BDCæ¶è£ å·¥å/æ»è£ å·¥å/è®¢åæ¤æ /// 1- å·¥å/è®¢åæ¤ææ¯æé¨åæ¤æ /// 2- è¯å¶ç±»åå·¥å/è®¢åæ¤æBDCåºå·²è¿BDC03/BDC05å·¥å䏿¯ææ¤æ /// 3-éè¯å¶ç±»åå·¥å/è®¢åæ¤æä¸å¥ç»å®ç¶æï¼å·²å®æç»å®çå·¥å/订å䏿¯ææ¤æ /// 4-æ»è£ å·¥åå·²æå¨é车ç车身工å䏿¯ææ¤æ /// </summary> public partial class MESService { ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StorageBasicRepository/BasicInfo/Dt_BDCConfigurationRepository.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ #region << ç æ¬ 注 é >> /*---------------------------------------------------------------- * å½å空é´ï¼WIDESEAWCS_TaskInfoRepository * å建è ï¼è¡ç«¥åº * å建æ¶é´ï¼2024/8/2 16:13:36 * çæ¬ï¼V1.0.0 * æè¿°ï¼ * * ---------------------------------------------------------------- * ä¿®æ¹äººï¼ * ä¿®æ¹æ¶é´ï¼ * çæ¬ï¼V1.0.1 * ä¿®æ¹è¯´æï¼ * *----------------------------------------------------------------*/ #endregion << ç æ¬ 注 é >> using WIDESEAWCS_Model.Models; namespace WIDESEAWCS_BasicInfoRepository { public class Dt_BDCConfigurationRepository : RepositoryBase<Dt_BDCConfiguration>, IDt_BDCConfigurationRepository { public Dt_BDCConfigurationRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) { } } } ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,109 @@ using WIDESEA_Common; using WIDESEA_IServices; using WIDESEAWCS_BasicInfoRepository; using WIDESEAWCS_Model.Models; namespace WIDESEAWCS_BasicInfoService { public partial class Dt_BDCConfigurationService : ServiceBase<Dt_BDCConfiguration, IDt_BDCConfigurationRepository>, IDt_BDCConfigurationService { private readonly ISys_ConfigService _sys_ConfigService; private readonly IDt_PalletStockInfoRepository _palletStockInfoRepository; public Dt_BDCConfigurationService(IDt_BDCConfigurationRepository BaseDal, ISys_ConfigService sys_ConfigService, IDt_PalletStockInfoRepository palletStockInfoRepository) : base(BaseDal) { _sys_ConfigService = sys_ConfigService; _palletStockInfoRepository = palletStockInfoRepository; } public async Task<Dt_BDCConfiguration> GetCurrentConfiguration() { // è·åå½åçæçé ç½® var currentConfig = await BaseDal.QueryFirstAsync(c => c.IsActive == 1); // å¦ææ²¡æé ç½®ï¼å建é»è®¤é ç½® if (currentConfig == null) { currentConfig = new Dt_BDCConfiguration(); BaseDal.AddData(currentConfig); } return currentConfig; } public async Task<Dt_BDCConfiguration> UpdateConfiguration(int maxWhiteBody, int maxPaintedBody, int maxBatteryCase, int maxEmptySled, string updatedBy) { // ç¦ç¨å½åé ç½® var currentConfigs = await BaseDal.QueryDataAsync(c => c.IsActive == 1); currentConfigs.ForEach(c => c.IsActive = 2); // å建æ°é ç½® var newConfig = new Dt_BDCConfiguration { MaxWhiteBodyCache = maxWhiteBody, MaxPaintedBodyCache = maxPaintedBody, MaxBatteryCaseCache = maxBatteryCase, MaxEmptySledCache = maxEmptySled, LastUpdatedTime = DateTime.Now, UpdatedBy = updatedBy, IsActive = 1 }; BaseDal.UpdateData(currentConfigs); BaseDal.AddData(newConfig); return newConfig; } public async Task<bool> CanAddWhiteBody() { var config = await GetCurrentConfiguration(); var currentCount = GetWhiteBodyCount(); // é¢ç5%çç¼å²ç©ºé´ var threshold = (int)(config.MaxWhiteBodyCache * 0.95); return currentCount < threshold; } public async Task<bool> CanAddPaintedBody() { var config = await GetCurrentConfiguration(); var currentCount = GetPaintedBodyCount(); // é¢ç5%çç¼å²ç©ºé´ var threshold = (int)(config.MaxPaintedBodyCache * 0.95); return currentCount < threshold; } public async Task<bool> CanAddEmptySled() { var config = await GetCurrentConfiguration(); var currentCount = GetEmptySledCount(); // é¢ç5%çç¼å²ç©ºé´ var threshold = (int)(config.MaxEmptySledCache * 0.95); return currentCount < threshold; } public int GetWhiteBodyCount() { return _palletStockInfoRepository.QueryData(b => b.CarType == (int)BodyType.WhiteBody && b.StockStatus == (int)BodyStatus.InBDC).Count; } public int GetPaintedBodyCount() { return _palletStockInfoRepository.QueryData(b => b.CarType == (int)BodyType.PaintedBody && b.StockStatus == (int)BodyStatus.InBDC).Count; } public int GetBatteryCaseCount() { return _palletStockInfoRepository.QueryData(b => b.StockStatus == (int)BodyStatus.InBDC).Count; } public int GetEmptySledCount() { return _palletStockInfoRepository.QueryData(s => s.StockStatus == (int)BodyStatus.InBDC).Count; } } } ÏîÄ¿×ÊÁÏ/ÏîĿͼֽ/ÁãÅܽð»ªËij§BDC4ÏïµÀ·½°¸20250829.dwgBinary files differ