20230922
This commit is contained in:
@@ -491,12 +491,12 @@ namespace BLL
|
||||
var getDataLists = (from x in db.Base_WorkPost
|
||||
where strParam == null || x.WorkPostName.Contains(strParam)
|
||||
orderby x.WorkPostName
|
||||
select new Model.BaseInfoItem { BaseInfoId = x.WorkPostId.ToUpper(), BaseInfoCode = x.WorkPostCode, BaseInfoName = x.WorkPostName }).ToList();
|
||||
select new Model.BaseInfoItem { BaseInfoId = x.WorkPostId , BaseInfoCode = x.WorkPostCode, BaseInfoName = x.WorkPostName }).ToList();
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
var user = from u in db.SitePerson_Person
|
||||
where u.ProjectId == projectId
|
||||
select u.WorkPostId.ToUpper();
|
||||
select u.WorkPostId ;
|
||||
var postIds = user.Distinct();
|
||||
|
||||
foreach (var item in getDataLists)
|
||||
|
||||
@@ -78,6 +78,10 @@ namespace BLL
|
||||
TaskItemId = x.TaskItemId,
|
||||
TaskId = x.TaskId,
|
||||
PlanId = x.PlanId,
|
||||
StartTime = x.StartTime,
|
||||
EndTime =x.EndTime,
|
||||
LearnTime=x.LearnTime,
|
||||
VideoProgress = x.VideoProgress,
|
||||
PersonId = x.PersonId,
|
||||
TrainingItemCode = x.TrainingItemCode,
|
||||
TrainingItemName = x.TrainingItemName,
|
||||
@@ -257,7 +261,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="trainingPlanId"></param>
|
||||
/// <returns>培训计划人员</returns>
|
||||
public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId,DateTime startTime,DateTime endTime)
|
||||
public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId,DateTime startTime,DateTime endTime,string VideoProgress)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
@@ -270,13 +274,16 @@ namespace BLL
|
||||
item.StartTime = startTime;
|
||||
}
|
||||
|
||||
if (!item.LearnTime.HasValue)
|
||||
//if (!item.LearnTime.HasValue)
|
||||
//{
|
||||
// item.LearnTime = 0;
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(VideoProgress))
|
||||
{
|
||||
item.LearnTime = 0;
|
||||
item.VideoProgress = int.Parse(VideoProgress);
|
||||
}
|
||||
|
||||
var span = endTime.Subtract(startTime);
|
||||
item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
||||
//item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
||||
item.EndTime = endTime;
|
||||
db.SubmitChanges();
|
||||
return item;
|
||||
|
||||
@@ -1500,8 +1500,13 @@
|
||||
{
|
||||
str += " D." + item.DItem;
|
||||
|
||||
}
|
||||
sb.AppendFormat("<td align=\"left\" style=\"width:100%; \">{0}</td> ", str);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.EItem))
|
||||
{
|
||||
str += " E." + item.EItem;
|
||||
|
||||
}
|
||||
sb.AppendFormat("<td align=\"left\" style=\"width:100%; \">{0}</td> ", str);
|
||||
|
||||
sb.Append("</tr>");
|
||||
//sb.Append("<tr style=\"height: 30px\">");
|
||||
@@ -1544,8 +1549,12 @@
|
||||
{
|
||||
str += " D." + item.DItem;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.EItem))
|
||||
{
|
||||
str += " E." + item.EItem;
|
||||
}
|
||||
|
||||
sb.AppendFormat("<td align=\"left\" style=\"width: 100%; \">{0}</td> ", str);
|
||||
sb.AppendFormat("<td align=\"left\" style=\"width: 100%; \">{0}</td> ", str);
|
||||
sb.Append("</tr>");
|
||||
//sb.Append("<tr style=\"height: 30px\">");
|
||||
//sb.AppendFormat("<td align=\"right\" style=\"width:100%; \">正确答案:{0}</td> ", item.AnswerItems);
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
using System;
|
||||
using FineUIPro;
|
||||
using Model;
|
||||
using NPOI.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Caching;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -30,15 +35,28 @@ namespace BLL
|
||||
{
|
||||
Model.Training_Plan newPlan = new Model.Training_Plan
|
||||
{
|
||||
PlanId = plan.PlanId,
|
||||
PlanCode = plan.PlanCode,
|
||||
PlanId = plan.PlanId,
|
||||
ProjectId = plan.ProjectId,
|
||||
PlanCode = plan.PlanCode,
|
||||
PlanName = plan.PlanName,
|
||||
DesignerId = plan.DesignerId,
|
||||
DesignerDate = plan.DesignerDate,
|
||||
WorkPostId = plan.WorkPostId,
|
||||
States = plan.States
|
||||
};
|
||||
db.Training_Plan.InsertOnSubmit(newPlan);
|
||||
WorkPostId = plan.WorkPostId,
|
||||
TrainContent = plan.TrainContent,
|
||||
TeachMan = plan.TeachMan,
|
||||
TeachHour = plan.TeachHour,
|
||||
TrainStartDate = plan.TrainStartDate,
|
||||
TrainEndDate = plan.TrainEndDate,
|
||||
TeachAddress = plan.TeachAddress,
|
||||
UnitIds = plan.UnitIds,
|
||||
TrainLevelId = plan.TrainLevelId,
|
||||
TrainTypeId = plan.TrainTypeId,
|
||||
Cycle = plan.Cycle,
|
||||
States = plan.States
|
||||
};
|
||||
|
||||
|
||||
db.Training_Plan.InsertOnSubmit(newPlan);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -57,8 +75,19 @@ namespace BLL
|
||||
newPlan.DesignerDate = plan.DesignerDate;
|
||||
newPlan.WorkPostId = plan.WorkPostId;
|
||||
newPlan.QRCodeUrl = plan.QRCodeUrl;
|
||||
newPlan.States = plan.States;
|
||||
Funs.DB.SubmitChanges();
|
||||
newPlan.TrainContent = plan.TrainContent;
|
||||
newPlan.TeachMan = plan.TeachMan;
|
||||
newPlan.TeachHour = plan.TeachHour;
|
||||
newPlan.TrainStartDate = plan.TrainStartDate;
|
||||
newPlan.TrainEndDate = plan.TrainEndDate;
|
||||
newPlan.TeachAddress = plan.TeachAddress;
|
||||
newPlan.UnitIds = plan.UnitIds;
|
||||
newPlan.TrainLevelId = plan.TrainLevelId;
|
||||
newPlan.TrainTypeId = plan.TrainTypeId;
|
||||
newPlan.Cycle = plan.Cycle;
|
||||
newPlan.States = plan.States;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,9 @@ namespace BLL
|
||||
Model.InApproveManager_GeneralEquipmentInItem newEquipmentItem = new Model.InApproveManager_GeneralEquipmentInItem
|
||||
{
|
||||
GeneralEquipmentInItemId = generalEquipmentInItem.GeneralEquipmentInItemId,
|
||||
GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId,
|
||||
SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId,
|
||||
GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId,
|
||||
SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId,
|
||||
SpecialEquipmentName = generalEquipmentInItem.SpecialEquipmentName,
|
||||
SizeModel = generalEquipmentInItem.SizeModel,
|
||||
OwnerCheck = generalEquipmentInItem.OwnerCheck,
|
||||
CertificateNum = generalEquipmentInItem.CertificateNum,
|
||||
@@ -63,8 +64,9 @@ namespace BLL
|
||||
{
|
||||
newGeneralEquipmentInItem.GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId;
|
||||
newGeneralEquipmentInItem.SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId;
|
||||
newGeneralEquipmentInItem.SizeModel = generalEquipmentInItem.SizeModel;
|
||||
newGeneralEquipmentInItem.OwnerCheck = generalEquipmentInItem.OwnerCheck;
|
||||
newGeneralEquipmentInItem.SizeModel = generalEquipmentInItem.SizeModel;
|
||||
newGeneralEquipmentInItem.SpecialEquipmentName = generalEquipmentInItem.SpecialEquipmentName;
|
||||
newGeneralEquipmentInItem.OwnerCheck = generalEquipmentInItem.OwnerCheck;
|
||||
newGeneralEquipmentInItem.CertificateNum = generalEquipmentInItem.CertificateNum;
|
||||
newGeneralEquipmentInItem.IsUsed = generalEquipmentInItem.IsUsed;
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -128,7 +128,9 @@ namespace BLL
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.SitePerson_PersonInOut newPersonInOut = new Model.SitePerson_PersonInOut
|
||||
|
||||
|
||||
Model.SitePerson_PersonInOut newPersonInOut = new Model.SitePerson_PersonInOut
|
||||
{
|
||||
PersonInOutId = SQLHelper.GetNewID(),
|
||||
IsIn = personInOut.IsIn ?? true,
|
||||
@@ -141,7 +143,7 @@ namespace BLL
|
||||
Remark = personInOut.Remark,
|
||||
};
|
||||
|
||||
Model.SitePerson_Person getPerson = new Model.SitePerson_Person();
|
||||
Model.SitePerson_Person getPerson = new Model.SitePerson_Person();
|
||||
if (!string.IsNullOrEmpty(personInOut.PersonId))
|
||||
{
|
||||
getPerson = PersonService.GetPersonById(personInOut.PersonId);
|
||||
@@ -151,9 +153,16 @@ namespace BLL
|
||||
getPerson = PersonService.GetPersonByIdentityCard(personInOut.ProjectId, personInOut.IdentityCard);
|
||||
}
|
||||
if (getPerson != null && !string.IsNullOrEmpty(getPerson.PersonId))
|
||||
{
|
||||
newPersonInOut.ProjectId = getPerson.ProjectId;
|
||||
newPersonInOut.PersonId = getPerson.PersonId;
|
||||
{
|
||||
newPersonInOut.PersonId = getPerson.PersonId;
|
||||
newPersonInOut.ProjectId = getPerson.ProjectId;
|
||||
var old = db.SitePerson_PersonInOut.Where(x => x.PersonId == newPersonInOut.PersonId && x.IsIn == newPersonInOut.IsIn && x.ProjectId == newPersonInOut.ProjectId && x.ChangeTime > newPersonInOut.ChangeTime.Value.AddMinutes(-2)).FirstOrDefault();
|
||||
if(old != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
newPersonInOut.PersonName = getPerson.PersonName;
|
||||
newPersonInOut.IdentityCard = getPerson.IdentityCard;
|
||||
newPersonInOut.UnitId = getPerson.UnitId;
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace BLL
|
||||
PersonId = item.UserId,
|
||||
TrainingItemCode = dataItem.TrainingItemCode,
|
||||
TrainingItemName = dataItem.TrainingItemName,
|
||||
LearnTime = dataItem.LearnTime,
|
||||
AttachUrl = dataItem.AttachUrl,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user