Browse Source

批量操作经验证通过删除之前测试代码

Murphy 3 years ago
parent
commit
484029181e

+ 46 - 347
MicroServices/Business/Business.Application/Quartz/ExtJobService.cs

@@ -24,18 +24,13 @@ namespace Business.Quartz
         SnowFlake help = new SnowFlake();
         private IRepository<in_kd_material, long> _kd_material;
         private IRepository<ic_item, long> _ic_item;
-        private IRepository<ic_itemTest, long> _ic_itemTest;
         private IRepository<ic_item_ie, long> _ic_item_ie;
-        private IRepository<ic_item_ieTest, long> _ic_item_ieTest;
         private IRepository<ic_item_inventory, long> _ic_item_inventory;
         private IRepository<ic_item_pur, long> _ic_item_pur;
-        private IRepository<ic_item_purTest, long> _ic_item_purTest;
         private IRepository<ic_item_stock, long> _ic_item_stock;
         private IRepository<ic_plan, long> _ic_plan;
-        private IRepository<ic_planTest, long> _ic_planTest;
         private IRepository<ic_check, long> _ic_check;
         private IRepository<ic_factory_details, long> _ic_factory_details;
-        private IRepository<ic_factory_detailsTest, long> _ic_factory_detailsTest;
 
 
         private IRepository<in_kd_bom, long> _kd_bom;
@@ -46,7 +41,6 @@ namespace Business.Quartz
         private IRepository<ic_substitute_all_dtl, long> _ic_substitute_all_dtl;
 
         private IRepository<ext_xref, long> _ext_xref;
-        private IRepository<ext_xrefTest, long> _ext_xrefTest;
 
 
         private readonly BusinessDbContext _businessDbContext;
@@ -55,18 +49,13 @@ namespace Business.Quartz
         public ExtJobService(
          IRepository<in_kd_material, long> kd_material,
          IRepository<ic_item, long> ic_item,
-         IRepository<ic_itemTest, long> ic_itemTest,
          IRepository<ic_item_ie, long> ic_item_ie,
-         IRepository<ic_item_ieTest, long> ic_item_ieTest,
          IRepository<ic_item_inventory, long> ic_item_inventory,
          IRepository<ic_item_pur, long> ic_item_pur,
-         IRepository<ic_item_purTest, long> ic_item_purTest,
          IRepository<ic_item_stock, long> ic_item_stock,
          IRepository<ic_plan, long> ic_plan,
-         IRepository<ic_planTest, long> ic_planTest,
          IRepository<ic_check, long> ic_check,
          IRepository<ic_factory_details, long> ic_factory_details,
-         IRepository<ic_factory_detailsTest, long> ic_factory_detailsTest,
          IRepository<in_kd_bom, long> kd_bom,
          IRepository<ic_bom, long> ic_bom,
          IRepository<ic_bom_child, long> ic_bom_child,
@@ -74,25 +63,19 @@ namespace Business.Quartz
          IRepository<ic_substitute_all, long> ic_substitute_all,
          IRepository<ic_substitute_all_dtl, long> ic_substitute_all_dtl,
          IRepository<ext_xref, long> ext_xref,
-         IRepository<ext_xrefTest, long> ext_xrefTest,
           BusinessDbContext businessDbContext,
           BusinessExtDbContext businessExtDbContext
          )
         {
             _kd_material= kd_material;
             _ic_item= ic_item;
-            _ic_itemTest = ic_itemTest;
             _ic_item_ie = ic_item_ie;
-            _ic_item_ieTest = ic_item_ieTest;
             _ic_item_inventory = ic_item_inventory;
             _ic_item_pur= ic_item_pur;
-            _ic_item_purTest = ic_item_purTest;
             _ic_item_stock = ic_item_stock;
             _ic_plan= ic_plan;
-            _ic_planTest = ic_planTest;
             _ic_check = ic_check;
             _ic_factory_details= ic_factory_details;
-            _ic_factory_detailsTest = ic_factory_detailsTest;
             _kd_bom = kd_bom;
             _ic_bom= ic_bom;
             _ic_bom_child= ic_bom_child;
@@ -100,7 +83,6 @@ namespace Business.Quartz
             _ic_substitute_all= ic_substitute_all;
             _ic_substitute_all_dtl= ic_substitute_all_dtl;
             _ext_xref= ext_xref;
-            _ext_xrefTest = ext_xrefTest;
             _businessDbContext = businessDbContext;
             _businessExtDbContext = businessExtDbContext;
         }
@@ -120,24 +102,23 @@ namespace Business.Quartz
         public async Task DoMaterial()
         {
            var extMaterials=_kd_material.GetListAsync();
-            var ic_items = _ic_itemTest.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-            var ic_factory_detailss = _ic_factory_detailsTest.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-            var ic_item_ies = _ic_item_ieTest.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-            var ic_item_purs = _ic_item_purTest.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-            var ic_plans = _ic_planTest.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-
-
-            List<ic_itemTest> ic_itemListAdd = new List<ic_itemTest>();
-            List<ic_itemTest> ic_itemListUpdate = new List<ic_itemTest>();
-            List<ic_factory_detailsTest> ic_factory_detailsListAdd = new List<ic_factory_detailsTest>();
-            List<ic_factory_detailsTest> ic_factory_detailsListUpdate = new List<ic_factory_detailsTest>();
-            List<ic_item_ieTest> ic_item_ieListAdd = new List<ic_item_ieTest>();
-            List<ic_item_ieTest> ic_item_ieListUpdate = new List<ic_item_ieTest>();
-            List<ic_item_purTest> ic_item_purListAdd = new List<ic_item_purTest>();
-            List<ic_item_purTest> ic_item_purListUpdate = new List<ic_item_purTest>();
-            List<ic_planTest> ic_planListAdd = new List<ic_planTest>();
-            List<ic_planTest> ic_planListUpdate = new List<ic_planTest>();
-            List<ext_xrefTest> ext_xrefList = new List<ext_xrefTest>();
+            var ic_items = _ic_item.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
+            var ic_factory_detailss = _ic_factory_details.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
+            var ic_item_ies = _ic_item_ie.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
+            var ic_item_purs = _ic_item_pur.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
+            var ic_plans = _ic_plan.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
+
+            List<ic_item> ic_itemListAdd = new List<ic_item>();
+            List<ic_item> ic_itemListUpdate = new List<ic_item>();
+            List<ic_factory_details> ic_factory_detailsListAdd = new List<ic_factory_details>();
+            List<ic_factory_details> ic_factory_detailsListUpdate = new List<ic_factory_details>();
+            List<ic_item_ie> ic_item_ieListAdd = new List<ic_item_ie>();
+            List<ic_item_ie> ic_item_ieListUpdate = new List<ic_item_ie>();
+            List<ic_item_pur> ic_item_purListAdd = new List<ic_item_pur>();
+            List<ic_item_pur> ic_item_purListUpdate = new List<ic_item_pur>();
+            List<ic_plan> ic_planListAdd = new List<ic_plan>();
+            List<ic_plan> ic_planListUpdate = new List<ic_plan>();
+            List<ext_xref> ext_xrefList = new List<ext_xref>();
             if (extMaterials != null)
             {
                 extMaterials.Result.ForEach(ext =>
@@ -171,7 +152,7 @@ namespace Business.Quartz
                             ic_item.allowbatch = ext.F_SFJLPCH == "是" ? 1 : 0;
                             ic_itemListUpdate.Add(ic_item);
 
-                            ext_xrefList.Add(new ext_xrefTest
+                            ext_xrefList.Add(new ext_xref
                             {
                                 dop_table_name = "ic_item",
                                 dop_id = ic_item.Id,
@@ -232,7 +213,7 @@ namespace Business.Quartz
                     }
                     else
                     {
-                        ic_itemTest item = new ic_itemTest(help.NextId());
+                        ic_item item = new ic_item(help.NextId());
                         item.number = ext.FNumber;
                         item.name = ext.FName_2052;
                         item.model = ext.FSpecification_2052;
@@ -267,7 +248,7 @@ namespace Business.Quartz
                         item.enable_warning = 0;
                         ic_itemListAdd.Add(item);
 
-                        ext_xrefList.Add(new ext_xrefTest
+                        ext_xrefList.Add(new ext_xref
                         {
                             dop_table_name = "ic_item",
                             dop_id = item.Id,
@@ -280,7 +261,7 @@ namespace Business.Quartz
                             other_col1_value = ext.FNumber
                         });
 
-                        ic_factory_detailsListAdd.Add(new ic_factory_detailsTest(help.NextId())
+                        ic_factory_detailsListAdd.Add(new ic_factory_details(help.NextId())
                         {
                             icitem_id = item.Id,
                             icitem_name = ext.FName_2052,
@@ -305,7 +286,7 @@ namespace Business.Quartz
                             minorderqty = 0
                         });
 
-                        ic_item_ieListAdd.Add(new ic_item_ieTest(help.NextId())
+                        ic_item_ieListAdd.Add(new ic_item_ie(help.NextId())
                         {
                             icitem_id = item.Id,
                             isbackflush = ext.FIsBatchManage == "是" ? 1 : 0,
@@ -316,7 +297,7 @@ namespace Business.Quartz
                             IsDeleted = false,//TODO
                         });
 
-                        ic_item_purListAdd.Add(new ic_item_purTest(help.NextId())
+                        ic_item_purListAdd.Add(new ic_item_pur(help.NextId())
                         {
                             icitem_id = item.Id,
                             icitem_name = item.name,
@@ -331,7 +312,7 @@ namespace Business.Quartz
                             purchase_unit = ext.FPurchaseUnitId_Name
                         });
 
-                        ic_planListAdd.Add(new ic_planTest(help.NextId())
+                        ic_planListAdd.Add(new ic_plan(help.NextId())
                         {
                             icitem_id = item.Id,
                             icitem_name = item.name,
@@ -353,347 +334,65 @@ namespace Business.Quartz
                 });
                 if (ic_itemListAdd.Count > 0)
                 {
-                    await _ic_itemTest.InsertManyAsync(ic_itemListAdd);
-                    //_businessDbContext.ic_itemTest.AddRange(ic_itemListAdd);
-                    //await _businessDbContext.ic_itemTest.BatchInsertIntoAsync(_businessDbContext.ic_itemTest);
+                    //await _ic_item.InsertManyAsync(ic_itemListAdd);
+                    await _businessDbContext.ic_item.BulkInsertAsync(ic_itemListAdd, options => options.AutoMapOutputDirection = false);
                 }
                 if (ic_itemListUpdate.Count > 0)
                 {
-                    await _ic_itemTest.UpdateManyAsync(ic_itemListUpdate);
+                    //await _ic_item.UpdateManyAsync(ic_itemListUpdate);
+                    await _businessDbContext.ic_item.BulkUpdateAsync(ic_itemListUpdate, options => options.AutoMapOutputDirection = false);
                 }
 
                 if (ic_factory_detailsListAdd.Count > 0)
                 {
-                    await _ic_factory_detailsTest.InsertManyAsync(ic_factory_detailsListAdd);
-                    //_businessDbContext.ic_factory_detailsTest.AddRange(ic_factory_detailsListAdd);
-                    //await _businessDbContext.ic_factory_detailsTest.BatchInsertIntoAsync(_businessDbContext.ic_factory_detailsTest);
+                    //await _ic_factory_details.InsertManyAsync(ic_factory_detailsListAdd);
+                    await _businessDbContext.ic_factory_details.BulkInsertAsync(ic_factory_detailsListAdd, options => options.AutoMapOutputDirection = false);
                 }
                 if (ic_factory_detailsListUpdate.Count > 0)
                 {
-                    await _ic_factory_detailsTest.UpdateManyAsync(ic_factory_detailsListUpdate);
+                    //await _ic_factory_details.UpdateManyAsync(ic_factory_detailsListUpdate);
+                    await _businessDbContext.ic_factory_details.BulkUpdateAsync(ic_factory_detailsListUpdate, options => options.AutoMapOutputDirection = false);
                 }
 
                 if (ic_item_ieListAdd.Count > 0)
                 {
-                    await _ic_item_ieTest.InsertManyAsync(ic_item_ieListAdd);
-                    //_businessDbContext.ic_item_ieTest.AddRange(ic_item_ieListAdd);
-                    //await _businessDbContext.ic_item_ieTest.BatchInsertIntoAsync(_businessDbContext.ic_item_ieTest);
+                    //await _ic_item_ie.InsertManyAsync(ic_item_ieListAdd);
+                    await _businessDbContext.ic_item_ie.BulkInsertAsync(ic_item_ieListAdd, options => options.AutoMapOutputDirection = false);
                 }
                 if (ic_item_ieListUpdate.Count > 0)
                 {
-                    await _ic_item_ieTest.UpdateManyAsync(ic_item_ieListUpdate);
+                    //await _ic_item_ie.UpdateManyAsync(ic_item_ieListUpdate);
+                    await _businessDbContext.ic_item_ie.BulkUpdateAsync(ic_item_ieListUpdate, options => options.AutoMapOutputDirection = false);
                 }
 
                 if (ic_item_purListAdd.Count > 0)
                 {
-                    await _ic_item_purTest.InsertManyAsync(ic_item_purListAdd);
-                    //_businessDbContext.ic_item_purTest.AddRange(ic_item_purListAdd);
-                    //await _businessDbContext.ic_item_purTest.BatchInsertIntoAsync(_businessDbContext.ic_item_purTest);
+                    //await _ic_item_pur.InsertManyAsync(ic_item_purListAdd);
+                    await _businessDbContext.ic_item_pur.BulkInsertAsync(ic_item_purListAdd, options => options.AutoMapOutputDirection = false);
                 }
                 if (ic_item_purListUpdate.Count > 0)
                 {
-                    await _ic_item_purTest.UpdateManyAsync(ic_item_purListUpdate);
+                    //await _ic_item_pur.UpdateManyAsync(ic_item_purListUpdate);
+                    await _businessDbContext.ic_item_pur.BulkUpdateAsync(ic_item_purListUpdate, options => options.AutoMapOutputDirection = false);
                 }
 
                 if (ic_planListAdd.Count > 0)
                 {
-                    await _ic_planTest.InsertManyAsync(ic_planListAdd);
-                    //_businessDbContext.ic_planTest.AddRange(ic_planListAdd);
-                    //await _businessDbContext.ic_planTest.BatchInsertIntoAsync(_businessDbContext.ic_planTest);
+                    //await _ic_plan.InsertManyAsync(ic_planListAdd);
+                    await _businessDbContext.ic_plan.BulkInsertAsync(ic_planListAdd, options => options.AutoMapOutputDirection = false);
                 }
                 if (ic_planListUpdate.Count > 0)
                 {
-                    await _ic_planTest.UpdateManyAsync(ic_planListUpdate);
+                    //await _ic_plan.UpdateManyAsync(ic_planListUpdate);
+                    await _businessDbContext.ic_plan.BulkUpdateAsync(ic_planListUpdate, options => options.AutoMapOutputDirection = false);
                 }
 
                 if (ext_xrefList.Count > 0)
                 {
-                    await _ext_xrefTest.InsertManyAsync(ext_xrefList);
-                    //_businessExtDbContext.ext_xrefTest.AddRange(ext_xrefList);
-                    //await _businessExtDbContext.ext_xrefTest.BatchInsertIntoAsync(_businessExtDbContext.ext_xrefTest);
+                    //await _ext_xref.UpdateManyAsync(ext_xrefList);
+                    await _businessExtDbContext.ext_xref.BulkInsertAsync(ext_xrefList, options => options.AutoMapOutputDirection = false);
                 }
             }
-            //var ic_items = _ic_item.GetListAsync(p=>p.factory_id==10101&&p.org_id==101&&p.tenant_id==101);
-            //var ic_factory_detailss = _ic_factory_details.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-            //var ic_item_ies = _ic_item_ie.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-            //var ic_item_purs = _ic_item_pur.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-            //var ic_plans = _ic_plan.GetListAsync(p => p.factory_id == 10101 && p.org_id == 101 && p.tenant_id == 101);
-
-
-            //List<ic_item> ic_itemListAdd = new List<ic_item>();
-            //List<ic_item> ic_itemListUpdate = new List<ic_item>();
-            //List<ic_factory_details> ic_factory_detailsListAdd = new List<ic_factory_details>();
-            //List<ic_factory_details> ic_factory_detailsListUpdate = new List<ic_factory_details>();
-            //List<ic_item_ie> ic_item_ieListAdd = new List<ic_item_ie>();
-            //List<ic_item_ie> ic_item_ieListUpdate = new List<ic_item_ie>();
-            //List<ic_item_pur> ic_item_purListAdd = new List<ic_item_pur>();
-            //List<ic_item_pur> ic_item_purListUpdate = new List<ic_item_pur>();
-            //List<ic_plan> ic_planListAdd = new List<ic_plan>();
-            //List<ic_plan> ic_planListUpdate = new List<ic_plan>();
-            //List<ext_xref> ext_xrefList = new List<ext_xref>();
-            // if (extMaterials != null)
-            //{
-            //     extMaterials.Result.ForEach(ext =>
-            //     {
-            //         if(ic_items != null && ic_items.Result.Exists(a=>a.number==ext.FNumber))
-            //         {
-            //             var ic_item = ic_items.Result.FirstOrDefault(a => a.number == ext.FNumber);
-            //             if (ic_item != null)
-            //             {
-            //                 ic_item.number = ext.FNumber;
-            //                 ic_item.name = ext.FName_2052;
-            //                 ic_item.model = ext.FSpecification_2052;
-            //                 ic_item.full_name = ext.FDescription_2052;
-            //                 ic_item.fms_number = ext.FOldNumber;
-            //                 //0.配置类 1. 2.委外加工 3.外购 4.虚拟件
-            //                 ic_item.erp_cls = ext.FErpClsID == "配置类" ? 0 : ext.FErpClsID == "自制" ? 1 : ext.FErpClsID == "委外" ? 2 : ext.FErpClsID == "外购" ? 3 : ext.FErpClsID == "虚拟" ? 4 : ext.FErpClsID == "费用" ? 5 : ext.FErpClsID == "服务" ? 6 : -1;
-            //                 ic_item.source = ext.FDataSource;
-            //                 ic_item.iskeyitem = ext.FIsKitting == "是" ? 1 : 0;
-            //                 ic_item.gross_weight = ext.FGROSSWEIGHT;
-            //                 ic_item.net_weight = ext.FNETWEIGHT;
-            //                 ic_item.maund = ext.FWEIGHTUNITID_Name;
-            //                 ic_item.cubic_measure = ext.FVOLUMEUNITID_Name;
-            //                 ic_item.length = ext.FLENGTH;
-            //                 ic_item.width = ext.FWIDTH;
-            //                 ic_item.height = ext.FHEIGHT;
-            //                 ic_item.size = ext.FVOLUME;
-            //                 ic_item.allowpur = ext.FIsPurchase == "是" ? 1 : 0;
-            //                 ic_item.allowsale = ext.FIsSale == "是" ? 1 : 0;
-            //                 ic_item.allowmanu = ext.FIsProduce == "是" ? 1 : 0;
-            //                 ic_item.allowout = ext.FIsSubContract == "是" ? 1 : 0;
-            //                 ic_item.allowbatch = ext.F_SFJLPCH == "是" ? 1 : 0;
-            //                 ic_itemListUpdate.Add(ic_item);
-
-            //                 ext_xrefList.Add(new ext_xref
-            //                 {
-            //                     dop_table_name = "ic_item",
-            //                     dop_id= ic_item.Id,
-            //                     dop_col1_name= "number",
-            //                     dop_col1_value= ic_item.number,
-            //                     other_sys_name="kd",
-            //                     other_table_name= "in_kd_material",
-            //                     other_id=ext.Id,
-            //                     other_col1_name= "FNumber",
-            //                     other_col1_value=ext.FNumber
-            //                 });
-
-            //                 var ic_factory_detail = ic_factory_detailss.Result.FirstOrDefault(a => a.icitem_id == ic_item.Id);
-            //                 if (ic_factory_detail != null)
-            //                 {
-            //                     ic_factory_detail.product_line = ext.F_CPX_Name;
-            //                     ic_factory_detail.minpackqty = ext.FIncreaseQty;
-            //                     ic_factory_detailsListUpdate.Add(ic_factory_detail);
-            //                 }
-
-
-
-            //                 var ic_item_ie = ic_item_ies.Result.FirstOrDefault(a => a.icitem_id == ic_item.Id);
-            //                 if (ic_item_ie != null)
-            //                 {
-            //                     ic_item_ie.isbackflush = ext.FIsBatchManage == "是" ? 1 : 0;
-            //                     ic_item_ieListUpdate.Add(ic_item_ie);
-            //                 }
-
-
-            //                 var ic_item_pur = ic_item_purs.Result.FirstOrDefault(a => a.icitem_id == ic_item.Id);
-            //                 if (ic_item_pur != null)
-            //                 {
-            //                     ic_item_pur.icitem_name = ic_item.name;
-            //                     ic_item_pur.purchgroup = ext.FPurchaseGroupId_Name;
-            //                     ic_item_pur.purcher = ext.FPurchaserId_Name;
-            //                     ic_item_pur.purchase_unit = ext.FPurchaseUnitId_Name;
-            //                     ic_item_purListUpdate.Add(ic_item_pur);
-            //                 }
-
-
-            //                 var ic_plan = ic_plans.Result.FirstOrDefault(a => a.icitem_id == ic_item.Id);
-            //                 if (ic_plan != null)
-            //                 {
-            //                     ic_plan.icitem_name = ic_item.name;
-            //                     ic_plan.planner_name = ext.FPurchaseGroupId_Name;
-            //                     ic_plan.fix_leadtime = ext.FFixLeadTime;
-            //                     ic_plan.plan_trategy = ext.FPlanningStrategy == "MRP" ? 1 : 0;
-            //                     ic_plan.order_trategy = ext.FOrderPolicy == "LFL(批对批)" ? 1 : 0;
-            //                     ic_plan.order_inter_val = ext.FOrderIntervalTime;
-            //                     ic_plan.lead_time = ext.FVarLeadTime;
-            //                     ic_plan.bat_change_economy = ext.FVarLeadTimeLotSize;
-            //                     ic_plan.order_point = ext.FReOrderGood;
-            //                     ic_plan.secinv = ext.FPlanSafeStockQty;
-            //                     ic_planListUpdate.Add(ic_plan);
-            //                 }
-            //             }
-            //         }
-            //         else
-            //         {
-            //             ic_item item = new ic_item(help.NextId());
-            //             item.number = ext.FNumber;
-            //             item.name = ext.FName_2052;
-            //             item.model = ext.FSpecification_2052;
-            //             item.full_name = ext.FDescription_2052;
-            //             item.fms_number = ext.FOldNumber;
-            //             //0.配置类 1. 2.委外加工 3.外购 4.虚拟件
-            //             item.erp_cls = ext.FErpClsID == "配置类" ? 0 : ext.FErpClsID == "自制" ? 1 : ext.FErpClsID == "委外" ? 2 : ext.FErpClsID == "外购" ? 3 : ext.FErpClsID == "虚拟" ? 4 : ext.FErpClsID == "费用" ? 5: ext.FErpClsID == "服务" ? 6: - 1;
-            //             item.source = ext.FDataSource;
-            //             item.iskeyitem = ext.FIsKitting == "是" ? 1 : 0;
-            //             item.gross_weight = ext.FGROSSWEIGHT;
-            //             item.net_weight = ext.FNETWEIGHT;
-            //             item.maund = ext.FWEIGHTUNITID_Name;
-            //             item.cubic_measure = ext.FVOLUMEUNITID_Name;
-            //             item.length = ext.FLENGTH;
-            //             item.width = ext.FWIDTH;
-            //             item.height = ext.FHEIGHT;
-            //             item.size = ext.FVOLUME;
-            //             item.allowpur = ext.FIsPurchase == "是" ? 1 : 0;
-            //             item.allowsale = ext.FIsSale == "是" ? 1 : 0;
-            //             item.allowmanu = ext.FIsProduce == "是" ? 1 : 0;
-            //             item.allowout = ext.FIsSubContract == "是" ? 1 : 0;
-            //             item.allowbatch = ext.F_SFJLPCH == "是" ? 1 : 0;
-            //             item.tenant_id = 101;//TODO
-            //             item.factory_id = 10101;//TODO
-            //             item.org_id = 101;//TODO
-            //             item.IsDeleted = false;//TODO
-            //             item.is_equipment = 0;
-            //             item.item_level = 0;
-            //             item.hb_level = 0;
-            //             item.matatt = 0;
-            //             item.picktype = 0;
-            //             item.enable_warning = 0;
-            //             ic_itemListAdd.Add(item);
-
-            //             ext_xrefList.Add(new ext_xref
-            //             {
-            //                 dop_table_name = "ic_item",
-            //                 dop_id = item.Id,
-            //                 dop_col1_name = "number",
-            //                 dop_col1_value = item.number,
-            //                 other_sys_name = "kd",
-            //                 other_table_name = "in_kd_material",
-            //                 other_id = ext.Id,
-            //                 other_col1_name = "FNumber",
-            //                 other_col1_value = ext.FNumber
-            //             });
-
-            //             ic_factory_detailsListAdd.Add(new ic_factory_details(help.NextId())
-            //             {
-            //                 icitem_id = item.Id,
-            //                 icitem_name = ext.FName_2052,
-            //                 tenant_id = 101,//TODO
-            //                 factory_id = 10101,////TODO
-            //                 org_id = 101,//TODO
-            //                 IsDeleted = false,//TODO
-            //                 pick_type= 0,
-            //                 stock_time= 0,
-            //                 batch_manager=0,
-            //                 days_per=0,
-            //                 default_chkloc=0,
-            //                 default_chksp=0,
-            //                 default_loc=0,
-            //                 default_sp=0,
-            //                 product_line = ext.F_CPX_Name,
-            //                 production_leadtime= 0,
-            //                 stock_leadtime= 0, 
-            //                 transportation_leadtime=0,
-            //                 order_leadtime = 0,
-            //                 minpackqty = ext.FIncreaseQty,
-            //                 minorderqty =0
-            //             });
-
-            //             ic_item_ieListAdd.Add(new ic_item_ie(help.NextId())
-            //             {
-            //                 icitem_id = item.Id,
-            //                 isbackflush = ext.FIsBatchManage == "是" ? 1 : 0,
-            //                 put_integer=0,//TODO
-            //                 tenant_id = 101,//TODO
-            //                 factory_id = 10101,////TODO
-            //                 org_id = 101,//TODO
-            //                 IsDeleted = false,//TODO
-            //             });
-
-            //             ic_item_purListAdd.Add(new ic_item_pur(help.NextId())
-            //             {
-            //                 icitem_id = item.Id,
-            //                 icitem_name = item.name,
-            //                 currency_type= ext.FCurrencyId_Name == "人民币" ? 1 : 0,//TODO
-            //                 tenant_id=101,//TODO
-            //                 factory_id=10101,////TODO
-            //                 org_id =101,//TODO
-            //                 IsDeleted =false,//TODO
-            //                 supplier_id=0,
-            //                 purchgroup = ext.FPurchaseGroupId_Name,
-            //                 purcher = ext.FPurchaserId_Name,
-            //                 purchase_unit = ext.FPurchaseUnitId_Name
-            //             });
-
-            //             ic_planListAdd.Add(new ic_plan(help.NextId())
-            //             {
-            //                 icitem_id = item.Id,
-            //                 icitem_name = item.name,
-            //                 planner_name = ext.FPurchaseGroupId_Name,
-            //                 fix_leadtime = ext.FFixLeadTime,
-            //                 plan_trategy = ext.FPlanningStrategy == "MRP" ? 1 : 0,
-            //                 order_trategy = ext.FOrderPolicy == "LFL(批对批)" ? 1 : 0,
-            //                 order_inter_val = ext.FOrderIntervalTime,
-            //                 lead_time = ext.FVarLeadTime,
-            //                 bat_change_economy = ext.FVarLeadTimeLotSize,
-            //                 order_point = ext.FReOrderGood,
-            //                 secinv = ext.FPlanSafeStockQty,
-            //                 tenant_id = 101,//TODO
-            //                 factory_id = 10101,////TODO
-            //                 org_id = 101,//TODO
-            //                 IsDeleted = false,//TODO
-            //             });
-            //         }
-            //     });
-            //     if(ic_itemListAdd.Count>0)
-            //     {
-            //         await _ic_item.InsertManyAsync(ic_itemListAdd);
-            //     }
-            //     if (ic_itemListUpdate.Count > 0)
-            //     {
-            //         await _ic_item.UpdateManyAsync(ic_itemListUpdate);
-            //     }
-
-            //     if (ic_factory_detailsListAdd.Count > 0)
-            //     {
-            //         await _ic_factory_details.InsertManyAsync(ic_factory_detailsListAdd);
-            //     }
-            //     if (ic_factory_detailsListUpdate.Count > 0)
-            //     {
-            //         await _ic_factory_details.UpdateManyAsync(ic_factory_detailsListUpdate);
-            //     }
-
-            //     if (ic_item_ieListAdd.Count > 0)
-            //     {
-            //         await _ic_item_ie.InsertManyAsync(ic_item_ieListAdd);
-            //     }
-            //     if (ic_item_ieListUpdate.Count > 0)
-            //     {
-            //         await _ic_item_ie.UpdateManyAsync(ic_item_ieListUpdate);
-            //     }
-
-            //     if (ic_item_purListAdd.Count > 0)
-            //     {
-            //         await _ic_item_pur.InsertManyAsync(ic_item_purListAdd);
-            //     }
-            //     if (ic_item_purListUpdate.Count > 0)
-            //     {
-            //         await _ic_item_pur.UpdateManyAsync(ic_item_purListUpdate);
-            //     }
-
-            //     if (ic_planListAdd.Count > 0)
-            //     {
-            //         await _ic_plan.InsertManyAsync(ic_planListAdd);
-            //     }
-            //     if (ic_planListUpdate.Count > 0)
-            //     {
-            //         await _ic_plan.UpdateManyAsync(ic_planListUpdate);
-            //     }
-
-            //     if (ext_xrefList.Count > 0)
-            //     {
-            //         await _ext_xref.UpdateManyAsync(ext_xrefList);
-            //     }
-            // }
         }
         /// <summary>
         /// 处理物料清单

+ 1 - 1
MicroServices/Business/Business.EntityFrameworkCore/Business.EntityFrameworkCore.csproj

@@ -22,7 +22,7 @@
     <PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="6.0.0" />
     <PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="6.0.3" />
     <PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="6.0.0" />
-    <PackageReference Include="XiaoYang.EntityFrameworkCore.Bulk.MySql" Version="6.0.29" />
+    <PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.20.1" />
   </ItemGroup>
 
   <ItemGroup>

+ 2 - 2
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/Bang/BussinessBangDbContextOptionsConfigurer.cs

@@ -8,13 +8,13 @@ namespace Business.EntityFrameworkCore
         public static void Configure(DbContextOptionsBuilder<BusinessBangDbContext> dbContextOptions, string connectionString)
         {
             /* This is the single point to configure DbContextOptions for MultipleDbContextEfCoreDemoDbContext */
-            dbContextOptions.UseMySql(connectionString, MySqlServerVersion.LatestSupportedServerVersion, o => o.UseBulk());
+            dbContextOptions.UseMySql(connectionString, MySqlServerVersion.LatestSupportedServerVersion);
         }
 
         public static void Configure( DbContextOptionsBuilder<BusinessDbContext> dbContextOptions,DbConnection connection)
         {
             /* This is the single point to configure DbContextOptions for MultipleDbContextEfCoreDemoDbContext */
-            dbContextOptions.UseMySql(connection, MySqlServerVersion.LatestSupportedServerVersion, o => o.UseBulk());
+            dbContextOptions.UseMySql(connection, MySqlServerVersion.LatestSupportedServerVersion);
         }
     }
 }

+ 0 - 5
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/DOP/BusinessDbContext.cs

@@ -28,19 +28,14 @@ namespace Business.EntityFrameworkCore
         public DbSet<ic_bom_child> ic_bom_child { get; set; }
         public DbSet<ic_check> ic_check { get; set; }
         public DbSet<ic_factory_details> ic_factory_details { get; set; }
-        public DbSet<ic_factory_detailsTest> ic_factory_detailsTest { get; set; }
         public DbSet<ic_item> ic_item { get; set; }
-        public DbSet<ic_itemTest> ic_itemTest { get; set; }
         public DbSet<ic_item_ie> ic_item_ie { get; set; }
-        public DbSet<ic_item_ieTest> ic_item_ieTest { get; set; }
         public DbSet<ic_item_inventory> ic_item_inventory { get; set; }
         public DbSet<ic_item_pur> ic_item_pur { get; set; }
-        public DbSet<ic_item_purTest> ic_item_purTest { get; set; }
         public DbSet<ic_item_stock> ic_item_stock { get; set; }
         public DbSet<ic_item_stockoccupy> ic_item_stockoccupy { get; set; }
         public DbSet<ic_metering_unit> ic_metering_unit { get; set; }
         public DbSet<ic_plan> ic_plan { get; set; }
-        public DbSet<ic_planTest> ic_planTest { get; set; }
         public DbSet<ic_substitute> ic_substitute { get; set; }
         public DbSet<ic_substitute_all> ic_substitute_all { get; set; }
         public DbSet<ic_substitute_all_dtl> ic_substitute_all_dtl { get; set; }

+ 2 - 2
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/DOP/BussinessDbContextOptionsConfigurer.cs

@@ -8,13 +8,13 @@ namespace Business.EntityFrameworkCore
         public static void Configure(DbContextOptionsBuilder<BusinessDbContext> dbContextOptions, string connectionString)
         {
             /* This is the single point to configure DbContextOptions for MultipleDbContextEfCoreDemoDbContext */
-            dbContextOptions.UseMySql(connectionString, MySqlServerVersion.LatestSupportedServerVersion, o => o.UseBulk());
+            dbContextOptions.UseMySql(connectionString, MySqlServerVersion.LatestSupportedServerVersion);
         }
 
         public static void Configure( DbContextOptionsBuilder<BusinessDbContext> dbContextOptions,DbConnection connection)
         {
             /* This is the single point to configure DbContextOptions for MultipleDbContextEfCoreDemoDbContext */
-            dbContextOptions.UseMySql(connection, MySqlServerVersion.LatestSupportedServerVersion, o => o.UseBulk());
+            dbContextOptions.UseMySql(connection, MySqlServerVersion.LatestSupportedServerVersion);
         }
     }
 }

+ 0 - 1
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/Ext/BusinessExtDbContext.cs

@@ -15,7 +15,6 @@ namespace Business.EntityFrameworkCore
         public DbSet<in_kd_material> material { get; set; }
         public DbSet<in_kd_bom> bom { get; set; }   
         public DbSet<ext_xref> ext_xref { get; set; }
-        public DbSet<ext_xrefTest> ext_xrefTest { get; set; }
         public BusinessExtDbContext(DbContextOptions<BusinessExtDbContext> options)
             : base(options)
         {

+ 2 - 2
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/Ext/BussinessExtDbContextOptionsConfigurer.cs

@@ -9,13 +9,13 @@ namespace Business.EntityFrameworkCore
         public static void Configure(DbContextOptionsBuilder<BusinessExtDbContext> dbContextOptions,string connectionString)
         {
             /* This is the single point to configure DbContextOptions for MultipleDbContextEfCoreDemoDbContext */
-            dbContextOptions.UseMySql(connectionString, MySqlServerVersion.LatestSupportedServerVersion, o => o.UseBulk());
+            dbContextOptions.UseMySql(connectionString, MySqlServerVersion.LatestSupportedServerVersion);
         }
 
         public static void Configure(DbContextOptionsBuilder<BusinessExtDbContext> dbContextOptions,DbConnection connection)
         {
             /* This is the single point to configure DbContextOptions for MultipleDbContextEfCoreDemoDbContext */
-            dbContextOptions.UseMySql(connection, MySqlServerVersion.LatestSupportedServerVersion, o => o.UseBulk());
+            dbContextOptions.UseMySql(connection, MySqlServerVersion.LatestSupportedServerVersion);
         }
     }
 }

+ 1 - 1
MicroServices/Business/Business.Host/BusinessHostModule.cs

@@ -131,7 +131,7 @@ namespace Business
                 q.AddTrigger(opts => opts
                     .ForJob(ExtJobKey)
                     .WithIdentity("ExtJob-trigger")
-                    .WithCronSchedule("0 50 0 * * ?")
+                    .WithCronSchedule("0 10 10 * * ?")
                     .WithDescription("定时处理金蝶同步到Ext数据库的数据"));
             });
             context.Services.AddQuartzServer(options =>

+ 0 - 205
MicroServices/Business/Bussiness.Model/Ext/ext_xrefTest.cs

@@ -1,205 +0,0 @@
-using Business.Core.Attributes;
-using Business.Model;
-using Microsoft.EntityFrameworkCore;
-using Spire.Pdf.General.Paper.Font.Rendering.Hinting;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using Volo.Abp.Domain.Entities;
-
-namespace Bussiness.Model.Ext
-{
-    /// <summary>
-    /// ext_xref
-    /// </summary>
-    [CollectionName("dopbase", "ext_xrefTest")]
-    [Comment("ext_xrefTest")]
-    public class ext_xrefTest : Entity<long>
-    {
-        public ext_xrefTest()
-        {
-        }
-
-        public ext_xrefTest(long Id):base(Id)
-        {
-        }
-        /// <summary>
-        /// DOP表名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("DOP表名")]
-        public string? dop_table_name { get; set; }
-        /// <summary>
-        /// DOP表ID
-        /// </summary>
-        [Comment("DOP表ID")]
-        public long? dop_id { get; set; }
-
-        /// <summary>
-        /// 表列1名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("表列1名")]
-        public string? dop_col1_name { get; set; }
-        /// <summary>
-        /// 表列1值
-        /// </summary>
-        [StringLength(80)]
-        [Comment("表列1值")]
-        public string? dop_col1_value { get; set; }
-
-        /// <summary>
-        /// 表列2名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("表列2名")]
-        public string? dop_col2_name { get; set; }
-        /// <summary>
-        /// 表列2值
-        /// </summary>
-        [StringLength(80)]
-        [Comment("表列2值")]
-        public string? dop_col2_value { get; set; }
-
-        /// <summary>
-        /// 表列3名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("表列3名")]
-        public string? dop_col3_name { get; set; }
-        /// <summary>
-        /// 表列3值
-        /// </summary>
-        [StringLength(80)]
-        [Comment("表列3值")]
-        public string? dop_col3_value { get; set; }
-
-        /// <summary>
-        /// 表列4名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("表列4名")]
-        public string? dop_col4_name { get; set; }
-        /// <summary>
-        /// 表列4值
-        /// </summary>
-        [StringLength(80)]
-        [Comment("表列4值")]
-        public string? dop_col4_value { get; set; }
-
-        /// <summary>
-        /// 表列5名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("表列5名")]
-        public string? dop_col5_name { get; set; }
-        /// <summary>
-        /// 表列5值
-        /// </summary>
-        [StringLength(80)]
-        [Comment("表列5值")]
-        public string? dop_col5_value { get; set; }
-
-
-        /// <summary>
-        /// 其它系统名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("其它系统名")]
-        public string? other_sys_name { get; set; }
-
-        /// <summary>
-        /// 其它表名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("其它表名")]
-        public string? other_table_name { get; set; }
-
-        /// <summary>
-        /// 它表ID
-        /// </summary>
-        [Comment("它表ID")]
-        public long? other_id { get; set; }
-
-
-        /// <summary>
-        /// 它列1名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("它列1名")]
-        public string? other_col1_name { get; set; }
-        /// <summary>
-        /// 它列1名
-        /// </summary>
-        [StringLength(80)]
-        [Comment("它列1名")]
-        public string? other_col1_value { get; set; }
-
-        /// <summary>
-        /// 它列2名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("它列2名")]
-        public string? other_col2_name { get; set; }
-        /// <summary>
-        /// 它列2名
-        /// </summary>
-        [StringLength(80)]
-        [Comment("它列2名")]
-        public string? other_col2_value { get; set; }
-
-        /// <summary>
-        /// 它列3名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("它列3名")]
-        public string? other_col3_name { get; set; }
-        /// <summary>
-        /// 它列3名
-        /// </summary>
-        [StringLength(80)]
-        [Comment("它列3名")]
-        public string? other_col3_value { get; set; }
-
-
-        /// <summary>
-        /// 它列4名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("它列4名")]
-        public string? other_col4_name { get; set; }
-        /// <summary>
-        /// 它列4名
-        /// </summary>
-        [StringLength(80)]
-        [Comment("它列4名")]
-        public string? other_col4_value { get; set; }
-
-
-        /// <summary>
-        /// 它列5名
-        /// </summary>
-        [StringLength(32)]
-        [Comment("它列5名")]
-        public string? other_col5_name { get; set; }
-        /// <summary>
-        /// 它列5名
-        /// </summary>
-        [StringLength(80)]
-        [Comment("它列5名")]
-        public string? other_col5_value { get; set; }
-
-        /// <summary>
-        /// 备注信息
-        /// </summary>
-        [Comment("备注信息")]
-        [StringLength(255)]
-        public string? note { get; set; }
-
-        /// <summary>
-        /// DOP系统名
-        /// </summary>
-        [Comment("DOP系统名")]
-        [StringLength(32)]
-        public string? dop_sys_name { get; set; }
-    }
-}

+ 0 - 243
MicroServices/Business/Bussiness.Model/MES/IC/ic_factory_detailsTest.cs

@@ -1,243 +0,0 @@
-using Business.Core.Attributes;
-using Business.Model;
-using Microsoft.EntityFrameworkCore;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Bussiness.Model.MES.IC
-{
-    /// <summary>
-    /// 工厂物料明细表
-    /// </summary>
-    [CollectionName("dopbase", "ic_factory_detailsTest")]
-    [Comment("工厂物料明细表")]
-    public class ic_factory_detailsTest : BaseEntity
-    {
-         public ic_factory_detailsTest(long Id) : base(Id)
-        {
-        }
-        /// <summary>
-        /// 物料id
-        /// </summary>
-        [Required]
-        [Comment("物料id")]
-        public long icitem_id { get; set; }
-        /// <summary>
-        /// 物料名称
-        /// </summary>
-        [StringLength(80)]
-        [Comment("物料名称")]
-        public string? icitem_name { get; set; }
-        /// <summary>
-        /// 工厂编码
-        /// </summary>
-        [StringLength(80)]
-        [Comment("工厂编码")]
-        public string? factory_fode { get; set; }
-        /// <summary>
-        /// 特殊备注
-        /// </summary>
-        [StringLength(1000)]
-        [Comment("特殊备注")]
-        public string? note { get; set; }
-        /// <summary>
-        /// 产品线
-        /// </summary>
-        [StringLength(80)]
-        [Comment("产品线")]
-        public string? product_line { get; set; }
-        /// <summary>
-        /// 领料类型
-        /// </summary>
-        [Comment("领料类型")]
-        public long? pick_type { get; set; }
-        /// <summary>
-        /// 是否采用业务批次管理
-        /// </summary>
-        [Comment("是否采用业务批次管理")]
-        public int? batch_manager { get; set; }
-        /// <summary>
-        /// 是否需要库龄管理
-        /// </summary>
-        [Comment("是否需要库龄管理")]
-        public int? stock_time { get; set; }
-        /// <summary>
-        /// 盘点周期单位
-        /// </summary>
-        [StringLength(80)]
-        [Comment("盘点周期单位")]
-        public string? check_cycunit { get; set; }
-        /// <summary>
-        /// 盘点周期
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("盘点周期")]
-        public decimal? check_cycle { get; set; }
-        /// <summary>
-        /// 每周_月第天
-        /// </summary>
-        [Comment("每周_月第天")]
-        public int? days_per { get; set; }
-        /// <summary>
-        /// 上次盘点日期
-        /// </summary>
-        [Comment("上次盘点日期")]
-        public DateTime? last_checkdate { get; set; }
-        /// <summary>
-        /// 默认待检仓库
-        /// </summary>
-        [Comment("默认待检仓库")]
-        public long? default_chkloc { get; set; }
-        /// <summary>
-        /// 默认待检仓位
-        /// </summary>
-        [Comment("默认待检仓位")]
-        public long? default_chksp { get; set; }
-        /// <summary>
-        /// 默认仓库
-        /// </summary>red]
-        [Comment("默认仓库")]
-        public long? default_loc { get; set; }
-        /// <summary>
-        /// 默认仓位
-        /// </summary>
-        [Comment("默认仓位")]
-        public long? default_sp { get; set; }
-        /// <summary>
-        /// 货架信息
-        /// </summary>
-        [StringLength(80)]
-        [Comment("货架信息")]
-        public string? item_shelve { get; set; }
-        /// <summary>
-        /// 默认仓管员
-        /// </summary>
-        [StringLength(80)]
-        [Comment("默认仓管员")]
-        public string? default_manager { get; set; }
-        /// <summary>
-        /// 最低存量
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("最低存量")]
-        public decimal? low_limit { get; set; }
-        /// <summary>
-        /// 最高存量
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("最高存量")]
-        public decimal? high_limit { get; set; }
-        /// <summary>
-        /// 最大订货量
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("最大订货量")]
-        public decimal? qty_max { get; set; }
-        /// <summary>
-        /// 日消耗量
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("日消耗量")]
-        public decimal? daily_consume { get; set; }
-
-        /// <summary>
-        /// 库存备注
-        /// </summary>
-        [StringLength(1000)]
-        [Comment("库存备注")]
-        public string? warehouse_note { get; set; }
-        /// <summary>
-        /// 工单发料时间/天
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("工单发料时间/天")]
-        public decimal? ordissu_days { get; set; }
-        /// <summary>
-        /// 原材料收货处理时间/天
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("原材料收货处理时间/天")]
-        public decimal? raw_matreceiv_days { get; set; }
-        /// <summary>
-        /// 成品入库时间/天
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("成品入库时间/天")]
-        public decimal? prdenter_days { get; set; }
-        /// <summary>
-        /// 原材料入库时间/天
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("原材料入库时间/天")]
-        public decimal? mat_enter_days { get; set; }
-        /// <summary>
-        /// 成品发货时间/天
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("成品发货时间/天")]
-        public decimal? prd_out_days { get; set; }
-
-        /// <summary>
-        /// 运输中提前期_天
-        /// </summary>
-        [Comment("运输中提前期_天")]
-        [Required]
-        [DefaultValue(0)]
-        [Precision(20, 8)]
-        public decimal? transportation_leadtime { get; set; }
-
-        /// <summary>
-        /// 仓库中提前期_天
-        /// </summary>
-        [Comment("仓库中提前期_天")]
-        [Required]
-        [DefaultValue(0)]
-        [Precision(20, 8)]
-        public decimal? stock_leadtime { get; set; }
-
-        /// <summary>
-        /// 生产中提前期_天
-        /// </summary>
-        [Comment("生产中提前期_天")]
-        [Required]
-        [DefaultValue(0)]
-        [Precision(20, 8)]
-        public decimal? production_leadtime { get; set; }
-
-        /// <summary>
-        /// 下单前置期_天
-        /// </summary>
-        [Comment("下单前置期_天")]
-        [Required]
-        [DefaultValue(0)]
-        [Precision(20, 8)]
-        public decimal? order_leadtime { get; set; }
-
-        /// <summary>
-        /// 最小包装量
-        /// </summary>
-        [Comment("最小包装量")]
-        [Required]
-        [DefaultValue(0)]
-        [Precision(20, 8)]
-        public decimal? minpackqty { get; set; }
-
-        /// <summary>
-        /// 最小订单量
-        /// </summary>
-        [Comment("最小订单量")]
-        [Required]
-        [DefaultValue(0)]
-        [Precision(20, 8)]
-        public decimal? minorderqty { get; set; }
-
-        /// <summary>
-        /// 计算ID
-        /// </summary>
-        [Comment("计算id")]
-        [NotMapped]
-        public long? bang_id { get; set; }
-
-    }
-}

+ 0 - 245
MicroServices/Business/Bussiness.Model/MES/IC/ic_itemTest.cs

@@ -1,245 +0,0 @@
-using Business.Core.Attributes;
-using Business.Model;
-using Microsoft.EntityFrameworkCore;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace Bussiness.Model.MES.IC
-{
-    /// <summary>
-    /// 物料详情
-    /// </summary>
-    [CollectionName("dopbase", "ic_itemTest")]
-    [Comment("物料详情")]
-    public class ic_itemTest : BaseEntity
-    {
-        public ic_itemTest(long Id) : base(Id)
-        {
-        }
-        /// <summary>
-        /// 物料编码
-        /// </summary>
-        [StringLength(80)]
-        [Comment("物料编码")]
-        public string? number { get; set; }
-        /// <summary>
-        /// 物料名称
-        /// </summary>
-        [StringLength(80)]
-        [Comment("物料名称")]
-        public string? name { get; set; }
-        /// <summary>
-        /// 规格型号
-        /// </summary>
-        [StringLength(200)]
-        [Comment("规格型号")]
-        public string? model { get; set; }
-        /// <summary>
-        /// 全名
-        /// </summary>
-        [StringLength(255)]
-        [Comment("全名")]
-        public string? full_name { get; set; }
-        /// <summary>
-        /// fms旧料号
-        /// </summary>
-        [StringLength(80)]
-        [Comment("fms旧料号")]
-        public string? fms_number { get; set; }
-        /// <summary>
-        /// erp旧料号
-        /// </summary>
-        [StringLength(80)]
-        [Comment("erp旧料号")]
-        public string? erp_oldnumber { get; set; }
-        /// <summary>
-        /// 图号
-        /// </summary>
-        [StringLength(80)]
-        [Comment("图号")]
-        public string? chart_number { get; set; }
-        /// <summary>
-        /// 版本号
-        /// </summary>
-        [StringLength(80)]
-        [Comment("版本号")]
-        public string? fversion { get; set; }
-        /// <summary>
-        /// 盒贴规格
-        /// </summary>
-        [StringLength(200)]
-        [Comment("盒贴规格")]
-        public string? box_model { get; set; }
-        /// <summary>
-        /// 物料属性
-        /// </summary>
-        [Comment("物料属性")]
-        public int erp_cls { get; set; }
-        /// <summary>
-        /// 物料属性名称
-        /// </summary>
-        [StringLength(80)]
-        [Comment("物料属性")]
-        public string? erp_cls_name { get; set; }
-        /// <summary>
-        /// 单位
-        /// </summary>
-        [StringLength(80)]
-        [Comment("单位")]
-        public string? unit { get; set; }
-        /// <summary>
-        /// 物料等级
-        /// </summary>
-        [Comment("物料等级")]
-        public long? item_level { get; set; }
-        /// <summary>
-        /// 环保等级
-        /// </summary>
-        [Comment("环保等级")]
-        public long? hb_level { get; set; }
-        /// <summary>
-        /// 单位标准工时_小时
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("单位标准工时_小时")]
-        public decimal? standard_manhour { get; set; }
-        /// <summary>
-        /// 单位材料定额_元
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("单位材料定额_元")]
-        public decimal? unititem_amount { get; set; }
-        /// <summary>
-        /// 来源
-        /// </summary>
-        [StringLength(200)]
-        [Comment("来源")]
-        public string? source { get; set; }
-        /// <summary>
-        /// 是否为设备
-        /// </summary>
-        [Comment("是否为设备")]
-        public int? is_equipment { get; set; }
-        /// <summary>
-        /// 单位包装数量
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("单位包装数量")]
-        public decimal? unit_qty { get; set; }
-        /// <summary>
-        /// 严格进行二维码数量校验
-        /// </summary>
-        [StringLength(80)]
-        [Comment("严格进行二维码数量校验")]
-        public string? check_bybarcode { get; set; }
-        /// <summary>
-        /// 是否关键件
-        /// </summary>
-        [Comment("是否关键件")]
-        public int iskeyitem { get; set; }
-        /// <summary>
-        /// 毛重
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("毛重")]
-        public decimal? gross_weight { get; set; }
-        /// <summary>
-        /// 净重
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("净重")]
-        public decimal? net_weight { get; set; }
-        /// <summary>
-        /// 重量单位
-        /// </summary>
-        [StringLength(80)]
-        [Comment("重量单位")]
-        public string? maund { get; set; }
-        /// <summary>
-        /// 长度
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("长度")]
-        public decimal? length { get; set; }
-        /// <summary>
-        /// 长度单位
-        /// </summary>
-        [StringLength(80)]
-        [Comment("长度单位")]
-        public string? cubic_measure { get; set; }
-        /// <summary>
-        /// 宽度
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("宽度")]
-        public decimal? width { get; set; }
-        /// <summary>
-        /// 高度
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("高度")]
-        public decimal? height { get; set; }
-        /// <summary>
-        /// 体积
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("体积")]
-        public decimal? size { get; set; }
-        /// <summary>
-        /// 物料类别
-        /// </summary>
-        [Comment("物料类别")]
-        public long? matatt { get; set; }
-        /// <summary>
-        /// 允许采购
-        /// </summary>
-        [Comment("允许采购")]
-        public int allowpur { get; set; }
-        /// <summary>
-        /// 允许销售
-        /// </summary>
-        [Comment("允许销售")]
-        public int allowsale { get; set; }
-        /// <summary>
-        /// 允许生产
-        /// </summary>
-        [Comment("允许生产")]
-        public int allowmanu { get; set; }
-        /// <summary>
-        /// 允许委外
-        /// </summary>
-        [Comment("允许委外")]
-        public int allowout { get; set; }
-        /// <summary>
-        /// 批号管理
-        /// </summary>
-        [Comment("批号管理")]
-        public int allowbatch { get; set; }
-        /// <summary>
-        /// 序列号管理
-        /// </summary>
-        [Comment("序列号管理")]
-        public int? allowserial { get; set; }
-        /// <summary>
-        /// 图片
-        /// </summary>
-        [StringLength(80)]
-        [Comment("图片")]
-        public string? photo { get; set; }
-        /// <summary>
-        /// 领料类型
-        /// </summary>
-        [Comment("领料类型")]
-        public long? picktype { get; set; }
-        /// <summary>
-        /// 出库类型
-        /// </summary>
-        [Comment("出库类型")]
-        public long? output_type_id { get; set; }
-        /// <summary>
-        /// 启用预警
-        /// </summary>
-        [Comment("启用预警")]
-        public int? enable_warning { get; set; }
-    }
-}

+ 0 - 65
MicroServices/Business/Bussiness.Model/MES/IC/ic_item_ieTest.cs

@@ -1,65 +0,0 @@
-using Business.Core.Attributes;
-using Business.Model;
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Bussiness.Model.MES.IC
-{
-    /// <summary>
-    /// 物料ie信息表
-    /// </summary>
-    [CollectionName("dopbase", "ic_item_ieTest")]
-    [Comment("物料ie信息表")]
-    public class ic_item_ieTest:BaseEntity
-    {
-        public ic_item_ieTest(long Id) : base(Id)
-        {
-        }
-        /// <summary>
-        /// 物料id
-        /// </summary>
-        [Required]
-        [Comment("物料id")]
-        public long icitem_id { get; set; }
-        /// <summary>
-        /// 是否倒冲
-        /// </summary>
-        [Comment("是否倒冲")]
-        public int isbackflush { get; set; }
-        /// <summary>
-        /// 生产负责人
-        /// </summary>
-        [StringLength(80)]
-        [Comment("生产负责人")]
-        public string? product_principal { get; set; }
-        /// <summary>
-        /// 倒冲仓库
-        /// </summary>
-        [StringLength(80)]
-        [Comment("倒冲仓库")]
-        public string? back_flush_stock { get; set; }
-        /// <summary>
-        /// 倒冲仓位
-        /// </summary>
-        [StringLength(80)]
-        [Comment("倒冲仓位")]
-        public string? back_flush_sp { get; set; }
-        /// <summary>
-        /// 投料自动取整
-        /// </summary>
-        [Comment("投料自动取整")]
-        public int put_integer { get; set; }
-        /// <summary>
-        /// ie备注
-        /// </summary>
-        [StringLength(1000)]
-        [Comment("ie备注")]
-        public string? ir_note { get; set; }
-    }
-}

+ 0 - 98
MicroServices/Business/Bussiness.Model/MES/IC/ic_item_purTest.cs

@@ -1,98 +0,0 @@
-using Business.Core.Attributes;
-using Business.Model;
-using Microsoft.EntityFrameworkCore;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Bussiness.Model.MES.IC
-{
-    /// <summary>
-    /// 物料采购报价单
-    /// </summary>
-    [CollectionName("dopbase", "ic_item_purTest")]
-    [Comment("物料采购报价单")]
-    public class ic_item_purTest : BaseEntity
-    {
-        public ic_item_purTest(long Id) : base(Id)
-        {
-        }
-        /// <summary>
-        /// 物料id
-        /// </summary>
-        [Required]
-        [Comment("物料id")]
-        public long icitem_id { get; set; }
-        /// <summary>
-        /// 物料名称
-        /// </summary>
-        [StringLength(80)]
-        [Comment("物料名称")]
-        public string? icitem_name { get; set; }
-        /// <summary>
-        /// 采购计划id
-        /// </summary>
-        [Comment("采购计划id")]
-        public long? ic_plan_id { get; set; }
-        /// <summary>
-        /// 供应商id
-        /// </summary>
-        [Comment("供应商id")]
-        public long? supplier_id { get; set; }
-        /// <summary>
-        /// 供应商编码
-        /// </summary>
-        [StringLength(80)]
-        [Comment("供应商编码")]
-        public string? supplier_number { get; set; }
-        /// <summary>
-        /// 供应商名称
-        /// </summary>
-        [StringLength(80)]
-        [Comment("供应商名称")]
-        public string? supplier_name { get; set; }
-        /// <summary>
-        /// 采购组
-        /// </summary>
-        [StringLength(80)]
-        [Comment("采购组")]
-        public string? purchgroup { get; set; }
-        /// <summary>
-        /// 采购员
-        /// </summary>
-        [StringLength(80)]
-        [Comment("采购员")]
-        public string? purcher { get; set; }
-        /// <summary>
-        /// 采购计量单位
-        /// </summary>
-        [StringLength(80)]
-        [Comment("采购计量单位")]
-        public string? purchase_unit { get; set; }
-        /// <summary>
-        /// 采购净价(不含税)
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("采购净价(不含税)")]
-        public decimal? netpurchase_price { get; set; }
-        /// <summary>
-        /// 税率
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("税率")]
-        public decimal? taxrate { get; set; }
-        /// <summary>
-        /// 币种
-        /// </summary>
-        [Required]
-        [Comment("币种")]
-        public long? currency_type { get; set; }
-
-        /// <summary>
-        /// 计算ID
-        /// </summary>
-        [Comment("计算id")]
-        [NotMapped]
-        public long? bang_id { get; set; }
-    }
-}

+ 0 - 155
MicroServices/Business/Bussiness.Model/MES/IC/ic_planTest.cs

@@ -1,155 +0,0 @@
-using Business.Core.Attributes;
-using Business.Model;
-using Microsoft.EntityFrameworkCore;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Bussiness.Model.MES.IC
-{
-    /// <summary>
-    /// 物料采购计划表
-    /// </summary>
-    [CollectionName("dopbase", "ic_planTest")]
-    [Comment("物料采购计划表")]
-    public class ic_planTest : BaseEntity
-    {
-        public ic_planTest(long Id) : base(Id)
-        {
-        }
-        /// <summary>
-        /// 物料id
-        /// </summary>
-        [Required]
-        [Comment("物料id")]
-        public long icitem_id { get; set; }
-        /// <summary>
-        /// 物料名称
-        /// </summary>
-        [StringLength(80)]
-        [Comment("物料名称")]
-        public string? icitem_name { get; set; }
-        /// <summary>
-        /// 计划员
-        /// </summary>
-        [StringLength(80)]
-        [Comment("计划员")]
-        public string? planner_name { get; set; }
-        /// <summary>
-        /// 计划员_工号
-        /// </summary>
-        [StringLength(80)]
-        [Comment("计划员_工号")]
-        public string? planner_num { get; set; }
-        /// <summary>
-        /// 工厂编码
-        /// </summary>
-        [StringLength(80)]
-        [Comment("工厂编码")]
-        public string? factory_code { get; set; }
-        /// <summary>
-        /// 固定提前期(天)
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("固定提前期(天)")]
-        public decimal? fix_leadtime { get; set; }
-        /// <summary>
-        /// 计划策略
-        /// </summary>
-        [Comment("计划策略")]
-        public int plan_trategy { get; set; }
-        /// <summary>
-        /// 订货策略
-        /// </summary>
-        [Comment("订货策略")]
-        public int order_trategy { get; set; }
-        /// <summary>
-        /// 订货间隔期_天
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("订货间隔期_天")]
-        public decimal? order_inter_val { get; set; }
-        /// <summary>
-        /// 变动提前期
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("变动提前期")]
-        public decimal? lead_time { get; set; }
-        /// <summary>
-        /// 变动提前期批量
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("变动提前期批量")]
-        public decimal? bat_change_economy { get; set; }
-        /// <summary>
-        /// 累计提前期
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("累计提前期")]
-        public decimal? total_tqq { get; set; }
-        /// <summary>
-        /// 再订货点
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("再订货点")]
-        public decimal? order_point { get; set; }
-        /// <summary>
-        /// 设置为固定再订货点
-        /// </summary>
-        [Comment("设置为固定再订货点")]
-        public int? isfixedreorder { get; set; }
-        /// <summary>
-        /// 安全库存数量
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("安全库存数量")]
-        public decimal? secinv { get; set; }
-        /// <summary>
-        /// 安全库存触发采购比例
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("安全库存触发采购比例")]
-        public decimal? secinv_ratio { get; set; }
-        /// <summary>
-        /// 是否需要进行订补货计划的运算
-        /// </summary>
-        [Comment("是否需要进行订补货计划的运算")]
-        public int? book_plan { get; set; }
-        /// <summary>
-        /// 辅助属性参与计划运算
-        /// </summary>
-        [Comment("辅助属性参与计划运算")]
-        public int? aux_prop_plan { get; set; }
-        /// <summary>
-        /// 计划备注
-        /// </summary>
-        [StringLength(1000)]
-        [Comment("计划备注")]
-        public string? plannote { get; set; }
-
-        /// <summary>
-        /// 计算ID
-        /// </summary>
-        [Comment("计算id")]
-        [NotMapped]
-        public long? bang_id { get; set; }
-        /// <summary>
-        /// 自检提前期
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("自检提前期")]
-        public decimal? self_inspection_date { get; set; }
-        /// <summary>
-        /// 入库提前期
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("入库提前期")]
-        public decimal? Warehousing_date { get; set; }
-        /// <summary>
-        /// 发运提前期
-        /// </summary>
-        [Precision(20, 8)]
-        [Comment("发运提前期")]
-        public decimal? Shipping_date { get; set; }
-    }
-}