|
@@ -91,6 +91,7 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
private RptContDao rptContDao;
|
|
|
@Autowired
|
|
|
private SubPreNewService subPreNewService;
|
|
|
+
|
|
|
@Override
|
|
|
public Map<String, Integer> getWarningBySubId(String subId) {
|
|
|
|
|
@@ -187,7 +188,7 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
if (CollectionUtil.isNotEmpty(data)) {
|
|
|
for (SubInfoGxj e : data) {
|
|
|
// 查询月报中的建设进度
|
|
|
- if (!Lists.newArrayList("1","2").contains(e.getStatus())){
|
|
|
+ if (!Lists.newArrayList("1", "2").contains(e.getStatus())) {
|
|
|
String hql = "FROM RptCont WHERE logicDeleteFlag = 0 AND subId = :subId AND kind = :kind AND content IS NOT NULL ORDER BY kjMonth DESC";
|
|
|
Query query = rptContDao.createQuery(hql);
|
|
|
query.setParameter("subId", e.getSubId());
|
|
@@ -196,17 +197,26 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
Object result = query.uniqueResult();
|
|
|
Optional.ofNullable(result).map(o -> (RptCont) o).ifPresent(o -> e.setProgress(o.getContent()));
|
|
|
}
|
|
|
+
|
|
|
byKind.stream()
|
|
|
.filter(k -> e.getSubjectId().equals(k.getCode()))
|
|
|
.findFirst()
|
|
|
.ifPresent(k -> e.setSubjectName(k.getTitle()));
|
|
|
- if ("2".equals(e.getStatus())){
|
|
|
+ if ("2".equals(e.getStatus())) {
|
|
|
// 新建库查询前期手续
|
|
|
List<SubPreNewResultVO> preList = subPreNewService.listBySubId(e.getSubId());
|
|
|
Map<String, Long> numMap = preList.stream().collect(Collectors.groupingBy(SubPreNewResultVO::getStatusConf, Collectors.counting()));
|
|
|
e.setPreProceNum(numMap.getOrDefault("1", 0L) + "");
|
|
|
e.setPreEndNum(numMap.getOrDefault("2", 0L) + "");
|
|
|
}
|
|
|
+ // 在建项目年度投资
|
|
|
+ if ("3".equals(e.getStatus())) {
|
|
|
+ Object o = rptContDao.queryForObjectBySql("SELECT sum(src.amt) AS yearAmtSj FROM sub_rpt_cont src WHERE src.logic_delete_flag = 0 AND src.kj_month >= ? AND src.sub_id=? GROUP BY src.sub_id", DateUtil.thisYear() + "01", e.getSubId());
|
|
|
+ if (o != null) {
|
|
|
+ Object o1 = ((Map<String, Object>) o).get("yearAmtSj");
|
|
|
+ e.setYearAmtSj(o1 != null ? o1.toString() : "");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
page.setTotalCount(pageInfo.getTotal());
|
|
@@ -217,7 +227,7 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
public StatisticsVO queryStatistics(SubInfoQueryTzVO queryVO, LoginUserVO loginUser) {
|
|
|
List<SubInfoGxj> list = subInfoMapper.queryStatistics(queryVO);
|
|
|
long num = 0;
|
|
|
- if(StringUtils.isNotBlank(queryVO.getStatus())){
|
|
|
+ if (StringUtils.isNotBlank(queryVO.getStatus())) {
|
|
|
num = list.stream().filter(e -> queryVO.getStatus().equals(e.getStatus())).count();
|
|
|
}
|
|
|
// abc类统计
|