This commit is contained in:
李鹏飞 2025-10-24 10:11:15 +08:00
commit 3866641217
20 changed files with 907 additions and 270 deletions

View File

@ -0,0 +1,2 @@
alter table [dbo].[SeDin_MonthReport5] add S02 int null
GO

View File

@ -0,0 +1,123 @@
ALTER PROCEDURE [dbo].[Sp_HJGL_ProductionPlanStatistics]
@projectId nvarchar(50)=null
AS
BEGIN
SET NOCOUNT ON; -- 减少网络流量,提高性能
-- 使用CTE预先过滤和聚合数据
WITH PipelineFiltered AS (
SELECT UnitWorkId, FlowingSection, PipelineId
FROM HJGL_Pipeline
WHERE PipeArea='1'
AND FlowingSection IS NOT NULL
AND FlowingSection != ''
AND (@projectId IS NULL OR UnitWorkId IN (
SELECT UnitWorkId FROM WBS_UnitWork WHERE ProjectId = @projectId
))
),
-- 工厂预制总达因
TotalDiaCTE AS (
SELECT p.UnitWorkId, p.FlowingSection, SUM(wj.Size) as TotalDia
FROM HJGL_WeldJoint wj
INNER JOIN PipelineFiltered p ON p.PipelineId = wj.PipelineId
WHERE wj.JointAttribute='预制口'
GROUP BY p.UnitWorkId, p.FlowingSection
),
-- 当日完成工作量
CurrentDayCompletedCTE AS (
SELECT p.UnitWorkId, p.FlowingSection, SUM(wj.Size) as CurrentDayCompletedDia
FROM HJGL_WeldJoint wj
INNER JOIN PipelineFiltered p ON p.PipelineId = wj.PipelineId
INNER JOIN HJGL_WeldingDaily wd ON wd.WeldingDailyId = wj.WeldingDailyId
WHERE wj.JointAttribute='预制口'
AND wj.WeldingDailyId IS NOT NULL
AND wd.WeldingDate >= CAST(GETDATE() AS DATE) -- 优化日期比较,使用日期范围
AND wd.WeldingDate < DATEADD(DAY, 1, CAST(GETDATE() AS DATE))
GROUP BY p.UnitWorkId, p.FlowingSection
),
-- 累计已完成量
TotalCompletedCTE AS (
SELECT p.UnitWorkId, p.FlowingSection, SUM(wj.Size) as totalCompletedDia
FROM HJGL_WeldJoint wj
INNER JOIN PipelineFiltered p ON p.PipelineId = wj.PipelineId
WHERE wj.JointAttribute='预制口'
AND wj.WeldingDailyId IS NOT NULL
GROUP BY p.UnitWorkId, p.FlowingSection
),
-- 当前焊工数量
WelderCountCTE AS (
SELECT p.UnitWorkId, p.FlowingSection,
COUNT(DISTINCT pp.PersonId) as WelderCount -- 使用DISTINCT避免重复计数
FROM Person_Persons pp
INNER JOIN HJGL_WeldJoint wj ON wj.BackingWelderId = pp.PersonId
INNER JOIN PipelineFiltered p ON p.PipelineId = wj.PipelineId
WHERE wj.JointAttribute='预制口'
AND wj.WeldingDailyId IS NOT NULL
GROUP BY p.UnitWorkId, p.FlowingSection
)--,
---- 预警焊工数量
--WarningWelderCountCTE AS (
-- SELECT p.UnitWorkId, p.FlowingSection,
-- COUNT(DISTINCT pp.PersonId) as WarningWelderCount
-- FROM Person_Persons pp
-- INNER JOIN HJGL_WeldJoint wj ON wj.BackingWelderId = pp.PersonId
-- INNER JOIN PipelineFiltered p ON p.PipelineId = wj.PipelineId
-- INNER JOIN Welder_WelderQualify wq ON wq.WelderId = pp.PersonId
-- WHERE wj.JointAttribute='预制口'
-- AND wj.WeldingDailyId IS NOT NULL
-- AND wq.LimitDate < GETDATE() -- 焊工资格过期预警
-- GROUP BY p.UnitWorkId, p.FlowingSection
--)
SELECT DISTINCT
unitWork.UnitWorkId,
unitWork.UnitWorkCode,
unitWork.UnitWorkName,
unitWork.ProjectId,
pipeline.FlowingSection,
isnull(total.TotalDia,0) as TotalDia,--
p.PlanStartDate,--
p.PlanEndDate,--
--(DATEDIFF(day, p.PlanStartDate, p.PlanEndDate) +1) as TotalDays,--
--(case when p.PlanEndDate>= getdate() then (DATEDIFF(day, p.PlanStartDate, p.PlanEndDate)-(DATEDIFF(day,p.PlanStartDate,GETDATE()))) else '' end) as RemainingDays,--
--(case when DATEDIFF(day, p.PlanStartDate, p.PlanEndDate)>0 then cast(isnull(total.TotalDia,0)/DATEDIFF(day, p.PlanStartDate, p.PlanEndDate) as decimal(18,2)) else 0 end) as AvgDayCompleteDia, --
ISNULL(currentDay.CurrentDayCompletedDia,0) as CurrentDayCompletedDia, --
--cast(case when (case when p.PlanEndDate>= getdate() then (DATEDIFF(day, p.PlanStartDate, p.PlanEndDate)-(DATEDIFF(day,p.PlanStartDate,GETDATE()))) else 0 end)>0 then
--(isnull(total.TotalDia,0)-isnull(totalCompleted.totalCompletedDia,0))/ (case when p.PlanEndDate>= getdate() then (DATEDIFF(day, p.PlanStartDate, p.PlanEndDate)-(DATEDIFF(day,p.PlanStartDate,GETDATE()))) else 0 end) else 0 end as decimal(18,2)) as NextDayComplete, --
isnull(totalCompleted.totalCompletedDia,0) as totalCompletedDia, --
cast(cast((case when isnull(total.TotalDia,0)>0 then
(isnull(totalCompleted.totalCompletedDia,0) / isnull(total.TotalDia,0)*100) else 0 end) as decimal(18,2)) as varchar(10))+'%' as CompletedRate, --
welder.WelderCount, --
--warningWelder.WarningWelderCount --
(case when welder.WelderCount>0 then cast((ISNULL(currentDay.CurrentDayCompletedDia,0)/welder.WelderCount) as decimal(18,2)) else 0 end) as WarningWelderCount--
FROM WBS_UnitWork AS unitWork
INNER JOIN PipelineFiltered pipeline ON pipeline.UnitWorkId = unitWork.UnitWorkId -- 使用INNER JOIN因为pipeline数据必须存在
--LEFT JOIN HJGL_ProductionSchedulingPlan p ON p.PipelineId = unitWork.UnitWorkId AND p.FlowNum = pipeline.FlowingSection
--
left join (select min(PlanStartDate) as PlanStartDate,max(PlanEndDate) as PlanEndDate,PipelineId,FlowNum from HJGL_ProductionSchedulingPlan
group by PipelineId,FlowNum
) as p on p.PipelineId=unitWork.UnitWorkId and p.FlowNum = pipeline.FlowingSection
--
LEFT JOIN TotalDiaCTE total ON total.UnitWorkId = unitWork.UnitWorkId AND total.FlowingSection = pipeline.FlowingSection
--
LEFT JOIN CurrentDayCompletedCTE currentDay ON currentDay.UnitWorkId = unitWork.UnitWorkId AND currentDay.FlowingSection = pipeline.FlowingSection
--
LEFT JOIN TotalCompletedCTE totalCompleted ON totalCompleted.UnitWorkId = unitWork.UnitWorkId AND totalCompleted.FlowingSection = pipeline.FlowingSection
--
LEFT JOIN WelderCountCTE welder ON welder.UnitWorkId = unitWork.UnitWorkId AND welder.FlowingSection = pipeline.FlowingSection
--
--LEFT JOIN WarningWelderCountCTE warningWelder ON warningWelder.UnitWorkId = unitWork.UnitWorkId AND warningWelder.FlowingSection = pipeline.FlowingSection
WHERE (@projectId IS NULL OR unitWork.ProjectId = @projectId)
AND pipeline.FlowingSection IS NOT NULL
END
GO

View File

@ -439,6 +439,7 @@ namespace BLL
int D03 = getUAll.Where(x => x.BaseInfoName == "拖板车").Count();
int D04 = getUAll.Where(x => x.BaseInfoName == "桩机").Count();
int S01 = getUAll.Where(x => x.BaseInfoName == "吊篮").Count();
int S02 = getUAll.Where(x => x.BaseInfoName == "高空作业升降平台").Count();
Model.SeDinMonthReport5Item newItem = new Model.SeDinMonthReport5Item
{
UnitName = item.UnitName,
@ -453,7 +454,8 @@ namespace BLL
D03 = D03,
D04 = D04,
S01 = S01,
TotalNum = (T01 + T02 + T03 + T04 + T05 + T06 + D01 + D02 + D03 + D04 + S01)
S02 = S02,
TotalNum = (T01 + T02 + T03 + T04 + T05 + T06 + D01 + D02 + D03 + D04 + S01 + S02)
};
getLists.Add(newItem);
}
@ -1294,8 +1296,9 @@ namespace BLL
D03 = x.D03 ?? 0,
D04 = x.D04 ?? 0,
S01 = x.S01 ?? 0,
S02 = x.S02 ?? 0,
TotalNum = (x.T01 + x.T02 + x.T03 + x.T04 + x.T05 + x.T06
+ x.D01 + x.D02 + x.D03 + x.D04 + x.S01)
+ x.D01 + x.D02 + x.D03 + x.D04 + x.S01 + x.S02)
}).ToList();
}
return getInfo;
@ -2115,6 +2118,7 @@ namespace BLL
D03 = item.D03,
D04 = item.D04,
S01 = item.S01,
S02 = item.S02,
};
db.SeDin_MonthReport5.InsertOnSubmit(newReport5Item);
db.SubmitChanges();

View File

@ -532,5 +532,26 @@ namespace BLL
APITrainRecordService.InsertTrainRecord(getTestPlan);
}
}
#region
/// <summary>
/// 获取考试试题类型列表
/// </summary>
/// <returns></returns>
public static List<Model.TestPlanTrainingItem> getTestTraining()
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getDataLists = (from x in db.Training_TestTraining
orderby x.TrainingCode
select new Model.TestPlanTrainingItem
{
TrainingTypeId = x.TrainingId,
TrainingTypeName = x.TrainingName,
}).ToList();
return getDataLists;
}
}
#endregion
}
}

View File

@ -132,6 +132,36 @@ namespace BLL
}
}
/// <summary>
/// 设备下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isSpecial">项目id</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitSpecialEquipmentDropDownList2(DropDownList dropName, string type, bool isShowPlease)
{
dropName.DataValueField = "SpecialEquipmentId";
dropName.DataTextField = "SpecialEquipmentName";
dropName.DataSource = GetSpecialEquipmentList2(type);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 获取机具设备列表
/// </summary>
/// <returns></returns>
public static List<Model.Base_SpecialEquipment> GetSpecialEquipmentList2(string type)
{
return (from x in Funs.DB.Base_SpecialEquipment
where x.SpecialEquipmentType == type || x.IsSpecial == true
orderby x.SpecialEquipmentCode
select x).ToList();
}
/// <summary>
/// 设备下拉框
/// </summary>

View File

@ -1165,29 +1165,30 @@
#region 5
sb.Append("<table width=\"100% \" cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;font-size: 10.5pt;\">");
sb.Append("<tr style=\"height: 30px\">");
sb.AppendFormat("<td align=\"left\" colspan=\"13\" style=\"width: 100%;font-weight: bold;\">{0}</td> "
sb.AppendFormat("<td align=\"left\" colspan=\"14\" style=\"width: 100%;font-weight: bold;\">{0}</td> "
, "5、本月大型、特种设备投入情况");
sb.Append("</tr>");
sb.Append("<tr style=\"height: 20px\">");
sb.AppendFormat("<td align=\"center\" style=\"width: 16%;\" rowspan=\"2\">{0}</td> ", "单位名称");
sb.AppendFormat("<td align=\"center\" colspan=\"6\">{0}</td> ", "特种设备");
sb.AppendFormat("<td align=\"center\" colspan=\"4\">{0}</td> ", "大型机具设备");
sb.AppendFormat("<td align=\"center\" >{0}</td> ", "特殊机具设备");
sb.AppendFormat("<td align=\"center\" colspan=\"2\">{0}</td> ", "特殊机具设备");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\" rowspan=\"2\">{0}</td> ", "合计");
sb.Append("</tr>");
sb.Append("<tr style=\"height: 20px\">");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "汽车吊");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "履带吊");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\" >{0}</td> ", "塔吊");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "门式起重机");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "升降机");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "叉车");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "挖掘机");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "装载机");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "拖板车");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "桩机");
sb.AppendFormat("<td align=\"center\" style=\"width: 7%;\">{0}</td> ", "吊篮");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "汽车吊");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "履带吊");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\" >{0}</td> ", "塔吊");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "门式起重机");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "升降机");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "叉车");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "挖掘机");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "装载机");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "拖板车");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "桩机");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "吊篮");
sb.AppendFormat("<td align=\"center\" style=\"width: 6%;\">{0}</td> ", "高空作业升降平台");
sb.Append("</tr>");
var getMonthReport5 = from x in Funs.DB.SeDin_MonthReport5
where x.MonthReportId == monthReportId
@ -1211,9 +1212,10 @@
sb.AppendFormat("<td align=\"left\">{0}</td> ", item.D03);
sb.AppendFormat("<td align=\"left\">{0}</td> ", item.D04);
sb.AppendFormat("<td align=\"left\">{0}</td> ", item.S01);
sb.AppendFormat("<td align=\"left\">{0}</td> ", item.S02);
sb.AppendFormat("<td align=\"left\">{0}</td> ", (item.T01 ?? 0) + (item.T02 ?? 0) + (item.T03 ?? 0) + (item.T04 ?? 0) + (item.T05 ?? 0) + (item.T06 ?? 0)
+ (item.D01 ?? 0) + (item.D02 ?? 0) + (item.D03 ?? 0) + (item.D04 ?? 0) + (item.S01 ?? 0));
+ (item.D01 ?? 0) + (item.D02 ?? 0) + (item.D03 ?? 0) + (item.D04 ?? 0) + (item.S01 ?? 0) + (item.S02 ?? 0));
sb.Append("</tr>");
}
@ -1230,6 +1232,7 @@
int sumd03 = getMonthReport5.Sum(x => x.D03) ?? 0;
int sumd04 = getMonthReport5.Sum(x => x.D04) ?? 0;
int sums01 = getMonthReport5.Sum(x => x.S01) ?? 0;
int sums02 = getMonthReport5.Sum(x => x.S02) ?? 0;
sb.AppendFormat("<td align=\"left\">{0}</td> ", sumt01);
sb.AppendFormat("<td align=\"left\">{0}</td> ", sumt02);
sb.AppendFormat("<td align=\"left\">{0}</td> ", sumt03);
@ -1241,7 +1244,8 @@
sb.AppendFormat("<td align=\"left\">{0}</td> ", sumd03);
sb.AppendFormat("<td align=\"left\">{0}</td> ", sumd04);
sb.AppendFormat("<td align=\"left\">{0}</td> ", sums01);
sb.AppendFormat("<td align=\"left\">{0}</td> ", sumt02 + sumt03 + sumt01 + sumt05 + sumt06 + sumd01 + sumd02 + sumd03 + sumd04 + sums01);
sb.AppendFormat("<td align=\"left\">{0}</td> ", sums02);
sb.AppendFormat("<td align=\"left\">{0}</td> ", sumt01 + sumt02 + sumt03 + sumt04+ sumt05 + sumt06 + sumd01 + sumd02 + sumd03 + sumd04 + sums01+ sums02);
sb.Append("</tr>");
sb.Append("</table>");

View File

@ -19,15 +19,41 @@ namespace BLL
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProductionSchedulingPlanId == productionSchedulingPlanId);
}
/// <summary>
/// 根据单位工程、流水段、材质、口径获取排产计划
/// </summary>
/// <param name="loginProjectId"></param>
/// <param name="flowingSection"></param>
/// <param name="unitWorkId"></param>
/// <param name="material"></param>
/// <param name="caliber"></param>
/// <returns></returns>
public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlan(string loginProjectId, string flowingSection, string unitWorkId, string material, string caliber)
{
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.PipelineId == unitWorkId && e.Material == material && e.Caliber == caliber);
}
public static List<Model.HJGL_ProductionSchedulingPlan> GetProductionSchedulingPlanByMaterialLists(string loginProjectId, string flowingSection, string unitWorkId, string material)
/// <summary>
/// 根据单位工程、流水段获取排产计划信息
/// </summary>
/// <param name="loginProjectId"></param>
/// <param name="flowingSection"></param>
/// <param name="unitWorkId"></param>
/// <returns></returns>
public static List<Model.HJGL_ProductionSchedulingPlan> GetProductionSchedulingPlanByFlowingSection(string loginProjectId, string flowingSection, string unitWorkId)
{
return (from x in Funs.DB.HJGL_ProductionSchedulingPlan where x.ProjectId == loginProjectId && x.FlowNum == flowingSection && x.PipelineId == unitWorkId && x.Material == material select x).ToList();
return (from x in Funs.DB.HJGL_ProductionSchedulingPlan where x.ProjectId == loginProjectId && x.FlowNum == flowingSection && x.PipelineId == unitWorkId select x).ToList();
}
/// <summary>
/// 根据单位工程获取排产计划信息
/// </summary>
/// <param name="loginProjectId"></param>
/// <param name="unitWorkId"></param>
/// <returns></returns>
public static List<Model.HJGL_ProductionSchedulingPlan> GetProductionSchedulingPlanByUnitWorkId(string loginProjectId, string unitWorkId)
{
return (from x in Funs.DB.HJGL_ProductionSchedulingPlan where x.ProjectId == loginProjectId && x.PipelineId == unitWorkId select x).ToList();
}
/// <summary>

View File

@ -23,7 +23,7 @@ namespace BLL
from projectType in projectTypeJoin.DefaultIfEmpty()
join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
from sysConst in sysConstJoin.DefaultIfEmpty()
where project.ProjectState == "1" && project.MasterSysId != null
where project.ProjectState == "1" && project.MasterSysId != null && project.IsCNCECShow == true
select new ProjectOutput
{
ProjectId = project.ProjectId,

View File

@ -793,7 +793,7 @@ namespace FineUIPro.Web.CQMS.WBS
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT ControlItemAndCycleId,ControlItemAndCycleCode,InitControlItemCode,ControlItemContent,ControlPoint,ControlItemDef,HGForms,SHForms,Standard,ClauseNo,CheckNum,case CheckAcceptType when '1' then '关键工序验收' when '2' then '特殊过程验收' when '3' then '隐蔽工程验收' when '4' then '单位工程一次验收' when '5' then '材料进场复验' else '' end as CheckAcceptType "
string strSql = @"SELECT ControlItemAndCycleId,ControlItemAndCycleCode,InitControlItemCode,ControlItemContent,ControlPoint,ControlItemDef,HGForms,SHForms,Standard,ClauseNo,CheckNum,case CheckAcceptType when '1' then '关键工序验收' when '2' then '特殊过程验收' when '3' then '隐蔽工程验收' when '4' then '单位工程验收' when '5' then '分部工程验收' when '6' then '分项工程验收' else '' end as CheckAcceptType "
+ @" FROM WBS_ControlItemAndCycle ";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " where WorkPackageId = @WorkPackageId and IsApprove=1 ";

View File

@ -50,7 +50,7 @@
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="UnitWorkId,FlowingSection" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField=""
AllowSorting="true" SortField="UnitWorkName,FlowingSection" SortDirection="ASC"
AllowPaging="true" IsDatabasePaging="true" PageSize="15"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnSort="Grid2_Sort" OnPageIndexChange="Grid2_PageIndexChange"
EnableTextSelection="True" Height="300px" OnRowDataBound="Grid2_RowDataBound">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
@ -75,26 +75,46 @@
DataField="PlanEndDate" SortField="PlanEndDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
</f:RenderField>
<f:RenderField HeaderText="总天数" ColumnID="TotalDays"
<%--<f:RenderField HeaderText="总天数" ColumnID="TotalDays"
DataField="TotalDays" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="剩余天数" ColumnID="RemainingDays"
</f:RenderField>--%>
<f:TemplateField HeaderText="有效总天数" HeaderTextAlign="Center" TextAlign="Center" ColumnID="TotalDays" Width="110px">
<ItemTemplate>
<asp:Label ID="lblTotalDay" runat="server" Text='<%# getTotalDays(Eval("ProjectId").ToString(),Eval("UnitWorkId").ToString(),Eval("FlowingSection").ToString()) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%--<f:RenderField HeaderText="剩余天数" ColumnID="RemainingDays"
DataField="RemainingDays" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="平均每日应完成工作量" ColumnID="AvgDayCompleteDia"
</f:RenderField>--%>
<f:TemplateField HeaderText="剩余天数" HeaderTextAlign="Center" TextAlign="Center" ColumnID="RemainingDays" Width="90px">
<ItemTemplate>
<asp:Label ID="lblRemainingDays" runat="server" Text='<%# getRemainingDays(Eval("ProjectId").ToString(),Eval("UnitWorkId").ToString(),Eval("FlowingSection").ToString()) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%--<f:RenderField HeaderText="平均每日应完成工作量" ColumnID="AvgDayCompleteDia"
DataField="AvgDayCompleteDia" SortField="AvgDayCompleteDia" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="180px">
</f:RenderField>
</f:RenderField>--%>
<f:TemplateField HeaderText="平均每日应完成工作量" HeaderTextAlign="Center" TextAlign="Center" ColumnID="AvgDayCompleteDia" Width="180px">
<ItemTemplate>
<asp:Label ID="lblAvgDayCompleteDia" runat="server" Text='<%# getAvgDayCompleteDia(Eval("ProjectId").ToString(),Eval("UnitWorkId").ToString(),Eval("FlowingSection").ToString()) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField HeaderText="当日完成工作量" ColumnID="CurrentDayCompletedDia"
DataField="CurrentDayCompletedDia" SortField="CurrentDayCompletedDia" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="140px">
</f:RenderField>
<f:RenderField HeaderText="次日应完成量(平均)" ColumnID="NextDayComplete"
<%--<f:RenderField HeaderText="次日应完成量(平均)" ColumnID="NextDayComplete"
DataField="NextDayComplete" SortField="NextDayComplete" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="150px">
</f:RenderField>
</f:RenderField>--%>
<f:TemplateField HeaderText="次日应完成量(平均)" HeaderTextAlign="Center" TextAlign="Center" ColumnID="NextDayComplete" Width="150px">
<ItemTemplate>
<asp:Label ID="lblNextDayComplete" runat="server" Text='<%# getNextDayComplete(Eval("ProjectId").ToString(),Eval("UnitWorkId").ToString(),Eval("FlowingSection").ToString()) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField HeaderText="累计已完成量" ColumnID="totalCompletedDia"
DataField="totalCompletedDia" SortField="totalCompletedDia" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
@ -107,8 +127,8 @@
DataField="WelderCount" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
</f:RenderField>
<f:RenderField HeaderText="预警焊工数量" ColumnID="WarningWelderCount"
DataField="WarningWelderCount" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
<f:RenderField HeaderText="焊工日功效" ColumnID="WarningWelderCount"
DataField="WarningWelderCount" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
</f:RenderField>
</Columns>
@ -135,8 +155,8 @@
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ProductionSchedulingPlanId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ProductionSchedulingPlanId"
AllowSorting="true" SortField="FlowNum,Material,Caliber" SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True" OnRowDataBound="Grid1_RowDataBound" >
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True" OnRowDataBound="Grid1_RowDataBound">
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
@ -317,9 +337,6 @@
me.updateCellValue(rowId, 'AvgDailyWorkload', avgDailyWorkload.toFixed(2));//平均每天工作量
me.updateCellValue(rowId, 'NextDayCompleteDyne', nextDayCompleteDyne.toFixed(2));//次日应完成量
}
}
</script>
</body>

View File

@ -7,6 +7,7 @@ using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.PreDesign
{
@ -199,7 +200,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
e.Node.Nodes.Clear();
BindNodes(e.Node);
}
}
#endregion
@ -211,6 +211,153 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
#region
string projectId = this.CurrUser.LoginProjectId;
string steelType = string.Empty;//材质id
//统计生产看板当日已完成量、次日应完成量、累计已完成量、已完成百分比、已完成百分比汇总
if (tvControlItem.SelectedNode.CommandName == "流水段")//点击流水段
{
var planLists = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanByFlowingSection(projectId, tvControlItem.SelectedNode.Text, tvControlItem.SelectedNode.ParentNode.NodeID);
if (planLists.Count > 0)
{
foreach (var item in planLists)
{
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanById(item.ProductionSchedulingPlanId);
if (plan != null)
{
if (plan.Material == "碳钢")
{
steelType = "1";
}
else if (plan.Material == "不锈钢")
{
steelType = "2";
}
else if (plan.Material == "铬钼钢")
{
steelType = "3";
}
else if (plan.Material == "低合金钢")
{
steelType = "4";
}
else if (plan.Material == "镍合金钢")
{
steelType = "5";
}
else if (plan.Material == "钛合金钢")
{
steelType = "6";
}
else if (plan.Material == "其他")
{
steelType = "7";
}
//当日已完成量
var currentDay = BLL.WeldJointService.GetCurrentDaySizeSum(projectId, plan.PipelineId, plan.FlowNum, steelType, plan.Caliber);
if (currentDay != null)
{
plan.OnDayCompleteDyne = currentDay;
}
else
{
plan.OnDayCompleteDyne = 0;
}
plan.CompletedCount = BLL.WeldJointService.GetSizeSum(projectId, plan.PipelineId, plan.FlowNum, steelType, plan.Caliber, "2");//累计已完成量
if (plan.Dain > 0)
{
plan.CompletedRate = (plan.CompletedCount / plan.Dain) * 100;//已完成百分比
}
else
{
plan.CompletedRate = 0;
}
if (plan.PriorityTotalDyne > 0)
{
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(projectId, plan.PipelineId, plan.FlowNum, "2");//完成总达因
plan.TotalCompletedRate = (completeDinSum / plan.PriorityTotalDyne) * 100;//已完成百分比汇总
}
else
{
plan.TotalCompletedRate = 0;
}
BLL.ProductionSchedulingPlanService.UpdateProductionSchedulingPlan(plan);
}
}
}
}
else if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)//点击单位工程
{
var planLists = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanByUnitWorkId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.NodeID);
if (planLists.Count > 0)
{
foreach (var item in planLists)
{
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanById(item.ProductionSchedulingPlanId);
if (plan != null)
{
if (plan.Material == "碳钢")
{
steelType = "1";
}
else if (plan.Material == "不锈钢")
{
steelType = "2";
}
else if (plan.Material == "铬钼钢")
{
steelType = "3";
}
else if (plan.Material == "低合金钢")
{
steelType = "4";
}
else if (plan.Material == "镍合金钢")
{
steelType = "5";
}
else if (plan.Material == "钛合金钢")
{
steelType = "6";
}
else if (plan.Material == "其他")
{
steelType = "7";
}
//当日已完成量
var currentDay = BLL.WeldJointService.GetCurrentDaySizeSum(projectId, plan.PipelineId, plan.FlowNum, steelType, plan.Caliber);
if (currentDay != null)
{
plan.OnDayCompleteDyne = currentDay;
}
else
{
plan.OnDayCompleteDyne = 0;
}
plan.CompletedCount = BLL.WeldJointService.GetSizeSum(projectId, plan.PipelineId, plan.FlowNum, steelType, plan.Caliber, "2");//累计已完成量
if (plan.Dain > 0)
{
plan.CompletedRate = (plan.CompletedCount / plan.Dain) * 100;//已完成百分比
}
else
{
plan.CompletedRate = 0;
}
if (plan.PriorityTotalDyne > 0)
{
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(projectId, plan.PipelineId, plan.FlowNum, "2");//完成总达因
plan.TotalCompletedRate = (completeDinSum / plan.PriorityTotalDyne) * 100;//已完成百分比汇总
}
else
{
plan.TotalCompletedRate = 0;
}
BLL.ProductionSchedulingPlanService.UpdateProductionSchedulingPlan(plan);
}
}
}
}
#endregion
this.BindGrid();
}
@ -597,34 +744,22 @@ namespace FineUIPro.Web.HJGL.PreDesign
var newPlan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanById(rowId);
if (newPlan != null)
{
if (!string.IsNullOrEmpty(values.Value<string>("TotalPriority")))
{
newPlan.TotalPriority = values.Value<string>("TotalPriority");
}
else
if (!string.IsNullOrEmpty(totalPriority))
{
newPlan.TotalPriority = totalPriority;
totalPriority = string.Empty;
}
else
{
newPlan.TotalPriority = values.Value<string>("TotalPriority");
totalPriority = newPlan.TotalPriority;
}
newPlan.PlanStartDate = Funs.GetNewDateTime(values.Value<string>("PlanStartDate"));
newPlan.PlanEndDate = Funs.GetNewDateTime(values.Value<string>("PlanEndDate"));
newPlan.Days = Funs.GetNewInt(values.Value<string>("Days"));
newPlan.AvgDailyWorkload = Funs.GetNewDecimal(values.Value<string>("AvgDailyWorkload"));
newPlan.NextDayCompleteDyne = Funs.GetNewDecimal(values.Value<string>("NextDayCompleteDyne"));
BLL.ProductionSchedulingPlanService.UpdateProductionSchedulingPlan(newPlan);
//更新合并单元格的总达因(按材质)优先级
if (!string.IsNullOrEmpty(newPlan.TotalPriority))
{
var pLists = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanByMaterialLists(this.CurrUser.LoginProjectId, newPlan.FlowNum, newPlan.PipelineId, newPlan.Material);
foreach (var item in pLists)
{
if (string.IsNullOrEmpty(item.TotalPriority))
{
totalPriority = newPlan.TotalPriority;
}
}
}
}
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
@ -932,16 +1067,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
#region
protected void ddlPageSize2_SelectedIndexChanged(object sender, EventArgs e)
{
Grid2.PageSize = Convert.ToInt32(ddlPageSize2.SelectedValue);
this.BindGrid2();
}
protected void Grid2_Sort(object sender, GridSortEventArgs e)
{
this.BindGrid2();
}
protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e)
{
this.BindGrid2();
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid2()
{
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
@ -961,17 +1104,22 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// <param name="e"></param>
protected void Grid2_RowDataBound(object sender, GridRowEventArgs e)
{
DataRowView row = e.DataItem as DataRowView;
//DataRowView row = e.DataItem as DataRowView;
double avgDailyWorkload = 0;
double nextDayCompleteDyne = 0;
if (row["AvgDayCompleteDia"] != null && !string.IsNullOrEmpty(row["AvgDayCompleteDia"].ToString()))
{
avgDailyWorkload = Convert.ToDouble(row["AvgDayCompleteDia"]);//平均每日应完成工作量
}
if (row["NextDayComplete"] != null && !string.IsNullOrEmpty(row["NextDayComplete"].ToString()))
{
nextDayCompleteDyne = Convert.ToDouble(row["NextDayComplete"]);//次日应完成量
}
//if (row["AvgDayCompleteDia"] != null && !string.IsNullOrEmpty(row["AvgDayCompleteDia"].ToString()))
//{
// avgDailyWorkload = Convert.ToDouble(row["AvgDayCompleteDia"]);//平均每日应完成工作量
//}
//if (row["NextDayComplete"] != null && !string.IsNullOrEmpty(row["NextDayComplete"].ToString()))
//{
// nextDayCompleteDyne = Convert.ToDouble(row["NextDayComplete"]);//次日应完成量
//}
//avgDailyWorkload=(e.RowID["lblAvgDayCompleteDia") as AspNet.Label).Text
avgDailyWorkload = Convert.ToDouble((e.Row.FindControl("lblAvgDayCompleteDia") as AspNet.Label).Text);//平均每日应完成工作量
nextDayCompleteDyne = Convert.ToDouble((e.Row.FindControl("lblNextDayComplete") as AspNet.Label).Text); //次日应完成量(平均)
if (avgDailyWorkload < nextDayCompleteDyne)
{
e.RowCssClass = "color1";
@ -979,5 +1127,168 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
#endregion
#region
/// <summary>
/// 获取有效总天数
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitWorkId"></param>
/// <param name="flowNum"></param>
/// <returns></returns>
public static int getTotalDays(string projectId, string unitWorkId, string flowNum)
{
var lists = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanByFlowingSection(projectId, flowNum, unitWorkId);
List<(DateTime, DateTime)> combinedList = new List<(DateTime, DateTime)>();
foreach (var item in lists)
{
if (item.PlanStartDate.HasValue && item.PlanEndDate.HasValue)
{
var dateRanges = new List<(DateTime, DateTime)>
{
(new DateTime(item.PlanStartDate.Value.Year, item.PlanStartDate.Value.Month, item.PlanStartDate.Value.Day), new DateTime(item.PlanEndDate.Value.Year, item.PlanEndDate.Value.Month, item.PlanEndDate.Value.Day)),
};
combinedList.AddRange(dateRanges);
}
}
return GetEffectiveDaysLinq(combinedList);
}
/// <summary>
/// 获取剩余天数
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitWorkId"></param>
/// <param name="flowNum"></param>
/// <returns></returns>
public static int getRemainingDays(string projectId, string unitWorkId, string flowNum)
{
var lists = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanByFlowingSection(projectId, flowNum, unitWorkId);
List<(DateTime, DateTime)> combinedList = new List<(DateTime, DateTime)>();
foreach (var item in lists)
{
if (item.PlanStartDate.HasValue && item.PlanEndDate.HasValue)
{
if (item.PlanEndDate > DateTime.Now)
{
var dateRanges = new List<(DateTime, DateTime)>
{
(new DateTime(item.PlanStartDate.Value.Year, item.PlanStartDate.Value.Month, item.PlanStartDate.Value.Day), new DateTime(item.PlanEndDate.Value.Year, item.PlanEndDate.Value.Month, item.PlanEndDate.Value.Day)),
};
combinedList.AddRange(dateRanges);
}
}
}
return GetEffectiveDaysLinq(combinedList);
}
/// <summary>
/// 获取平均每日应完成工作量
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitWorkId"></param>
/// <param name="flowNum"></param>
/// <returns></returns>
public static double getAvgDayCompleteDia(string projectId, string unitWorkId, string flowNum)
{
double AvgDayCompleteDia = 0;
int totalDays = 0;
var lists = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanByFlowingSection(projectId, flowNum, unitWorkId);
List<(DateTime, DateTime)> combinedList = new List<(DateTime, DateTime)>();
foreach (var item in lists)
{
if (item.PlanStartDate.HasValue && item.PlanEndDate.HasValue)
{
var dateRanges = new List<(DateTime, DateTime)>
{
(new DateTime(item.PlanStartDate.Value.Year, item.PlanStartDate.Value.Month, item.PlanStartDate.Value.Day), new DateTime(item.PlanEndDate.Value.Year, item.PlanEndDate.Value.Month, item.PlanEndDate.Value.Day)),
};
combinedList.AddRange(dateRanges);
}
}
totalDays = GetEffectiveDaysLinq(combinedList);
///总达因
decimal? dia = (from x in Funs.DB.HJGL_WeldJoint
join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowNum
&& x.JointAttribute == "预制口"
select x.Size).Sum();
if (totalDays > 0)
{
//平均每日应完成工作量=总达因/有效总天数
AvgDayCompleteDia = Math.Round(Convert.ToDouble(dia / totalDays), 2);
}
return AvgDayCompleteDia;
}
/// <summary>
/// 获取次日应完成量(平均)
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitWorkId"></param>
/// <param name="flowNum"></param>
/// <returns></returns>
public static double getNextDayComplete(string projectId, string unitWorkId, string flowNum)
{
double nextDayComplete = 0;
int remainingDays = 0;
var lists = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanByFlowingSection(projectId, flowNum, unitWorkId);
List<(DateTime, DateTime)> combinedList = new List<(DateTime, DateTime)>();
foreach (var item in lists)
{
if (item.PlanStartDate.HasValue && item.PlanEndDate.HasValue)
{
if (item.PlanEndDate > DateTime.Now)
{
var dateRanges = new List<(DateTime, DateTime)>
{
(new DateTime(item.PlanStartDate.Value.Year, item.PlanStartDate.Value.Month, item.PlanStartDate.Value.Day), new DateTime(item.PlanEndDate.Value.Year, item.PlanEndDate.Value.Month, item.PlanEndDate.Value.Day)),
};
combinedList.AddRange(dateRanges);
}
}
}
remainingDays = GetEffectiveDaysLinq(combinedList);
///总达因
decimal? totalDia = (from x in Funs.DB.HJGL_WeldJoint
join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowNum
&& x.JointAttribute == "预制口"
select x.Size).Sum();
//完成达因
decimal? completedDia = (from x in Funs.DB.HJGL_WeldJoint
join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowNum
&& x.JointAttribute == "预制口" && x.WeldingDailyId != null && x.WeldingDailyId != ""
select x.Size).Sum();
if (remainingDays > 0)
{
//次日应完成量(平均)=(总达因-完成达因)/剩余天数
nextDayComplete = Math.Round(Convert.ToDouble((totalDia - completedDia) / remainingDays), 2);
}
return nextDayComplete;
}
/// <summary>
/// 生成所有日期并去重
/// </summary>
/// <param name="dateRanges"></param>
/// <returns></returns>
public static int GetEffectiveDaysLinq(List<(DateTime start, DateTime end)> dateRanges)
{
if (dateRanges == null || !dateRanges.Any())
return 0;
// 生成所有日期并去重
var allDates = dateRanges
.SelectMany(range =>
Enumerable.Range(0, (range.end - range.start).Days + 1)
.Select(offset => range.start.AddDays(offset).Date))
.Distinct();
return allDates.Count();
}
#endregion
}
}

View File

@ -7,12 +7,10 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.PreDesign
{
namespace FineUIPro.Web.HJGL.PreDesign {
public partial class ProductionSchedulingPlan
{
public partial class ProductionSchedulingPlan {
/// <summary>
/// form1 控件。
@ -113,6 +111,42 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.Grid Grid2;
/// <summary>
/// lblTotalDay 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTotalDay;
/// <summary>
/// lblRemainingDays 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblRemainingDays;
/// <summary>
/// lblAvgDayCompleteDia 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblAvgDayCompleteDia;
/// <summary>
/// lblNextDayComplete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNextDayComplete;
/// <summary>
/// ToolbarSeparator2 控件。
/// </summary>

View File

@ -618,13 +618,20 @@
</f:GroupField>
<f:GroupField ColumnID="Sp" HeaderText="特殊机具设备" TextAlign="Center" Width="110px" HeaderTextAlign="Center">
<Columns>
<f:RenderField Width="110px" ColumnID="S01" DataField="S01" FieldType="Int"
<f:RenderField Width="70px" ColumnID="S01" DataField="S01" FieldType="Int"
HeaderText="吊篮" HeaderTextAlign="Center">
<Editor>
<f:NumberBox NoDecimal="true" NoNegative="true" runat="server">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="140px" ColumnID="S02" DataField="S02" FieldType="Int"
HeaderText="高空作业升降平台" HeaderTextAlign="Center">
<Editor>
<f:NumberBox NoDecimal="true" NoNegative="true" runat="server">
</f:NumberBox>
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
<f:BoundField ColumnID="TotalNum" DataField="TotalNum" Width="60px" HeaderTextAlign="Center"

View File

@ -396,6 +396,7 @@ namespace FineUIPro.Web.HSSE.Manager
int sumD03 = getLists.Sum(x => x.D03) ?? 0;
int sumD04 = getLists.Sum(x => x.D04) ?? 0;
int sumS01 = getLists.Sum(x => x.S01) ?? 0;
int sumS02 = getLists.Sum(x => x.S02) ?? 0;
if (this.GvSeDinMonthReport4Item.Rows.Count > 0)
{
JObject summary = new JObject
@ -412,7 +413,8 @@ namespace FineUIPro.Web.HSSE.Manager
{ "D03", sumD03 },
{ "D04", sumD04 },
{ "S01", sumS01 },
{ "TotalNum", sumS01+sumT02+sumT03+sumT04+sumT05+sumT06+sumD01+sumD02+sumD03+sumD04+sumS01 }
{ "S02", sumS02 },
{ "TotalNum", sumT01+sumT02+sumT03+sumT04+sumT05+sumT06+sumD01+sumD02+sumD03+sumD04+sumS01+sumS02 }
};
GvSeDinMonthReport5Item.SummaryData = summary;
}
@ -878,6 +880,7 @@ namespace FineUIPro.Web.HSSE.Manager
var d03 = values.Value<string>("D03");
var d04 = values.Value<string>("D04");
var s01 = values.Value<string>("S01");
var s02 = values.Value<string>("S02");
Model.SeDinMonthReport5Item newReport5Item = new Model.SeDinMonthReport5Item();
newReport5Item.UnitName = unitName;
newReport5Item.T01 = Funs.GetNewInt(t01);
@ -891,6 +894,7 @@ namespace FineUIPro.Web.HSSE.Manager
newReport5Item.D03 = Funs.GetNewInt(d03);
newReport5Item.D04 = Funs.GetNewInt(d04);
newReport5Item.S01 = Funs.GetNewInt(s01);
newReport5Item.S02 = Funs.GetNewInt(s02);
listSeDinMonthReport5Item.Add(newReport5Item);
}
newItem.SeDinMonthReport5Item = listSeDinMonthReport5Item;

View File

@ -58,7 +58,7 @@
SortField="UnitName" FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SpecialEquipmentName" DataField="SpecialEquipmentName"
<f:RenderField Width="120px" ColumnID="SpecialEquipmentName" DataField="SpecialEquipmentName"
SortField="SpecialEquipmentName" FieldType="String"
HeaderText="设备类别" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>

View File

@ -50,7 +50,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit
UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
///机具设备下拉框
SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpSpecialEquipmentId, true, true);
SpecialEquipmentService.InitSpecialEquipmentDropDownList2(this.drpSpecialEquipmentId, "3", true);
this.EquipmentQualityId = Request.Params["EquipmentQualityId"];
if (!string.IsNullOrEmpty(this.EquipmentQualityId))
{

View File

@ -99,15 +99,15 @@ namespace FineUIPro.Web.ProjectData
UnitWork.ProjectId = this.CurrUser.LoginProjectId;
UnitWork.UnitWorkCode = this.txtUnitWorkCode.Text.Trim();
UnitWork.UnitWorkName = this.txtUnitWorkName.Text.Trim();
if (this.drpUnit.SelectedValue != BLL.Const._Null)
{
UnitWork.UnitId = string.Join(",", this.drpUnit.SelectedValueArray);
}
else
if (this.drpUnit.SelectedValue == BLL.Const._Null && this.drpUnit.SelectedValueArray.Length == 1)
{
Alert.ShowInTop("请选择施工单位!");
return;
}
else
{
UnitWork.UnitId = string.Join(",", this.drpUnit.SelectedValueArray);
}
if (this.drpSupervisorUnit.SelectedValue != BLL.Const._Null)
{
UnitWork.SupervisorUnitId = this.drpSupervisorUnit.SelectedValue;

View File

@ -117,6 +117,14 @@
get;
set;
}
/// <summary>
/// 特殊机具设备-高空作业升降平台
/// </summary>
public int? S02
{
get;
set;
}
/// <summary>
/// 合计

View File

@ -12267,7 +12267,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")]
public string ApproveIdea
{
get
@ -97820,10 +97820,10 @@ namespace Model
private string _TrainNumber;
private string _TrainNumberId;
private System.Nullable<int> _TypeInt;
private string _TrainNumberId;
private string _CompileMan;
private System.Nullable<System.DateTime> _CompileDate;
@ -97858,10 +97858,10 @@ namespace Model
partial void OnReceiveDateChanged();
partial void OnTrainNumberChanging(string value);
partial void OnTrainNumberChanged();
partial void OnTrainNumberIdChanging(string value);
partial void OnTrainNumberIdChanged();
partial void OnTypeIntChanging(System.Nullable<int> value);
partial void OnTypeIntChanged();
partial void OnTrainNumberIdChanging(string value);
partial void OnTrainNumberIdChanged();
partial void OnCompileManChanging(string value);
partial void OnCompileManChanged();
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
@ -98115,26 +98115,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")]
public string TrainNumberId
{
get
{
return this._TrainNumberId;
}
set
{
if ((this._TrainNumberId != value))
{
this.OnTrainNumberIdChanging(value);
this.SendPropertyChanging();
this._TrainNumberId = value;
this.SendPropertyChanged("TrainNumberId");
this.OnTrainNumberIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")]
public System.Nullable<int> TypeInt
{
@ -98155,6 +98135,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")]
public string TrainNumberId
{
get
{
return this._TrainNumberId;
}
set
{
if ((this._TrainNumberId != value))
{
this.OnTrainNumberIdChanging(value);
this.SendPropertyChanging();
this._TrainNumberId = value;
this.SendPropertyChanged("TrainNumberId");
this.OnTrainNumberIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
public string CompileMan
{
@ -109402,7 +109402,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(500)")]
public string Rectification
{
get
@ -109528,7 +109528,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(500)")]
public string Measures
{
get
@ -162243,7 +162243,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")]
public string AttentPerson
{
get
@ -193226,7 +193226,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string ProjectDescription
{
get
@ -193346,7 +193346,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string CalculationRule
{
get
@ -193406,7 +193406,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")]
public string ConstructionSubcontractor
{
get
@ -193790,7 +193790,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")]
public System.Nullable<decimal> WorkPackageEstimate
{
get
@ -194095,6 +194095,16 @@ namespace Model
private string _ProjectId;
private string _ContractId;
private string _OrderCode;
private System.Nullable<System.DateTime> _OrderInDate;
private System.Nullable<System.DateTime> _OrderOutDate;
private string _MaterialRequisitionUnit;
private System.Nullable<int> _State;
private string _InvoiceCode;
@ -194123,16 +194133,6 @@ namespace Model
private string _CreateUser;
private string _ContractId;
private System.Nullable<System.DateTime> _OrderInDate;
private string _OrderCode;
private System.Nullable<System.DateTime> _OrderOutDate;
private string _MaterialRequisitionUnit;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -194141,6 +194141,16 @@ namespace Model
partial void OnInvoiceIdChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
partial void OnContractIdChanging(string value);
partial void OnContractIdChanged();
partial void OnOrderCodeChanging(string value);
partial void OnOrderCodeChanged();
partial void OnOrderInDateChanging(System.Nullable<System.DateTime> value);
partial void OnOrderInDateChanged();
partial void OnOrderOutDateChanging(System.Nullable<System.DateTime> value);
partial void OnOrderOutDateChanged();
partial void OnMaterialRequisitionUnitChanging(string value);
partial void OnMaterialRequisitionUnitChanged();
partial void OnStateChanging(System.Nullable<int> value);
partial void OnStateChanged();
partial void OnInvoiceCodeChanging(string value);
@ -194169,16 +194179,6 @@ namespace Model
partial void OnCreateDateChanged();
partial void OnCreateUserChanging(string value);
partial void OnCreateUserChanged();
partial void OnContractIdChanging(string value);
partial void OnContractIdChanged();
partial void OnOrderInDateChanging(System.Nullable<System.DateTime> value);
partial void OnOrderInDateChanged();
partial void OnOrderCodeChanging(string value);
partial void OnOrderCodeChanged();
partial void OnOrderOutDateChanging(System.Nullable<System.DateTime> value);
partial void OnOrderOutDateChanged();
partial void OnMaterialRequisitionUnitChanging(string value);
partial void OnMaterialRequisitionUnitChanged();
#endregion
public PHTGL_Invoice()
@ -194226,6 +194226,106 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")]
public string ContractId
{
get
{
return this._ContractId;
}
set
{
if ((this._ContractId != value))
{
this.OnContractIdChanging(value);
this.SendPropertyChanging();
this._ContractId = value;
this.SendPropertyChanged("ContractId");
this.OnContractIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")]
public string OrderCode
{
get
{
return this._OrderCode;
}
set
{
if ((this._OrderCode != value))
{
this.OnOrderCodeChanging(value);
this.SendPropertyChanging();
this._OrderCode = value;
this.SendPropertyChanged("OrderCode");
this.OnOrderCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")]
public System.Nullable<System.DateTime> OrderInDate
{
get
{
return this._OrderInDate;
}
set
{
if ((this._OrderInDate != value))
{
this.OnOrderInDateChanging(value);
this.SendPropertyChanging();
this._OrderInDate = value;
this.SendPropertyChanged("OrderInDate");
this.OnOrderInDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")]
public System.Nullable<System.DateTime> OrderOutDate
{
get
{
return this._OrderOutDate;
}
set
{
if ((this._OrderOutDate != value))
{
this.OnOrderOutDateChanging(value);
this.SendPropertyChanging();
this._OrderOutDate = value;
this.SendPropertyChanged("OrderOutDate");
this.OnOrderOutDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")]
public string MaterialRequisitionUnit
{
get
{
return this._MaterialRequisitionUnit;
}
set
{
if ((this._MaterialRequisitionUnit != value))
{
this.OnMaterialRequisitionUnitChanging(value);
this.SendPropertyChanging();
this._MaterialRequisitionUnit = value;
this.SendPropertyChanged("MaterialRequisitionUnit");
this.OnMaterialRequisitionUnitChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")]
public System.Nullable<int> State
{
@ -194506,106 +194606,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")]
public string ContractId
{
get
{
return this._ContractId;
}
set
{
if ((this._ContractId != value))
{
this.OnContractIdChanging(value);
this.SendPropertyChanging();
this._ContractId = value;
this.SendPropertyChanged("ContractId");
this.OnContractIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")]
public System.Nullable<System.DateTime> OrderInDate
{
get
{
return this._OrderInDate;
}
set
{
if ((this._OrderInDate != value))
{
this.OnOrderInDateChanging(value);
this.SendPropertyChanging();
this._OrderInDate = value;
this.SendPropertyChanged("OrderInDate");
this.OnOrderInDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")]
public string OrderCode
{
get
{
return this._OrderCode;
}
set
{
if ((this._OrderCode != value))
{
this.OnOrderCodeChanging(value);
this.SendPropertyChanging();
this._OrderCode = value;
this.SendPropertyChanged("OrderCode");
this.OnOrderCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")]
public System.Nullable<System.DateTime> OrderOutDate
{
get
{
return this._OrderOutDate;
}
set
{
if ((this._OrderOutDate != value))
{
this.OnOrderOutDateChanging(value);
this.SendPropertyChanging();
this._OrderOutDate = value;
this.SendPropertyChanged("OrderOutDate");
this.OnOrderOutDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")]
public string MaterialRequisitionUnit
{
get
{
return this._MaterialRequisitionUnit;
}
set
{
if ((this._MaterialRequisitionUnit != value))
{
this.OnMaterialRequisitionUnitChanging(value);
this.SendPropertyChanging();
this._MaterialRequisitionUnit = value;
this.SendPropertyChanged("MaterialRequisitionUnit");
this.OnMaterialRequisitionUnitChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -232638,6 +232638,8 @@ namespace Model
private System.Nullable<int> _S01;
private System.Nullable<int> _S02;
private EntityRef<SeDin_MonthReport> _SeDin_MonthReport;
#region
@ -232672,6 +232674,8 @@ namespace Model
partial void OnD04Changed();
partial void OnS01Changing(System.Nullable<int> value);
partial void OnS01Changed();
partial void OnS02Changing(System.Nullable<int> value);
partial void OnS02Changed();
#endregion
public SeDin_MonthReport5()
@ -232964,6 +232968,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_S02", DbType="Int")]
public System.Nullable<int> S02
{
get
{
return this._S02;
}
set
{
if ((this._S02 != value))
{
this.OnS02Changing(value);
this.SendPropertyChanging();
this._S02 = value;
this.SendPropertyChanged("S02");
this.OnS02Changed();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SeDin_MonthReport5_SeDin_MonthReport5", Storage="_SeDin_MonthReport", ThisKey="MonthReportId", OtherKey="MonthReportId", IsForeignKey=true)]
public SeDin_MonthReport SeDin_MonthReport
{
@ -314138,7 +314162,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")]
public string Name
{
get
@ -314715,7 +314739,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@ -314906,7 +314930,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@ -320245,7 +320269,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@ -321717,7 +321741,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@ -331268,7 +331292,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")]
public string ContractNo
{
get
@ -331288,7 +331312,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")]
public string UnitWorks
{
get

View File

@ -244,5 +244,27 @@ namespace WebAPI.Controllers
return responeData;
}
#endregion
#region
/// <summary>
/// 获取考试试题类型列表
/// </summary>
/// <param name="testPlanId">考试计划ID</param>
/// <returns>试题类型</returns>
public Model.ResponeData getTestTrainingList()
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APITestPlanService.getTestTraining();
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}