生产单元
This commit is contained in:
parent
e0581a708b
commit
77cab780c5
@ -218,7 +218,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
listYearInfo.Add(new T_BI_BSSAFECHECK_YEAR()
|
listYearInfo.Add(new T_BI_BSSAFECHECK_YEAR()
|
||||||
{
|
{
|
||||||
ID = Guid.NewGuid(),
|
ID = Guid.NewGuid(),
|
||||||
MineType = BSMineTypeEnum.All,
|
//MineType = BSMineTypeEnum.All,
|
||||||
YEAR = dtNow.Year,
|
YEAR = dtNow.Year,
|
||||||
//LEVEL = (FMDepartmentType)i,
|
//LEVEL = (FMDepartmentType)i,
|
||||||
LEVEL = (FMDepartmentType)listLevel[i].VALUE,
|
LEVEL = (FMDepartmentType)listLevel[i].VALUE,
|
||||||
@ -380,11 +380,11 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
listModelDel = GetEntities<T_BI_BSCHECKTYPE_YEAR>(e => e.MineType == BSMineTypeEnum.All && e.YEAR == dtNow.Year && e.MONTH < dtNow.Month && e.MONTH >= (dtNow.Month - caculateMonth), null);//需要删除的数据
|
listModelDel = GetEntities<T_BI_BSCHECKTYPE_YEAR>(e => e.YEAR == dtNow.Year && e.MONTH < dtNow.Month && e.MONTH >= (dtNow.Month - caculateMonth), null);//需要删除的数据 e.MineType == BSMineTypeEnum.All &&
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
listModelDelLast = GetEntities<T_BI_BSCHECKTYPE_YEAR>(e => e.MineType == BSMineTypeEnum.All && e.YEAR == dtNow.Year - 1 && e.MONTH > (12 - (caculateMonth - dtNow.Month)), null);//需要删除的数据
|
listModelDelLast = GetEntities<T_BI_BSCHECKTYPE_YEAR>(e => e.YEAR == dtNow.Year - 1 && e.MONTH > (12 - (caculateMonth - dtNow.Month)), null);//需要删除的数据 e.MineType == BSMineTypeEnum.All &&
|
||||||
}
|
}
|
||||||
if (summery3.Count1 < 1)
|
if (summery3.Count1 < 1)
|
||||||
{
|
{
|
||||||
@ -548,16 +548,16 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
/// <param name="ORG_ID"></param>
|
/// <param name="ORG_ID"></param>
|
||||||
/// <param name="typeYearMonth"></param>
|
/// <param name="typeYearMonth"></param>
|
||||||
/// <param name="MineType"></param>
|
/// <param name="MineType"></param>
|
||||||
private void SetVal(DateTime dtMax, Guid ORG_ID, ref T_BI_BSCHECKTYPE_YEAR typeYearMonth, BSMineTypeEnum MineType = BSMineTypeEnum.All)
|
private void SetVal(DateTime dtMax, Guid ORG_ID, ref T_BI_BSCHECKTYPE_YEAR typeYearMonth, BSMineTypeEnum MineType = BSMineTypeEnum.All)//
|
||||||
{
|
{
|
||||||
typeYearMonth = GetEntity<T_BI_BSCHECKTYPE_YEAR>(e => e.MineType == MineType && e.YEAR == dtMax.Year && e.MONTH == dtMax.Month);
|
typeYearMonth = GetEntity<T_BI_BSCHECKTYPE_YEAR>(e => e.YEAR == dtMax.Year && e.MONTH == dtMax.Month);// e.MineType == MineType &&
|
||||||
if (typeYearMonth == null)
|
if (typeYearMonth == null)
|
||||||
{
|
{
|
||||||
//最好有 code 但是之前没有就没有了 0406 修改
|
//最好有 code 但是之前没有就没有了 0406 修改
|
||||||
typeYearMonth = new T_BI_BSCHECKTYPE_YEAR();
|
typeYearMonth = new T_BI_BSCHECKTYPE_YEAR();
|
||||||
typeYearMonth.YEAR = dtMax.Year;
|
typeYearMonth.YEAR = dtMax.Year;
|
||||||
typeYearMonth.MONTH = dtMax.Month;
|
typeYearMonth.MONTH = dtMax.Month;
|
||||||
typeYearMonth.MineType = MineType;
|
//typeYearMonth.MineType = MineType;
|
||||||
typeYearMonth.ORG_ID = ORG_ID;
|
typeYearMonth.ORG_ID = ORG_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -569,10 +569,10 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
|
|
||||||
if (MineType != BSMineTypeEnum.All)
|
if (MineType != BSMineTypeEnum.All)
|
||||||
{
|
{
|
||||||
int iMineType = (int)MineType;
|
//int iMineType = (int)MineType;
|
||||||
expression = expression.And(e => e.SAFE_CHECK_ID.HasValue && e.Nav_SafeCheck != null && e.Nav_SafeCheck.CHECKOBJECT.HasValue && e.Nav_SafeCheck.CHECKOBJECT.Value == iMineType);
|
expression = expression.And(e => e.SAFE_CHECK_ID.HasValue && e.Nav_SafeCheck != null && e.Nav_SafeCheck.CHECKOBJECT.HasValue );//&& e.Nav_SafeCheck.CHECKOBJECT.Value == iMineType
|
||||||
expression2 = expression2.And(e => e.SAFE_CHECK_ID.HasValue && e.Nav_SafeCheck != null && e.Nav_SafeCheck.CHECKOBJECT.HasValue && e.Nav_SafeCheck.CHECKOBJECT.Value == iMineType);
|
expression2 = expression2.And(e => e.SAFE_CHECK_ID.HasValue && e.Nav_SafeCheck != null && e.Nav_SafeCheck.CHECKOBJECT.HasValue);// && e.Nav_SafeCheck.CHECKOBJECT.Value == iMineType
|
||||||
expression3 = expression3.And(e => e.SAFE_CHECK_ID.HasValue && e.Nav_SafeCheck != null && e.Nav_SafeCheck.CHECKOBJECT.HasValue && e.Nav_SafeCheck.CHECKOBJECT.Value == iMineType);
|
expression3 = expression3.And(e => e.SAFE_CHECK_ID.HasValue && e.Nav_SafeCheck != null && e.Nav_SafeCheck.CHECKOBJECT.HasValue );//&& e.Nav_SafeCheck.CHECKOBJECT.Value == iMineType
|
||||||
|
|
||||||
filter.SelectField = new List<string> { "ID", "SAFE_CHECK_ID", "Nav_SafeCheck.ID" };
|
filter.SelectField = new List<string> { "ID", "SAFE_CHECK_ID", "Nav_SafeCheck.ID" };
|
||||||
|
|
||||||
@ -714,16 +714,16 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
summery.Parameter4 = "未完成数";
|
summery.Parameter4 = "未完成数";
|
||||||
summery.Parameter5 = "完成率";
|
summery.Parameter5 = "完成率";
|
||||||
summery.Parameter6 = "及时完成率";
|
summery.Parameter6 = "及时完成率";
|
||||||
summery.Parameter9 = summery.MineType.GetDescription();// "矿山部";
|
//summery.Parameter9 = summery.MineType.GetDescription();// "矿山部";
|
||||||
}
|
}
|
||||||
|
|
||||||
summery.Count1 = GetCount<T_BS_SAFE_CHECK>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0 && e.CHECKOBJECT.HasValue && e.CHECKOBJECT.Value == item && e.CREATE_TIME.HasValue && e.CREATE_TIME >= dtYearBegin, null);//计划检查数
|
summery.Count1 = GetCount<T_BS_SAFE_CHECK>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0 && e.CREATE_TIME.HasValue && e.CREATE_TIME >= dtYearBegin, null);// 计划检查数&& e.CHECKOBJECT.HasValue && e.CHECKOBJECT.Value == item
|
||||||
|
|
||||||
summery.Count2 = GetCount<T_BS_SAFE_CHECK>(e => !e.IS_DELETED && e.CHECKOBJECT.HasValue && e.CHECKOBJECT.Value == item && e.ENABLE_STATUS == 0 && e.CREATE_TIME.HasValue && e.CREATE_TIME >= dtYearBegin && e.ISFINISHINTTIME, null);//按时已办
|
summery.Count2 = GetCount<T_BS_SAFE_CHECK>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0 && e.CREATE_TIME.HasValue && e.CREATE_TIME >= dtYearBegin && e.ISFINISHINTTIME, null);//按时已办&& e.CHECKOBJECT.HasValue && e.CHECKOBJECT.Value == item
|
||||||
|
|
||||||
summery.Count3 = GetCount<T_BS_SAFE_CHECK>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0 && e.CHECKOBJECT.HasValue && e.CHECKOBJECT.Value == item && e.CREATE_TIME.HasValue && e.CREATE_TIME >= dtYearBegin && !e.ISFINISHINTTIME && e.STATECHECK == STATECHECK.Archived, null);//完成 未及时完成
|
summery.Count3 = GetCount<T_BS_SAFE_CHECK>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0 && e.CREATE_TIME.HasValue && e.CREATE_TIME >= dtYearBegin && !e.ISFINISHINTTIME && e.STATECHECK == STATECHECK.Archived, null);//完成 未及时完成 && e.CHECKOBJECT.HasValue && e.CHECKOBJECT.Value == item
|
||||||
|
|
||||||
summery.Count4 = GetCount<T_BS_SAFE_CHECK>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0 && e.CHECKOBJECT.HasValue && e.CHECKOBJECT.Value == item && e.CREATE_TIME.HasValue && e.CREATE_TIME >= dtYearBegin && e.STATECHECK != STATECHECK.Archived, null);//未完成数
|
summery.Count4 = GetCount<T_BS_SAFE_CHECK>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0 && e.CREATE_TIME.HasValue && e.CREATE_TIME >= dtYearBegin && e.STATECHECK != STATECHECK.Archived, null);//未完成数&& e.CHECKOBJECT.HasValue && e.CHECKOBJECT.Value == item
|
||||||
|
|
||||||
if (summery.Count1 < 1)
|
if (summery.Count1 < 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -89,9 +89,9 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
//前12月的数据
|
//前12月的数据
|
||||||
IEnumerable<T_BI_BSCHECKTYPE_YEAR> listCheckType = null;
|
IEnumerable<T_BI_BSCHECKTYPE_YEAR> listCheckType = null;
|
||||||
if (DateTime.Now.Month == 12)
|
if (DateTime.Now.Month == 12)
|
||||||
listCheckType = GetEntities<T_BI_BSCHECKTYPE_YEAR>(e => e.MineType == BSMineTypeEnum.All && e.YEAR == DateTime.Now.Year, null, null);
|
listCheckType = GetEntities<T_BI_BSCHECKTYPE_YEAR>(e => e.YEAR == DateTime.Now.Year, null, null); // e.MineType == BSMineTypeEnum.All &&
|
||||||
else
|
else
|
||||||
listCheckType = GetEntities<T_BI_BSCHECKTYPE_YEAR>(e => e.MineType == BSMineTypeEnum.All && (e.YEAR == DateTime.Now.Year || (e.YEAR == (DateTime.Now.Year - 1) && (e.MONTH > DateTime.Now.Month))), null, null);
|
listCheckType = GetEntities<T_BI_BSCHECKTYPE_YEAR>(e => (e.YEAR == DateTime.Now.Year || (e.YEAR == (DateTime.Now.Year - 1) && (e.MONTH > DateTime.Now.Month))), null, null);//e.MineType == BSMineTypeEnum.All &&
|
||||||
|
|
||||||
listCheckType = listCheckType.OrderBy(e => e.YEAR).ThenBy(e => e.MONTH);
|
listCheckType = listCheckType.OrderBy(e => e.YEAR).ThenBy(e => e.MONTH);
|
||||||
if (listSummery != null && listSummery.Any())
|
if (listSummery != null && listSummery.Any())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user