fix:施工人力预警
This commit is contained in:
@@ -63,9 +63,12 @@
|
||||
<f:RenderField Width="100px" ColumnID="Quantity" DataField="Quantity"
|
||||
HeaderText="计划人力" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ActualQuantity" DataField="ActualQuantity"
|
||||
<f:RenderField Width="100px" ColumnID="num" DataField="num"
|
||||
HeaderText="实际考勤" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="Bias" DataField="Bias"
|
||||
HeaderText="偏差" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu"/>
|
||||
|
||||
@@ -127,23 +127,24 @@ namespace FineUIPro.Web.JDGL.SGManPower
|
||||
{
|
||||
string strSql =
|
||||
@"SELECT
|
||||
p.Id,
|
||||
p.ProjectId,
|
||||
p.UnitId,
|
||||
p.UnitWorkId,
|
||||
p.WorkPostId,
|
||||
p.Version,
|
||||
p.Quantity,
|
||||
p.PlanDate,
|
||||
ISNULL(a.ActualQuantity, 0) AS ActualQuantity
|
||||
FROM JDGL_SGManPower p
|
||||
LEFT JOIN (
|
||||
SELECT * from View_EmployInOutRecord
|
||||
) a ON p.ProjectId = a.ProjectId
|
||||
AND p.UnitId = a.UnitId
|
||||
AND p.WorkPostId = a.PostId
|
||||
AND p.PlanDate = a.RecordDate
|
||||
AND ISNULL(p.UnitWorkId, '') = ISNULL(a.UnitWorkId, '') where p.Version = '" + Version + "'";
|
||||
p.Id,
|
||||
p.ProjectId,
|
||||
p.UnitId,
|
||||
p.UnitWorkId,
|
||||
p.WorkPostId,
|
||||
p.Version,
|
||||
p.Quantity,
|
||||
p.PlanDate,
|
||||
ISNULL(a.num, 0) AS num,
|
||||
(CASE WHEN p.Quantity > 0 AND ABS(CAST((p.Quantity - ISNULL(a.num, 0)) AS FLOAT) / p.Quantity) > 0.1
|
||||
THEN ABS(CAST((p.Quantity - ISNULL(a.num, 0)) AS FLOAT) / p.Quantity)
|
||||
ELSE 0 end ) as Bias
|
||||
FROM JDGL_SGManPower p
|
||||
LEFT JOIN ( SELECT ProjectId,UnitId,WorkPostId,IntoOutTime,WorkAreaId,num FROM SitePerson_Checking_Statistics ) a ON p.ProjectId = a.ProjectId
|
||||
AND p.UnitId = a.UnitId
|
||||
AND p.WorkPostId = a.WorkPostId
|
||||
AND p.PlanDate = a.IntoOutTime
|
||||
AND (CHARINDEX(',' + p.UnitWorkId + ',', ',' + ISNULL(a.WorkAreaId, '') + ',') > 0 OR (ISNULL(a.WorkAreaId, '') = '' AND ISNULL(p.UnitWorkId, '') = '')) where p.Version = '" + Version + "'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
|
||||
Reference in New Issue
Block a user