|
@@ -4679,8 +4679,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
|
|
|
@Override
|
|
|
public Map<String, String> demandZGWZPL(PmDemandReqVo pmDemandReqVo) {
|
|
|
- List<StatisticalChartsResVo> resVos = new ArrayList<>();
|
|
|
- Long userId = SecurityUtils.getUserId();
|
|
|
+ LoginUser user = SecurityUtils.getLoginUser();
|
|
|
//是-1就是查询自己及子孙级以下,否则只查询指定部门
|
|
|
List<Long> demandIdAll = isQueryAll(pmDemandReqVo.getPurchaseDeptId());
|
|
|
List<Long> queryZD = isQueryZD(pmDemandReqVo.getPurchaseDeptId());
|
|
@@ -4693,15 +4692,14 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
//(1)执行率:年度计划中已提报需求项目占比
|
|
|
//项目状态为“需求待审核”及以后的所有项目状态的项目数/年度计划中所有的项目数*100%
|
|
|
LambdaQueryWrapper<PlanYears> lw = new LambdaQueryWrapper<PlanYears>();
|
|
|
- if (!userId.equals(Long.valueOf("1"))) {
|
|
|
- lw.eq(PlanYears::getCreated, userId);
|
|
|
+ if (!user.getUserId().equals(Long.valueOf("1"))) {
|
|
|
+ lw.eq(PlanYears::getPurchaseDeptId, user.getDeptId());
|
|
|
}
|
|
|
lw.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete.getCode());
|
|
|
lw.orderBy(true, false, PlanYears::getCreateTime);
|
|
|
-
|
|
|
//年度计划中所有的项目数
|
|
|
long countPlanYear = planYearsService.count(lw);
|
|
|
- //状态为“需求待审核”以后的数据
|
|
|
+ //状态为“需求待审核”及以后的数据
|
|
|
List<String> afsh = new ArrayList<>();
|
|
|
afsh.add(PmProjectStatus.DEMAND_WAIT_AUDIT.getCode());
|
|
|
afsh.add(PmProjectStatus.DEMAND_AUDIT_RETURN.getCode());
|
|
@@ -4771,8 +4769,8 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
//(5)偏差率,计划偏差率=(未按计划时间受领数量+临时受理需求数量)/季度计划数量
|
|
|
//未按计划时间受领数量:季度计划模块审核通过但没有进行需求提报并超过计划需求提报时间的计划数
|
|
|
LambdaQueryWrapper<PlanQuarter> planQuarterLw = new LambdaQueryWrapper<>();
|
|
|
- if (!userId.equals(Long.valueOf("1"))) {
|
|
|
- planQuarterLw.eq(PlanQuarter::getCreated, userId);
|
|
|
+ if (!user.getUserId().equals(Long.valueOf("1"))) {
|
|
|
+ planQuarterLw.eq(PlanQuarter::getCreated, user.getDeptId());
|
|
|
}
|
|
|
planQuarterLw.eq(PlanQuarter::getPlanType, "0");
|
|
|
planQuarterLw.eq(PlanQuarter::getDelFlay, DataIsDelete.DataNOTDelete.getCode());
|
|
@@ -4792,8 +4790,8 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
int countXmWtj = Integer.parseInt(num5.get("countNumber").toString());
|
|
|
//临时受理需求数量:临时计划模块的计划进行需求提报后的计划数量
|
|
|
LambdaQueryWrapper<PlanQuarter> planLinshiLw = new LambdaQueryWrapper<>();
|
|
|
- if (!userId.equals(Long.valueOf("1"))) {
|
|
|
- planLinshiLw.eq(PlanQuarter::getCreated, userId);
|
|
|
+ if (!user.getUserId().equals(Long.valueOf("1"))) {
|
|
|
+ planLinshiLw.eq(PlanQuarter::getCreated, user.getDeptId());
|
|
|
}
|
|
|
planLinshiLw.eq(PlanQuarter::getPlanType, "1");
|
|
|
planLinshiLw.eq(PlanQuarter::getDelFlay, DataIsDelete.DataNOTDelete.getCode());
|
|
@@ -4821,6 +4819,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
LambdaQueryWrapper<PmDemand> dmLp = new LambdaQueryWrapper<>();
|
|
|
|
|
|
String lfbl = "";
|
|
|
+ String lfblmm = "";
|
|
|
if (ObjectUtils.isEmpty(pmDemandReqVo.getDeptList()) && ObjectUtils.isEmpty(pmDemandReqVo.getDemandIdAll())) {
|
|
|
lfbl = "0.00%";
|
|
|
} else {
|
|
@@ -4835,6 +4834,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
List<Long> deIds = demandList.stream().map(PmDemand::getDemandId).collect(Collectors.toList());
|
|
|
//出现流废标情况的项目
|
|
|
List<PmBidFailureHis> failureHis = pmBidFailureHisService.listByIds(deIds);
|
|
|
+ lfblmm = failureHis.size() + "";
|
|
|
lfbl = getPercent(failureHis.size(), countAfRwxd);
|
|
|
}
|
|
|
|
|
@@ -4845,6 +4845,12 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
result.put("zhhl", zhhl);
|
|
|
result.put("pcl", pcl);
|
|
|
result.put("lfbl", lfbl);
|
|
|
+ //result.put("需求待审核及以后项目数,年度计划数", countAfsh + "," + Math.toIntExact(countPlanYear));
|
|
|
+ //result.put("规划属性和待审核及以后项目数,年度计划数", resVo1.getNum() + "," + Math.toIntExact(countPlanYear));
|
|
|
+ //result.put("合同待填制”及以后项目,需求待审核及以后项目数", countAfhttz + "," + countAfsh);
|
|
|
+ //result.put("任务下达后项目,任务过90日未填制", countAfRwxd + "," + countAf90xm);
|
|
|
+ //result.put("季度未提报,临时已提报,季度计划数量", countXmWtj + "," + countXmYtj + "," + planQuarter);
|
|
|
+ //result.put("流废标数,下达任务后项目", lfblmm + "," + countAfRwxd);
|
|
|
return result;
|
|
|
}
|
|
|
|