自动校正出入场人数及工时任务逻辑优化
This commit is contained in:
parent
5737085710
commit
a92df1a682
|
@ -272,8 +272,8 @@ namespace BLL
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DateTime dateS = DateTime.Now.AddMonths(-3);
|
DateTime dateS = DateTime.Now.AddMonths(-12);
|
||||||
dateS = Funs.GetNewDateTimeOrNow(DateTime.Now.AddMonths(-3).Year + "-" + DateTime.Now.AddMonths(-3).Month + "-01");
|
dateS = Funs.GetNewDateTimeOrNow(DateTime.Now.AddMonths(-12).Year + "-" + DateTime.Now.AddMonths(-12).Month + "-01");
|
||||||
var getNums = from x in db.SitePerson_PersonInOutNumber
|
var getNums = from x in db.SitePerson_PersonInOutNumber
|
||||||
where x.ProjectId == projectId && x.InOutDate >= dateS
|
where x.ProjectId == projectId && x.InOutDate >= dateS
|
||||||
orderby x.InOutDate
|
orderby x.InOutDate
|
||||||
|
@ -281,7 +281,8 @@ namespace BLL
|
||||||
var getInouts = from x in db.SitePerson_PersonInOut
|
var getInouts = from x in db.SitePerson_PersonInOut
|
||||||
where x.ProjectId == projectId && x.ChangeTime.Value >= dateS
|
where x.ProjectId == projectId && x.ChangeTime.Value >= dateS
|
||||||
select x;
|
select x;
|
||||||
int SafeHours = 0;
|
//int SafeHours = 0;
|
||||||
|
int SafeHours = db.SitePerson_PersonInOutNumber.Where(x => x.ProjectId == projectId && x.InOutDate < dateS).Max(x => x.WorkHours) ?? 0;
|
||||||
foreach (var itemNum in getNums)
|
foreach (var itemNum in getNums)
|
||||||
{
|
{
|
||||||
DateTime date = Funs.GetNewDateTimeOrNow(itemNum.InOutDate.ToShortDateString());
|
DateTime date = Funs.GetNewDateTimeOrNow(itemNum.InOutDate.ToShortDateString());
|
||||||
|
|
|
@ -327,7 +327,7 @@
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
interval: 0,
|
/*interval: 0,*/
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: 'rgba(255, 255, 255, 0.8)'
|
color: 'rgba(255, 255, 255, 0.8)'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue