2023-10-08
This commit is contained in:
commit
7d87e48818
Binary file not shown.
|
@ -0,0 +1,47 @@
|
||||||
|
--专项检查检查记录接收人
|
||||||
|
alter table Check_CheckSpecial add ReceiveMan nvarchar(2000) null;
|
||||||
|
|
||||||
|
--States:0-保存 1-提交 2-审核通过 3-已确认
|
||||||
|
|
||||||
|
|
||||||
|
--修改专项检查明细视图
|
||||||
|
/****** Object: View [dbo].[View_CheckSpecialDetail] Script Date: 2023/9/30 11:19:54 ******/
|
||||||
|
SET ANSI_NULLS ON
|
||||||
|
GO
|
||||||
|
|
||||||
|
SET QUOTED_IDENTIFIER ON
|
||||||
|
GO
|
||||||
|
/*LEFT JOIN Sys_Const AS const ON const.ConstValue = detail.HandleStep and const.GroupId='HandleStep'*/
|
||||||
|
ALTER VIEW [dbo].[View_CheckSpecialDetail]
|
||||||
|
AS
|
||||||
|
SELECT detail.CheckSpecialDetailId, detail.CheckSpecialId, detail.CheckItem, checkItemSet.CheckItemName, detail.Unqualified,
|
||||||
|
detail.SortIndex, detail.UnitId, detail.HandleStep, detail.CompleteStatus,
|
||||||
|
(CASE WHEN detail.CompleteStatus = 1 THEN '合格' ELSE '不合格' END) AS CompleteStatusName, detail.LimitedDate,
|
||||||
|
detail.CompletedDate, detail.CheckContent, detail.CheckArea,
|
||||||
|
workArea.UnitWorkName + (CASE WHEN workArea.ProjectType = '1' THEN '(建筑)' WHEN workArea.ProjectType = '2' THEN '(安装)'
|
||||||
|
ELSE '' END) AS CheckAreaName, detail.DataId, detail.DataType, unit.UnitName,
|
||||||
|
dbo.GetConstTextByIds(detail.HandleStep) AS HandleStepStr,
|
||||||
|
(CASE WHEN detail.DataType LIKE '%1%' THEN '下发整改单:' +
|
||||||
|
(SELECT RectifyNoticesCode
|
||||||
|
FROM Check_RectifyNotices
|
||||||
|
WHERE detail.DataId LIKE '%' + RectifyNoticesId + '%') ELSE '' END)
|
||||||
|
+ (CASE WHEN detail.DataType LIKE '%2%' THEN '下发处罚单:' +
|
||||||
|
(SELECT PunishNoticeCode
|
||||||
|
FROM Check_PunishNotice
|
||||||
|
WHERE detail.DataId LIKE '%' + PunishNoticeId + '%') ELSE '' END)
|
||||||
|
+ (CASE WHEN detail.DataType = '3' THEN '下发暂停令:' +
|
||||||
|
(SELECT PauseNoticeCode
|
||||||
|
FROM Check_PauseNotice
|
||||||
|
WHERE detail.DataId LIKE '%' + PauseNoticeId + '%') ELSE '' END) AS HandleStepLink, detail.HiddenHazardType,
|
||||||
|
(CASE WHEN detail.HiddenHazardType = '3' THEN '重大' WHEN detail.HiddenHazardType = '2' THEN '较大' WHEN detail.HiddenHazardType
|
||||||
|
= '1' THEN '一般' ELSE '' END) AS HiddenHazardTypeName, detail.CheckItemSetId, detail.CheckItemSetContent,
|
||||||
|
detail.Rectification_Date
|
||||||
|
FROM dbo.Check_CheckSpecialDetail AS detail LEFT OUTER JOIN
|
||||||
|
dbo.Technique_CheckItemSet AS checkItemSet ON checkItemSet.CheckItemSetId = detail.CheckItem LEFT OUTER JOIN
|
||||||
|
dbo.Base_Unit AS unit ON unit.UnitId = detail.UnitId LEFT OUTER JOIN
|
||||||
|
dbo.WBS_UnitWork AS workArea ON detail.CheckArea = workArea.UnitWorkId
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
alter table Base_Project add ProjType nvarchar(50) null
|
||||||
|
GO
|
||||||
|
alter table Base_Project add ProjPhase nvarchar(50) null
|
||||||
|
GO
|
|
@ -0,0 +1,31 @@
|
||||||
|
Create VIEW [dbo].[View_QualityAudit_GeneralEquipmentQuality] AS
|
||||||
|
/*机具设备资质信息列表视图*/
|
||||||
|
SELECT equ.GeneralEquipmentQualityId
|
||||||
|
,equ.ProjectId
|
||||||
|
,equ.GeneralEquipmentQualityCode
|
||||||
|
,equ.UnitId
|
||||||
|
,Unit.UnitName
|
||||||
|
,equ.SpecialEquipmentId
|
||||||
|
,sp.SpecialEquipmentName
|
||||||
|
,equ.[IsQualified]
|
||||||
|
,equ.EquipmentCount
|
||||||
|
,equ.InDate
|
||||||
|
,equ.Remark
|
||||||
|
,equ.CompileMan
|
||||||
|
,U.UserName AS CompileManName
|
||||||
|
,equ.CompileDate
|
||||||
|
,equ.QRCodeAttachUrl
|
||||||
|
,REPLACE(a.AttachUrl,'\', '/') AS AttachUrl
|
||||||
|
FROM QualityAudit_GeneralEquipmentQuality AS equ
|
||||||
|
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=equ.UnitId
|
||||||
|
LEFT JOIN Base_SpecialEquipment AS sp ON equ.SpecialEquipmentId = sp.SpecialEquipmentId
|
||||||
|
LEFT JOIN Sys_User AS U ON U.UserId = equ.CompileMan
|
||||||
|
LEFT JOIN AttachFile AS a ON a.ToKeyId = equ.GeneralEquipmentQualityId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
update QualityAudit_GeneralEquipmentQuality set QRCodeAttachUrl =NULL
|
||||||
|
GO
|
|
@ -58,7 +58,7 @@ namespace BLL
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var getPerson = from x in db.View_SitePerson_Person
|
var getPerson = from x in db.View_SitePerson_Person
|
||||||
where x.PersonId == personId || x.IdentityCard == personId
|
where (x.PersonId == personId || x.IdentityCard == personId)
|
||||||
select new Model.PersonItem
|
select new Model.PersonItem
|
||||||
{
|
{
|
||||||
PersonId = x.PersonId,
|
PersonId = x.PersonId,
|
||||||
|
@ -1752,5 +1752,83 @@ namespace BLL
|
||||||
|
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 二维码扫码获取人员
|
||||||
|
/// <summary>
|
||||||
|
/// 二维码扫码获取人员
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="personId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.PersonItem getPersonByPersonIdQrcode(string personId)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var getPerson = from x in db.View_SitePerson_Person
|
||||||
|
where (x.PersonId == personId || x.IdentityCard == personId) && x.IsUsed == true
|
||||||
|
select new Model.PersonItem
|
||||||
|
{
|
||||||
|
PersonId = x.PersonId,
|
||||||
|
CardNo = x.CardNo,
|
||||||
|
PersonName = x.PersonName,
|
||||||
|
Sex = x.Sex,
|
||||||
|
SexName = x.SexName,
|
||||||
|
IdentityCard = x.IdentityCard,
|
||||||
|
Address = x.Address,
|
||||||
|
ProjectId = x.ProjectId,
|
||||||
|
ProjectCode = x.ProjectCode,
|
||||||
|
ProjectName = x.ProjectName,
|
||||||
|
UnitId = x.UnitId,
|
||||||
|
UnitCode = x.UnitCode,
|
||||||
|
UnitName = x.UnitName,
|
||||||
|
TeamGroupId = x.TeamGroupId,
|
||||||
|
TeamGroupName = x.TeamGroupName,
|
||||||
|
WorkPostId = x.WorkPostId,
|
||||||
|
WorkPostName = x.WorkPostName,
|
||||||
|
InTime = string.Format("{0:yyyy-MM-dd}", x.InTime),
|
||||||
|
OutTime = string.Format("{0:yyyy-MM-dd}", x.OutTime),
|
||||||
|
OutResult = x.OutResult,
|
||||||
|
Telephone = x.Telephone,
|
||||||
|
PhotoUrl = x.PhotoUrl,
|
||||||
|
DepartName = x.DepartName,
|
||||||
|
IsUsed = x.IsUsed,
|
||||||
|
IsUsedName = x.IsUsed == false ? "不启用" : "启用",
|
||||||
|
AuditorId = x.AuditorId,
|
||||||
|
AuditorName = db.Sys_User.First(z => z.UserId == x.AuditorId).UserName,
|
||||||
|
IsForeign = x.IsForeign.HasValue ? x.IsForeign : false,
|
||||||
|
IsOutside = x.IsOutside.HasValue ? x.IsOutside : false,
|
||||||
|
AuditorDate = string.Format("{0:yyyy-MM-dd}", x.AuditorDate),
|
||||||
|
AttachUrl1 = x.IDCardUrl == null ? APIUpLoadFileService.getFileUrl(personId + "#1", null) : x.IDCardUrl.Replace('\\', '/'),
|
||||||
|
AttachUrl2 = APIUpLoadFileService.getFileUrl(personId + "#2", null),
|
||||||
|
AttachUrl3 = APIUpLoadFileService.getFileUrl(personId + "#3", null),
|
||||||
|
AttachUrl4 = getAttachUrl4(x.PersonId),
|
||||||
|
AttachUrl5 = APIUpLoadFileService.getFileUrl(personId + "#5", null),
|
||||||
|
IdcardType = x.IdcardType,
|
||||||
|
IdcardTypeName = x.IdcardTypeName,
|
||||||
|
IdcardStartDate = string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate),
|
||||||
|
IdcardEndDate = string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate),
|
||||||
|
IdcardForever = x.IdcardForever,
|
||||||
|
IdcardForeverStr = x.IdcardForeverStr,
|
||||||
|
PoliticsStatus = x.PoliticsStatus,
|
||||||
|
PoliticsStatusName = x.PoliticsStatusName,
|
||||||
|
IdcardAddress = x.IdcardAddress,
|
||||||
|
Nation = x.Nation,
|
||||||
|
NationName = x.NationName,
|
||||||
|
EduLevel = x.EduLevel,
|
||||||
|
EduLevelName = x.EduLevelName,
|
||||||
|
MaritalStatus = x.MaritalStatus,
|
||||||
|
MaritalStatusName = x.MaritalStatusName,
|
||||||
|
CountryCode = x.CountryCode,
|
||||||
|
CountryName = x.CountryName,
|
||||||
|
ProvinceCode = x.ProvinceCode,
|
||||||
|
ProvinceName = x.ProvinceName,
|
||||||
|
MainCNProfessionalId = x.MainCNProfessionalId,
|
||||||
|
MainCNProfessionalName = x.MainCNProfessionalName,
|
||||||
|
ViceCNProfessionalId = x.ViceCNProfessionalId,
|
||||||
|
ViceCNProfessionalName = x.ViceCNProfessionalName
|
||||||
|
};
|
||||||
|
return getPerson.FirstOrDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,37 +14,96 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="CheckSpecialId"></param>
|
/// <param name="CheckSpecialId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Model.CheckSpecialItem getCheckSpecialById(string CheckSpecialId)
|
public static Model.CheckSpecialItem getCheckSpecialById(string CheckSpecialId,string state="0")
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var getInfo = from x in db.Check_CheckSpecial
|
if (state == "0")
|
||||||
where x.CheckSpecialId == CheckSpecialId
|
{
|
||||||
select new Model.CheckSpecialItem
|
//状态是0的时候查看所有
|
||||||
{
|
var getInfo = from x in db.Check_CheckSpecial
|
||||||
CheckSpecialId = x.CheckSpecialId,
|
where x.CheckSpecialId == CheckSpecialId
|
||||||
ProjectId = x.ProjectId,
|
select new Model.CheckSpecialItem
|
||||||
CheckSpecialCode = x.CheckSpecialCode,
|
{
|
||||||
CheckTypeName = (x.CheckType == "1" ? "联合" : "专项"),
|
CheckSpecialId = x.CheckSpecialId,
|
||||||
CheckType = x.CheckType,
|
ProjectId = x.ProjectId,
|
||||||
CheckItemSetId = x.CheckItemSetId,
|
CheckSpecialCode = x.CheckSpecialCode,
|
||||||
CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItemSetId).CheckItemName,
|
CheckTypeName = (x.CheckType == "1" ? "联合" : "专项"),
|
||||||
CheckPersonId = x.CheckPerson,
|
CheckType = x.CheckType,
|
||||||
CheckPersonName = db.Sys_User.First(u => u.UserId == x.CheckPerson).UserName,
|
CheckItemSetId = x.CheckItemSetId,
|
||||||
CheckTime = string.Format("{0:yyyy-MM-dd}", x.CheckTime),
|
CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItemSetId).CheckItemName,
|
||||||
DaySummary = x.DaySummary,
|
CheckPersonId = x.CheckPerson,
|
||||||
PartInUnitIds = x.PartInUnits,
|
CheckPersonName = db.Sys_User.First(u => u.UserId == x.CheckPerson).UserName,
|
||||||
PartInUnitNames = UnitService.getUnitNamesUnitIds(x.PartInUnits),
|
CheckTime = string.Format("{0:yyyy-MM-dd}", x.CheckTime),
|
||||||
PartInPersonIds = x.PartInPersonIds,
|
DaySummary = x.DaySummary,
|
||||||
PartInPersonNames = UserService.getUserNamesUserIds(x.PartInPersonIds),
|
PartInUnitIds = x.PartInUnits,
|
||||||
PartInPersonNames2 = x.PartInPersonNames,
|
PartInUnitNames = UnitService.getUnitNamesUnitIds(x.PartInUnits),
|
||||||
CompileManId = x.CompileMan,
|
PartInPersonIds = x.PartInPersonIds,
|
||||||
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
|
PartInPersonNames = UserService.getUserNamesUserIds(x.PartInPersonIds),
|
||||||
States = x.States,
|
PartInPersonNames2 = x.PartInPersonNames,
|
||||||
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
|
CompileManId = x.CompileMan,
|
||||||
CheckSpecialDetailItems = getCheckSpecialDetailList(x.CheckSpecialId),
|
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
|
||||||
};
|
States = x.States,
|
||||||
return getInfo.FirstOrDefault();
|
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
|
||||||
|
CheckSpecialDetailItems = getCheckSpecialDetailList(x.CheckSpecialId,"0"),
|
||||||
|
|
||||||
|
ResponsibleUnit = x.ResponsibleUnit,
|
||||||
|
ResponsibleUnitName = UnitService.GetUnitNameByUnitId(x.ResponsibleUnit),
|
||||||
|
WorkAreaId = x.WorkAreaId,
|
||||||
|
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
|
||||||
|
QuestionType = x.QuestionType,
|
||||||
|
QuestionTypeName = UnitService.GetQuestionTypeId(x.QuestionType),
|
||||||
|
|
||||||
|
ResponsibleMan = x.ResponsibleMan,
|
||||||
|
ReceiveMan = x.ReceiveMan,
|
||||||
|
ReceiveManName = UserService.getUserNamesUserIds(x.ReceiveMan)
|
||||||
|
|
||||||
|
};
|
||||||
|
return getInfo.FirstOrDefault();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//状态是1的时候查看不合格的子项
|
||||||
|
var getInfo = from x in db.Check_CheckSpecial
|
||||||
|
where x.CheckSpecialId == CheckSpecialId
|
||||||
|
select new Model.CheckSpecialItem
|
||||||
|
{
|
||||||
|
CheckSpecialId = x.CheckSpecialId,
|
||||||
|
ProjectId = x.ProjectId,
|
||||||
|
CheckSpecialCode = x.CheckSpecialCode,
|
||||||
|
CheckTypeName = (x.CheckType == "1" ? "联合" : "专项"),
|
||||||
|
CheckType = x.CheckType,
|
||||||
|
CheckItemSetId = x.CheckItemSetId,
|
||||||
|
CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItemSetId).CheckItemName,
|
||||||
|
CheckPersonId = x.CheckPerson,
|
||||||
|
CheckPersonName = db.Sys_User.First(u => u.UserId == x.CheckPerson).UserName,
|
||||||
|
CheckTime = string.Format("{0:yyyy-MM-dd}", x.CheckTime),
|
||||||
|
DaySummary = x.DaySummary,
|
||||||
|
PartInUnitIds = x.PartInUnits,
|
||||||
|
PartInUnitNames = UnitService.getUnitNamesUnitIds(x.PartInUnits),
|
||||||
|
PartInPersonIds = x.PartInPersonIds,
|
||||||
|
PartInPersonNames = UserService.getUserNamesUserIds(x.PartInPersonIds),
|
||||||
|
PartInPersonNames2 = x.PartInPersonNames,
|
||||||
|
CompileManId = x.CompileMan,
|
||||||
|
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
|
||||||
|
States = x.States,
|
||||||
|
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
|
||||||
|
CheckSpecialDetailItems = getCheckSpecialDetailList(x.CheckSpecialId,"1"),
|
||||||
|
|
||||||
|
ResponsibleUnit = x.ResponsibleUnit,
|
||||||
|
ResponsibleUnitName = UnitService.GetUnitNameByUnitId(x.ResponsibleUnit),
|
||||||
|
WorkAreaId = x.WorkAreaId,
|
||||||
|
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
|
||||||
|
QuestionType = x.QuestionType,
|
||||||
|
QuestionTypeName = UnitService.GetQuestionTypeId(x.QuestionType),
|
||||||
|
|
||||||
|
ResponsibleMan = x.ResponsibleMan,
|
||||||
|
ReceiveMan = x.ReceiveMan,
|
||||||
|
ReceiveManName = UserService.getUserNamesUserIds(x.ReceiveMan)
|
||||||
|
|
||||||
|
};
|
||||||
|
return getInfo.FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -56,12 +115,14 @@ namespace BLL
|
||||||
/// <param name="projectId"></param>
|
/// <param name="projectId"></param>
|
||||||
/// <param name="states"></param>
|
/// <param name="states"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.CheckSpecialItem> getCheckSpecialList(string projectId, string states)
|
public static List<Model.CheckSpecialItem> getCheckSpecialList(string projectId, string states,string userid)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var getCheckSpecial = from x in db.Check_CheckSpecial
|
var getCheckSpecial = from x in db.Check_CheckSpecial
|
||||||
where x.ProjectId == projectId && x.States ==states
|
where x.ProjectId == projectId && x.States ==states
|
||||||
|
//当前保存人、审核人、确认人能看到
|
||||||
|
&&(x.CompileMan==userid || x.ResponsibleMan==userid || userid.Split(',').Contains(x.ReceiveMan))
|
||||||
orderby x.CheckSpecialCode descending
|
orderby x.CheckSpecialCode descending
|
||||||
select new Model.CheckSpecialItem
|
select new Model.CheckSpecialItem
|
||||||
{
|
{
|
||||||
|
@ -85,6 +146,8 @@ namespace BLL
|
||||||
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
|
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
|
||||||
States = x.States,
|
States = x.States,
|
||||||
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
|
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
|
||||||
|
ReceiveMan=x.ReceiveMan,
|
||||||
|
ReceiveManName= UserService.getUserNamesUserIds(x.ReceiveMan)
|
||||||
};
|
};
|
||||||
return getCheckSpecial.ToList();
|
return getCheckSpecial.ToList();
|
||||||
}
|
}
|
||||||
|
@ -117,18 +180,39 @@ namespace BLL
|
||||||
PartInPersons = UserService.getUserNamesUserIds(newItem.PartInPersonIds),
|
PartInPersons = UserService.getUserNamesUserIds(newItem.PartInPersonIds),
|
||||||
PartInPersonNames = newItem.PartInPersonNames2,
|
PartInPersonNames = newItem.PartInPersonNames2,
|
||||||
CompileMan = newItem.CompileManId,
|
CompileMan = newItem.CompileManId,
|
||||||
States = Const.State_0,
|
States = newItem.States,
|
||||||
|
|
||||||
|
ResponsibleUnit=newItem.ResponsibleUnit,
|
||||||
|
WorkAreaId=newItem.WorkAreaId,
|
||||||
|
QuestionType=newItem.QuestionType,
|
||||||
|
//审核人
|
||||||
|
ResponsibleMan=newItem.ResponsibleMan,
|
||||||
|
ReceiveMan=newItem.ReceiveMan
|
||||||
};
|
};
|
||||||
//if (newItem.States != Const.State_1)
|
//if (newItem.States != Const.State_1)
|
||||||
//{
|
//{
|
||||||
// newCheckSpecial.States = Const.State_0;
|
// newCheckSpecial.States = Const.State_0;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (newItem.CheckSpecialDetailItems == null || newItem.CheckSpecialDetailItems.Count() == 0)
|
//if (newItem.CheckSpecialDetailItems == null || newItem.CheckSpecialDetailItems.Count() == 0)
|
||||||
|
//{
|
||||||
|
// if (newItem.States == Const.State_1)
|
||||||
|
// {
|
||||||
|
// newCheckSpecial.States = Const.State_2;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//如果审核状态不为空
|
||||||
|
if (!string.IsNullOrEmpty(newItem.AuditState))
|
||||||
{
|
{
|
||||||
if (newItem.States == Const.State_1)
|
//不同意的话
|
||||||
|
if (newItem.AuditState=="0")
|
||||||
{
|
{
|
||||||
newCheckSpecial.States = Const.State_2;
|
newCheckSpecial.States = "0";
|
||||||
|
}
|
||||||
|
else if (newItem.AuditState=="1")
|
||||||
|
{
|
||||||
|
newCheckSpecial.States = "2";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,31 +251,32 @@ namespace BLL
|
||||||
SaveCheckSpecialDetail(item);
|
SaveCheckSpecialDetail(item);
|
||||||
}
|
}
|
||||||
//// 单据完成后 系统自动按照单位 整改要求生成隐患整改单
|
//// 单据完成后 系统自动按照单位 整改要求生成隐患整改单
|
||||||
if (newItem.States == Const.State_1)
|
///五环不需要
|
||||||
{
|
//if (newItem.States == Const.State_1)
|
||||||
var getC = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false);
|
//{
|
||||||
if (getC == null)
|
// var getC = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false);
|
||||||
{
|
// if (getC == null)
|
||||||
newCheckSpecial.States = Const.State_2;
|
// {
|
||||||
Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial);
|
// newCheckSpecial.States = Const.State_2;
|
||||||
}
|
// Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial);
|
||||||
else
|
// }
|
||||||
{
|
// else
|
||||||
var getNA = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false && (x.HandleStep== null || x.HandleStep==""));
|
// {
|
||||||
if (getNA == null)
|
// var getNA = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false && (x.HandleStep== null || x.HandleStep==""));
|
||||||
{
|
// if (getNA == null)
|
||||||
var detailLists = db.Check_CheckSpecialDetail.Where(x => x.CheckSpecialId == newCheckSpecial.CheckSpecialId && x.CompleteStatus == false);
|
// {
|
||||||
if (detailLists.Count() > 0)
|
// var detailLists = db.Check_CheckSpecialDetail.Where(x => x.CheckSpecialId == newCheckSpecial.CheckSpecialId && x.CompleteStatus == false);
|
||||||
{
|
// if (detailLists.Count() > 0)
|
||||||
message = Check_CheckSpecialService.IssueRectification(detailLists.ToList(), newCheckSpecial);
|
// {
|
||||||
}
|
// message = Check_CheckSpecialService.IssueRectification(detailLists.ToList(), newCheckSpecial);
|
||||||
}
|
// }
|
||||||
else
|
// }
|
||||||
{
|
// else
|
||||||
message += "存在待整改,没有处理措施的记录!";
|
// {
|
||||||
}
|
// message += "存在待整改,没有处理措施的记录!";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
@ -204,42 +289,83 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="checkSpecialId"></param>
|
/// <param name="checkSpecialId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.CheckSpecialDetailItem> getCheckSpecialDetailList(string checkSpecialId)
|
public static List<Model.CheckSpecialDetailItem> getCheckSpecialDetailList(string checkSpecialId,string CompleteStatus="0")
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var getInfo = from x in db.Check_CheckSpecialDetail
|
if (CompleteStatus == "0")
|
||||||
where x.CheckSpecialId == checkSpecialId
|
{
|
||||||
orderby x.SortIndex
|
var getInfo = from x in db.Check_CheckSpecialDetail
|
||||||
select new Model.CheckSpecialDetailItem
|
where x.CheckSpecialId == checkSpecialId
|
||||||
{
|
orderby x.SortIndex
|
||||||
CheckSpecialDetailId = x.CheckSpecialDetailId,
|
select new Model.CheckSpecialDetailItem
|
||||||
CheckSpecialId = x.CheckSpecialId,
|
{
|
||||||
CheckItemSetId = x.CheckItem,
|
CheckSpecialDetailId = x.CheckSpecialDetailId,
|
||||||
CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItem).CheckItemName,
|
CheckSpecialId = x.CheckSpecialId,
|
||||||
CheckContent = x.CheckContent,
|
CheckItemSetId = x.CheckItem,
|
||||||
SortIndex = x.SortIndex,
|
CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItem).CheckItemName,
|
||||||
Unqualified = x.Unqualified,
|
CheckContent = x.CheckContent,
|
||||||
Suggestions = x.Suggestions,
|
SortIndex = x.SortIndex,
|
||||||
WorkArea = db.WBS_UnitWork.First(y=>y.UnitWorkId ==x.CheckArea).UnitWorkName,
|
Unqualified = x.Unqualified,
|
||||||
WorkAreaId=x.CheckArea,
|
Suggestions = x.Suggestions,
|
||||||
UnitId = x.UnitId,
|
WorkArea = db.WBS_UnitWork.First(y => y.UnitWorkId == x.CheckArea).UnitWorkName,
|
||||||
UnitName = db.Base_Unit.First(y => y.UnitId == x.UnitId).UnitName,
|
WorkAreaId = x.CheckArea,
|
||||||
HandleStep = x.HandleStep,
|
UnitId = x.UnitId,
|
||||||
HandleStepName = getNames(x.HandleStep),
|
UnitName = db.Base_Unit.First(y => y.UnitId == x.UnitId).UnitName,
|
||||||
HiddenHazardType = x.HiddenHazardType,
|
HandleStep = x.HandleStep,
|
||||||
HiddenHazardTypeName = x.HiddenHazardType == "3" ? "重大" : (x.HiddenHazardType == "2" ? "较大" : "一般"),
|
HandleStepName = getNames(x.HandleStep),
|
||||||
LimitedDate = string.Format("{0:yyyy-MM-dd}", x.LimitedDate),
|
HiddenHazardType = x.HiddenHazardType,
|
||||||
CompleteStatus = x.CompleteStatus,
|
HiddenHazardTypeName = x.HiddenHazardType == "3" ? "重大" : (x.HiddenHazardType == "2" ? "较大" : "一般"),
|
||||||
CompleteStatusName = x.CompleteStatus == true ? "已整改" : "待整改",
|
LimitedDate = string.Format("{0:yyyy-MM-dd}", x.LimitedDate),
|
||||||
CompletedDate = string.Format("{0:yyyy-MM-dd}", x.CompletedDate),
|
CompleteStatus = x.CompleteStatus,
|
||||||
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialDetailId, null),
|
CompleteStatusName = x.CompleteStatus == true ? "已整改" : "待整改",
|
||||||
|
CompletedDate = string.Format("{0:yyyy-MM-dd}", x.CompletedDate),
|
||||||
|
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialDetailId, null),
|
||||||
|
|
||||||
CheckItemDetailSetId = x.CheckItemSetId,
|
CheckItemDetailSetId = x.CheckItemSetId,
|
||||||
CheckItemDetailContent = x.CheckItemSetContent,
|
CheckItemDetailContent = x.CheckItemSetContent,
|
||||||
Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
|
Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
|
||||||
};
|
CheckOpinions = x.CheckOpinions,
|
||||||
return getInfo.ToList();
|
};
|
||||||
|
return getInfo.ToList();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//查询不合格子项
|
||||||
|
var getInfo = from x in db.Check_CheckSpecialDetail
|
||||||
|
where x.CheckSpecialId == checkSpecialId && x.CompleteStatus==false
|
||||||
|
orderby x.SortIndex
|
||||||
|
select new Model.CheckSpecialDetailItem
|
||||||
|
{
|
||||||
|
CheckSpecialDetailId = x.CheckSpecialDetailId,
|
||||||
|
CheckSpecialId = x.CheckSpecialId,
|
||||||
|
CheckItemSetId = x.CheckItem,
|
||||||
|
CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItem).CheckItemName,
|
||||||
|
CheckContent = x.CheckContent,
|
||||||
|
SortIndex = x.SortIndex,
|
||||||
|
Unqualified = x.Unqualified,
|
||||||
|
Suggestions = x.Suggestions,
|
||||||
|
WorkArea = db.WBS_UnitWork.First(y => y.UnitWorkId == x.CheckArea).UnitWorkName,
|
||||||
|
WorkAreaId = x.CheckArea,
|
||||||
|
UnitId = x.UnitId,
|
||||||
|
UnitName = db.Base_Unit.First(y => y.UnitId == x.UnitId).UnitName,
|
||||||
|
HandleStep = x.HandleStep,
|
||||||
|
HandleStepName = getNames(x.HandleStep),
|
||||||
|
HiddenHazardType = x.HiddenHazardType,
|
||||||
|
HiddenHazardTypeName = x.HiddenHazardType == "3" ? "重大" : (x.HiddenHazardType == "2" ? "较大" : "一般"),
|
||||||
|
LimitedDate = string.Format("{0:yyyy-MM-dd}", x.LimitedDate),
|
||||||
|
CompleteStatus = x.CompleteStatus,
|
||||||
|
CompleteStatusName = x.CompleteStatus == true ? "已整改" : "待整改",
|
||||||
|
CompletedDate = string.Format("{0:yyyy-MM-dd}", x.CompletedDate),
|
||||||
|
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialDetailId, null),
|
||||||
|
|
||||||
|
CheckItemDetailSetId = x.CheckItemSetId,
|
||||||
|
CheckItemDetailContent = x.CheckItemSetContent,
|
||||||
|
Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
|
||||||
|
CheckOpinions = x.CheckOpinions,
|
||||||
|
};
|
||||||
|
return getInfo.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -290,6 +416,7 @@ namespace BLL
|
||||||
CheckItemDetailSetId=x.CheckItemSetId,
|
CheckItemDetailSetId=x.CheckItemSetId,
|
||||||
CheckItemDetailContent=x.CheckItemSetContent,
|
CheckItemDetailContent=x.CheckItemSetContent,
|
||||||
Rectification_Date= string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
|
Rectification_Date= string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
|
||||||
|
CheckOpinions=x.CheckOpinions
|
||||||
};
|
};
|
||||||
return getInfo.First();
|
return getInfo.First();
|
||||||
}
|
}
|
||||||
|
@ -316,7 +443,7 @@ namespace BLL
|
||||||
UnitId = newDetail.UnitId,
|
UnitId = newDetail.UnitId,
|
||||||
HandleStep = newDetail.HandleStep,
|
HandleStep = newDetail.HandleStep,
|
||||||
HiddenHazardType = newDetail.HiddenHazardType,
|
HiddenHazardType = newDetail.HiddenHazardType,
|
||||||
CompleteStatus = newDetail.CompleteStatus ?? false,
|
CompleteStatus = newDetail.CompleteStatus,
|
||||||
RectifyNoticeId = newDetail.RectifyNoticeId,
|
RectifyNoticeId = newDetail.RectifyNoticeId,
|
||||||
LimitedDate = Funs.GetNewDateTime(newDetail.LimitedDate),
|
LimitedDate = Funs.GetNewDateTime(newDetail.LimitedDate),
|
||||||
CompletedDate = Funs.GetNewDateTime(newDetail.CompletedDate),
|
CompletedDate = Funs.GetNewDateTime(newDetail.CompletedDate),
|
||||||
|
@ -325,10 +452,11 @@ namespace BLL
|
||||||
CheckArea = newDetail.WorkAreaId,
|
CheckArea = newDetail.WorkAreaId,
|
||||||
CheckContent = newDetail.CheckContent,
|
CheckContent = newDetail.CheckContent,
|
||||||
|
|
||||||
//整改日期、检查内容、检查内容id
|
//整改日期、检查内容、检查内容id、处理意见
|
||||||
CheckItemSetId= newDetail.CheckItemDetailSetId,
|
CheckItemSetId= newDetail.CheckItemDetailSetId,
|
||||||
CheckItemSetContent= newDetail.CheckItemDetailContent,
|
CheckItemSetContent= newDetail.CheckItemDetailContent,
|
||||||
Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date)
|
Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date),
|
||||||
|
CheckOpinions=newDetail.CheckOpinions,
|
||||||
};
|
};
|
||||||
if (newCheckSpecialDetail.CompleteStatus == false && newCheckSpecialDetail.HandleStep.Contains("1") && string.IsNullOrEmpty(newCheckSpecialDetail.HiddenHazardType))
|
if (newCheckSpecialDetail.CompleteStatus == false && newCheckSpecialDetail.HandleStep.Contains("1") && string.IsNullOrEmpty(newCheckSpecialDetail.HiddenHazardType))
|
||||||
{
|
{
|
||||||
|
@ -371,10 +499,11 @@ namespace BLL
|
||||||
updateDetail.CheckArea = newCheckSpecialDetail.CheckArea;
|
updateDetail.CheckArea = newCheckSpecialDetail.CheckArea;
|
||||||
updateDetail.CheckContent = newCheckSpecialDetail.CheckContent;
|
updateDetail.CheckContent = newCheckSpecialDetail.CheckContent;
|
||||||
|
|
||||||
//整改日期、检查内容、检查内容id
|
//整改日期、检查内容、检查内容id、处理意见
|
||||||
updateDetail.CheckItemSetId = newDetail.CheckItemDetailSetId;
|
updateDetail.CheckItemSetId = newDetail.CheckItemDetailSetId;
|
||||||
updateDetail.CheckItemSetContent = newDetail.CheckItemDetailContent;
|
updateDetail.CheckItemSetContent = newDetail.CheckItemDetailContent;
|
||||||
updateDetail.Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date);
|
updateDetail.Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date);
|
||||||
|
updateDetail.CheckOpinions = newDetail.CheckOpinions;
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
////保存附件
|
////保存附件
|
||||||
|
|
|
@ -0,0 +1,148 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using EmitMapper;
|
||||||
|
|
||||||
|
namespace BLL
|
||||||
|
{
|
||||||
|
public static class APIGeneralEquipmentQualityService
|
||||||
|
{
|
||||||
|
#region 根据equipmentQualityId获取机具设备信息
|
||||||
|
/// <summary>
|
||||||
|
/// 根据equipmentQualityId获取机具设备信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="equipmentQualityId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.EquipmentQualityItem getEquipmentQualityByEquipmentQualityIdFactoryCode(string equipmentQualityId)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var getEquipmentQuality = (from x in db.View_QualityAudit_GeneralEquipmentQuality
|
||||||
|
where x.GeneralEquipmentQualityId == equipmentQualityId
|
||||||
|
select new Model.EquipmentQualityItem
|
||||||
|
{
|
||||||
|
EquipmentQualityId = x.GeneralEquipmentQualityId,
|
||||||
|
ProjectId = x.ProjectId,
|
||||||
|
EquipmentQualityCode = x.GeneralEquipmentQualityCode,
|
||||||
|
EquipmentCount = x.EquipmentCount.HasValue? x.EquipmentCount.Value.ToString():"",
|
||||||
|
UnitId = x.UnitId,
|
||||||
|
IsQualified =x.IsQualified.HasValue? x.IsQualified.Value?"是":"否":"",
|
||||||
|
UnitName = x.UnitName,
|
||||||
|
SpecialEquipmentName = x.SpecialEquipmentName,
|
||||||
|
InDate = string.Format("{0:yyyy-MM-dd}", x.InDate),
|
||||||
|
Remark = x.Remark,
|
||||||
|
CompileManId = x.CompileMan,
|
||||||
|
CompileManName = x.CompileManName,
|
||||||
|
CompileDate = string.Format("{0:yyyy-MM-dd}", x.CompileDate),
|
||||||
|
AttachUrl = x.AttachUrl.Replace('\\', '/')
|
||||||
|
}); ;
|
||||||
|
return getEquipmentQuality.FirstOrDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取机具设备列表信息
|
||||||
|
/// <summary>
|
||||||
|
/// 获取机具设备列表信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="unitId"></param>
|
||||||
|
/// <param name="strParam"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.EquipmentQualityItem> getEquipmentQualityList(string projectId, string unitId, string strParam)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var getEquipmentQuality = from x in db.View_QualityAudit_GeneralEquipmentQuality
|
||||||
|
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||||
|
&& (strParam == null || x.SpecialEquipmentName.Contains(strParam) )
|
||||||
|
orderby x.GeneralEquipmentQualityCode descending
|
||||||
|
select new Model.EquipmentQualityItem
|
||||||
|
{
|
||||||
|
EquipmentQualityId = x.GeneralEquipmentQualityId,
|
||||||
|
ProjectId = x.ProjectId,
|
||||||
|
EquipmentQualityCode = x.GeneralEquipmentQualityCode,
|
||||||
|
EquipmentCount = x.EquipmentCount.HasValue ? x.EquipmentCount.Value.ToString() : "",
|
||||||
|
UnitId = x.UnitId,
|
||||||
|
IsQualified = x.IsQualified.HasValue ? x.IsQualified.Value ? "是" : "否" : "",
|
||||||
|
UnitName = x.UnitName,
|
||||||
|
SpecialEquipmentName = x.SpecialEquipmentName,
|
||||||
|
InDate = string.Format("{0:yyyy-MM-dd}", x.InDate),
|
||||||
|
Remark = x.Remark,
|
||||||
|
CompileManId = x.CompileMan,
|
||||||
|
CompileManName = x.CompileManName,
|
||||||
|
CompileDate = string.Format("{0:yyyy-MM-dd}", x.CompileDate),
|
||||||
|
AttachUrl = x.AttachUrl.Replace('\\', '/')
|
||||||
|
};
|
||||||
|
return getEquipmentQuality.ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存QualityAudit_EquipmentQuality
|
||||||
|
/// <summary>
|
||||||
|
/// 保存QualityAudit_EquipmentQuality
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="newItem">机具设备资质</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static void SaveEquipmentQuality(Model.EquipmentQualityItem newItem)
|
||||||
|
{
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
Model.QualityAudit_GeneralEquipmentQuality newEquipmentQuality = new Model.QualityAudit_GeneralEquipmentQuality
|
||||||
|
{
|
||||||
|
GeneralEquipmentQualityId = newItem.EquipmentQualityId,
|
||||||
|
ProjectId = newItem.ProjectId,
|
||||||
|
GeneralEquipmentQualityCode = newItem.EquipmentQualityCode,
|
||||||
|
UnitId = newItem.UnitId,
|
||||||
|
SpecialEquipmentId = newItem.SpecialEquipmentId,
|
||||||
|
InDate = Funs.GetNewDateTime(newItem.InDate),
|
||||||
|
Remark = newItem.Remark,
|
||||||
|
CompileMan = newItem.CompileManId,
|
||||||
|
};
|
||||||
|
if (!string.IsNullOrEmpty(newItem.IsQualified))
|
||||||
|
{
|
||||||
|
if ("1".Equals(newItem.IsQualified))
|
||||||
|
{
|
||||||
|
newEquipmentQuality.IsQualified = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newEquipmentQuality.IsQualified = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(newItem.EquipmentCount))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
newEquipmentQuality.EquipmentCount = int.Parse(newItem.EquipmentCount);
|
||||||
|
}
|
||||||
|
catch (Exception e) { }
|
||||||
|
}
|
||||||
|
var updateEquipmentQuality = db.QualityAudit_GeneralEquipmentQuality.FirstOrDefault(x => x.GeneralEquipmentQualityId == newItem.EquipmentQualityId);
|
||||||
|
if (updateEquipmentQuality == null)
|
||||||
|
{
|
||||||
|
newEquipmentQuality.CompileDate = DateTime.Now;
|
||||||
|
newEquipmentQuality.GeneralEquipmentQualityId = SQLHelper.GetNewID();
|
||||||
|
newEquipmentQuality.GeneralEquipmentQualityCode = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.GeneralEquipmentQualityMenuId, newItem.ProjectId, newItem.UnitId);
|
||||||
|
GeneralEquipmentQualityService.AddGeneralEquipmentQuality(newEquipmentQuality);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GeneralEquipmentQualityService.UpdateGeneralEquipmentQuality(newEquipmentQuality);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(newItem.AttachUrl))
|
||||||
|
{
|
||||||
|
////保存附件
|
||||||
|
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl, 10, null), newItem.AttachUrl, Const.GeneralEquipmentQualityMenuId, newEquipmentQuality.GeneralEquipmentQualityId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CommonService.DeleteAttachFileById(newEquipmentQuality.GeneralEquipmentQualityId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -357,22 +357,42 @@ namespace BLL
|
||||||
/// <param name="supTypeId"></param>
|
/// <param name="supTypeId"></param>
|
||||||
/// <param name="checkType">1-checkType;2-专项检查;3-综合检查</param>
|
/// <param name="checkType">1-checkType;2-专项检查;3-综合检查</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.ResourcesItem> getCheckItemSetListBySupCheckItemId(string supTypeId, string checkType)
|
public static List<Model.ResourcesItem> getCheckItemSetListBySupCheckItemId(string supTypeId, string checkType,string supName="")
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var getDataLists = from x in db.Technique_CheckItemSet
|
if (!string.IsNullOrEmpty(supName))
|
||||||
where x.CheckType == checkType && (x.SupCheckItem == supTypeId || (supTypeId == null && x.SupCheckItem == "0"))
|
{
|
||||||
orderby x.SortIndex
|
var getDataLists = from x in db.Technique_CheckItemSet
|
||||||
select new Model.ResourcesItem
|
where x.CheckType == checkType && (x.SupCheckItem == supTypeId || (supTypeId == null && x.SupCheckItem == "0"))
|
||||||
{
|
&& x.CheckItemName.Contains(supName)
|
||||||
ResourcesId = x.CheckItemSetId,
|
orderby x.SortIndex
|
||||||
ResourcesCode = x.MapCode,
|
select new Model.ResourcesItem
|
||||||
ResourcesName = x.CheckItemName,
|
{
|
||||||
SupResourcesId = x.SupCheckItem,
|
ResourcesId = x.CheckItemSetId,
|
||||||
IsEndLever = x.IsEndLever,
|
ResourcesCode = x.MapCode,
|
||||||
};
|
ResourcesName = x.CheckItemName,
|
||||||
return getDataLists.ToList();
|
SupResourcesId = x.SupCheckItem,
|
||||||
|
IsEndLever = x.IsEndLever,
|
||||||
|
};
|
||||||
|
return getDataLists.ToList();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var getDataLists = from x in db.Technique_CheckItemSet
|
||||||
|
where x.CheckType == checkType && (x.SupCheckItem == supTypeId || (supTypeId == null && x.SupCheckItem == "0"))
|
||||||
|
orderby x.SortIndex
|
||||||
|
select new Model.ResourcesItem
|
||||||
|
{
|
||||||
|
ResourcesId = x.CheckItemSetId,
|
||||||
|
ResourcesCode = x.MapCode,
|
||||||
|
ResourcesName = x.CheckItemName,
|
||||||
|
SupResourcesId = x.SupCheckItem,
|
||||||
|
IsEndLever = x.IsEndLever,
|
||||||
|
};
|
||||||
|
return getDataLists.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,7 @@
|
||||||
<Compile Include="API\HJGL\APIPreWeldingDailyService.cs" />
|
<Compile Include="API\HJGL\APIPreWeldingDailyService.cs" />
|
||||||
<Compile Include="API\HJGL\APIReportQueryService.cs" />
|
<Compile Include="API\HJGL\APIReportQueryService.cs" />
|
||||||
<Compile Include="API\HJGL\APITestPackageService.cs" />
|
<Compile Include="API\HJGL\APITestPackageService.cs" />
|
||||||
|
<Compile Include="API\HSSE\APIGeneralEquipmentQualityService.cs" />
|
||||||
<Compile Include="API\HSSE\APIPageDataService.cs" />
|
<Compile Include="API\HSSE\APIPageDataService.cs" />
|
||||||
<Compile Include="API\HSSE\APIChartAnalysisService.cs" />
|
<Compile Include="API\HSSE\APIChartAnalysisService.cs" />
|
||||||
<Compile Include="API\HSSE\APICheckSpecialService.cs" />
|
<Compile Include="API\HSSE\APICheckSpecialService.cs" />
|
||||||
|
@ -174,6 +175,7 @@
|
||||||
<Compile Include="Common\CommonService.cs" />
|
<Compile Include="Common\CommonService.cs" />
|
||||||
<Compile Include="Common\CreateQRCodeService.cs" />
|
<Compile Include="Common\CreateQRCodeService.cs" />
|
||||||
<Compile Include="Common\IDCardValid.cs" />
|
<Compile Include="Common\IDCardValid.cs" />
|
||||||
|
<Compile Include="Common\NPOIExcel.cs" />
|
||||||
<Compile Include="Common\NPOIHelper.cs" />
|
<Compile Include="Common\NPOIHelper.cs" />
|
||||||
<Compile Include="Common\PrinterDocService.cs" />
|
<Compile Include="Common\PrinterDocService.cs" />
|
||||||
<Compile Include="Common\ProjectDataFlowSetService.cs" />
|
<Compile Include="Common\ProjectDataFlowSetService.cs" />
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -244,7 +244,8 @@ namespace BLL
|
||||||
{
|
{
|
||||||
Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem
|
Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem
|
||||||
{
|
{
|
||||||
WrongContent = item.Unqualified
|
//WrongContent = item.Unqualified
|
||||||
|
WrongContent = item.CheckItemSetContent
|
||||||
};
|
};
|
||||||
if (string.IsNullOrEmpty(rectifyNotices.CheckSpecialDetailId))
|
if (string.IsNullOrEmpty(rectifyNotices.CheckSpecialDetailId))
|
||||||
{
|
{
|
||||||
|
@ -298,7 +299,8 @@ namespace BLL
|
||||||
foreach (var item in getUnitDItem)
|
foreach (var item in getUnitDItem)
|
||||||
{
|
{
|
||||||
Model.PunishNoticeItemItem newPItem = new Model.PunishNoticeItemItem();
|
Model.PunishNoticeItemItem newPItem = new Model.PunishNoticeItemItem();
|
||||||
newPItem.PunishContent = item.Unqualified;
|
//newPItem.PunishContent = item.Unqualified;
|
||||||
|
newPItem.PunishContent = item.CheckItemSetContent;
|
||||||
newPItem.SortIndex = item.SortIndex;
|
newPItem.SortIndex = item.SortIndex;
|
||||||
punishNotice.PunishNoticeItemItem.Add(newPItem);
|
punishNotice.PunishNoticeItemItem.Add(newPItem);
|
||||||
if (string.IsNullOrEmpty(punishNotice.CheckSpecialDetailId))
|
if (string.IsNullOrEmpty(punishNotice.CheckSpecialDetailId))
|
||||||
|
@ -335,7 +337,8 @@ namespace BLL
|
||||||
foreach (var item in getUnitDItem)
|
foreach (var item in getUnitDItem)
|
||||||
{
|
{
|
||||||
Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem();
|
Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem();
|
||||||
pauseNotice.ThirdContent += item.Unqualified;
|
//pauseNotice.ThirdContent += item.Unqualified;
|
||||||
|
pauseNotice.ThirdContent += item.CheckItemSetContent;
|
||||||
string checkAreaName= UnitWorkService.GetNameById(item.CheckArea);
|
string checkAreaName= UnitWorkService.GetNameById(item.CheckArea);
|
||||||
if (!string.IsNullOrEmpty(checkAreaName))
|
if (!string.IsNullOrEmpty(checkAreaName))
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,6 +138,8 @@
|
||||||
HJProjectCode = project.HJProjectCode,
|
HJProjectCode = project.HJProjectCode,
|
||||||
KZProjectCode = project.KZProjectCode,
|
KZProjectCode = project.KZProjectCode,
|
||||||
Progress = project.Progress,
|
Progress = project.Progress,
|
||||||
|
ProjType = project.ProjType,
|
||||||
|
ProjPhase = project.ProjPhase,
|
||||||
};
|
};
|
||||||
db.Base_Project.InsertOnSubmit(newProject);
|
db.Base_Project.InsertOnSubmit(newProject);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
|
@ -186,6 +188,8 @@
|
||||||
newProject.HJProjectCode = project.HJProjectCode;
|
newProject.HJProjectCode = project.HJProjectCode;
|
||||||
newProject.KZProjectCode = project.KZProjectCode;
|
newProject.KZProjectCode = project.KZProjectCode;
|
||||||
newProject.Progress = project.Progress;
|
newProject.Progress = project.Progress;
|
||||||
|
newProject.ProjType = project.ProjType;
|
||||||
|
newProject.ProjPhase = project.ProjPhase;
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
HSEDataCollectService.ProjectHSEDataCollectSubmission(newProject);
|
HSEDataCollectService.ProjectHSEDataCollectSubmission(newProject);
|
||||||
}
|
}
|
||||||
|
|
|
@ -761,5 +761,21 @@ namespace BLL
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取问题类型名称
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="UnitId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetQuestionTypeId(string RegisterTypesId)
|
||||||
|
{
|
||||||
|
string name = string.Empty;
|
||||||
|
var unit = Funs.DB.HSSE_Hazard_HazardRegisterTypes.FirstOrDefault(x => x.RegisterTypesId == RegisterTypesId);
|
||||||
|
if (unit != null)
|
||||||
|
{
|
||||||
|
name = unit.RegisterTypesName;
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3193,3 +3193,25 @@ IP地址:::1
|
||||||
|
|
||||||
出错时间:09/26/2023 18:55:14
|
出错时间:09/26/2023 18:55:14
|
||||||
|
|
||||||
|
|
||||||
|
错误信息开始=====>
|
||||||
|
错误类型:JsonReaderException
|
||||||
|
错误信息:Error reading JArray from JsonReader. Current JsonReader item is not an array: StartObject. Path '', line 1, position 1.
|
||||||
|
错误堆栈:
|
||||||
|
在 Newtonsoft.Json.Linq.JArray.Load(JsonReader reader, JsonLoadSettings settings)
|
||||||
|
在 Newtonsoft.Json.Linq.JArray.Parse(String json, JsonLoadSettings settings)
|
||||||
|
在 Newtonsoft.Json.Linq.JArray.Parse(String json)
|
||||||
|
在 FineUIPro.Web.ProjectData.Installation.btnMenuDown_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\Installation.aspx.cs:行号 257
|
||||||
|
在 FineUIPro.MenuButton.OnClick(EventArgs e)
|
||||||
|
在 (MenuButton , EventArgs )
|
||||||
|
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
|
||||||
|
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||||
|
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||||
|
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||||
|
出错时间:10/07/2023 16:42:46
|
||||||
|
出错文件:http://localhost:8579/ProjectData/Installation.aspx
|
||||||
|
IP地址:::1
|
||||||
|
操作人员:JT
|
||||||
|
|
||||||
|
出错时间:10/07/2023 16:42:46
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,61 @@
|
||||||
|
PK
|
||||||
专项检查
|
|