20251219 交工资料

This commit is contained in:
毕文静 2025-12-19 17:10:07 +08:00
commit 6d0af577b0
7 changed files with 153 additions and 25 deletions

View File

@ -0,0 +1,105 @@
CREATE VIEW [dbo].[View_WelderPerformance]
AS
select v.* from
(SELECT
NEWID() AS Id,
--total.ProjectId,
--project.ProjectCode,--
'' as ProjectCode,
total.Welder,
wld.wed_code,-- 焊工代码
wld.wed_name,--
wld.WED_Sex, --
-------------start
CAST(ISNULL(total.totalSize,0) AS DECIMAL(19,2)) AS totalSize, --
ISNULL(total.totalJoint,0) AS totalJoint, --
ISNULL(JointNum1.JointNum1,0) AS JointNum1, --
ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0) AS JointPassNum1, --
ISNULL(JointNoPassNum1.JointNoPassNum1,0) AS RepairJoint1, --
ISNULL(RepairJoint2.RepairJoint2,0) AS RepairJoint2, --
ISNULL(RepairJoint3.RepairJoint3,0) AS RepairJoint3, --
CAST((CASE ISNULL((ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0)),0) WHEN 0 THEN 0
ELSE (CASE(ISNULL(JointNum1.JointNum1,0)) WHEN 0 THEN 0
ELSE 1.0 * ISNULL((ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0)),0)/(1.0 * JointNum1.JointNum1)
END)END) AS DECIMAL(19,3)) AS JointPassRate , ---
ISNULL(JointNum1.totalfilm,0) AS totalfilm, --
(ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0)) AS totalPassfilm, --
ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0) AS repairFilm1, --
ISNULL(RepairJoint2.repairFilm2,0) AS repairFilm2, --
ISNULL(RepairJoint3.repairFilm3,0) AS repairFilm3, --
CAST((CASE (ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0)) WHEN 0 THEN 0
ELSE (CASE(ISNULL(JointNum1.totalfilm,0)) WHEN 0 THEN 0
ELSE 1.0 * (ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0))/(1.0 * JointNum1.totalfilm)
END) END) AS DECIMAL(19,3)) AS JointFilmPassRate ---
FROM
-- --
(SELECT SUM(joint.JOT_Size) AS totalSize,COUNT(*) AS totalJoint
,joint.Welder
FROM View_JointWelder joint
LEFT JOIN HJGL_BO_WeldReportMain report ON joint.DReportID = report.DReportID
WHERE joint.DReportID IS NOT NULL
GROUP BY joint.Welder) AS total
-- , ,
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS JointNum1, SUM(joint.RT_FilmNum) AS totalfilm,
joint.Welder
FROM dbo.View_JointWelder joint
WHERE joint.PointType='点口' AND joint.RT_FilmNum IS NOT NULL and joint.RT_FilmNum>0 and (select COUNT(*) from dbo.HJGL_BO_QualityRating a
left join HJGL_CH_TrustItem b on a.CH_TrustItemID=b.CH_TrustItemID
left join HJGL_CH_Trust c on b.CH_TrustID=c.CH_TrustID where a.JOT_ID=joint.JOT_ID and FilmNum is not null and c.CH_NDTMethod='20d2cbca-8b3d-434b-b1c1-181796986fa5')>0
AND joint.dreportid IS NOT NULL
GROUP BY joint.Welder) AS JointNum1
ON JointNum1.Welder = total.Welder
--
LEFT JOIN (SELECT COUNT(distinct joint.JOT_ID) AS JointNoPassNum1,
joint.Welder
FROM dbo.HJGL_CH_RepairItemRecord rr
left join dbo.View_JointWelder joint on rr.JOT_ID=joint.JOT_ID
WHERE joint.PointType='点口' and rr.NDT_ID='20d2cbca-8b3d-434b-b1c1-181796986fa5'
--AND (joint.RT1_RepairFilm IS NOT NULL or (select top 1 CH_TrustItemID from dbo.HJGL_CH_TrustItem ti where ti.JOT_ID=joint.JOT_ID and ti.States='4') is not null)
AND joint.dreportid IS NOT NULL and rr.RepairMark='R1'
GROUP BY joint.Welder) AS JointNoPassNum1
ON JointNoPassNum1.Welder = total.Welder
--
LEFT JOIN (SELECT count(rr.RepairItemRecordId) as JointNoPassFilmNum2,
joint.Welder
FROM dbo.HJGL_CH_RepairItemRecord rr
left join dbo.View_JointWelder joint on rr.JOT_ID=joint.JOT_ID
WHERE joint.PointType='点口' and rr.NDT_ID='20d2cbca-8b3d-434b-b1c1-181796986fa5'
--AND (joint.RT1_RepairFilm IS NOT NULL or (select top 1 CH_TrustItemID from dbo.HJGL_CH_TrustItem ti where ti.JOT_ID=joint.JOT_ID and ti.States='4') is not null)
AND joint.dreportid IS NOT NULL and rr.RepairMark='R1'
GROUP BY joint.Welder) AS JointNoPassNum2
ON JointNoPassNum2.Welder = total.Welder
--,
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS RepairJoint2, SUM(ISNULL(joint.RT2_RepairFilmNum,0)) AS RepairFilm2,
joint.Welder
FROM dbo.View_JointWelder joint
WHERE joint.PointType='点口' AND joint.RT2_RepairFilm IS NOT NULL
AND joint.dreportid IS NOT NULL
GROUP BY joint.Welder) AS RepairJoint2
ON RepairJoint2.Welder = total.Welder
--,
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS RepairJoint3, SUM(ISNULL(joint.RT3_RepairFilmNum,0)) AS RepairFilm3,
joint.Welder
FROM dbo.View_JointWelder joint
WHERE joint.PointType='点口' AND joint.RT3_RepairFilm IS NOT NULL
AND joint.dreportid IS NOT NULL
GROUP BY joint.Welder) AS RepairJoint3
ON RepairJoint3.Welder = total.Welder
LEFT JOIN dbo.HJGL_BS_Welder wld ON wld.WED_ID=total.Welder) v
where v.JointFilmPassRate>0 and v.JointFilmPassRate<0.965
GO

View File

@ -814,8 +814,8 @@ namespace FineUIPro.Web.HJGL.CheckManage
this.QualityRatingId = values.Value<string>("QualityRatingId");
if (trust.CH_NDTMethod == "20d2cbca-8b3d-434b-b1c1-181796986fa5") //RT检测评定结果不为空才保存拍片记录
{
//if (!string.IsNullOrEmpty(newQualityRating.DefectResult))
//{
if (!string.IsNullOrEmpty(newQualityRating.IsPass))
{
filmNum++;
if (newQualityRating.RMaterial == true)
{
@ -837,9 +837,11 @@ namespace FineUIPro.Web.HJGL.CheckManage
newQualityRating.QualityRatingId = this.QualityRatingId;
BLL.HJGL_BO_QualityRatingService.UpadteQualityRating(newQualityRating);
}
//}
}
}
else
{
if (!string.IsNullOrEmpty(newQualityRating.IsPass))
{
var quatlityRating = BLL.HJGL_BO_QualityRatingService.GetQualityRatingById(this.QualityRatingId);
if (quatlityRating == null)
@ -858,6 +860,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
BLL.HJGL_BO_QualityRatingService.UpadteQualityRating(newQualityRating);
}
}
}
BLL.HJGL_CH_TrustItemService.UpdateTrustItem(trustItem);
// 有焊口增加的,对应的检测报告打印要变成未打印状态

View File

@ -605,9 +605,12 @@ namespace FineUIPro.Web.HJGL.DataIn
{
result += "第" + (i + 2).ToString() + "行," + "该焊口的焊工资质不符合" + "\n";
}
else //D类口暂时不提示
else
{
if (floorWelderQualifys.Count() == 0 && cellWelderQualifys.Count() == 0) //D类口强制提交时应至少有焊工证否则也不可强制提交
{
result += "第" + (i + 2).ToString() + "行," + "该焊口的焊工资质不符合" + "\n";
}
}
}
}

View File

@ -465,6 +465,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
isAllD = false;
}
else
{
if (floorWelderQualifys.Count() == 0 && cellWelderQualifys.Count() == 0) //D类口强制提交时应至少有焊工证否则也不可强制提交
{
isAllD = false;
}
}
}
}
if (eventArg != string.Empty)

View File

@ -170,7 +170,8 @@ namespace FineUIPro.Web.WeldMat.Stock
/// <param name="e"></param>
protected void btnMoveStore_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockMoveRecordsMenuId, BLL.Const.BtnMoveStore))
//if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockMoveRecordsMenuId, BLL.Const.BtnMoveStore))
if (this.CurrUser.UserId == "95eae1e8-ddb9-4b76-99f4-78a3636a398b") //焊材移库功能只能赵瑞霞操作
{
if (CurrUser.Account != Const.Gly)
{

View File

@ -214,6 +214,15 @@ namespace WebAPI.Controllers
responeData.message = "该焊口的焊工资质不符合!";
return responeData;
}
else
{
if (floorWelderQualifys.Count() == 0 && cellWelderQualifys.Count() == 0) //D类口强制提交时应至少有焊工证否则也不可强制提交
{
responeData.code = 0;
responeData.message = "该焊口的焊工资质不符合!";
return responeData;
}
}
}
}
BLL.APIJointInfoService.SaveJointInfoForWeldReport(addItem);

View File

@ -79,13 +79,13 @@
<publishTime>09/10/2013 16:29:20</publishTime>
</File>
<File Include="bin/BLL.dll">
<publishTime>11/18/2025 11:30:43</publishTime>
<publishTime>12/19/2025 10:46:46</publishTime>
</File>
<File Include="bin/BLL.dll.config">
<publishTime>07/28/2025 20:15:00</publishTime>
</File>
<File Include="bin/BLL.pdb">
<publishTime>11/18/2025 11:30:43</publishTime>
<publishTime>12/19/2025 10:46:46</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/17/2020 21:32:28</publishTime>
@ -115,10 +115,10 @@
<publishTime>07/25/2012 11:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
<publishTime>11/18/2025 11:30:43</publishTime>
<publishTime>12/19/2025 10:46:45</publishTime>
</File>
<File Include="bin/Model.pdb">
<publishTime>11/18/2025 11:30:43</publishTime>
<publishTime>12/19/2025 10:46:45</publishTime>
</File>
<File Include="bin/Newtonsoft.Json.dll">
<publishTime>03/17/2021 20:03:36</publishTime>
@ -319,10 +319,10 @@
<publishTime>02/01/2018 12:20:56</publishTime>
</File>
<File Include="bin/WebAPI.dll">
<publishTime>11/18/2025 11:30:44</publishTime>
<publishTime>12/19/2025 10:46:46</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
<publishTime>11/18/2025 11:30:44</publishTime>
<publishTime>12/19/2025 10:46:46</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 13:57:34</publishTime>
@ -448,7 +448,7 @@
<publishTime>07/03/2024 11:01:07</publishTime>
</File>
<File Include="Web.config">
<publishTime>11/18/2025 11:30:50</publishTime>
<publishTime>12/19/2025 10:47:09</publishTime>
</File>
</ItemGroup>
</Project>