瀏覽代碼

定时任务调整

heteng 3 年之前
父節點
當前提交
378d7e1fa6

+ 10 - 10
MicroServices/Business/Business.Application/SyncDataManagement/SyncMySQLDataAppService.cs

@@ -180,7 +180,7 @@ namespace Business.SyncDataManagement
             if (icBoms.Count > 0)
             {
                 //先清空表数据
-                await _ic_bom.Delete(p=>p.mongo_id != -1);
+                await _ic_bom.Delete(p=>p.mysql_id != -1);
                 var moIcBoms = ObjectMapper.Map<List<ic_bom>, List<mo_ic_bom>>(icBoms);
                 //插入数据
                 await _ic_bom.InsertMany(moIcBoms);
@@ -191,7 +191,7 @@ namespace Business.SyncDataManagement
             if (icbom_childs.Count > 0)
             {
                 //先清空表数据
-                await _ic_bom_child.Delete(p => p.mongo_id != -1);
+                await _ic_bom_child.Delete(p => p.mysql_id != -1);
                 var moIcbom_childs = ObjectMapper.Map<List<ic_bom_child>, List<mo_ic_bom_child>>(icbom_childs);
                 //插入数据
                 await _ic_bom_child.InsertMany(moIcbom_childs);
@@ -202,7 +202,7 @@ namespace Business.SyncDataManagement
             if (icItems.Count > 0)
             {
                 //先清空表数据
-                await _ic_item.Delete(p => p.mongo_id != -1);
+                await _ic_item.Delete(p => p.mysql_id != -1);
                 var moIcItems = ObjectMapper.Map<List<ic_item>, List<mo_ic_item>>(icItems);
                 //插入数据
                 await _ic_item.InsertMany(moIcItems);
@@ -213,7 +213,7 @@ namespace Business.SyncDataManagement
             if (subtitutes.Count > 0)
             {
                 //先清空表数据
-                await _ic_substitute.Delete(p => p.mongo_id != -1);
+                await _ic_substitute.Delete(p => p.mysql_id != -1);
                 var moSubtitutes = ObjectMapper.Map<List<ic_substitute>, List<mo_ic_substitute>>(subtitutes);
                 //插入数据
                 await _ic_substitute.InsertMany(moSubtitutes);
@@ -224,7 +224,7 @@ namespace Business.SyncDataManagement
             if (subAlls.Count > 0)
             {
                 //先清空表数据
-                await _ic_substitute_all.Delete(p => p.mongo_id != -1);
+                await _ic_substitute_all.Delete(p => p.mysql_id != -1);
                 var moSubAlls = ObjectMapper.Map<List<ic_substitute_all>, List<mo_ic_substitute_all>>(subAlls);
                 //插入数据
                 await _ic_substitute_all.InsertMany(moSubAlls);
@@ -235,7 +235,7 @@ namespace Business.SyncDataManagement
             if (subAllDtls.Count > 0)
             {
                 //先清空表数据
-                await _ic_substitute_all_dtl.Delete(p => p.mongo_id != -1);
+                await _ic_substitute_all_dtl.Delete(p => p.mysql_id != -1);
                 var moSubAllDtls = ObjectMapper.Map<List<ic_substitute_all_dtl>, List<mo_ic_substitute_all_dtl>>(subAllDtls);
                 //插入数据
                 await _ic_substitute_all_dtl.InsertMany(moSubAllDtls);
@@ -246,7 +246,7 @@ namespace Business.SyncDataManagement
             if (suppliers.Count > 0)
             {
                 //先清空表数据
-                await _srm_supplier.Delete(p => p.mongo_id != -1);
+                await _srm_supplier.Delete(p => p.mysql_id != -1);
                 var moSuppliers = ObjectMapper.Map<List<srm_supplier>, List<mo_srm_supplier>>(suppliers);
                 //插入数据
                 await _srm_supplier.InsertMany(moSuppliers);
@@ -257,7 +257,7 @@ namespace Business.SyncDataManagement
             if (techs.Count > 0)
             {
                 //先清空表数据
-                await _mes_technique.Delete(p => p.mongo_id != -1);
+                await _mes_technique.Delete(p => p.mysql_id != -1);
                 var moTechs = ObjectMapper.Map<List<mes_technique>, List<mo_mes_technique>>(techs);
                 //插入数据
                 await _mes_technique.InsertMany(moTechs);
@@ -268,7 +268,7 @@ namespace Business.SyncDataManagement
             if (suppliers.Count > 0)
             {
                 //先清空表数据
-                await _mes_process.Delete(p => p.mongo_id != -1);
+                await _mes_process.Delete(p => p.mysql_id != -1);
                 var moProcesses = ObjectMapper.Map<List<mes_process>, List<mo_mes_process>>(processes);
                 //插入数据
                 await _mes_process.InsertMany(moProcesses);
@@ -279,7 +279,7 @@ namespace Business.SyncDataManagement
             if (tech_procs.Count > 0)
             {
                 //先清空表数据
-                await _mes_tech_process.Delete(p => p.mongo_id != -1);
+                await _mes_tech_process.Delete(p => p.mysql_id != -1);
                 var moTech_procs = ObjectMapper.Map<List<mes_tech_process>, List<mo_mes_tech_process>>(tech_procs);
                 //插入数据
                 await _mes_tech_process.InsertMany(moTech_procs);

+ 0 - 7
MicroServices/Business/Bussiness.MongoModel/Base/MoBaseEntity.cs

@@ -26,13 +26,6 @@ namespace Bussiness.MongoModel
             mysql_id = snow.NextId();
         }
 
-        /// <summary>
-        /// mongodb表id
-        /// </summary>
-        [Comment("mongodb表id")]
-        [BsonId]
-        public virtual long mongo_id { get; set; }
-
         /// <summary>
         /// mysql表id
         /// </summary>