Browse Source

Merge branch 'master' of http://8.137.121.180:10880/longping/subject_gxj

Wayne 4 months ago
parent
commit
946550362d
33 changed files with 1704 additions and 236 deletions
  1. 32 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/enums/SubInfoStatusEnum.java
  2. 32 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInduMapper.java
  3. 44 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInduMapper.xml
  4. 5 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.java
  5. 136 75
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml
  6. 40 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubIndu.java
  7. 2 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java
  8. 3 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoQueryService.java
  9. 2 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java
  10. 79 42
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java
  11. 8 3
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java
  12. 2 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/SubInfoQueryTzVO.java
  13. 28 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoCbVO.java
  14. 33 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoTcVO.java
  15. 26 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoTotalInfoVO.java
  16. 33 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoXjVO.java
  17. 35 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoZjVO.java
  18. 36 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoZkVO.java
  19. 33 0
      projects-service/src/main/java/com/rtrh/projects/modules/system/service/ISubInduService.java
  20. 126 0
      projects-service/src/main/java/com/rtrh/projects/modules/system/service/impl/SubInduServiceImpl.java
  21. 6 3
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java
  22. 183 14
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java
  23. 47 0
      projects/src/main/java/com/rtrh/projects/web/controller/system/SubInduController.java
  24. 96 0
      projects/src/main/java/com/rtrh/projects/web/controller/system/api/SubInduApiController.java
  25. 5 0
      projects/src/main/webapp/vmodules/leftMenu.jsp
  26. 142 0
      projects/src/main/webapp/vmodules/subIndu/form.jsp
  27. 231 0
      projects/src/main/webapp/vmodules/subIndu/list.jsp
  28. 5 1
      projects/src/main/webapp/vmodules/subject/subInfo/editSubInfo.jsp
  29. 61 24
      projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp
  30. 49 18
      projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp
  31. 45 19
      projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp
  32. 52 19
      projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp
  33. 47 18
      projects/src/main/webapp/vmodules/subject/subInfo/tz/xmzk.jsp

+ 32 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/enums/SubInfoStatusEnum.java

@@ -0,0 +1,32 @@
+package com.rtrh.projects.modules.projects.enums;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+
+/**
+ * 4库 项目状态
+ */
+@Getter
+@AllArgsConstructor
+@JsonFormat(shape = JsonFormat.Shape.OBJECT)
+public enum SubInfoStatusEnum {
+
+    CB("1", "储备"),
+    XJ("2", "新建"),
+    ZJ("3", "在建"),
+    TC("9", "投产");
+
+    private final String code;
+    private final String desc;
+
+    public static SubInfoStatusEnum getEnum(String code) {
+        return Arrays.stream(values()).filter(x -> x.code.equals(code)).findFirst().orElse(null);
+    }
+    public static String getMessage(String code) {
+        SubInfoStatusEnum anEnum = getEnum(code);
+        return anEnum != null ? getEnum(code).desc : null;
+    }
+}

+ 32 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInduMapper.java

@@ -0,0 +1,32 @@
+package com.rtrh.projects.modules.projects.mapper;
+
+import com.rtrh.core.repository.mybatis.MyBatisRepository;
+import com.rtrh.projects.modules.projects.po.SubIndu;
+import com.rtrh.projects.vo.system.SysTableQueryVO;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 行业设置表 Mapper 接口
+ * </p>
+ *
+ * @author jiangpengli
+ * @since 2024-12-27
+ */
+@MyBatisRepository
+public interface SubInduMapper {
+    List<SubIndu> selectAll(@Param("vo") SysTableQueryVO queryVO);
+
+    SubIndu getById(@Param("id") String id);
+
+    void save(@Param("s") SubIndu subIndu);
+
+    void updateById(@Param("s") SubIndu subIndu);
+
+    @Update("update sub_indu set logic_delete_flag=1 where id=#{id}")
+    void del(@Param("id") String id);
+}

+ 44 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInduMapper.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.rtrh.projects.modules.projects.mapper.SubInduMapper" >
+    <insert id="save">
+        insert into sub_indu(id,code,title,last_id,logic_delete_flag,last_update_time)
+        values(#{s.id},#{s.code},#{s.title},#{s.lastId},0,#{s.lastUpdateTime})
+    </insert>
+    <update id="updateById">
+        update sub_indu set title = #{s.title},last_id = #{s.lastId},code=#{s.code},last_update_time=#{s.lastUpdateTime} where id=#{s.id}
+    </update>
+
+    <select id="selectAll" resultType="com.rtrh.projects.modules.projects.po.SubIndu">
+        select
+            i.id,
+            i.code,
+            i.title,
+            i.last_id as lastId,
+            i.create_user_id as createUserId,
+            i.create_time as createTime,
+            i.last_update_user_id as lastUpdateUserId,
+            i.last_update_time as lastUpdateTime,
+            i.logic_delete_flag as logicDeleteFlag,
+            s.title as parentTitle
+        from sub_indu i left join sub_indu s on i.last_id = s.id where i.logic_delete_flag=0
+        <if test="vo!=null and vo.title!=null and vo.title!=''">
+           and i.title like CONCAT('',#{vo.title},'%')
+        </if>
+        ORDER BY i.last_update_time DESC
+    </select>
+    <select id="getById" resultType="com.rtrh.projects.modules.projects.po.SubIndu">
+        SELECT
+        i.id,
+            i.code,
+            i.title,
+            i.last_id as lastId,
+            i.create_user_id as createUserId,
+            i.create_time as createTime,
+            i.last_update_user_id as lastUpdateUserId,
+            i.last_update_time as lastUpdateTime,
+            i.logic_delete_flag as logicDeleteFlag,
+            s.title as parentTitle
+        from sub_indu i left join sub_indu s on i.last_id = s.id where i.logic_delete_flag=0 and i.id = #{id}
+    </select>
+</mapper>

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

@@ -5,6 +5,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.rtrh.projects.modules.projects.dto.SubFixCbSearch;
+import com.rtrh.projects.modules.projects.po.RptCont;
 import com.rtrh.projects.modules.projects.po.SubFix;
 import com.rtrh.projects.modules.projects.po.SubInfo;
 import com.rtrh.projects.modules.projects.vo.*;
@@ -56,7 +57,11 @@ public interface SubInfoMapper {
 
     List<SubInfoTotalExcel> getFixTotalExcel(@Param("stateFix") String stateFix,@Param("year") String year);
 
+    List<SubInfoTotalExcel> exportTotalExcelByStatus(@Param("status") String status);
+
     List<SubInfoFixDetail> exportFixDetailExcel(@Param("stateFix")String stateFix, @Param("year") String year);
 
     List<SubInfoFixDetailPreNew> selectSubPreNewBySubIds(@Param("subIdList")List<String> subIdList);
+
+    List<RptCont> selectNewestMonthReport(@Param("ids") List<String> ids);
 }

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

@@ -124,99 +124,121 @@
 
     <select id="queryPage" resultType="com.rtrh.projects.modules.projects.po.SubInfoGxj">
         SELECT
-        id,
-        sub_id AS subId,
-        unit_id AS unitId,
-        unit_desc AS unitDesc,
-        sub_code AS subCode,
-        sub_name AS subName,
-        indus_kind AS indusKind,
-        amt_total AS amtTotal,
-        abc,
-        subject_id AS subjectId,
-        begin_date AS beginDate,
-        end_date AS endDate,
-        rt_date AS rtDate,
-        content AS content,
-        progress AS progress,
-        cb_status AS cbStatus,
-        qy_date AS qyDate,
-        xj_date AS xjDate,
-        zj_date AS zjDate,
-        tc_date AS tcDate,
-        cb_num AS cbNum,
-        xj_num AS xjNum,
-        zj_num AS zjNum,
-        remark,
-        name_zrr AS nameZrr,
-        tel AS tel,
-        name_lead AS nameLead,
-        tel_lead AS telLead,
-        status AS status,
-        is_rg AS isRg,
-        rg_date AS rgDate,
-        create_user_id AS createUserId,
-        create_user_name AS createUserName,
-        create_time AS createTime,
-        last_update_user_id AS lastUpdateUserId,
-        last_update_user_name AS lastUpdateUserName,
-        last_update_time AS lastUpdateTime,
-        logic_delete_flag AS logicDeleteFlag,
-        status_lamp AS statusLamp,
-        kind_nature AS kindNature
-        from sub_info
+        s.id,
+        s.sub_id AS subId,
+        s.unit_id AS unitId,
+        s.unit_desc AS unitDesc,
+        s.sub_code AS subCode,
+        s.sub_name AS subName,
+        s.indus_kind AS indusKind,
+        s.amt_total AS amtTotal,
+        s.abc,
+        s.subject_id AS subjectId,
+        s.begin_date AS beginDate,
+        s.end_date AS endDate,
+        s.rt_date AS rtDate,
+        s.content AS content,
+        s.progress AS progress,
+        s.cb_status AS cbStatus,
+        s.qy_date AS qyDate,
+        s.xj_date AS xjDate,
+        s.zj_date AS zjDate,
+        s.tc_date AS tcDate,
+        s.cb_num AS cbNum,
+        s.xj_num AS xjNum,
+        s.zj_num AS zjNum,
+        s.remark,
+        s.name_zrr AS nameZrr,
+        s.tel AS tel,
+        s.name_lead AS nameLead,
+        s.tel_lead AS telLead,
+        s.status AS status,
+        s.is_rg AS isRg,
+        s.rg_date AS rgDate,
+        s.create_user_id AS createUserId,
+        s.create_user_name AS createUserName,
+        s.create_time AS createTime,
+        s.last_update_user_id AS lastUpdateUserId,
+        s.last_update_user_name AS lastUpdateUserName,
+        s.last_update_time AS lastUpdateTime,
+        s.logic_delete_flag AS logicDeleteFlag,
+        s.status_lamp AS statusLamp,
+        s.kind_nature AS kindNature
+        <if test="vo.status!=null and vo.status==3 and vo.month!=null and vo.month!=''">
+            ,src.yearAmtSj
+        </if>
+        from sub_info s
+        <if test="vo.status!=null and vo.status==3 and vo.month!=null and vo.month!=''">
+            LEFT JOIN
+            (SELECT sub_id,sum(amt) AS yearAmtSj FROM sub_rpt_cont WHERE logic_delete_flag = 0 AND kj_month >= #{vo.month} GROUP BY sub_id) src
+            ON s.id=src.sub_id
+        </if>
         <where>
-            logic_delete_flag = 0
+            s.logic_delete_flag = 0
             <if test="vo.subName!=null and vo.subName!=''">
-                and sub_name like CONCAT('%', #{vo.subName}, '%')
+                and s.sub_name like CONCAT('%', #{vo.subName}, '%')
             </if>
             <if test="vo.kindNature!=null and vo.kindNature!=''">
-                and kind_nature = #{vo.kindNature}
+                and s.kind_nature = #{vo.kindNature}
             </if>
             <if test="vo.subjects!=null and vo.subjects!=''">
-                and subject_id = #{vo.subjects}
+                and s.subject_id = #{vo.subjects}
             </if>
             <if test="vo.subjectId!=null and vo.subjectId!=''">
-                and subject_id = #{vo.subjectId}
+                and s.subject_id = #{vo.subjectId}
             </if>
             <if test="vo.indusKind!=null and vo.indusKind!=''">
-                and indus_kind = #{vo.indusKind}
+                and s.indus_kind like CONCAT(#{vo.indusKind}, '%')
             </if>
-            <if test="vo.indusKinds!=null and vo.indusKinds!=''">
-                and indus_kind = #{vo.indusKinds}
+            <if test="vo.iks!=null">
+                <foreach collection="vo.iks" open="(" close=")" separator="," item="item">
+                    and s.indus_kind IN (#{item})
+                </foreach>
             </if>
             <if test="vo.startAmt!=null and vo.startAmt!=''">
-                and amt_total >= #{vo.startAmt}
+                and s.amt_total >= #{vo.startAmt}
             </if>
             <if test="vo.endAmt!=null and vo.endAmt!=''">
-                and amt_total &lt;= #{vo.endAmt}
-            </if>
-            <if test="vo.status=='2' and vo.beginDate!=null and vo.beginDate!=''">
-                and begin_date >= #{vo.beginDate}
-            </if>
-            <if test="vo.status=='2' and vo.endDate!=null and vo.endDate!=''">
-                and begin_date &lt;= #{vo.endDate}
-            </if>
-            <if test="vo.status=='3' and vo.beginDate!=null and vo.beginDate!=''">
-                and end_date >= #{vo.beginDate}
-            </if>
-            <if test="vo.status=='3' and vo.endDate!=null and vo.endDate!=''">
-                and end_date &lt;= #{vo.endDate}
-            </if>
-            <if test="vo.status=='9' and vo.beginDate!=null and vo.beginDate!=''">
-                and rg_date >= #{vo.beginDate}
-            </if>
-            <if test="vo.status=='9' and vo.endDate!=null and vo.endDate!=''">
-                and rg_date &lt;= #{vo.endDate}
+                and s.amt_total &lt;= #{vo.endAmt}
             </if>
             <if test="vo.sbdw!=null and vo.sbdw!=''">
-                and unit_desc = #{vo.sbdw}
-            </if>
-            <if test="vo.status!=null and vo.status!=''">
-                and status = #{vo.status}
+                and s.unit_desc = #{vo.sbdw}
             </if>
             <if test="vo.abc!=null and vo.abc!=''">
-                and abc = #{vo.abc}
+                and s.abc = #{vo.abc}
+            </if>
+            <if test="vo.status!=null and vo.status!=''">
+                and s.status = #{vo.status}
+                <if test="vo.status==3">
+                    <if test="vo.yearMixAmt!=null and vo.yearMixAmt!=''">
+                        and src.yearAmtSj >=#{vo.yearMixAmt}
+                    </if>
+                    <if test="vo.yearMixAmt!=null and vo.yearMixAmt!=''">
+                        and src.yearAmtSj &lt;=#{vo.yearMaxAmt}
+                    </if>
+                    <if test="vo.beginDate!=null and vo.beginDate!=''">
+                        and s.end_date >= #{vo.beginDate}
+                    </if>
+                    <if test="vo.endDate!=null and vo.endDate!=''">
+                        and s.end_date &lt;= #{vo.endDate}
+                    </if>
+                </if>
+                <if test="vo.status=='2'">
+                    <if test="vo.beginDate!=null and vo.beginDate!=''">
+                        and s.begin_date >= #{vo.beginDate}
+                    </if>
+                    <if test="vo.endDate!=null and vo.endDate!=''">
+                        and s.begin_date &lt;= #{vo.endDate}
+                    </if>
+                </if>
+                <if test="vo.status=='9'">
+                    <if test="vo.beginDate!=null and vo.beginDate!=''">
+                        and s.rg_date >= #{vo.beginDate}
+                    </if>
+                    <if test="vo.endDate!=null and vo.endDate!=''">
+                        and s.rg_date &lt;= #{vo.endDate}
+                    </if>
+                </if>
             </if>
         </where>
     </select>
@@ -358,6 +380,18 @@
         LEFT JOIN sub_info ON sub_fix.sub_id = sub_info.id
         WHERE sub_fix.cat = #{stateFix} and sub_fix.year = #{year} and sub_info.logic_delete_flag = 0
     </select>
+    <select id="exportTotalExcelByStatus" resultType="com.rtrh.projects.modules.projects.vo.SubInfoTotalExcel">
+        SELECT sub_info.subject_id as subjectId,
+               sub_info.sub_name as subName,
+               sub_info.amt_total as amtTotal,
+               sub_info.indus_kind as indusKind
+               from sub_info
+        WHERE sub_info.logic_delete_flag = 0
+            <if test="status != null and status != ''">
+                and sub_info.status = #{status}
+            </if>
+
+    </select>
 
     <select id="exportFixDetailExcel" resultType="com.rtrh.projects.modules.projects.vo.export.SubInfoFixDetail">
         SELECT sub_info.id as id,
@@ -388,5 +422,32 @@
             AND a.status = 1
             AND a.status_conf IN (1, 2);
     </select>
-
+    <select id="selectNewestMonthReport" resultType="com.rtrh.projects.modules.projects.po.RptCont">
+        SELECT
+            src.sub_id AS subId,src.content
+        FROM
+            sub_rpt_cont src
+                JOIN (
+                SELECT
+                    sub_id,
+                    MAX(kj_month) AS latest_kj_month
+                FROM
+                    sub_rpt_cont
+                WHERE
+                    logic_delete_flag = 0
+                  AND sub_id IN
+                  <foreach collection="ids" item="item" separator="," open="(" close=")">
+                      #{item}
+                  </foreach>
+                  AND kind = '1'
+                  AND content IS NOT NULL
+                GROUP BY
+                    sub_id
+            ) AS latest_src ON src.sub_id = latest_src.sub_id
+                AND src.kj_month = latest_src.latest_kj_month
+        WHERE
+            src.logic_delete_flag = 0
+          AND src.kind = '1'
+          AND src.content IS NOT NULL;
+    </select>
 </mapper>

+ 40 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubIndu.java

@@ -0,0 +1,40 @@
+package com.rtrh.projects.modules.projects.po;
+
+import com.rtrh.projects.modules.system.po.TableBaseColomn;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * <p>
+ * 行业设置表
+ * </p>
+ *
+ * @author jiangpengli
+ * @since 2024-12-27
+ */
+@Getter
+@Setter
+@ToString(callSuper = true)
+public class SubIndu extends TableBaseColomn implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String code;
+
+    private String title;
+
+    private String lastId;
+
+    private String createUserName;
+
+    private String lastUpdateUserName;
+    private String parentTitle;
+
+    private List<SubIndu> children;
+}

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

@@ -159,4 +159,6 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     private String preProceNum;
     private String preEndNum;
     private String yearAmtSj;
+
+    private String preContent;
 }

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

@@ -7,6 +7,7 @@ import java.util.Map;
 import com.github.pagehelper.PageInfo;
 import com.rtrh.core.repository.Page;
 import com.rtrh.projects.modules.projects.dto.SubFixCbSearch;
+import com.rtrh.projects.modules.projects.po.SubInfoGxj;
 import com.rtrh.projects.modules.projects.vo.*;
 import com.rtrh.projects.modules.projects.vo.export.ExportQueryVO;
 import com.rtrh.projects.modules.projects.vo.export.SubInfoExportVO;
@@ -329,6 +330,8 @@ public interface SubInfoQueryService {
 
 	Page subFixCbAll(SubFixCbSearch subFixCbSearch);
 
+	List<SubInfoGxj> queryAll(LoginUserVO loginUser, SubInfoQueryTzVO queryVO);
+
 	Page queryPage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO);
 
 	StatisticsVO queryStatistics(SubInfoQueryTzVO queryVO, LoginUserVO loginUser);

+ 2 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java

@@ -412,4 +412,6 @@ public interface SubInfoService {
 	List<SubInfoTotalExcel> getFixTotalExcel(SubInfoQueryTzVO vo);
 
     List<SubInfoFixDetail> exportFixDetailExcel(SubInfoQueryTzVO vo);
+
+	List<SubInfoTotalExcel> exportTotalExcelByStatus(SubInfoQueryTzVO vo);
 }

+ 79 - 42
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java

@@ -8,7 +8,7 @@ import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.stream.Collectors;
 
-import cn.hutool.core.map.MapUtil;
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
@@ -17,9 +17,9 @@ import com.google.common.collect.Lists;
 import com.rtrh.projects.modules.projects.dao.*;
 import com.rtrh.projects.modules.projects.dto.SubFixCbSearch;
 import com.rtrh.projects.modules.projects.enums.RptContKindEnum;
+import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.po.*;
 import com.rtrh.projects.modules.projects.service.SubPreNewService;
-import com.rtrh.projects.modules.projects.service.SubRptContService;
 import com.rtrh.projects.modules.projects.vo.*;
 import com.rtrh.projects.modules.projects.vo.export.SubInfoFixVO;
 import com.rtrh.projects.modules.system.dao.JUnitDao;
@@ -27,14 +27,12 @@ import com.rtrh.projects.modules.system.enums.SysTableKind;
 import com.rtrh.projects.modules.system.po.JUnit;
 import com.rtrh.projects.modules.system.po.TSystable;
 import com.rtrh.projects.modules.system.service.TSysTableService;
-import com.rtrh.projects.modules.system.vo.PersonInfoVO;
 import com.rtrh.projects.modules.utils.DateUtils;
 import com.rtrh.projects.vo.statics.OtherQueryVO;
 import com.rtrh.projects.vo.statics.ProjectQueryVO;
 import org.apache.commons.lang3.StringUtils;
 import org.hibernate.Query;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
 import org.springframework.stereotype.Service;
 
 import com.google.common.base.CaseFormat;
@@ -164,58 +162,97 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
         return page;
     }
 
+    @Override
+    public List<SubInfoGxj> queryAll(LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
+        queryVO.setMonth(DateUtil.thisYear() + "01");
+        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));
+
+        // 查询项目 最新月报内容(建设进度)
+        List<RptCont> rptContList = subInfoMapper.selectNewestMonthReport(ids);
+        Map<String, String> rptContentMap = rptContList.stream().collect(Collectors.toMap(RptCont::getSubId, RptCont::getContent));
+
+        List<TSystable> byKind = tSysTableService.getByKind(SysTableKind.JSDD);
+        Map<String, String> kindMap = byKind.stream().collect(Collectors.toMap(TSystable::getCode, TSystable::getTitle));
+
+        if (CollectionUtil.isNotEmpty(data)) {
+            for (SubInfoGxj e : data) {
+                e.setSubjectName(kindMap.get(e.getSubjectId()));
+                // 除了储备和新建项目外 其余项目进度为月报内容
+                if (!Lists.newArrayList(SubInfoStatusEnum.CB.getCode(), SubInfoStatusEnum.XJ.getCode()).contains(e.getStatus())) {
+                    e.setProgress(rptContentMap.getOrDefault(e.getSubId(),e.getProgress()));
+                }
+                // 新建库前期手续
+                if (SubInfoStatusEnum.XJ.getCode().equals(e.getStatus())) {
+                    if (CollUtil.isNotEmpty(preNewMap.get(e.getSubId()))){
+                        Map<String, Long> numMap = preNewMap.get(e.getSubId()).stream().collect(Collectors.groupingBy(SubInfoFixDetailPreNew::getStatusConf, Collectors.counting()));
+                        e.setPreProceNum(numMap.getOrDefault("1", 0L) + "");
+                        e.setPreEndNum(numMap.getOrDefault("2", 0L) + "");
+                    }
+                }
+
+                // 项目前期手续办理情况
+                List<SubInfoFixDetailPreNew> subInfoFixDetailPreNewList = preNewMap.get(e.getId());
+                StringBuilder sb = new StringBuilder();
+                if (com.rtrh.common.util.CollectionUtil.isNotEmpty(subInfoFixDetailPreNewList)){
+                    //已经完成的手续
+                    StringBuilder end = new StringBuilder("已完成:");
+                    //正在办理的手续
+                    StringBuilder yellow = new StringBuilder("进行中:");
+                    //判断是否有已完成手续
+                    boolean endBoolean = subInfoFixDetailPreNewList.stream().anyMatch(f->"2".equals(f.getStatusConf()));
+                    //判断是否有正在进行手续
+                    boolean yellowBoolean = subInfoFixDetailPreNewList.stream().anyMatch(f->"1".equals(f.getStatusConf()));
+                    subInfoFixDetailPreNewList.forEach(f->{
+                        if ("1".equals(f.getStatusConf())){
+                            yellow.append(f.getTitle()).append(",");
+                        }else if ("2".equals(f.getStatusConf())){
+                            end.append(f.getTitle()).append(",");
+                        }
+                    });
+                    if (endBoolean){
+                        sb.append(end, 0, end.length()-1).append("。");
+                    }
+                    if (yellowBoolean){
+                        sb.append(yellow, 0, yellow.length()-1).append("。");
+                    }
+                    if (!endBoolean && !yellowBoolean){
+                        sb.append("暂无手续办理情况!");
+                    }
+                    e.setPreContent(sb.toString());
+                }
+            }
+        }
+        return data;
+    }
+
     @Override
     public Page queryPage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
         if (StringUtils.isBlank(queryVO.getAbc())) {
             String abcs = queryVO.getAbcs();
             queryVO.setAbc(abcs);
         }
-        PageHelper.startPage(page.getPageNo(), page.getPageSize());
         if (StringUtils.isNotBlank(queryVO.getStartAmt()))
             queryVO.setStartAmt(new BigDecimal(queryVO.getStartAmt()).multiply(new BigDecimal("10000")).toString());
         if (StringUtils.isNotBlank(queryVO.getEndAmt())) {
             queryVO.setEndAmt(new BigDecimal(queryVO.getEndAmt()).multiply(new BigDecimal("10000")).toString());
         }
+        Optional.ofNullable(queryVO.getIndusKinds()).ifPresent(s -> {
+            String[] split = s.split(",");
+            queryVO.setIks(Arrays.asList(split));
+        });
 
-        List<SubInfoGxj> data = subInfoMapper.queryPage(queryVO);
+
+        PageHelper.startPage(page.getPageNo(), page.getPageSize());
+        List<SubInfoGxj> data = this.queryAll(loginUser, queryVO);
         PageInfo<SubInfoGxj> pageInfo = new PageInfo<>(data);
         page.setList(data);
-
-        List<TSystable> byKind = tSysTableService.getByKind(SysTableKind.JSDD);
-        if (CollectionUtil.isNotEmpty(data)) {
-            for (SubInfoGxj e : data) {
-                // 查询月报中的建设进度
-                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());
-                    query.setParameter("kind", RptContKindEnum.MONTH.getCode());
-                    query.setMaxResults(1);
-                    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())) {
-                    // 新建库查询前期手续
-                    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());
         return page;
     }

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

@@ -1572,9 +1572,9 @@ public class SubInfoServiceImpl implements SubInfoService {
 
 
             //所属行业
-            if (!Objects.equals(old.getIndusKind(), subInfo.getIndusKind())) {
-                subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "indus_kind", "所属行业", "", StringUtil.isNotEmpty(old.getIndusKind()) ? tSysTableService.getById(old.getIndusKind()).getTitle() : "", StringUtil.isNotEmpty(subInfo.getIndusKind()) ? tSysTableService.getById(subInfo.getIndusKind()).getTitle() : "", null, userVO.getLoginName(), new Date(), "修改");
-            }
+            // if (!Objects.equals(old.getIndusKind(), subInfo.getIndusKind())) {
+            //     subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "indus_kind", "所属行业", "", StringUtil.isNotEmpty(old.getIndusKind()) ? tSysTableService.getById(old.getIndusKind()).getTitle() : "", StringUtil.isNotEmpty(subInfo.getIndusKind()) ? tSysTableService.getById(subInfo.getIndusKind()).getTitle() : "", null, userVO.getLoginName(), new Date(), "修改");
+            // }
 
             //建设地点
             if (!Objects.equals(old.getSubjectId(), subInfo.getSubjectId())) {
@@ -4817,6 +4817,11 @@ public class SubInfoServiceImpl implements SubInfoService {
         return dataList;
     }
 
+    @Override
+    public List<SubInfoTotalExcel> exportTotalExcelByStatus(SubInfoQueryTzVO vo) {
+        return subInfoMapper.exportTotalExcelByStatus(vo.getStatus());
+    }
+
     @Override
     public boolean moveDb(MoveDbParamVo vo) {
         SubInfo subinfo = subInfoDao.findById(vo.getId());

+ 2 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/SubInfoQueryTzVO.java

@@ -1,6 +1,7 @@
 package com.rtrh.projects.modules.projects.vo;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 import lombok.Getter;
 import lombok.Setter;
@@ -347,6 +348,7 @@ public class SubInfoQueryTzVO {
 
 	//所属行业
 	private  String  indusKinds;
+	private List<String> iks;
 
 	//建设地点
 	private   String  subjects;

+ 28 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoCbVO.java

@@ -0,0 +1,28 @@
+package com.rtrh.projects.modules.projects.vo.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class SubInfoCbVO {
+
+    @Excel(name = "项目名称",width = 20.0)
+    private String subName;
+
+    @Excel(name = "项目所在地",width = 15.0)
+    private String subjectName;
+
+    @Excel(name = "项目建设内容",width = 70.0)
+    private String content;
+
+    @Excel(name = "计划总投资(亿元)",width = 20.0)
+    private BigDecimal amtTotal;
+
+    @Excel(name = "进展情况")
+    private String progress;
+
+    @Excel(name = "备注")
+    private String remark;
+}

+ 33 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoTcVO.java

@@ -0,0 +1,33 @@
+package com.rtrh.projects.modules.projects.vo.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class SubInfoTcVO {
+
+    @Excel(name = "项目名称",width = 20.0)
+    private String subName;
+
+    @Excel(name = "项目所在地",width = 15.0)
+    private String subjectName;
+
+    @Excel(name = "项目建设内容",width = 70.0)
+    private String content;
+
+    @Excel(name = "计划总投资(亿元)",width = 20.0)
+    private Float amtTotal;
+
+    @Excel(name = "预计开工时间",format = "yyyy-MM-dd",width = 15.0)
+    private Date beginDate;
+
+    @Excel(name = "前期手续办理情况")
+    private String preContent;
+
+    @Excel(name = "备注")
+    private String remark;
+}

+ 26 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoTotalInfoVO.java

@@ -0,0 +1,26 @@
+package com.rtrh.projects.modules.projects.vo.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 导出总表 基本情况导出
+ */
+@Data
+@AllArgsConstructor
+public class SubInfoTotalInfoVO {
+    @Excel(name = "项目分类",width = 30.0)
+    private String type;
+
+    @Excel(name = "项目分类",width = 40.0)
+    private String typeItem;
+
+    @Excel(name = "项目个数",width = 40.0)
+    private Integer num;
+
+    @Excel(name = "计划总投资(亿元)",width = 40.0)
+    private BigDecimal amtTotal;
+}

+ 33 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoXjVO.java

@@ -0,0 +1,33 @@
+package com.rtrh.projects.modules.projects.vo.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class SubInfoXjVO {
+
+    @Excel(name = "项目名称",width = 20.0)
+    private String subName;
+
+    @Excel(name = "项目所在地",width = 15.0)
+    private String subjectName;
+
+    @Excel(name = "项目建设内容",width = 50.0)
+    private String content;
+
+    @Excel(name = "计划总投资(亿元)",width = 70.0)
+    private Float amtTotal;
+
+    @Excel(name = "预计开工时间",format = "yyyy-MM-dd",width = 15.0)
+    private Date beginDate;
+
+    @Excel(name = "前期手续办理情况")
+    private String preContent;
+
+    @Excel(name = "备注")
+    private String remark;
+}

+ 35 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoZjVO.java

@@ -0,0 +1,35 @@
+package com.rtrh.projects.modules.projects.vo.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class SubInfoZjVO {
+    @Excel(name = "项目名称",width = 20.0)
+    private String subName;
+
+    @Excel(name = "项目所在地",width = 15.0)
+    private String subjectName;
+
+    @Excel(name = "项目建设内容",width = 70.0)
+    private String content;
+
+    @Excel(name = "计划总投资(亿元)",width = 20.0)
+    private Float amtTotal;
+
+    @Excel(name = "建成投产时间",format = "yyyy-MM-dd",width = 15.0)
+    private Date endDate;
+
+    @Excel(name = "年度投资")
+    private String yearAmtSj;
+
+    @Excel(name = "进展情况")
+    private String progress;
+
+    @Excel(name = "备注")
+    private String remark;
+}

+ 36 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoZkVO.java

@@ -0,0 +1,36 @@
+package com.rtrh.projects.modules.projects.vo.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class SubInfoZkVO {
+
+    @Excel(name = "项目名称",width = 20.0)
+    private String subName;
+
+    @Excel(name = "项目所在地",width = 15.0)
+    private String subjectName;
+
+    @Excel(name = "项目建设内容",width = 70.0)
+    private String content;
+
+    @Excel(name = "计划总投资(亿元)",width = 20.0)
+    private Float amtTotal;
+
+    @Excel(name = "状态",width = 10.0)
+    private String statusName;
+
+    @Excel(name = "计划开工时间",format = "yyyy-MM-dd",width = 15.0)
+    private Date beginDate;
+
+    @Excel(name = "计划完工时间",format = "yyyy-MM-dd",width = 15.0)
+    private Date endDate;
+
+    @Excel(name = "备注",width = 10.0)
+    private String remark;
+}

+ 33 - 0
projects-service/src/main/java/com/rtrh/projects/modules/system/service/ISubInduService.java

@@ -0,0 +1,33 @@
+package com.rtrh.projects.modules.system.service;
+
+import com.rtrh.core.repository.Page;
+import com.rtrh.projects.modules.projects.po.SubIndu;
+import com.rtrh.projects.vo.system.SysTableQueryVO;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 行业设置表 服务类
+ * </p>
+ *
+ * @author jiangpengli
+ * @since 2024-12-27
+ */
+public interface ISubInduService {
+
+    List<SubIndu> queryAll(SysTableQueryVO queryVO);
+
+    List<SubIndu> queryTreeALl();
+
+    Page pageQueryData(Page page, SysTableQueryVO queryVO);
+
+    void saveOrUpdate(SubIndu subIndu, String loginName);
+
+    SubIndu getById(String id);
+
+    void del(String id);
+
+    List<SubIndu> queryParentAll();
+
+}

+ 126 - 0
projects-service/src/main/java/com/rtrh/projects/modules/system/service/impl/SubInduServiceImpl.java

@@ -0,0 +1,126 @@
+package com.rtrh.projects.modules.system.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.rtrh.common.util.StringUtil;
+import com.rtrh.core.repository.Identities;
+import com.rtrh.core.repository.Page;
+import com.rtrh.projects.modules.projects.mapper.SubInduMapper;
+import com.rtrh.projects.modules.projects.po.SubIndu;
+import com.rtrh.projects.modules.system.service.ISubInduService;
+import com.rtrh.projects.vo.system.SysTableQueryVO;
+import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 行业设置表 服务实现类
+ * </p>
+ *
+ * @author jiangpengli
+ * @since 2024-12-27
+ */
+@Service
+@RequiredArgsConstructor(onConstructor_ = {@Lazy})
+public class SubInduServiceImpl implements ISubInduService {
+    private final SubInduMapper subInduMapper;
+
+    @Override
+    public List<SubIndu> queryAll(SysTableQueryVO queryVO) {
+        return subInduMapper.selectAll(queryVO);
+    }
+
+    @Override
+    public List<SubIndu> queryTreeALl() {
+        List<SubIndu> subIndus = this.queryAll(null);
+        Map<String, List<SubIndu>> map = subIndus.stream().filter(e -> e.getCode().length() == 4)
+                .collect(Collectors.groupingBy(e -> e.getCode().substring(0, 2)));
+        return subIndus.stream()
+                .filter(e -> e.getCode().length() == 2)
+                .peek(e -> e.setChildren(map.getOrDefault(e.getCode(), null)))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Page pageQueryData(Page page, SysTableQueryVO queryVO) {
+        PageHelper.startPage(page.getPageNo(), page.getPageSize());
+        List<SubIndu> data = this.queryAll(queryVO);
+        PageInfo<SubIndu> pageInfo = new PageInfo<>(data);
+        page.setList(data);
+        page.setTotalCount(pageInfo.getTotal());
+        return page;
+    }
+
+    @Override
+    public synchronized void saveOrUpdate(SubIndu subIndu, String loginName) {
+        List<SubIndu> subIndus = queryAll(null);
+        subIndu.setLastUpdateTime(new Date());
+        if (StringUtils.isBlank(subIndu.getId())) {
+            subIndu.setId(Identities.uuid());
+            // 生成编码
+            if (CollUtil.isEmpty(subIndus)) {
+                subIndu.setCode("01");
+            } else {
+                if (StringUtils.isBlank(subIndu.getLastId())) {
+                    Optional<SubIndu> maxCode = subIndus.stream()
+                            .filter(e -> e.getCode().length() == 2)
+                            .max(Comparator.comparingInt(e -> Integer.parseInt(e.getCode())));
+                    maxCode.ifPresent(e -> {
+                        int newCode = Integer.parseInt(e.getCode()) + 1;
+                        subIndu.setCode(String.format("%02d", newCode));
+                    });
+                } else {
+                    extracted(subIndu, subIndus);
+                }
+            }
+            subInduMapper.save(subIndu);
+        } else {
+            subIndus.stream().filter(e -> e.getId().equals(subIndu.getId())).findAny().ifPresent(e -> {
+                if (StringUtils.isNotBlank(e.getLastId()) && e.getLastId().equals(subIndu.getLastId())) {
+                    subInduMapper.updateById(subIndu);
+                } else {
+                    extracted(subIndu, subIndus);
+                    subInduMapper.updateById(subIndu);
+                }
+            });
+        }
+    }
+
+    private void extracted(SubIndu subIndu, List<SubIndu> subIndus) {
+        String code = subIndus.stream().filter(e -> subIndu.getLastId().equals(e.getId())).findFirst().orElse(new SubIndu()).getCode();
+        Optional<SubIndu> maxCode = subIndus.stream()
+                .filter(e -> 4 == e.getCode().length() && subIndu.getLastId().equals(e.getLastId()))
+                .max(Comparator.comparingInt(e -> Integer.parseInt(e.getCode())));
+        if (maxCode.isPresent()) {
+            // 3. 如果有最大编码,生成新的编码
+            int newCode = Integer.parseInt(maxCode.get().getCode()) + 1;
+            subIndu.setCode(String.format("%04d", newCode));
+        } else {
+            // 4. 如果没有最大编码,生成初始编码
+            subIndu.setCode(code + "01");
+        }
+    }
+
+    @Override
+    public SubIndu getById(String id) {
+        return subInduMapper.getById(id);
+    }
+
+    @Override
+    public void del(String id) {
+        if (StringUtils.isNotBlank(id))
+            subInduMapper.del(id);
+    }
+
+    @Override
+    public List<SubIndu> queryParentAll() {
+        List<SubIndu> subIndus = this.queryAll(null);
+        return subIndus == null ? new ArrayList<>() : subIndus.stream().filter(e -> e.getCode().length() == 2).collect(Collectors.toList());
+    }
+}

+ 6 - 3
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java

@@ -21,6 +21,7 @@ import com.rtrh.projects.modules.rolemeun.po.SecRole;
 import com.rtrh.projects.modules.rolemeun.servicel.SecRoleservice;
 import com.rtrh.projects.modules.system.dao.TSystableDao;
 import com.rtrh.projects.modules.system.po.TSystable;
+import com.rtrh.projects.modules.system.service.ISubInduService;
 import com.rtrh.projects.modules.utils.DateUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -101,6 +102,8 @@ public class SubInfoController extends BaseController {
     private SubMajorMonthDao subMajorMonthDao;
     @Autowired
     private TSystableDao tSystableDao;
+    @Autowired
+    private ISubInduService subInduService;
 
     /**
      * 项目申报
@@ -219,8 +222,8 @@ public class SubInfoController extends BaseController {
             //默认为重点项目台账
             type = "1";
         }
-        // model.put("HYFL", tSysTableService.getByKind(SysTableKind.HYFL));   //行业分类
-        model.put("HYFL", tSysTableService.getGxjHyfl(SysTableKind.HYFL));
+        model.put("HYFL", subInduService.queryTreeALl());   //行业分类
+
         model.put("ZJLY", tSysTableService.getByKind(SysTableKind.ZJLY));
         model.put("XMLX", tSysTableService.getByKind(SysTableKind.XMLX));   //项目类型
         model.put("JSXZ", tSysTableService.getByKind(SysTableKind.JSXZ));
@@ -869,7 +872,7 @@ public class SubInfoController extends BaseController {
         //资金来源
         model.put("ZJLY", tSysTableService.getByKind(SysTableKind.ZJLY));
         //所属行业
-        model.put("HYFL", tSysTableService.getByKind(SysTableKind.HYFL));
+        model.put("HYFL", subInduService.queryTreeALl());
         //项目类型
         model.put("XMLX", tSysTableService.getByKind(SysTableKind.XMLX));
         //建设性质

+ 183 - 14
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -1,7 +1,9 @@
 package com.rtrh.projects.web.controller.subject;
 
 import java.io.IOException;
+import java.io.OutputStream;
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -11,6 +13,7 @@ import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
 
 import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.poi.excel.ExcelUtil;
@@ -27,8 +30,12 @@ import com.rtrh.common.util.StringUtil;
 import com.rtrh.core.vo.ListMessage;
 import com.rtrh.projects.modules.projects.dao.SubSourceDao;
 import com.rtrh.projects.modules.projects.enums.ProjectStatusEnum;
+import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
+import com.rtrh.projects.modules.projects.po.SubIndu;
+import com.rtrh.projects.modules.projects.po.SubInfoGxj;
 import com.rtrh.projects.modules.projects.vo.SubInfoTotalExcel;
 import com.rtrh.projects.modules.projects.vo.export.*;
+import com.rtrh.projects.modules.system.service.ISubInduService;
 import com.rtrh.projects.modules.utils.CustomCellWriteWidthStrategy;
 import com.rtrh.projects.modules.utils.DateUtils;
 import com.rtrh.projects.modules.utils.QualificationsDeclareCellWriteHandler;
@@ -36,6 +43,7 @@ import com.rtrh.projects.outapi.result.JsonResult;
 import com.rtrh.projects.web.util.SheetData;
 import com.rtrh.projects.web.util.SheetHead;
 import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.xssf.streaming.SXSSFSheet;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -86,6 +94,8 @@ public class SubInfoExportController extends BaseController {
     private TSysTableService tSysTableService;
     @Autowired
     private SubSourceDao subSourceDao;
+    @Autowired
+    private ISubInduService subInduService;
 
     /**
      * 导出汇总表
@@ -617,7 +627,8 @@ public class SubInfoExportController extends BaseController {
     }
 
     /**
-     * 导出重点项目汇总表
+     * 导出总表
+     *
      * @param response
      * @param vo
      */
@@ -633,13 +644,13 @@ public class SubInfoExportController extends BaseController {
             List<TSystable> gxjHyfl = tSysTableService.getGxjHyfl(SysTableKind.HYFL);
             //遍历subInfoTotalExcel,将subjectId替换为jsddList中code=subjectId的title
             for (SubInfoTotalExcel data : subInfoTotalExcel) {
-                if (data == null){
+                if (data == null) {
                     continue;
                 }
                 String subjectId = data.getSubjectId();
                 String induskind = data.getInduskind();
                 if (StringUtil.isNotEmpty(induskind)) {
-                    Optional<TSystable> first = gxjHyfl.stream().filter(item -> item.getCode().equals(induskind)).findFirst();
+                    Optional<TSystable> first = gxjHyfl.stream().filter(item -> item.getId().equals(induskind)).findFirst();
                     first.ifPresent(tSystable -> data.setInduskind(tSystable.getTitle()));
                 }
                 if (StringUtil.isNotEmpty(subjectId)) {
@@ -658,7 +669,7 @@ public class SubInfoExportController extends BaseController {
             // 合并标题行的所有单元格
             writer.merge(0, 0, 0, 3, null, true);
 
-            List<String> rowHead2 = CollUtil.newArrayList("项目分类","项目分类","项目个数","计划总投资(亿元)");
+            List<String> rowHead2 = CollUtil.newArrayList("项目分类", "项目分类", "项目个数", "计划总投资(亿元)");
             writer.writeHeadRow(rowHead2);
             writer.merge(1, 1, 0, 1, null, true);
 
@@ -738,9 +749,9 @@ public class SubInfoExportController extends BaseController {
                 for (Map.Entry<String, List<List<String>>> dataListEntry : finalDataMap.entrySet()) {
                     List<List<String>> dataList = dataListEntry.getValue();
                     int dataSize = dataList.size();
-                    if (dataSize == 1){
+                    if (dataSize == 1) {
                         indexStart += dataSize;
-                    }else{
+                    } else {
                         writer.merge(indexStart, indexStart + dataSize - 1, 0, 0, null, true);
                         indexStart += dataSize;
                     }
@@ -762,7 +773,7 @@ public class SubInfoExportController extends BaseController {
                 response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("重点项目调度-项目数据.xlsx", "UTF-8"));
                 out = response.getOutputStream();
                 writer.flush(out, true);
-            }finally {
+            } finally {
                 //关闭输出Servlet流
                 IoUtil.close(out);
                 //关闭writer,释放内存
@@ -789,8 +800,172 @@ public class SubInfoExportController extends BaseController {
         }
     }
 
+    /**
+     * 导出明细
+     *
+     * @param response
+     */
+    @PostMapping("/exportDetailExcel")
+    public void exportDetailExcel(HttpServletResponse response, @RequestBody SubInfoQueryTzVO queryVO) {
+        List<SubInfoGxj> list = subInfoQueryService.queryAll(getCurUser().getLoginUser(), queryVO);
+        Workbook workbook;
+        if (SubInfoStatusEnum.CB.getCode().equals(queryVO.getStatus())) {
+            workbook = exportExcel(list, SubInfoCbVO.class, "“四个一批”工业项目表(储备项目库)", "储备项目库");
+        } else if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())) {
+            workbook = exportExcel(list, SubInfoXjVO.class, "“四个一批”工业项目表(新建项目库)", "新建项目库");
+        } else if (SubInfoStatusEnum.ZJ.getCode().equals(queryVO.getStatus())) {
+            workbook = exportExcel(list, SubInfoZjVO.class, "“四个一批”工业项目表(在建项目库)", "在建项目库");
+        } else if (SubInfoStatusEnum.TC.getCode().equals(queryVO.getStatus())) {
+            workbook = exportExcel(list, SubInfoTcVO.class, "“四个一批”工业项目表(投产项目库)", "投产项目库");
+        } else {
+            workbook = exportExcel(list, SubInfoZkVO.class, "“四个一批”工业项目表(项目总库)", "项目总库");
+        }
+        response.setContentType("application/xlsx;charset=utf-8");
+        response.setHeader("Content-Disposition", "attachment; filename=" + URLEncodeUtil.encode("项目明细表") + System.currentTimeMillis() + ".xlsx");
+        // workbook.getSheetAt(0).autoSizeColumn(2);
+        Sheet sheet = workbook.getSheetAt(0);
+        // 设置自适应行高,i为需要自适应行高的起始行号, 起始行号为3 但是因为下标从0开始3需要减一,因为表格是循环生成,需要一行一行设置自适应高度
+        for (int i = 2; i <= list.size() + 1; i++) {
+            sheet.getRow(i).setHeight((short) -1);
+        }
+        try (OutputStream outputStream = response.getOutputStream()) {
+            workbook.write(outputStream);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private <T> Workbook exportExcel(List<SubInfoGxj> list, Class<T> clazz, String title, String sheetName) {
+        ExportParams exportParams = new ExportParams();
+        exportParams.setTitle(title);
+        exportParams.setSheetName(sheetName);
+        exportParams.setType(ExcelType.XSSF);
+
+        List<T> voList = list.stream()
+                .map(e -> {
+                    T vo = BeanUtils.instantiateClass(clazz);
+                    BeanUtils.copyProperties(e, vo);
+                    return vo;
+                })
+                .collect(Collectors.toList());
+
+        return ExcelExportUtil.exportExcel(exportParams, clazz, voList);
+    }
+
+    /**
+     * 4库导出
+     *
+     * @param response
+     * @param vo
+     */
+    @PostMapping("/exportTotalExcelByStatus")
+    public void exportTotalExcelByStatus(HttpServletResponse response, @RequestBody SubInfoQueryTzVO vo) {
+        // 查询数据以及字典
+        List<SubInfoTotalExcel> list = subInfoService.exportTotalExcelByStatus(vo);
+        List<TSystable> jsddDict = tSysTableService.getByKind(SysTableKind.JSDD);
+        Map<String, String> jsddMap = jsddDict.stream().collect(Collectors.toMap(TSystable::getCode, TSystable::getTitle));
+        Map<String, String> hyflMap = subInduService.queryParentAll().stream().collect(Collectors.toMap(SubIndu::getCode, SubIndu::getTitle));
+        // 处理数据
+        List<SubInfoTotalInfoVO> exportData = new ArrayList<>();
+        if (CollectionUtil.isNotEmpty(list)) {
+            // 1.按属地分
+            List<SubInfoTotalInfoVO> ddList = list.stream()
+                    .collect(Collectors.groupingBy(SubInfoTotalExcel::getSubjectId))
+                    .entrySet().stream()
+                    .map(entry -> new SubInfoTotalInfoVO(
+                            "按属地分",
+                            jsddMap.getOrDefault(entry.getKey(), entry.getKey()),
+                            entry.getValue().size(),
+                            entry.getValue().stream()
+                                    .map(SubInfoTotalExcel::getAmtTotal)
+                                    .reduce(BigDecimal.ZERO, BigDecimal::add)
+                                    .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
+                    ))
+                    .collect(Collectors.toList());
+
+            // 2.按金额分 定义分组边界
+            Map<String, BigDecimal> groupBoundaries = new LinkedHashMap<>();
+            groupBoundaries.put("10亿元以下", new BigDecimal("100000"));
+            groupBoundaries.put("10-50亿元", new BigDecimal("500000"));
+            groupBoundaries.put("50-100亿元", new BigDecimal("1000000"));
+            List<SubInfoTotalInfoVO> amtList = list.stream()
+                    .collect(Collectors.groupingBy(transaction -> {
+                        for (Map.Entry<String, BigDecimal> entry : groupBoundaries.entrySet()) {
+                            if (transaction.getAmtTotal().compareTo(entry.getValue()) < 0) {
+                                return entry.getKey();
+                            }
+                        }
+                        return "100亿元以上"; // 超过最高范围的默认分组
+                    }))
+                    .entrySet().stream()
+                    .map(entry -> new SubInfoTotalInfoVO(
+                            "按金额分",
+                            entry.getKey(),
+                            entry.getValue().size(),
+                            entry.getValue().stream()
+                                    .map(SubInfoTotalExcel::getAmtTotal)
+                                    .reduce(BigDecimal.ZERO, BigDecimal::add)
+                                    .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
+                    ))
+                    .collect(Collectors.toList());
+
+            // 3.按行业分
+            List<SubInfoTotalInfoVO> hyList = list.stream()
+                    .collect(Collectors.groupingBy(transaction ->{
+                        String code = transaction.getInduskind();
+                        // 确保code不为空且长度至少为2
+                        if (code == null || code.length() < 2) {
+                            return "未知行业";  // 默认未知行业
+                        }
+                        return code.substring(0, 2);
+                    }))
+                    .entrySet().stream()
+                    .map(entry -> new SubInfoTotalInfoVO(
+                            "按行业分",
+                            hyflMap.getOrDefault(entry.getKey(),entry.getKey()),
+                            entry.getValue().size(),
+                            entry.getValue().stream()
+                                    .map(SubInfoTotalExcel::getAmtTotal)
+                                    .reduce(BigDecimal.ZERO, BigDecimal::add)
+                                    .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
+                            )
+                    )
+                    .collect(Collectors.toList());
+            exportData.addAll(ddList);
+            exportData.addAll(amtList);
+            exportData.addAll(hyList);
+            BigDecimal reduce = list.stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add);
+            exportData.add(new SubInfoTotalInfoVO("合计", "合计", list.size(), reduce.divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)));
+            // 4.导出
+            ExportParams exportParams = new ExportParams();
+            exportParams.setTitle("项目库基本情况");
+            exportParams.setSheetName("项目库基本情况");
+            exportParams.setType(ExcelType.XSSF);
+            int mergeTotalStartRow = exportData.size() + 1;
+            Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoTotalInfoVO.class, exportData);
+            response.setContentType("application/xlsx;charset=utf-8");
+            response.setHeader("Content-Disposition", "attachment; filename=" + URLEncodeUtil.encode("项目明细表") + System.currentTimeMillis() + ".xlsx");
+            Sheet sheet = workbook.getSheetAt(0);
+            // 合并单元格
+            sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 1));
+            sheet.addMergedRegion(new CellRangeAddress(2, ddList.size() + 1, 0, 0));
+            sheet.addMergedRegion(new CellRangeAddress(ddList.size() + 2, ddList.size() + amtList.size() + 1, 0, 0));
+            sheet.addMergedRegion(new CellRangeAddress(ddList.size() + amtList.size() + 2, ddList.size() + amtList.size() + hyList.size() + 1, 0, 0));
+            sheet.addMergedRegion(new CellRangeAddress(mergeTotalStartRow, mergeTotalStartRow, 0, 1));
+
+            try (OutputStream outputStream = response.getOutputStream()) {
+                workbook.write(outputStream);
+                workbook.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+
+    }
+
     /**
      * 导出重点项目明细表
+     *
      * @param response
      * @param vo
      */
@@ -988,7 +1163,7 @@ public class SubInfoExportController extends BaseController {
                 listMain.get(i).put("statusSource", "3");
             }
             for (int j = 0; j < tableList.size(); j++) {
-                if (listMain.get(i).get("propKind")!=null&&listMain.get(i).get("propKind").equals(tableList.get(j).getCode())) {
+                if (listMain.get(i).get("propKind") != null && listMain.get(i).get("propKind").equals(tableList.get(j).getCode())) {
                     listMain.get(i).put("propKindName", tableList.get(j).getTitle());
                 }
             }
@@ -1093,7 +1268,6 @@ public class SubInfoExportController extends BaseController {
     }
 
 
-
     /**
      * 导出调度表
      *
@@ -1217,9 +1391,4 @@ public class SubInfoExportController extends BaseController {
     }
 
 
-
-
-
-
-
 }

+ 47 - 0
projects/src/main/java/com/rtrh/projects/web/controller/system/SubInduController.java

@@ -0,0 +1,47 @@
+package com.rtrh.projects.web.controller.system;
+
+import com.rtrh.projects.modules.projects.po.SubIndu;
+import com.rtrh.projects.modules.system.service.ISubInduService;
+import com.rtrh.projects.web.controller.BaseController;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+    行业设置
+ */
+@Controller
+@RequestMapping("/subIndu")
+public class SubInduController extends BaseController {
+
+    @Resource
+    private ISubInduService subInduService;
+    /**
+     * 列表页
+     */
+    @RequestMapping(value = "index")
+    public ModelAndView list(ModelMap model) {
+        return new ModelAndView("/vmodules/subIndu/list.jsp");
+    }
+
+    /**
+     * 编辑页
+     */
+    @RequestMapping(value = "add")
+    public ModelAndView add(String id, ModelMap model) {
+        model.put("id", id);
+        List<SubIndu> list = subInduService.queryParentAll();
+        if (StringUtils.isNotBlank(id)){
+            list = list.stream().filter(e -> !id.equals(e.getId())).collect(Collectors.toList());
+        }
+        model.put("parentData", list);
+        return new ModelAndView("/vmodules/subIndu/form.jsp");
+    }
+
+}

+ 96 - 0
projects/src/main/java/com/rtrh/projects/web/controller/system/api/SubInduApiController.java

@@ -0,0 +1,96 @@
+package com.rtrh.projects.web.controller.system.api;
+
+import com.rtrh.core.repository.Page;
+import com.rtrh.core.vo.ListMessage;
+import com.rtrh.core.vo.Message;
+import com.rtrh.projects.modules.projects.po.SubIndu;
+import com.rtrh.projects.modules.system.service.ISubInduService;
+import com.rtrh.projects.modules.system.service.TSysTableService;
+import com.rtrh.projects.vo.IdDTO;
+import com.rtrh.projects.vo.system.SysTableQueryVO;
+import com.rtrh.projects.web.controller.BaseController;
+import com.rtrh.projects.web.log.Log;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping(value = "/api/subIndu")
+public class SubInduApiController extends BaseController {
+
+	private Logger logger = LoggerFactory.getLogger(this.getClass());
+
+	@Autowired
+	private TSysTableService sysTableService;
+
+	@Autowired
+	private ISubInduService subInduService;
+
+	/**
+	 * 获取数据
+	 */
+	@PostMapping(value = "/getById")
+	public Message getByCode(@RequestBody IdDTO idDTO) {
+		Message message = new Message();
+		try {
+			SubIndu subIndu = subInduService.getById(idDTO.getId());
+			message.setData(subIndu);
+		} catch (Exception e) {
+			logger.error("",e);
+			message.addError("获取失败");
+		}
+		return message;
+	}
+
+	/**
+	 * 列表数据
+	 */
+	@PostMapping(value = "/list")
+	public ListMessage list(@RequestBody Page page, @RequestBody SysTableQueryVO queryVO) {
+		ListMessage message = new ListMessage();
+		try {
+			Page pageData = subInduService.pageQueryData(page,queryVO);
+			message.add(pageData.getList(), pageData.getTotalCount());
+		} catch (Exception e) {
+			logger.error("",e);
+			message.add("获取失败");
+		}
+		return message;
+	}
+
+	/**
+	 * 保存
+	 */
+	@PostMapping(value = "save")
+	@Log("subIndu保存")
+	public Message save(@RequestBody SubIndu SubIndu) {
+		Message message = new Message();
+		try {
+			subInduService.saveOrUpdate(SubIndu, getCurUser().getLoginName());
+		} catch (Exception e) {
+			logger.error("",e);
+			message.addError(e.getMessage());
+		}
+		return message;
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping(value = "/del")
+	@Log("删除")
+	public Message del(@RequestBody IdDTO idDTO) {
+		Message message = new Message();
+		try {
+			subInduService.del(idDTO.getId());
+		} catch (Exception e) {
+			logger.error("",e);
+			message.addError("删除失败");
+		}
+		return message;
+	}
+}

+ 5 - 0
projects/src/main/webapp/vmodules/leftMenu.jsp

@@ -495,6 +495,11 @@
                             code: '909',
                             url: 'dicsystable/index',
                         },
+                        {
+                            txt: '行业设置',
+                            code: '918',
+                            url: 'subIndu/index',
+                        },
                         /* {
                             txt: 'APP轮播图设置',
                             code: '607',

+ 142 - 0
projects/src/main/webapp/vmodules/subIndu/form.jsp

@@ -0,0 +1,142 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+         pageEncoding="UTF-8" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>用户信息</title>
+    <jsp:include page="../common/common-meta-include.jsp"></jsp:include>
+    <jsp:include page="../common/common-css-include.jsp"></jsp:include>
+</head>
+<style>
+    body {
+        background-color: #ffffff;
+    }
+</style>
+<body>
+<div class="layuimini-container">
+    <div class="layuimini-main">
+        <div class="layui-form" lay-filter="formData">
+            <div class="layui-form-item">
+                <input type="hidden" id="id" name="id" value="${id}">
+            </div>
+            <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
+                <button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">
+                    保存
+                </button>
+                <button type="button" class="layui-btn layui-btn-normal" lay-submit
+                        lay-filter="goBack"> 返回
+                </button>
+            </div>
+            <div class="layui-form-item">
+                <div class="layui-inline">
+                    <label class="layui-form-label">代码</label>
+                    <div class="layui-input-block">
+                        <input readonly type="text" name="code"
+                               autocomplete="off" class="layui-input">
+                    </div>
+                </div>
+            </div>
+
+            <div class="layui-form-item">
+                <div class="layui-inline">
+                    <label class="layui-form-label">名称</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="title" autocomplete="off"
+                               class="layui-input">
+                    </div>
+                </div>
+            </div>
+            <div class="layui-form-item">
+
+
+                <div class="layui-inline">
+                    <label class="layui-form-label">上一级</label>
+                    <div class="layui-input-block">
+                        <select name="lastId">
+                            <option value="">请选择</option>
+                            <c:forEach items="${parentData }" var="hy">
+                                <option value="${hy.id }">${hy.title }</option>
+                            </c:forEach>
+                        </select>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<jsp:include page="../common/common-js-include.jsp"></jsp:include>
+<script type="text/javascript">
+    App.namespace("App.projects.subIndu");
+    (function ($, mod) {
+        mod = mod || {}; //对象声明
+
+        // ---------------变量声明--------------
+        var _form = layui.form,
+            _toolbar = layui.toolbar;
+
+        mod.options = mod.options || {}; // 成员变量
+
+        // ---------------私有方法定义---------------
+        var methods = {
+            init: function () {
+                _form.on("submit(save)", function () {
+                    methods.save();
+                });
+                _form.on("submit(goBack)", function () {
+                    methods.close();
+                });
+                methods.getForm();
+            },
+            getForm: function () {
+                var id = $("#id").val();
+                if (id == "") return;
+                App.postJson("/api/subIndu/getById", {id: id}, function (res) {
+                    if (res.success) {
+                        _form.val("formData", res.data);
+                        _form.render();
+                    }
+                });
+            },
+            save: function () {
+                var formData = _form.val("formData");
+                if (formData) {
+                    // if (formData.telPt && layui.form.config.verify.phoneVal(formData.telPt)) {
+                    //     App.msg.warn("请填写正确的项目管理平台联系人电话");
+                    //     return;
+                    // }
+                    // if (formData.subjectId == null || formData.subjectId == "") {
+                    //     App.msg.warn("请选择所属地点");
+                    //     return;
+                    // }
+                    App.postJson("/api/subIndu/save", formData, function (res) {
+                        if (res.success) {
+                            methods.close();
+                        }
+                    })
+                }
+            },
+            close: function () {
+                App.closeCurrentLayer();
+            }
+        };
+
+        // ---------------成员方法定义---------------
+        mod.form = methods;
+
+        // ---------------初始化---------------
+        $(function () {
+            methods.init();
+        });
+
+    })(jQuery, App.projects.subIndu)
+
+</script>
+</body>
+<style>
+    .layui-form-label {
+        width: 160px !important;
+    }
+</style>
+</html>

+ 231 - 0
projects/src/main/webapp/vmodules/subIndu/list.jsp

@@ -0,0 +1,231 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+    <title>项目文档的单位设置</title>
+    <jsp:include page="../common/common-meta-include.jsp"></jsp:include>
+    <%-- <jsp:include page="../common/common-css-include.jsp"></jsp:include> --%>
+    <link rel="stylesheet" type="text/css" href="${WebSite.asset}/lib/layui-v2.5.5/css/layui.css?version=${version}"
+          media="all"/>
+    <link rel="stylesheet" type="text/css" href="${WebSite.asset}/lib/layui-v2.5.5/css/public.css?version=${version}"
+          media="all"/>
+    <link rel="stylesheet" type="text/css" href="${WebSite.asset}/lib/layui-v2.6.5/css/layui.css?version=${version}"
+          media="all"/>
+    <link rel="stylesheet" type="text/css" href="${WebSite.asset}/css/style.css?version=${version}" media="all"/>
+    <style type="text/css">
+        .layui-form-pane .layui-form-label {
+            width: 160px;
+        }
+
+        .layui-form-label,
+        .layui-input-block {
+            width: fit-content;
+        }
+
+        .layui-form-radio {
+            margin: 0px 10px 0 0;
+        }
+    </style>
+</head>
+
+<body>
+<div class="layui-layout layui-layout-admin">
+    <div class="right_title">
+        <span class="txt">行业设置</span>
+        <div class="layui-collapse">
+            <div class="layui-colla-item">
+                <%--                    <h2 class="layui-colla-title">筛选</h2>--%>
+                <div class="layui-colla-content layui-show">
+                    <form class="layui-form" lay-filter="searchForm">
+                        <div class="layui-row" style="margin-bottom: 30px">
+                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
+                                <button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="search">
+                                    查询
+                                </button>
+                                <button type="button" class="layui-btn layui-btn-normal" lay-submit
+                                      lay-filter="add"> 添加 </button>
+                            </div>
+                        </div>
+                        <div class="layui-row">
+                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">行业</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" name="title" autocomplete="off" class="layui-input">
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <%--      <script type="text/html" id="toolbarDemo">--%>
+    <%--            <div class="layui-btn-container">--%>
+    <%--                <button class="layui-btn layui-btn-add layui-btn-sm data-add-btn" lay-event="add"> 添加 </button>--%>
+    <%--            </div>--%>
+    <%--        	</script>--%>
+
+    <div class="table_box" style="padding-top: 0;">
+        <div class="table_process">
+            <table id="subIndu" lay-filter="subIndu"></table>
+            <div class="pagination-box" id="pagination"></div>
+        </div>
+    </div>
+    <div style="height: 20px;"></div>
+    <script type="text/html" id="kind">
+        {{# if(d.kind == '1'){}}
+        责任单位
+        {{# } else if(d.kind == '2'){ }}
+        监管单位
+        {{# } }}
+    </script>
+
+    <script type="text/html" id="currentTableBar">
+        <div class="toolBar">
+            <span lay-event="edit">编辑</span>
+            <span lay-event="del">删除</span>
+        </div>
+    </script>
+
+
+</div>
+
+<jsp:include page="../common/common-js-include.jsp"></jsp:include>
+<script type="text/javascript">
+    App.namespace("App.projects.subIndu");
+    (function ($, mod) {
+        mod = mod || {}; //对象声明
+        // ---------------变量声明--------------
+        var _table = layui.table,
+            _form = layui.form,
+            _toolbar = layui.toolbar,
+            pageNo = 1,
+            pageSize = 10,
+            _tableName = "subIndu";
+
+        mod.options = mod.options || {}; // 成员变量
+
+        // ---------------私有方法定义---------------
+        var methods = {
+            init: function () {
+                //单行监听
+                _table.on("tool(" + _tableName + ")", function (obj) {
+                    methods[obj.event].call(this, obj);
+                });
+
+                // 工具栏监听
+                _table.on("toolbar(" + _tableName + ")", function (obj) {
+                    methods[obj.event].call(this, obj);
+                });
+                _form.on("submit(search)", function () {
+                    methods.search();
+                });
+
+                _form.on("submit(add)", function () {
+                    console.log("-------");
+                    methods.add();
+                });
+                methods.getData();
+            },
+            add: function (obj) {
+                App.openLayer({
+                    title: "新增",
+                    content: App.getUrl("/subIndu/add"),
+                    height: "600",
+                    width: "800"
+                });
+            },
+            edit: function (obj) {
+                App.openLayer({
+                    title: "编辑",
+                    content: App.getUrl("/subIndu/add?id=" + obj.data.id),
+                    height: "450",
+                    width: "800"
+                });
+            },
+            del: function (obj) {
+                App.msg.confirm("确定删除该行业吗?", function () {
+                    App.postJson("/api/subIndu/del", {id: obj.data.id}, function (res) {
+                        // if (res.success) methods.reload();
+                        if (res.success) methods.getData();
+                    });
+                });
+            },
+            getData: function () {
+                var searchForm = _form.val("searchForm");
+                searchForm.pageNo = pageNo;
+                searchForm.pageSize = pageSize;
+                App.postJson("/api/subIndu/list", searchForm, function (res) {
+                    methods.initTable(res.rows);
+                    methods.loadPage(res.total);
+                });
+            },
+            initTable: function (data) {
+                layui.table.render({
+                    elem: "#" + _tableName, // 指定原始表格元素选择器(推荐id选择器)
+                    even: true,
+                    // toolbar: '#toolbarDemo',
+                    // defaultToolbar: [],
+                    cols: [[ // 设置表头
+                        {type: 'numbers', title: '序号', align: 'center', minwidth: 50},
+                        {field: 'code', title: '代码', minwidth: 138},
+                        {field: 'title', title: '名称', minwidth: 130},
+                        {field: 'parentTitle', title: '上一级', minwidth: 113},
+                        {title: '操作', width: 120, align: 'center', toolbar: '#currentTableBar', fixed: 'right'}
+                    ]],
+                    fixed: true,
+                    height: window.screen.availHeight - 400,
+                    limit: pageSize,
+                    data: data
+                });
+                layui.table.on('tool(' + _tableName + ')', function (obj) {
+                    var event = obj.event;
+                    methods[event].call(this, obj);
+                });
+            },
+            loadPage: function (totalCount) {
+                var self = this;
+                layui.laypage.render({
+                    elem: 'pagination',
+                    count: totalCount,
+                    curr: pageNo,
+                    limit: pageSize,
+                    layout: ['count', 'prev', 'page', 'next', 'skip'],
+                    jump: function (obj, first) {
+                        //首次不执行
+                        if (!first) {
+                            pageNo = obj.curr;
+                            methods.getData();
+                        }
+                    }
+                });
+            },
+            search: function () {
+                pageNo = 1;
+                methods.getData();
+            },
+            close: function () {
+                App.closeCurrentLayer();
+            }
+        };
+        // ---------------成员方法定义---------------
+        mod.list = methods;
+
+        // ---------------初始化---------------
+        $(function () {
+            methods.init();
+        });
+
+        // 开放公共方法给子页面自动调用,由App.js来完成调用,子页面无需特殊处理
+        App.addReloadEvent(methods.getData);
+
+    })(jQuery, App.projects.subIndu)
+</script>
+</body>
+
+</html>

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

@@ -168,7 +168,11 @@
                                             v-model="subInfo.indusKind" lay-filter="indusKind">
                                         <option value="">请选择</option>
                                         <c:forEach items="${HYFL }" var="hy">
-                                            <option value="${hy.id }">${hy.title}</option>
+                                            <option value="${hy.code }">${hy.title}
+                                                <c:forEach items="${hy.children }" var="hy2">
+                                                    <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                </c:forEach>
+                                            </option>
                                         </c:forEach>
                                     </select>
                                 </div>

+ 61 - 24
projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp

@@ -89,7 +89,11 @@
         .layui-form-select dl {
             height: 120px;
         }
-
+        .taller-select {
+            height: 200px; /* 设置固定高度 */
+            max-height: 300px; /* 设置最大高度,防止过长 */
+            overflow-y: auto; /* 启用垂直滚动条 */
+        }
     </style>
 </head>
 <body>
@@ -103,9 +107,9 @@
                 储备项目库
             </div>
             <div class="layui-btn-container" style="margin-top: 20px;margin-left: 20px">
-                <button type="button" class="layui-btn">导出明细</button>
-                <button type="button" class="layui-btn">导出总表</button>
-                <button type="button" class="layui-btn">自定义导出</button>
+                <button type="button" class="layui-btn" @click="exportDetailExcel">导出明细</button>
+                <button type="button" class="layui-btn" @click="exportTotalExcel">导出总表</button>
+                <button type="button" class="layui-btn" @click="exportMoreExcel">自定义导出</button>
             </div>
             <div class="layui-collapse">
                 <div class="layui-colla-item">
@@ -135,11 +139,22 @@
                                         </div>
                                     </div>
                                 </div>
+
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
+                                            <%-- <div id="indusKind"></div>--%>
+                                            <select name="indusKind" class="taller-select">
+                                                <option value="">请选择</option>
+                                                <c:forEach items="${HYFL }" var="hy">
+                                                    <option value="${hy.code }">${hy.title}
+                                                    <c:forEach items="${hy.children }" var="hy2">
+                                                        <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                    </c:forEach>
+                                                    </option>
+                                                </c:forEach>
+                                            </select>
                                         </div>
                                     </div>
                                 </div>
@@ -512,6 +527,7 @@
         template: "#template",
         data: {
             JSDD: [],
+            HYFL: [],
             winH: 0,
             dataList: [],
             startDate: "",
@@ -553,6 +569,8 @@
 
                 App.postJson("/api/dict/query/index", {}, function (res) {
                     self.JSDD = res.data.JSDD;
+                    self.HYFL = res.data.HYFL;
+
                 })
 
                 this.winH = document.body.clientHeight;
@@ -578,20 +596,31 @@
                 <c:forEach items="${XMLX}" var="xm">
                 xmlx.push({value: "${xm.code}", name: "${xm.title}"});
                 </c:forEach>
-                /*           this.kind = layui.xmSelect.render({
-                               el: "#kind",
-                               language: 'zn',
-                               data: xmlx
-                           });*/
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+
+
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--    var childData = [];--%>
+                <%--    <c:forEach items="${xm.children}" var="c">--%>
+                <%--        childData.push({--%>
+                <%--            value: "${c.code}",--%>
+                <%--            name: "${c.title}",--%>
+                <%--        })--%>
+                <%--    </c:forEach>--%>
+                <%--    indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                // this.indusKind = layui.xmSelect.render({
+                //     el: "#indusKind",
+                //     language: 'zn',
+                //     data: indusKindData,
+                // });
+
+
                 layui.laydate.render({
                     elem: '#year',
                     type: 'year',
@@ -726,9 +755,9 @@
                 if (this.light) {
                     param.light = this.light.getValue("valueStr");
                 }
-                if (this.indusKind) {
-                    param.indusKind = this.indusKind.getValue("valueStr");
-                }
+                // if (this.indusKind) {
+                //     param.indusKind = this.indusKind.getValue("valueStr");
+                // }
                 delete (param.select);
                 /*     param.kind = this.kind.getValue("value").sort().join(",");*/
                 return param;
@@ -1005,6 +1034,16 @@
                 var param = this.getSearchParams();
                 App.common.utils.downFile(App.getUrl("subInfoExport/exportSumExcel"), "POST", param, "项目情况表.xlsx", "导出失败");
             },
+            exportTotalExcel: function () {
+                var param = this.getSearchParams();
+                param.status = '1'
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportTotalExcelByStatus"), "POST", param, "项目情况表(储备库).xlsx", "导出失败");
+            },
+            exportDetailExcel: function () {
+                var param = this.getSearchParams();
+                param.status = '1'
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细(储备库).xlsx", "导出失败");
+            },
             exportExcelByIndusKind: function () {
                 var param = this.getSearchParams();
                 App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelByIndusKind"), "POST", param, "项目情况表(按所属行业统计).xlsx", "导出失败");
@@ -1105,11 +1144,9 @@
             },
             openExport: function () {
                 this.showExport = true;
-                console.log('移入了')
             },
             choseExport: function () {
                 this.showExport = false;
-                console.log('移出了')
             }
         }
     });

+ 49 - 18
projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp

@@ -77,9 +77,9 @@
         <div class="right_title">
             <div class="txt" style="width: 100%; font-size: 35px; font-family: '方正小标宋', '仿宋', sans-serif; text-align: center;font-weight: bold;">投产项目库</div>
      <div class="layui-btn-container" style="margin-top: 20px;margin-left: 20px">
-         <button type="button" class="layui-btn">导出明细</button>
-         <button type="button" class="layui-btn">导出总表</button>
-         <button type="button" class="layui-btn">自定义导出</button>
+         <button type="button" class="layui-btn" @click="exportDetailExcel">导出明细</button>
+         <button type="button" class="layui-btn" @click="exportTotalExcel">导出总表</button>
+         <button type="button" class="layui-btn" @click="exportMoreExcel">自定义导出</button>
      </div>
             <div class="layui-collapse">
                 <div class="layui-colla-item">
@@ -169,7 +169,17 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
+<%--                                            <div id="indusKind"></div>--%>
+                                                <select name="indusKind">
+                                                    <option value="">请选择</option>
+                                                    <c:forEach items="${HYFL }" var="hy">
+                                                        <option value="${hy.code }">${hy.title}
+                                                        <c:forEach items="${hy.children }" var="hy2">
+                                                            <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                        </c:forEach>
+                                                        </option>
+                                                    </c:forEach>
+                                                </select>
                                         </div>
                                     </div>
                                 </div>
@@ -784,20 +794,31 @@
                 <c:forEach items="${XMLX}" var="xm">
                 xmlx.push({value: "${xm.code}", name: "${xm.title}"});
                 </c:forEach>
-                // this.kind = layui.xmSelect.render({
-                //     el: "#kind",
-                //     language: 'zn',
-                //     data: xmlx
-                // });
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+
+
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--var childData = [];--%>
+                <%--<c:forEach items="${xm.children}" var="c">--%>
+                <%--childData.push({--%>
+                <%--    value: "${c.code}",--%>
+                <%--    name: "${c.title}",--%>
+                <%--})--%>
+                <%--</c:forEach>--%>
+                <%--indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                <%--this.indusKind = layui.xmSelect.render({--%>
+                <%--    el: "#indusKind",--%>
+                <%--    language: 'zn',--%>
+                <%--    data: indusKindData,--%>
+                <%--});--%>
+
+
                 layui.laydate.render({
                     elem: '#year',
                     type: 'year',
@@ -1244,6 +1265,16 @@
                     }
                 })
             },
+            exportTotalExcel: function () {
+                var param = this.getSearchParams();
+                param.status = '9'
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportTotalExcelByStatus"), "POST", param, "项目情况表(投产库).xlsx", "导出失败");
+            },
+            exportDetailExcel: function () {
+                var param = this.getSearchParams();
+                param.status = '9'
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(投产库).xlsx", "导出失败");
+            },
             exportExcel: function () {
                 var param = this.getSearchParams();
                 App.common.utils.downFile(App.getUrl("subInfoExport/exportSummaryExcel"), "POST", param, "项目情况表.xlsx", "导出失败");

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

@@ -81,9 +81,9 @@
             <%--        <span class="txt" style="width: 100%;text-align: center">在建项目库</span>--%>
             <div class="txt" style="width: 100%; font-size: 35px; font-family: '方正小标宋', '仿宋', sans-serif; text-align: center;font-weight: bold;">在建项目库</div>
                 <div class="layui-btn-container" style="margin-top: 20px;margin-left: 20px">
-                    <button type="button" class="layui-btn">导出明细</button>
-                    <button type="button" class="layui-btn">导出总表</button>
-                    <button type="button" class="layui-btn">自定义导出</button>
+                    <button type="button" class="layui-btn" @click="exportDetailExcel">导出明细</button>
+                    <button type="button" class="layui-btn" @click="exportTotalExcel">导出总表</button>
+                    <button type="button" class="layui-btn" @click="exportMoreExcel">自定义导出</button>
                 </div>
             <div class="layui-collapse">
                 <div class="layui-colla-item">
@@ -127,13 +127,17 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label label-longers required">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
-                                            <%--         <select name="indusKind" lay-search="" multiple>
-                                                         <option value="">请选择</option>
-                                                         <c:forEach items="${HYFL }" var="hy">
-                                                             <option value="${hy.id }">${hy.title }</option>
-                                                         </c:forEach>
-                                                     </select>--%>
+<%--                                            <div id="indusKind"></div>--%>
+                                            <select name="indusKind">
+                                                <option value="">请选择</option>
+                                                <c:forEach items="${HYFL }" var="hy">
+                                                    <option value="${hy.code }">${hy.title}
+                                                    <c:forEach items="${hy.children }" var="hy2">
+                                                        <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                    </c:forEach>
+                                                    </option>
+                                                </c:forEach>
+                                            </select>
                                         </div>
                                     </div>
                                 </div>
@@ -813,15 +817,27 @@
                     layui.form.val("searchForm", JSON.parse(params));
                 }
 
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--var childData = [];--%>
+                <%--<c:forEach items="${xm.children}" var="c">--%>
+                <%--childData.push({--%>
+                <%--    value: "${c.code}",--%>
+                <%--    name: "${c.title}",--%>
+                <%--})--%>
+                <%--</c:forEach>--%>
+                <%--indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                <%--this.indusKind = layui.xmSelect.render({--%>
+                <%--    el: "#indusKind",--%>
+                <%--    language: 'zn',--%>
+                <%--    data: indusKindData,--%>
+                <%--});--%>
 
                 document.getElementById("exportId", function () {
                     self.showExport = true;
@@ -1268,6 +1284,16 @@
                     }
                 })
             },
+            exportTotalExcel: function () {
+                var param = this.getSearchParams();
+                param.status = '3'
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportTotalExcelByStatus"), "POST", param, "项目情况表(在建库).xlsx", "导出失败");
+            },
+            exportDetailExcel: function () {
+                var param = this.getSearchParams();
+                param.status = '3'
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(在建库).xlsx", "导出失败");
+            },
             exportExcel: function () {
                 var param = this.getSearchParams();
                 App.common.utils.downFile(App.getUrl("subInfoExport/exportSummaryExcel"), "POST", param, "项目情况表.xlsx", "导出失败");

+ 52 - 19
projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp

@@ -100,9 +100,9 @@
         <div class="right_title">
             <div class="txt" style="width: 100%; font-size: 35px; font-family: '方正小标宋', '仿宋', sans-serif; text-align: center;font-weight: bold;">新建项目库</div>
             <div class="layui-btn-container" style="margin-top: 20px;margin-left: 20px">
-                <button type="button" class="layui-btn">导出明细</button>
-                <button type="button" class="layui-btn">导出总表</button>
-                <button type="button" class="layui-btn">自定义导出</button>
+                <button type="button" class="layui-btn" @click="exportDetailExcel">导出明细</button>
+                <button type="button" class="layui-btn" @click="exportTotalExcel">导出总表</button>
+                <button type="button" class="layui-btn" @click="exportMoreExcel">自定义导出</button>
             </div>
             <div class="layui-collapse">
                 <div class="layui-colla-item">
@@ -138,10 +138,21 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
+<%--                                            <div id="indusKind"></div>--%>
+                                                <select name="indusKind">
+                                                    <option value="">请选择</option>
+                                                    <c:forEach items="${HYFL }" var="hy">
+                                                        <option value="${hy.code }">${hy.title}
+                                                        <c:forEach items="${hy.children }" var="hy2">
+                                                            <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                        </c:forEach>
+                                                        </option>
+                                                    </c:forEach>
+                                                </select>
                                         </div>
                                     </div>
                                 </div>
+
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers" style="width: 100px;">项目总投资</label>
@@ -701,6 +712,7 @@
                 layui.form.on("select(moveStatus)", function (data) {
                     self.moveDbParam.status = data.value;
                 });
+
                 this.winH = document.body.clientHeight;
                 var nowdate = new Date();
                 nowdate.setMonth(nowdate.getMonth() + 1);
@@ -724,20 +736,31 @@
                 <c:forEach items="${XMLX}" var="xm">
                 xmlx.push({value: "${xm.code}", name: "${xm.title}"});
                 </c:forEach>
-                /*           this.kind = layui.xmSelect.render({
-                               el: "#kind",
-                               language: 'zn',
-                               data: xmlx
-                           });*/
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+
+
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--var childData = [];--%>
+                <%--<c:forEach items="${xm.children}" var="c">--%>
+                <%--childData.push({--%>
+                <%--    value: "${c.code}",--%>
+                <%--    name: "${c.title}",--%>
+                <%--})--%>
+                <%--</c:forEach>--%>
+                <%--indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                <%--this.indusKind = layui.xmSelect.render({--%>
+                <%--    el: "#indusKind",--%>
+                <%--    language: 'zn',--%>
+                <%--    data: indusKindData,--%>
+                <%--});--%>
+
+
                 layui.laydate.render({
                     elem: '#year',
                     type: 'year',
@@ -748,6 +771,7 @@
                 if (params) {
                     layui.form.val("searchForm", JSON.parse(params));
                 }
+
                 <%--if(${isHydw}) {--%>
                 <%--	this.light = layui.xmSelect.render({--%>
                 <%--		el: "#light",--%>
@@ -921,7 +945,6 @@
                 });
                 App.postJson("/api/subInfo/query/statistics", param, function (res) {
                     if (res.success) {
-                        console.log(res.data,"========")
                         self.beginRate = res.data;
                         self.beginRate.hyflList = self.beginRate.hyflData;
                         self.beginRate.jsddList = self.beginRate.jsddData;
@@ -1223,6 +1246,16 @@
                     }
                 })
             },
+            exportTotalExcel: function () {
+                var param = this.getSearchParams();
+                param.status = '2'
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportTotalExcelByStatus"), "POST", param, "项目情况表(新建库).xlsx", "导出失败");
+            },
+            exportDetailExcel: function () {
+                var param = this.getSearchParams();
+                param.status = '2'
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(新建库).xlsx", "导出失败");
+            },
             exportExcel: function () {
                 var param = this.getSearchParams();
                 App.common.utils.downFile(App.getUrl("subInfoExport/exportSummaryExcel"), "POST", param, "项目情况表.xlsx", "导出失败");

+ 47 - 18
projects/src/main/webapp/vmodules/subject/subInfo/tz/xmzk.jsp

@@ -103,9 +103,9 @@
                 项目总库
             </div>
             <div class="layui-btn-container" style="margin-top: 20px;margin-left: 20px">
-                <button type="button" class="layui-btn">导出明细</button>
-                <button type="button" class="layui-btn">导出总表</button>
-                <button type="button" class="layui-btn">自定义导出</button>
+                <button type="button" class="layui-btn" @click="exportDetailExcel">导出明细</button>
+                <button type="button" class="layui-btn" @click="exportTotalExcel">导出总表</button>
+                <button type="button" class="layui-btn" @click="exportMoreExcel">自定义导出</button>
             </div>
             <div class="layui-collapse">
                 <div class="layui-colla-item">
@@ -139,7 +139,17 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
+<%--                                            <div id="indusKind"></div>--%>
+                                                <select name="indusKind">
+                                                    <option value="">请选择</option>
+                                                    <c:forEach items="${HYFL }" var="hy">
+                                                        <option value="${hy.code }">${hy.title}
+                                                        <c:forEach items="${hy.children }" var="hy2">
+                                                            <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                        </c:forEach>
+                                                        </option>
+                                                    </c:forEach>
+                                                </select>
                                         </div>
                                     </div>
                                 </div>
@@ -582,20 +592,31 @@
                 <c:forEach items="${XMLX}" var="xm">
                 xmlx.push({value: "${xm.code}", name: "${xm.title}"});
                 </c:forEach>
-                /*           this.kind = layui.xmSelect.render({
-                               el: "#kind",
-                               language: 'zn',
-                               data: xmlx
-                           });*/
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+
+
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--var childData = [];--%>
+                <%--<c:forEach items="${xm.children}" var="c">--%>
+                <%--childData.push({--%>
+                <%--    value: "${c.code}",--%>
+                <%--    name: "${c.title}",--%>
+                <%--})--%>
+                <%--</c:forEach>--%>
+                <%--indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                <%--this.indusKind = layui.xmSelect.render({--%>
+                <%--    el: "#indusKind",--%>
+                <%--    language: 'zn',--%>
+                <%--    data: indusKindData,--%>
+                <%--});--%>
+
+
                 var kindNatureData = [];
                 <c:forEach items="${TZXZ}" var="xm">
                 kindNatureData.push({value: "${xm.code}", name: "${xm.title}"});
@@ -1091,6 +1112,14 @@
                     }
                 })
             },
+            exportTotalExcel: function () {
+                var param = this.getSearchParams();
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportTotalExcelByStatus"), "POST", param, "项目情况表(总库).xlsx", "导出失败");
+            },
+            exportDetailExcel: function () {
+                var param = this.getSearchParams();
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
+            },
             exportExcel: function () {
                 var param = this.getSearchParams();
                 App.common.utils.downFile(App.getUrl("subInfoExport/exportSumExcel"), "POST", param, "项目情况表.xlsx", "导出失败");