|
@@ -4612,7 +4612,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
double d2 = y * 1.0;
|
|
double d2 = y * 1.0;
|
|
// 设置保留几位小数, “.”后面几个零就保留几位小数,这里设置保留2位小数
|
|
// 设置保留几位小数, “.”后面几个零就保留几位小数,这里设置保留2位小数
|
|
DecimalFormat decimalFormat = new DecimalFormat("##.00%");
|
|
DecimalFormat decimalFormat = new DecimalFormat("##.00%");
|
|
- if (d1 == 0) {
|
|
|
|
|
|
+ if (d1 == 0 || d2 == 0) {
|
|
return "0.00%";
|
|
return "0.00%";
|
|
}
|
|
}
|
|
return decimalFormat.format(d1 / d2);
|
|
return decimalFormat.format(d1 / d2);
|
|
@@ -4817,18 +4817,24 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
}
|
|
}
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
|
LambdaQueryWrapper<PmDemand> dmLp = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<PmDemand> dmLp = new LambdaQueryWrapper<>();
|
|
- if (pmDemandReqVo.getDemandIdAll().size() > 0) {
|
|
|
|
- dmLp.in(PmDemand::getDemandId, queryZD);
|
|
|
|
|
|
+
|
|
|
|
+ String lfbl = "";
|
|
|
|
+ if (ObjectUtils.isEmpty(pmDemandReqVo.getDeptList()) && ObjectUtils.isEmpty(pmDemandReqVo.getDemandIdAll())) {
|
|
|
|
+ lfbl = "0.00%";
|
|
} else {
|
|
} else {
|
|
- dmLp.in(PmDemand::getPurchaseDeptId, demandIdAll);
|
|
|
|
- }
|
|
|
|
|
|
+ if (pmDemandReqVo.getDemandIdAll().size() > 0) {
|
|
|
|
+ dmLp.in(PmDemand::getDemandId, queryZD);
|
|
|
|
+ } else {
|
|
|
|
+ dmLp.in(PmDemand::getPurchaseDeptId, demandIdAll);
|
|
|
|
+ }
|
|
|
|
|
|
- dmLp.gt(PmDemand::getPlanDemandSubTime, sdf.format(new Date()) + "-01-01 00:00:00");
|
|
|
|
- List<PmDemand> demandList = pmDemandMapper.selectList(dmLp);
|
|
|
|
- List<Long> deIds = demandList.stream().map(PmDemand::getDemandId).collect(Collectors.toList());
|
|
|
|
- //出现流废标情况的项目
|
|
|
|
- List<PmBidFailureHis> failureHis = pmBidFailureHisService.listByIds(deIds);
|
|
|
|
- String lfbl = getPercent(failureHis.size(), countAfRwxd);
|
|
|
|
|
|
+ dmLp.gt(PmDemand::getPlanDemandSubTime, sdf.format(new Date()) + "-01-01 00:00:00");
|
|
|
|
+ List<PmDemand> demandList = pmDemandMapper.selectList(dmLp);
|
|
|
|
+ List<Long> deIds = demandList.stream().map(PmDemand::getDemandId).collect(Collectors.toList());
|
|
|
|
+ //出现流废标情况的项目
|
|
|
|
+ List<PmBidFailureHis> failureHis = pmBidFailureHisService.listByIds(deIds);
|
|
|
|
+ lfbl = getPercent(failureHis.size(), countAfRwxd);
|
|
|
|
+ }
|
|
|
|
|
|
Map<String, String> result = new HashMap<>();
|
|
Map<String, String> result = new HashMap<>();
|
|
result.put("zxl", zxl);
|
|
result.put("zxl", zxl);
|