Browse Source

重点项目库新增查询接口

Wayne 4 months ago
parent
commit
01579e9cff

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

@@ -35,5 +35,5 @@ public interface SubInfoMapper {
 
 
     List<SubInfoGxj> queryPage(@Param("vo") SubInfoQueryTzVO queryVO);
     List<SubInfoGxj> queryPage(@Param("vo") SubInfoQueryTzVO queryVO);
 
 
-//    List<SubFixCbVo> subFixCbAll(@Param("subFixCbSearch")SubFixCbSearch subFixCbSearch);
+    List<SubFixCbVo> subFixCbAll(@Param("subFixCbSearch") SubFixCbSearch subFixCbSearch);
 }
 }

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

@@ -180,35 +180,39 @@
         </where>
         </where>
     </select>
     </select>
 
 
-<!--    <select id="subFixCbAll" resultType="com.rtrh.projects.modules.projects.vo.SubFixCbVo">-->
-<!--        SELECT sub_info.sub_name as subName,sub_info.subject_id as subjectId,sub_info.content as content,sub_info.amt_total as amtTotal,-->
-<!--               sub_info.progress as progress,sub_info.remark as remark-->
-<!--        FROM sub_fix-->
-<!--        LEFT JOIN sub_info ON sub_fix.sub_id = sub_info.id-->
-<!--        WHERE sub_fix.status = 1-->
-<!--        AND sub_fix.logic_delete_flag = 0-->
-<!--        AND sub_info.logic_delete_flag = 0-->
-<!--        <if test="subKeyCbSearch.year != null and subKeyCbSearch.year != ''">-->
-<!--            AND sub_fix.year = #{subKeyCbSearch.year}-->
-<!--        </if>-->
-<!--        <if test="subKeyCbSearch.subName != null and subKeyCbSearch.subName != ''">-->
-<!--            AND sub_info.sub_name LIKE CONCAT('%', #{subKeyCbSearch.subName}, '%')-->
-<!--        </if>-->
-<!--        <if test="subKeyCbSearch.subjectId != null and subKeyCbSearch.subjectId != ''">-->
-<!--            AND sub_info.subject_id = #{subKeyCbSearch.subjectId}-->
-<!--        </if>-->
-<!--        <if test="subKeyCbSearch.indusKind != null and subKeyCbSearch.indusKind != ''">-->
-<!--            AND sub_info.indus_kind = #{subKeyCbSearch.indusKind}-->
-<!--        </if>-->
-<!--        <if test="subKeyCbSearch.startAmt != null">-->
-<!--            AND sub_fix.amt_total >= #{subKeyCbSearch.startAmt}-->
-<!--        </if>-->
-<!--        <if test="subKeyCbSearch.endAmt != null">-->
-<!--            AND sub_fix.amt_total <= #{subKeyCbSearch.endAmt}-->
-<!--        </if>-->
-<!--        <if test="subKeyCbSearch.sbdw != null and subKeyCbSearch.sbdw != ''">-->
-<!--            AND sub_fix.sbdw LIKE CONCAT('%', #{subKeyCbSearch.sbdw}, '%')-->
-<!--        </if>-->
-<!--    </select>-->
+    <select id="subFixCbAll" resultType="com.rtrh.projects.modules.projects.vo.SubFixCbVo">
+        SELECT sub_info.id as id,
+               sub_info.sub_name as subName,
+               sub_info.subject_id as subjectId,
+               sub_info.content as content,
+               sub_info.amt_total as amtTotal,
+               sub_info.progress as progress,
+               sub_info.remark as remark
+        FROM sub_fix
+        LEFT JOIN sub_info ON sub_fix.sub_id = sub_info.id
+        WHERE sub_fix.status = 1
+        AND sub_info.logic_delete_flag = 0
+        <if test="subFixCbSearch.year != null and subFixCbSearch.year != ''">
+            AND sub_fix.year = #{subFixCbSearch.year}
+        </if>
+        <if test="subFixCbSearch.subName != null and subFixCbSearch.subName != ''">
+            AND sub_info.sub_name LIKE CONCAT('%', #{subFixCbSearch.subName}, '%')
+        </if>
+        <if test="subFixCbSearch.subjectId != null and subFixCbSearch.subjectId != ''">
+            AND sub_info.subject_id = #{subFixCbSearch.subjectId}
+        </if>
+        <if test="subFixCbSearch.indusKind != null and subFixCbSearch.indusKind != ''">
+            AND sub_info.indus_kind = #{subFixCbSearch.indusKind}
+        </if>
+        <if test="subFixCbSearch.startAmt != null">
+            AND sub_info.amt_total >= #{subFixCbSearch.startAmt}
+        </if>
+        <if test="subFixCbSearch.endAmt != null">
+            AND sub_info.amt_total &lt;= #{subFixCbSearch.endAmt}
+        </if>
+        <if test="subFixCbSearch.sbdw != null and subFixCbSearch.sbdw != ''">
+            AND sub_info.sbdw LIKE CONCAT('%', #{subFixCbSearch.sbdw}, '%')
+        </if>
+    </select>
 
 
 </mapper>
 </mapper>

+ 1 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoQueryService.java

@@ -327,7 +327,7 @@ public interface SubInfoQueryService {
 
 
 	Map<String, Integer> getWarningBySubId(String subId);
 	Map<String, Integer> getWarningBySubId(String subId);
 
 
-	PageInfo<SubFixCbVo> subFixCbAll(SubFixCbSearch subFixCbSearch);
+	Page subFixCbAll(SubFixCbSearch subFixCbSearch);
 
 
 	Page queryPage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO);
 	Page queryPage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO);
 }
 }

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

@@ -148,11 +148,15 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
     }
     }
 
 
     @Override
     @Override
-    public PageInfo<SubFixCbVo> subFixCbAll(SubFixCbSearch subFixCbSearch) {
+    public Page subFixCbAll(SubFixCbSearch subFixCbSearch) {
         // 启动分页查询,pageNum 是当前页,pageSize 是每页大小
         // 启动分页查询,pageNum 是当前页,pageSize 是每页大小
         PageHelper.startPage(subFixCbSearch.getPageNo(), subFixCbSearch.getPageSize());
         PageHelper.startPage(subFixCbSearch.getPageNo(), subFixCbSearch.getPageSize());
-//        List<SubFixCbVo> subFixCbVoList = subInfoMapper.subFixCbAll(subFixCbSearch);
-        return new PageInfo<>(new ArrayList<>());
+        List<SubFixCbVo> subFixCbVoList = subInfoMapper.subFixCbAll(subFixCbSearch);
+        PageInfo<SubFixCbVo> pageInfo = new PageInfo<>(subFixCbVoList);
+        Page page = new Page();
+        page.setList(pageInfo.getList());
+        page.setTotalCount(pageInfo.getTotal());
+        return page;
     }
     }
 
 
     @Override
     @Override
@@ -164,6 +168,7 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
             queryVO.setEndAmt(new BigDecimal(queryVO.getEndAmt()).multiply(new BigDecimal("10000")).toString());
             queryVO.setEndAmt(new BigDecimal(queryVO.getEndAmt()).multiply(new BigDecimal("10000")).toString());
         }
         }
         List<SubInfoGxj> data = subInfoMapper.queryPage(queryVO);
         List<SubInfoGxj> data = subInfoMapper.queryPage(queryVO);
+
         PageInfo<SubInfoGxj> pageInfo = new PageInfo<>(data);
         PageInfo<SubInfoGxj> pageInfo = new PageInfo<>(data);
         page.setList(data);
         page.setList(data);
         List<TSystable> byKind = tSysTableService.getByKind(SysTableKind.JSDD);
         List<TSystable> byKind = tSysTableService.getByKind(SysTableKind.JSDD);

+ 2 - 2
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoQueryApiController.java

@@ -120,8 +120,8 @@ public class SubInfoQueryApiController extends BaseController {
     public ListMessage subFixCbAll(@RequestBody SubFixCbSearch subFixCbSearch) {
     public ListMessage subFixCbAll(@RequestBody SubFixCbSearch subFixCbSearch) {
         ListMessage message = new ListMessage();
         ListMessage message = new ListMessage();
         try {
         try {
-            PageInfo<SubFixCbVo> pageData = subInfoQueryService.subFixCbAll(subFixCbSearch);
-            message.add(pageData.getList(), pageData.getTotal());
+            Page pageData = subInfoQueryService.subFixCbAll(subFixCbSearch);
+            message.add(pageData.getList(), pageData.getTotalCount());
         } catch (Exception e) {
         } catch (Exception e) {
             logger.error("", e);
             logger.error("", e);
             message.add("查询失败");
             message.add("查询失败");

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

@@ -1175,7 +1175,7 @@
                             {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 200, templet: '#subName'},
                             {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 200, templet: '#subName'},
                             {field: 'subjectId', fixed: 'left', title: '建设地点', minWidth: 200},
                             {field: 'subjectId', fixed: 'left', title: '建设地点', minWidth: 200},
                             {field: 'content', fixed: 'left', title: '建设内容', minWidth: 200},
                             {field: 'content', fixed: 'left', title: '建设内容', minWidth: 200},
-                            {field: 'amtTotal', title: '投资金额', minWidth: 250, templet: '#amt', sort: true},
+                            {field: 'amtTotal', fixed: 'left', title: '投资金额', minWidth: 250},
                             {field: 'progress', fixed: 'left', title: '项目进度', minWidth: 200},
                             {field: 'progress', fixed: 'left', title: '项目进度', minWidth: 200},
                             {field: 'remark', fixed: 'left', title: '备注', minWidth: 200},
                             {field: 'remark', fixed: 'left', title: '备注', minWidth: 200},
                             {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},
                             {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},