This commit is contained in:
李超 2025-07-10 19:18:33 +08:00
commit 7e635c3609
50 changed files with 2762 additions and 384 deletions

View File

@ -0,0 +1,12 @@
update HSSE_Hazard_HazardRegister set Risk_Level='一般事故隐患'
where Risk_Level='一般'
update HSSE_Hazard_HazardRegister set Risk_Level='重大事故隐患'
where Risk_Level='重大'
GO

View File

@ -0,0 +1,40 @@
--
alter table dbo.Comprehensive_MajorPlanApproval add OperativesNum int
go
exec sp_addextendedproperty 'MS_Description', N'作业人员数', 'SCHEMA', 'dbo', 'TABLE', 'Comprehensive_MajorPlanApproval',
'COLUMN', 'OperativesNum'
go
exec sp_addextendedproperty 'MS_Description', N'方案名称', 'SCHEMA', 'dbo', 'TABLE', 'Solution_LargerHazard',
'COLUMN', 'HazardName'
go
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value1 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value2 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value3 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value4 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value5 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value6 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value7 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value8 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value9 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value10 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value11 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value12 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value13 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value14 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value15 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value16 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value17 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value18 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value19 NVARCHAR(1000);
ALTER TABLE Sys_CQMS_DataInTemp ALTER COLUMN Value20 NVARCHAR(1000);

View File

@ -0,0 +1,11 @@
--1
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Person_CompanyBranchPerson' AND COLUMN_NAME = 'SortIndex')
BEGIN
ALTER TABLE Person_CompanyBranchPerson ADD SortIndex int;
END
GO

View File

@ -0,0 +1,3 @@
ALTER TABLE License_EquipmentSafetyList DROP CONSTRAINT [FK_License_EquipmentSafetyList_ProjectData_WorkArea];

View File

@ -126,6 +126,7 @@ namespace BLL
newMajorPlanApproval.HazardType = majorPlanApproval.HazardType; newMajorPlanApproval.HazardType = majorPlanApproval.HazardType;
newMajorPlanApproval.ExpectedTime = majorPlanApproval.ExpectedTime; newMajorPlanApproval.ExpectedTime = majorPlanApproval.ExpectedTime;
newMajorPlanApproval.TrainPersonNum = majorPlanApproval.TrainPersonNum; newMajorPlanApproval.TrainPersonNum = majorPlanApproval.TrainPersonNum;
newMajorPlanApproval.OperativesNum = majorPlanApproval.OperativesNum;
newMajorPlanApproval.States = majorPlanApproval.States; newMajorPlanApproval.States = majorPlanApproval.States;
db.Comprehensive_MajorPlanApproval.InsertOnSubmit(newMajorPlanApproval); db.Comprehensive_MajorPlanApproval.InsertOnSubmit(newMajorPlanApproval);
db.SubmitChanges(); db.SubmitChanges();
@ -169,6 +170,7 @@ namespace BLL
newMajorPlanApproval.HazardType = majorPlanApproval.HazardType; newMajorPlanApproval.HazardType = majorPlanApproval.HazardType;
newMajorPlanApproval.ExpectedTime = majorPlanApproval.ExpectedTime; newMajorPlanApproval.ExpectedTime = majorPlanApproval.ExpectedTime;
newMajorPlanApproval.TrainPersonNum = majorPlanApproval.TrainPersonNum; newMajorPlanApproval.TrainPersonNum = majorPlanApproval.TrainPersonNum;
newMajorPlanApproval.OperativesNum = majorPlanApproval.OperativesNum;
newMajorPlanApproval.States = majorPlanApproval.States; newMajorPlanApproval.States = majorPlanApproval.States;
newMajorPlanApproval.IsReview = majorPlanApproval.IsReview; newMajorPlanApproval.IsReview = majorPlanApproval.IsReview;
db.SubmitChanges(); db.SubmitChanges();
@ -212,6 +214,7 @@ namespace BLL
{ {
HazardId = majorPlanApproval.MajorPlanApprovalId, HazardId = majorPlanApproval.MajorPlanApprovalId,
HazardCode = majorPlanApproval.PlanCode, HazardCode = majorPlanApproval.PlanCode,
HazardName = majorPlanApproval.PlanName,
HazardType = majorPlanApproval.HazardType, HazardType = majorPlanApproval.HazardType,
ProjectId = majorPlanApproval.ProjectId, ProjectId = majorPlanApproval.ProjectId,
Address = majorPlanApproval.UnitWorkId, Address = majorPlanApproval.UnitWorkId,
@ -221,6 +224,7 @@ namespace BLL
RecardMan = majorPlanApproval.CompileMan, RecardMan = majorPlanApproval.CompileMan,
States = majorPlanApproval.States, States = majorPlanApproval.States,
TrainPersonNum = majorPlanApproval.TrainPersonNum, TrainPersonNum = majorPlanApproval.TrainPersonNum,
OperativesNum = majorPlanApproval.OperativesNum,
IsSuperLargerHazard = majorPlanApproval.SchemeType == "超危大工程" ? true : false, IsSuperLargerHazard = majorPlanApproval.SchemeType == "超危大工程" ? true : false,
}; };
@ -238,6 +242,7 @@ namespace BLL
if (newLargerHazard != null) if (newLargerHazard != null)
{ {
newLargerHazard.HazardCode = majorPlanApproval.PlanCode; newLargerHazard.HazardCode = majorPlanApproval.PlanCode;
newLargerHazard.HazardName = majorPlanApproval.PlanName;
newLargerHazard.HazardType = majorPlanApproval.HazardType; newLargerHazard.HazardType = majorPlanApproval.HazardType;
newLargerHazard.ProjectId = majorPlanApproval.ProjectId; newLargerHazard.ProjectId = majorPlanApproval.ProjectId;
newLargerHazard.Address = majorPlanApproval.UnitWorkId; newLargerHazard.Address = majorPlanApproval.UnitWorkId;
@ -246,6 +251,7 @@ namespace BLL
newLargerHazard.RecordTime = majorPlanApproval.ApprovalDate; newLargerHazard.RecordTime = majorPlanApproval.ApprovalDate;
newLargerHazard.States = majorPlanApproval.States; newLargerHazard.States = majorPlanApproval.States;
newLargerHazard.TrainPersonNum = majorPlanApproval.TrainPersonNum; newLargerHazard.TrainPersonNum = majorPlanApproval.TrainPersonNum;
newLargerHazard.OperativesNum = majorPlanApproval.OperativesNum;
newLargerHazard.IsSuperLargerHazard = majorPlanApproval.SchemeType == "超危大工程" ? true : false; newLargerHazard.IsSuperLargerHazard = majorPlanApproval.SchemeType == "超危大工程" ? true : false;
db.SubmitChanges(); db.SubmitChanges();
} }

View File

@ -527,7 +527,9 @@ namespace BLL
/// <summary> /// <summary>
/// 项目安全总监岗位Id /// 项目安全总监岗位Id
/// </summary> /// </summary>
public static string WorkPost_ProjectHSSEDirector = "5e6e259e-ea0a-4a63-8f52-df4a19a6c9fa"; public static string WorkPost_ProjectHSSEDirector = "8A7C2CDF-AFB5-4826-9951-343253342DAC";
//public static string WorkPost_ProjectHSSEDirector = "5e6e259e-ea0a-4a63-8f52-df4a19a6c9fa";
/// <summary> /// <summary>
/// HSE经理岗位Id /// HSE经理岗位Id
/// </summary> /// </summary>

View File

@ -132,6 +132,7 @@ namespace BLL
Model.Comprehensive_MajorPlanApproval newMajorPlanApproval = new Model.Comprehensive_MajorPlanApproval(); Model.Comprehensive_MajorPlanApproval newMajorPlanApproval = new Model.Comprehensive_MajorPlanApproval();
newMajorPlanApproval.MajorPlanApprovalId = largerHazard.HazardId; newMajorPlanApproval.MajorPlanApprovalId = largerHazard.HazardId;
newMajorPlanApproval.PlanCode = largerHazard.HazardCode; newMajorPlanApproval.PlanCode = largerHazard.HazardCode;
newMajorPlanApproval.PlanName = largerHazard.HazardName;
newMajorPlanApproval.HazardType = largerHazard.HazardType; newMajorPlanApproval.HazardType = largerHazard.HazardType;
newMajorPlanApproval.ProjectId = largerHazard.ProjectId; newMajorPlanApproval.ProjectId = largerHazard.ProjectId;
newMajorPlanApproval.UnitWorkId = largerHazard.Address; newMajorPlanApproval.UnitWorkId = largerHazard.Address;
@ -141,6 +142,7 @@ namespace BLL
newMajorPlanApproval.CompileMan = largerHazard.RecardMan; newMajorPlanApproval.CompileMan = largerHazard.RecardMan;
newMajorPlanApproval.States = largerHazard.States; newMajorPlanApproval.States = largerHazard.States;
newMajorPlanApproval.TrainPersonNum = largerHazard.TrainPersonNum; newMajorPlanApproval.TrainPersonNum = largerHazard.TrainPersonNum;
newMajorPlanApproval.OperativesNum = largerHazard.OperativesNum;
newMajorPlanApproval.SchemeType = largerHazard.IsSuperLargerHazard.HasValue ? "超危大工程" : "危大工程"; newMajorPlanApproval.SchemeType = largerHazard.IsSuperLargerHazard.HasValue ? "超危大工程" : "危大工程";
db.Comprehensive_MajorPlanApproval.InsertOnSubmit(newMajorPlanApproval); db.Comprehensive_MajorPlanApproval.InsertOnSubmit(newMajorPlanApproval);
db.SubmitChanges(); db.SubmitChanges();
@ -155,6 +157,7 @@ namespace BLL
{ {
newMajorPlanApproval.MajorPlanApprovalId = largerHazard.HazardId; newMajorPlanApproval.MajorPlanApprovalId = largerHazard.HazardId;
newMajorPlanApproval.PlanCode = largerHazard.HazardCode; newMajorPlanApproval.PlanCode = largerHazard.HazardCode;
newMajorPlanApproval.PlanName = largerHazard.HazardName;
newMajorPlanApproval.HazardType = largerHazard.HazardType; newMajorPlanApproval.HazardType = largerHazard.HazardType;
newMajorPlanApproval.ProjectId = largerHazard.ProjectId; newMajorPlanApproval.ProjectId = largerHazard.ProjectId;
newMajorPlanApproval.UnitWorkId = largerHazard.Address; newMajorPlanApproval.UnitWorkId = largerHazard.Address;
@ -163,6 +166,7 @@ namespace BLL
newMajorPlanApproval.ApprovalDate = largerHazard.RecordTime; newMajorPlanApproval.ApprovalDate = largerHazard.RecordTime;
newMajorPlanApproval.States = largerHazard.States; newMajorPlanApproval.States = largerHazard.States;
newMajorPlanApproval.TrainPersonNum = largerHazard.TrainPersonNum; newMajorPlanApproval.TrainPersonNum = largerHazard.TrainPersonNum;
newMajorPlanApproval.OperativesNum = largerHazard.OperativesNum;
newMajorPlanApproval.SchemeType = largerHazard.IsSuperLargerHazard.HasValue ? "超危大工程" : "危大工程"; newMajorPlanApproval.SchemeType = largerHazard.IsSuperLargerHazard.HasValue ? "超危大工程" : "危大工程";
db.SubmitChanges(); db.SubmitChanges();
} }

View File

@ -3274,6 +3274,7 @@
RectifyName = item.RectifyName, RectifyName = item.RectifyName,
SupRectifyId = item.SupRectifyId, SupRectifyId = item.SupRectifyId,
IsEndLever = item.IsEndLever, IsEndLever = item.IsEndLever,
RectifyType = "0",//安全
IsBuild = true IsBuild = true
}; };
newLists.Add(newList); newLists.Add(newList);

View File

@ -688,7 +688,7 @@ namespace BLL
EquipmentInspectionNum = inspectionEquipmentList.Count(), EquipmentInspectionNum = inspectionEquipmentList.Count(),
EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(), EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(),
PersonInspectionNum = inspectionPersonList.Count(), PersonInspectionNum = inspectionPersonList.Count(),
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(), PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.ValidityDate == null || (x.ValidityDate.HasValue && x.ValidityDate >= DateTime.Now)).Count(),
MachineInspectionNum = inspectionMachineList.Count(), MachineInspectionNum = inspectionMachineList.Count(),
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(), MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(),
InspectionMachineNum = inspectionMachineEquipmentList.Count(), InspectionMachineNum = inspectionMachineEquipmentList.Count(),
@ -761,7 +761,7 @@ namespace BLL
EquipmentInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid), EquipmentInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid),
EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1" && x.ProjectId == projectid).Count(), EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1" && x.ProjectId == projectid).Count(),
PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid), PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid),
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true && x.ProjectId == projectid).Count(), PersonInspectionQualifiedNum = inspectionPersonList.Where(x => (x.ValidityDate == null || (x.ValidityDate.HasValue && x.ValidityDate >= DateTime.Now)) && x.ProjectId == projectid).Count(),
MachineInspectionNum = inspectionMachineList.Count(x => x.ProjectId == projectid), MachineInspectionNum = inspectionMachineList.Count(x => x.ProjectId == projectid),
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true && x.ProjectId == projectid).Count(), MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true && x.ProjectId == projectid).Count(),
MaterialInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid), MaterialInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid),
@ -1167,13 +1167,13 @@ namespace BLL
} }
/// <summary> /// <summary>
/// 获取人员报验 /// 获取人员报验(总数取在场人员)
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static List<Model.Comprehensive_InspectionPerson> GetComprehensive_InspectionPerson() public static List<Model.Comprehensive_InspectionPerson> GetComprehensive_InspectionPerson()
{ {
var result = (from x in Funs.DB.Comprehensive_InspectionPerson var result = (from x in Funs.DB.Comprehensive_InspectionPerson
where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime where BeUnderConstructionList.Contains(x.ProjectId) && x.IsOnSite.HasValue && x.IsOnSite == true && x.CompileDate > Const.DtmarkTime
select x).ToList(); select x).ToList();
return result; return result;
} }

View File

@ -1,6 +1,9 @@
using FineUIPro; using Aspose.Words.Lists;
using EmitMapper;
using FineUIPro;
using Model; using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
using NPOI.SS.Formula.Functions;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -249,6 +252,67 @@ namespace BLL
return responeData; return responeData;
} }
public static HJGLData StatisticalData()
{
var data = new HJGLData();
var thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit();
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
var ProjectData = (from x in Funs.DB.Project_HJGLData_HJGL
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
select x).ToList();
Project_HJGLData_HJGLService.StatisticalAllProjectData();
Project_HJGLData_DefectService.StatisticalAllProjectData();
var table = new HJGLData_HJGL
{
UnitId = thisUnitId,
CollCropCode = baseUnit.CollCropCode,
UnitName = baseUnit.UnitName,
ReportDate = DateTime.Now.Date,
WelderNum = ProjectData.Sum(x => x.WelderNum),
TotalDineNum = ProjectData.Sum(x => x.TotalDineNum),
CompleteDineNum = ProjectData.Sum(x => x.CompleteDineNum),
TotalFilmNum = ProjectData.Sum(x => x.TotalFilmNum),
OKFilmNum = ProjectData.Sum(x => x.OKFilmNum),
CreateMan = Const.sysglyId,
CreateDate = DateTime.Now
};
if (IsReportByToday())
{
table.Id = GetTodayData().Id;
table.State = Const.CNCEC_State_1;
UpdateHJGLData_HJGL(table);
}
else
{
table.Id = SQLHelper.GetNewID();
table.State = Const.CNCEC_State_0;
AddHJGLData_HJGL(table);
}
var item = new HJGLDataItem();
item.CollCropCode = table.CollCropCode;
item.CompleteDineNum = table.CompleteDineNum;
item.Id = table.Id;
item.OKFilmNum = table.OKFilmNum;
item.ReportDate = table.ReportDate.Value.ToShortDateString();
item.TotalDineNum = table.TotalDineNum;
item.TotalFilmNum = table.TotalFilmNum;
item.UnitId = table.UnitId;
item.WelderNum = table.WelderNum;
item.HJGLDataDefectItems = Project_HJGLData_DefectService.getTodayProject_HJGLData_Defect();
var hJGLDataItems = new List<HJGLDataItem>();
hJGLDataItems.Add(item);
data.HJGLDataItems = hJGLDataItems;
return data;
}
public static async Task<HJGLData> StatisticalDataAsync() public static async Task<HJGLData> StatisticalDataAsync()
{ {
var data = new HJGLData(); var data = new HJGLData();
@ -256,8 +320,10 @@ namespace BLL
var thisUnit = CommonService.GetIsThisUnit(); var thisUnit = CommonService.GetIsThisUnit();
if (thisUnit != null) thisUnitId = thisUnit.UnitId; if (thisUnit != null) thisUnitId = thisUnit.UnitId;
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId); var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
Project_HJGLData_DefectService.StatisticalAllProjectData(); Project_HJGLData_DefectService.StatisticalAllProjectData();
// 并行执行异步方法
//// 并行执行异步方法
var welderNumTask = HJGLData_HJGLService.GetWelderNumAsync(); //获取焊工总数 var welderNumTask = HJGLData_HJGLService.GetWelderNumAsync(); //获取焊工总数
var dineInfoListTask = HJGLData_HJGLService.GetDineInfoAsync(); //获达因数信息 var dineInfoListTask = HJGLData_HJGLService.GetDineInfoAsync(); //获达因数信息
var chCheckItemListTask = HJGLData_HJGLService.GetCHCheckItemAsync(); //获取焊接检查信息 var chCheckItemListTask = HJGLData_HJGLService.GetCHCheckItemAsync(); //获取焊接检查信息
@ -289,7 +355,6 @@ namespace BLL
CreateMan = Const.sysglyId, CreateMan = Const.sysglyId,
CreateDate = DateTime.Now CreateDate = DateTime.Now
}; };
Project_HJGLData_HJGLService.DeleteProject_HJGLData_HJGLByDate(DateTime.Now.Date); Project_HJGLData_HJGLService.DeleteProject_HJGLData_HJGLByDate(DateTime.Now.Date);
// 预先对 dineInfoList 和 chCheckItemList 按 ProjectId 进行分组 // 预先对 dineInfoList 和 chCheckItemList 按 ProjectId 进行分组
var dineInfoDict = dineInfoList var dineInfoDict = dineInfoList
@ -344,6 +409,154 @@ namespace BLL
} }
if (IsReportByToday())
{
table.Id = GetTodayData().Id;
table.State = Const.CNCEC_State_1;
UpdateHJGLData_HJGL(table);
}
else
{
table.Id = SQLHelper.GetNewID();
table.State = Const.CNCEC_State_0;
AddHJGLData_HJGL(table);
}
var mapper = ObjectMapperManager.DefaultInstance.GetMapper<HJGLData_HJGL, HJGLDataItem>();
var item = mapper.Map(table);
// 手动处理特殊字段
item.ReportDate = table.ReportDate.Value.ToShortDateString();
item.HJGLDataDefectItems = Project_HJGLData_DefectService.getTodayProject_HJGLData_Defect();
var hJGLDataItems = new List<HJGLDataItem>();
hJGLDataItems.Add(item);
data.HJGLDataItems = hJGLDataItems;
return data;
//var item = new HJGLDataItem();
//item.CollCropCode = table.CollCropCode;
//item.CompleteDineNum = table.CompleteDineNum;
//item.Id = table.Id;
//item.OKFilmNum = table.OKFilmNum;
//item.ReportDate = table.ReportDate.Value.ToShortDateString();
//item.TotalDineNum = table.TotalDineNum;
//item.TotalFilmNum = table.TotalFilmNum;
//item.UnitId = table.UnitId;
//item.WelderNum = table.WelderNum;
//item.HJGLDataDefectItems = Project_HJGLData_DefectService.getTodayProject_HJGLData_Defect();
//var hJGLDataItems = new List<HJGLDataItem>();
//hJGLDataItems.Add(item);
//data.HJGLDataItems = hJGLDataItems;
//return data;
}
public static async Task<HJGLData> StatisticalDataAsyncold()
{
var data = new HJGLData();
var thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit();
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
Project_HJGLData_HJGLService.StatisticalAllProjectData();
Project_HJGLData_DefectService.StatisticalAllProjectData();
// 并行执行异步方法
var projectHJGLDataListTask = HJGLData_HJGLService.GetProjectHJGLDataAsync(); //获取焊接检查信息
//// 并行执行异步方法
//var welderNumTask = HJGLData_HJGLService.GetWelderNumAsync(); //获取焊工总数
//var dineInfoListTask = HJGLData_HJGLService.GetDineInfoAsync(); //获达因数信息
var chCheckItemListTask = HJGLData_HJGLService.GetCHCheckItemAsync(); //获取焊接检查信息
// 等待所有异步方法执行完成
await Task.WhenAll(
projectHJGLDataListTask,
//welderNumTask,
//dineInfoListTask,
chCheckItemListTask
);
// 统一获取异步方法的返回值
var projectHJGLDataList = await projectHJGLDataListTask;
//var welderNum = await welderNumTask;
//var dineInfoList = await dineInfoListTask;
var chCheckItemList = await chCheckItemListTask;
var table = new HJGLData_HJGL
{
UnitId = thisUnitId,
CollCropCode = baseUnit.CollCropCode,
UnitName = baseUnit.UnitName,
ReportDate = DateTime.Now.Date,
WelderNum = projectHJGLDataList.Sum(x => x.WelderNum),
TotalDineNum = projectHJGLDataList.Sum(x => x.TotalDineNum),
CompleteDineNum = projectHJGLDataList.Sum(x => x.CompleteDineNum),
//TotalFilmNum = projectHJGLDataList.Sum(x => x.TotalFilmNum),
//OKFilmNum = projectHJGLDataList.Sum(x => x.OKFilmNum),
//WelderNum = welderNum.Count(),
//TotalDineNum = Convert.ToInt32(dineInfoList.Sum(x => x.Size)),
//CompleteDineNum = Convert.ToInt32(dineInfoList.Sum(x => x.DoneDin)),
TotalFilmNum = Convert.ToInt32(chCheckItemList.Sum(x => x.CHT_TotalFilm)),
OKFilmNum = Convert.ToInt32(chCheckItemList.Sum(x => x.CHT_PassFilm)),
CreateMan = Const.sysglyId,
CreateDate = DateTime.Now
};
//Project_HJGLData_HJGLService.DeleteProject_HJGLData_HJGLByDate(DateTime.Now.Date);
//// 预先对 dineInfoList 和 chCheckItemList 按 ProjectId 进行分组
//var dineInfoDict = dineInfoList
// .Where(x => BeUnderConstructionList.Contains(x.ProjectId))
// .GroupBy(x => x.ProjectId)
// .ToDictionary(g => g.Key, g => new
// {
// TotalDineNum = g.Sum(x => x.Size),
// CompleteDineNum = g.Sum(x => x.DoneDin)
// });
//var chCheckItemDict = chCheckItemList
// .Where(x => BeUnderConstructionList.Contains(x.ProjectId))
// .GroupBy(x => x.ProjectId)
// .ToDictionary(g => g.Key, g => new
// {
// TotalFilmNum = g.Sum(x => x.CHT_TotalFilm),
// OKFilmNum = g.Sum(x => x.CHT_PassFilm)
// });
//foreach (var projectid in BeUnderConstructionList)
//{
// // 获取焊工数量
// int welderCount = welderNum.Count(x => x.ProjectId == projectid);
// // 获取达因信息
// var dineInfo = dineInfoDict.TryGetValue(projectid, out var dineData)
// ? dineData
// : new { TotalDineNum = (double?)0, CompleteDineNum = (double?)0 };
// // 获取拍片信息
// var chCheckItem = chCheckItemDict.TryGetValue(projectid, out var checkData)
// ? checkData
// : new { TotalFilmNum = (int?)0, OKFilmNum = (int?)0 };
// var projectCqmsData = new Project_HJGLData_HJGL()
// {
// Id = SQLHelper.GetNewID(),
// ProjectId = projectid,
// UnitId = thisUnitId,
// CollCropCode = baseUnit.CollCropCode,
// UnitName = baseUnit.UnitName,
// ReportDate = DateTime.Now.Date,
// WelderNum = welderCount,
// TotalDineNum = Convert.ToInt32(dineInfo.TotalDineNum),
// CompleteDineNum = Convert.ToInt32(dineInfo.CompleteDineNum),
// TotalFilmNum = chCheckItem.TotalFilmNum,
// OKFilmNum = chCheckItem.OKFilmNum,
// };
// Project_HJGLData_HJGLService.AddProject_HJGLData_HJGL(projectCqmsData);
//}
if (IsReportByToday()) if (IsReportByToday())
{ {
table.Id = GetTodayData().Id; table.Id = GetTodayData().Id;
@ -416,9 +629,13 @@ namespace BLL
ProjectId = x.ProjectId, ProjectId = x.ProjectId,
UnitId = x.WED_Unit, UnitId = x.WED_Unit,
WEDCode = x.WED_Code, WEDCode = x.WED_Code,
WEDWorkCode = x.WED_WorkCode,
WEDName = x.WED_Name WEDName = x.WED_Name
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
}).ToList(); })
.GroupBy(p => p.WEDWorkCode)
.Select(g => g.First())
.ToList();
return result; return result;
} }
/// <summary> /// <summary>
@ -434,42 +651,106 @@ namespace BLL
/// 获取总达因数和完成达因数 /// 获取总达因数和完成达因数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static IEnumerable<WeldDineOutput> GetDineInfo() public static List<WeldDineOutput> GetDineInfo()
{ {
var result = (from x in Funs.DB.HJGL_FL_TotalQuantity var result = new List<WeldDineOutput>();
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
where BeUnderConstructionList.Contains(x.ProjectId) where BeUnderConstructionList.Contains(x.ProjectId)
group x by x.ProjectId into g select x;
select new Model.WeldDineOutput() var projectIds = getD1.Select(x => x.ProjectId).Distinct();
foreach (var pro in projectIds)
{ {
ProjectId = g.Key, double pTotalWeldQuantity = 0;
Size = g.Sum(x => Convert.ToDouble(x.TotalWeldQuantity)), double pTotalCompleted = 0;
DoneDin = g.Sum(x => Convert.ToDouble(x.TotalCompleted)) var proD1 = getD1.Where(x => x.ProjectId == pro);
foreach (var item in getD1)
{
var dAll = !string.IsNullOrWhiteSpace(item.TotalWeldQuantity) ? Convert.ToDouble(item.TotalWeldQuantity) : 0;
var dCompleted = !string.IsNullOrWhiteSpace(item.TotalCompleted) ? Convert.ToDouble(item.TotalCompleted) : 0;
pTotalWeldQuantity += dAll;
pTotalCompleted += dCompleted;
}
result.Add(new WeldDineOutput
{
ProjectId = pro,
Size = pTotalWeldQuantity,
DoneDin = pTotalCompleted
}); });
}
var differenceProjectIds = BeUnderConstructionList.Except(projectIds).ToList();
foreach (var pro in differenceProjectIds)
{
double pTotalWeldQuantity = 0;
double pTotalCompleted = 0;
var getD2 = (from x in Funs.DB.HJGL_FL_Data
where x.ProjectId == pro
orderby x.CompileDate descending
select x).FirstOrDefault();
if (getD2 != null)
{
pTotalWeldQuantity = !string.IsNullOrWhiteSpace(getD2.TotalWeldQuantity) ? Convert.ToDouble(getD2.TotalWeldQuantity) : 0;
pTotalCompleted = !string.IsNullOrWhiteSpace(getD2.TotalCompleted) ? Convert.ToDouble(getD2.TotalCompleted) : 0;
}
result.Add(new WeldDineOutput
{
ProjectId = pro,
Size = pTotalWeldQuantity,
DoneDin = pTotalCompleted
});
}
return result; return result;
} }
public static async Task<IEnumerable<WeldDineOutput>> GetDineInfoAsync()
/// <summary>
/// 获取总达因数和完成达因数
/// </summary>
/// <returns></returns>
public static async Task<List<WeldDineOutput>> GetDineInfoAsync()
{ {
return await Task.Run(GetDineInfo); return await Task.Run(GetDineInfo);
} }
/// <summary> /// <summary>
/// 获取焊接检查信息 /// 获取焊接检查信息
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static List<CHCheckItemOutput> GetCHCheckItem() public static List<CHCheckItemOutput> GetCHCheckItem()
{ {
var result = (from x in Funs.DB.CH_CheckItem List<CHCheckItemOutput> list = new List<CHCheckItemOutput>();
join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID var ndtLists = (from x in Funs.DB.ProcessControl_NondestructiveTest_New where BeUnderConstructionList.Contains(x.ProjectId) select x).ToList();
where BeUnderConstructionList.Contains(y.ProjectId)
select new Model.CHCheckItemOutput() if (ndtLists.Count() > 0)
{ {
Id = x.CHT_CheckItemID, //取每个项目、单位、专业最新的一条数据
ProjectId = y.ProjectId, var datalist = ndtLists.GroupBy(r => new { r.ProjectId, r.UnitId, r.ProfessionalName }).Select(g => g.OrderByDescending(r => r.CreateDate).First()).ToList();
UnitId = y.UnitId, foreach (var project in BeUnderConstructionList)
CHT_TotalFilm = x.CHT_TotalFilm, {
CHT_PassFilm = x.CHT_PassFilm decimal a = 0, b = 0;
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), var projectDataList = datalist.Where(x => x.ProjectId == project);
}).ToList(); foreach (var item in projectDataList)
return result; {
if (item.TotalQuantity.HasValue)
{
a += Math.Floor(item.TotalQuantity.Value * Funs.GetNewDecimalOrZero(item.TotalRate) / 100);
b += item.TotalQuantity.Value;
}
}
list.Add(new CHCheckItemOutput
{
Id = project,
ProjectId = project,
//UnitId = y.UnitId,
CHT_TotalFilm = (int)Math.Round(b),
CHT_PassFilm = (int)Math.Round(a)
});
}
}
return list;
} }
/// <summary> /// <summary>
/// 获取焊接检查信息(异步) /// 获取焊接检查信息(异步)
@ -479,5 +760,25 @@ namespace BLL
{ {
return await Task.Run(GetCHCheckItem); return await Task.Run(GetCHCheckItem);
} }
/// <summary>
/// 获取项目焊接信息
/// </summary>
/// <returns></returns>
public static List<Project_HJGLData_HJGL> GetProjectHJGLData()
{
var result = (from x in Funs.DB.Project_HJGLData_HJGL
where BeUnderConstructionList.Contains(x.ProjectId) && x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
select x).ToList();
return result;
}
/// <summary>
/// 获取项目焊接信息(异步)
/// </summary>
/// <returns></returns>
public static async Task<List<Project_HJGLData_HJGL>> GetProjectHJGLDataAsync()
{
return await Task.Run(GetProjectHJGLData);
}
} }
} }

View File

@ -544,116 +544,6 @@ namespace BLL
return result; return result;
} }
public static HSSEData StatisticalData()
{
var thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit();
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
Project_HSSEData_HiddenDangerDetailService.StatisticalAllProjectData();
var totalEnergyConsumption = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
var incomeComprehensiveEnergyConsumption =
ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
var newWaterConsumption = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
var table = new HSSEData_HSSE
{
UnitId = thisUnitId,
CollCropCode = baseUnit.CollCropCode,
UnitName = baseUnit.UnitName,
ReportDate = DateTime.Now.Date,
BeUnderConstructionNum = GetBeUnderConstruction().Count,
ShutdownNum = GetShutdown().Count,
JoinConstructionPersonNum = GetJoinConstructionPerson().Count,
MajorProjectsUnderConstructionNum = GetMajorProjectsUnderConstruction().Count,
TotalWorkingHour = GetTotalWorkingHour(),
LostWorkingHour = GetLostWorkingHour(),
SafeWorkingHour = GetSafeWorkingHour(),
SafeTrainNum = GetSafeTrain().Sum(x => x.TrainPersonNum) + GetBoShengSafeTrain().Sum(x => x.TrainPersonNum),
SpecialTrainNum = GetSpecialTrain().Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = GetSpecialOperationTrain().Sum(x => x.TrainPersonNum),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = totalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
NewWaterConsumption = newWaterConsumption,
HeadOfficeInspectorGeneralNum = GetHeadOfficeInspectorGeneral().Count,
HeadOfficeFullTimeNum = GetHeadOfficeFullTime().Count,
BranchInspectorGeneralNum = GetBranchInspectorGeneral().Count,
BranchFullTimeNum = GetBranchFullTime().Count,
ProjectInspectorGeneralNum = GetProjectInspectorGeneral().Count,
ProjectFullTimeNum = GetProjectFullTime().Count,
ProjectSafetyMonitorNum = GetProjectSafetyMonitor().Count,
SafetyInjectionEngineer = GetSafetyInjectionEngineer().Count,
CertificateANum = GetCertificateA().Count,
CertificateBNum = GetCertificateB().Count,
CertificateCNum = GetCertificateC().Count,
SafetyCommitteeMeetingNum = GetSafetyCommitteeMeeting().Count,
EnterpriseTopicsMeetingNum = GetEnterpriseTopicsMeeting().Count,
ProjectSafetyLeadingGroupMeetingNum = GetProjectSafetyLeadingGroupMeeting().Count,
ProjectSafetyMeetingNum = GetProjectSafetyMeeting().Count,
CompanyLeadShiftCheckNum = GetCompanyLeadShiftCheck().Count,
CompanyComprehensiveCheckNum = GetCompanyComprehensiveCheck().Count,
CompanySpecialCheckNum = GetCompanySpecialCheck().Count,
ProjectLeadShiftCheckNum = GetProjectLeadShiftCheck().Count,
ProjectSpecialCheckNum = GetProjectSpecialCheck().Count,
ProjectMajorCheckNum = GetProjectMajorCheck().Count,
NearMissNum = GetNearMiss().Count,
RecordableEventNum = GetRecordableEvent().Count,
GeneralAccidentNum = GetGeneralAccident().Count,
MajorAccidentNum = GetMajorAccident().Count,
SeriousAccidentNum = GetSeriousAccident().Count,
SpecialSeriousAccidentNum = GetSpecialSeriousAccident().Count,
CompanyComprehensivePlanNum = GetCompanyComprehensivePlan().Count,
CompanySpecialPlanNum = GetCompanySpecialPlan().Count,
CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan().Count,
CompanyDrillNum = GetCompanyDrill().Count,
ProjectComprehensivePlanNum = GetProjectComprehensivePlan().Count,
ProjectSpecialPlanNum = GetProjectSpecialPlan().Count,
ProjectOnSiteDisposalPlan = GetProjectOnSiteDisposalPlan().Count,
ProjectDrillNum = GetProjectDrill().Count,
CostExtract = Convert.ToInt32(GetCostExtract().Sum(x => x.SUMCost)),
CostUse = Convert.ToInt32(GetCostUse().Sum(x => x.SUMCost)),
UseEquipmentNum = GetUseEquipment().Count,
SpecialEquipmentNum = GetSpecialEquipment().Count,
LicensesNum = GetLicenses().Count,
LicensesCloseNum = GetLicensesClose().Count,
GeneralClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.RecNum),
GeneralNotClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.NoRecNum),
MajorClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.RecNum),
MajorNotClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.NoRecNum),
GeneralRiskNum = GetSecurityRiskOutputs().Sum(x => x.GeneralRiskNum),
LowRiskNum = GetSecurityRiskOutputs().Sum(x => x.LowRiskNum),
MediumRiskNum = GetSecurityRiskOutputs().Sum(x => x.MediumRiskNum),
HighRiskNum = GetSecurityRiskOutputs().Sum(x => x.HighRiskNum),
CompletedNum = GetLargeEngineeringOutputs().Sum(x => x.CompletedNum),
TrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.TrainPersonNum),
ConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.ConstructionNum),
FinishedNum = GetLargeEngineeringOutputs().Sum(x => x.FinishedNum),
SuperCompletedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.SuperConstructionNum),
SuperFinishedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperFinishedNum),
CreateMan = Const.sysglyId,
CreateDate = DateTime.Now
};
if (IsReportByToday())
{
table.Id = GetTodayData().Id;
table.State = Const.CNCEC_State_1;
UpdateHSSEData_HSSE(table);
}
else
{
table.Id = SQLHelper.GetNewID();
table.State = Const.CNCEC_State_0;
AddHSSEData_HSSE(table);
}
var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel());
return data;
}
/// <summary> /// <summary>
/// 统计数据(异步) /// 统计数据(异步)
/// </summary> /// </summary>
@ -687,6 +577,7 @@ namespace BLL
var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync(); var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync();
var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync(); var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync();
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync(); var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var safeTrainBoShengTask = HSSEData_HSSEService.GetBoShengSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync(); var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync(); var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
var hseTechnicalTask = HSSEData_HSSEService.GetHseTechnicalAsync(); var hseTechnicalTask = HSSEData_HSSEService.GetHseTechnicalAsync();
@ -754,6 +645,7 @@ namespace BLL
lostWorkingHourTask, lostWorkingHourTask,
safeWorkingHourTask, safeWorkingHourTask,
safeTrainTask, safeTrainTask,
safeTrainBoShengTask,
specialTrainTask, specialTrainTask,
specialOperationTrainTask, hseTechnicalTask, specialOperationTrainTask, hseTechnicalTask,
headOfficeInspectorGeneralTask, headOfficeInspectorGeneralTask,
@ -821,6 +713,7 @@ namespace BLL
var lostWorkingHour = await lostWorkingHourTask; var lostWorkingHour = await lostWorkingHourTask;
var safeWorkingHour = await safeWorkingHourTask; var safeWorkingHour = await safeWorkingHourTask;
var safeTrainList = await safeTrainTask; var safeTrainList = await safeTrainTask;
var safeTrainBoShengList = await safeTrainBoShengTask;
var specialTrainList = await specialTrainTask; var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask; var specialOperationTrainList = await specialOperationTrainTask;
var hseTechnicalList = await hseTechnicalTask; var hseTechnicalList = await hseTechnicalTask;
@ -890,7 +783,7 @@ namespace BLL
TotalWorkingHour = totalWorkingHour, TotalWorkingHour = totalWorkingHour,
LostWorkingHour = lostWorkingHour, LostWorkingHour = lostWorkingHour,
SafeWorkingHour = safeWorkingHour, SafeWorkingHour = safeWorkingHour,
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum), SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum) + safeTrainBoShengList.Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum), SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum), SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum),
HseTechnicalNum = hseTechnicalList.Count(), HseTechnicalNum = hseTechnicalList.Count(),
@ -1037,7 +930,7 @@ namespace BLL
TotalWorkingHour = 0,//工时数据取自集团报表,项目无法提取 TotalWorkingHour = 0,//工时数据取自集团报表,项目无法提取
LostWorkingHour = 0, LostWorkingHour = 0,
SafeWorkingHour = 0, SafeWorkingHour = 0,
SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum) + safeTrainBoShengList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), SpecialTrainNum = specialTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
HseTechnicalNum = hseTechnicalList.Count(x => x.ProjectId == projectid), HseTechnicalNum = hseTechnicalList.Count(x => x.ProjectId == projectid),
@ -1799,17 +1692,22 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<Model.OfSafetySupervisorsOutput> GetQualityPersonNum() public static List<Model.OfSafetySupervisorsOutput> GetQualityPersonNum()
{ {
var result = (from x in Funs.DB.QualityAudit_PersonQuality var result = (from p in Funs.DB.SitePerson_Person
join p in Funs.DB.SitePerson_Person on x.PersonId equals p.PersonId into pGroup
from p in pGroup.DefaultIfEmpty()
join bp in Funs.DB.Base_Project on p.ProjectId equals bp.ProjectId into bpGroup join bp in Funs.DB.Base_Project on p.ProjectId equals bp.ProjectId into bpGroup
from bp in bpGroup.DefaultIfEmpty() from bp in bpGroup.DefaultIfEmpty()
join u in Funs.DB.Base_Unit on p.UnitId equals u.UnitId into uGroup join u in Funs.DB.Base_Unit on p.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty() from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId join q in Funs.DB.QualityAudit_PersonQuality on p.PersonId equals q.PersonId into qGroup
from q in qGroup.DefaultIfEmpty()
join m in Funs.DB.Base_WorkPost on p.WorkPostId equals m.WorkPostId into mGroup join m in Funs.DB.Base_WorkPost on p.WorkPostId equals m.WorkPostId into mGroup
from m in mGroup.DefaultIfEmpty() from m in mGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && p.IsUsed == true && m.PostType == Const.PostType_2 && (x.LimitDate == null || x.LimitDate < DateTime.Now) join su in Funs.DB.Sys_User on q.CompileMan equals su.UserId into suGroup
from su in suGroup.DefaultIfEmpty()
join bc in Funs.DB.Base_Certificate on q.CertificateId equals bc.CertificateId into bcGroup
from bc in bcGroup.DefaultIfEmpty()
join su1 in Funs.DB.Sys_User on q.AuditorId equals su1.UserId into su1Group
from su1 in su1Group.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && m.PostType == Const.PostType_2 && p.IsUsed == true
select new Model.OfSafetySupervisorsOutput select new Model.OfSafetySupervisorsOutput
{ {
ProjectId = p.ProjectId, ProjectId = p.ProjectId,
@ -1824,6 +1722,7 @@ namespace BLL
}).ToList(); }).ToList();
return result; return result;
} }
/// <summary> /// <summary>
/// 获取在岗特种作业人员数量(异步) /// 获取在岗特种作业人员数量(异步)
/// </summary> /// </summary>
@ -3213,7 +3112,7 @@ namespace BLL
var result = (from x in Funs.DB.Bo_Sheng_Train var result = (from x in Funs.DB.Bo_Sheng_Train
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty() from p in pGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && (x.TrainType == "入场(厂)培训" || x.TrainType == "入厂(场)级培训") where BeUnderConstructionList.Contains(p.ProjectId) && (x.TrainType.Contains("入场") || x.TrainType.Contains("入厂"))
&& (x.DeleteTag == "False" || x.DeleteTag == null) && x.TrainStartDate > Const.DtmarkTime && (x.DeleteTag == "False" || x.DeleteTag == null) && x.TrainStartDate > Const.DtmarkTime
select new Model.EduTrainOutput() select new Model.EduTrainOutput()
{ {
@ -3703,6 +3602,61 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<Model.ConstructionEquipmentOutput> GetUseEquipment() public static List<Model.ConstructionEquipmentOutput> GetUseEquipment()
{ {
var query = (from item in Funs.DB.QualityAudit_EquipmentQuality
//join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into eqGroup
//from eq in eqGroup.DefaultIfEmpty()
//join spe in Funs.DB.Base_SpecialEquipment on item.SpecialEquipmentId equals spe.SpecialEquipmentId into speGroup
//from spe in speGroup.DefaultIfEmpty()
join p in Funs.DB.Base_Project on item.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join unit in Funs.DB.Base_Unit on item.UnitId equals unit.UnitId into unitGroup
from unit in unitGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(item.ProjectId)
select new ConstructionEquipmentOutput
{
Id = item.EquipmentQualityId,
ProjectId = item.ProjectId,
//ProjectCode = p.ProjectCode,
ProjectName = p.ProjectName,
//UnitId = item.UnitId,
UnitName = unit.UnitName,
SpecialEquipmentName = item.EquipmentQualityName,
//SizeModel = item.SizeModel,
CertificateNum = item.CertificateCode,
CompileDate = item.CompileDate,
EQType = "特种设备"
})
.Union(
from item in Funs.DB.QualityAudit_GeneralEquipmentQuality
join eq in Funs.DB.Base_SpecialEquipment on item.GeneralEquipmentQualityId equals eq.SpecialEquipmentId into eqGroup
from eq in eqGroup.DefaultIfEmpty()
//join spe in Funs.DB.Base_SpecialEquipment on item.SpecialEquipmentId equals spe.SpecialEquipmentId into speGroup
//from spe in speGroup.DefaultIfEmpty()
join p in Funs.DB.Base_Project on item.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join unit in Funs.DB.Base_Unit on item.UnitId equals unit.UnitId into unitGroup
from unit in unitGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(item.ProjectId)
select new ConstructionEquipmentOutput
{
Id = item.GeneralEquipmentQualityId,
ProjectId = item.ProjectId,
// ProjectCode = p.ProjectCode,
ProjectName = p.ProjectName,
// UnitId = item.UnitId,
UnitName = unit.UnitName,
// SpecialEquipmentId = item.SpecialEquipmentId,
SpecialEquipmentName = eq.SpecialEquipmentName,
//SizeModel = eq.SizeModel,
//OwnerCheck = item.OwnerCheck,
CertificateNum = item.GeneralEquipmentQualityCode,
//IsUsed = item.IsUsed,
CompileDate = item.CompileDate,
EQType = "一般设备"
}
);
/*
var query = (from item in Funs.DB.InApproveManager_EquipmentInItem var query = (from item in Funs.DB.InApproveManager_EquipmentInItem
join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into eqGroup join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into eqGroup
from eq in eqGroup.DefaultIfEmpty() from eq in eqGroup.DefaultIfEmpty()
@ -3759,6 +3713,7 @@ namespace BLL
EQType = "一般设备" EQType = "一般设备"
} }
); );
*/
return query.ToList(); return query.ToList();
} }
@ -3775,6 +3730,31 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<Model.ConstructionEquipmentOutput> GetSpecialEquipment() public static List<Model.ConstructionEquipmentOutput> GetSpecialEquipment()
{ {
var query = (from item in Funs.DB.QualityAudit_EquipmentQuality
//join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into eqGroup
//from eq in eqGroup.DefaultIfEmpty()
//join spe in Funs.DB.Base_SpecialEquipment on item.SpecialEquipmentId equals spe.SpecialEquipmentId into speGroup
//from spe in speGroup.DefaultIfEmpty()
join p in Funs.DB.Base_Project on item.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join unit in Funs.DB.Base_Unit on item.UnitId equals unit.UnitId into unitGroup
from unit in unitGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(item.ProjectId)
select new ConstructionEquipmentOutput
{
Id = item.EquipmentQualityId,
ProjectId = item.ProjectId,
//ProjectCode = p.ProjectCode,
ProjectName = p.ProjectName,
//UnitId = item.UnitId,
UnitName = unit.UnitName,
SpecialEquipmentName = item.EquipmentQualityName,
SizeModel = item.SizeModel,
CertificateNum = item.CertificateCode,
CompileDate = item.CompileDate,
EQType = "特种设备"
});
/*
var query = (from item in Funs.DB.InApproveManager_EquipmentInItem var query = (from item in Funs.DB.InApproveManager_EquipmentInItem
join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into join eq in Funs.DB.InApproveManager_EquipmentIn on item.EquipmentInId equals eq.EquipmentInId into
eqGroup eqGroup
@ -3804,6 +3784,7 @@ namespace BLL
CompileDate = eq.CompileDate, CompileDate = eq.CompileDate,
EQType = "特种设备" EQType = "特种设备"
}); });
*/
return query.ToList(); return query.ToList();
} }
public static async Task<List<Model.ConstructionEquipmentOutput>> GetSpecialEquipmentAsync() public static async Task<List<Model.ConstructionEquipmentOutput>> GetSpecialEquipmentAsync()
@ -3895,7 +3876,7 @@ namespace BLL
var query = (from x in Funs.DB.Base_Project var query = (from x in Funs.DB.Base_Project
join y in Funs.DB.HSSE_Hazard_HazardRegister on x.ProjectId equals y.ProjectId into yGroup join y in Funs.DB.HSSE_Hazard_HazardRegister on x.ProjectId equals y.ProjectId into yGroup
from y in yGroup.DefaultIfEmpty() from y in yGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "1" && y.Risk_Level == "一般" && y.CheckTime > Const.DtmarkTime where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "1" && y.Risk_Level == "一般事故隐患" && y.CheckTime > Const.DtmarkTime
group y by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg group y by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg
select new HiddenRectificationOutput select new HiddenRectificationOutput
{ {
@ -3930,7 +3911,7 @@ namespace BLL
var query = (from x in Funs.DB.Base_Project var query = (from x in Funs.DB.Base_Project
join y in Funs.DB.HSSE_Hazard_HazardRegister on x.ProjectId equals y.ProjectId into yGroup join y in Funs.DB.HSSE_Hazard_HazardRegister on x.ProjectId equals y.ProjectId into yGroup
from y in yGroup.DefaultIfEmpty() from y in yGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "1" && y.Risk_Level == "重大" && y.CheckTime > Const.DtmarkTime where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "1" && y.Risk_Level == "重大事故隐患" && y.CheckTime > Const.DtmarkTime
group y by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg group y by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg
select new HiddenRectificationOutput select new HiddenRectificationOutput
{ {

View File

@ -86,8 +86,6 @@ namespace BLL
{ {
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
}
var table = new Project_HJGLData_Defect var table = new Project_HJGLData_Defect
{ {
Id = newtable.Id, Id = newtable.Id,
@ -102,15 +100,16 @@ namespace BLL
db.Project_HJGLData_Defect.InsertOnSubmit(table); db.Project_HJGLData_Defect.InsertOnSubmit(table);
db.SubmitChanges(); db.SubmitChanges();
} }
}
public static void AddBulkProject_HJGLData_Defect(List<Project_HJGLData_Defect> newtables) public static void AddBulkProject_HJGLData_Defect(List<Project_HJGLData_Defect> newtables)
{ {
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
}
db.Project_HJGLData_Defect.InsertAllOnSubmit(newtables); db.Project_HJGLData_Defect.InsertAllOnSubmit(newtables);
db.SubmitChanges(); db.SubmitChanges();
} }
}
public static void UpdateProject_HJGLData_Defect(Project_HJGLData_Defect newtable) public static void UpdateProject_HJGLData_Defect(Project_HJGLData_Defect newtable)
{ {
@ -260,7 +259,8 @@ namespace BLL
{ {
var db = Funs.DB; var db = Funs.DB;
var projectids = ProjectService.GetProjectWorkList().Select(x => x.ProjectId).ToList(); var projectids = HJGLData_HJGLService.BeUnderConstructionList;
//var projectids = ProjectService.GetProjectWorkList().Select(x => x.ProjectId).ToList();
var thisUnitId = string.Empty; var thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit(); var thisUnit = CommonService.GetIsThisUnit();
if (thisUnit != null) thisUnitId = thisUnit.UnitId; if (thisUnit != null) thisUnitId = thisUnit.UnitId;

View File

@ -281,10 +281,11 @@ namespace BLL
} }
if (hJGLDateType == HJGLDateType.NumberOfFilms || hJGLDateType == HJGLDateType.All) if (hJGLDateType == HJGLDateType.NumberOfFilms || hJGLDateType == HJGLDateType.All)
{ {
table.TotalFilmNum = GetTotalFilmNum(projectid); //table.TotalFilmNum = GetTotalFilmNum(projectid);
table.OKFilmNum = GetOKFilmNum(projectid); //table.OKFilmNum = GetOKFilmNum(projectid);
var filmObj = GetFilm(projectid);
table.TotalFilmNum = filmObj.CHT_TotalFilm;
table.OKFilmNum = filmObj.CHT_PassFilm;
} }
if (hJGLDateType == HJGLDateType.DefectAnalysis || hJGLDateType == HJGLDateType.All) if (hJGLDateType == HJGLDateType.DefectAnalysis || hJGLDateType == HJGLDateType.All)
{ {
@ -310,7 +311,10 @@ namespace BLL
{ {
int result = (from x in Funs.DB.BS_Welder int result = (from x in Funs.DB.BS_Welder
where x.ProjectId == projectid && x.WED_IfOnGuard == true where x.ProjectId == projectid && x.WED_IfOnGuard == true
select x).Count(); select x)
.GroupBy(p => p.WED_WorkCode)
.Select(g => g.First())
.Count();
return result; return result;
} }
/// <summary> /// <summary>
@ -320,6 +324,27 @@ namespace BLL
public static int GetTotalDineNum(string projectid) public static int GetTotalDineNum(string projectid)
{ {
int result = 0; int result = 0;
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
where x.ProjectId == projectid
select x;
if (getD1.Count() > 0)
{
foreach (var item in getD1)
{
result += Funs.GetNewIntOrZero(item.TotalWeldQuantity.Split('.')[0]);
}
}
else
{
var getD2 = (from x in Funs.DB.HJGL_FL_Data
where x.ProjectId == projectid
orderby x.CompileDate descending
select x).FirstOrDefault();
if (getD2 != null)
{
result = Funs.GetNewIntOrZero(getD2.TotalWeldQuantity.Split('.')[0]);
}
}
return result; return result;
} }
/// <summary> /// <summary>
@ -329,18 +354,71 @@ namespace BLL
public static int GetCompleteDineNum(string projectid) public static int GetCompleteDineNum(string projectid)
{ {
int result = 0; int result = 0;
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
where x.ProjectId == projectid
select x;
if (getD1.Count() > 0)
{
foreach (var item in getD1)
{
result += Funs.GetNewIntOrZero(item.TotalCompleted.Split('.')[0]);
}
}
else
{
var getD2 = (from x in Funs.DB.HJGL_FL_Data
where x.ProjectId == projectid
orderby x.CompileDate descending
select x).FirstOrDefault();
if (getD2 != null)
{
result = Funs.GetNewIntOrZero(getD2.TotalCompleted.Split('.')[0]);
}
}
return result; return result;
} }
/// <summary>
/// 获取焊接总片数信息数据
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static CHCheckItemOutput GetFilm(string projectid)
{
var result = new CHCheckItemOutput();
var ndtLists = (from x in Funs.DB.ProcessControl_NondestructiveTest_New where x.ProjectId == projectid select x).ToList();
if (ndtLists.Count() > 0)
{
//取每个项目、单位、专业最新的一条数据
var datalist = ndtLists.GroupBy(r => new { r.UnitId, r.ProfessionalName }).Select(g => g.OrderByDescending(r => r.CreateDate).First()).ToList();
decimal a = 0, b = 0;
foreach (var item in datalist)
{
if (item.TotalQuantity.HasValue)
{
a += Math.Floor(item.TotalQuantity.Value * Funs.GetNewDecimalOrZero(item.TotalRate) / 100);
b += item.TotalQuantity.Value;
}
}
result.CHT_TotalFilm = (int)Math.Round(b);
result.CHT_PassFilm = (int)Math.Round(a);
}
return result;
}
/// <summary> /// <summary>
/// 获取总片数 /// 获取总片数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static int GetTotalFilmNum(string projectid) public static int GetTotalFilmNum(string projectid)
{ {
int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem int result = Convert.ToInt32((from x in Funs.DB.ProcessControl_NondestructiveTest_New
join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID where x.ProjectId == projectid && x.ProfessionalName == "工艺管道"
where y.ProjectId == projectid orderby x.CreateDate descending
select x.CHT_TotalFilm).ToList().Sum()); select x.TotalQuantity
).FirstOrDefault());
return result; return result;
} }
/// <summary> /// <summary>
@ -349,10 +427,15 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetOKFilmNum(string projectid) public static int GetOKFilmNum(string projectid)
{ {
int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem int result = 0;
join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID var ndt = (from x in db.ProcessControl_NondestructiveTest_New where x.ProjectId == projectid && x.ProfessionalName == "工艺管道" orderby x.CreateDate descending select x).FirstOrDefault();
where y.ProjectId == projectid if (ndt != null)
select x.CHT_PassFilm).ToList().Sum()); {
if (ndt.TotalQuantity.HasValue)
{
result = Convert.ToInt32(ndt.TotalQuantity.Value * Funs.GetNewDecimalOrZero(ndt.TotalRate) / 100);
}
}
return result; return result;
} }

View File

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using FineUIPro; using FineUIPro;
using Microsoft.SqlServer.Dts.Runtime;
using Model; using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
@ -455,7 +456,7 @@ namespace BLL
if (hSseDateType == HSSEDateType.EducationAndTraining || hSseDateType == HSSEDateType.All) if (hSseDateType == HSSEDateType.EducationAndTraining || hSseDateType == HSSEDateType.All)
{ {
table.SafeTrainNum = GetSafeTrainNum(projectid); table.SafeTrainNum = GetSafeTrainNum(projectid) + GetBoShengSafeTrain(projectid);
table.SpecialTrainNum = GetSpecialTrainNum(projectid); table.SpecialTrainNum = GetSpecialTrainNum(projectid);
table.SpecialOperationTrainNum = GetSpecialOperationTrainNum(projectid); table.SpecialOperationTrainNum = GetSpecialOperationTrainNum(projectid);
} }
@ -748,6 +749,21 @@ namespace BLL
return result; return result;
} }
/// <summary>
/// 获取三级安全教育培训数——博晟培训
/// </summary>
/// <returns></returns>
public static int GetBoShengSafeTrain(string projectid)
{
var result = (from x in Funs.DB.Bo_Sheng_Train
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
where x.ProjectId == projectid && (x.TrainType.Contains("入场") || x.TrainType.Contains("入厂"))
&& (x.DeleteTag == "False" || x.DeleteTag == null) && x.TrainStartDate > Const.DtmarkTime
select x.PersonCount ?? 0).ToList().Sum();
return result;
}
/// <summary> /// <summary>
/// 获取专项培训数 /// 获取专项培训数
/// </summary> /// </summary>
@ -945,7 +961,7 @@ namespace BLL
var result = (from x in Funs.DB.SitePerson_Person var result = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
join m in Funs.DB.Base_WorkPost on x.WorkPostId equals m.WorkPostId join m in Funs.DB.Base_WorkPost on x.WorkPostId equals m.WorkPostId
where x.ProjectId == projectid && m.PostType == Const.PostType_2 && x.IsUsed == true && (y.LimitDate == null || y.LimitDate < DateTime.Now) where x.ProjectId == projectid && m.PostType == Const.PostType_2 && x.IsUsed == true
select x).Count(); select x).Count();
return result; return result;
} }
@ -1318,15 +1334,21 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetUseEquipmentNum(string projectid) public static int GetUseEquipmentNum(string projectid)
{ {
var result = (from x in Funs.DB.InApproveManager_EquipmentInItem var result = (from x in Funs.DB.QualityAudit_EquipmentQuality
join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId where x.ProjectId == projectid
where y.ProjectId == projectid && x.IsUsed == true
select x).Count() + select x).Count() +
(from x in Funs.DB.InApproveManager_GeneralEquipmentInItem (from x in Funs.DB.QualityAudit_GeneralEquipmentQuality
join y in Funs.DB.InApproveManager_GeneralEquipmentIn on x.GeneralEquipmentInId equals y where x.ProjectId == projectid
.GeneralEquipmentInId
where y.ProjectId == projectid && x.IsUsed == true
select x).Count(); select x).Count();
//var result = (from x in Funs.DB.InApproveManager_EquipmentInItem
// join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId
// where y.ProjectId == projectid && x.IsUsed == true
// select x).Count() +
// (from x in Funs.DB.InApproveManager_GeneralEquipmentInItem
// join y in Funs.DB.InApproveManager_GeneralEquipmentIn on x.GeneralEquipmentInId equals y
// .GeneralEquipmentInId
// where y.ProjectId == projectid && x.IsUsed == true
// select x).Count();
return result; return result;
} }
@ -1336,10 +1358,13 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetSpecialEquipmentNum(string projectid) public static int GetSpecialEquipmentNum(string projectid)
{ {
var result = (from x in Funs.DB.InApproveManager_EquipmentInItem var result = (from x in Funs.DB.QualityAudit_EquipmentQuality
join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId where x.ProjectId == projectid
where y.ProjectId == projectid && x.IsUsed == true
select x).Count(); select x).Count();
//var result = (from x in Funs.DB.InApproveManager_EquipmentInItem
// join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId
// where y.ProjectId == projectid && x.IsUsed == true
// select x).Count();
return result; return result;
} }
@ -1375,7 +1400,7 @@ namespace BLL
public static int GetGeneralClosedNum(string projectid) public static int GetGeneralClosedNum(string projectid)
{ {
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.ProjectId == projectid && x.Risk_Level == "一般" && x.States == "3" && where x.ProjectId == projectid && x.Risk_Level == "一般事故隐患" && x.States == "3" &&
x.CheckTime > Const.DtmarkTime x.CheckTime > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@ -1388,7 +1413,7 @@ namespace BLL
public static int GetGeneralNotClosedNum(string projectid) public static int GetGeneralNotClosedNum(string projectid)
{ {
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.ProjectId == projectid && x.Risk_Level == "一般" && x.States != "3" && x.States != "-1" && where x.ProjectId == projectid && x.Risk_Level == "一般事故隐患" && x.States != "3" && x.States != "-1" &&
x.CheckTime > Const.DtmarkTime x.CheckTime > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@ -1401,7 +1426,7 @@ namespace BLL
public static int GetMajorClosedNum(string projectid) public static int GetMajorClosedNum(string projectid)
{ {
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.ProjectId == projectid && x.Risk_Level == "重大" && x.States == "3" && where x.ProjectId == projectid && x.Risk_Level == "重大事故隐患" && x.States == "3" &&
x.CheckTime > Const.DtmarkTime x.CheckTime > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@ -1414,7 +1439,7 @@ namespace BLL
public static int GetMajorNotClosedNum(string projectid) public static int GetMajorNotClosedNum(string projectid)
{ {
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.ProjectId == projectid && x.Risk_Level == "重大" && x.States != "3" && x.States != "-1" && where x.ProjectId == projectid && x.Risk_Level == "重大事故隐患" && x.States != "3" && x.States != "-1" &&
x.CheckTime > Const.DtmarkTime x.CheckTime > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@ -1504,7 +1529,7 @@ namespace BLL
{ {
var result = (from x in Funs.DB.Solution_LargerHazard var result = (from x in Funs.DB.Solution_LargerHazard
where x.ProjectId == projectid && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime where x.ProjectId == projectid && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime
select x.OperativesNum).ToList().Sum(x => x.Value); select x).ToList().Sum(x => x.OperativesNum ?? 0);
return result; return result;
} }
@ -1567,7 +1592,7 @@ namespace BLL
{ {
var result = var result =
(from x in Funs.DB.Solution_LargerHazard (from x in Funs.DB.Solution_LargerHazard
where x.ProjectId == projectid && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime where x.ProjectId == projectid && x.IsSuperLargerHazard == true && x.OperativesNum != null && x.RecordTime > Const.DtmarkTime
select x.OperativesNum).ToList().Sum(x => x.Value); select x.OperativesNum).ToList().Sum(x => x.Value);
return result; return result;
} }
@ -2091,6 +2116,7 @@ namespace BLL
Address = x.Address, Address = x.Address,
Descriptions = x.Descriptions, Descriptions = x.Descriptions,
TrainPersonNum = x.TrainPersonNum, TrainPersonNum = x.TrainPersonNum,
OperativesNum = x.OperativesNum,
RecordTime = x.RecordTime, RecordTime = x.RecordTime,
ExpectedTime = x.ExpectedTime, ExpectedTime = x.ExpectedTime,
States = x.States, States = x.States,

View File

@ -53,6 +53,7 @@ namespace BLL
Address = CompanyBranchPerson.Address, Address = CompanyBranchPerson.Address,
IsOnJob = CompanyBranchPerson.IsOnJob, IsOnJob = CompanyBranchPerson.IsOnJob,
Remark = CompanyBranchPerson.Remark, Remark = CompanyBranchPerson.Remark,
SortIndex = CompanyBranchPerson.SortIndex,
}; };
db.Person_CompanyBranchPerson.InsertOnSubmit(newCompanyBranchPerson); db.Person_CompanyBranchPerson.InsertOnSubmit(newCompanyBranchPerson);
db.SubmitChanges(); db.SubmitChanges();
@ -77,6 +78,7 @@ namespace BLL
newCompanyBranchPerson.Address = CompanyBranchPerson.Address; newCompanyBranchPerson.Address = CompanyBranchPerson.Address;
newCompanyBranchPerson.IsOnJob = CompanyBranchPerson.IsOnJob; newCompanyBranchPerson.IsOnJob = CompanyBranchPerson.IsOnJob;
newCompanyBranchPerson.Remark = CompanyBranchPerson.Remark; newCompanyBranchPerson.Remark = CompanyBranchPerson.Remark;
newCompanyBranchPerson.SortIndex = CompanyBranchPerson.SortIndex;
db.SubmitChanges(); db.SubmitChanges();
} }
} }

View File

@ -94,7 +94,7 @@
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
<f:Window ID="Window1" Title="设计交底管理" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="施工技术交底管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="430px"> Width="900px" Height="430px">
</f:Window> </f:Window>

View File

@ -10,13 +10,16 @@
.f-grid-row.Red { .f-grid-row.Red {
background-color: red; background-color: red;
} }
.f-grid-row.Yellow { .f-grid-row.Yellow {
background-color: yellow; background-color: yellow;
} }
.LabelColor { .LabelColor {
color: Red; color: Red;
font-size: small; font-size: small;
} }
.f-grid-row.Gray { .f-grid-row.Gray {
background-color: gray; background-color: gray;
} }
@ -41,6 +44,12 @@
</f:DropDownList> </f:DropDownList>
<f:DropDownList ID="sdrpPost" runat="server" Label="工种" LabelAlign="Right" LabelWidth="60px"></f:DropDownList> <f:DropDownList ID="sdrpPost" runat="server" Label="工种" LabelAlign="Right" LabelWidth="60px"></f:DropDownList>
<f:TextBox runat="server" ID="stxtPersonName" Label="姓名" LabelAlign="Right" LabelWidth="60px"></f:TextBox> <f:TextBox runat="server" ID="stxtPersonName" Label="姓名" LabelAlign="Right" LabelWidth="60px"></f:TextBox>
<f:RadioButtonList ID="rblOnSite" runat="server" AutoPostBack="true" Width="220px"
OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
<f:RadioItem Value="-1" Text="全部" Selected="true" />
<f:RadioItem Value="1" Text="在场" />
<f:RadioItem Value="0" Text="不在场" />
</f:RadioButtonList>
<f:Button ID="btnSearch" Icon="SystemSearch" <f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询"> EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
</f:Button> </f:Button>
@ -81,6 +90,9 @@
<f:RenderField ColumnID="PersonName" DataField="PersonName" FieldType="String" HeaderText="姓名" TextAlign="Center" <f:RenderField ColumnID="PersonName" DataField="PersonName" FieldType="String" HeaderText="姓名" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="IsOnSiteStr" DataField="IsOnSiteStr" FieldType="String" HeaderText="是否在场" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
</f:RenderField>
<f:RenderField ColumnID="CertificateNumber" DataField="CertificateNumber" FieldType="String" HeaderText="证书编号" TextAlign="Center" <f:RenderField ColumnID="CertificateNumber" DataField="CertificateNumber" FieldType="String" HeaderText="证书编号" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>

View File

@ -35,7 +35,7 @@ namespace FineUIPro.Web.Comprehensive
string strSql = @"select InspectionPersonId, InspectionPersonCode, PersonName, Status, string strSql = @"select InspectionPersonId, InspectionPersonCode, PersonName, Status,
CertificateNumber, QualifiedProjectCode, ValidityDate, ApprovalTime, CertificateNumber, QualifiedProjectCode, ValidityDate, ApprovalTime,
DepartureTime, AttachUrl,CompileMan, CompileDate, DepartureTime, AttachUrl,CompileMan, CompileDate,
IsOnSite, UnitWorkId,U.UnitName,CN.ProfessionalName ,P.PostName,C.RemarkCode IsOnSite, (case C.IsOnSite when '1' then '是' else '否' end) as IsOnSiteStr,UnitWorkId,U.UnitName,CN.ProfessionalName ,P.PostName,C.RemarkCode
from Comprehensive_InspectionPerson C from Comprehensive_InspectionPerson C
left join Base_Unit U on C.UnitId=U.UnitId left join Base_Unit U on C.UnitId=U.UnitId
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
@ -58,6 +58,13 @@ namespace FineUIPro.Web.Comprehensive
strSql += " AND PersonName like @PersonName"; strSql += " AND PersonName like @PersonName";
listStr.Add(new SqlParameter("@PersonName", "%" + this.stxtPersonName.Text.Trim() + "%")); listStr.Add(new SqlParameter("@PersonName", "%" + this.stxtPersonName.Text.Trim() + "%"));
} }
int OnSite = int.Parse(this.rblOnSite.SelectedValue);
if (OnSite > -1)
{
strSql += " AND C.IsOnSite=@IsOnSite";
listStr.Add(new SqlParameter("@IsOnSite", OnSite));
}
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count; Grid1.RecordCount = tb.Rows.Count;
@ -113,6 +120,15 @@ namespace FineUIPro.Web.Comprehensive
{ {
BindGrid(); BindGrid();
} }
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion #endregion
#region #region

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class InspectionPerson { public partial class InspectionPerson
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -84,6 +86,15 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox stxtPersonName; protected global::FineUIPro.TextBox stxtPersonName;
/// <summary>
/// rblOnSite 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblOnSite;
/// <summary> /// <summary>
/// btnSearch 控件。 /// btnSearch 控件。
/// </summary> /// </summary>

View File

@ -578,7 +578,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
if (tempData.Value6.Trim() == "焊工") if (tempData.Value6.Trim() == "焊工")
{ {
Model.BS_Welder welder = new Model.BS_Welder(); var welder = PersonManageService.GetBSWelderByProjectIdUnitIdAndWED_Code(this.CurrUser.LoginProjectId, Ins.UnitId, tempData.Value2.Trim());
if (welder == null)
{
welder = new Model.BS_Welder();
welder.WED_Unit = Ins.UnitId; welder.WED_Unit = Ins.UnitId;
welder.WED_Name = Ins.PersonName; welder.WED_Name = Ins.PersonName;
welder.WED_Code = tempData.Value2.Trim(); welder.WED_Code = tempData.Value2.Trim();
@ -593,6 +596,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// 焊工部分 // 焊工部分
BLL.PersonManageService.AddBSWelder(welder); BLL.PersonManageService.AddBSWelder(welder);
} }
else
{
welder.WED_Unit = Ins.UnitId;
welder.WED_Name = Ins.PersonName;
welder.WED_Code = tempData.Value2.Trim();
welder.LimitDate = Ins.ValidityDate;
welder.LeaveDate = Ins.DepartureTime; // Convert.ToDateTime(this.txtDepartureTime.Text.ToString());
welder.PostDate = Ins.ApprovalTime;// Convert.ToDateTime(this.txtApprovalTime.Text.ToString());
welder.WED_WorkCode = Ins.CertificateNumber;// this.txtCertificateNumber.Text.Trim();
welder.WED_Class = Ins.QualifiedProjectCode;// this.txtQualifiedProjectCode.Text.Trim();
welder.WED_IfOnGuard = Ins.IsOnSite;
welder.WED_Remark = Ins.Remark;
welder.ProjectId = this.CurrUser.LoginProjectId;
// 焊工部分
BLL.PersonManageService.UpdateBSWelder(welder);
}
}
} }
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId); BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
okCount++; okCount++;

View File

@ -81,6 +81,7 @@
<f:ListItem Text="作业中" Value="2"/> <f:ListItem Text="作业中" Value="2"/>
<f:ListItem Text="已关闭" Value="3"/> <f:ListItem Text="已关闭" Value="3"/>
</f:DropDownList> </f:DropDownList>
<f:NumberBox runat="server" ID="txtOperativesNum" NoDecimal="true" NoNegative="true" Label="作业人员数" LabelWidth="130px"></f:NumberBox>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>

View File

@ -89,6 +89,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.AttachUrl6.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../../", getUrl(this.MajorPlanApprovalId + "_6")); this.AttachUrl6.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../../", getUrl(this.MajorPlanApprovalId + "_6"));
this.txtTrainPersonNum.Text = majorPlanApproval.TrainPersonNum.HasValue ? majorPlanApproval.TrainPersonNum.ToString() : ""; this.txtTrainPersonNum.Text = majorPlanApproval.TrainPersonNum.HasValue ? majorPlanApproval.TrainPersonNum.ToString() : "";
this.txtOperativesNum.Text = majorPlanApproval.OperativesNum.HasValue ? majorPlanApproval.OperativesNum.ToString() : "";
this.txtAuditMan.Text = majorPlanApproval.AuditMan; this.txtAuditMan.Text = majorPlanApproval.AuditMan;
this.txtApprovalMan.Text = majorPlanApproval.ApprovalMan; this.txtApprovalMan.Text = majorPlanApproval.ApprovalMan;
//this.txtImplementationDeviation.Text = majorPlanApproval.ImplementationDeviation; //this.txtImplementationDeviation.Text = majorPlanApproval.ImplementationDeviation;
@ -155,7 +156,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
majorPlanApproval.States = this.drpStates.SelectedValue; majorPlanApproval.States = this.drpStates.SelectedValue;
} }
majorPlanApproval.TrainPersonNum = Funs.GetNewInt(this.txtTrainPersonNum.Text.Trim()); majorPlanApproval.TrainPersonNum = Funs.GetNewInt(this.txtTrainPersonNum.Text.Trim());
majorPlanApproval.OperativesNum = Funs.GetNewInt(this.txtOperativesNum.Text.Trim());
if (this.drpSchemeType.SelectedValue == "超危大工程" && this.drpStates.SelectedValue != "1") if (this.drpSchemeType.SelectedValue == "超危大工程" && this.drpStates.SelectedValue != "1")
{ {

View File

@ -194,6 +194,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpStates; protected global::FineUIPro.DropDownList drpStates;
/// <summary>
/// txtOperativesNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtOperativesNum;
/// <summary> /// <summary>
/// Panel2 控件。 /// Panel2 控件。
/// </summary> /// </summary>

View File

@ -13,7 +13,7 @@
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="图纸收发记录" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="图纸会审管理" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true" runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true"
SortField="RemarkCode" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" SortField="RemarkCode" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"> EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">

View File

@ -31,7 +31,9 @@
<f:Tree ID="trWBS" EnableCollapse="true" ShowHeader="true" OnNodeCheck="trWBS_NodeCheck" OnlyLeafCheck="true" <f:Tree ID="trWBS" EnableCollapse="true" ShowHeader="true" OnNodeCheck="trWBS_NodeCheck" OnlyLeafCheck="true"
OnNodeCommand="trWBS_NodeCommand" OnNodeExpand="trWBS_NodeExpand" AutoLeafIdentification="true" OnNodeCommand="trWBS_NodeCommand" OnNodeExpand="trWBS_NodeExpand" AutoLeafIdentification="true"
runat="server"> runat="server">
<Listeners>
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
</Listeners>
</f:Tree> </f:Tree>
<f:HiddenField runat="server" ID="hdSelectId"> <f:HiddenField runat="server" ID="hdSelectId">
</f:HiddenField> </f:HiddenField>
@ -95,7 +97,9 @@
</f:RenderField> </f:RenderField>
<f:LinkButtonField HeaderText="附件" ColumnID="download" Width="40px" Text="附件" CommandName="download" /> <f:LinkButtonField HeaderText="附件" ColumnID="download" Width="40px" Text="附件" CommandName="download" />
</Columns> </Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems> <PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"> <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
</f:ToolbarSeparator> </f:ToolbarSeparator>
@ -113,18 +117,68 @@
</Items> </Items>
</f:Panel> </f:Panel>
<f:Window ID="Window1" Title="编辑" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Self" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="800px" Height="300px">
</f:Window>
<f:Window ID="Window3" Title="编辑" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Self" EnableResize="false" runat="server" OnClose="Window3_Close" IsModal="true"
Width="1000px" Height="600px">
</f:Window>
<f:Window ID="Windowtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Windowtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px"> Height="500px">
</f:Window> </f:Window>
<f:Menu ID="Menu1" runat="server">
<%-- <f:MenuButton ID="btnMenuAdd" OnClick="btnMenuAdd_Click" EnablePostBack="true" runat="server" Hidden="true" Icon="Add"
Text="增加">
</f:MenuButton>--%>
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Hidden="true" Icon="Pencil"
runat="server" Text="修改">
</f:MenuButton>
<%--<f:MenuButton ID="btnMenuCopy" OnClick="btnMenuCopy_Click" EnablePostBack="true" Icon="PageCopy"
runat="server" Text="复制">
</f:MenuButton>
<f:MenuButton ID="btnMenuPaste" OnClick="btnMenuPaste_Click" EnablePostBack="true" Icon="PagePaste"
runat="server" Text="粘贴">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Hidden="true" Icon="Delete"
ConfirmText="确认删除选中项?" ConfirmTarget="Top" runat="server" Text="删除">
</f:MenuButton>--%>
</f:Menu>
<f:Menu ID="Menu2" runat="server">
<Items>
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
OnClick="btnMenuModify_Click">
</f:MenuButton>
<%--<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click">
</f:MenuButton>--%>
</Items>
</f:Menu>
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
var treeID = '<%= trWBS.ClientID %>'; var treeID = '<%= trWBS.ClientID %>';
var menuID = '<%= Menu1.ClientID %>';
var menuID2 = '<%= Menu2.ClientID %>';
// 保存当前菜单对应的树节点ID // 保存当前菜单对应的树节点ID
var currentNodeId; var currentNodeId;
// 返回false来阻止浏览器右键菜单
function onTreeNodeContextMenu(event, nodeId) {
currentNodeId = nodeId;
F(menuID).show();
return false;
}
// 设置所有菜单项的禁用状态
function setMenuItemsDisabled(disabled) {
var menu = F(menuID);
$.each(menu.items, function (index, item) {
item.setDisabled(disabled);
});
}
// 显示菜单后,检查是否禁用菜单项 // 显示菜单后,检查是否禁用菜单项
function onMenuShow() { function onMenuShow() {

View File

@ -240,7 +240,8 @@ namespace FineUIPro.Web.CQMS.WBS
orderby x.SortIndex orderby x.SortIndex
select x).ToList(); select x).ToList();
foreach (var q in childDivisions) foreach (var q in childDivisions)
{if (q.IsSelected == true) {
if (q.IsSelected == true)
{ {
TreeNode newNode = new TreeNode(); TreeNode newNode = new TreeNode();
newNode.Text = q.DivisionName; newNode.Text = q.DivisionName;
@ -1006,8 +1007,82 @@ namespace FineUIPro.Web.CQMS.WBS
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
this.btnMenuModify.Hidden = false;
}
} }
} }
#endregion #endregion
#region
/// <summary>
/// 右键修改事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (this.trWBS.SelectedNode != null)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnModify))
{
if (this.trWBS.SelectedNode.CommandName != "ProjectType" && this.trWBS.SelectedNode.CommandName != "UnitWork" && this.trWBS.SelectedNode.CommandName != "CNProfessional") //非工程类型和单位工程、专业节点可以修改
{
this.hdSelectId.Text = this.trWBS.SelectedNode.NodeID;
string unitWorkId = this.GetUnitWorkId(this.trWBS.SelectedNode);
string openUrl = String.Format("EditDivisionProject.aspx?type=modify&selectedCode={0}&unitWorkId={1}", this.trWBS.SelectedNode.NodeID, unitWorkId, "编辑 - ");
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdSelectId.ClientID)
+ Window1.GetShowReference(openUrl));
}
else
{
Alert.ShowInTop("单位工程、工程类型和专业节点无法修改!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("请选择树节点!", MessageBoxIcon.Warning);
}
}
#endregion
#region Grid双击事件
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
btnMenuModify_Click(null, null);
}
#endregion
#region
/// <summary>
/// 编辑按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuModify_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("EditBreakdownProject.aspx?type=modify&breakdownProjectId={0}&divisionProjectId={1}", this.Grid1.SelectedRowID, this.trWBS.SelectedNodeID, "新增 - ")));
}
#endregion
} }
} }

View File

@ -122,6 +122,24 @@ namespace FineUIPro.Web.CQMS.WBS
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize; protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window3;
/// <summary> /// <summary>
/// Windowtt 控件。 /// Windowtt 控件。
/// </summary> /// </summary>
@ -130,5 +148,41 @@ namespace FineUIPro.Web.CQMS.WBS
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Window Windowtt; protected global::FineUIPro.Window Windowtt;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// Menu2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu2;
/// <summary>
/// btnMenuModify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuModify;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

View File

@ -557,5 +557,24 @@ namespace FineUIPro.Web.HSSE.Technique
} }
} }
#endregion #endregion
/// <summary>
/// 从集团获取
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnGet_Click(object sender, EventArgs e)
{
var returnValue = CNCECHSSEWebService.getTechnique_RectifyList();
if (returnValue.code == 1)
{
ShowNotify(returnValue.message, MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop(returnValue.message, MessageBoxIcon.Success);
}
}
} }
} }

View File

@ -16,7 +16,7 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="企业总部人员" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="企业总部人员" EnableCollapse="true"
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CompanyBranchPersonId" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CompanyBranchPersonId"
DataIDField="CompanyBranchPersonId" AllowSorting="true" ForceFit="true" DataIDField="CompanyBranchPersonId" AllowSorting="true" ForceFit="true"
SortField="PersonName" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" SortField="SortIndex" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"> EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars> <Toolbars>

View File

@ -40,7 +40,7 @@ namespace FineUIPro.Web.ZHGL.Person
/// </summary> /// </summary>
private void BindGrid() private void BindGrid()
{ {
string strSql = @"SELECT CompanyBranchPerson.CompanyBranchPersonId,CompanyBranchPerson.PersonName,case CompanyBranchPerson.Sex when '1' then '男' else '女' end as SexStr,CompanyBranchPerson.IdentityCard,WorkPost.WorkPostName,CompanyBranchPerson.Telephone,CompanyBranchPerson.IsOnJob,CompanyBranchPerson.Remark " string strSql = @"SELECT CompanyBranchPerson.CompanyBranchPersonId,CompanyBranchPerson.PersonName,SortIndex,case CompanyBranchPerson.Sex when '1' then '男' else '女' end as SexStr,CompanyBranchPerson.IdentityCard,WorkPost.WorkPostName,CompanyBranchPerson.Telephone,CompanyBranchPerson.IsOnJob,CompanyBranchPerson.Remark "
+ @" FROM Person_CompanyBranchPerson AS CompanyBranchPerson " + @" FROM Person_CompanyBranchPerson AS CompanyBranchPerson "
+ @" LEFT JOIN Base_WorkPost AS WorkPost ON CompanyBranchPerson.WorkPostId=WorkPost.WorkPostId WHERE 1=1 "; + @" LEFT JOIN Base_WorkPost AS WorkPost ON CompanyBranchPerson.WorkPostId=WorkPost.WorkPostId WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();

View File

@ -43,11 +43,16 @@
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:RadioButtonList ID="rblIsOnJob" runat="server" Label="在职" LabelAlign="Right" Required="True" ShowRedStar="True"> <f:RadioButtonList ID="rblIsOnJob" runat="server" Label="在职" LabelAlign="Right" Required="True" ShowRedStar="True" LabelWidth="90px">
<f:RadioItem Value="True" Text="是" Selected="true" /> <f:RadioItem Value="True" Text="是" Selected="true" />
<f:RadioItem Value="False" Text="否" /> <f:RadioItem Value="False" Text="否" />
</f:RadioButtonList> </f:RadioButtonList>
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="500" LabelAlign="Right" > <f:NumberBox ID="txtSortIndex" runat="server" Label="排序" LabelAlign="Right" Required="true" ShowRedStar="true" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="500" LabelAlign="Right" LabelWidth="90px">
</f:TextBox> </f:TextBox>
</Items> </Items>
</f:FormRow> </f:FormRow>

View File

@ -5,6 +5,7 @@ using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using BLL; using BLL;
using FineUIPro.Web.Comprehensive;
namespace FineUIPro.Web.ZHGL.Person namespace FineUIPro.Web.ZHGL.Person
{ {
@ -83,6 +84,7 @@ namespace FineUIPro.Web.ZHGL.Person
this.rblIsOnJob.SelectedValue = "False"; this.rblIsOnJob.SelectedValue = "False";
} }
this.txtRemark.Text = CompanyBranchPerson.Remark; this.txtRemark.Text = CompanyBranchPerson.Remark;
this.txtSortIndex.Text = CompanyBranchPerson.SortIndex.HasValue ? CompanyBranchPerson.SortIndex.ToString() : "";
} }
} }
} }
@ -116,6 +118,7 @@ namespace FineUIPro.Web.ZHGL.Person
IsOnJob = Convert.ToBoolean(this.rblIsOnJob.SelectedValue), IsOnJob = Convert.ToBoolean(this.rblIsOnJob.SelectedValue),
Remark = this.txtRemark.Text.Trim() Remark = this.txtRemark.Text.Trim()
}; };
newCompanyBranchPerson.SortIndex = Funs.GetNewInt(this.txtSortIndex.Text.Trim());
if (this.drpWorkPost.SelectedValue != Const._Null) if (this.drpWorkPost.SelectedValue != Const._Null)
{ {
newCompanyBranchPerson.WorkPostId = this.drpWorkPost.SelectedValue; newCompanyBranchPerson.WorkPostId = this.drpWorkPost.SelectedValue;

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.ZHGL.Person { namespace FineUIPro.Web.ZHGL.Person
{
public partial class CompanyPersonEdit { public partial class CompanyPersonEdit
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -102,6 +104,15 @@ namespace FineUIPro.Web.ZHGL.Person {
/// </remarks> /// </remarks>
protected global::FineUIPro.RadioButtonList rblIsOnJob; protected global::FineUIPro.RadioButtonList rblIsOnJob;
/// <summary>
/// txtSortIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSortIndex;
/// <summary> /// <summary>
/// txtRemark 控件。 /// txtRemark 控件。
/// </summary> /// </summary>

View File

@ -288,13 +288,13 @@ namespace FineUIPro.Web.ZHGL.Supervise
} }
} }
if (string.IsNullOrEmpty(CurrUser.LoginProjectId)) //if (string.IsNullOrEmpty(CurrUser.LoginProjectId))
{ //{
btnDelete.Hidden = true; // btnDelete.Hidden = true;
btnEdit.Hidden = true; // btnEdit.Hidden = true;
btnMenuDelete.Hidden = true; // btnMenuDelete.Hidden = true;
btnMenuEdit.Hidden = true; // btnMenuEdit.Hidden = true;
} //}
} }
#endregion #endregion

View File

@ -526,6 +526,35 @@
fontSize: 10, fontSize: 10,
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -541,6 +570,7 @@
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
}, },
interval: 0, interval: 0,
rotate: -15,
formatter: function (value) { formatter: function (value) {
var ret = "";//拼接加\n返回的类目项 var ret = "";//拼接加\n返回的类目项
var maxLength = num;//每项显示文字个数 var maxLength = num;//每项显示文字个数
@ -590,7 +620,6 @@
top: '20%', top: '20%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%',
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'
@ -675,6 +704,35 @@
fontSize: '10' fontSize: '10'
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
yAxisIndex: [0],
left: 0, width: 10, height: '100%',
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
yAxis: { yAxis: {
axisTick: { axisTick: {
show: false show: false
@ -793,6 +851,35 @@
color: '#ffffff' color: '#ffffff'
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -808,6 +895,7 @@
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
}, },
interval: 0, interval: 0,
rotate: -15,
formatter: function (value) { formatter: function (value) {
var ret = "";//拼接加\n返回的类目项 var ret = "";//拼接加\n返回的类目项
var maxLength = 5;//每项显示文字个数 var maxLength = 5;//每项显示文字个数
@ -856,7 +944,7 @@
top: '15%', top: '15%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%', bottom: 28,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'

View File

@ -395,6 +395,35 @@
show: true show: true
}, },
tooltip: {}, tooltip: {},
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
legend: { legend: {
left: '10%', left: '10%',
show: true, show: true,
@ -418,6 +447,7 @@
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
}, },
interval: 0, interval: 0,
rotate: -15,
formatter: function (value) { formatter: function (value) {
var ret = "";//拼接加\n返回的类目项 var ret = "";//拼接加\n返回的类目项
var maxLength = num;//每项显示文字个数 var maxLength = num;//每项显示文字个数
@ -467,7 +497,7 @@
top: '20%', top: '20%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%', bottom: 40,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'
@ -527,6 +557,35 @@
//data: ['销量'], //data: ['销量'],
show: false show: false
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -536,7 +595,10 @@
color: 'rgba(255, 255, 255, 0.3)' color: 'rgba(255, 255, 255, 0.3)'
} }
}, },
axisLabel: { axisLabel: {
interval: 0, // 坐标轴刻度标签的显示间隔
rotate: -15, // 标签倾斜的角度
show: true, show: true,
textStyle: { textStyle: {
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
@ -593,7 +655,7 @@
top: '25%', top: '25%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%', bottom: 40,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'

View File

@ -412,6 +412,35 @@ var basePath = '<%= ResolveUrl("~/") %>';
legend: { legend: {
show: false show: false
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -423,7 +452,8 @@ var basePath = '<%= ResolveUrl("~/") %>';
}, },
axisLabel: { axisLabel: {
show: true, show: true,
/*interval: 0,*/ interval: 0,
rotate: -15,
textStyle: { textStyle: {
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
} }
@ -453,7 +483,7 @@ var basePath = '<%= ResolveUrl("~/") %>';
top: '15%', top: '15%',
left: '10', left: '10',
right: '10', right: '10',
bottom: '0%', bottom: 30,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'
@ -546,7 +576,7 @@ var basePath = '<%= ResolveUrl("~/") %>';
top: '15%', top: '15%',
left: '10', left: '10',
right: '10', right: '10',
bottom: '0%', bottom: 30,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'
@ -600,6 +630,35 @@ var basePath = '<%= ResolveUrl("~/") %>';
fontSize: 10, fontSize: 10,
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -612,6 +671,7 @@ var basePath = '<%= ResolveUrl("~/") %>';
axisLabel: { axisLabel: {
show: true, show: true,
interval: 0, interval: 0,
rotate: -15,
textStyle: { textStyle: {
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
} }
@ -641,7 +701,7 @@ var basePath = '<%= ResolveUrl("~/") %>';
top: '25%', top: '25%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%', bottom: 30,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'
@ -696,6 +756,35 @@ var basePath = '<%= ResolveUrl("~/") %>';
legend: { legend: {
show: false show: false
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -739,7 +828,7 @@ var basePath = '<%= ResolveUrl("~/") %>';
top: '15%', top: '15%',
left: '10', left: '10',
right: '10', right: '10',
bottom: '0%', bottom: 10,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'

View File

@ -316,6 +316,35 @@
legend: { legend: {
show: false show: false
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -327,7 +356,8 @@
}, },
axisLabel: { axisLabel: {
show: true, show: true,
/*interval: 0,*/ interval: 0,
rotate: -15,
textStyle: { textStyle: {
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
} }
@ -357,7 +387,7 @@
top: '15%', top: '15%',
left: '10', left: '10',
right: '10', right: '10',
bottom: '0%', bottom: 30,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'
@ -445,6 +475,7 @@
}, },
axisLabel: { axisLabel: {
show: true, show: true,
rotate: -15,
interval: 0, interval: 0,
textStyle: { textStyle: {
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
@ -470,12 +501,41 @@
} }
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
series: series, series: series,
grid: { grid: {
top: '25%', top: '25%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%', bottom: 40,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'

View File

@ -340,6 +340,35 @@
fontSize: 12, fontSize: 12,
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -355,6 +384,7 @@
color: 'rgba(0,0,0, 0.8)' color: 'rgba(0,0,0, 0.8)'
}, },
interval: 0, interval: 0,
rotate: -15,
formatter: function (value) { formatter: function (value) {
var ret = "";//拼接加\n返回的类目项 var ret = "";//拼接加\n返回的类目项
var maxLength = num;//每项显示文字个数 var maxLength = num;//每项显示文字个数
@ -404,7 +434,7 @@
top: '20%', top: '20%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%', bottom: 40,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'
@ -489,6 +519,35 @@
fontSize: 12, fontSize: 12,
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -504,6 +563,7 @@
color: 'rgba(0,0,0, 0.8)' color: 'rgba(0,0,0, 0.8)'
}, },
interval: 0, interval: 0,
rotate: -15,
formatter: function (value) { formatter: function (value) {
var ret = "";//拼接加\n返回的类目项 var ret = "";//拼接加\n返回的类目项
var maxLength = num;//每项显示文字个数 var maxLength = num;//每项显示文字个数
@ -640,6 +700,35 @@
fontWeight: 700 fontWeight: 700
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -655,6 +744,7 @@
color: 'rgba(0,0,0, 0.8)' color: 'rgba(0,0,0, 0.8)'
}, },
interval: 0, interval: 0,
rotate: -15,
formatter: function (value) { formatter: function (value) {
var ret = "";//拼接加\n返回的类目项 var ret = "";//拼接加\n返回的类目项
var maxLength = 5;//每项显示文字个数 var maxLength = 5;//每项显示文字个数
@ -703,7 +793,7 @@
top: '15%', top: '15%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%', bottom: 40,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'
@ -769,6 +859,35 @@
fontWeight: 700 fontWeight: 700
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -784,6 +903,7 @@
color: 'rgba(0,0,0, 0.8)' color: 'rgba(0,0,0, 0.8)'
}, },
interval: 0, interval: 0,
rotate: -15,
formatter: function (value) { formatter: function (value) {
var ret = "";//拼接加\n返回的类目项 var ret = "";//拼接加\n返回的类目项
var maxLength = 5;//每项显示文字个数 var maxLength = 5;//每项显示文字个数
@ -832,7 +952,7 @@
top: '15%', top: '15%',
left: '0%', left: '0%',
right: '0%', right: '0%',
bottom: '0%', bottom: 40,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'

View File

@ -1732,7 +1732,7 @@
}, },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
rotate: -20, // 如果数据较多时旋转标签以避免重叠 rotate: -15, // 如果数据较多时旋转标签以避免重叠
margin: 8, // 设置标签与轴线之间的距离 margin: 8, // 设置标签与轴线之间的距离
// align: 'center' // align: 'center'
textStyle: { textStyle: {
@ -1744,6 +1744,35 @@
} }
}, },
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
yAxis: { yAxis: {
type: 'value', type: 'value',
axisLine: { axisLine: {
@ -2585,6 +2614,8 @@
} }
}, },
axisLabel: { axisLabel: {
interval: 0,
rotate: -15,
show: true, show: true,
textStyle: { textStyle: {
color: 'rgba(255, 255, 255, 0.8)' color: 'rgba(255, 255, 255, 0.8)'
@ -2593,11 +2624,40 @@
} }
}, },
series: data, series: data,
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
grid: { grid: {
top: '15%', top: '15%',
left: '10', left: '10',
right: '10', right: '10',
bottom: '0%', bottom: 40,
containLabel: true, containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)', backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)' // borderColor: 'rgba(0,162,233, 1)'

View File

@ -935,8 +935,8 @@
let label = [<%=ProjectPersonMc%>] let label = [<%=ProjectPersonMc%>]
let opt = { let opt = {
grid: { grid: {
top: fontSize(30), //top: fontSize(30),
bottom: fontSize(40) //bottom: fontSize(40)
}, },
dataZoom: [ dataZoom: [
{ {
@ -972,7 +972,7 @@
data: label, data: label,
axisLabel: { axisLabel: {
interval: 0,//使x轴文字显示全 interval: 0,//使x轴文字显示全
rotate: -10, // 标签倾斜的角度 rotate: -15, // 标签倾斜的角度
color: '#3FB0FF' color: '#3FB0FF'
}, },
axisLine: { axisLine: {
@ -2229,8 +2229,6 @@
let opt = { let opt = {
grid: { grid: {
top: 30, top: 30,
bottom: 40,
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
@ -2242,7 +2240,7 @@
}, },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
rotate: -16, // 如果数据较多时旋转标签以避免重叠 rotate: -15, // 如果数据较多时旋转标签以避免重叠
margin: 8, // 设置标签与轴线之间的距离 margin: 8, // 设置标签与轴线之间的距离
// align: 'center' // align: 'center'
}, },
@ -2456,8 +2454,6 @@
let opt = { let opt = {
grid: { grid: {
top: 60, top: 60,
bottom: 40,
}, },
legend: { legend: {
top: 30, top: 30,
@ -2486,7 +2482,7 @@
}, },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
rotate: -10, // 如果数据较多时旋转标签以避免重叠 rotate: -15, // 如果数据较多时旋转标签以避免重叠
margin: 8, // 设置标签与轴线之间的距离 margin: 8, // 设置标签与轴线之间的距离
// align: 'center' // align: 'center'
}, },

View File

@ -844,8 +844,8 @@ namespace FineUIPro.Web.common
if (ndtLists.Count > 0) if (ndtLists.Count > 0)
{ {
//取每个单位、专业最新的一条数据 //取每个项目、单位、专业最新的一条数据
var datalist = ndtLists.GroupBy(r => new { r.UnitId, r.ProfessionalName }).Select(g => g.OrderByDescending(r => r.CreateDate).First()).ToList(); var datalist = ndtLists.GroupBy(r => new { r.ProjectId, r.UnitId, r.ProfessionalName }).Select(g => g.OrderByDescending(r => r.CreateDate).First()).ToList();
foreach (var item in datalist) foreach (var item in datalist)
{ {
if (item.TotalQuantity.HasValue) if (item.TotalQuantity.HasValue)
@ -854,7 +854,8 @@ namespace FineUIPro.Web.common
b += item.TotalQuantity.Value; b += item.TotalQuantity.Value;
} }
} }
result = Convert.ToDouble(Convert.ToDecimal(100.0) * b / a); //result = Convert.ToDouble(Convert.ToDecimal(100.0) * b / a);
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
} }
//else //else
//{ //{

View File

@ -696,8 +696,7 @@
data: [{ name: '<%=All%>', textStyle: { color: '#2F69D6' } }, { name: '<%=To_be_rectified%>', textStyle: { color: '#FFA602' } }] data: [{ name: '<%=All%>', textStyle: { color: '#2F69D6' } }, { name: '<%=To_be_rectified%>', textStyle: { color: '#FFA602' } }]
}, },
grid: { grid: {
top: fontSize(60), top: fontSize(60)
bottom: fontSize(40)
}, },
dataZoom: [ dataZoom: [
{ {
@ -707,7 +706,7 @@
maxValueSpan: 6, maxValueSpan: 6,
show: true, show: true,
xAxisIndex: [0], xAxisIndex: [0],
bottom: 25, height: 10, bottom: 0, height: 10,
backgroundColor: 'rgba(0,0,0,0)', backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none', borderColor: 'none',
brushSelect: false, brushSelect: false,
@ -754,7 +753,7 @@
}, },
axisLabel: { axisLabel: {
interval: 0, // 坐标轴刻度标签的显示间隔 interval: 0, // 坐标轴刻度标签的显示间隔
rotate: -10 // 标签倾斜的角度 rotate: -15 // 标签倾斜的角度
} }
}, },
yAxis: { yAxis: {

View File

@ -163,11 +163,13 @@
<div class="hj-box_label"><asp:Literal runat="server" Text="<%$ Resources:Lan,main_new1_HjData_WelderNum_Label%>"/></div> <div class="hj-box_label"><asp:Literal runat="server" Text="<%$ Resources:Lan,main_new1_HjData_WelderNum_Label%>"/></div>
</div> </div>
<div class="y_column"> <div class="y_column">
<div class="hj-box_number"><%=GetTotalDineNum() %></div> <%--<div class="hj-box_number"><%=GetTotalDineNum() %></div>--%>
<div class="hj-box_number"><%=WeldDine.Size %></div>
<div class="hj-box_label"><asp:Literal runat="server" Text="<%$ Resources:Lan,main_new1_HjData_TotalDineNum_Label%>"/></div> <div class="hj-box_label"><asp:Literal runat="server" Text="<%$ Resources:Lan,main_new1_HjData_TotalDineNum_Label%>"/></div>
</div> </div>
<div class="y_column"> <div class="y_column">
<div class="hj-box_number" style="color: #12CDA2;"><%=GetCompleteDineNum() %></div> <%--<div class="hj-box_number" style="color: #12CDA2;"><%=GetCompleteDineNum() %></div>--%>
<div class="hj-box_number" style="color: #12CDA2;"><%=WeldDine.DoneDin %></div>
<div class="hj-box_label"><asp:Literal runat="server" Text="<%$ Resources:Lan,main_new1_HjData_CompleteDineNum_Label%>"/></div> <div class="hj-box_label"><asp:Literal runat="server" Text="<%$ Resources:Lan,main_new1_HjData_CompleteDineNum_Label%>"/></div>
</div> </div>
<div class="y_column"> <div class="y_column">

View File

@ -1,6 +1,7 @@
using BLL; using BLL;
using FineUIPro.Web.BaseInfo; using FineUIPro.Web.BaseInfo;
using FineUIPro.Web.DataShow; using FineUIPro.Web.DataShow;
using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -67,6 +68,45 @@ namespace FineUIPro.Web.common
getEarlyWarningCounts(); getEarlyWarningCounts();
getCNEN(); getCNEN();
//焊接达因数
GetWeldDineOutput();
//焊接数据
double result = 0;
Model.SGGLDB db = Funs.DB;
var ndtLists = (from x in db.ProcessControl_NondestructiveTest_New select x).ToList();
if (pids != null)
{
ndtLists = ndtLists.Where(x => pids.Contains(x.ProjectId)).ToList();
}
decimal a = 0, b = 0;
if (ndtLists.Count > 0)
{
//取每个项目、单位、专业最新的一条数据
var datalist = ndtLists.GroupBy(r => new { r.ProjectId, r.UnitId, r.ProfessionalName }).Select(g => g.OrderByDescending(r => r.CreateDate).First()).ToList();
foreach (var item in datalist)
{
if (item.TotalQuantity.HasValue)
{
a += Math.Floor(item.TotalQuantity.Value * Funs.GetNewDecimalOrZero(item.TotalRate) / 100);
b += item.TotalQuantity.Value;
}
}
//result = Convert.ToDouble(Convert.ToDecimal(100.0) * a / b);
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
}
if (b > 0)
{
hjallNumber = b.ToString();
hjfinishNumber = a.ToString();
hjzgl = result.ToString() + "%";
}
/******
//在建项目 //在建项目
var allProjects = ProjectService.GetAllProjectDropDownList(); var allProjects = ProjectService.GetAllProjectDropDownList();
//焊接数据 //焊接数据
@ -100,6 +140,8 @@ namespace FineUIPro.Web.common
hjfinishNumber = a.ToString(); hjfinishNumber = a.ToString();
hjzgl = result.ToString() + "%"; hjzgl = result.ToString() + "%";
} }
********/
} }
} }
@ -505,17 +547,93 @@ namespace FineUIPro.Web.common
{ {
int result = (from x in Funs.DB.BS_Welder int result = (from x in Funs.DB.BS_Welder
where x.WED_IfOnGuard == true where x.WED_IfOnGuard == true
select x).Count(); select x)
.GroupBy(p => p.WED_WorkCode)
.Select(g => g.First())
.Count();
return result; return result;
} }
else else
{ {
int result = (from x in Funs.DB.BS_Welder int result = (from x in Funs.DB.BS_Welder
where x.WED_IfOnGuard == true && pids.Contains(x.ProjectId) where x.WED_IfOnGuard == true && pids.Contains(x.ProjectId)
select x).Count(); select x)
.GroupBy(p => p.WED_WorkCode)
.Select(g => g.First())
.Count();
return result; return result;
} }
} }
protected WeldDineOutput WeldDine = new WeldDineOutput();
/// <summary>
/// 获取总达因数和完成达因数
/// </summary>
/// <returns></returns>
public WeldDineOutput GetWeldDineOutput()
{
var projectIds = new List<string>();
if (pids == null)
{
//加载所有在建项目的数据
projectIds = Funs.DB.Base_Project.Where(x => x.ProjectState == "1").Select(x => x.ProjectId).ToList();
}
else
{
projectIds = new List<string>(pids);
}
var result = new List<WeldDineOutput>();
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
where projectIds.Contains(x.ProjectId)
select x;
var proIds = getD1.Select(x => x.ProjectId).Distinct();
foreach (var pro in proIds)
{
double pTotalWeldQuantity = 0;
double pTotalCompleted = 0;
var proD1 = getD1.Where(x => x.ProjectId == pro);
foreach (var item in getD1)
{
var dAll = !string.IsNullOrWhiteSpace(item.TotalWeldQuantity) ? Convert.ToDouble(item.TotalWeldQuantity) : 0;
var dCompleted = !string.IsNullOrWhiteSpace(item.TotalCompleted) ? Convert.ToDouble(item.TotalCompleted) : 0;
pTotalWeldQuantity += dAll;
pTotalCompleted += dCompleted;
}
result.Add(new WeldDineOutput
{
ProjectId = pro,
Size = pTotalWeldQuantity,
DoneDin = pTotalCompleted
});
}
var differenceProjectIds = projectIds.Except(proIds).ToList();
foreach (var pro in differenceProjectIds)
{
double pTotalWeldQuantity = 0;
double pTotalCompleted = 0;
var getD2 = (from x in Funs.DB.HJGL_FL_Data
where x.ProjectId == pro
orderby x.CompileDate descending
select x).FirstOrDefault();
if (getD2 != null)
{
pTotalWeldQuantity = !string.IsNullOrWhiteSpace(getD2.TotalWeldQuantity) ? Convert.ToDouble(getD2.TotalWeldQuantity) : 0;
pTotalCompleted = !string.IsNullOrWhiteSpace(getD2.TotalCompleted) ? Convert.ToDouble(getD2.TotalCompleted) : 0;
}
result.Add(new WeldDineOutput
{
ProjectId = pro,
Size = pTotalWeldQuantity,
DoneDin = pTotalCompleted
});
}
WeldDine.Size = Convert.ToInt32(result.Sum(x => x.Size));
WeldDine.DoneDin = Convert.ToInt32(result.Sum(x => x.DoneDin));
return WeldDine;
}
/// <summary> /// <summary>
/// 获取总达因数 /// 获取总达因数
/// </summary> /// </summary>

File diff suppressed because it is too large Load Diff

View File

@ -10,5 +10,6 @@ namespace Model
public string Id { get; set; } public string Id { get; set; }
public string WEDCode { get; set; } public string WEDCode { get; set; }
public string WEDName { get; set; } public string WEDName { get; set; }
public string WEDWorkCode { get; set; }
} }
} }

View File

@ -6,7 +6,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>G:\发布\五环WebApi</_PublishTargetUrl> <_PublishTargetUrl>G:\发布\五环WebApi</_PublishTargetUrl>
<History>True|2025-06-20T03:24:58.4099232Z||;True|2025-06-19T16:42:45.2358810+08:00||;True|2025-06-16T19:28:10.6447738+08:00||;True|2025-06-12T11:00:02.3559090+08:00||;True|2025-06-12T10:40:29.0324520+08:00||;True|2025-06-04T23:24:01.0324973+08:00||;True|2025-06-04T18:39:41.7304136+08:00||;True|2025-06-04T11:23:17.3803405+08:00||;True|2025-06-04T11:04:32.4212196+08:00||;True|2025-05-26T19:19:09.7246357+08:00||;True|2025-05-26T19:16:39.1283077+08:00||;True|2025-05-26T19:09:24.1561616+08:00||;True|2025-04-07T16:11:44.5172315+08:00||;True|2025-04-02T18:10:22.8695984+08:00||;True|2025-04-02T17:59:51.2978116+08:00||;True|2025-04-02T17:50:55.8630437+08:00||;True|2025-04-02T17:49:22.5114405+08:00||;True|2025-04-02T17:47:11.0650205+08:00||;True|2025-04-02T17:39:09.8576853+08:00||;True|2025-04-02T17:38:15.3079030+08:00||;True|2025-04-02T17:22:03.6735964+08:00||;True|2025-04-02T17:19:04.4220913+08:00||;True|2025-04-02T17:17:14.0244636+08:00||;True|2025-04-02T17:11:09.6583011+08:00||;True|2025-04-02T17:07:23.6330597+08:00||;True|2025-04-02T16:58:45.4070649+08:00||;True|2025-04-02T16:50:20.5907511+08:00||;True|2025-04-02T16:44:18.5351224+08:00||;True|2025-04-02T16:31:11.1297141+08:00||;True|2025-04-02T16:18:43.1126995+08:00||;True|2025-04-02T14:50:42.5384021+08:00||;True|2025-04-01T10:53:08.9403414+08:00||;True|2025-04-01T10:52:08.7646389+08:00||;True|2025-04-01T09:52:56.3095742+08:00||;True|2025-03-13T16:44:25.3220313+08:00||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||;</History> <History>True|2025-07-02T06:39:27.0436873Z||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;True|2025-06-25T22:18:16.2863303+08:00||;True|2025-06-25T22:10:29.2540175+08:00||;True|2025-06-25T22:00:58.5212166+08:00||;True|2025-06-25T22:00:31.2531214+08:00||;True|2025-06-25T18:33:01.5770030+08:00||;True|2025-06-25T17:47:33.7779622+08:00||;True|2025-06-25T17:40:26.9905954+08:00||;True|2025-06-20T11:24:58.4099232+08:00||;True|2025-06-19T16:42:45.2358810+08:00||;True|2025-06-16T19:28:10.6447738+08:00||;True|2025-06-12T11:00:02.3559090+08:00||;True|2025-06-12T10:40:29.0324520+08:00||;True|2025-06-04T23:24:01.0324973+08:00||;True|2025-06-04T18:39:41.7304136+08:00||;True|2025-06-04T11:23:17.3803405+08:00||;True|2025-06-04T11:04:32.4212196+08:00||;True|2025-05-26T19:19:09.7246357+08:00||;True|2025-05-26T19:16:39.1283077+08:00||;True|2025-05-26T19:09:24.1561616+08:00||;True|2025-04-07T16:11:44.5172315+08:00||;True|2025-04-02T18:10:22.8695984+08:00||;True|2025-04-02T17:59:51.2978116+08:00||;True|2025-04-02T17:50:55.8630437+08:00||;True|2025-04-02T17:49:22.5114405+08:00||;True|2025-04-02T17:47:11.0650205+08:00||;True|2025-04-02T17:39:09.8576853+08:00||;True|2025-04-02T17:38:15.3079030+08:00||;True|2025-04-02T17:22:03.6735964+08:00||;True|2025-04-02T17:19:04.4220913+08:00||;True|2025-04-02T17:17:14.0244636+08:00||;True|2025-04-02T17:11:09.6583011+08:00||;True|2025-04-02T17:07:23.6330597+08:00||;True|2025-04-02T16:58:45.4070649+08:00||;True|2025-04-02T16:50:20.5907511+08:00||;True|2025-04-02T16:44:18.5351224+08:00||;True|2025-04-02T16:31:11.1297141+08:00||;True|2025-04-02T16:18:43.1126995+08:00||;True|2025-04-02T14:50:42.5384021+08:00||;True|2025-04-01T10:53:08.9403414+08:00||;True|2025-04-01T10:52:08.7646389+08:00||;True|2025-04-01T09:52:56.3095742+08:00||;True|2025-03-13T16:44:25.3220313+08:00||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -86,22 +86,22 @@
<publishTime>10/28/2024 14:02:50</publishTime> <publishTime>10/28/2024 14:02:50</publishTime>
</File> </File>
<File Include="bin/App_global.asax.compiled"> <File Include="bin/App_global.asax.compiled">
<publishTime>06/20/2025 11:24:56</publishTime> <publishTime>07/09/2025 15:26:57</publishTime>
</File> </File>
<File Include="bin/App_global.asax.dll"> <File Include="bin/App_global.asax.dll">
<publishTime>06/20/2025 11:24:56</publishTime> <publishTime>07/09/2025 15:26:57</publishTime>
</File> </File>
<File Include="bin/Aspose.Words.dll"> <File Include="bin/Aspose.Words.dll">
<publishTime>12/06/2024 20:13:58</publishTime> <publishTime>12/06/2024 20:13:58</publishTime>
</File> </File>
<File Include="bin/BLL.dll"> <File Include="bin/BLL.dll">
<publishTime>06/20/2025 11:24:35</publishTime> <publishTime>07/09/2025 15:26:37</publishTime>
</File> </File>
<File Include="bin/BLL.dll.config"> <File Include="bin/BLL.dll.config">
<publishTime>12/26/2024 09:46:52</publishTime> <publishTime>12/26/2024 09:46:52</publishTime>
</File> </File>
<File Include="bin/BLL.pdb"> <File Include="bin/BLL.pdb">
<publishTime>06/20/2025 11:24:35</publishTime> <publishTime>07/09/2025 15:26:37</publishTime>
</File> </File>
<File Include="bin/BouncyCastle.Crypto.dll"> <File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/18/2020 05:32:28</publishTime> <publishTime>12/18/2020 05:32:28</publishTime>
@ -128,10 +128,10 @@
<publishTime>07/25/2012 19:48:56</publishTime> <publishTime>07/25/2012 19:48:56</publishTime>
</File> </File>
<File Include="bin/Model.dll"> <File Include="bin/Model.dll">
<publishTime>06/20/2025 11:24:28</publishTime> <publishTime>07/02/2025 14:39:00</publishTime>
</File> </File>
<File Include="bin/Model.pdb"> <File Include="bin/Model.pdb">
<publishTime>06/20/2025 11:24:28</publishTime> <publishTime>07/02/2025 14:39:00</publishTime>
</File> </File>
<File Include="bin/netstandard.dll"> <File Include="bin/netstandard.dll">
<publishTime>07/04/2024 14:13:01</publishTime> <publishTime>07/04/2024 14:13:01</publishTime>
@ -389,13 +389,13 @@
<publishTime>02/09/2013 00:42:28</publishTime> <publishTime>02/09/2013 00:42:28</publishTime>
</File> </File>
<File Include="bin/WebAPI.dll"> <File Include="bin/WebAPI.dll">
<publishTime>06/20/2025 11:24:38</publishTime> <publishTime>07/09/2025 15:26:40</publishTime>
</File> </File>
<File Include="bin/WebAPI.pdb"> <File Include="bin/WebAPI.pdb">
<publishTime>06/20/2025 11:24:38</publishTime> <publishTime>07/09/2025 15:26:40</publishTime>
</File> </File>
<File Include="bin/WebAPI.xml"> <File Include="bin/WebAPI.xml">
<publishTime>06/20/2025 11:24:38</publishTime> <publishTime>07/09/2025 15:26:40</publishTime>
</File> </File>
<File Include="bin/WebGrease.dll"> <File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 21:57:34</publishTime> <publishTime>01/23/2014 21:57:34</publishTime>
@ -479,7 +479,7 @@
<publishTime>10/28/2024 14:02:50</publishTime> <publishTime>10/28/2024 14:02:50</publishTime>
</File> </File>
<File Include="PrecompiledApp.config"> <File Include="PrecompiledApp.config">
<publishTime>06/20/2025 11:24:39</publishTime> <publishTime>07/09/2025 15:26:42</publishTime>
</File> </File>
<File Include="Scripts/bootstrap.js"> <File Include="Scripts/bootstrap.js">
<publishTime>10/28/2024 14:02:50</publishTime> <publishTime>10/28/2024 14:02:50</publishTime>