JiangPengLi il y a 4 mois
Parent
commit
b982c0dcd3

+ 1 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java

@@ -158,4 +158,5 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     // 前期手续数量
     private String preProceNum;
     private String preEndNum;
+    private String yearAmtSj;
 }

+ 13 - 3
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java

@@ -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类统计

+ 2 - 1
projects/src/main/webapp/vmodules/subject/subInfo/tz/cb_sum.jsp

@@ -1090,8 +1090,9 @@
                         {type: 'numbers', fixed: 'left', align: 'center', width: 44, title: '序号'},
                         {field: 'subName', fixed: 'left', title: '项目名称', width: 200, templet: '#subName'},
                         {field: 'subjectName', fixed: 'left', title: '项目所在地', width: 200},
+                        {field: 'content', fixed: 'left', title: '项目建设内容', width: 200},
                         {
-                            field: 'amtTotal', fixed: 'left', title: '项目建设内容(亿元)', width: 200, templet: function (d) {
+                            field: 'amtTotal', fixed: 'left', title: '计划总投资(亿元)', width: 200, templet: function (d) {
                                 return (d.amtTotal / 10000).toFixed(2) + "亿元";
                             }
                         },

+ 1 - 1
projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp

@@ -1103,7 +1103,7 @@
                             }
                         },
                         {field: 'tcDate',  title: '建成投产时间', width: 200,templet: '#date'},
-                        {field: 'amtTotal', title: '年度投资', width: 200},
+                        {field: 'yearAmtSj', title: '年度投资', width: 200},
                         {field: 'progress',  title: '进展情况', width: 200},
                         {field: 'remark', title: '备注', width: 200},
                         {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right'},

+ 2 - 1
projects/src/main/webapp/vmodules/subject/subInfo/tz/new_sum.jsp

@@ -1112,8 +1112,9 @@
                         {field: 'subName', fixed: 'left', title: '项目名称', width: 200, templet: '#subName'},
 
                         {field: 'subjectName', title: '项目所在地', minwidth: 200},
+                        {field: 'content', title: '项目建设内容', minwidth: 200},
                         {
-                            field: 'amtTotal', title: '项目建设内容(亿元)', minwidth: 200, templet: function (d) {
+                            field: 'amtTotal', title: '计划总投资(亿元)', minwidth: 200, templet: function (d) {
                                 return (d.amtTotal / 10000).toFixed(2) + "亿元";
                             }
                         },