首页班组活动记录

This commit is contained in:
何美荣 2026-07-20 14:31:01 +08:00
parent d381ce07cd
commit 4a1196a505
3 changed files with 5 additions and 4 deletions

View File

@ -255,7 +255,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
var startTime = Convert.ToDateTime(DateTime.Now.AddMonths(-11).Year + "-" + DateTime.Now.AddMonths(-11).Month + "-01 00:00:00");
var endTime = Convert.ToDateTime(DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day + " 23:59:59");
baseFilter.SelectField = new string[] { "ID", "NAME", "DEPARTMENT_TYPE", "Nav_Parent.NAME", "Nav_Parent.Nav_Parent", "PARENT_ID" };
baseFilter.SelectField = new string[] { "ID", "NAME", "DEPARTMENT_TYPE", "Nav_Parent.NAME", "PARENT_ID" };
var departments = GetEntities<T_FM_DEPARTMENT>(t => !t.IS_DELETED && t.ENABLE_STATUS == 0, baseFilter);
baseFilter.SelectField = new string[] { "ID", "DEPARTMENT_ID" };
var teams = GetEntities<T_FM_TEAM>(t => !t.IS_DELETED && t.ENABLE_STATUS == 0, baseFilter);

View File

@ -21,6 +21,7 @@ using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Utilities;
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
namespace APT.SC.WebApi.Controllers.Api.BI
@ -2349,7 +2350,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
var startTime = dtNow.AddMonths(-11);
var checkNotices = GetEntities<T_SK_SECURITY_INSPECTION_NOTICE>(e => e.APPLY_DEPARTMENT_ID.HasValue && e.CREATE_TIME.HasValue && e.CREATE_TIME >= startTime && e.Nav_CheckType!=null && !e.Nav_CheckType.NAME.Contains("岗位排查"), newFilter);
var noticeIds = checkNotices.Select(t => t.ID).ToList();
var checkRecords = GetEntities<T_SK_SECURITY_INSPECTION_RECORD>(e => e.SECURITY_INSPECTION_NOTICE_ID.HasValue && noticeIds.Contains((Guid)e.SECURITY_INSPECTION_NOTICE_ID), newFilter);
var checkRecords = GetEntities<T_SK_SECURITY_INSPECTION_RECORD_SUMMARY>(e => e.SECURITY_INSPECTION_NOTICE_ID.HasValue && noticeIds.Contains((Guid)e.SECURITY_INSPECTION_NOTICE_ID), newFilter);
var currentTime = Convert.ToDateTime(startTime.Year + "-" + startTime.Month + "-01 00:00:00");
List<HomeSafeCheckCountMonth> ListSafeCheckYearMonth = new List<HomeSafeCheckCountMonth>();
//int befoMonth = 11;//计算 12 个月 就是提前 11个月
@ -2564,7 +2565,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
var parentIds = listDepBZ.Where(e => e.PARENT_ID == item.Department_ID).Select(t => t.ID);
var classIds = listDepBZ.Where(e => e.PARENT_ID!=null &&parentIds.Contains((Guid)e.PARENT_ID)).Select(t => t.ID);
item.listChild = listCheckDepCountBZ.Where(e => e.Department_ID!=null && (classIds.Contains((Guid)e.Department_ID) || parentIds.Contains(e.Department_ID))).OrderBy(e => e.DepartmentType).ThenBy(t=>t.NUM).ToList();
item.RowCount = item.listChild.Count() == 0?1: item.listChild.Count();
item.RowCount = item.listChild.Count();
}

View File

@ -9911,7 +9911,7 @@ namespace APT.SC.WebApi.Controllers.Api.BIController
// }
// else
{
var coms = completions.Where(i => i.DEPARTMENT_ID == item.shopId);
var coms = completions.Where(i => i.TEAM_ID == item.shopId);
item.shopDoneCount = completionLists.Where(i => i.shopId == item.shopId).Sum(m => m.teamDoneCount)+ coms.Sum(m => m.FINISH_COUNT);
item.shopOntimeCount = completionLists.Where(i => i.shopId == item.shopId).Sum(m => m.teamOntimeCount) + coms.Sum(m => m.ONTIME_COUNT);
item.shopTotalCount = completionLists.Where(i => i.shopId == item.shopId).Sum(m => m.teamTotalCount) + coms.Sum(m => m.TOTAL_COUNT);