瀏覽代碼

项目4库bug修改

JiangPengLi 4 月之前
父節點
當前提交
84f30f62c8

+ 2 - 2
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml

@@ -188,10 +188,10 @@
                 and s.subject_id = #{vo.subjectId}
             </if>
             <if test="vo.indusKind!=null and vo.indusKind!=''">
-                <if test='vo.indusKind != "@com.rtrh.projects.modules.projects.enums.NullValueEnum@UNKNOWN_INDUS_KIND.code"'>
+                <if test='vo.indusKind != "UNKNOWN_INDUS_KIND"'>
                     and s.indus_kind like CONCAT(#{vo.indusKind}, '%')
                 </if>
-                <if test='vo.indusKind.toString() == "@com.rtrh.projects.modules.projects.enums.NullValueEnum@UNKNOWN_INDUS_KIND.code"'>
+                <if test='vo.indusKind.toString() == "UNKNOWN_INDUS_KIND"'>
                     AND ISNULL(s.indus_kind)
                 </if>
             </if>

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

@@ -166,17 +166,20 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
 
     @Override
     public List<SubInfoGxj> queryAll(LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
-        queryVO.setMonth(DateUtil.thisYear() +"");
+        queryVO.setMonth(DateUtil.thisYear() + "");
         List<SubInfoGxj> data = subInfoMapper.queryPage(queryVO);
         if (CollectionUtil.isEmpty(data)) {
             return new ArrayList<>();
         }
         List<String> ids = data.stream().map(SubInfoGxj::getId).collect(Collectors.toList());
-        // 项目前期手续办理情况
-        List<SubInfoFixDetailPreNew> preNewList = subInfoMapper.selectSubPreNewBySubIds(ids);
-        Map<String, List<SubInfoFixDetailPreNew>> preNewMap = preNewList.stream().collect(Collectors.groupingBy(SubInfoFixDetailPreNew::getSubId));
+        // [新建] 项目前期手续办理情况
+        Map<String, List<SubInfoFixDetailPreNew>> preNewMap = new HashMap<>();
+        if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())) {
+            List<SubInfoFixDetailPreNew> preNewList = subInfoMapper.selectSubPreNewBySubIds(ids);
+            preNewMap = preNewList.stream().collect(Collectors.groupingBy(SubInfoFixDetailPreNew::getSubId));
+        }
 
-        // 在建、投产查询项目 最新月报内容(建设进度)
+        // [在建、投产] 查询项目 最新月报内容(建设进度)
         Map<String, String> rptContentMap = new HashMap<>();
         if (Arrays.asList(SubInfoStatusEnum.ZJ.getCode(), SubInfoStatusEnum.TC.getCode()).contains(queryVO.getStatus())) {
             List<RptCont> rptContList = subInfoMapper.selectNewestMonthReport(ids);
@@ -251,21 +254,21 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
         if (StringUtils.isNotBlank(queryVO.getEndAmt())) {
             queryVO.setEndAmt(new BigDecimal(queryVO.getEndAmt()).multiply(new BigDecimal("10000")).toString());
         }
-        if (StringUtils.isNotBlank(queryVO.getIndusKinds())){
+        if (StringUtils.isNotBlank(queryVO.getIndusKinds())) {
             queryVO.setIndusKind(queryVO.getIndusKinds());
         }
 
 
         PageHelper.startPage(page.getPageNo(), page.getPageSize());
         List<SubInfoGxj> data = this.queryAll(loginUser, queryVO);
-        data.forEach(e->{
-            if (StringUtils.isNotBlank(e.getContent())){
+        data.forEach(e -> {
+            if (StringUtils.isNotBlank(e.getContent())) {
                 int maxLength = Math.min(e.getContent().length(), 100);
-                e.setContent(e.getContent().substring(0, maxLength)+"...");
+                e.setContent(e.getContent().substring(0, maxLength) + "...");
             }
-            if (StringUtils.isNotBlank(e.getProgress())){
+            if (StringUtils.isNotBlank(e.getProgress())) {
                 int maxLength = Math.min(e.getProgress().length(), 100);
-                e.setProgress(e.getProgress().substring(0, maxLength)+"...");
+                e.setProgress(e.getProgress().substring(0, maxLength) + "...");
             }
         });
         PageInfo<SubInfoGxj> pageInfo = new PageInfo<>(data);
@@ -348,8 +351,8 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
     }
 
     @Override
-    public List<SubFixGetBeginRateVo> subFixGetBeginRate(SubInfoQueryTzVO queryVO,List<String> indusKinds) {
-        return subInfoMapper.subFixGetBeginRate(queryVO,indusKinds);
+    public List<SubFixGetBeginRateVo> subFixGetBeginRate(SubInfoQueryTzVO queryVO, List<String> indusKinds) {
+        return subInfoMapper.subFixGetBeginRate(queryVO, indusKinds);
     }
 
     @Override