Browse Source

生产模具记录登记功能开发

klzhangweiya 1 year ago
parent
commit
5b9c4661fb
59 changed files with 2946 additions and 1753 deletions
  1. 17 1
      src_0nline/ShwasherSys/ShwasherSys.Application/Common/CommonAppService.cs
  2. 31 4
      src_0nline/ShwasherSys/ShwasherSys.Application/Common/QueryAppService.cs
  3. 51 4
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/DeviceInfo/DeviceMgPlansApplicationService.cs
  4. 2 0
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/DeviceInfo/Dto/DeviceMgPlanCreateDto.cs
  5. 2 0
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/DeviceInfo/Dto/DeviceMgPlanDto.cs
  6. 13 11
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/DeviceInfo/Dto/DeviceMgPlanUpdateDto.cs
  7. 18 8
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MaintenanceRecordInfo/MaintenanceRecordsApplicationService.cs
  8. 2 0
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MoldInfo/Dto/MoldCreateDto.cs
  9. 1 0
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MoldInfo/Dto/MoldDto.cs
  10. 2 0
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MoldInfo/Dto/MoldUpdateDto.cs
  11. 10 2
      src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MoldInfo/MoldsApplicationService.cs
  12. 19 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/BindMold/SelectMoldStartDto.cs
  13. 10 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/IProductionOrdersApplicationService.cs
  14. 94 1
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/ProductionOrdersApplicationService.cs
  15. 1 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ShwasherSys.Application.csproj
  16. 2 0
      src_0nline/ShwasherSys/ShwasherSys.Core/CompanyInfo/DeviceMgPlan.cs
  17. 2 0
      src_0nline/ShwasherSys/ShwasherSys.Core/CompanyInfo/Mold.cs
  18. 34 0
      src_0nline/ShwasherSys/ShwasherSys.Core/ProductionOrderInfo/MoldProductionRecord.cs
  19. 1 0
      src_0nline/ShwasherSys/ShwasherSys.Core/ShwasherSys.Core.csproj
  20. 9 5
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/EntityFramework/DbContext.cs
  21. 0 20
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112100327261_init.cs
  22. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112100327261_init.resx
  23. 0 29
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112190826495_updateordersend.Designer.cs
  24. 0 26
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112190826495_updateordersend.cs
  25. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112190826495_updateordersend.resx
  26. 0 29
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112280809562_update_ordersend_sort.Designer.cs
  27. 0 34
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112280809562_update_ordersend_sort.cs
  28. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112280809562_update_ordersend_sort.resx
  29. 0 34
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010718122_updateordersendfee.cs
  30. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010718122_updateordersendfee.resx
  31. 0 29
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010744005_updateordersendaddfee.Designer.cs
  32. 0 20
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010744005_updateordersendaddfee.cs
  33. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010744005_updateordersendaddfee.resx
  34. 0 29
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301010903570_add-ScheduleOrderSend.Designer.cs
  35. 0 62
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301010903570_add-ScheduleOrderSend.cs
  36. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301010903570_add-ScheduleOrderSend.resx
  37. 0 29
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091141462_addStandardCatelog.Designer.cs
  38. 0 90
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091141462_addStandardCatelog.cs
  39. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091141462_addStandardCatelog.resx
  40. 0 29
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091156360_updateStandardCatelog.Designer.cs
  41. 0 20
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091156360_updateStandardCatelog.cs
  42. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091156360_updateStandardCatelog.resx
  43. 0 29
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202303090653567_updateStandardDetail.Designer.cs
  44. 0 42
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202303090653567_updateStandardDetail.cs
  45. 0 120
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202303090653567_updateStandardDetail.resx
  46. 1 1
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260241009_init.Designer.cs
  47. 2167 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260241009_init.cs
  48. 120 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260241009_init.resx
  49. 3 3
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260251076_addMoldProductionRecord.Designer.cs
  50. 40 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260251076_addMoldProductionRecord.cs
  51. 120 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260251076_addMoldProductionRecord.resx
  52. 10 59
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/ShwasherSys.EntityFramework.csproj
  53. 1 0
      src_0nline/ShwasherSys/ShwasherSys.Web/Content/Scripts/MyScript/iwb.js
  54. 61 14
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/Company/DeviceMgPlan.cshtml
  55. 10 4
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/Company/Mold.cshtml
  56. 1 1
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/Home/home.js
  57. 1 1
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/ProductionOrderMg.cshtml
  58. 84 2
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/_EnterStoreShare.cshtml
  59. 6 1
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/Shared/Modals/Query/_Mold.cshtml

+ 17 - 1
src_0nline/ShwasherSys/ShwasherSys.Application/Common/CommonAppService.cs

@@ -37,6 +37,7 @@ using ShwasherSys.BasicInfo;
 using ShwasherSys.Common.Dto;
 using ShwasherSys.Common.Dto.HomeChartDto;
 using ShwasherSys.CompanyInfo;
+using ShwasherSys.CompanyInfo.DeviceInfo.Dto;
 using ShwasherSys.CustomerInfo;
 using ShwasherSys.EntityFramework;
 using ShwasherSys.Hubs;
@@ -89,9 +90,10 @@ namespace ShwasherSys.Common
         public IRepository<Employee> EmployeeRepository { get; }
         public IRepository<ViewPackageApply> ViewPackageApplyRepository { get; }
         public IRepository<SemiProducts, string> SemiProductsRepository { get; }
+        public IRepository<DeviceMgPlan> DeviceMgPlanRepository { get; }
         
 
-        public CommonAppService(ICacheManager cacheManager,  IRepository<ShortMsgDetail> shortMsgDetailRepository, IRepository<ShortMessage> shortMsgRepository, IRepository<SysUser, long> sysUserRepository, IUnitOfWorkManager unitOfWorkManager, IRepository<SysAttachFile> sysAttachFileRepository, IRepository<OrderHeader, string> orderHeaderRepository, IRepository<ViewOrderSend> viewOrderSendRepository, ISqlExecuter sqlExecuter, IEmailSender emailSender, IRepository<CurrentProductStoreHouse> currentProductStoreHouseRepository, IRepository<CurrentSemiStoreHouse> currentSemiStoreHouseRepository, IRepository<StoreHouseLocation> storeHouseLocationRepository, IRepository<CustomerDisabledProduct> cdpRepository, IRepository<ProductionOrder> productionOrderRepository, ISmtpEmailSenderConfiguration smtpEmailSenderConfiguration, IRepository<Customer, string> customerRepository, IRepository<CustomerDisabledProduct> customerDisabledProductRepository, IRepository<SemiEnterStore> semiEnterStoreRepository, IRepository<Department, string> departmentRepository, IRepository<SemiProducts, string> semiProductRepository, IRepository<Product, string> productRepository, IRepository<ProductMapper> productMapperRepository, EmailMsgSendHandler emailMsgSendHandler, IStatesAppService statesAppService, IRepository<Employee> employeeRepository,IRepository<ViewPackageApply> viewPackageApplyRepository, IRepository<SemiProducts, string> semiProductsRepository)
+        public CommonAppService(ICacheManager cacheManager,  IRepository<ShortMsgDetail> shortMsgDetailRepository, IRepository<ShortMessage> shortMsgRepository, IRepository<SysUser, long> sysUserRepository, IUnitOfWorkManager unitOfWorkManager, IRepository<SysAttachFile> sysAttachFileRepository, IRepository<OrderHeader, string> orderHeaderRepository, IRepository<ViewOrderSend> viewOrderSendRepository, ISqlExecuter sqlExecuter, IEmailSender emailSender, IRepository<CurrentProductStoreHouse> currentProductStoreHouseRepository, IRepository<CurrentSemiStoreHouse> currentSemiStoreHouseRepository, IRepository<StoreHouseLocation> storeHouseLocationRepository, IRepository<CustomerDisabledProduct> cdpRepository, IRepository<ProductionOrder> productionOrderRepository, ISmtpEmailSenderConfiguration smtpEmailSenderConfiguration, IRepository<Customer, string> customerRepository, IRepository<CustomerDisabledProduct> customerDisabledProductRepository, IRepository<SemiEnterStore> semiEnterStoreRepository, IRepository<Department, string> departmentRepository, IRepository<SemiProducts, string> semiProductRepository, IRepository<Product, string> productRepository, IRepository<ProductMapper> productMapperRepository, EmailMsgSendHandler emailMsgSendHandler, IStatesAppService statesAppService, IRepository<Employee> employeeRepository,IRepository<ViewPackageApply> viewPackageApplyRepository, IRepository<SemiProducts, string> semiProductsRepository, IRepository<DeviceMgPlan> deviceMgPlanRepository)
         {
             ShortMsgDetailRepository = shortMsgDetailRepository;
             ShortMsgRepository = shortMsgRepository;
@@ -121,6 +123,7 @@ namespace ShwasherSys.Common
             EmployeeRepository = employeeRepository;
             ViewPackageApplyRepository = viewPackageApplyRepository;
             SemiProductsRepository = semiProductsRepository;
+            DeviceMgPlanRepository = deviceMgPlanRepository;
         }
 
         public string KeepClock()
@@ -642,6 +645,19 @@ namespace ShwasherSys.Common
                 int c2 = await query2.CountAsync();
                 result.Add(new IndexAlertSumDto() { Quantity = c2, SumName = "未审核的包装申请", SumType = "3", TipName = "包装" });
             }
+            if (user.UserType == 1 )
+            {
+                var overAndComingSoon = await DeviceMgPlanRepository.GetAllListAsync(i => i.PlanType == 1
+                    && (
+                        i.NumberOfUsers >= i.MaintenanceCycle || (
+                        i.MaintenanceCycle > i.NumberOfUsers
+                        && ((i.MaintenanceCycle - i.NumberOfUsers) <= 10000))
+                        )
+                    );
+                //var overDtos = ObjectMapper.Map<List<DeviceMgPlanDto>>(over);
+                var overAndComingSoonDtos = ObjectMapper.Map<List<DeviceMgPlanDto>>(overAndComingSoon);
+                result.Add(new IndexAlertSumDto() { Quantity = overAndComingSoonDtos.Count, SumName = "模具待维护计划", SumType = "4", TipName = "pro2" });
+            }
             return result;
         }
 

+ 31 - 4
src_0nline/ShwasherSys/ShwasherSys.Application/Common/QueryAppService.cs

@@ -31,6 +31,7 @@ using ShwasherSys.BasicInfo.OutFactory.Dto;
 using ShwasherSys.BasicInfo.StoreHouseLocations.Dto;
 using ShwasherSys.Common.Dto;
 using ShwasherSys.CompanyInfo;
+using ShwasherSys.CompanyInfo.DeviceInfo.Dto;
 using ShwasherSys.CompanyInfo.FixedAssetInfo.Dto;
 using ShwasherSys.CompanyInfo.MoldInfo.Dto;
 using ShwasherSys.CustomerInfo;
@@ -153,7 +154,13 @@ namespace ShwasherSys.Common
 
 		Task<PagedResultDto<ViewCurrentSemiStoreHouse>> QueryViewCurrentSemiStoreHouseByProNo(PagedRequestDto input);
 
-		#endregion
+        #endregion
+
+        #region 2024
+
+        Task<Dictionary<int, List<DeviceMgPlanDto>>> QueryNeedMaintenanceMoldPlan();
+
+        #endregion
 
     }
     [AbpAuthorize,DisableAuditing]
@@ -171,7 +178,7 @@ namespace ShwasherSys.Common
             IRepository<Product, string> productRepository,
             IRepository<StoreHouseLocation> shlRepository,
             IIwbSettingManager settingManager,
-            ICacheManager cacheManager, IRepository<CustomerDefaultProduct> customerDefaultProductRepository, IRepository<CustomerSend> customerSendRepository, IRepository<OrderHeader, string> orderHeaderRepository, IRepository<CurrentProductStoreHouse> currentProductStoreHouseRepository, IRepository<BulletinInfo> bulletinInfoRepository, IRepository<ShortMessage> shortMessageRepository, IRepository<ShortMsgDetail> shortMsgDetailRepository, IRepository<StoreHouse> storeHouseRepository, IRepository<ViewSemiEnterStore> viewSemiEnterStoreRepository, IRepository<OutFactory, string> outFactoryRepository, IRepository<TemplateInfo> templateInfoRepository, IRepository<Currency, string> currencyRepository, IRepository<CurrencyExchangeRate> currencyExchangeRateRepository, IRepository<ViewEmployee> viewEmployeeRepository, IRepository<RmProduct, string> rmRepository, IRepository<ViewCurrentRmStoreHouse, string> viewCurrentRmStoreHouseRepository, IRepository<ProductionLog> productionLogRepository, IRepository<CustomerDisabledProduct> customerDisabledProductRepository, IRepository<ExpressLogistics> expressRepository, IRepository<Mold> moldRepository, IRepository<FixedAsset> fixedAssetRepository, IRepository<ViewOrderSend> viewOrderSendRepository, IRepository<ViewStickBill, string> viewStickBillRepository, IRepository<ProductProperty> productPropertyRepository, IRepository<ViewOrderItems> viewOrderItemsRepository, IRepository<OrderProduction> orderProductionRepository, IRepository<ProductionOrder> productionOrderRepository, IRepository<PackageApply> packageApplyRepository, IRepository<ViewCurrentProductStoreHouse> viewCurrentProductStoreHouseRepository, IRepository<ViewCurrentSemiStoreHouse> viewCurrentSemiStoreHouseRepository)
+            ICacheManager cacheManager, IRepository<CustomerDefaultProduct> customerDefaultProductRepository, IRepository<CustomerSend> customerSendRepository, IRepository<OrderHeader, string> orderHeaderRepository, IRepository<CurrentProductStoreHouse> currentProductStoreHouseRepository, IRepository<BulletinInfo> bulletinInfoRepository, IRepository<ShortMessage> shortMessageRepository, IRepository<ShortMsgDetail> shortMsgDetailRepository, IRepository<StoreHouse> storeHouseRepository, IRepository<ViewSemiEnterStore> viewSemiEnterStoreRepository, IRepository<OutFactory, string> outFactoryRepository, IRepository<TemplateInfo> templateInfoRepository, IRepository<Currency, string> currencyRepository, IRepository<CurrencyExchangeRate> currencyExchangeRateRepository, IRepository<ViewEmployee> viewEmployeeRepository, IRepository<RmProduct, string> rmRepository, IRepository<ViewCurrentRmStoreHouse, string> viewCurrentRmStoreHouseRepository, IRepository<ProductionLog> productionLogRepository, IRepository<CustomerDisabledProduct> customerDisabledProductRepository, IRepository<ExpressLogistics> expressRepository, IRepository<Mold> moldRepository, IRepository<FixedAsset> fixedAssetRepository, IRepository<ViewOrderSend> viewOrderSendRepository, IRepository<ViewStickBill, string> viewStickBillRepository, IRepository<ProductProperty> productPropertyRepository, IRepository<ViewOrderItems> viewOrderItemsRepository, IRepository<OrderProduction> orderProductionRepository, IRepository<ProductionOrder> productionOrderRepository, IRepository<PackageApply> packageApplyRepository, IRepository<ViewCurrentProductStoreHouse> viewCurrentProductStoreHouseRepository, IRepository<ViewCurrentSemiStoreHouse> viewCurrentSemiStoreHouseRepository, IRepository<DeviceMgPlan> deviceMgPlanRepository)
         {
             CustomerRepository = customerRepository;
             CurrentSemiRepository = currentSemiRepository;
@@ -211,6 +218,7 @@ namespace ShwasherSys.Common
             ViewCurrentProductStoreHouseRepository = viewCurrentProductStoreHouseRepository;
             ViewCurrentSemiStoreHouseRepository = viewCurrentSemiStoreHouseRepository;
             AsyncQueryableExecuter = NullAsyncQueryableExecuter.Instance;
+            DeviceMgPlanRepository = deviceMgPlanRepository;
         }
         protected IRepository<FixedAsset> FixedAssetRepository { get; }
         protected IRepository<Mold> MoldRepository { get; }
@@ -254,6 +262,7 @@ namespace ShwasherSys.Common
         protected IRepository<ViewCurrentProductStoreHouse> ViewCurrentProductStoreHouseRepository { get; }
        
         protected IRepository<ViewCurrentSemiStoreHouse> ViewCurrentSemiStoreHouseRepository { get; }
+        protected IRepository<DeviceMgPlan> DeviceMgPlanRepository { get; }
 
 		/// <summary>
 		/// 查询快递名称
@@ -1481,7 +1490,25 @@ namespace ShwasherSys.Common
 			);
 			return dtos;
 		}
-		#endregion
+        #endregion
+
+        #region 2024
 
-	}
+        public  async Task<Dictionary<int, List<DeviceMgPlanDto>>> QueryNeedMaintenanceMoldPlan()
+        {
+            Dictionary<int, List<DeviceMgPlanDto>> result = new Dictionary<int, List<DeviceMgPlanDto>>();
+            var over =await DeviceMgPlanRepository.GetAllListAsync(i=>i.PlanType==1&&i.NumberOfUsers>=i.MaintenanceCycle );
+            var comingSoon = await DeviceMgPlanRepository.GetAllListAsync(i => i.PlanType == 1
+                                                                               && i.MaintenanceCycle > i.NumberOfUsers
+                                                                               && ((i.MaintenanceCycle -
+                                                                                   i.NumberOfUsers) >= 10000));
+            var overDtos = ObjectMapper.Map<List<DeviceMgPlanDto>>(over);
+            var comingsoonDtos = ObjectMapper.Map<List<DeviceMgPlanDto>>(comingSoon);
+            result.Add(1,overDtos);
+            result.Add(2, comingsoonDtos);
+            return result;
+        }
+        #endregion
+
+    }
 }

+ 51 - 4
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/DeviceInfo/DeviceMgPlansApplicationService.cs

@@ -13,6 +13,10 @@ using IwbZero.AppServiceBase;
 using IwbZero.Helper;
 using ShwasherSys.Authorization.Permissions;
 using ShwasherSys.CompanyInfo.DeviceInfo.Dto;
+using ShwasherSys.ProductStoreInfo;
+using System.Linq.Dynamic.Core;
+using Abp.Extensions;
+
 namespace ShwasherSys.CompanyInfo.DeviceInfo
 {
     [AbpAuthorize, AuditLog("设备维护计划")]
@@ -69,8 +73,13 @@ namespace ShwasherSys.CompanyInfo.DeviceInfo
         [AbpAuthorize(PermissionNames.PagesCompanyDieMaintenanceDeviceMgPlan)]
         public override async Task Create(DeviceMgPlanCreateDto input)
         {
+            var entity = await Repository.FirstOrDefaultAsync(i=>i.DeviceNo==input.DeviceNo && i.PlanType==input.PlanType);
+            if (entity != null)
+            {
+                CheckErrors("设备计划已经存在!请留意修改计划有效期!!");
+            }
             input.No = await MaintainTypeDefinition.GetDeviceMgPlanNo(Repository, input.PlanType);
-            input.NextMaintenanceDate = input.MaintenanceDate.AddDays(input.MaintenanceCycle);
+            input.NextMaintenanceDate = input.PlanType != 1 ? input.MaintenanceDate.AddDays(input.MaintenanceCycle) : input.MaintenanceDate;
             await CreateEntity(input);
         }
 
@@ -83,7 +92,7 @@ namespace ShwasherSys.CompanyInfo.DeviceInfo
                 CheckErrors("未查询到记录");
                 return;
             }
-            entity.NextMaintenanceDate = entity.MaintenanceDate.AddDays(input.MaintenanceCycle);
+            entity.NextMaintenanceDate = input.PlanType != 1 ? entity.MaintenanceDate.AddDays(input.MaintenanceCycle): entity.MaintenanceDate;
             MapToEntity(input,entity);
             await Repository.UpdateAsync(entity);
             await CurrentUnitOfWork.SaveChangesAsync();
@@ -99,8 +108,46 @@ namespace ShwasherSys.CompanyInfo.DeviceInfo
         [AbpAuthorize(PermissionNames.PagesCompanyDieMaintenanceDeviceMgPlanQuery)]
         public override async Task<PagedResultDto<DeviceMgPlanDto>> GetAll(IwbPagedRequestDto input)
         {
-            var query = CreateFilteredQuery(input);
-            query = ApplyFilter(query, input);
+            var query =Repository.GetAll();
+            //query = ApplyFilter(query, input);
+            string mpTypeVal = "";
+            if (input.SearchList != null && input.SearchList.Count > 0)
+            {
+                List<LambdaObject> objList = new List<LambdaObject>();
+                foreach (var o in input.SearchList)
+                {
+                    if (o.KeyWords.IsNullOrEmpty())
+                        continue;
+                    if (o.KeyField == "mpType")
+                    {
+                        mpTypeVal = o.KeyWords.ToString();
+                        continue;
+                    }
+                    object keyWords = o.KeyWords;
+                    objList.Add(new LambdaObject
+                    {
+                        FieldType = (LambdaFieldType)o.FieldType,
+                        FieldName = o.KeyField,
+                        FieldValue = keyWords,
+                        ExpType = (LambdaExpType)o.ExpType
+                    });
+                }
+                if (objList.Any())
+                {
+                    var exp = objList.GetExp<DeviceMgPlan>();
+                    query = query.Where(exp);
+                }
+            }
+            //过滤出模具需要维护和即将要维护的记录
+            if (mpTypeVal == "1")
+            {
+                query = query.Where(i => i.PlanType == 1
+                                         && (
+                                             i.NumberOfUsers >= i.MaintenanceCycle || (
+                                                 i.MaintenanceCycle > i.NumberOfUsers
+                                                 && ((i.MaintenanceCycle - i.NumberOfUsers) <= 10000))
+                                         ));
+            }
             var totalCount = await AsyncQueryableExecuter.CountAsync(query);
             query = ApplySorting(query, input).OrderByDescending(a=>a.NextMaintenanceDate);
             query = ApplyPaging(query, input);

+ 2 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/DeviceInfo/Dto/DeviceMgPlanCreateDto.cs

@@ -55,5 +55,7 @@ namespace ShwasherSys.CompanyInfo.DeviceInfo.Dto
         /// 下一次维护时间
         /// </summary>   
 		public DateTime? NextMaintenanceDate  { get; set; }
+
+        public int NumberOfUsers { get; set; }
     }
 }

+ 2 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/DeviceInfo/Dto/DeviceMgPlanDto.cs

@@ -51,5 +51,7 @@ namespace ShwasherSys.CompanyInfo.DeviceInfo.Dto
         /// 下一次维护时间
         /// </summary>   
 		public DateTime NextMaintenanceDate  { get; set; }
+
+        public int NumberOfUsers { get; set; }
     }
 }

+ 13 - 11
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/DeviceInfo/Dto/DeviceMgPlanUpdateDto.cs

@@ -46,16 +46,18 @@ namespace ShwasherSys.CompanyInfo.DeviceInfo.Dto
         /// 维护周期
         /// </summary>   
         public int MaintenanceCycle  { get; set; }
-     
-        
-  //      /// <summary>
-  //      /// 维护时间
-  //      /// </summary>   
-		//public DateTime? MaintenanceDate  { get; set; }
-        
-  //      /// <summary>
-  //      /// 下一次维护时间
-  //      /// </summary>   
-		//public DateTime? NextMaintenanceDate  { get; set; }
+
+        public int NumberOfUsers { get; set; }
+
+
+        //      /// <summary>
+        //      /// 维护时间
+        //      /// </summary>   
+        //public DateTime? MaintenanceDate  { get; set; }
+
+        //      /// <summary>
+        //      /// 下一次维护时间
+        //      /// </summary>   
+        //public DateTime? NextMaintenanceDate  { get; set; }
     }
 }

+ 18 - 8
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MaintenanceRecordInfo/MaintenanceRecordsApplicationService.cs

@@ -290,7 +290,7 @@ namespace ShwasherSys.CompanyInfo.MaintenanceRecordInfo
             }
 
             var ms = await MmRepository.GetAllIncluding(a=>a.EmployeeInfo).Where(a => a.MaintenanceNo == entity.Id).ToListAsync();
-            if (ms == null || !ms.Any())
+            if (!ms.Any())
             {
                 CheckErrors("未查询维护成员记录,请检查后再操作!");
                 return;
@@ -298,16 +298,26 @@ namespace ShwasherSys.CompanyInfo.MaintenanceRecordInfo
             entity.CompleteState = MaintainStateDefinition.Complete;
             entity.CompleteDate = input.CompleteDate ?? DateTime.Now;
             await Repository.UpdateAsync(entity);
-            if (entity.MgType == MaintainTypeDefinition.Mold)
+            
+            if (entity.MgType == MaintainTypeDefinition.Mold)//模具维护之后更新使用次数为0
             {
-                var mold = await MoldRepository.FirstOrDefaultAsync(a => a.No == entity.DeviceMgPlanNo);
-                if (mold != null)
+                // var mold = await MoldRepository.FirstOrDefaultAsync(a => a.No == entity.DeviceMgPlanNo);
+                // if (mold != null)
+                // {
+                //    // mold.MaintenanceDate = entity.CompleteDate ?? DateTime.Now;
+                //    // mold.NextMaintenanceDate = mold.MaintenanceDate.AddDays(mold.MaintenanceCycle);
+                //     await MoldRepository.UpdateAsync(mold);
+                // }
+
+                var plan = await DeviceRepository.FirstOrDefaultAsync(a => a.No == entity.DeviceMgPlanNo);
+                if (plan != null)
                 {
-                   // mold.MaintenanceDate = entity.CompleteDate ?? DateTime.Now;
-                   // mold.NextMaintenanceDate = mold.MaintenanceDate.AddDays(mold.MaintenanceCycle);
-                    await MoldRepository.UpdateAsync(mold);
+                    plan.MaintenanceDate = entity.CompleteDate ?? DateTime.Now;
+                    plan.NumberOfUsers = 0;
+                    await DeviceRepository.UpdateAsync(plan);
                 }
-            }else if (entity.MgType == MaintainTypeDefinition.Device)
+            }
+            else if (entity.MgType == MaintainTypeDefinition.Device)
             {
                 var device = await DeviceRepository.FirstOrDefaultAsync(a => a.No == entity.DeviceMgPlanNo);
                 if (device != null)

+ 2 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MoldInfo/Dto/MoldCreateDto.cs

@@ -71,5 +71,7 @@ namespace ShwasherSys.CompanyInfo.MoldInfo.Dto
         public string Height { get; set; }
          [MaxLength(Mold.RigidityMaxLength)]
         public string Rigidity { get; set; }
+
+        public int MaintenanceCycle { get; set; }
     }
 }

+ 1 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MoldInfo/Dto/MoldDto.cs

@@ -62,5 +62,6 @@ namespace ShwasherSys.CompanyInfo.MoldInfo.Dto
         public string Height { get; set; }
      //   [MaxLength(RigidityMaxLength)]
         public string Rigidity { get; set; }
+
     }
 }

+ 2 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MoldInfo/Dto/MoldUpdateDto.cs

@@ -79,5 +79,7 @@ namespace ShwasherSys.CompanyInfo.MoldInfo.Dto
         public string Height { get; set; }
         [StringLength(Mold.RigidityMaxLength)]
         public string Rigidity { get; set; }
+
+       
     }
 }

+ 10 - 2
src_0nline/ShwasherSys/ShwasherSys.Application/CompanyInfo/MoldInfo/MoldsApplicationService.cs

@@ -14,17 +14,19 @@ using ShwasherSys.CompanyInfo.DeviceInfo.Dto;
 using ShwasherSys.CompanyInfo.MoldInfo.Dto;
 namespace ShwasherSys.CompanyInfo.MoldInfo
 {
-    [AbpAuthorize, AuditLog("模具维护计划")]
+    [AbpAuthorize, AuditLog("模具维护")]
     public class MoldAppService : IwbZeroAsyncCrudAppService<Mold, MoldDto, int, IwbPagedRequestDto, MoldCreateDto, MoldUpdateDto >, IMoldAppService
     {
         public MoldAppService(
 			ICacheManager cacheManager,
-			IRepository<Mold, int> repository, IRepository<MaintenanceRecord, string> mrRepository) : base(repository, "")
+			IRepository<Mold, int> repository, IRepository<MaintenanceRecord, string> mrRepository, IRepository<DeviceMgPlan, int> dpRepository) : base(repository, "")
         {
             MrRepository = mrRepository;
+            DpRepository = dpRepository;
             CacheManager = cacheManager;
         }
         protected IRepository<MaintenanceRecord,string> MrRepository { get; }
+        protected IRepository<DeviceMgPlan, int> DpRepository { get; }
         protected override bool KeyIsAuto { get; set; } = false;
 
         #region GetSelect
@@ -81,6 +83,12 @@ namespace ShwasherSys.CompanyInfo.MoldInfo
         [AbpAuthorize(PermissionNames.PagesCompanyDieMaintenanceMoldDelete)]
         public override Task Delete(EntityDto<int> input)
         {
+            var mold = Repository.Get(input.Id);
+            var mgPlan = DpRepository.FirstOrDefault(i=>i.DeviceNo==mold.No);
+            if (mgPlan != null)
+            {
+                CheckErrors("模具已经创建维护计划!请先删除维护计划!");
+            }
             return Repository.DeleteAsync(input.Id);
         }
         

+ 19 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/BindMold/SelectMoldStartDto.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShwasherSys.ProductionOrderInfo.Dto.BindMold
+{
+    public class SelectMoldStartDto
+    {
+
+        public int Id { get; set; }
+
+        public string Name { get; set; }
+
+        public string DeviceNo { get; set; }
+        public string ProductionOrderNo { get; set; }
+    }
+}

+ 10 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/IProductionOrdersApplicationService.cs

@@ -4,8 +4,11 @@ using Abp.Application.Services.Dto;
 using Abp.Domain.Entities;
 using IwbZero.AppServiceBase;
 using ShwasherSys.Common.Dto;
+using ShwasherSys.CompanyInfo;
+using ShwasherSys.CompanyInfo.MoldInfo.Dto;
 using ShwasherSys.Order;
 using ShwasherSys.ProductionOrderInfo.Dto;
+using ShwasherSys.ProductionOrderInfo.Dto.BindMold;
 using ShwasherSys.ProductionOrderInfo.Dto.BindOrder;
 using ShwasherSys.ProductStoreInfo.Dto;
 using ShwasherSys.SemiProductStoreInfo;
@@ -75,5 +78,12 @@ namespace ShwasherSys.ProductionOrderInfo
 
         //变更排产单类型
         Task<ProductionOrderDto> UpdateProductionType(ProductionTypeUpdateDto input);
+        #region 绑定模具
+        Task<ProductionOrderDto> SelectMoldStart(SelectMoldStartDto input);
+        Task<ProductionOrderDto> SelectMold(SelectMoldStartDto input);
+        Task<MoldDto> GetMoldRecord(string productionOrderNo);
+        #endregion
+
+
     }
 }

+ 94 - 1
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/ProductionOrdersApplicationService.cs

@@ -24,6 +24,7 @@ using JetBrains.Annotations;
 using Microsoft.AspNet.Identity;
 using Newtonsoft.Json;
 using NPOI.HSSF.UserModel;
+using NPOI.SS.Formula.Functions;
 using ShwasherSys.Authorization.Permissions;
 using ShwasherSys.BaseSysInfo;
 using ShwasherSys.BasicInfo.OutFactory;
@@ -42,8 +43,11 @@ using LambdaFieldType = ShwasherSys.Lambda.LambdaFieldType;
 using LambdaObject = ShwasherSys.Lambda.LambdaObject;
 using ShwasherSys.BaseSysInfo.States;
 using ShwasherSys.Common.Dto;
+using ShwasherSys.CompanyInfo.MoldInfo.Dto;
 using ShwasherSys.Order;
+using ShwasherSys.ProductionOrderInfo.Dto.BindMold;
 using ShwasherSys.ProductionOrderInfo.Dto.BindOrder;
+using ShwasherSys.Migrations;
 
 namespace ShwasherSys.ProductionOrderInfo
 {
@@ -74,7 +78,10 @@ namespace ShwasherSys.ProductionOrderInfo
         protected IStatesAppService StatesAppService;
         protected IRepository<OrderProduction> OrderProductionRepository { get; }
         protected IRepository<ViewOrderItems> ViewOrderItemsRepository { get; }
-        public ProductionOrdersAppService(IRepository<ProductionOrder, int> repository, IRepository<BusinessLog> logRepository, IRepository<SemiEnterStore> semiEnterStoreRepository, IRepository<SemiOutStore> semiOutStoreRepository, IRepository<ViewSemiEnterStore> viewSemiEnterStoreRepository, IRepository<CurrentSemiStoreHouse> currentSemiStoreHouseRepository, IRepository<ViewSemiOutStore> viewSemiOutStoreRepository, IRepository<SemiProducts, string> semiProductRepository, IRepository<OutFactory, string> outFactoryRepository, IRepository<ProductionLog> productLogRepository, IRepository<EmployeeWorkPerformance> performanceRepository, IRepository<RmOutStore, string> orsRepository, IRepository<RmEnterStore, string> ersRepository, IRepository<CurrentRmStoreHouse, string> crsRepository, ICommonAppService commonAppService, IRepository<ViewProductOutStore> viewProductOutStoreRepository, IRepository<ProductOutStore> productOutStoreRepository, IRepository<CurrentProductStoreHouse> currentProductStoreHouseRepository, IRepository<Product, string> productRepository, IStatesAppService statesAppService, IIwbSettingManager settingManager, IRepository<OrderProduction> orderProductionRepository, IRepository<ViewOrderItems> viewOrderItemsRepository) : base(repository, "ProductionOrderNo")
+        protected IRepository<Mold> MoldRepository { get; }
+        protected IRepository<MoldProductionRecord,long> MoldProductionRecordRepository { get; }
+        protected IRepository<DeviceMgPlan> DeviceMgPlanRepository { get; }
+        public ProductionOrdersAppService(IRepository<ProductionOrder, int> repository, IRepository<BusinessLog> logRepository, IRepository<SemiEnterStore> semiEnterStoreRepository, IRepository<SemiOutStore> semiOutStoreRepository, IRepository<ViewSemiEnterStore> viewSemiEnterStoreRepository, IRepository<CurrentSemiStoreHouse> currentSemiStoreHouseRepository, IRepository<ViewSemiOutStore> viewSemiOutStoreRepository, IRepository<SemiProducts, string> semiProductRepository, IRepository<OutFactory, string> outFactoryRepository, IRepository<ProductionLog> productLogRepository, IRepository<EmployeeWorkPerformance> performanceRepository, IRepository<RmOutStore, string> orsRepository, IRepository<RmEnterStore, string> ersRepository, IRepository<CurrentRmStoreHouse, string> crsRepository, ICommonAppService commonAppService, IRepository<ViewProductOutStore> viewProductOutStoreRepository, IRepository<ProductOutStore> productOutStoreRepository, IRepository<CurrentProductStoreHouse> currentProductStoreHouseRepository, IRepository<Product, string> productRepository, IStatesAppService statesAppService, IIwbSettingManager settingManager, IRepository<OrderProduction> orderProductionRepository, IRepository<ViewOrderItems> viewOrderItemsRepository, IRepository<Mold> moldRepository, IRepository<MoldProductionRecord, long> moldProductionRecordRepository, IRepository<DeviceMgPlan> deviceMgPlanRepository) : base(repository, "ProductionOrderNo")
         {
             LogRepository = logRepository;
             SemiEnterStoreRepository = semiEnterStoreRepository;
@@ -98,6 +105,10 @@ namespace ShwasherSys.ProductionOrderInfo
             OrderProductionRepository = orderProductionRepository;
             ViewOrderItemsRepository = viewOrderItemsRepository;
             SettingManager = settingManager;
+
+            MoldRepository = moldRepository;
+            MoldProductionRecordRepository = moldProductionRecordRepository;
+            DeviceMgPlanRepository = deviceMgPlanRepository;
         }
 		protected override bool KeyIsAuto { get; set; } = false;
 		protected override string GetPermissionName { get; set; } = PermissionNames.PagesProductionInfoProductionOrderMg;
@@ -2203,6 +2214,88 @@ namespace ShwasherSys.ProductionOrderInfo
             return MapToEntityDto(entity);
         }
 
+
+
+        #region 绑定模具
+
+        public async Task<ProductionOrderDto> SelectMoldStart(SelectMoldStartDto input)
+        {
+            var entity = await Repository.FirstOrDefaultAsync(a => a.Id == input.Id);
+            entity.ProductionOrderStatus = ProductionOrderStatusEnum.Producting.ToInt();
+            if (!string.IsNullOrEmpty(input.DeviceNo))
+            {
+                await BindMold(input, entity);
+            }
+            entity = await Repository.UpdateAsync(entity);
+            BusinessLogTypeEnum.SStore.WriteLog(LogRepository, "半产品排产",
+                $"排产单状态变更为[{(ProductionOrderStatusEnum)entity.ProductionOrderStatus}]",
+                entity.ProductionOrderNo);
+            return MapToEntityDto(entity);
+        }
+        //目前模具使用次数只做增加,不做删除减少
+        private async Task BindMold(SelectMoldStartDto input,ProductionOrder order)
+        {
+            var mold =await MoldRepository.FirstOrDefaultAsync(i => i.No == input.DeviceNo);
+            if (mold == null)
+                CheckErrors(IdentityResult.Failed("模具信息查询失败!"));
+            // var moldProductionRecord = await MoldProductionRecordRepository.FirstOrDefaultAsync(i=>i.ProductionOrderNo== order.ProductionOrderNo);
+            // if (moldProductionRecord != null)
+            // {
+            //     CheckErrors(IdentityResult.Failed("排产单已经编辑过模具!"));
+            // }
+            var mgPlan = await DeviceMgPlanRepository.FirstOrDefaultAsync(i=>i.DeviceNo==input.DeviceNo&&i.PlanType==1);
+            if (mgPlan != null)
+            {
+                mgPlan.NumberOfUsers = mgPlan.NumberOfUsers + Convert.ToInt32(order.Quantity * 1000);
+                await DeviceMgPlanRepository.UpdateAsync(mgPlan);
+            }
+            else
+            {
+                mgPlan = new DeviceMgPlan()
+                {
+                    No = await MaintainTypeDefinition.GetDeviceMgPlanNo(DeviceMgPlanRepository, 1),
+                    Name = "",
+                    ExpireDate = DateTime.MaxValue,
+                    MaintenanceCycle = mold.MaintenanceCycle,
+                    MaintenanceDate = DateTime.Now,
+                    PlanType = 1,
+                    DeviceNo = input.DeviceNo,
+                    NumberOfUsers = Convert.ToInt32(order.Quantity * 1000)
+                };
+                await DeviceMgPlanRepository.InsertAsync(mgPlan);
+            }
+
+            //await MoldProductionRecordRepository.DeleteAsync(i => i.ProductionOrderNo == order.ProductionOrderNo);
+            MoldProductionRecord record = new MoldProductionRecord()
+            {
+                ProductionOrderNo = input.ProductionOrderNo,
+                MoldNo = input.DeviceNo,
+                Quantity = Convert.ToInt32(order.Quantity * 1000)
+            };
+            await MoldProductionRecordRepository.InsertAsync(record);
+        }
+
+        public async Task<ProductionOrderDto> SelectMold(SelectMoldStartDto input)
+        {
+            var entity = await Repository.FirstOrDefaultAsync(a => a.Id == input.Id);
+            await BindMold(input, entity);
+            return MapToEntityDto(entity);
+        }
+
+        public async Task<MoldDto> GetMoldRecord(string productionOrderNo)
+        {
+            var moldProductionRecords = await MoldProductionRecordRepository.GetAllListAsync(a => a.ProductionOrderNo == productionOrderNo);
+            var mrs = moldProductionRecords.OrderByDescending(i=>i.CreationTime);
+            var moldProductionRecord = mrs.FirstOrDefault();
+            if (moldProductionRecord != null)
+            {
+                var mold = await MoldRepository.FirstOrDefaultAsync(i => i.No == moldProductionRecord.MoldNo);
+                return ObjectMapper.Map<MoldDto>(mold);
+            }
+            return new MoldDto();
+        }
+        #endregion
+
     }
 }
 

+ 1 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ShwasherSys.Application.csproj

@@ -616,6 +616,7 @@
     <Compile Include="ProductInfo\Standard\Dto\StandardDetailUpdateDto.cs" />
     <Compile Include="ProductInfo\Standard\IStandardCatalogApplicationService.cs" />
     <Compile Include="ProductInfo\Standard\StandardCatalogApplicationService.cs" />
+    <Compile Include="ProductionOrderInfo\Dto\BindMold\SelectMoldStartDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\BindOrder\BindOrdersDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\ChangeProductionOrderStatusDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\ConfirmEnterStoreDto.cs" />

+ 2 - 0
src_0nline/ShwasherSys/ShwasherSys.Core/CompanyInfo/DeviceMgPlan.cs

@@ -62,5 +62,7 @@ namespace ShwasherSys.CompanyInfo
         public const int RemarkMaxLength = 500;
         [MaxLength(RemarkMaxLength)]
         public string Remark { get; set; }
+
+        public int NumberOfUsers { get; set; }
     }
 }

+ 2 - 0
src_0nline/ShwasherSys/ShwasherSys.Core/CompanyInfo/Mold.cs

@@ -71,5 +71,7 @@ namespace ShwasherSys.CompanyInfo
         [MaxLength(RigidityMaxLength)]
         public string Rigidity { get; set; }
 
+        public int MaintenanceCycle { get; set; }
+
     }
 }

+ 34 - 0
src_0nline/ShwasherSys/ShwasherSys.Core/ProductionOrderInfo/MoldProductionRecord.cs

@@ -0,0 +1,34 @@
+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 Abp.Domain.Entities;
+using Abp.Domain.Entities.Auditing;
+using ShwasherSys.Authorization.Users;
+
+namespace ShwasherSys.ProductionOrderInfo
+{
+    [Table("MoldProductionRecord")]
+    public class MoldProductionRecord:AuditedEntity<long,SysUser>
+    {
+        public const int ProductionOrderNoMaxLength = 11;
+        public const int NoMaxLength = 50;
+        //模具编号
+        [Required]
+        [StringLength(NoMaxLength)]
+        public string MoldNo { get; set; }
+
+        //排产单编号
+        [Required]
+        [StringLength(ProductionOrderNoMaxLength)]
+        public string ProductionOrderNo { get; set; }
+
+        //生产件数就是模具使用次数
+        public int Quantity { get; set; }
+
+
+    }
+}

+ 1 - 0
src_0nline/ShwasherSys/ShwasherSys.Core/ShwasherSys.Core.csproj

@@ -368,6 +368,7 @@
     <Compile Include="ProductInfo\ProductMapper.cs" />
     <Compile Include="ProductInfo\ProductProperty.cs" />
     <Compile Include="ProductInfo\RmProduct.cs" />
+    <Compile Include="ProductionOrderInfo\MoldProductionRecord.cs" />
     <Compile Include="ProductionOrderInfo\OrderProduction.cs" />
     <Compile Include="ProductStoreInfo\InventoryCheck.cs" />
     <Compile Include="ProductStoreInfo\ViewEnterOutProductStore.cs" />

+ 9 - 5
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/EntityFramework/DbContext.cs

@@ -208,17 +208,21 @@ namespace ShwasherSys.EntityFramework
         public IDbSet<StandardCatalog> StandardCatalog { get; set; }
         public IDbSet<StandardDetail> StandardDetail { get; set; }
 
-		#endregion
+        #endregion
+
+        #region 2024
+        public IDbSet<MoldProductionRecord> MoldProductionRecord { get; set; }
+        #endregion
 
-		//Example:
-		//public virtual IDbSet<User> Users { get; set; }
+        //Example:
+        //public virtual IDbSet<User> Users { get; set; }
 
-		/* NOTE: 
+        /* NOTE: 
          *   Setting "Default" to base class helps us when working migration commands on Package Manager Console.
          *   But it may cause problems when working Migrate.exe of EF. If you will apply migrations on command line, do not
          *   pass connection string name to base classes. ABP works either way.
          */
-		public ShwasherDbContext()
+        public ShwasherDbContext()
             : base("Default")
         {
 

+ 0 - 20
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112100327261_init.cs

@@ -1,20 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Data.Entity.Migrations;
-    
-    public partial class init : DbMigration
-    {
-        public override void Up()
-        {
-            //AddColumn("dbo.N_ViewOrderItems", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.N_ViewOrderItems", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-        }
-        
-        public override void Down()
-        {
-            DropColumn("dbo.N_ViewOrderItems", "MoldFee");
-            DropColumn("dbo.N_ViewOrderItems", "LogisticsFee");
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112100327261_init.resx


+ 0 - 29
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112190826495_updateordersend.Designer.cs

@@ -1,29 +0,0 @@
-// <auto-generated />
-namespace ShwasherSys.Migrations
-{
-    using System.CodeDom.Compiler;
-    using System.Data.Entity.Migrations;
-    using System.Data.Entity.Migrations.Infrastructure;
-    using System.Resources;
-    
-    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class updateordersend : IMigrationMetadata
-    {
-        private readonly ResourceManager Resources = new ResourceManager(typeof(updateordersend));
-        
-        string IMigrationMetadata.Id
-        {
-            get { return "202112190826495_updateordersend"; }
-        }
-        
-        string IMigrationMetadata.Source
-        {
-            get { return null; }
-        }
-        
-        string IMigrationMetadata.Target
-        {
-            get { return Resources.GetString("Target"); }
-        }
-    }
-}

+ 0 - 26
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112190826495_updateordersend.cs

@@ -1,26 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Data.Entity.Migrations;
-    
-    public partial class updateordersend : DbMigration
-    {
-        public override void Up()
-        {
-            AddColumn("dbo.OrderSend", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            AddColumn("dbo.OrderSend", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            AddColumn("dbo.ProductionOrders", "MaxQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
-            //AddColumn("dbo.N_ViewOrderSends", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.N_ViewOrderSends", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-        }
-        
-        public override void Down()
-        {
-            DropColumn("dbo.N_ViewOrderSends", "MoldFee");
-            DropColumn("dbo.N_ViewOrderSends", "LogisticsFee");
-            DropColumn("dbo.ProductionOrders", "MaxQuantity");
-            DropColumn("dbo.OrderSend", "MoldFee");
-            DropColumn("dbo.OrderSend", "LogisticsFee");
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112190826495_updateordersend.resx


+ 0 - 29
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112280809562_update_ordersend_sort.Designer.cs

@@ -1,29 +0,0 @@
-// <auto-generated />
-namespace ShwasherSys.Migrations
-{
-    using System.CodeDom.Compiler;
-    using System.Data.Entity.Migrations;
-    using System.Data.Entity.Migrations.Infrastructure;
-    using System.Resources;
-    
-    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class update_ordersend_sort : IMigrationMetadata
-    {
-        private readonly ResourceManager Resources = new ResourceManager(typeof(update_ordersend_sort));
-        
-        string IMigrationMetadata.Id
-        {
-            get { return "202112280809562_update_ordersend_sort"; }
-        }
-        
-        string IMigrationMetadata.Source
-        {
-            get { return null; }
-        }
-        
-        string IMigrationMetadata.Target
-        {
-            get { return Resources.GetString("Target"); }
-        }
-    }
-}

+ 0 - 34
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112280809562_update_ordersend_sort.cs

@@ -1,34 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Data.Entity.Migrations;
-    
-    public partial class update_ordersend_sort : DbMigration
-    {
-        public override void Up()
-        {
-            AddColumn("dbo.OrderSend", "SendBillSort", c => c.Int(nullable: false));
-            AddColumn("dbo.OrderSend", "StatementBillSort", c => c.Int(nullable: false));
-            //AddColumn("dbo.N_ViewOrderSends", "SendBillSort", c => c.Int(nullable: false));
-            //AddColumn("dbo.N_ViewOrderSends", "StatementBillSort", c => c.Int(nullable: false));
-            //AddColumn("dbo.vwOrderSendBill", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.vwOrderSendBill", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.vwOrderSendBill", "AfterTaxTotalprice", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.vwOrderSendBill", "SendBillSort", c => c.Int(nullable: false));
-            //AddColumn("dbo.vwOrderSendBill", "StatementBillSort", c => c.Int(nullable: false));
-        }
-        
-        public override void Down()
-        {
-            //DropColumn("dbo.vwOrderSendBill", "StatementBillSort");
-            //DropColumn("dbo.vwOrderSendBill", "SendBillSort");
-            //DropColumn("dbo.vwOrderSendBill", "AfterTaxTotalprice");
-            //DropColumn("dbo.vwOrderSendBill", "MoldFee");
-            //DropColumn("dbo.vwOrderSendBill", "LogisticsFee");
-            //DropColumn("dbo.N_ViewOrderSends", "StatementBillSort");
-            //DropColumn("dbo.N_ViewOrderSends", "SendBillSort");
-            DropColumn("dbo.OrderSend", "StatementBillSort");
-            DropColumn("dbo.OrderSend", "SendBillSort");
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112280809562_update_ordersend_sort.resx


+ 0 - 34
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010718122_updateordersendfee.cs

@@ -1,34 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Data.Entity.Migrations;
-    
-    public partial class updateordersendfee : DbMigration
-    {
-        public override void Up()
-        {
-            AddColumn("dbo.OrderSend", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            AddColumn("dbo.OrderSend", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "LocationRemark", c => c.String());
-            //AddColumn("dbo.N_ViewOrderItems", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.N_ViewOrderItems", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.N_ViewOrderSends", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.N_ViewOrderSends", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.vwOrderSendBill", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            //AddColumn("dbo.vwOrderSendBill", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-        }
-        
-        public override void Down()
-        {
-            //DropColumn("dbo.vwOrderSendBill", "MoldFeeAfterTax");
-            //DropColumn("dbo.vwOrderSendBill", "LogisticsFeeAfterTax");
-            //DropColumn("dbo.N_ViewOrderSends", "MoldFeeAfterTax");
-            //DropColumn("dbo.N_ViewOrderSends", "LogisticsFeeAfterTax");
-            //DropColumn("dbo.N_ViewOrderItems", "MoldFeeAfterTax");
-            //DropColumn("dbo.N_ViewOrderItems", "LogisticsFeeAfterTax");
-            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "LocationRemark");
-            DropColumn("dbo.OrderSend", "MoldFeeAfterTax");
-            DropColumn("dbo.OrderSend", "LogisticsFeeAfterTax");
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010718122_updateordersendfee.resx


+ 0 - 29
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010744005_updateordersendaddfee.Designer.cs

@@ -1,29 +0,0 @@
-// <auto-generated />
-namespace ShwasherSys.Migrations
-{
-    using System.CodeDom.Compiler;
-    using System.Data.Entity.Migrations;
-    using System.Data.Entity.Migrations.Infrastructure;
-    using System.Resources;
-    
-    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class updateordersendaddfee : IMigrationMetadata
-    {
-        private readonly ResourceManager Resources = new ResourceManager(typeof(updateordersendaddfee));
-        
-        string IMigrationMetadata.Id
-        {
-            get { return "202203010744005_updateordersendaddfee"; }
-        }
-        
-        string IMigrationMetadata.Source
-        {
-            get { return null; }
-        }
-        
-        string IMigrationMetadata.Target
-        {
-            get { return Resources.GetString("Target"); }
-        }
-    }
-}

+ 0 - 20
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010744005_updateordersendaddfee.cs

@@ -1,20 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Data.Entity.Migrations;
-    
-    public partial class updateordersendaddfee : DbMigration
-    {
-        public override void Up()
-        {
-            AddColumn("dbo.OrderItems", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-            AddColumn("dbo.OrderItems", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
-        }
-        
-        public override void Down()
-        {
-            DropColumn("dbo.OrderItems", "MoldFeeAfterTax");
-            DropColumn("dbo.OrderItems", "LogisticsFeeAfterTax");
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010744005_updateordersendaddfee.resx


+ 0 - 29
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301010903570_add-ScheduleOrderSend.Designer.cs

@@ -1,29 +0,0 @@
-// <auto-generated />
-namespace ShwasherSys.Migrations
-{
-    using System.CodeDom.Compiler;
-    using System.Data.Entity.Migrations;
-    using System.Data.Entity.Migrations.Infrastructure;
-    using System.Resources;
-    
-    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class addScheduleOrderSend : IMigrationMetadata
-    {
-        private readonly ResourceManager Resources = new ResourceManager(typeof(addScheduleOrderSend));
-        
-        string IMigrationMetadata.Id
-        {
-            get { return "202301010903570_add-ScheduleOrderSend"; }
-        }
-        
-        string IMigrationMetadata.Source
-        {
-            get { return null; }
-        }
-        
-        string IMigrationMetadata.Target
-        {
-            get { return Resources.GetString("Target"); }
-        }
-    }
-}

+ 0 - 62
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301010903570_add-ScheduleOrderSend.cs

@@ -1,62 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Data.Entity.Migrations;
-    
-    public partial class addScheduleOrderSend : DbMigration
-    {
-        public override void Up()
-        {
-            CreateTable(
-                "dbo.ScheduleOrderSend",
-                c => new
-                    {
-                        Id = c.Int(nullable: false, identity: true),
-                        OrderItemId = c.Int(nullable: false),
-                        Remark = c.String(maxLength: 500),
-                        PlanQuantity = c.Decimal(precision: 18, scale: 2),
-                        SendUser = c.String(maxLength: 32),
-                        PlanDate = c.DateTime(),
-                        SendState = c.Int(nullable: false),
-                        LastModificationTime = c.DateTime(),
-                        LastModifierUserId = c.Long(),
-                        CreationTime = c.DateTime(nullable: false),
-                        CreatorUserId = c.Long(),
-                    })
-                .PrimaryKey(t => t.Id);
-            
-            //CreateTable(
-            //    "dbo.N_ViewScheduleOrderSend",
-            //    c => new
-            //        {
-            //            Id = c.Int(nullable: false, identity: true),
-            //            OrderItemId = c.Int(nullable: false),
-            //            PlanQuantity = c.Decimal(precision: 18, scale: 2),
-            //            SendUser = c.String(),
-            //            Remark = c.String(),
-            //            PlanDate = c.DateTime(),
-            //            SendState = c.Int(nullable: false),
-            //            OrderNo = c.String(),
-            //            ProductNo = c.String(),
-            //            ProductName = c.String(),
-            //            Model = c.String(),
-            //            Material = c.String(),
-            //            SurfaceColor = c.String(),
-            //            Rigidity = c.String(),
-            //            StockNo = c.String(),
-            //            CustomerName = c.String(),
-            //            CustomerId = c.String(),
-            //        })
-            //    .PrimaryKey(t => t.Id);
-            
-            //AlterColumn("dbo.ReturnGoodOrder", "Quantity", c => c.Decimal(precision: 18, scale: 3));
-        }
-        
-        public override void Down()
-        {
-            AlterColumn("dbo.ReturnGoodOrder", "Quantity", c => c.Decimal(precision: 18, scale: 2));
-            DropTable("dbo.N_ViewScheduleOrderSend");
-            DropTable("dbo.ScheduleOrderSend");
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301010903570_add-ScheduleOrderSend.resx


+ 0 - 29
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091141462_addStandardCatelog.Designer.cs

@@ -1,29 +0,0 @@
-// <auto-generated />
-namespace ShwasherSys.Migrations
-{
-    using System.CodeDom.Compiler;
-    using System.Data.Entity.Migrations;
-    using System.Data.Entity.Migrations.Infrastructure;
-    using System.Resources;
-    
-    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class addStandardCatelog : IMigrationMetadata
-    {
-        private readonly ResourceManager Resources = new ResourceManager(typeof(addStandardCatelog));
-        
-        string IMigrationMetadata.Id
-        {
-            get { return "202301091141462_addStandardCatelog"; }
-        }
-        
-        string IMigrationMetadata.Source
-        {
-            get { return null; }
-        }
-        
-        string IMigrationMetadata.Target
-        {
-            get { return Resources.GetString("Target"); }
-        }
-    }
-}

+ 0 - 90
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091141462_addStandardCatelog.cs

@@ -1,90 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Collections.Generic;
-    using System.Data.Entity.Infrastructure.Annotations;
-    using System.Data.Entity.Migrations;
-    
-    public partial class addStandardCatelog : DbMigration
-    {
-        public override void Up()
-        {
-            CreateTable(
-                "dbo.StandardCatalog",
-                c => new
-                    {
-                        Id = c.Int(nullable: false, identity: true),
-                        StandardNo = c.String(maxLength: 50),
-                        StandardAbbr = c.String(nullable: false, maxLength: 50),
-                        StandardAbbrName = c.String(nullable: false, maxLength: 50),
-                        StandardName = c.String(nullable: false, maxLength: 150),
-                        Rigidity = c.String(maxLength: 250),
-                        Param = c.String(maxLength: 250),
-                        IsDeleted = c.Boolean(nullable: false),
-                        DeleterUserId = c.Long(),
-                        DeletionTime = c.DateTime(),
-                        LastModificationTime = c.DateTime(),
-                        LastModifierUserId = c.Long(),
-                        CreationTime = c.DateTime(nullable: false),
-                        CreatorUserId = c.Long(),
-                    },
-                annotations: new Dictionary<string, object>
-                {
-                    { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
-                })
-                .PrimaryKey(t => t.Id);
-            
-            CreateTable(
-                "dbo.StandardDetail",
-                c => new
-                    {
-                        Id = c.Int(nullable: false, identity: true),
-                        StandardId = c.Int(nullable: false),
-                        Specs = c.String(nullable: false, maxLength: 50),
-                        StandardName = c.String(nullable: false, maxLength: 150),
-                        InnerDiameter1 = c.String(maxLength: 250),
-                        InnerDiameter2 = c.String(maxLength: 250),
-                        OutDiameter1 = c.String(maxLength: 250),
-                        OutDiameter2 = c.String(maxLength: 250),
-                        Thickness1 = c.String(maxLength: 250),
-                        Thickness2 = c.String(maxLength: 250),
-                        Height1 = c.String(maxLength: 250),
-                        Height2 = c.String(maxLength: 250),
-                        InnerChamfer1 = c.String(maxLength: 250),
-                        InnerChamfer2 = c.String(maxLength: 250),
-                        OutChamfer1 = c.String(maxLength: 250),
-                        OutChamfer2 = c.String(maxLength: 250),
-                        ThousandWeigh = c.String(maxLength: 250),
-                        IsDeleted = c.Boolean(nullable: false),
-                        DeleterUserId = c.Long(),
-                        DeletionTime = c.DateTime(),
-                        LastModificationTime = c.DateTime(),
-                        LastModifierUserId = c.Long(),
-                        CreationTime = c.DateTime(nullable: false),
-                        CreatorUserId = c.Long(),
-                    },
-                annotations: new Dictionary<string, object>
-                {
-                    { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
-                })
-                .PrimaryKey(t => t.Id);
-            
-            //DropColumn("dbo.N_ViewScheduleOrderSend", "StockNo");
-        }
-        
-        public override void Down()
-        {
-            //AddColumn("dbo.N_ViewScheduleOrderSend", "StockNo", c => c.String());
-            DropTable("dbo.StandardDetail",
-                removedAnnotations: new Dictionary<string, object>
-                {
-                    { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
-                });
-            DropTable("dbo.StandardCatalog",
-                removedAnnotations: new Dictionary<string, object>
-                {
-                    { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
-                });
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091141462_addStandardCatelog.resx


+ 0 - 29
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091156360_updateStandardCatelog.Designer.cs

@@ -1,29 +0,0 @@
-// <auto-generated />
-namespace ShwasherSys.Migrations
-{
-    using System.CodeDom.Compiler;
-    using System.Data.Entity.Migrations;
-    using System.Data.Entity.Migrations.Infrastructure;
-    using System.Resources;
-    
-    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class updateStandardCatelog : IMigrationMetadata
-    {
-        private readonly ResourceManager Resources = new ResourceManager(typeof(updateStandardCatelog));
-        
-        string IMigrationMetadata.Id
-        {
-            get { return "202301091156360_updateStandardCatelog"; }
-        }
-        
-        string IMigrationMetadata.Source
-        {
-            get { return null; }
-        }
-        
-        string IMigrationMetadata.Target
-        {
-            get { return Resources.GetString("Target"); }
-        }
-    }
-}

+ 0 - 20
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091156360_updateStandardCatelog.cs

@@ -1,20 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Data.Entity.Migrations;
-    
-    public partial class updateStandardCatelog : DbMigration
-    {
-        public override void Up()
-        {
-            AddColumn("dbo.StandardCatalog", "Drawing", c => c.String());
-            AddColumn("dbo.StandardCatalog", "Remark", c => c.String(maxLength: 250));
-        }
-        
-        public override void Down()
-        {
-            DropColumn("dbo.StandardCatalog", "Remark");
-            DropColumn("dbo.StandardCatalog", "Drawing");
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202301091156360_updateStandardCatelog.resx


+ 0 - 29
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202303090653567_updateStandardDetail.Designer.cs

@@ -1,29 +0,0 @@
-// <auto-generated />
-namespace ShwasherSys.Migrations
-{
-    using System.CodeDom.Compiler;
-    using System.Data.Entity.Migrations;
-    using System.Data.Entity.Migrations.Infrastructure;
-    using System.Resources;
-    
-    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class updateStandardDetail : IMigrationMetadata
-    {
-        private readonly ResourceManager Resources = new ResourceManager(typeof(updateStandardDetail));
-        
-        string IMigrationMetadata.Id
-        {
-            get { return "202303090653567_updateStandardDetail"; }
-        }
-        
-        string IMigrationMetadata.Source
-        {
-            get { return null; }
-        }
-        
-        string IMigrationMetadata.Target
-        {
-            get { return Resources.GetString("Target"); }
-        }
-    }
-}

+ 0 - 42
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202303090653567_updateStandardDetail.cs

@@ -1,42 +0,0 @@
-namespace ShwasherSys.Migrations
-{
-    using System;
-    using System.Data.Entity.Migrations;
-    
-    public partial class updateStandardDetail : DbMigration
-    {
-        public override void Up()
-        {
-            //AlterColumn("dbo.StandardDetail", "InnerDiameter1", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "InnerDiameter2", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "OutDiameter1", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "OutDiameter2", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "Thickness1", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "Thickness2", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "Height1", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "Height2", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "InnerChamfer1", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "InnerChamfer2", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "OutChamfer1", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "OutChamfer2", c => c.Decimal(precision: 18, scale: 2));
-            //AlterColumn("dbo.StandardDetail", "ThousandWeigh", c => c.Decimal(precision: 18, scale: 2));
-        }
-        
-        public override void Down()
-        {
-            AlterColumn("dbo.StandardDetail", "ThousandWeigh", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "OutChamfer2", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "OutChamfer1", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "InnerChamfer2", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "InnerChamfer1", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "Height2", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "Height1", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "Thickness2", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "Thickness1", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "OutDiameter2", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "OutDiameter1", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "InnerDiameter2", c => c.String(maxLength: 250));
-            AlterColumn("dbo.StandardDetail", "InnerDiameter1", c => c.String(maxLength: 250));
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 120
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202303090653567_updateStandardDetail.resx


+ 1 - 1
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202112100327261_init.Designer.cs → src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260241009_init.Designer.cs

@@ -13,7 +13,7 @@ namespace ShwasherSys.Migrations
         
         string IMigrationMetadata.Id
         {
-            get { return "202112100327261_init"; }
+            get { return "202405260241009_init"; }
         }
         
         string IMigrationMetadata.Source

+ 2167 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260241009_init.cs

@@ -0,0 +1,2167 @@
+namespace ShwasherSys.Migrations
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Data.Entity.Infrastructure.Annotations;
+    using System.Data.Entity.Migrations;
+    
+    public partial class init : DbMigration
+    {
+        public override void Up()
+        {
+            //RenameTable(name: "dbo.ProductInspectReports", newName: "ProductInspectReportContents");
+            //RenameColumn(table: "dbo.PackageApply", name: "CurrentSemiStoreHouseNo", newName: "CurrentStoreHouseNo");
+            //CreateTable(
+            //    "dbo.Currency",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            CurrencyName = c.String(maxLength: 20),
+            //            TimeCreated = c.DateTime(),
+            //            TimeLastMod = c.DateTime(),
+            //            UserIDLastMod = c.String(maxLength: 20),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.CurrencyExchangeRate",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            FromCurrencyId = c.String(maxLength: 20),
+            //            ToCurrencyId = c.String(maxLength: 20),
+            //            ExchangeRate = c.Decimal(precision: 18, scale: 4),
+            //            TimeCreated = c.DateTime(),
+            //            TimeLastMod = c.DateTime(),
+            //            UserIDLastMod = c.String(maxLength: 20),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.CurrentRmStoreHouse",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductionOrderNo = c.String(maxLength: 11),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            StoreLocationNo = c.String(maxLength: 32),
+            //            RmProductNo = c.String(maxLength: 32),
+            //            FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            Remark = c.String(maxLength: 150),
+            //            ProductBatchNum = c.String(maxLength: 32),
+            //            PreMonthQuantity = c.Decimal(precision: 18, scale: 3),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_CurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.CustomerDisProductInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ProductOrderNo = c.String(),
+            //            CustomerNo = c.String(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.CustomerInvoiceAddress",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            CustomerId = c.String(nullable: false, maxLength: 30),
+            //            InvoiceAddressName = c.String(nullable: false, maxLength: 150),
+            //            InvoiceAddress = c.String(nullable: false, maxLength: 250),
+            //            LinkMan = c.String(maxLength: 30),
+            //            Telephone = c.String(maxLength: 50),
+            //            Zip = c.String(maxLength: 8),
+            //            Email = c.String(maxLength: 50),
+            //            Mobile = c.String(maxLength: 50),
+            //            Fax = c.String(maxLength: 50),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_CustomerInvoiceAddress_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.DeviceMgPlanInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            No = c.String(maxLength: 50),
+            //            PlanType = c.Int(nullable: false),
+            //            DeviceNo = c.String(maxLength: 50),
+            //            Name = c.String(maxLength: 50),
+            //            Description = c.String(),
+            //            ExpireDate = c.DateTime(nullable: false),
+            //            MaintenanceCycle = c.Int(nullable: false),
+            //            MaintenanceDate = c.DateTime(nullable: false),
+            //            NextMaintenanceDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 500),
+            //            NumberOfUsers = c.Int(nullable: false),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_DeviceMgPlan_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.DeleterUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.DisqualifiedProductInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            DisqualifiedNo = c.String(maxLength: 20),
+            //            ProductOrderNo = c.String(maxLength: 11),
+            //            ReturnOrderNo = c.String(maxLength: 32),
+            //            ProductNo = c.String(maxLength: 50),
+            //            ProductName = c.String(maxLength: 100),
+            //            ProductType = c.Int(nullable: false),
+            //            QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            HandleType = c.Int(nullable: false),
+            //            CheckUser = c.String(maxLength: 20),
+            //            CheckDate = c.DateTime(),
+            //            HandleUser = c.String(maxLength: 20),
+            //            HandleDate = c.DateTime(),
+            //            DisqualifiedType = c.Int(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.EmployeeInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            No = c.String(maxLength: 20),
+            //            Name = c.String(maxLength: 50),
+            //            CardId = c.String(maxLength: 18),
+            //            Gender = c.Int(nullable: false),
+            //            PhoneNumber = c.String(maxLength: 18),
+            //            DepartmentNo = c.String(maxLength: 20),
+            //            DutyNo = c.String(maxLength: 20),
+            //            Description = c.String(maxLength: 500),
+            //            UserName = c.String(maxLength: 32),
+            //            Remark = c.String(maxLength: 500),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_Employee_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.DeleterUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.EmployeeWorkPerformanceInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            PerformanceNo = c.String(maxLength: 20),
+            //            EmployeeId = c.Int(nullable: false),
+            //            RelatedNo = c.String(maxLength: 20),
+            //            ProductOrderNo = c.String(maxLength: 11),
+            //            WorkType = c.Int(nullable: false),
+            //            Performance = c.Decimal(precision: 18, scale: 3),
+            //            PerformanceUnit = c.String(maxLength: 10),
+            //            PerformanceDesc = c.String(maxLength: 500),
+            //            Remark = c.String(maxLength: 500),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true)
+            //    .Index(t => t.EmployeeId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.ExpressLogistics",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ExpressName = c.String(maxLength: 50),
+            //            Code = c.String(maxLength: 50),
+            //            Sort = c.Int(nullable: false),
+            //            TimeCreated = c.DateTime(storeType: "smalldatetime"),
+            //            TimeLastMod = c.DateTime(storeType: "smalldatetime"),
+            //            UserIDLastMod = c.String(maxLength: 50),
+            //            IsLock = c.String(nullable: false, maxLength: 1),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.ExpressProviderMappers",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ExpressId = c.Int(nullable: false),
+            //            ProviderId = c.Int(nullable: false),
+            //            MapperCode = c.String(maxLength: 50),
+            //            QueryUrl = c.String(maxLength: 500),
+            //            ExtendInfo = c.String(maxLength: 500),
+            //            ActiveStatus = c.Int(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.ExpressLogistics", t => t.ExpressId, cascadeDelete: true)
+            //    .ForeignKey("dbo.ExpressServiceProviders", t => t.ProviderId, cascadeDelete: true)
+            //    .Index(t => t.ExpressId)
+            //    .Index(t => t.ProviderId);
+            
+            //CreateTable(
+            //    "dbo.ExpressServiceProviders",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ProviderName = c.String(maxLength: 50),
+            //            QueryApiUrl = c.String(maxLength: 150),
+            //            CallBackUrl = c.String(maxLength: 150),
+            //            ExcuteNamespaceAndMethod = c.String(maxLength: 150),
+            //            TimeCreated = c.DateTime(storeType: "smalldatetime"),
+            //            TimeLastMod = c.DateTime(storeType: "smalldatetime"),
+            //            UserIDLastMod = c.String(maxLength: 50),
+            //            IsLock = c.String(nullable: false, maxLength: 1),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.FixedAssetInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            No = c.String(maxLength: 50),
+            //            Name = c.String(maxLength: 50),
+            //            Model = c.String(maxLength: 50),
+            //            Description = c.String(maxLength: 500),
+            //            Remark = c.String(maxLength: 500),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_FixedAsset_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.DeleterUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.FixedAssetTypeInfo",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            Name = c.String(nullable: false, maxLength: 50),
+            //            Description = c.String(maxLength: 500),
+            //            Remark = c.String(maxLength: 500),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_FixedAssetType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.DeleterUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.InventoryCheck",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            CheckNo = c.String(maxLength: 32),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            StoreAreaCode = c.String(maxLength: 32),
+            //            ShelfNumber = c.String(maxLength: 32),
+            //            ShelfLevel = c.String(maxLength: 32),
+            //            SequenceNo = c.String(maxLength: 32),
+            //            CheckType = c.String(maxLength: 10),
+            //            PlanStartDate = c.DateTime(),
+            //            PlanEndDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 200),
+            //            CheckUser = c.String(maxLength: 32),
+            //            PublishUser = c.String(maxLength: 32),
+            //            FinishDate = c.DateTime(),
+            //            CheckState = c.Int(nullable: false),
+            //            ProductNo = c.String(maxLength: 32),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_InventoryCheckInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.InventoryCheckRecord",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            CheckNo = c.String(maxLength: 32),
+            //            CurrentStoreHouseNo = c.String(maxLength: 32),
+            //            CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.LicenseDocumentInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            No = c.String(maxLength: 50),
+            //            Name = c.String(maxLength: 50),
+            //            Description = c.String(maxLength: 500),
+            //            LicenseGroup = c.String(maxLength: 50),
+            //            LicenseType = c.String(maxLength: 50),
+            //            FilePath = c.String(maxLength: 300),
+            //            ExpireDate = c.DateTime(nullable: false),
+            //            Remark = c.String(maxLength: 500),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_LicenseDocument_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.DeleterUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.LicenseTypeInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            Name = c.String(maxLength: 50),
+            //            GroupName = c.String(maxLength: 50),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.MaintenanceMemberInfo",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            MaintenanceNo = c.String(),
+            //            EmployeeId = c.Int(nullable: false),
+            //            Name = c.String(),
+            //            StartDateTime = c.DateTime(),
+            //            EndDateTime = c.DateTime(),
+            //            WorkHour = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            IsConfirm = c.Boolean(nullable: false),
+            //            WorkDesc = c.String(),
+            //            Remark = c.String(maxLength: 500),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true)
+            //    .Index(t => t.EmployeeId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.MaintenanceRecordInfo",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            DeviceMgPlanNo = c.String(maxLength: 50),
+            //            DeviceNo = c.String(maxLength: 50),
+            //            DeviceName = c.String(maxLength: 50),
+            //            MgType = c.Int(nullable: false),
+            //            Description = c.String(maxLength: 500),
+            //            Address = c.String(maxLength: 200),
+            //            PlanDate = c.DateTime(nullable: false),
+            //            CompleteState = c.Int(nullable: false),
+            //            CompleteDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 500),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.MoldInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            No = c.String(maxLength: 50),
+            //            Name = c.String(maxLength: 50),
+            //            Model = c.String(maxLength: 50),
+            //            Material = c.String(maxLength: 50),
+            //            Description = c.String(maxLength: 500),
+            //            Remark = c.String(maxLength: 500),
+            //            CustomerName = c.String(maxLength: 50),
+            //            ShelfNum = c.String(maxLength: 50),
+            //            OuterDiameter = c.String(maxLength: 50),
+            //            InsideDiameter = c.String(maxLength: 50),
+            //            Thickness = c.String(maxLength: 50),
+            //            Height = c.String(maxLength: 50),
+            //            Rigidity = c.String(maxLength: 50),
+            //            MaintenanceCycle = c.Int(nullable: false),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_Mold_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.DeleterUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.OrderProduction",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            OrderItemId = c.Int(nullable: false),
+            //            ProductionOrderNo = c.String(maxLength: 11),
+            //            Remark = c.String(maxLength: 150),
+            //            TimeCreated = c.DateTime(),
+            //            CreatorUserId = c.String(maxLength: 20),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.OrderSendExceed",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            OrderItemId = c.Int(nullable: false),
+            //            ExceedQuantity = c.Decimal(nullable: false, precision: 18, scale: 3, storeType: "numeric"),
+            //            OperatorMan = c.String(maxLength: 30),
+            //            OrderNo = c.String(),
+            //            ProductNo = c.String(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.OutFactory",
+            //    c => new
+            //        {
+            //            OutFactoryId = c.String(nullable: false, maxLength: 128),
+            //            OutFactoryName = c.String(nullable: false, maxLength: 50),
+            //            LinkMan = c.String(maxLength: 20),
+            //            Address = c.String(maxLength: 150),
+            //            WebSite = c.String(maxLength: 50),
+            //            TimeCreated = c.DateTime(storeType: "smalldatetime"),
+            //            TimeLastMod = c.DateTime(storeType: "smalldatetime"),
+            //            UserIDLastMod = c.String(maxLength: 20),
+            //            IsLock = c.String(nullable: false, maxLength: 1),
+            //            Telephone = c.String(maxLength: 50),
+            //            Fax = c.String(maxLength: 50),
+            //            zip = c.String(maxLength: 6),
+            //            Email = c.String(maxLength: 200),
+            //        })
+            //    .PrimaryKey(t => t.OutFactoryId);
+            
+            //CreateTable(
+            //    "dbo.ProductInspectReportInfos",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ProductInspectReportNo = c.String(nullable: false, maxLength: 32),
+            //            ProductionOrderNo = c.String(nullable: false, maxLength: 11),
+            //            SemiProductNo = c.String(maxLength: 32),
+            //            ConfirmStatus = c.Int(nullable: false),
+            //            InspectCount = c.Int(nullable: false),
+            //            ConfirmDate = c.DateTime(),
+            //            ConfirmUser = c.String(maxLength: 100),
+            //            InspectContent = c.String(maxLength: 1000),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.ProductionOrderLogInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ProductionNo = c.String(maxLength: 20),
+            //            ProductOrderNo = c.String(maxLength: 11),
+            //            EmployeeId = c.Int(nullable: false),
+            //            CarNo = c.String(maxLength: 20),
+            //            QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true)
+            //    .Index(t => t.EmployeeId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.ProductMapper",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ProductNo = c.String(maxLength: 50),
+            //            PreProductNo = c.String(maxLength: 50),
+            //            PreProductType = c.Int(nullable: false),
+            //            NewProductType = c.Int(nullable: false),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ProductMapper_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.ProductProperties",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            PropertyType = c.String(maxLength: 50),
+            //            PropertyNo = c.String(maxLength: 50),
+            //            PropertyValue = c.String(maxLength: 50),
+            //            DisplayValue = c.String(maxLength: 150),
+            //            ContentInfo = c.String(maxLength: 250),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ProductProperty_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.QualityIssueLabelInfo",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            Name = c.String(nullable: false, maxLength: 50),
+            //            Description = c.String(maxLength: 500),
+            //            Remark = c.String(maxLength: 500),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_QualityIssueLabel_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.DeleterUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.ReturnGoodOrder",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ReturnOrderNo = c.String(maxLength: 32),
+            //            SendOrderNo = c.String(maxLength: 32),
+            //            OrderNo = c.String(maxLength: 32),
+            //            OrderItemNo = c.String(maxLength: 32),
+            //            ProductNo = c.String(maxLength: 32),
+            //            ProductionOrderNo = c.String(maxLength: 32),
+            //            CustomerId = c.String(maxLength: 32),
+            //            Reason = c.String(maxLength: 500),
+            //            Amount = c.Decimal(precision: 18, scale: 2),
+            //            AuditAmount = c.Decimal(precision: 18, scale: 2),
+            //            Quantity = c.Decimal(precision: 18, scale: 3),
+            //            HandleUser = c.String(maxLength: 32),
+            //            ApplyUser = c.String(maxLength: 32),
+            //            ConfirmUser = c.String(maxLength: 32),
+            //            ReturnDate = c.DateTime(),
+            //            ApplyDate = c.DateTime(),
+            //            ConfirmDate = c.DateTime(),
+            //            ReturnState = c.Int(nullable: false),
+            //            ReturnType = c.Int(nullable: false),
+            //            LinkName = c.String(maxLength: 50),
+            //            SurveyReason = c.String(maxLength: 500),
+            //            SurveyDetail = c.String(maxLength: 500),
+            //            Solution = c.String(maxLength: 500),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ReturnGoodOrder_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .Index(t => t.ReturnOrderNo, unique: true);
+            
+            //CreateTable(
+            //    "dbo.RmEnterStore",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductionOrderNo = c.String(maxLength: 11),
+            //            RmProductNo = c.String(maxLength: 50),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            StoreLocationNo = c.String(maxLength: 32),
+            //            ApplyStatus = c.Int(nullable: false),
+            //            IsClose = c.Boolean(nullable: false),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            AuditUser = c.String(maxLength: 32),
+            //            AuditDate = c.DateTime(),
+            //            ApplyEnterDate = c.DateTime(),
+            //            EnterStoreUser = c.String(maxLength: 32),
+            //            EnterStoreDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 150),
+            //            ProductBatchNum = c.String(maxLength: 32),
+            //            CreateSourceType = c.Int(nullable: false),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_RmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.RmOutStore",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductionOrderNo = c.String(maxLength: 11),
+            //            CurrentRmStoreHouseNo = c.String(maxLength: 32),
+            //            RmProductNo = c.String(maxLength: 50),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            ApplyStatus = c.Int(nullable: false),
+            //            IsClose = c.Boolean(nullable: false),
+            //            IsConfirm = c.Boolean(),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            AuditUser = c.String(maxLength: 150),
+            //            AuditDate = c.DateTime(),
+            //            OutStoreUser = c.String(maxLength: 150),
+            //            OutStoreDate = c.DateTime(),
+            //            ApplyOutDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 150),
+            //            ProductBatchNum = c.String(maxLength: 32),
+            //            CreateSourceType = c.Int(nullable: false),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_RmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.RmProduct",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductName = c.String(maxLength: 50),
+            //            Material = c.String(maxLength: 50),
+            //            Model = c.String(maxLength: 50),
+            //            ProductDesc = c.String(maxLength: 200),
+            //            ModelNo = c.String(maxLength: 20),
+            //            MaterialNo = c.String(maxLength: 20),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_RmProduct_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.ScheduleOrderSend",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            OrderItemId = c.Int(nullable: false),
+            //            Remark = c.String(maxLength: 500),
+            //            PlanQuantity = c.Decimal(precision: 18, scale: 2),
+            //            SendUser = c.String(maxLength: 32),
+            //            PlanDate = c.DateTime(),
+            //            SendState = c.Int(nullable: false),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewScheduleOrderSend",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            OrderItemId = c.Int(nullable: false),
+            //            PlanQuantity = c.Decimal(precision: 18, scale: 2),
+            //            SendUser = c.String(),
+            //            Remark = c.String(),
+            //            PlanDate = c.DateTime(),
+            //            SendState = c.Int(nullable: false),
+            //            OrderNo = c.String(),
+            //            ProductNo = c.String(),
+            //            ProductName = c.String(),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            CustomerName = c.String(),
+            //            CustomerId = c.String(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.ScrapEnterStore",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductionOrderNo = c.String(maxLength: 11),
+            //            ProductNo = c.String(maxLength: 50),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            StoreLocationNo = c.String(maxLength: 32),
+            //            ApplyStatus = c.Int(nullable: false),
+            //            IsClose = c.Boolean(nullable: false),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            AuditUser = c.String(maxLength: 32),
+            //            AuditDate = c.DateTime(),
+            //            ApplyEnterDate = c.DateTime(),
+            //            EnterStoreUser = c.String(maxLength: 32),
+            //            EnterStoreDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 150),
+            //            ProductType = c.Int(nullable: false),
+            //            ScrapSource = c.Int(nullable: false),
+            //            ScrapSourceNo = c.String(maxLength: 50),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.ScrapTypeInfo",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            Name = c.String(nullable: false, maxLength: 50),
+            //            Description = c.String(maxLength: 500),
+            //            Remark = c.String(maxLength: 500),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ScrapType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.DeleterUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+            //CreateTable(
+            //    "dbo.StandardCatalog",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            StandardNo = c.String(maxLength: 50),
+            //            StandardAbbr = c.String(nullable: false, maxLength: 50),
+            //            StandardAbbrName = c.String(nullable: false, maxLength: 50),
+            //            StandardName = c.String(nullable: false, maxLength: 150),
+            //            Rigidity = c.String(maxLength: 250),
+            //            Param = c.String(maxLength: 250),
+            //            Drawing = c.String(),
+            //            Remark = c.String(maxLength: 250),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.StandardDetail",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            StandardId = c.Int(nullable: false),
+            //            Specs = c.String(nullable: false, maxLength: 50),
+            //            StandardName = c.String(nullable: false, maxLength: 150),
+            //            InnerDiameter1 = c.Decimal(precision: 18, scale: 2),
+            //            InnerDiameter2 = c.Decimal(precision: 18, scale: 2),
+            //            OutDiameter1 = c.Decimal(precision: 18, scale: 2),
+            //            OutDiameter2 = c.Decimal(precision: 18, scale: 2),
+            //            Thickness1 = c.Decimal(precision: 18, scale: 2),
+            //            Thickness2 = c.Decimal(precision: 18, scale: 2),
+            //            Height1 = c.Decimal(precision: 18, scale: 2),
+            //            Height2 = c.Decimal(precision: 18, scale: 2),
+            //            InnerChamfer1 = c.Decimal(precision: 18, scale: 2),
+            //            InnerChamfer2 = c.Decimal(precision: 18, scale: 2),
+            //            OutChamfer1 = c.Decimal(precision: 18, scale: 2),
+            //            OutChamfer2 = c.Decimal(precision: 18, scale: 2),
+            //            ThousandWeigh = c.Decimal(precision: 18, scale: 2),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.StatementBill",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            StatementBillNo = c.String(nullable: false, maxLength: 30),
+            //            CustomerId = c.String(nullable: false, maxLength: 30),
+            //            BillMan = c.String(maxLength: 20),
+            //            Description = c.String(maxLength: 4000),
+            //            StatementState = c.Int(),
+            //            OrderStickBillNo = c.String(maxLength: 30),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .Index(t => t.StatementBillNo, unique: true);
+            
+            //CreateTable(
+            //    "dbo.N_ViewCurrentRmStoreHouse",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductionOrderNo = c.String(maxLength: 11),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            StoreLocationNo = c.String(maxLength: 32),
+            //            RmProductNo = c.String(maxLength: 32),
+            //            FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            Remark = c.String(maxLength: 150),
+            //            PreMonthQuantity = c.Decimal(precision: 18, scale: 3),
+            //            ProductName = c.String(),
+            //            Material = c.String(),
+            //            Model = c.String(),
+            //            ProductDesc = c.String(),
+            //            StoreHouseName = c.String(),
+            //            ProductBatchNum = c.String(),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ViewCurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.v_SemiProductStoreInfo",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            AllQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            AllFreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2),
+            //            SemiProductName = c.String(),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            PartNo = c.String(),
+            //            ProductDesc = c.String(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.v_ProductStoreInfo",
+            //    c => new
+            //        {
+            //            ProductNo = c.String(nullable: false, maxLength: 128),
+            //            AllQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            AllFreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2),
+            //            ProductName = c.String(),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            PartNo = c.String(),
+            //            Defprice = c.Decimal(precision: 18, scale: 3),
+            //        })
+            //    .PrimaryKey(t => t.ProductNo);
+            
+            //CreateTable(
+            //    "dbo.N_ViewDisqualifiedProduction",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            DisqualifiedNo = c.String(maxLength: 20),
+            //            ProductOrderNo = c.String(maxLength: 11),
+            //            ReturnOrderNo = c.String(maxLength: 32),
+            //            ProductNo = c.String(maxLength: 50),
+            //            ProductName = c.String(maxLength: 100),
+            //            ProductType = c.Int(nullable: false),
+            //            QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            HandleType = c.Int(nullable: false),
+            //            CheckUser = c.String(maxLength: 20),
+            //            CheckDate = c.DateTime(),
+            //            HandleUser = c.String(maxLength: 20),
+            //            HandleDate = c.DateTime(),
+            //            DisqualifiedType = c.Int(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewDisqualifiedReturn",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            DisqualifiedNo = c.String(maxLength: 20),
+            //            ProductOrderNo = c.String(maxLength: 11),
+            //            ReturnOrderNo = c.String(maxLength: 32),
+            //            ProductNo = c.String(maxLength: 50),
+            //            ProductName = c.String(maxLength: 100),
+            //            ProductType = c.Int(nullable: false),
+            //            QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            HandleType = c.Int(nullable: false),
+            //            CheckUser = c.String(maxLength: 20),
+            //            CheckDate = c.DateTime(),
+            //            HandleUser = c.String(maxLength: 20),
+            //            HandleDate = c.DateTime(),
+            //            DisqualifiedType = c.Int(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            CustomerId = c.String(),
+            //            CustomerName = c.String(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.NV_ViewEmployeeInfo",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            No = c.String(),
+            //            Name = c.String(),
+            //            CardId = c.String(),
+            //            Gender = c.Int(nullable: false),
+            //            PhoneNumber = c.String(),
+            //            DepartmentNo = c.String(),
+            //            DepartmentName = c.String(),
+            //            DutyNo = c.String(),
+            //            DutyName = c.String(),
+            //            Description = c.String(),
+            //            UserName = c.String(),
+            //            Remark = c.String(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.vEnterOutLogDetail_c",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ActualId = c.Int(nullable: false),
+            //            EnterOutFlag = c.Int(nullable: false),
+            //            ProductNo = c.String(),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            DateTiem = c.DateTime(),
+            //            UserIDLastMod = c.String(),
+            //            Remark = c.String(),
+            //            ProductName = c.String(),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            PartNo = c.String(),
+            //            CustomerId = c.String(),
+            //            CustomerName = c.String(),
+            //            ProductionOrderNo = c.String(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.v_Store_Query",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ActualId = c.Int(nullable: false),
+            //            EnterOutFlag = c.Int(nullable: false),
+            //            ProductNo = c.String(),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            DateTiem = c.DateTime(),
+            //            UserIDLastMod = c.String(),
+            //            Remark = c.String(),
+            //            ProductName = c.String(),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            PartNo = c.String(),
+            //            AllQuantity = c.Decimal(precision: 18, scale: 2),
+            //            AllFreezeQuantity = c.Decimal(precision: 18, scale: 2),
+            //            AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.v_EnterOutSemiProductStore",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ActualId = c.Int(nullable: false),
+            //            EnterOutFlag = c.Int(nullable: false),
+            //            SemiProductNo = c.String(),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            DateTiem = c.DateTime(),
+            //            UserIDLastMod = c.String(),
+            //            Remark = c.String(),
+            //            SemiProductName = c.String(),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            PartNo = c.String(),
+            //            ProductDesc = c.String(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewInventoryCheckRecord_Product",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductNo = c.String(),
+            //            ProductName = c.String(),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            ProductDesc = c.String(),
+            //            CheckNo = c.String(),
+            //            CurrentStoreHouseNo = c.String(),
+            //            CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            StoreLocationNo = c.String(),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            ProductionOrderNo = c.String(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewInventoryCheckRecord_Semi",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductNo = c.String(),
+            //            ProductName = c.String(),
+            //            Model = c.String(),
+            //            Material = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            ProductDesc = c.String(),
+            //            CheckNo = c.String(),
+            //            CurrentStoreHouseNo = c.String(),
+            //            CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            StoreLocationNo = c.String(),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            ProductionOrderNo = c.String(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewPackageApply",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            PackageApplyNo = c.String(),
+            //            CurrentStoreHouseNo = c.String(),
+            //            ProductionOrderNo = c.String(),
+            //            SemiProductNo = c.String(),
+            //            ProductNo = c.String(),
+            //            ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            SourceStore = c.Int(nullable: false),
+            //            ApplyStatus = c.String(),
+            //            IsClose = c.Boolean(nullable: false),
+            //            ApplyDate = c.DateTime(),
+            //            Remark = c.String(),
+            //            TimeCreated = c.DateTime(),
+            //            TimeLastMod = c.DateTime(),
+            //            CreatorUserId = c.String(),
+            //            UserIDLastMod = c.String(),
+            //            ProcessingNum = c.Int(nullable: false),
+            //            IsApplyEnterQuantity = c.Decimal(precision: 18, scale: 2),
+            //            IsApplyEnterQuantity2 = c.Decimal(precision: 18, scale: 2),
+            //            KgWeight = c.Decimal(precision: 18, scale: 2),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewRmEnterStore",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductionOrderNo = c.String(nullable: false, maxLength: 11),
+            //            RmProductNo = c.String(maxLength: 50),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            StoreLocationNo = c.String(maxLength: 32),
+            //            ApplyStatus = c.Int(nullable: false),
+            //            IsClose = c.Boolean(nullable: false),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            AuditUser = c.String(maxLength: 32),
+            //            AuditDate = c.DateTime(),
+            //            ApplyEnterDate = c.DateTime(),
+            //            EnterStoreUser = c.String(maxLength: 32),
+            //            EnterStoreDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 150),
+            //            ProductName = c.String(),
+            //            Material = c.String(),
+            //            Model = c.String(),
+            //            ProductDesc = c.String(),
+            //            StoreHouseName = c.String(),
+            //            ProductBatchNum = c.String(),
+            //            CreateSourceType = c.Int(),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ViewRmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewRmOutStore",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductionOrderNo = c.String(maxLength: 11),
+            //            CurrentRmStoreHouseNo = c.String(maxLength: 32),
+            //            RmProductNo = c.String(maxLength: 50),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            ApplyStatus = c.Int(nullable: false),
+            //            IsClose = c.Boolean(nullable: false),
+            //            IsConfirm = c.Boolean(),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            AuditUser = c.String(maxLength: 150),
+            //            AuditDate = c.DateTime(),
+            //            OutStoreUser = c.String(maxLength: 150),
+            //            OutStoreDate = c.DateTime(),
+            //            ApplyOutDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 150),
+            //            ProductName = c.String(),
+            //            Material = c.String(),
+            //            Model = c.String(),
+            //            ProductDesc = c.String(),
+            //            StoreHouseName = c.String(),
+            //            ProductBatchNum = c.String(),
+            //            CreateSourceType = c.Int(),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ViewRmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewScrapEnterStore",
+            //    c => new
+            //        {
+            //            Id = c.String(nullable: false, maxLength: 128),
+            //            ProductionOrderNo = c.String(nullable: false, maxLength: 11),
+            //            ProductNo = c.String(maxLength: 50),
+            //            StoreHouseId = c.Int(nullable: false),
+            //            StoreLocationNo = c.String(maxLength: 32),
+            //            ApplyStatus = c.Int(nullable: false),
+            //            IsClose = c.Boolean(nullable: false),
+            //            Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
+            //            AuditUser = c.String(maxLength: 32),
+            //            AuditDate = c.DateTime(),
+            //            ApplyEnterDate = c.DateTime(),
+            //            EnterStoreUser = c.String(maxLength: 32),
+            //            EnterStoreDate = c.DateTime(),
+            //            Remark = c.String(maxLength: 150),
+            //            ProductName = c.String(),
+            //            Material = c.String(),
+            //            Model = c.String(),
+            //            ProductDesc = c.String(),
+            //            StoreHouseName = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            ProductType = c.Int(),
+            //            ScrapSource = c.Int(nullable: false),
+            //            ScrapSourceNo = c.String(),
+            //            IsDeleted = c.Boolean(nullable: false),
+            //            DeleterUserId = c.Long(),
+            //            DeletionTime = c.DateTime(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        },
+            //    annotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ViewScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    })
+            //    .PrimaryKey(t => t.Id);
+            
+            //CreateTable(
+            //    "dbo.N_ViewStatementBill",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            StatementBillNo = c.String(nullable: false, maxLength: 30),
+            //            CustomerId = c.String(nullable: false, maxLength: 30),
+            //            BillMan = c.String(maxLength: 20),
+            //            Description = c.String(maxLength: 4000),
+            //            StatementState = c.Int(),
+            //            CustomerName = c.String(),
+            //            OrderStickBillNo = c.String(),
+            //            TotalPrice = c.Decimal(precision: 18, scale: 3),
+            //            AfterTaxTotalPrice = c.Decimal(precision: 18, scale: 3),
+            //            CurrencyId = c.String(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .Index(t => t.StatementBillNo, unique: true);
+            
+            //CreateTable(
+            //    "dbo.v_OrderStickBill",
+            //    c => new
+            //        {
+            //            OrderStickBillNo = c.String(nullable: false, maxLength: 128),
+            //            CustomerId = c.String(),
+            //            CreatDate = c.DateTime(),
+            //            StickNum = c.String(),
+            //            StickMan = c.String(),
+            //            Description = c.String(),
+            //            TimeCreated = c.DateTime(),
+            //            CustomerName = c.String(),
+            //            Address = c.String(),
+            //            LinkMan = c.String(),
+            //            TotalPrice = c.Decimal(precision: 18, scale: 3),
+            //            AfterTaxTotalPrice = c.Decimal(precision: 18, scale: 3),
+            //            CurrencyId = c.String(),
+            //            InvoiceState = c.Int(),
+            //            Amount = c.Decimal(precision: 18, scale: 2),
+            //            OriginalStickNum = c.String(),
+            //            ReturnOrderNo = c.String(),
+            //            OrderNo = c.String(),
+            //            InvoiceType = c.Int(nullable: false),
+            //        })
+            //    .PrimaryKey(t => t.OrderStickBillNo);
+            
+            //AddColumn("dbo.BackUpCurrentSemiStoreHouse", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.CurrentProductStoreHouse", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.CurrentProductStoreHouse", "PreMonthQuantity", c => c.Decimal(precision: 18, scale: 3));
+            //AddColumn("dbo.CurrentProductStoreHouse", "InventoryCheckState", c => c.Int());
+            //AddColumn("dbo.CurrentProductStoreHouse", "ReturnState", c => c.Int());
+            //AddColumn("dbo.CurrentSemiStoreHouse", "StoreLocationNo", c => c.String(maxLength: 32));
+            //AddColumn("dbo.CurrentSemiStoreHouse", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.CurrentSemiStoreHouse", "PreMonthQuantity", c => c.Decimal(precision: 18, scale: 3));
+            //AddColumn("dbo.CurrentSemiStoreHouse", "InventoryCheckState", c => c.Int());
+            //AddColumn("dbo.CurrentSemiStoreHouse", "ReturnState", c => c.Int());
+            //AddColumn("dbo.CustomerDefaultProduct", "PartNo", c => c.String(maxLength: 30));
+            //AddColumn("dbo.Customers", "SaleType", c => c.Int());
+            //AddColumn("dbo.FinshedEnterStore", "PackageProductNo", c => c.String(maxLength: 50));
+            //AddColumn("dbo.FinshedEnterStore", "SourceStoreHouseId", c => c.Int(nullable: false));
+            //AddColumn("dbo.FinshedEnterStore", "ApplySourceType", c => c.Int(nullable: false));
+            //AddColumn("dbo.FinshedEnterStore", "ApplyQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.FinshedEnterStore", "EnterStoreUser", c => c.String(maxLength: 20));
+            //AddColumn("dbo.FinshedEnterStore", "EnterStoreDate", c => c.DateTime());
+            //AddColumn("dbo.FinshedEnterStore", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.FinshedEnterStore", "CreateSourceType", c => c.Int());
+            //AddColumn("dbo.FinshedEnterStore", "PackageEnterNum", c => c.String());
+            //AddColumn("dbo.FinshedEnterStore", "PackageUser", c => c.String(maxLength: 20));
+            //AddColumn("dbo.FinshedEnterStore", "VerifyUser", c => c.String(maxLength: 20));
+            //AddColumn("dbo.FinshedEnterStore", "ApplyQuantity2", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.Sys_Users", "AccountNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.OrderHeader", "SaleType", c => c.Int());
+            //AddColumn("dbo.OrderHeader", "SaleMan", c => c.String(maxLength: 50));
+            //AddColumn("dbo.OrderHeader", "IsLock", c => c.String(maxLength: 1));
+            //AddColumn("dbo.OrderItems", "ToCnyRate", c => c.Decimal(precision: 18, scale: 3));
+            //AddColumn("dbo.OrderItems", "EmergencyLevel", c => c.Int(nullable: false));
+            //AddColumn("dbo.OrderItems", "IsLock", c => c.String(maxLength: 1));
+            //AddColumn("dbo.OrderItems", "StandardName", c => c.String(maxLength: 50));
+            //AddColumn("dbo.OrderItems", "StoreCompleteState", c => c.Int(nullable: false));
+            //AddColumn("dbo.OrderItems", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.OrderItems", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.OrderItems", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.OrderItems", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.OrderSendBills", "ExpressId", c => c.Int());
+            //AddColumn("dbo.OrderSendBills", "ExpressBillNo", c => c.String(maxLength: 50));
+            //AddColumn("dbo.OrderSend", "CreatorUserId", c => c.String(maxLength: 20));
+            //AddColumn("dbo.OrderSend", "StatementBillNo", c => c.String(maxLength: 32));
+            //AddColumn("dbo.OrderSend", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.OrderSend", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.OrderSend", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.OrderSend", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.OrderSend", "SendBillSort", c => c.Int(nullable: false));
+            //AddColumn("dbo.OrderSend", "StatementBillSort", c => c.Int(nullable: false));
+            //AddColumn("dbo.OrderStickBills", "InvoiceState", c => c.Int());
+            //AddColumn("dbo.OrderStickBills", "Amount", c => c.Decimal(precision: 18, scale: 2));
+            //AddColumn("dbo.OrderStickBills", "OriginalStickNum", c => c.String(maxLength: 30));
+            //AddColumn("dbo.OrderStickBills", "ReturnOrderNo", c => c.String(maxLength: 30));
+            //AddColumn("dbo.OrderStickBills", "OrderNo", c => c.String(maxLength: 500));
+            //AddColumn("dbo.OrderStickBills", "InvoiceType", c => c.Int(nullable: false));
+            //AddColumn("dbo.PackageApply", "ProductNo", c => c.String(maxLength: 32));
+            //AddColumn("dbo.PackageApply", "SourceStore", c => c.Int(nullable: false));
+            //AddColumn("dbo.PackageApply", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.ProductInspectInfos", "ProductInspectReportNo", c => c.String(nullable: false, maxLength: 32));
+            //AddColumn("dbo.ProductInspectInfos", "InspectSubject", c => c.String(maxLength: 50));
+            //AddColumn("dbo.ProductionOrders", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.ProductionOrders", "OutsourcingFactory", c => c.String());
+            //AddColumn("dbo.ProductionOrders", "EnterDate", c => c.DateTime());
+            //AddColumn("dbo.ProductionOrders", "InspectDate", c => c.DateTime());
+            //AddColumn("dbo.ProductionOrders", "HasExported", c => c.Boolean(nullable: false));
+            //AddColumn("dbo.ProductionOrders", "MaxQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.ProductOutStore", "OutStoreUser", c => c.String(maxLength: 20));
+            //AddColumn("dbo.ProductOutStore", "OutStoreDate", c => c.DateTime());
+            //AddColumn("dbo.ProductOutStore", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.ProductOutStore", "ApplyOutStoreSourceType", c => c.Int(nullable: false));
+            //AddColumn("dbo.ProductOutStore", "CreateSourceType", c => c.Int());
+            //AddColumn("dbo.Products", "SpecialDesc", c => c.String(maxLength: 50));
+            //AddColumn("dbo.Products", "ModelNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.Products", "MaterialNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.Products", "SurfaceColorNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.Products", "RigidityNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.Products", "SpecialNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.Products", "PrevProductNo", c => c.String(maxLength: 50));
+            //AddColumn("dbo.ProductInspectReportContents", "ProductionOrderNo", c => c.String(maxLength: 32));
+            //AddColumn("dbo.SemiEnterStore", "EnterStoreUser", c => c.String(maxLength: 20));
+            //AddColumn("dbo.SemiEnterStore", "EnterStoreDate", c => c.DateTime());
+            //AddColumn("dbo.SemiEnterStore", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.SemiEnterStore", "CreateSourceType", c => c.Int());
+            //AddColumn("dbo.SemiEnterStore", "StoreLocationNo", c => c.String(maxLength: 32));
+            //AddColumn("dbo.SemiOutStores", "OutStoreUser", c => c.String(maxLength: 20));
+            //AddColumn("dbo.SemiOutStores", "OutStoreDate", c => c.DateTime());
+            //AddColumn("dbo.SemiOutStores", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AddColumn("dbo.SemiOutStores", "CreateSourceType", c => c.Int());
+            //AddColumn("dbo.SemiProducts", "SpecialDesc", c => c.String(maxLength: 50));
+            //AddColumn("dbo.SemiProducts", "ModelNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.SemiProducts", "MaterialNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.SemiProducts", "SurfaceColorNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.SemiProducts", "RigidityNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.SemiProducts", "SpecialNo", c => c.String(maxLength: 20));
+            //AddColumn("dbo.SemiProducts", "PrevProductNo", c => c.String(maxLength: 50));
+            //AddColumn("dbo.TemplateInfos", "TempKey", c => c.String(maxLength: 50));
+            //AddColumn("dbo.TemplateInfos", "FilePath", c => c.String(maxLength: 300));
+            //AddColumn("dbo.TemplateInfos", "FileExt", c => c.String(maxLength: 50));
+            //AddColumn("dbo.TemplateInfos", "ClassPath", c => c.String(maxLength: 100));
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "ProductDesc", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "PartNo", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "PreMonthQuantity", c => c.Decimal(precision: 18, scale: 3));
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "InventoryCheckState", c => c.Int());
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "ReturnState", c => c.Int());
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "StoreAreaCode", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "ShelfNumber", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "ShelfLevel", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "SequenceNo", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentProductStoreHouse", "LocationRemark", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "PartNo", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "StoreLocationNo", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "PreMonthQuantity", c => c.Decimal(precision: 18, scale: 3));
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "InventoryCheckState", c => c.Int());
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "ReturnState", c => c.Int());
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "StoreAreaCode", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "ShelfNumber", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "ShelfLevel", c => c.String());
+            //AddColumn("dbo.N_ViewCurrentSemiStoreHouse", "SequenceNo", c => c.String());
+            //AddColumn("dbo.v_customerstick", "StatementBillNo", c => c.String());
+            //AddColumn("dbo.N_ViewOrderItems", "AfterTaxTotalPrice", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderItems", "SaleType", c => c.Int());
+            //AddColumn("dbo.N_ViewOrderItems", "SaleMan", c => c.String());
+            //AddColumn("dbo.N_ViewOrderItems", "EmergencyLevel", c => c.Int(nullable: false));
+            //AddColumn("dbo.N_ViewOrderItems", "IsLock", c => c.String());
+            //AddColumn("dbo.N_ViewOrderItems", "StandardName", c => c.String());
+            //AddColumn("dbo.N_ViewOrderItems", "StoreCompleteState", c => c.Int(nullable: false));
+            //AddColumn("dbo.N_ViewOrderItems", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderItems", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderItems", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderItems", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.v_OrderSendBill", "OrderSendCount", c => c.Int(nullable: false));
+            //AddColumn("dbo.v_OrderSendBill", "StatementCount", c => c.Int(nullable: false));
+            //AddColumn("dbo.v_OrderSendBill", "ExpressId", c => c.Int());
+            //AddColumn("dbo.v_OrderSendBill", "ExpressBillNo", c => c.String());
+            //AddColumn("dbo.v_OrderSendBill", "ExpressName", c => c.String());
+            //AddColumn("dbo.v_OrderSendBill", "CreatorUserId", c => c.String());
+            //AddColumn("dbo.v_OrderSendBill", "TotalPrice", c => c.Decimal(precision: 18, scale: 3));
+            //AddColumn("dbo.v_OrderSendBill", "AfterTaxTotalPrice", c => c.Decimal(precision: 18, scale: 3));
+            //AddColumn("dbo.v_OrderSendBill", "CurrencyId", c => c.String());
+            //AddColumn("dbo.N_ViewOrderSends", "CustomerName", c => c.String());
+            //AddColumn("dbo.N_ViewOrderSends", "SaleType", c => c.Int());
+            //AddColumn("dbo.N_ViewOrderSends", "AfterTaxPrice", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderSends", "StatementBillNo", c => c.String());
+            //AddColumn("dbo.N_ViewOrderSends", "SendActionDate", c => c.DateTime());
+            //AddColumn("dbo.N_ViewOrderSends", "StandardName", c => c.String());
+            //AddColumn("dbo.N_ViewOrderSends", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderSends", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderSends", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderSends", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewOrderSends", "SendBillSort", c => c.Int(nullable: false));
+            //AddColumn("dbo.N_ViewOrderSends", "StatementBillSort", c => c.Int(nullable: false));
+            //AddColumn("dbo.vwOrderSendBill", "StatementBillNo", c => c.String());
+            //AddColumn("dbo.vwOrderSendBill", "CurrencyId", c => c.String());
+            //AddColumn("dbo.vwOrderSendBill", "AfterTaxPrice", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.vwOrderSendBill", "LogisticsFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.vwOrderSendBill", "MoldFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.vwOrderSendBill", "LogisticsFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.vwOrderSendBill", "MoldFeeAfterTax", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.vwOrderSendBill", "AfterTaxTotalprice", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.vwOrderSendBill", "SendBillSort", c => c.Int(nullable: false));
+            //AddColumn("dbo.vwOrderSendBill", "StatementBillSort", c => c.Int(nullable: false));
+            //AddColumn("dbo.N_ViewProductEnterStore", "PackageProductNo", c => c.String(maxLength: 32));
+            //AddColumn("dbo.N_ViewProductEnterStore", "ApplySourceType", c => c.Int(nullable: false));
+            //AddColumn("dbo.N_ViewProductEnterStore", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewProductEnterStore", "SourceStoreHouseId", c => c.Int(nullable: false));
+            //AddColumn("dbo.N_ViewProductEnterStore", "CreateSourceType", c => c.Int());
+            //AddColumn("dbo.N_ViewProductEnterStore", "PackageEnterNum", c => c.String());
+            //AddColumn("dbo.N_ViewProductOutStore", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewProductOutStore", "ApplyOutStoreSourceType", c => c.Int(nullable: false));
+            //AddColumn("dbo.N_ViewProductOutStore", "CreateSourceType", c => c.Int());
+            //AddColumn("dbo.N_ViewProductOutStore", "OrderDate", c => c.DateTime());
+            //AddColumn("dbo.N_ViewSemiEnterStore", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewSemiEnterStore", "CreateSourceType", c => c.Int());
+            //AddColumn("dbo.N_ViewSemiEnterStore", "StoreLocationNo", c => c.String());
+            //AddColumn("dbo.N_ViewSemiOutStore", "KgWeight", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AddColumn("dbo.N_ViewSemiOutStore", "CreateSourceType", c => c.Int());
+            //AlterColumn("dbo.BackUpCurrentSemiStoreHouse", "FreezeQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.BackUpCurrentSemiStoreHouse", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.CurrentProductStoreHouse", "FreezeQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.CurrentProductStoreHouse", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.CurrentSemiStoreHouse", "FreezeQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.CurrentSemiStoreHouse", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.FinshedEnterStore", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.FinshedEnterStore", "PackageSpecification", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.FinshedEnterStore", "PackageCount", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.FinshedEnterStore", "ActualPackageCount", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.OrderItems", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 3, storeType: "numeric"));
+            //AlterColumn("dbo.OrderSend", "SendQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.OrderSend", "QuantityPerPack", c => c.Decimal(precision: 18, scale: 3));
+            //AlterColumn("dbo.OrderSend", "PackageCount", c => c.Decimal(precision: 18, scale: 3));
+            //AlterColumn("dbo.PackageApply", "ApplyQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.PackageApply", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.ProductionOrders", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.ProductionOrders", "EnterQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.ProductOutStore", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.ProductOutStore", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.Products", "TranUnitValue", c => c.Decimal(precision: 18, scale: 3));
+            //AlterColumn("dbo.SemiEnterStore", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.SemiEnterStore", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.SemiOutStores", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.SemiOutStores", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.SemiProducts", "TranUnitValue", c => c.Decimal(precision: 18, scale: 3));
+            //AlterColumn("dbo.SemiProductStore", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 3));
+            //AlterColumn("dbo.N_ViewOrderSends", "OrderDate", c => c.DateTime());
+            //AlterColumn("dbo.N_ViewOrderSends", "CustomerSendId", c => c.Int());
+            //DropColumn("dbo.FinshedEnterStore", "SemiProductNo");
+            //DropColumn("dbo.FinshedEnterStore", "ApplySource");
+            //DropColumn("dbo.v_OrderSendBill", "StickNum");
+            //DropColumn("dbo.v_OrderSendBill", "StickMan");
+            //DropColumn("dbo.v_OrderSendBill", "CreatDate");
+            //DropColumn("dbo.v_OrderSendBill", "isbill");
+            //DropColumn("dbo.N_ViewProductEnterStore", "SemiProductNo");
+            //DropColumn("dbo.N_ViewProductEnterStore", "ApplySource");
+            //DropTable("dbo.ProductionOrderLogs");
+        }
+        
+        public override void Down()
+        {
+            //CreateTable(
+            //    "dbo.ProductionOrderLogs",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ProductionOrderNo = c.String(nullable: false, maxLength: 11),
+            //            OperatorTitle = c.String(maxLength: 150),
+            //            OperatorConent = c.String(),
+            //            TimeCreated = c.DateTime(),
+            //            CreatorUserId = c.String(maxLength: 20),
+            //        })
+            //    .PrimaryKey(t => t.Id);
+            
+            //AddColumn("dbo.N_ViewProductEnterStore", "ApplySource", c => c.Int(nullable: false));
+            //AddColumn("dbo.N_ViewProductEnterStore", "SemiProductNo", c => c.String(maxLength: 32));
+            //AddColumn("dbo.v_OrderSendBill", "isbill", c => c.String());
+            //AddColumn("dbo.v_OrderSendBill", "CreatDate", c => c.DateTime());
+            //AddColumn("dbo.v_OrderSendBill", "StickMan", c => c.String());
+            //AddColumn("dbo.v_OrderSendBill", "StickNum", c => c.String());
+            //AddColumn("dbo.FinshedEnterStore", "ApplySource", c => c.Int(nullable: false));
+            //AddColumn("dbo.FinshedEnterStore", "SemiProductNo", c => c.String(maxLength: 50));
+            //DropForeignKey("dbo.ScrapTypeInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.ScrapTypeInfo", "DeleterUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.ScrapTypeInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.QualityIssueLabelInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.QualityIssueLabelInfo", "DeleterUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.QualityIssueLabelInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.ProductionOrderLogInfo", "EmployeeId", "dbo.EmployeeInfo");
+            //DropForeignKey("dbo.ProductionOrderLogInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.MoldInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.MoldInfo", "DeleterUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.MoldInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.MaintenanceRecordInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.MaintenanceMemberInfo", "EmployeeId", "dbo.EmployeeInfo");
+            //DropForeignKey("dbo.MaintenanceMemberInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.LicenseTypeInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.LicenseTypeInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.LicenseDocumentInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.LicenseDocumentInfo", "DeleterUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.LicenseDocumentInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.FixedAssetTypeInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.FixedAssetTypeInfo", "DeleterUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.FixedAssetTypeInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.FixedAssetInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.FixedAssetInfo", "DeleterUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.FixedAssetInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.ExpressProviderMappers", "ProviderId", "dbo.ExpressServiceProviders");
+            //DropForeignKey("dbo.ExpressProviderMappers", "ExpressId", "dbo.ExpressLogistics");
+            //DropForeignKey("dbo.EmployeeWorkPerformanceInfo", "EmployeeId", "dbo.EmployeeInfo");
+            //DropForeignKey("dbo.EmployeeWorkPerformanceInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.EmployeeInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.EmployeeInfo", "DeleterUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.EmployeeInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.DisqualifiedProductInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.DeviceMgPlanInfo", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.DeviceMgPlanInfo", "DeleterUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.DeviceMgPlanInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.CustomerDisProductInfo", "CreatorUserId", "dbo.Sys_Users");
+            //DropIndex("dbo.N_ViewStatementBill", new[] { "StatementBillNo" });
+            //DropIndex("dbo.StatementBill", new[] { "StatementBillNo" });
+            //DropIndex("dbo.ScrapTypeInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.ScrapTypeInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.ScrapTypeInfo", new[] { "DeleterUserId" });
+            //DropIndex("dbo.ReturnGoodOrder", new[] { "ReturnOrderNo" });
+            //DropIndex("dbo.QualityIssueLabelInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.QualityIssueLabelInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.QualityIssueLabelInfo", new[] { "DeleterUserId" });
+            //DropIndex("dbo.ProductionOrderLogInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.ProductionOrderLogInfo", new[] { "EmployeeId" });
+            //DropIndex("dbo.MoldInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.MoldInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.MoldInfo", new[] { "DeleterUserId" });
+            //DropIndex("dbo.MaintenanceRecordInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.MaintenanceMemberInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.MaintenanceMemberInfo", new[] { "EmployeeId" });
+            //DropIndex("dbo.LicenseTypeInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.LicenseTypeInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.LicenseDocumentInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.LicenseDocumentInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.LicenseDocumentInfo", new[] { "DeleterUserId" });
+            //DropIndex("dbo.FixedAssetTypeInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.FixedAssetTypeInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.FixedAssetTypeInfo", new[] { "DeleterUserId" });
+            //DropIndex("dbo.FixedAssetInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.FixedAssetInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.FixedAssetInfo", new[] { "DeleterUserId" });
+            //DropIndex("dbo.ExpressProviderMappers", new[] { "ProviderId" });
+            //DropIndex("dbo.ExpressProviderMappers", new[] { "ExpressId" });
+            //DropIndex("dbo.EmployeeWorkPerformanceInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.EmployeeWorkPerformanceInfo", new[] { "EmployeeId" });
+            //DropIndex("dbo.EmployeeInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.EmployeeInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.EmployeeInfo", new[] { "DeleterUserId" });
+            //DropIndex("dbo.DisqualifiedProductInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.DeviceMgPlanInfo", new[] { "CreatorUserId" });
+            //DropIndex("dbo.DeviceMgPlanInfo", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.DeviceMgPlanInfo", new[] { "DeleterUserId" });
+            //DropIndex("dbo.CustomerDisProductInfo", new[] { "CreatorUserId" });
+            //AlterColumn("dbo.N_ViewOrderSends", "CustomerSendId", c => c.Int(nullable: false));
+            //AlterColumn("dbo.N_ViewOrderSends", "OrderDate", c => c.DateTime(nullable: false));
+            //AlterColumn("dbo.SemiProductStore", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.SemiProducts", "TranUnitValue", c => c.Decimal(precision: 18, scale: 2));
+            //AlterColumn("dbo.SemiOutStores", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.SemiOutStores", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.SemiEnterStore", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.SemiEnterStore", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.Products", "TranUnitValue", c => c.Decimal(precision: 18, scale: 2));
+            //AlterColumn("dbo.ProductOutStore", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.ProductOutStore", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.ProductionOrders", "EnterQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.ProductionOrders", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.PackageApply", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.PackageApply", "ApplyQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.OrderSend", "PackageCount", c => c.Decimal(precision: 18, scale: 2));
+            //AlterColumn("dbo.OrderSend", "QuantityPerPack", c => c.Decimal(precision: 18, scale: 2));
+            //AlterColumn("dbo.OrderSend", "SendQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.OrderItems", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 2, storeType: "numeric"));
+            //AlterColumn("dbo.FinshedEnterStore", "ActualPackageCount", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.FinshedEnterStore", "PackageCount", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.FinshedEnterStore", "PackageSpecification", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.FinshedEnterStore", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.CurrentSemiStoreHouse", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.CurrentSemiStoreHouse", "FreezeQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.CurrentProductStoreHouse", "Quantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.CurrentProductStoreHouse", "FreezeQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.BackUpCurrentSemiStoreHouse", "ActualQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //AlterColumn("dbo.BackUpCurrentSemiStoreHouse", "FreezeQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 2));
+            //DropColumn("dbo.N_ViewSemiOutStore", "CreateSourceType");
+            //DropColumn("dbo.N_ViewSemiOutStore", "KgWeight");
+            //DropColumn("dbo.N_ViewSemiEnterStore", "StoreLocationNo");
+            //DropColumn("dbo.N_ViewSemiEnterStore", "CreateSourceType");
+            //DropColumn("dbo.N_ViewSemiEnterStore", "KgWeight");
+            //DropColumn("dbo.N_ViewProductOutStore", "OrderDate");
+            //DropColumn("dbo.N_ViewProductOutStore", "CreateSourceType");
+            //DropColumn("dbo.N_ViewProductOutStore", "ApplyOutStoreSourceType");
+            //DropColumn("dbo.N_ViewProductOutStore", "KgWeight");
+            //DropColumn("dbo.N_ViewProductEnterStore", "PackageEnterNum");
+            //DropColumn("dbo.N_ViewProductEnterStore", "CreateSourceType");
+            //DropColumn("dbo.N_ViewProductEnterStore", "SourceStoreHouseId");
+            //DropColumn("dbo.N_ViewProductEnterStore", "KgWeight");
+            //DropColumn("dbo.N_ViewProductEnterStore", "ApplySourceType");
+            //DropColumn("dbo.N_ViewProductEnterStore", "PackageProductNo");
+            //DropColumn("dbo.vwOrderSendBill", "StatementBillSort");
+            //DropColumn("dbo.vwOrderSendBill", "SendBillSort");
+            //DropColumn("dbo.vwOrderSendBill", "AfterTaxTotalprice");
+            //DropColumn("dbo.vwOrderSendBill", "MoldFeeAfterTax");
+            //DropColumn("dbo.vwOrderSendBill", "LogisticsFeeAfterTax");
+            //DropColumn("dbo.vwOrderSendBill", "MoldFee");
+            //DropColumn("dbo.vwOrderSendBill", "LogisticsFee");
+            //DropColumn("dbo.vwOrderSendBill", "AfterTaxPrice");
+            //DropColumn("dbo.vwOrderSendBill", "CurrencyId");
+            //DropColumn("dbo.vwOrderSendBill", "StatementBillNo");
+            //DropColumn("dbo.N_ViewOrderSends", "StatementBillSort");
+            //DropColumn("dbo.N_ViewOrderSends", "SendBillSort");
+            //DropColumn("dbo.N_ViewOrderSends", "MoldFeeAfterTax");
+            //DropColumn("dbo.N_ViewOrderSends", "LogisticsFeeAfterTax");
+            //DropColumn("dbo.N_ViewOrderSends", "MoldFee");
+            //DropColumn("dbo.N_ViewOrderSends", "LogisticsFee");
+            //DropColumn("dbo.N_ViewOrderSends", "StandardName");
+            //DropColumn("dbo.N_ViewOrderSends", "SendActionDate");
+            //DropColumn("dbo.N_ViewOrderSends", "StatementBillNo");
+            //DropColumn("dbo.N_ViewOrderSends", "AfterTaxPrice");
+            //DropColumn("dbo.N_ViewOrderSends", "SaleType");
+            //DropColumn("dbo.N_ViewOrderSends", "CustomerName");
+            //DropColumn("dbo.v_OrderSendBill", "CurrencyId");
+            //DropColumn("dbo.v_OrderSendBill", "AfterTaxTotalPrice");
+            //DropColumn("dbo.v_OrderSendBill", "TotalPrice");
+            //DropColumn("dbo.v_OrderSendBill", "CreatorUserId");
+            //DropColumn("dbo.v_OrderSendBill", "ExpressName");
+            //DropColumn("dbo.v_OrderSendBill", "ExpressBillNo");
+            //DropColumn("dbo.v_OrderSendBill", "ExpressId");
+            //DropColumn("dbo.v_OrderSendBill", "StatementCount");
+            //DropColumn("dbo.v_OrderSendBill", "OrderSendCount");
+            //DropColumn("dbo.N_ViewOrderItems", "MoldFeeAfterTax");
+            //DropColumn("dbo.N_ViewOrderItems", "LogisticsFeeAfterTax");
+            //DropColumn("dbo.N_ViewOrderItems", "MoldFee");
+            //DropColumn("dbo.N_ViewOrderItems", "LogisticsFee");
+            //DropColumn("dbo.N_ViewOrderItems", "StoreCompleteState");
+            //DropColumn("dbo.N_ViewOrderItems", "StandardName");
+            //DropColumn("dbo.N_ViewOrderItems", "IsLock");
+            //DropColumn("dbo.N_ViewOrderItems", "EmergencyLevel");
+            //DropColumn("dbo.N_ViewOrderItems", "SaleMan");
+            //DropColumn("dbo.N_ViewOrderItems", "SaleType");
+            //DropColumn("dbo.N_ViewOrderItems", "AfterTaxTotalPrice");
+            //DropColumn("dbo.v_customerstick", "StatementBillNo");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "SequenceNo");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "ShelfLevel");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "ShelfNumber");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "StoreAreaCode");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "ReturnState");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "InventoryCheckState");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "PreMonthQuantity");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "StoreLocationNo");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "KgWeight");
+            //DropColumn("dbo.N_ViewCurrentSemiStoreHouse", "PartNo");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "LocationRemark");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "SequenceNo");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "ShelfLevel");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "ShelfNumber");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "StoreAreaCode");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "ReturnState");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "InventoryCheckState");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "PreMonthQuantity");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "KgWeight");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "PartNo");
+            //DropColumn("dbo.N_ViewCurrentProductStoreHouse", "ProductDesc");
+            //DropColumn("dbo.TemplateInfos", "ClassPath");
+            //DropColumn("dbo.TemplateInfos", "FileExt");
+            //DropColumn("dbo.TemplateInfos", "FilePath");
+            //DropColumn("dbo.TemplateInfos", "TempKey");
+            //DropColumn("dbo.SemiProducts", "PrevProductNo");
+            //DropColumn("dbo.SemiProducts", "SpecialNo");
+            //DropColumn("dbo.SemiProducts", "RigidityNo");
+            //DropColumn("dbo.SemiProducts", "SurfaceColorNo");
+            //DropColumn("dbo.SemiProducts", "MaterialNo");
+            //DropColumn("dbo.SemiProducts", "ModelNo");
+            //DropColumn("dbo.SemiProducts", "SpecialDesc");
+            //DropColumn("dbo.SemiOutStores", "CreateSourceType");
+            //DropColumn("dbo.SemiOutStores", "KgWeight");
+            //DropColumn("dbo.SemiOutStores", "OutStoreDate");
+            //DropColumn("dbo.SemiOutStores", "OutStoreUser");
+            //DropColumn("dbo.SemiEnterStore", "StoreLocationNo");
+            //DropColumn("dbo.SemiEnterStore", "CreateSourceType");
+            //DropColumn("dbo.SemiEnterStore", "KgWeight");
+            //DropColumn("dbo.SemiEnterStore", "EnterStoreDate");
+            //DropColumn("dbo.SemiEnterStore", "EnterStoreUser");
+            //DropColumn("dbo.ProductInspectReportContents", "ProductionOrderNo");
+            //DropColumn("dbo.Products", "PrevProductNo");
+            //DropColumn("dbo.Products", "SpecialNo");
+            //DropColumn("dbo.Products", "RigidityNo");
+            //DropColumn("dbo.Products", "SurfaceColorNo");
+            //DropColumn("dbo.Products", "MaterialNo");
+            //DropColumn("dbo.Products", "ModelNo");
+            //DropColumn("dbo.Products", "SpecialDesc");
+            //DropColumn("dbo.ProductOutStore", "CreateSourceType");
+            //DropColumn("dbo.ProductOutStore", "ApplyOutStoreSourceType");
+            //DropColumn("dbo.ProductOutStore", "KgWeight");
+            //DropColumn("dbo.ProductOutStore", "OutStoreDate");
+            //DropColumn("dbo.ProductOutStore", "OutStoreUser");
+            //DropColumn("dbo.ProductionOrders", "MaxQuantity");
+            //DropColumn("dbo.ProductionOrders", "HasExported");
+            //DropColumn("dbo.ProductionOrders", "InspectDate");
+            //DropColumn("dbo.ProductionOrders", "EnterDate");
+            //DropColumn("dbo.ProductionOrders", "OutsourcingFactory");
+            //DropColumn("dbo.ProductionOrders", "KgWeight");
+            //DropColumn("dbo.ProductInspectInfos", "InspectSubject");
+            //DropColumn("dbo.ProductInspectInfos", "ProductInspectReportNo");
+            //DropColumn("dbo.PackageApply", "KgWeight");
+            //DropColumn("dbo.PackageApply", "SourceStore");
+            //DropColumn("dbo.PackageApply", "ProductNo");
+            //DropColumn("dbo.OrderStickBills", "InvoiceType");
+            //DropColumn("dbo.OrderStickBills", "OrderNo");
+            //DropColumn("dbo.OrderStickBills", "ReturnOrderNo");
+            //DropColumn("dbo.OrderStickBills", "OriginalStickNum");
+            //DropColumn("dbo.OrderStickBills", "Amount");
+            //DropColumn("dbo.OrderStickBills", "InvoiceState");
+            //DropColumn("dbo.OrderSend", "StatementBillSort");
+            //DropColumn("dbo.OrderSend", "SendBillSort");
+            //DropColumn("dbo.OrderSend", "MoldFeeAfterTax");
+            //DropColumn("dbo.OrderSend", "LogisticsFeeAfterTax");
+            //DropColumn("dbo.OrderSend", "MoldFee");
+            //DropColumn("dbo.OrderSend", "LogisticsFee");
+            //DropColumn("dbo.OrderSend", "StatementBillNo");
+            //DropColumn("dbo.OrderSend", "CreatorUserId");
+            //DropColumn("dbo.OrderSendBills", "ExpressBillNo");
+            //DropColumn("dbo.OrderSendBills", "ExpressId");
+            //DropColumn("dbo.OrderItems", "MoldFeeAfterTax");
+            //DropColumn("dbo.OrderItems", "LogisticsFeeAfterTax");
+            //DropColumn("dbo.OrderItems", "MoldFee");
+            //DropColumn("dbo.OrderItems", "LogisticsFee");
+            //DropColumn("dbo.OrderItems", "StoreCompleteState");
+            //DropColumn("dbo.OrderItems", "StandardName");
+            //DropColumn("dbo.OrderItems", "IsLock");
+            //DropColumn("dbo.OrderItems", "EmergencyLevel");
+            //DropColumn("dbo.OrderItems", "ToCnyRate");
+            //DropColumn("dbo.OrderHeader", "IsLock");
+            //DropColumn("dbo.OrderHeader", "SaleMan");
+            //DropColumn("dbo.OrderHeader", "SaleType");
+            //DropColumn("dbo.Sys_Users", "AccountNo");
+            //DropColumn("dbo.FinshedEnterStore", "ApplyQuantity2");
+            //DropColumn("dbo.FinshedEnterStore", "VerifyUser");
+            //DropColumn("dbo.FinshedEnterStore", "PackageUser");
+            //DropColumn("dbo.FinshedEnterStore", "PackageEnterNum");
+            //DropColumn("dbo.FinshedEnterStore", "CreateSourceType");
+            //DropColumn("dbo.FinshedEnterStore", "KgWeight");
+            //DropColumn("dbo.FinshedEnterStore", "EnterStoreDate");
+            //DropColumn("dbo.FinshedEnterStore", "EnterStoreUser");
+            //DropColumn("dbo.FinshedEnterStore", "ApplyQuantity");
+            //DropColumn("dbo.FinshedEnterStore", "ApplySourceType");
+            //DropColumn("dbo.FinshedEnterStore", "SourceStoreHouseId");
+            //DropColumn("dbo.FinshedEnterStore", "PackageProductNo");
+            //DropColumn("dbo.Customers", "SaleType");
+            //DropColumn("dbo.CustomerDefaultProduct", "PartNo");
+            //DropColumn("dbo.CurrentSemiStoreHouse", "ReturnState");
+            //DropColumn("dbo.CurrentSemiStoreHouse", "InventoryCheckState");
+            //DropColumn("dbo.CurrentSemiStoreHouse", "PreMonthQuantity");
+            //DropColumn("dbo.CurrentSemiStoreHouse", "KgWeight");
+            //DropColumn("dbo.CurrentSemiStoreHouse", "StoreLocationNo");
+            //DropColumn("dbo.CurrentProductStoreHouse", "ReturnState");
+            //DropColumn("dbo.CurrentProductStoreHouse", "InventoryCheckState");
+            //DropColumn("dbo.CurrentProductStoreHouse", "PreMonthQuantity");
+            //DropColumn("dbo.CurrentProductStoreHouse", "KgWeight");
+            //DropColumn("dbo.BackUpCurrentSemiStoreHouse", "KgWeight");
+            //DropTable("dbo.v_OrderStickBill");
+            //DropTable("dbo.N_ViewStatementBill");
+            //DropTable("dbo.N_ViewScrapEnterStore",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ViewScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.N_ViewRmOutStore",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ViewRmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.N_ViewRmEnterStore",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ViewRmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.N_ViewPackageApply");
+            //DropTable("dbo.N_ViewInventoryCheckRecord_Semi");
+            //DropTable("dbo.N_ViewInventoryCheckRecord_Product");
+            //DropTable("dbo.v_EnterOutSemiProductStore");
+            //DropTable("dbo.v_Store_Query");
+            //DropTable("dbo.vEnterOutLogDetail_c");
+            //DropTable("dbo.NV_ViewEmployeeInfo");
+            //DropTable("dbo.N_ViewDisqualifiedReturn");
+            //DropTable("dbo.N_ViewDisqualifiedProduction");
+            //DropTable("dbo.v_ProductStoreInfo");
+            //DropTable("dbo.v_SemiProductStoreInfo");
+            //DropTable("dbo.N_ViewCurrentRmStoreHouse",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ViewCurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.StatementBill");
+            //DropTable("dbo.StandardDetail",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.StandardCatalog",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.ScrapTypeInfo",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ScrapType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.ScrapEnterStore",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.N_ViewScheduleOrderSend");
+            //DropTable("dbo.ScheduleOrderSend");
+            //DropTable("dbo.RmProduct",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_RmProduct_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.RmOutStore",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_RmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.RmEnterStore",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_RmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.ReturnGoodOrder",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ReturnGoodOrder_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.QualityIssueLabelInfo",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_QualityIssueLabel_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.ProductProperties",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ProductProperty_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.ProductMapper",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_ProductMapper_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.ProductionOrderLogInfo");
+            //DropTable("dbo.ProductInspectReportInfos");
+            //DropTable("dbo.OutFactory");
+            //DropTable("dbo.OrderSendExceed");
+            //DropTable("dbo.OrderProduction");
+            //DropTable("dbo.MoldInfo",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_Mold_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.MaintenanceRecordInfo");
+            //DropTable("dbo.MaintenanceMemberInfo");
+            //DropTable("dbo.LicenseTypeInfo");
+            //DropTable("dbo.LicenseDocumentInfo",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_LicenseDocument_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.InventoryCheckRecord");
+            //DropTable("dbo.InventoryCheck",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_InventoryCheckInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.FixedAssetTypeInfo",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_FixedAssetType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.FixedAssetInfo",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_FixedAsset_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.ExpressServiceProviders");
+            //DropTable("dbo.ExpressProviderMappers");
+            //DropTable("dbo.ExpressLogistics");
+            //DropTable("dbo.EmployeeWorkPerformanceInfo");
+            //DropTable("dbo.EmployeeInfo",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_Employee_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.DisqualifiedProductInfo");
+            //DropTable("dbo.DeviceMgPlanInfo",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_DeviceMgPlan_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.CustomerInvoiceAddress",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_CustomerInvoiceAddress_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.CustomerDisProductInfo");
+            //DropTable("dbo.CurrentRmStoreHouse",
+            //    removedAnnotations: new Dictionary<string, object>
+            //    {
+            //        { "DynamicFilter_CurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
+            //    });
+            //DropTable("dbo.CurrencyExchangeRate");
+            //DropTable("dbo.Currency");
+            //RenameColumn(table: "dbo.PackageApply", name: "CurrentStoreHouseNo", newName: "CurrentSemiStoreHouseNo");
+            //RenameTable(name: "dbo.ProductInspectReportContents", newName: "ProductInspectReports");
+        }
+    }
+}

File diff suppressed because it is too large
+ 120 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260241009_init.resx


+ 3 - 3
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202203010718122_updateordersendfee.Designer.cs → src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260251076_addMoldProductionRecord.Designer.cs

@@ -7,13 +7,13 @@ namespace ShwasherSys.Migrations
     using System.Resources;
     
     [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class updateordersendfee : IMigrationMetadata
+    public sealed partial class addMoldProductionRecord : IMigrationMetadata
     {
-        private readonly ResourceManager Resources = new ResourceManager(typeof(updateordersendfee));
+        private readonly ResourceManager Resources = new ResourceManager(typeof(addMoldProductionRecord));
         
         string IMigrationMetadata.Id
         {
-            get { return "202203010718122_updateordersendfee"; }
+            get { return "202405260251076_addMoldProductionRecord"; }
         }
         
         string IMigrationMetadata.Source

+ 40 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260251076_addMoldProductionRecord.cs

@@ -0,0 +1,40 @@
+namespace ShwasherSys.Migrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class addMoldProductionRecord : DbMigration
+    {
+        public override void Up()
+        {
+            CreateTable(
+                "dbo.MoldProductionRecord",
+                c => new
+                    {
+                        Id = c.Long(nullable: false, identity: true),
+                        ProductionOrderNo = c.String(maxLength: 11),
+                        MoldNo = c.String(maxLength:50),
+                        Quantity=c.Int(nullable: false),
+                        LastModificationTime = c.DateTime(),
+                        LastModifierUserId = c.Long(),
+                        CreationTime = c.DateTime(nullable: false),
+                        CreatorUserId = c.Long(),
+                    })
+                .PrimaryKey(t => t.Id)
+                .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+                .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+                .Index(t => t.LastModifierUserId)
+                .Index(t => t.CreatorUserId);
+            
+        }
+        
+        public override void Down()
+        {
+            DropForeignKey("dbo.MoldProductionRecord", "LastModifierUserId", "dbo.Sys_Users");
+            DropForeignKey("dbo.MoldProductionRecord", "CreatorUserId", "dbo.Sys_Users");
+            DropIndex("dbo.MoldProductionRecord", new[] { "CreatorUserId" });
+            DropIndex("dbo.MoldProductionRecord", new[] { "LastModifierUserId" });
+            DropTable("dbo.MoldProductionRecord");
+        }
+    }
+}

File diff suppressed because it is too large
+ 120 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202405260251076_addMoldProductionRecord.resx


+ 10 - 59
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/ShwasherSys.EntityFramework.csproj

@@ -282,41 +282,13 @@
     <Compile Include="EntityFramework\ISqlExecuter.cs" />
     <Compile Include="EntityFramework\Repositories\RepositoryBase.cs" />
     <Compile Include="EntityFramework\SqlExecuter.cs" />
-    <Compile Include="Migrations\202112100327261_init.cs" />
-    <Compile Include="Migrations\202112100327261_init.Designer.cs">
-      <DependentUpon>202112100327261_init.cs</DependentUpon>
+    <Compile Include="Migrations\202405260241009_init.cs" />
+    <Compile Include="Migrations\202405260241009_init.Designer.cs">
+      <DependentUpon>202405260241009_init.cs</DependentUpon>
     </Compile>
-    <Compile Include="Migrations\202112190826495_updateordersend.cs" />
-    <Compile Include="Migrations\202112190826495_updateordersend.Designer.cs">
-      <DependentUpon>202112190826495_updateordersend.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Migrations\202112280809562_update_ordersend_sort.cs" />
-    <Compile Include="Migrations\202112280809562_update_ordersend_sort.Designer.cs">
-      <DependentUpon>202112280809562_update_ordersend_sort.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Migrations\202203010718122_updateordersendfee.cs" />
-    <Compile Include="Migrations\202203010718122_updateordersendfee.Designer.cs">
-      <DependentUpon>202203010718122_updateordersendfee.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Migrations\202203010744005_updateordersendaddfee.cs" />
-    <Compile Include="Migrations\202203010744005_updateordersendaddfee.Designer.cs">
-      <DependentUpon>202203010744005_updateordersendaddfee.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Migrations\202301010903570_add-ScheduleOrderSend.cs" />
-    <Compile Include="Migrations\202301010903570_add-ScheduleOrderSend.Designer.cs">
-      <DependentUpon>202301010903570_add-ScheduleOrderSend.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Migrations\202301091141462_addStandardCatelog.cs" />
-    <Compile Include="Migrations\202301091141462_addStandardCatelog.Designer.cs">
-      <DependentUpon>202301091141462_addStandardCatelog.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Migrations\202301091156360_updateStandardCatelog.cs" />
-    <Compile Include="Migrations\202301091156360_updateStandardCatelog.Designer.cs">
-      <DependentUpon>202301091156360_updateStandardCatelog.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Migrations\202303090653567_updateStandardDetail.cs" />
-    <Compile Include="Migrations\202303090653567_updateStandardDetail.Designer.cs">
-      <DependentUpon>202303090653567_updateStandardDetail.cs</DependentUpon>
+    <Compile Include="Migrations\202405260251076_addMoldProductionRecord.cs" />
+    <Compile Include="Migrations\202405260251076_addMoldProductionRecord.Designer.cs">
+      <DependentUpon>202405260251076_addMoldProductionRecord.cs</DependentUpon>
     </Compile>
     <Compile Include="Migrations\Configuration.cs" />
     <Compile Include="Migrations\SeedData\DefaultAppGuidsCreator.cs" />
@@ -351,32 +323,11 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Migrations\202112100327261_init.resx">
-      <DependentUpon>202112100327261_init.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Migrations\202112190826495_updateordersend.resx">
-      <DependentUpon>202112190826495_updateordersend.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Migrations\202112280809562_update_ordersend_sort.resx">
-      <DependentUpon>202112280809562_update_ordersend_sort.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Migrations\202203010718122_updateordersendfee.resx">
-      <DependentUpon>202203010718122_updateordersendfee.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Migrations\202203010744005_updateordersendaddfee.resx">
-      <DependentUpon>202203010744005_updateordersendaddfee.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Migrations\202301010903570_add-ScheduleOrderSend.resx">
-      <DependentUpon>202301010903570_add-ScheduleOrderSend.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Migrations\202301091141462_addStandardCatelog.resx">
-      <DependentUpon>202301091141462_addStandardCatelog.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Migrations\202301091156360_updateStandardCatelog.resx">
-      <DependentUpon>202301091156360_updateStandardCatelog.cs</DependentUpon>
+    <EmbeddedResource Include="Migrations\202405260241009_init.resx">
+      <DependentUpon>202405260241009_init.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="Migrations\202303090653567_updateStandardDetail.resx">
-      <DependentUpon>202303090653567_updateStandardDetail.cs</DependentUpon>
+    <EmbeddedResource Include="Migrations\202405260251076_addMoldProductionRecord.resx">
+      <DependentUpon>202405260251076_addMoldProductionRecord.cs</DependentUpon>
     </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 1 - 0
src_0nline/ShwasherSys/ShwasherSys.Web/Content/Scripts/MyScript/iwb.js

@@ -321,6 +321,7 @@ $.extend({
         if (options.isValidate && $form) {
             isValidated = $.formValidate($form);
         }
+        console.error($form, isValidated)
         if (isValidated) {
             options.data = options.data ? (typeof options.data === 'function' ? options.data() : options.data) : $form ? $.formSerialize($form) : undefined;
             var guid = Math.floor(Math.random() * 10000);

+ 61 - 14
src_0nline/ShwasherSys/ShwasherSys.Web/Views/Company/DeviceMgPlan.cshtml

@@ -17,8 +17,8 @@
         new SearchItem("expireDate","至",FiledType.D,ExpType.LessOrEqual),
         new SearchItem("maintenanceDate","维护时间",FiledType.D,ExpType.GreaterOrEqual),
         new SearchItem("maintenanceDate","至",FiledType.D,ExpType.LessOrEqual),
-        new SearchItem("nextMaintenanceDate","下一次维护时间",FiledType.Dnull,ExpType.GreaterOrEqual),
-        new SearchItem("nextMaintenanceDate","至",FiledType.Dnull,ExpType.LessOrEqual),
+        // new SearchItem("nextMaintenanceDate","下一次维护时间",FiledType.Dnull,ExpType.GreaterOrEqual),
+        // new SearchItem("nextMaintenanceDate","至",FiledType.Dnull,ExpType.LessOrEqual),
     }, "search-form", false);
 
     var table = new TableViewModel("/api/services/app/DeviceMgPlan/GetAll", activeMenu, searchForm)
@@ -27,10 +27,11 @@
         new FieldItem("no", "计划编号"),
         new FieldItem("planType", "计划类型","PlanTypeFormatter"),
         new FieldItem("name", "设备名称"),
+        new FieldItem("deviceNo", "设备编号"),
         new FieldItem("expireDate", "有效期限","ExDateFormatter"),
         new FieldItem("maintenanceCycle", "维护周期"),
         new FieldItem("maintenanceDate", "维护时间","DateFormatter"),
-        new FieldItem("nextMaintenanceDate", "下一次维护时间","MtDateFormatter"),
+        new FieldItem("nextMaintenanceDate", "下一次维护","MtDateFormatter"),
                     });
 }
 @section css{
@@ -54,7 +55,7 @@
             new Input("deviceName2", "设备名称",@class:"type type2").SetSearchIcon("query_device_modal","#modal"),
             new Input("name","设备名称",@class:"type type3"),
             new InputDate("expireDate", "有效期限"),
-            new InputNumber("maintenanceCycle", "维护周期(天)",other:"min=1"),
+            new InputNumber("maintenanceCycle", "维护周期",other:"min=1"),
             new InputDate("maintenanceDate", "维护时间"),
             new InputTextarea("description", "维护内容").SetNotRequired(),
         }));
@@ -73,13 +74,13 @@
     @Html.Partial("New/Modals/_Modal", modal)
     @Html.Partial("New/Modals/_Modal", recordModal)
     @Html.Partial("Modals/Query/_Device", "deviceNo,name|deviceName2")
-    @Html.Partial("Modals/Query/_Mold", "deviceNo,name|deviceName1")
+    @Html.Partial("Modals/Query/_Mold", "deviceNo,name|deviceName1,maintenanceCycle")
 
 }
 
 @section scripts
 {
-    <script type="text/javascript">
+	<script type="text/javascript">
         var $table = $('#table');
         $(function () {
             LoadTable();
@@ -87,21 +88,24 @@
             funs["btnCreate"] = function (url) {
                 $("#modal .type").closest('.form-group-sm').hide();
                 $('#modal #planType').off("change.planType").off("change.planType1").on("change.planType",PlanTypeChange);
-                BtnCreate({ data: { id: "",no:"1" }, disabled: "no,deviceName1,deviceName2" });
+				BtnCreate({ data: { id: "", no: "1" }, disabled: "no,deviceName1,deviceName2", readonly:"maintenanceCycle" });
+				$('#modal #deviceName1 + .input-group-addon').show();
             }
             funs["btnUpdate"] = function () {
                 var row = $table.bootstrapTable("getSelections")[0];
                 if (row) {
                     $("#modal .type").closest('.form-group-sm').hide();
-                    var data = $.extend({}, row, { deviceName1: row.name, deviceName2: row.name });
+					var data = $.extend({}, row, { deviceName1: row.deviceNo, deviceName2: row.deviceNo });
                     $('#modal #planType').off("change.planType").on("change.planType1",
                         function() {
-                            PlanTypeChange(row.name);
+							PlanTypeChange(row.deviceNo);
                         });
-                    BtnUpdate({ disabled: "no,maintenanceDate,planType,deviceName1,deviceName2" ,data:data});
+					BtnUpdate({ disabled: "no,maintenanceDate,planType,deviceName1,deviceName2", data: data, readonly: "maintenanceCycle" });
                     //$("#modal .type").removeClass('required').closest('.form-group-sm').hide();
                     //$("#modal .type3").addClass('required').closest('.form-group-sm').fadeIn();
                     $('#modal #planType').off("change.planType1").on("change.planType",PlanTypeChange);
+					$('#modal #deviceName1 + .input-group-addon').hide();
+					//$('#modal #deviceName2 + .input-group-addon').hide();
                     //$('#modal #planType').trigger("change");
                 }
             };
@@ -117,8 +121,40 @@
                     });
                 }
             };
+            $("#Tool1").append(
+                '<div  class="tool-radio"><input name="radioType" type="radio" id="radioType1" checked value=""/><label for="radioType1">全部</label></div>' +
+                '<div  class="tool-radio"><input name="radioType" type="radio" id="radioType2" value="1"/><label for="radioType2">待维护</label></div>');
+
+            $(".tool-radio input[type='radio']").on('click',
+                function(e) {
+                    document.getElementById("SearchForm").reset();
+                    GetSearchList();
+                    RefreshTable();
+                });
         });
-
+		function GetSearchList() {
+
+			var count = $("#SearchForm").find(".KeyWords").length;
+			window._searchList = [];
+			var radioType = $('input[name="radioType"]:checked').val();
+			if (radioType) {
+				window._searchList.push({ KeyWords: radioType, KeyField: "mpType", FieldType: "1", ExpType: "0" });
+			}
+			for (var i = 1; i <= count; i++) {
+				var keyWords = $("#KeyWords-" + i).val();
+				if (keyWords) {
+					var keyField = $("#KeyField-" + i).val();
+					var fieldType = $("#FieldType-" + i).val();
+					var expType = $("#ExpType-" + i).val();
+					window._searchList.push({
+						KeyWords: keyWords,
+						KeyField: keyField,
+						FieldType: fieldType,
+						ExpType: expType
+					});
+				}
+			}
+		}
         function PlanTypeChange(name) {
             if (typeof name !=="string") {
                 name = "";
@@ -126,7 +162,7 @@
             var type = $('#modal #planType').val();
             $('#modal #deviceName1').val(name);
             $('#modal #deviceName2').val(name);
-            $('#modal #name').val(name);
+            $('#modal #name').val('');
             $('#modal #deviceNo').val('');
             $("#modal .type").removeClass('required').closest('.form-group-sm').hide();
             if (type) {
@@ -137,7 +173,7 @@
             $('#modal #name').val($(that).find('option:selected').text());
             $('#modal #deviceNo').val($(that).val());
         }
-    </script>
+	</script>
 
 
     <!--格式化-->
@@ -147,10 +183,21 @@
             return CheckDateFormatter(v, r, i, f, 3 * 30);
         }
         function MtDateFormatter(v, r, i, f) {
-            return CheckDateFormatter(v, r, i, f, 10);
+			if (r.planType === 1) {
+				value = `${r.numberOfUsers}/${r.maintenanceCycle}`
+				if (r.numberOfUsers >= r.maintenanceCycle) {
+					return '<span style="color:red" class="iwb-flash2">' + value + ' [已到期]</span>'
+				}
+				if ((r.maintenanceCycle - r.numberOfUsers) > 0 && (r.maintenanceCycle - r.numberOfUsers) <= 10000) {
+					return '<span style="color:red" class="iwb-flash2">' + value + ' [即将到期]</span>'
+				}
+				return value
+            }
+			return CheckDateFormatter(v, r, i, f, 10);
         }
 
         function CheckDateFormatter(v, r, i, f, day) {
+			
             var value = DateFormatter(v, r, i, f);
             if (value <= new Date().format('yyyy-MM-dd')) {
                 return '<span style="color:red" class="iwb-flash2">' + value + ' [已到期]</span>';

+ 10 - 4
src_0nline/ShwasherSys/ShwasherSys.Web/Views/Company/Mold.cshtml

@@ -39,7 +39,7 @@
         new FieldItem("height", "高度"),
         new FieldItem("rigidity", "硬度"),
         //new FieldItem("expireDate", "有效期限","ExDateFormatter"),
-        //new FieldItem("maintenanceCycle", "维护周期"),
+        new FieldItem("maintenanceCycle", "维护周期"),
         //new FieldItem("maintenanceDate", "维护时间","DateFormatter"),
         //new FieldItem("nextMaintenanceDate", "下一次维护时间","MtDateFormatter"),
             });
@@ -53,7 +53,7 @@
 @section modal{
     <!--Main Modal-->
     @{
-        var modal = new ModalViewModel("模具计划", new ModalBodyViewModel(new List<Input>()
+        var modal = new ModalViewModel("模具", new ModalBodyViewModel(new List<Input>()
 {
             new InputHide("id"),
             new InputHide("no", "模具编码"),
@@ -67,6 +67,7 @@
             new Input("thickness", "厚度").SetNotRequired(),
             new Input("height", "高度").SetNotRequired(),
             new Input("rigidity", "硬度").SetNotRequired(),
+            new InputNumber("maintenanceCycle", "维护周期(次数)",other:"min=1").SetNotRequired(),
             new InputTextarea("description", "模具描述").SetNotRequired(),
             //new InputDate("expireDate", "有效期限"),
             //new InputNumber("maintenanceCycle", "维护周期(天)").SetMin(0),
@@ -96,8 +97,13 @@
         $(function () {
             $table = LoadTable();
             var funs = window.funs || { none: function () { console.log("No type"); } };
-            funs["btnCreate"] = function () { BtnCreate({ data: { id: "",no:"1" } }); }
-            funs["btnUpdate"] = function () { BtnUpdate({ disabled: "maintenanceDate" }); };
+			funs["btnCreate"] = function () {
+				BtnCreate({
+                    data: { id: "", no: "1", maintenanceCycle: "50000000" },
+                    readonly: "maintenanceCycle"
+                });
+            }
+			funs["btnUpdate"] = function () { BtnUpdate({ disabled: "maintenanceDate", readonly: "maintenanceCycle" }); };
             funs["btnMaintain"] = function (url) { 
                 var row=  $table.bootstrapTable("getSelections")[0];
                 if (row) {

+ 1 - 1
src_0nline/ShwasherSys/ShwasherSys.Web/Views/Home/home.js

@@ -33,7 +33,7 @@ function RenderHeaderAlert() {
 						? "green"
 						: "aqua";
 					$totalHeaderbox.append(`
-									 <div class="col-md-4 col-sm-6 col-xs-12 totalHeaderItem" data-sumtype="${v.sumType}">
+									 <div class="col-md-3 col-sm-6 col-xs-12 totalHeaderItem" data-sumtype="${v.sumType}">
 										<div class="info-box">
 											<span class="info-box-icon bg-${color}"><img src="/Content/Images/index/${v
 						.tipName}.png" /></span>

+ 1 - 1
src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/ProductionOrderMg.cshtml

@@ -76,7 +76,7 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
         <thead>
             <tr class="row" id="header">
                 <th data-field="state" data-checkbox="true"></th>
-                <th data-align="center" data-field="productionOrderNo">排产单号</th>
+                <th data-align="center" data-field="productionOrderNo" >排产单号</th>
                 <th data-align="center" data-field="partNo">零件号</th>
                 <th data-align="center" data-field="semiProductName">名称</th>
                 <th data-align="center" data-field="model">规格</th>

+ 84 - 2
src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/_EnterStoreShare.cshtml

@@ -214,13 +214,36 @@
                     <button type="button" class="btn btn-success save-btn waves-effect" style="min-width:100px;background-color: #678ceb;border: 1px solid #678ceb;" onclick="Submit_query_orderItem_modal('r','#ExtendOrderTable')">保存</button>
                 </div>
             </div>
+        </div>
+    </div>
+</section>
+
+<section>
+    <div class="modal fade" id="SelectMoldModal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
+        <div class="modal-dialog  modal-dialog-centered" role="document">
+            <div class="modal-content" style="min-width: 450px;">
+                @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("模具-(非强制选择可直接保存开始生产)", ""))
+                @{
+                    var inputs5 = new List<InputViewModel>
+                    {
+                        new InputViewModel("id", hide:true),
+                        new InputViewModel("productionOrderNo", hide:true),
+                        new InputViewModel("deviceNo", displayName:"模具编号").SetSearchIcon("query_mold_modal","#SelectMoldModal"),
+                        new InputViewModel("name",displayName:"设备名称"),
+                    };
+                }
+                @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs5))
+                @Html.Partial("Modals/_ModalFooter", "")
+
             </div>
+        </div>
     </div>
 </section>
 @Html.Partial("Modals/Query/_RmCurrentStore", "1:rmProductNo,2:productName,5:canUseQuantity,6:currentRmHouseId")
 @Html.Partial("Modals/Query/_SemiEnterStore", "")
 @Html.Partial("Modals/Query/_ProductionLog", "")
 @Html.Partial("Modals/Query/_OrderItem", "")
+@Html.Partial("Modals/Query/_Mold", "deviceNo,name,maintenanceCycle")
 <section style="display: none">
     @Html.DropDownList("hide-StoreHouses", Model[1])
     @Html.DropDownList("hide-ApplyStatus", Model[2])
@@ -354,6 +377,60 @@
 
         }
 
+        function f_selectMoldStart(id, status) {
+            row = $("#table").bootstrapTable("getRowByUniqueId", id);
+			OpenModal({
+				url: window.appUrl + 'ProductionOrders/SelectMoldStart',
+				modal: $('#SelectMoldModal'),
+				data: { id: id, productionOrderNo: row.productionOrderNo },
+				disabled: "deviceNo,name",
+                save: function () {
+					let msgTip = "排产单将进入生产中状态?"
+					if (!$('#SelectMoldModal #deviceNo').val()) {
+						msgTip = "当前未选择模具," + msgTip
+                    }
+					abp.message.confirm(msgTip, "排产单开始生产",
+						function () {
+							SaveAjax({
+								url: window.appUrl + 'ProductionOrders/SelectMoldStart',
+								modal: $('#SelectMoldModal'),
+								success: function () {
+									RefreshTable();
+									$("#SelectMoldModal").modal("hide");
+								}
+						     });
+					});
+				}
+			});  
+        }
+		function f_selectMold(id) {
+            row = $("#table").bootstrapTable("getRowByUniqueId", id);
+			$.iwbAjax4({
+				url: window.appUrl + 'ProductionOrders/GetMoldRecord?productionOrderNo=' + row.productionOrderNo,
+                success: function (res) {
+                    if (res) {
+                        console.log('res',res)
+						OpenModal({
+							modal: $("#SelectMoldModal"),
+							url: window.appUrl + 'ProductionOrders/SelectMold',
+                            data: { id: id, productionOrderNo: row.productionOrderNo, deviceNo: res.no, name: res.name },
+							readonly:"deviceNo,name",
+							save: function () {
+								SaveAjax({
+									url: window.appUrl + 'ProductionOrders/SelectMold',
+									modal: $('#SelectMoldModal'),
+									success: function () {
+										RefreshTable();
+										$("#SelectMoldModal").modal("hide");
+									}
+								});
+							}
+						});
+                    }
+				}
+			});
+        }
+
         function f_ApplyEnterStore(id, quantity, row) {
             row = row || $("#table").bootstrapTable("getRowByUniqueId", id);
             if (row.productionOrderStatus !== 2 && row.productionOrderStatus !== 3 && row.productionOrderStatus !== 5) {
@@ -866,7 +943,9 @@
 
     <script id="formatter">
         function SemiProductNoFormatter(v, r) {
-            return '<span class="table-action" onclick="f_ShowImage(this,\'' + r.semiProductNo + '\')">' + v + '</span>';
+            let res = '<span class="table-action" onclick="f_ShowImage(this,\'' + r.semiProductNo + '\')">' + v + '</span>';
+			res += (r.productionOrderStatus != 1 && r.productionOrderStatus != 7 && r.productionOrderNo.length == 7) ? `<span class="table-action" onclick="f_selectMold(${r.id})">模具</span>` : '';
+            return res
         }
 
         function PlanDateFormatter(v, r, i, f) {
@@ -929,6 +1008,9 @@
                 start =
                     '<span class="table-action" onclick="f_ExcuteProduction(\'{0}\',2 )">{1}开始生产</span>'.format(r.id,
                         icon),
+				start0 =
+					'<span class="table-action" onclick="f_selectMoldStart(\'{0}\',2 )">{1}开始生产</span>'.format(r.id,
+						icon),
                 //h = '<span class="table-action" onclick="f_ExcuteProduction(\'{0}\',6 )">{1}挂起</span>'.format(r.id,icon),
                 //r = '<span class="table-action" onclick="f_ExcuteProduction(\'{0}\',1 )">{1}恢复</span>'.format(r.id,icon),
                 close = '<span class="table-action" onclick="f_CloseProduction(\'{0}\' )">{1}结束排产</span>'.format(r.id,icon),
@@ -946,7 +1028,7 @@
                 str += audit;
                 break;
             case 7:
-                str += start;
+				str += (r.productionOrderNo && r.productionOrderNo.length > 7)?start:start0; 
                 break;
             case 2:
                 str += store;

+ 6 - 1
src_0nline/ShwasherSys/ShwasherSys.Web/Views/Shared/Modals/Query/_Mold.cshtml

@@ -2,7 +2,7 @@
 @using ShwasherSys.Models.Modal
 @model string
 @{
-    string originFiled = "no,name",
+    string originFiled = "no,name,maintenanceCycle",
         //targetFiled = string.IsNullOrEmpty(Model) ? originFiled : Model;
         targetFiled = Model ?? "";
     List<QueryItem> queryItems = new List<QueryItem>()
@@ -12,6 +12,11 @@ new QueryItem("no", "模具编码",true),
     new QueryItem("name", "模具名称",true),
     new QueryItem("model", "模具规格",true),
     new QueryItem("material", "模具材质"),
+    new QueryItem("outerDiameter", "外径"),
+    new QueryItem("insideDiameter", "内径"),
+    new QueryItem("thinkness", "厚度"),
+    new QueryItem("height", "高度"),
+    new QueryItem("rigidity", "硬度"),
 };
 
 

Some files were not shown because too many files changed in this diff