项目管理分析,整体效能分析
This commit is contained in:
parent
d87253cab2
commit
81d7a6eeaf
|
|
@ -42,8 +42,16 @@ public class OverallEfficiencyAnalysisServiceImpl implements OverallEfficiencyAn
|
||||||
res.put("计划施工天数",0);
|
res.put("计划施工天数",0);
|
||||||
res.put("有效施工天数",0);
|
res.put("有效施工天数",0);
|
||||||
}else {
|
}else {
|
||||||
res.put("计划施工天数",overallEfficiencyNew.getPlanDay());
|
if (overallEfficiencyNew.getPlanDay()<0){
|
||||||
res.put("有效施工天数",overallEfficiencyNew.getEffectiveDay());
|
res.put("计划施工天数",0);
|
||||||
|
}else {
|
||||||
|
res.put("计划施工天数",overallEfficiencyNew.getPlanDay());
|
||||||
|
}
|
||||||
|
if (overallEfficiencyNew.getEffectiveDay()<0){
|
||||||
|
res.put("有效施工天数",0);
|
||||||
|
}else {
|
||||||
|
res.put("有效施工天数",overallEfficiencyNew.getEffectiveDay());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//质量分析
|
//质量分析
|
||||||
|
|
@ -72,7 +80,7 @@ public class OverallEfficiencyAnalysisServiceImpl implements OverallEfficiencyAn
|
||||||
}else {
|
}else {
|
||||||
res.put("当前进度",overallEfficiencyProgress.getCurrentProgress()+"%");
|
res.put("当前进度",overallEfficiencyProgress.getCurrentProgress()+"%");
|
||||||
res.put("计划进度",overallEfficiencyProgress.getPlanProgress()+"%");
|
res.put("计划进度",overallEfficiencyProgress.getPlanProgress()+"%");
|
||||||
res.put("进度偏差",overallEfficiencyProgress.getDeviationPercent()+"%");
|
res.put("进度偏差",overallEfficiencyProgress.getDeviationPercent());
|
||||||
}
|
}
|
||||||
//成本分析 1--计划 2--实际
|
//成本分析 1--计划 2--实际
|
||||||
overallEfficiency.setDataType("1");
|
overallEfficiency.setDataType("1");
|
||||||
|
|
@ -90,7 +98,7 @@ public class OverallEfficiencyAnalysisServiceImpl implements OverallEfficiencyAn
|
||||||
res.put("实际成本",overallEfficiencyCost2.getDataMoney());
|
res.put("实际成本",overallEfficiencyCost2.getDataMoney());
|
||||||
}
|
}
|
||||||
if(StringUtils.isEmpty(overallEfficiencyCost) || StringUtils.isEmpty(overallEfficiencyCost2)){
|
if(StringUtils.isEmpty(overallEfficiencyCost) || StringUtils.isEmpty(overallEfficiencyCost2)){
|
||||||
res.put("实际成本",BigDecimal.ZERO);
|
res.put("缩减成本",BigDecimal.ZERO);
|
||||||
}else {
|
}else {
|
||||||
BigDecimal difference = overallEfficiencyCost2.getDataMoney().subtract(overallEfficiencyCost.getDataMoney()); // B - A
|
BigDecimal difference = overallEfficiencyCost2.getDataMoney().subtract(overallEfficiencyCost.getDataMoney()); // B - A
|
||||||
BigDecimal ratio = difference.divide(overallEfficiencyCost.getDataMoney(), 2, RoundingMode.HALF_UP); // 除法,保留scale位小数,四舍五入
|
BigDecimal ratio = difference.divide(overallEfficiencyCost.getDataMoney(), 2, RoundingMode.HALF_UP); // 除法,保留scale位小数,四舍五入
|
||||||
|
|
|
||||||
|
|
@ -61,16 +61,16 @@ public class ProjectDataServiceImpl implements ProjectDataService {
|
||||||
res.put("当前成本投入",0);
|
res.put("当前成本投入",0);
|
||||||
}else {
|
}else {
|
||||||
BigDecimal ratio = overallEfficiencyCost2.getDataMoney().divide(overallEfficiencyCost.getDataMoney(), 2, RoundingMode.HALF_UP); // 除法,保留scale位小数,四舍五入
|
BigDecimal ratio = overallEfficiencyCost2.getDataMoney().divide(overallEfficiencyCost.getDataMoney(), 2, RoundingMode.HALF_UP); // 除法,保留scale位小数,四舍五入
|
||||||
res.put("当前成本投入",ratio+"%");
|
res.put("当前成本投入",ratio);
|
||||||
}
|
}
|
||||||
//折线图
|
//折线图
|
||||||
SjConstructionProgress o = new SjConstructionProgress();
|
/* SjConstructionProgress o = new SjConstructionProgress();
|
||||||
o.setEndTime(projectData.getEndTime());
|
o.setEndTime(projectData.getEndTime());
|
||||||
o.setStartTime(projectData.getStartTime());
|
o.setStartTime(projectData.getStartTime());
|
||||||
List<SjConstructionProgress> echartsList = sjConstructionProgressMapper.selectProProgress(o);
|
List<SjConstructionProgress> echartsList = sjConstructionProgressMapper.selectProProgress(o);
|
||||||
Map<String, List<SjConstructionProgress>> groupedByProTypeEcharts = echartsList.stream()
|
Map<String, List<SjConstructionProgress>> groupedByProTypeEcharts = echartsList.stream()
|
||||||
.collect(Collectors.groupingBy(SjConstructionProgress::getProType));
|
.collect(Collectors.groupingBy(SjConstructionProgress::getProType));
|
||||||
res.put("项目情况详情",groupedByProTypeEcharts);
|
res.put("项目情况详情",groupedByProTypeEcharts);*/
|
||||||
//今日风险
|
//今日风险
|
||||||
int countNum=0 ;
|
int countNum=0 ;
|
||||||
projectData.setDateTime(DateUtils.getDate());
|
projectData.setDateTime(DateUtils.getDate());
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
GREATEST(
|
GREATEST(
|
||||||
0,
|
0,
|
||||||
DATEDIFF(
|
DATEDIFF(
|
||||||
LEAST(plan_end_time, #{startTime}),
|
LEAST(plan_end_time, #{endTime}),
|
||||||
GREATEST(plan_start_time, #{startTime})
|
GREATEST(plan_start_time, #{startTime})
|
||||||
) + 1
|
) + 1
|
||||||
)
|
)
|
||||||
|
|
@ -102,12 +102,12 @@
|
||||||
GREATEST(
|
GREATEST(
|
||||||
0,
|
0,
|
||||||
DATEDIFF(
|
DATEDIFF(
|
||||||
LEAST(end_time, #{startTime}),
|
LEAST(end_time, #{endTime}),
|
||||||
GREATEST(start_time, #{startTime})
|
GREATEST(start_time, #{startTime})
|
||||||
) + 1
|
) + 1
|
||||||
)
|
)
|
||||||
-- 进行中工序:从实际开始到查询结束的天数
|
-- 进行中工序:从实际开始到查询结束的天数
|
||||||
WHEN start_time IS NOT NULL AND end_time IS NULL AND #{startTime} >=start_time THEN
|
WHEN start_time IS NOT NULL AND end_time IS NULL AND #{endTime} >=start_time THEN
|
||||||
GREATEST(
|
GREATEST(
|
||||||
0,
|
0,
|
||||||
DATEDIFF(#{startTime}, GREATEST(start_time, #{startTime})) + 1
|
DATEDIFF(#{startTime}, GREATEST(start_time, #{startTime})) + 1
|
||||||
|
|
@ -128,11 +128,11 @@
|
||||||
GREATEST(
|
GREATEST(
|
||||||
0,
|
0,
|
||||||
DATEDIFF(
|
DATEDIFF(
|
||||||
LEAST(end_time, #{startTime}),
|
LEAST(end_time, #{endTime}),
|
||||||
GREATEST(start_time, #{startTime})
|
GREATEST(start_time, #{startTime})
|
||||||
) + 1
|
) + 1
|
||||||
)
|
)
|
||||||
WHEN start_time IS NOT NULL AND end_time IS NULL AND #{startTime} >= start_time THEN
|
WHEN start_time IS NOT NULL AND end_time IS NULL AND #{endTime} >= start_time THEN
|
||||||
GREATEST(
|
GREATEST(
|
||||||
0,
|
0,
|
||||||
DATEDIFF(#{startTime}, GREATEST(start_time, #{startTime})) + 1
|
DATEDIFF(#{startTime}, GREATEST(start_time, #{startTime})) + 1
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
GREATEST(
|
GREATEST(
|
||||||
0,
|
0,
|
||||||
DATEDIFF(
|
DATEDIFF(
|
||||||
LEAST(plan_end_time, #{startTime}),
|
LEAST(plan_end_time, #{endTime}),
|
||||||
GREATEST(plan_start_time, #{startTime})
|
GREATEST(plan_start_time, #{startTime})
|
||||||
) + 1
|
) + 1
|
||||||
)
|
)
|
||||||
|
|
@ -158,9 +158,9 @@
|
||||||
sj_construction_progress
|
sj_construction_progress
|
||||||
WHERE
|
WHERE
|
||||||
-- 筛选与查询时间段相关的记录
|
-- 筛选与查询时间段相关的记录
|
||||||
( #{startTime} >=plan_start_time AND plan_end_time >= #{startTime}) -- 计划时间在区间内
|
( #{endTime} >=plan_start_time AND plan_end_time >= #{startTime}) -- 计划时间在区间内
|
||||||
OR
|
OR
|
||||||
(start_time IS NOT NULL AND #{startTime} >=start_time) -- 实际已开始且在区间内
|
(start_time IS NOT NULL AND #{endTime} >=start_time) -- 实际已开始且在区间内
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getCost" resultType="com.securitycontrol.screen.domain.OverallEfficiency">
|
<select id="getCost" resultType="com.securitycontrol.screen.domain.OverallEfficiency">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue