Compare commits
	
		
			No commits in common. "781c42d46a23a15c8a3959bf56d068a5a86c4967" and "b130d3dc467d5b16491c08df7b6661b69473754b" have entirely different histories.
		
	
	
		
			781c42d46a
			...
			b130d3dc46
		
	
		
@ -803,7 +803,7 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
            List<T_PF_APPROVAL_ROLE> listApproveRole = GetEntities<T_PF_APPROVAL_ROLE>(null, null).ToList();//导入自动添加
 | 
					            List<T_PF_APPROVAL_ROLE> listApproveRole = GetEntities<T_PF_APPROVAL_ROLE>(null, null).ToList();//导入自动添加
 | 
				
			||||||
            List<T_FM_USER_BELONG_ROLE> listUserRole = GetEntities<T_FM_USER_BELONG_ROLE>(null, null).ToList();
 | 
					            List<T_FM_USER_BELONG_ROLE> listUserRole = GetEntities<T_FM_USER_BELONG_ROLE>(null, null).ToList();
 | 
				
			||||||
            List<T_FM_ROLE> listRole = GetEntities<T_FM_ROLE>(null, null).ToList();//不做添加 平台类型前端不好改
 | 
					            List<T_FM_ROLE> listRole = GetEntities<T_FM_ROLE>(null, null).ToList();//不做添加 平台类型前端不好改
 | 
				
			||||||
            List<T_OP_ALLUSER> listAll = new List<T_OP_ALLUSER>();
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            List<T_FM_DEPARTMENT> listDepAdd = new List<T_FM_DEPARTMENT>();//需要新增的组织
 | 
					            List<T_FM_DEPARTMENT> listDepAdd = new List<T_FM_DEPARTMENT>();//需要新增的组织
 | 
				
			||||||
            List<T_FM_USER> listUserAdd = new List<T_FM_USER>();//新增用户
 | 
					            List<T_FM_USER> listUserAdd = new List<T_FM_USER>();//新增用户
 | 
				
			||||||
@ -1322,16 +1322,6 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                            modelUser.CREATE_TIME = dtNow;
 | 
					                            modelUser.CREATE_TIME = dtNow;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        listAll.Add(new T_OP_ALLUSER()
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            ID = Guid.NewGuid(),
 | 
					 | 
				
			||||||
                            CODE = strCODE,
 | 
					 | 
				
			||||||
                            TENANT = telnetCode,
 | 
					 | 
				
			||||||
                            ORG_ID = OrgID,
 | 
					 | 
				
			||||||
                            PHONE = strPHONE,
 | 
					 | 
				
			||||||
                            CREATE_TIME = dtNow
 | 
					 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                        //if (modelUser == null)
 | 
					                        //if (modelUser == null)
 | 
				
			||||||
                        //{
 | 
					                        //{
 | 
				
			||||||
                        //    isAddUser = true;
 | 
					                        //    isAddUser = true;
 | 
				
			||||||
@ -1569,11 +1559,6 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                    BantchSaveEntityNoCommit(listUserRoleAdd);
 | 
					                    BantchSaveEntityNoCommit(listUserRoleAdd);
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var conndefault = ConfigurationManager.ConnectionStrings["default"];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #region  总部
 | 
					            #region  总部
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1584,16 +1569,8 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                //人员的岗位ID变成null
 | 
					                //人员的岗位ID变成null
 | 
				
			||||||
                string conn = string.Empty;
 | 
					                string conn = string.Empty;
 | 
				
			||||||
                List<string> listConn = new List<string>();
 | 
					                List<string> listConn = new List<string>();
 | 
				
			||||||
                using (var context = new MigrationContext(conndefault))
 | 
					                using (var context = new MigrationContext(ConfigurationManager.ConnectionStrings["default"]))
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    try
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        context.AddEntities(listAll);
 | 
					 | 
				
			||||||
                        context.SaveChanges();
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    catch { }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    List<Guid> listConnID = context.GetEntities<T_OP_TENANT>(e => e.DB_CONN_ID.HasValue && e.CODE != telnetCode, null, null).Select(e => e.DB_CONN_ID.Value).ToList();
 | 
					                    List<Guid> listConnID = context.GetEntities<T_OP_TENANT>(e => e.DB_CONN_ID.HasValue && e.CODE != telnetCode, null, null).Select(e => e.DB_CONN_ID.Value).ToList();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    var listDbConn = context.GetEntities<T_OP_TENANT_DB_CONN>(e => listConnID.Contains(e.ID), null, null);
 | 
					                    var listDbConn = context.GetEntities<T_OP_TENANT_DB_CONN>(e => listConnID.Contains(e.ID), null, null);
 | 
				
			||||||
@ -1648,19 +1625,7 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                using (var context = new MigrationContext(conndefault))
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    try
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        context.AddEntities(listAll);
 | 
					 | 
				
			||||||
                        context.SaveChanges();
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    catch { }
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            #endregion
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user