This commit is contained in:
2023-09-22 17:36:00 +08:00
parent dece3781ec
commit 9942cdcf6f
49 changed files with 2907 additions and 2375 deletions
+38 -9
View File
@@ -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();
+14 -5
View File
@@ -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;