2023-11-16
This commit is contained in:
@@ -156,47 +156,51 @@ namespace BLL
|
||||
/// <param name="newtable"></param>
|
||||
public static void AddProject_CQMSData_CQMS(Model.Project_CQMSData_CQMS newtable)
|
||||
{
|
||||
|
||||
Model.Project_CQMSData_CQMS table = new Model.Project_CQMSData_CQMS
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Id = newtable.Id,
|
||||
ProjectId = newtable.ProjectId,
|
||||
UnitId = newtable.UnitId,
|
||||
CollCropCode = newtable.CollCropCode,
|
||||
UnitName = newtable.UnitName,
|
||||
ReportDate = newtable.ReportDate,
|
||||
TrainPersonNum = newtable.TrainPersonNum,
|
||||
TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum,
|
||||
UseNum = newtable.UseNum,
|
||||
OKNum = newtable.OKNum,
|
||||
CompanyPersonNum = newtable.CompanyPersonNum,
|
||||
BranchPersonNum = newtable.BranchPersonNum,
|
||||
ProjectPersonNum = newtable.ProjectPersonNum,
|
||||
ProblemNum = newtable.ProblemNum,
|
||||
ProblemCompletedNum = newtable.ProblemCompletedNum,
|
||||
ProblemNotCompletedNum = newtable.ProblemNotCompletedNum,
|
||||
SNum = newtable.SNum,
|
||||
ANum = newtable.ANum,
|
||||
BNum = newtable.BNum,
|
||||
CNum = newtable.CNum,
|
||||
KeyProcessNum = newtable.KeyProcessNum,
|
||||
KeyProcessOKNum = newtable.KeyProcessOKNum,
|
||||
SpecialProcessNum = newtable.SpecialProcessNum,
|
||||
SpecialProcessOKNum = newtable.SpecialProcessOKNum,
|
||||
ConcealedWorksNum = newtable.ConcealedWorksNum,
|
||||
ConcealedWorksOKNum = newtable.ConcealedWorksOKNum,
|
||||
UnitProjectOnesNum = newtable.UnitProjectOnesNum,
|
||||
UnitProjectOnesOKNum = newtable.UnitProjectOnesOKNum,
|
||||
MaterialInRecheckNum = newtable.MaterialInRecheckNum,
|
||||
MaterialInRecheckOKNum = newtable.MaterialInRecheckOKNum,
|
||||
SingleProjectNum = newtable.SingleProjectNum,
|
||||
UnitProjectNum = newtable.UnitProjectNum,
|
||||
SubProjectNum = newtable.SubProjectNum,
|
||||
SubdivisionalWorksNum = newtable.SubdivisionalWorksNum,
|
||||
InspectionLotNum = newtable.InspectionLotNum,
|
||||
};
|
||||
db.Project_CQMSData_CQMS.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
Model.Project_CQMSData_CQMS table = new Model.Project_CQMSData_CQMS
|
||||
{
|
||||
Id = newtable.Id,
|
||||
ProjectId = newtable.ProjectId,
|
||||
UnitId = newtable.UnitId,
|
||||
CollCropCode = newtable.CollCropCode,
|
||||
UnitName = newtable.UnitName,
|
||||
ReportDate = newtable.ReportDate,
|
||||
TrainPersonNum = newtable.TrainPersonNum,
|
||||
TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum,
|
||||
UseNum = newtable.UseNum,
|
||||
OKNum = newtable.OKNum,
|
||||
CompanyPersonNum = newtable.CompanyPersonNum,
|
||||
BranchPersonNum = newtable.BranchPersonNum,
|
||||
ProjectPersonNum = newtable.ProjectPersonNum,
|
||||
ProblemNum = newtable.ProblemNum,
|
||||
ProblemCompletedNum = newtable.ProblemCompletedNum,
|
||||
ProblemNotCompletedNum = newtable.ProblemNotCompletedNum,
|
||||
SNum = newtable.SNum,
|
||||
ANum = newtable.ANum,
|
||||
BNum = newtable.BNum,
|
||||
CNum = newtable.CNum,
|
||||
KeyProcessNum = newtable.KeyProcessNum,
|
||||
KeyProcessOKNum = newtable.KeyProcessOKNum,
|
||||
SpecialProcessNum = newtable.SpecialProcessNum,
|
||||
SpecialProcessOKNum = newtable.SpecialProcessOKNum,
|
||||
ConcealedWorksNum = newtable.ConcealedWorksNum,
|
||||
ConcealedWorksOKNum = newtable.ConcealedWorksOKNum,
|
||||
UnitProjectOnesNum = newtable.UnitProjectOnesNum,
|
||||
UnitProjectOnesOKNum = newtable.UnitProjectOnesOKNum,
|
||||
MaterialInRecheckNum = newtable.MaterialInRecheckNum,
|
||||
MaterialInRecheckOKNum = newtable.MaterialInRecheckOKNum,
|
||||
SingleProjectNum = newtable.SingleProjectNum,
|
||||
UnitProjectNum = newtable.UnitProjectNum,
|
||||
SubProjectNum = newtable.SubProjectNum,
|
||||
SubdivisionalWorksNum = newtable.SubdivisionalWorksNum,
|
||||
InspectionLotNum = newtable.InspectionLotNum,
|
||||
};
|
||||
db.Project_CQMSData_CQMS.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改
|
||||
@@ -205,46 +209,50 @@ namespace BLL
|
||||
public static void UpdateProject_CQMSData_CQMS(Model.Project_CQMSData_CQMS newtable)
|
||||
{
|
||||
|
||||
Model.Project_CQMSData_CQMS table = db.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.UnitId = newtable.UnitId;
|
||||
table.CollCropCode = newtable.CollCropCode;
|
||||
table.UnitName = newtable.UnitName;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
table.TrainPersonNum = newtable.TrainPersonNum;
|
||||
table.TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum;
|
||||
table.UseNum = newtable.UseNum;
|
||||
table.OKNum = newtable.OKNum;
|
||||
table.CompanyPersonNum = newtable.CompanyPersonNum;
|
||||
table.BranchPersonNum = newtable.BranchPersonNum;
|
||||
table.ProjectPersonNum = newtable.ProjectPersonNum;
|
||||
table.ProblemNum = newtable.ProblemNum;
|
||||
table.ProblemCompletedNum = newtable.ProblemCompletedNum;
|
||||
table.ProblemNotCompletedNum = newtable.ProblemNotCompletedNum;
|
||||
table.SNum = newtable.SNum;
|
||||
table.ANum = newtable.ANum;
|
||||
table.BNum = newtable.BNum;
|
||||
table.CNum = newtable.CNum;
|
||||
table.KeyProcessNum = newtable.KeyProcessNum;
|
||||
table.KeyProcessOKNum = newtable.KeyProcessOKNum;
|
||||
table.SpecialProcessNum = newtable.SpecialProcessNum;
|
||||
table.SpecialProcessOKNum = newtable.SpecialProcessOKNum;
|
||||
table.ConcealedWorksNum = newtable.ConcealedWorksNum;
|
||||
table.ConcealedWorksOKNum = newtable.ConcealedWorksOKNum;
|
||||
table.UnitProjectOnesNum = newtable.UnitProjectOnesNum;
|
||||
table.UnitProjectOnesOKNum = newtable.UnitProjectOnesOKNum;
|
||||
table.MaterialInRecheckNum = newtable.MaterialInRecheckNum;
|
||||
table.MaterialInRecheckOKNum = newtable.MaterialInRecheckOKNum;
|
||||
table.SingleProjectNum = newtable.SingleProjectNum;
|
||||
table.UnitProjectNum = newtable.UnitProjectNum;
|
||||
table.SubProjectNum = newtable.SubProjectNum;
|
||||
table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum;
|
||||
table.InspectionLotNum = newtable.InspectionLotNum;
|
||||
db.SubmitChanges();
|
||||
Model.Project_CQMSData_CQMS table = db.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.UnitId = newtable.UnitId;
|
||||
table.CollCropCode = newtable.CollCropCode;
|
||||
table.UnitName = newtable.UnitName;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
table.TrainPersonNum = newtable.TrainPersonNum;
|
||||
table.TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum;
|
||||
table.UseNum = newtable.UseNum;
|
||||
table.OKNum = newtable.OKNum;
|
||||
table.CompanyPersonNum = newtable.CompanyPersonNum;
|
||||
table.BranchPersonNum = newtable.BranchPersonNum;
|
||||
table.ProjectPersonNum = newtable.ProjectPersonNum;
|
||||
table.ProblemNum = newtable.ProblemNum;
|
||||
table.ProblemCompletedNum = newtable.ProblemCompletedNum;
|
||||
table.ProblemNotCompletedNum = newtable.ProblemNotCompletedNum;
|
||||
table.SNum = newtable.SNum;
|
||||
table.ANum = newtable.ANum;
|
||||
table.BNum = newtable.BNum;
|
||||
table.CNum = newtable.CNum;
|
||||
table.KeyProcessNum = newtable.KeyProcessNum;
|
||||
table.KeyProcessOKNum = newtable.KeyProcessOKNum;
|
||||
table.SpecialProcessNum = newtable.SpecialProcessNum;
|
||||
table.SpecialProcessOKNum = newtable.SpecialProcessOKNum;
|
||||
table.ConcealedWorksNum = newtable.ConcealedWorksNum;
|
||||
table.ConcealedWorksOKNum = newtable.ConcealedWorksOKNum;
|
||||
table.UnitProjectOnesNum = newtable.UnitProjectOnesNum;
|
||||
table.UnitProjectOnesOKNum = newtable.UnitProjectOnesOKNum;
|
||||
table.MaterialInRecheckNum = newtable.MaterialInRecheckNum;
|
||||
table.MaterialInRecheckOKNum = newtable.MaterialInRecheckOKNum;
|
||||
table.SingleProjectNum = newtable.SingleProjectNum;
|
||||
table.UnitProjectNum = newtable.UnitProjectNum;
|
||||
table.SubProjectNum = newtable.SubProjectNum;
|
||||
table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum;
|
||||
table.InspectionLotNum = newtable.InspectionLotNum;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
@@ -254,12 +262,16 @@ namespace BLL
|
||||
public static void DeleteProject_CQMSData_CQMSById(string Id)
|
||||
{
|
||||
|
||||
Model.Project_CQMSData_CQMS table = db.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.Project_CQMSData_CQMS.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
Model.Project_CQMSData_CQMS table = db.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
{
|
||||
db.Project_CQMSData_CQMS.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using FineUIPro;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -87,62 +88,75 @@ namespace BLL
|
||||
|
||||
public static void AddProject_HJGLData_Defect(Model.Project_HJGLData_Defect newtable)
|
||||
{
|
||||
|
||||
Model.Project_HJGLData_Defect table = new Model.Project_HJGLData_Defect
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Id = newtable.Id,
|
||||
ProjectId = newtable.ProjectId,
|
||||
UnitId = newtable.UnitId,
|
||||
CollCropCode = newtable.CollCropCode,
|
||||
UnitName = newtable.UnitName,
|
||||
ReportDate = newtable.ReportDate,
|
||||
DefectName = newtable.DefectName,
|
||||
DefectNum = newtable.DefectNum,
|
||||
};
|
||||
db.Project_HJGLData_Defect.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
Model.Project_HJGLData_Defect table = new Model.Project_HJGLData_Defect
|
||||
{
|
||||
Id = newtable.Id,
|
||||
ProjectId = newtable.ProjectId,
|
||||
UnitId = newtable.UnitId,
|
||||
CollCropCode = newtable.CollCropCode,
|
||||
UnitName = newtable.UnitName,
|
||||
ReportDate = newtable.ReportDate,
|
||||
DefectName = newtable.DefectName,
|
||||
DefectNum = newtable.DefectNum,
|
||||
};
|
||||
db.Project_HJGLData_Defect.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void UpdateProject_HJGLData_Defect(Model.Project_HJGLData_Defect newtable)
|
||||
{
|
||||
|
||||
Model.Project_HJGLData_Defect table = db.Project_HJGLData_Defect.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.UnitId = newtable.UnitId;
|
||||
table.CollCropCode = newtable.CollCropCode;
|
||||
table.UnitName = newtable.UnitName;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
table.DefectName = newtable.DefectName;
|
||||
table.DefectNum = newtable.DefectNum;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
Model.Project_HJGLData_Defect table = db.Project_HJGLData_Defect.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.UnitId = newtable.UnitId;
|
||||
table.CollCropCode = newtable.CollCropCode;
|
||||
table.UnitName = newtable.UnitName;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
table.DefectName = newtable.DefectName;
|
||||
table.DefectNum = newtable.DefectNum;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteProject_HJGLData_DefectById(string Id)
|
||||
{
|
||||
|
||||
Model.Project_HJGLData_Defect table = db.Project_HJGLData_Defect.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.Project_HJGLData_Defect.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
Model.Project_HJGLData_Defect table = db.Project_HJGLData_Defect.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
{
|
||||
db.Project_HJGLData_Defect.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
public static void DeleteProject_HJGLData_DefectByDate(DateTime? reportDate, string projectid)
|
||||
{
|
||||
|
||||
var table = db.Project_HJGLData_Defect.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid);
|
||||
if (table != null)
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.Project_HJGLData_Defect.DeleteAllOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var table = db.Project_HJGLData_Defect.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid);
|
||||
if (table != null)
|
||||
{
|
||||
db.Project_HJGLData_Defect.DeleteAllOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断当天是否已统计数据
|
||||
|
||||
@@ -114,55 +114,63 @@ namespace BLL
|
||||
}
|
||||
public static void AddProject_HJGLData_HJGL(Model.Project_HJGLData_HJGL newtable)
|
||||
{
|
||||
|
||||
Model.Project_HJGLData_HJGL table = new Model.Project_HJGLData_HJGL
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Id = newtable.Id,
|
||||
ProjectId = newtable.ProjectId,
|
||||
UnitId = newtable.UnitId,
|
||||
CollCropCode = newtable.CollCropCode,
|
||||
UnitName = newtable.UnitName,
|
||||
ReportDate = newtable.ReportDate,
|
||||
WelderNum = newtable.WelderNum,
|
||||
TotalDineNum = newtable.TotalDineNum,
|
||||
CompleteDineNum = newtable.CompleteDineNum,
|
||||
TotalFilmNum = newtable.TotalFilmNum,
|
||||
OKFilmNum = newtable.OKFilmNum,
|
||||
};
|
||||
db.Project_HJGLData_HJGL.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
Model.Project_HJGLData_HJGL table = new Model.Project_HJGLData_HJGL
|
||||
{
|
||||
Id = newtable.Id,
|
||||
ProjectId = newtable.ProjectId,
|
||||
UnitId = newtable.UnitId,
|
||||
CollCropCode = newtable.CollCropCode,
|
||||
UnitName = newtable.UnitName,
|
||||
ReportDate = newtable.ReportDate,
|
||||
WelderNum = newtable.WelderNum,
|
||||
TotalDineNum = newtable.TotalDineNum,
|
||||
CompleteDineNum = newtable.CompleteDineNum,
|
||||
TotalFilmNum = newtable.TotalFilmNum,
|
||||
OKFilmNum = newtable.OKFilmNum,
|
||||
};
|
||||
db.Project_HJGLData_HJGL.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void UpdateProject_HJGLData_HJGL(Model.Project_HJGLData_HJGL newtable)
|
||||
{
|
||||
|
||||
Model.Project_HJGLData_HJGL table = db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.UnitId = newtable.UnitId;
|
||||
table.CollCropCode = newtable.CollCropCode;
|
||||
table.UnitName = newtable.UnitName;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
table.WelderNum = newtable.WelderNum;
|
||||
table.TotalDineNum = newtable.TotalDineNum;
|
||||
table.CompleteDineNum = newtable.CompleteDineNum;
|
||||
table.TotalFilmNum = newtable.TotalFilmNum;
|
||||
table.OKFilmNum = newtable.OKFilmNum;
|
||||
db.SubmitChanges();
|
||||
Model.Project_HJGLData_HJGL table = db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.UnitId = newtable.UnitId;
|
||||
table.CollCropCode = newtable.CollCropCode;
|
||||
table.UnitName = newtable.UnitName;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
table.WelderNum = newtable.WelderNum;
|
||||
table.TotalDineNum = newtable.TotalDineNum;
|
||||
table.CompleteDineNum = newtable.CompleteDineNum;
|
||||
table.TotalFilmNum = newtable.TotalFilmNum;
|
||||
table.OKFilmNum = newtable.OKFilmNum;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteProject_HJGLData_HJGLById(string Id)
|
||||
{
|
||||
|
||||
Model.Project_HJGLData_HJGL table = db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.Project_HJGLData_HJGL.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
Model.Project_HJGLData_HJGL table = db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
{
|
||||
db.Project_HJGLData_HJGL.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断该项目的该日期是否统计数据
|
||||
|
||||
+5
-3
@@ -114,9 +114,11 @@ namespace BLL
|
||||
}
|
||||
public static void AddBulkProject_HSSEData_HiddenDangerDetails(List<Model.Project_HSSEData_HiddenDangerDetail> newtables)
|
||||
{
|
||||
|
||||
db.Project_HSSEData_HiddenDangerDetail.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
using (var db = new SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.Project_HSSEData_HiddenDangerDetail.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdateProject_HSSEData_HiddenDangerDetail(Model.Project_HSSEData_HiddenDangerDetail newtable)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user