public string GetKPIPointRandomPersonID(string companyID, string modelRelationID, string flowID, string stepID, string formID) { string groupRandomPersonID = ""; using (KPIPointBll bll = new KPIPointBll()) { //获取KPI点 T_HR_KPIPOINT point = bll.GetKPIPoint(companyID, modelRelationID, flowID, stepID); List<T_HR_RAMDONGROUPPERSON> groupPersonList; if (point != null) { if (point.T_HR_SCORETYPE != null) { if (point.T_HR_SCORETYPE.ISRANDOMSCORE == "1") { if (point.T_HR_SCORETYPE.T_HR_RANDOMGROUP != null) { //抽查人员 if (point.T_HR_SCORETYPE.T_HR_RANDOMGROUP.T_HR_RAMDONGROUPPERSON == null || point.T_HR_SCORETYPE.T_HR_RANDOMGROUP.T_HR_RAMDONGROUPPERSON.Count == 0) { RandomGroupBll bllRandom = new RandomGroupBll(); groupPersonList = bllRandom.GetRandomGroupPersonByGroupID(point.T_HR_SCORETYPE.T_HR_RANDOMGROUP.RANDOMGROUPID).ToList(); } else groupPersonList = point.T_HR_SCORETYPE.T_HR_RANDOMGROUP.T_HR_RAMDONGROUPPERSON.ToList(); if (groupPersonList == null || groupPersonList.Count == 0) { } else { Random r = new Random(); //获取随机数 int i = r.Next(0, groupPersonList.Count); //获取抽查人员 groupRandomPersonID = groupPersonList[i].PERSONID; if (groupRandomPersonID != null && groupRandomPersonID != "") { SaveKPIRecord(point, formID, flowID, stepID, "", groupRandomPersonID, 0, 3); } } //抽查时间 if (point.T_HR_SCORETYPE.T_HR_KPIREMIND != null) { IEnumerator OperandEnum = point.T_HR_SCORETYPE.T_HR_KPIREMIND.OrderBy(s => s.FORWARDHOURS).GetEnumerator(); //提醒计数 int CharCount = 0; while (OperandEnum.MoveNext()) { T_HR_KPIREMIND Remind = (T_HR_KPIREMIND)OperandEnum.Current; CharCount++; //第一条提醒 if (CharCount == 1) { groupRandomPersonID = groupRandomPersonID + "|" + Remind.FORWARDHOURS.ToString(); } //第二条提醒 if (CharCount == 2) { groupRandomPersonID = groupRandomPersonID + "|" + Remind.FORWARDHOURS.ToString(); } //第三条提醒 if (CharCount == 3) { groupRandomPersonID = groupRandomPersonID + "|" + Remind.FORWARDHOURS.ToString(); } } groupRandomPersonID = groupRandomPersonID + "|" + CharCount.ToString(); } } } } } return groupRandomPersonID; } }
private int DeleteRandomGroupPerson(string randomGroupId) { using (RandomGroupBll bll = new RandomGroupBll()) { return bll.DeleteRandomGroupPerson(randomGroupId); } }
public bool DeleteRandomPersons(string[] groupPersonIDs, string groupID) { using (RandomGroupBll bll = new RandomGroupBll()) { int rslt = bll.DeleteRandomGroupPersons(groupPersonIDs, groupID); return (rslt > 0); } }
private void UpdateRandomGroupPerson(T_HR_RAMDONGROUPPERSON entType) { using (RandomGroupBll bll = new RandomGroupBll()) { bll.UpdateRandomGroupPerson(entType); } }
private int[] UpdateRandomGroupPersonList(List<T_HR_RAMDONGROUPPERSON> entList, string[] employeeIDs) { using (RandomGroupBll bll = new RandomGroupBll()) { return bll.UpdateRandomGroupPersonList(entList, employeeIDs); } }
private int DeleteRandomGroups(string[] randomGroupId) { using (RandomGroupBll bll = new RandomGroupBll()) { return bll.DeleteRandomGroups(randomGroupId); } }
private int AddRandomGroupPersonList(List<T_HR_RAMDONGROUPPERSON> entList) { using (RandomGroupBll bll = new RandomGroupBll()) { return bll.AddRandomGroupPersonList(entList); } }
public T_HR_RANDOMGROUP GetRandomGroupByID(string randomGroupID) { using (RandomGroupBll bll = new RandomGroupBll()) { T_HR_RANDOMGROUP q = bll.GetRandomGroupByID(randomGroupID); return q; } }
private void UpdateRandomGroup(T_HR_RANDOMGROUP entType, ref string strMsg) { using (RandomGroupBll bll = new RandomGroupBll()) { bll.UpdateRandomGroup(entType, ref strMsg); } }
public List<T_HR_RANDOMGROUP> GetRandomGroupAll() { using (RandomGroupBll bll = new RandomGroupBll()) { List<T_HR_RANDOMGROUP> q = bll.GetRandomGroupAll(); return q.Count() > 0 ? q : null; } }
public List<T_HR_RAMDONGROUPPERSON> GetRandomGroupPersonByGroupID(string randomGroupID) { using (RandomGroupBll bll = new RandomGroupBll()) { IQueryable<T_HR_RAMDONGROUPPERSON> q = bll.GetRandomGroupPersonByGroupID(randomGroupID); return q.Count() > 0 ? q.ToList() : null; } }
public T_HR_RAMDONGROUPPERSON GetRandomGroupPersonByID(string randomGroupPersonID) { using (RandomGroupBll bll = new RandomGroupBll()) { T_HR_RAMDONGROUPPERSON q = bll.GetRandomGroupPersonByID(randomGroupPersonID); return q; } }
public List<V_EMPLOYEEVIEW> GetRandomGroupPersonPaging(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string randomGroupID) { using (RandomGroupBll bll = new RandomGroupBll()) { List<V_EMPLOYEEVIEW> q = bll.GetRandomGroupPersonPaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount, randomGroupID); return q; } }
public List<T_HR_RANDOMGROUP> GetRandomGroupPaging(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string userID) { using (RandomGroupBll bll = new RandomGroupBll()) { IQueryable<T_HR_RANDOMGROUP> q = bll.GetRandomGroupPaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount, userID); return q.Count() > 0 ? q.ToList() : null; } }