public async Task <LoadDepartMentInfo> CreateDepartment() { DepartmentGroup departments = new DepartmentGroup(); var role = LogicServer.User.role; await DepartmentGroupDataHelper.Instance.SetDepartMentGroupByRoleId(role.Id, departments); var p = DepartmentInfo.GetForId(100001); var f = DepartmentInfo.GetForId(110001); var i = DepartmentInfo.GetForId(120001); var m = DepartmentInfo.GetForId(130001); var shenjia = p.Income + f.Income + i.Income + m.Income; await MsgSender.Instance.UpdateIncome(); //更新身价 LoadDepartMentInfo result = new LoadDepartMentInfo() { FinanceInfo = new FinanceInfo() { CurDirectorCounts = departments.Finance.CurDirectorCounts, CurStaff = departments.Finance.CurStaff, Level = departments.Finance.Level, MakerCoinCounts = departments.Finance.MakerCoinCounts }, InvestmentInfo = new InvestmentInfo() { CurStaff = departments.Investment.CurStaff, Level = departments.Investment.Level, CurDirectorCounts = departments.Investment.CurDirectorCounts, CurExtension = departments.Investment.CurExtension, CurRealestate = departments.Investment.CurRealestate, CurStore = departments.Investment.CurStore }, MarketInfo = new MarketInfo() { CurDirectorCounts = departments.Market.CurDirectorCounts, Level = departments.Market.Level, CurStaff = departments.Market.CurStaff, CurPropagandaCounts = departments.Market.CurPropagandaCounts, CurPurchaseCounts = departments.Market.CurPurchaseCounts, CurStoreAddtion = departments.Market.CurStoreAddtion, CurStrategicCounts = departments.Market.CurStrategicCounts }, PersonnelInfo = new PersonnelInfo() { CurStaff = departments.Personnel.CurStaff, Level = departments.Personnel.Level, CurDirectorCounts = departments.Personnel.CurDirectorCounts, CurTalentLv = departments.Personnel.CurTalentLv } }; return(result); }
public async Task <LoadDepartMentInfo> GetDepartmentInfoByRoleId(Guid roleId) { var depart = await DepartmentGroupDataHelper.Instance.GetDepartMentGroupByRoleId(roleId); if (depart == null) { return(null); } LoadDepartMentInfo info = new LoadDepartMentInfo() { FinanceInfo = new FinanceInfo() { Level = depart.Finance.Level, CurStaff = depart.Finance.CurStaff, MakerCoinCounts = depart.Finance.MakerCoinCounts, CurDirectorCounts = depart.Finance.CurDirectorCounts }, InvestmentInfo = new InvestmentInfo() { Level = depart.Investment.Level, CurDirectorCounts = depart.Investment.CurDirectorCounts, CurExtension = depart.Investment.CurExtension, CurRealestate = depart.Investment.CurRealestate, CurStaff = depart.Investment.CurStaff, CurStore = depart.Investment.CurStore }, MarketInfo = new MarketInfo() { CurStaff = depart.Market.CurStaff, CurDirectorCounts = depart.Market.CurDirectorCounts, Level = depart.Market.Level, CurPropagandaCounts = depart.Market.CurPropagandaCounts, CurPurchaseCounts = depart.Market.CurPurchaseCounts, CurStoreAddtion = depart.Market.CurStoreAddtion, CurStrategicCounts = depart.Market.CurStrategicCounts }, PersonnelInfo = new PersonnelInfo() { Level = depart.Personnel.Level, CurDirectorCounts = depart.Personnel.CurDirectorCounts, CurStaff = depart.Personnel.CurStaff, CurTalentLv = depart.Personnel.CurTalentLv } }; return(info); }