JiangPengLi преди 1 месец
родител
ревизия
7c498f096e
променени са 34 файла, в които са добавени 872 реда и са изтрити 645 реда
  1. 7 8
      projects-service/src/main/java/com/rtrh/projects/modules/account/service/impl/CommUserServiceImpl.java
  2. 6 2
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.java
  3. 61 9
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml
  4. 0 2
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreFlowMapper.java
  5. 0 10
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreFlowMapper.xml
  6. 4 3
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjConMapper.java
  7. 64 25
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjConMapper.xml
  8. 15 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjInfoMapper.java
  9. 108 3
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjInfoMapper.xml
  10. 34 27
      projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubPreNewGxj.java
  11. 17 2
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/ISubPreGxjInfoService.java
  12. 0 2
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoQueryService.java
  13. 1 1
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java
  14. 1 2
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubPreFlowService.java
  15. 3 16
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java
  16. 79 35
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java
  17. 1 5
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreFlowServiceImpl.java
  18. 127 109
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreGxjInfoServiceImpl.java
  19. 28 9
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/PreInfoVO.java
  20. 2 1
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/SubPreFlowGxjVO.java
  21. 104 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/PreNewConGxjVO.java
  22. 0 44
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoPreNewVO.java
  23. 3 44
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoProcedureVO.java
  24. 2 51
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoXjVO.java
  25. 2 0
      projects-service/src/main/java/com/rtrh/projects/modules/system/service/TSysTableService.java
  26. 14 0
      projects-service/src/main/java/com/rtrh/projects/modules/system/service/impl/TSysTableServiceImpl.java
  27. 6 22
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java
  28. 145 151
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java
  29. 3 3
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java
  30. 0 14
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoQueryApiController.java
  31. 0 16
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubPreFlowApiController.java
  32. 19 0
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubPreGxjInfoApiController.java
  33. 9 22
      projects/src/main/webapp/vmodules/subject/subInfo/editProcedure.jsp
  34. 7 7
      projects/src/main/webapp/vmodules/subject/subInfo/tz/procedure.jsp

+ 7 - 8
projects-service/src/main/java/com/rtrh/projects/modules/account/service/impl/CommUserServiceImpl.java

@@ -1,7 +1,6 @@
 package com.rtrh.projects.modules.account.service.impl;
 
 import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
 
 import com.alibaba.fastjson.JSON;
@@ -48,17 +47,17 @@ public class CommUserServiceImpl implements CommUserService {
 	}
 
 	@Override
-	//@TargetDataSource(value="secondary")
 	public CommUser findCommUserByFgwLoginName(String loginname) {
 		if(StringUtil.isEmpty(loginname)){
 			return null;
 		}
-		Object o = HttpClientUtil.fgwGetRequest("/outApi/remote/findCommUserByLoginName", new HashMap<String,String>(){{
-			put("loginname", loginname);
-		}});
-		CommUser commUser = JSON.parseObject(o.toString(), CommUser.class);
-		//CommUser commUser = commUserMapper.findCommUserByFgwLoginName(loginname);
-		return commUser;
+		Object o = HttpClientUtil.fgwGetRequest("/outApi/remote/findCommUserByFgwLoginName?loginName=" + loginname);
+		if (o != null) {
+			return JSON.parseObject(JSON.toJSONString(o), CommUser.class);
+		}
+		return null;
+		// CommUser commUser = commUserMapper.findCommUserByFgwLoginName(loginname);
+		// return commUser;
 	}
 
 	@Override

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

@@ -133,9 +133,13 @@ public interface SubInfoMapper {
 
     List<String> queryIds();
 
-    List<Map<String, Object>> queryAllSubNames();
+    List<Map<String, Object>> queryAllSubNames(@Param("statusArr") String[] statusArr,@Param("subjectIds") List<String> subjectIds);
 
     void batchUpdateCbSubInfo(@Param("list") List<SubInfoGxj> list);
 
-    List<PreInfoVO> queryAllPreInfo(SubInfoQueryTzVO queryVO);
+    void batchUpdateXjSubInfo(@Param("list") List<SubInfoGxj> list);
+
+    void batchUpdateEndSubInfo(@Param("list") List<SubInfoGxj> list);
+
+    void batchUpdateMainSubInfo(@Param("list") List<SubInfoGxj> list);
 }

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

@@ -57,6 +57,57 @@
             id = #{item.id}
         </foreach>
     </update>
+    <update id="batchUpdateXjSubInfo">
+        <foreach collection="list" item="item" separator=";">
+            UPDATE sub_info
+            SET subject_id = #{item.subjectId},
+            content = #{item.content},
+            amt_total = #{item.amtTotal},
+            begin_date = #{item.beginDate},
+            progress = #{item.progress},
+            filing_date = #{item.filingDate},
+            amt_cz = #{item.amtCz},
+            amt_zjz = #{item.amtZjz},
+            amt_ss = #{item.amtSs},
+            num_p = #{item.numP},
+            remark = #{item.remark}
+            WHERE
+            id = #{item.id}
+        </foreach>
+    </update>
+    <update id="batchUpdateMainSubInfo">
+        <foreach collection="list" item="item" separator=";">
+            UPDATE sub_info
+            SET subject_id = #{item.subjectId},
+            content = #{item.content},
+            amt_total = #{item.amtTotal},
+            end_date = #{item.endDate},
+            progress = #{item.progress},
+            amt_cz = #{item.amtCz},
+            amt_zjz = #{item.amtZjz},
+            amt_ss = #{item.amtSs},
+            num_p = #{item.numP},
+            remark = #{item.remark}
+            WHERE
+            id = #{item.id}
+        </foreach>
+    </update>
+    <update id="batchUpdateEndSubInfo">
+        <foreach collection="list" item="item" separator=";">
+            UPDATE sub_info
+            SET subject_id = #{item.subjectId},
+            content = #{item.content},
+            rt_date = #{item.rtDate},
+            progress = #{item.progress},
+            amt_cz = #{item.amtCz},
+            amt_zjz = #{item.amtZjz},
+            amt_ss = #{item.amtSs},
+            num_p = #{item.numP},
+            remark = #{item.remark}
+            WHERE
+            id = #{item.id}
+        </foreach>
+    </update>
     <select id="exportSmzkDetailExcel" resultType="com.rtrh.projects.modules.projects.vo.export.SmzkDetailVo">
         SELECT sub_info.id as id,
         sub_info.sub_name as subName,
@@ -1338,14 +1389,15 @@
         select id from sub_info
     </select>
     <select id="queryAllSubNames" resultType="java.util.Map">
-        select id,sub_name subName from sub_info where status in ("1","2","3","9")
-    </select>
-    <resultMap id="preInfo" type="com.rtrh.projects.modules.projects.vo.PreInfoVO">
-        <id property="id" column="id"/>
-        <result property="subId" column="sub_id"/>
-        <result property="remark" column="remark"/>
-    </resultMap>
-    <select id="queryAllPreInfo" resultMap="preInfo">
-        select id,sub_id subId,remark from sub_info
+        select id,sub_name subName from sub_info where status in
+        <foreach collection="statusArr" item="status" separator="," open="(" close=")">
+            #{status}
+        </foreach>
+        <if test="subjectIds!=null and subjectIds.size()>0">
+            and subject_id in
+            <foreach collection="subjectIds" item="item" separator="," open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
     </select>
 </mapper>

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

@@ -2,7 +2,6 @@ package com.rtrh.projects.modules.projects.mapper;
 
 import com.rtrh.core.repository.mybatis.MyBatisRepository;
 import com.rtrh.projects.modules.projects.po.SubPreFlow;
-import com.rtrh.projects.modules.projects.po.SubPreFlowGxj;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -14,5 +13,4 @@ public interface SubPreFlowMapper {
 
     SubPreFlow findById(@Param("id") String id);
 
-    List<SubPreFlowGxj> findAllPreFlowGxj();
 }

+ 0 - 10
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreFlowMapper.xml

@@ -42,14 +42,4 @@
         WHERE
             id = #{id}
     </select>
-    <select id="findAllPreFlowGxj" resultType="com.rtrh.projects.modules.projects.po.SubPreFlowGxj">
-        select
-            g.id as id,
-            g.title as title,
-            g.title_g as titleG,
-            g.last_update_user_id as lastUpdateUserId,
-            g.last_update_user_name as lastUpdateUserName
-        from
-            sub_pre_flow_gxj g
-    </select>
 </mapper>

+ 4 - 3
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjConMapper.java

@@ -20,9 +20,10 @@ public interface SubPreGxjConMapper{
 
     void saveAll(List<SubPreGxjCon> collect);
 
-    SubPreFlowGxjVO getGxjPreNewInfo(SubPreFlowGxjVO vo);
+    SubPreFlowGxjVO findById(@Param("id") String id);
+    List<SubPreFlowGxjVO> findByIds(@Param("ids") List<String> ids);
 
-    SubPreFlowGxjVO findBySubId(@Param("subId") String subId);
+    void updateById(@Param("list") List<SubPreGxjCon> procedureList);
 
-    List<SubPreGxjCon> findConByPreGxjId(@Param("id") String id);
+    List<SubPreGxjCon> findAllPreFlowGxj();
 }

+ 64 - 25
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjConMapper.xml

@@ -8,36 +8,75 @@
     </sql>
     <insert id="saveAll">
         <foreach collection="list" item="item" index="index" separator=";">
-            insert into sub_pre_gxj_con (id,sub_pre_gxj_id, sub_pre_flow_gxj_id, date_pre)
-            values (#{item.id},#{item.subPreGxjId}, #{item.subPreFlowGxjId}, #{item.datePre})
+            insert into sub_pre_gxj_con (id,sub_pre_gxj_id, sub_pre_flow_gxj_id, date_pre, logic_delete_flag)
+            values (#{item.id},#{item.subPreGxjId}, #{item.subPreFlowGxjId}, #{item.datePre},#{item.logicDeleteFlag})
         </foreach>
     </insert>
-    <select id="getGxjPreNewInfo" resultType="com.rtrh.projects.modules.projects.vo.SubPreFlowGxjVO">
-
-    </select>
-    <select id="findBySubId" resultType="com.rtrh.projects.modules.projects.vo.SubPreFlowGxjVO">
-        SELECT
-            id,
-            sub_id subId,
-            remark
-        FROM
-            sub_pre_gxj_info
-            where sub_id=#{subId}
-            order by last_update_time desc limit 1
+    <update id="updateById">
+        <foreach collection="list" item="item" separator=";">
+            update sub_pre_gxj_con set date_pre = #{item.datePre} where id =#{item.id}
+        </foreach>
+    </update>
+    <resultMap id="conResultMap" type="com.rtrh.projects.modules.projects.vo.SubPreFlowGxjVO">
+        <id property="id" column="id" javaType="String"/>
+        <result property="subId" column="subId" javaType="String"/>
+        <result property="remark" column="remark" javaType="String"/>
+        <collection property="procedureList" ofType="com.rtrh.projects.modules.projects.po.SubPreGxjCon">
+            <result property="datePre" column="datePre" javaType="String"/>
+            <result property="title" column="title" javaType="String"/>
+            <result property="id" column="cid" javaType="String"/>
+            <result property="subPreFlowGxjId" column="flowId" javaType="String"/>
+        </collection>
+    </resultMap>
+    <select id="findById" resultMap="conResultMap">
+        select
+            i.id,
+            i.sub_id subId,
+            i.remark,
+            c.id cid,
+            c.date_pre datePre,
+            f.title,
+            f.id flowId
+        from
+            sub_pre_gxj_info i,
+            sub_pre_gxj_con c,
+            sub_pre_flow_gxj f
+        where
+            i.id = c.sub_pre_gxj_id
+          and c.sub_pre_flow_gxj_id = f.id
+          and i.id=#{id}
     </select>
-    <select id="findConByPreGxjId" resultType="com.rtrh.projects.modules.projects.po.SubPreGxjCon">
-        SELECT
-            c.id,
-            c.sub_pre_gxj_id subPreGxjId,
-            c.sub_pre_flow_gxj_id subPreFlowGxjId,
+    <select id="findByIds" resultMap="conResultMap">
+        select
+            i.id,
+            i.sub_id subId,
+            i.remark,
+            c.id cid,
             c.date_pre datePre,
-            c.logic_delete_flag logicDeleteFlag,
-            f.title
-        FROM
-            sub_pre_gxj_con c
-                left join sub_pre_flow_gxj f on f.id = c.sub_pre_flow_gxj_id
+            f.title,
+            f.id flowId
+        from
+            sub_pre_gxj_info i,
+            sub_pre_gxj_con c,
+            sub_pre_flow_gxj f
         where
-            c.sub_pre_gxj_id =#{id}
+            i.id = c.sub_pre_gxj_id
+          and c.sub_pre_flow_gxj_id = f.id
+          and i.id in
+          <foreach collection="ids" open="(" close=")" separator="," item="item">
+              #{item}
+          </foreach>
+    </select>
+    <select id="findAllPreFlowGxj" resultType="com.rtrh.projects.modules.projects.po.SubPreGxjCon">
+        select
+            g.id as subPreFlowGxjId,
+            g.title as title
+
+--                 ,g.title_g as titleG,
+--             g.last_update_user_id as lastUpdateUserId,
+--             g.last_update_user_name as lastUpdateUserName
+        from
+            sub_pre_flow_gxj g
     </select>
 
 </mapper>

+ 15 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjInfoMapper.java

@@ -3,6 +3,9 @@ package com.rtrh.projects.modules.projects.mapper;
 import com.rtrh.core.repository.mybatis.MyBatisRepository;
 import com.rtrh.projects.modules.projects.po.SubPreGxjCon;
 import com.rtrh.projects.modules.projects.po.SubPreGxjInfo;
+import com.rtrh.projects.modules.projects.po.SubPreNewGxj;
+import com.rtrh.projects.modules.projects.vo.PreInfoVO;
+import com.rtrh.projects.modules.projects.vo.SubInfoQueryTzVO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -30,4 +33,16 @@ public interface SubPreGxjInfoMapper  {
     void delConByInfoIds(@Param("infoIds") List<String> infoIds);
 
     void delInfoByInfoIds(@Param("infoIds") List<String> infoIds);
+
+    void updateById(SubPreGxjInfo info);
+
+    void deleteById(@Param("id") String id);
+
+    void saveBatchPreNew(@Param("list") List<SubPreNewGxj> preNewGxjList);
+
+    void delPreNewGxjBySubIds(@Param("subIds") List<String> subIds);
+
+    List<PreInfoVO> queryAllPreInfo(SubInfoQueryTzVO queryVO);
+
+    List<SubPreNewGxj> findAllPreNewGxj();
 }

+ 108 - 3
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjInfoMapper.xml

@@ -19,7 +19,8 @@
             `create_time`,
             `last_update_user_id`,
             `last_update_user_name`,
-            `last_update_time`
+            `last_update_time`,
+            `logic_delete_flag`
         )
         VALUES
             (
@@ -31,9 +32,51 @@
                 #{createTime},
                 #{lastUpdateUserId},
                 #{lastUpdateUserName},
-                #{lastUpdateTime}
+                #{lastUpdateTime},
+                #{logicDeleteFlag}
             )
     </insert>
+    <insert id="saveBatchPreNew">
+        <foreach collection="list" item="item" separator=";">
+            INSERT INTO
+            sub_pre_new_gxj
+            (
+            `id`,
+            `sub_id`,
+            `sub_pre_gxj_id`,
+            `date_pre`,
+            `last_update_userId`,
+            `last_update_user_name`,
+            `last_update_time`,
+            `logic_delete_flag`
+            )
+            VALUES
+            (
+            #{item.id},
+            #{item.subId},
+            #{item.subPreGxjId},
+            #{item.datePre},
+            #{item.lastUpdateUserid},
+            #{item.lastUpdateUserName},
+            #{item.lastUpdateTime},
+            #{item.logicDeleteFlag}
+            )
+        </foreach>
+    </insert>
+    <update id="updateById">
+        UPDATE
+            sub_pre_gxj_info
+        <set>
+            <if test="subId != null">`sub_id` = #{subId},</if>
+            <if test="remark != null">`remark` = #{remark},</if>
+            <if test="lastUpdateUserId != null">`last_update_user_id` = #{lastUpdateUserId},</if>
+            <if test="lastUpdateUserName != null">`last_update_user_name` = #{lastUpdateUserName},</if>
+            <if test="lastUpdateTime != null">`last_update_time` = #{lastUpdateTime}</if>
+        </set>
+        <where>
+            id=#{id}
+        </where>
+    </update>
     <delete id="delConByInfoIds">
         DELETE FROM sub_pre_gxj_con WHERE sub_pre_gxj_id IN
         <foreach collection="infoIds" item="id" open="(" separator="," close=")">
@@ -46,6 +89,15 @@
             #{id}
         </foreach>
     </delete>
+    <delete id="deleteById">
+        update sub_pre_gxj_info set logic_delete_flag=1 WHERE id = #{id}
+    </delete>
+    <delete id="delPreNewGxjBySubIds">
+        delete from sub_pre_new_gxj where sub_id in
+        <foreach collection="subIds" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
     <select id="getLastNewInfo" resultType="com.rtrh.projects.modules.projects.po.SubPreGxjInfo">
         select
             i.sub_id subId,
@@ -78,5 +130,58 @@
     <select id="findIdBySubId" resultType="java.lang.String">
         select id from sub_pre_gxj_info where sub_id =#{id}
     </select>
-
+    <select id="queryAllPreInfo" resultType="com.rtrh.projects.modules.projects.vo.PreInfoVO">
+        SELECT
+        p.id,
+        s.sub_id subId,
+        s.sub_name subName,
+        s.subject_id subjectId,
+        s.content,
+        s.amt_total amtTotal,
+        p.create_time createTime,
+        p.create_user_name createUserName
+        FROM
+        sub_info s join sub_pre_gxj_info p on p.sub_id=s.sub_id
+        <where>
+            <if test="subName!=null and subName!=''">
+                and s.sub_name like CONCAT('%', #{subName}, '%')
+            </if>
+            <if test="subjectId!=null and subjectId!=''">
+                and s.subject_id = #{subjectId}
+            </if>
+            <if test="subjectAuthIds != null and subjectAuthIds.size() &gt; 0">
+                AND s.subject_id IN
+                <foreach collection="subjectAuthIds" item="item" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="indusKind!=null and indusKind!=''">
+                <if test='indusKind != "UNKNOWN_INDUS_KIND"'>
+                    and s.indus_kind like CONCAT(#{indusKind}, '%')
+                </if>
+                <if test='indusKind.toString() == "UNKNOWN_INDUS_KIND"'>
+                    AND ISNULL(s.indus_kind)
+                </if>
+            </if>
+            <if test="statusList!=null and statusList.size()>0">
+                and s.status IN
+                <foreach collection="statusList" item="item" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </if>
+            and p.logic_delete_flag = 0
+        </where>
+    </select>
+    <select id="findAllPreNewGxj" resultType="com.rtrh.projects.modules.projects.po.SubPreNewGxj">
+        SELECT
+            `id`,
+            `sub_id` subId,
+            `sub_pre_gxj_id` subPreGxjId,
+            `date_pre` datePre,
+            `last_update_userId` lastUpdateUserid,
+            `last_update_user_name` lastUpdateUserName,
+            `last_update_time` lastUpdateTime
+        FROM
+            sub_pre_new_gxj
+    </select>
 </mapper>

+ 34 - 27
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubPreNewGxj.java

@@ -1,36 +1,43 @@
 package com.rtrh.projects.modules.projects.po;
 
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.rtrh.projects.modules.system.po.TableBaseColomn;
+import io.swagger.annotations.ApiModel;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.io.Serializable;
 import java.util.Date;
 
-@Setter
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author jiangpengli
+ * @since 2025-03-06
+ */
 @Getter
-public class SubPreNewGxj extends TableBaseColomn {
-
-	/**
-	 * 主键
-	 */
-	private String id;
-
-	/**
-	 * 项目id
-	 */
-	private String subId;
-	/**
-	 * 项目前期id
-	 */
-	private String subPreGxjId;
-	/**
-	 * 开始办理日期
-	 */
-	@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
-	@JSONField(format = "yyyy-MM-dd")
-	private Date datePre;
-
-	private String lastUpdateUserName;
+@Setter
+// @TableName("sub_pre_new_gxj")
+@ApiModel(value = "SubPreNewGxj对象", description = "")
+public class SubPreNewGxj implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String subId;
+
+    private String subPreGxjId;
+
+    private String datePre;
+
+    private String lastUpdateUserid;
+
+    private String lastUpdateUserName;
+
+    private Date lastUpdateTime;
+
+    private Boolean logicDeleteFlag;
+
+
 }

+ 17 - 2
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/ISubPreGxjInfoService.java

@@ -1,7 +1,10 @@
 package com.rtrh.projects.modules.projects.service;
 
+import com.rtrh.core.repository.Page;
+import com.rtrh.projects.modules.projects.po.SubPreNewGxj;
+import com.rtrh.projects.modules.projects.vo.PreInfoVO;
+import com.rtrh.projects.modules.projects.vo.SubInfoQueryTzVO;
 import com.rtrh.projects.modules.projects.vo.SubPreFlowGxjVO;
-import com.rtrh.projects.modules.projects.vo.export.SubInfoPreNewVO;
 import com.rtrh.projects.modules.system.vo.LoginUserVO;
 import com.rtrh.projects.vo.subject.MoveDbParamVo;
 
@@ -22,7 +25,19 @@ public interface ISubPreGxjInfoService {
 
     SubPreFlowGxjVO getGxjPreNewInfo(SubPreFlowGxjVO vo, LoginUserVO loginUser);
 
-    Map<String, SubInfoPreNewVO> getGxjPreNewInfoList();
+    Map<String, PreInfoVO> getNewPreNewList();
+
+    // Map<String, SubInfoPreNewVO> getGxjPreNewInfoList();
 
     boolean delPreInfo(MoveDbParamVo vo);
+
+    void savePreNewGxj(List<SubPreNewGxj> preNewGxjList);
+
+    void delPreNewGxjBySubIds(List<String> subIds);
+
+    List<PreInfoVO> queryAllPreInfo(LoginUserVO loginUser, SubInfoQueryTzVO queryVO);
+    List<PreInfoVO> queryAllPreInfoAndCon(LoginUserVO userVO, SubInfoQueryTzVO queryVO);
+
+    Page queryProcedurePage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO);
+
 }

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

@@ -363,6 +363,4 @@ public interface SubInfoQueryService {
 	List<Map<String, Object>> querySubInfoStatusByIds(List<String> ids);
 
     List<String> queryIds();
-
-	Page queryProcedurePage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO);
 }

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

@@ -467,7 +467,7 @@ public interface SubInfoService {
 
 	void editStatusRedLight(SubInfoGxj vo, LoginUserVO loginUser);
 
-    List<Map<String, Object>> queryAllSubNames();
+    List<Map<String, Object>> queryAllSubNames(String statusStr,List<String> subjectIds);
 
 	void importCbDetailExcel(List<SubInfoCbVO> readAll, LoginUserVO loginUser);
 

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

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.rtrh.projects.modules.projects.po.SubPreFlow;
 import com.rtrh.projects.modules.projects.po.SubPreFlowGxj;
+import com.rtrh.projects.modules.projects.po.SubPreNewGxj;
 import com.rtrh.projects.modules.projects.vo.SubPreFlowAppVO;
 
 public interface SubPreFlowService {
@@ -24,6 +25,4 @@ public interface SubPreFlowService {
     List<SubPreFlow> getList();
 
 	SubPreFlow findById(String preFlowId);
-
-	List<SubPreFlowGxj> findAllPreFlowGxj();
 }

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

@@ -17,6 +17,7 @@ import com.rtrh.projects.modules.projects.dao.*;
 import com.rtrh.projects.modules.projects.dto.SubFixCbSearch;
 import com.rtrh.projects.modules.projects.enums.*;
 import com.rtrh.projects.modules.projects.mapper.SubInfoQueryMapper;
+import com.rtrh.projects.modules.projects.mapper.SubPreGxjConMapper;
 import com.rtrh.projects.modules.projects.po.*;
 import com.rtrh.projects.modules.projects.service.SubPreNewService;
 import com.rtrh.projects.modules.projects.service.SubRptContService;
@@ -95,7 +96,8 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
 
     @Autowired
     private SubRptContService subRptContService;
-
+    @Autowired
+    private SubPreGxjConMapper subPreGxjConMapper;
     @Override
     public Map<String, Integer> getWarningBySubId(String subId) {
 
@@ -275,21 +277,6 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
     }
 
 
-    @Override
-    public Page queryProcedurePage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
-        PageHelper.startPage(page.getPageNo(), page.getPageSize());
-        List<PreInfoVO> data = this.queryAllPreInfo(loginUser, queryVO);
-        PageInfo<PreInfoVO> pageInfo = new PageInfo<>(data);
-        page.setList(data);
-        page.setTotalCount(pageInfo.getTotal());
-        return page;
-    }
-
-    private List<PreInfoVO> queryAllPreInfo(LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
-        List<PreInfoVO> list = subInfoMapper.queryAllPreInfo(queryVO);
-        return null;
-    }
-
     @Override
     public StatisticsVO queryStatistics(SubInfoQueryTzVO queryVO, LoginUserVO loginUser) {
         if (StringUtils.isNotBlank(queryVO.getSubjects())){

+ 79 - 35
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java

@@ -11,12 +11,15 @@ import java.util.function.Function;
 import java.util.stream.Collectors;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.rtrh.core.vo.Message;
 import com.rtrh.projects.modules.projects.dao.*;
 import com.rtrh.projects.modules.projects.dto.QTDTO;
 import com.rtrh.projects.modules.projects.enums.*;
 import com.rtrh.projects.modules.projects.mapper.SubInfoMapper;
+import com.rtrh.projects.modules.projects.mapper.SubPreNewMapper;
 import com.rtrh.projects.modules.projects.po.*;
 import com.rtrh.projects.modules.projects.service.*;
 import com.rtrh.projects.modules.projects.vo.*;
@@ -167,6 +170,9 @@ public class SubInfoServiceImpl implements SubInfoService {
 
     @Autowired
     private SubSourceService subSourceService;
+    @Autowired
+    private ISubPreGxjInfoService subPreGxjInfoService;
+
 
     @Override
     public Page pageYqInfo(Page page, LoginUserVO vo, String projName, String startTime, String endTime, String overStatus, String year, String beginMonth, String endMonth, Boolean onlySub) {
@@ -5751,12 +5757,18 @@ public class SubInfoServiceImpl implements SubInfoService {
     }
 
     @Override
+    @Transactional(rollbackFor = {Exception.class, RuntimeException.class})
     public void importNewDetailExcel(List<SubInfoXjVO> list, LoginUserVO loginUser) {
         // 获取区县
         Map<String, String> jsddMap = Optional.ofNullable(tSysTableService.getByKind(SysTableKind.JSDD))
                 .orElse(Collections.emptyList()).stream()
                 .collect(Collectors.toMap(TSystable::getTitle, TSystable::getCode));
-        List<SubInfoGxj> data = list.stream().filter(e -> StringUtil.isNotEmpty(e.getId())).map(vo -> {
+        List<SubPreNewGxj> preNewGxjList = new ArrayList<>();
+        // List<SubPreGxjInfo> preGxjInfoList = new ArrayList<>();
+        List<String> subIds = new ArrayList<>();
+        List<SubInfoGxj> data = list.stream()
+                .filter(e -> StringUtil.isNotEmpty(e.getId()))
+                .map(vo -> {
                     SubInfoGxj subInfo = new SubInfoGxj();
                     BeanUtils.copyProperties(vo, subInfo);
                     subInfo.setId(vo.getId());
@@ -5769,35 +5781,62 @@ public class SubInfoServiceImpl implements SubInfoService {
                     if (vo.getAmtTotal() != null) {
                         subInfo.setAmtTotal(vo.getAmtTotal().multiply(new BigDecimal("10000")));
                     }
+                    // 前期手续办理情况
+                    // List<SubInfoXjVO.PreNewInfo> preNewInfoList = vo.getPreNewInfo();
+                    List<PreNewConGxjVO> preNewInfoList = vo.getPreNewInfo();
+                    PreNewConGxjVO preNewInfo = preNewInfoList.get(0);
+
+                    // SubPreGxjInfo subPreGxjInfo = new SubPreGxjInfo();
+                    // String infoId = IdUtil.getSnowflakeNextIdStr();
+                    // subPreGxjInfo.setId(infoId);
+                    // subPreGxjInfo.setSubId(vo.getId());
+                    // subPreGxjInfo.setLastUpdateUserName(loginUser.getRealName());
+                    // subPreGxjInfo.setLastUpdateTime(new Date());
+                    // subPreGxjInfo.setRemark("导入生成");
+                    // preGxjInfoList.add(subPreGxjInfo);
+                    //
+                    // SubPreGxjCon subPreGxjCon = new SubPreGxjCon();
+                    // subPreGxjCon.setId(IdUtil.getSnowflakeNextIdStr());
+                    // subPreGxjCon.setDatePre(vo.getId());
+                    // subPreGxjCon.setSubPreFlowGxjId(vo.getId());
+                    // subPreGxjCon.setSubPreGxjId(vo.getId());
+
+                    preNewGxjList.addAll(preNewInfo.convertSubPreNewGxj(loginUser, vo.getId()));
+                    subIds.add(vo.getId());
+                    subInfo.setFilingDate(preNewInfo.getRecord());
                     return subInfo;
                 }
         ).collect(Collectors.toList());
-        subInfoMapper.batchUpdateCbSubInfo(data);
+        // 删除旧的数据
+        subPreGxjInfoService.delPreNewGxjBySubIds(subIds);
+        subPreGxjInfoService.savePreNewGxj(preNewGxjList);
+        subInfoMapper.batchUpdateXjSubInfo(data);
     }
 
     @Override
+    @Transactional(rollbackFor = {Exception.class, RuntimeException.class})
     public void importMainDetailExcel(List<SubInfoZjVO> list, LoginUserVO loginUser) {
         // 获取区县
         Map<String, String> jsddMap = Optional.ofNullable(tSysTableService.getByKind(SysTableKind.JSDD))
                 .orElse(Collections.emptyList()).stream()
                 .collect(Collectors.toMap(TSystable::getTitle, TSystable::getCode));
-        List<SubInfoGxj> saveData = new ArrayList<>();
-        for (SubInfoZjVO vo : list) {
-            SubInfoGxj subInfo = new SubInfoGxj();
-            BeanUtils.copyProperties(vo, subInfo);
-            subInfo.setId(vo.getId());
-            String s = jsddMap.get(vo.getSubjectName());
-            if (StringUtil.isEmpty(s)){
-                throw new RuntimeException("导入失败,项目所在地为【" + vo.getSubjectName() + "】不存在请检查");
-            }
-            subInfo.setSubjectId(s);
-            subInfo.setContent(vo.getContent());
-            if (vo.getAmtTotal() != null) {
-                subInfo.setAmtTotal(vo.getAmtTotal().multiply(new BigDecimal("10000")));
-            }
-            saveData.add(subInfo);
-        }
-        subInfoMapper.batchUpdateCbSubInfo(saveData);
+        List<SubInfoGxj> saveData = list.stream().filter(vo -> StringUtil.isNotEmpty(vo.getId()))
+                .map(vo -> {
+                    SubInfoGxj subInfo = new SubInfoGxj();
+                    BeanUtils.copyProperties(vo, subInfo);
+                    subInfo.setId(vo.getId());
+                    String s = jsddMap.get(vo.getSubjectName());
+                    if (StringUtil.isEmpty(s)) {
+                        throw new RuntimeException("导入失败,项目所在地为【" + vo.getSubjectName() + "】不存在请检查");
+                    }
+                    subInfo.setSubjectId(s);
+                    subInfo.setContent(vo.getContent());
+                    if (vo.getAmtTotal() != null) {
+                        subInfo.setAmtTotal(vo.getAmtTotal().multiply(new BigDecimal("10000")));
+                    }
+                    return subInfo;
+                }).collect(Collectors.toList());
+        subInfoMapper.batchUpdateMainSubInfo(saveData);
     }
 
     @Override
@@ -5806,20 +5845,21 @@ public class SubInfoServiceImpl implements SubInfoService {
         Map<String, String> jsddMap = Optional.ofNullable(tSysTableService.getByKind(SysTableKind.JSDD))
                 .orElse(Collections.emptyList()).stream()
                 .collect(Collectors.toMap(TSystable::getTitle, TSystable::getCode));
-        List<SubInfoGxj> saveData = new ArrayList<>();
-        for (SubInfoTcVO vo : list) {
-            SubInfoGxj subInfo = new SubInfoGxj();
-            BeanUtils.copyProperties(vo, subInfo);
-            subInfo.setId(vo.getId());
-            String s = jsddMap.get(vo.getSubjectName());
-            if (StringUtil.isEmpty(s)){
-                throw new RuntimeException("导入失败,项目所在地为【" + vo.getSubjectName() + "】不存在请检查");
-            }
-            subInfo.setSubjectId(s);
-            subInfo.setContent(vo.getContent());
-            saveData.add(subInfo);
-        }
-        subInfoMapper.batchUpdateCbSubInfo(saveData);
+        List<SubInfoGxj> saveData = list.stream().filter(vo -> StringUtil.isNotEmpty(vo.getId()))
+                .map(vo -> {
+                    SubInfoGxj subInfo = new SubInfoGxj();
+                    BeanUtils.copyProperties(vo, subInfo);
+                    subInfo.setId(vo.getId());
+                    String s = jsddMap.get(vo.getSubjectName());
+                    if (StringUtil.isEmpty(s)) {
+                        throw new RuntimeException("导入失败,项目所在地为【" + vo.getSubjectName() + "】不存在请检查");
+                    }
+                    subInfo.setSubjectId(s);
+                    subInfo.setContent(vo.getContent());
+                    return subInfo;
+                })
+                .collect(Collectors.toList());
+        subInfoMapper.batchUpdateEndSubInfo(saveData);
     }
 
     @Override
@@ -6169,8 +6209,12 @@ public class SubInfoServiceImpl implements SubInfoService {
     }
 
     @Override
-    public List<Map<String, Object>> queryAllSubNames() {
-        return subInfoMapper.queryAllSubNames();
+    public List<Map<String, Object>> queryAllSubNames(String statusStr,List<String> subjectIds) {
+        String[] statusArr = {"1", "2", "3", "9"};
+        if (StrUtil.isNotBlank(statusStr)){
+            statusArr = statusStr.split(",");
+        }
+        return subInfoMapper.queryAllSubNames(statusArr,subjectIds);
     }
 
     /**

+ 1 - 5
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreFlowServiceImpl.java

@@ -9,6 +9,7 @@ import java.util.stream.Collectors;
 import com.alibaba.fastjson.JSON;
 import com.rtrh.projects.modules.projects.mapper.SubPreFlowMapper;
 import com.rtrh.projects.modules.projects.po.SubPreFlowGxj;
+import com.rtrh.projects.modules.projects.po.SubPreNewGxj;
 import com.rtrh.projects.util.HttpClientUtil;
 import com.rtrh.projects.util.TargetDataSource;
 import org.hibernate.criterion.DetachedCriteria;
@@ -85,9 +86,4 @@ public class SubPreFlowServiceImpl implements SubPreFlowService {
 		return subPreFlowMapper.findById(preFlowId);
 	}
 
-	@Override
-	public List<SubPreFlowGxj> findAllPreFlowGxj() {
-		return subPreFlowMapper.findAllPreFlowGxj();
-	}
-
 }

+ 127 - 109
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreGxjInfoServiceImpl.java

@@ -3,20 +3,26 @@ package com.rtrh.projects.modules.projects.service.impl;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.IdUtil;
-import com.google.errorprone.annotations.Var;
+import cn.hutool.core.util.StrUtil;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.rtrh.common.util.StringUtil;
+import com.rtrh.core.repository.Page;
 import com.rtrh.projects.modules.projects.mapper.SubPreGxjConMapper;
 import com.rtrh.projects.modules.projects.mapper.SubPreGxjInfoMapper;
-import com.rtrh.projects.modules.projects.po.SubPreFlowGxj;
 import com.rtrh.projects.modules.projects.po.SubPreGxjCon;
 import com.rtrh.projects.modules.projects.po.SubPreGxjInfo;
+import com.rtrh.projects.modules.projects.po.SubPreNewGxj;
 import com.rtrh.projects.modules.projects.service.ISubPreGxjInfoService;
-import com.rtrh.projects.modules.projects.service.SubPreFlowService;
+import com.rtrh.projects.modules.projects.vo.PreInfoVO;
+import com.rtrh.projects.modules.projects.vo.SubInfoQueryTzVO;
 import com.rtrh.projects.modules.projects.vo.SubPreFlowGxjVO;
-import com.rtrh.projects.modules.projects.vo.export.SubInfoPreNewVO;
+import com.rtrh.projects.modules.system.enums.SysTableKind;
+import com.rtrh.projects.modules.system.service.TSysTableService;
 import com.rtrh.projects.modules.system.vo.LoginUserVO;
 import com.rtrh.projects.vo.subject.MoveDbParamVo;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.*;
@@ -35,138 +41,150 @@ import java.util.stream.Collectors;
 public class SubPreGxjInfoServiceImpl implements ISubPreGxjInfoService {
     @Resource
     private SubPreGxjInfoMapper subPreGxjInfoMapper;
-
     @Resource
     private SubPreGxjConMapper subPreGxjConMapper;
-
     @Resource
-    private SubPreFlowService subPreFlowService;
+    private TSysTableService tSysTableService;
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void saveGxjPreNewInfo(SubPreFlowGxjVO vo, LoginUserVO userVO) {
-        SubPreGxjInfo info = new SubPreGxjInfo();
-        String preGxjId = IdUtil.getSnowflakeNextIdStr();
-        info.setId(preGxjId);
-        info.setCreateTime(new Date());
-        info.setLastUpdateTime(new Date());
-        info.setLastUpdateUserId(userVO.getId());
-        info.setCreateUserId(userVO.getId());
-        info.setCreateUserName(userVO.getRealName());
-        info.setLastUpdateUserName(userVO.getRealName());
-        info.setSubId(vo.getSubId());
-        info.setRemark(vo.getRemark());
-
-        subPreGxjInfoMapper.save(info);
-
-        List<SubPreGxjCon> collect = vo.getProcedureList().stream().map(item -> {
-            SubPreGxjCon subPreGxjCon = new SubPreGxjCon();
-            subPreGxjCon.setId(IdUtil.getSnowflakeNextIdStr());
-            subPreGxjCon.setSubPreGxjId(preGxjId);
-            subPreGxjCon.setSubPreFlowGxjId(item.getSubPreFlowGxjId());
-            subPreGxjCon.setDatePre(item.getDatePre());
-            return subPreGxjCon;
-        }).collect(Collectors.toList());
-
-        subPreGxjConMapper.saveAll(collect);
-    }
-
-    @Override
-    public SubPreFlowGxjVO getGxjPreNewInfo(SubPreFlowGxjVO vo, LoginUserVO loginUser) {
-        SubPreFlowGxjVO preFlowGxjVO = subPreGxjConMapper.findBySubId(vo.getSubId());
-        if (preFlowGxjVO != null) {
-            List<SubPreGxjCon> list = subPreGxjConMapper.findConByPreGxjId(preFlowGxjVO.getId());
-            preFlowGxjVO.setProcedureList(list);
-        } else {
-            preFlowGxjVO = new SubPreFlowGxjVO();
-            preFlowGxjVO.setSubId(vo.getSubId());
-            List<SubPreFlowGxj> allPreFlowGxj = subPreFlowService.findAllPreFlowGxj();
-            preFlowGxjVO.setProcedureList(allPreFlowGxj.stream().map(item -> {
+        if (StringUtil.isEmpty(vo.getId())){
+            SubPreGxjInfo info = new SubPreGxjInfo();
+            String preGxjId = IdUtil.getSnowflakeNextIdStr();
+            info.setId(preGxjId);
+            info.setCreateTime(new Date());
+            info.setLastUpdateTime(new Date());
+            info.setLastUpdateUserId(userVO.getId());
+            info.setCreateUserId(userVO.getId());
+            info.setCreateUserName(userVO.getRealName());
+            info.setLastUpdateUserName(userVO.getRealName());
+            info.setSubId(vo.getSubId());
+            info.setRemark(vo.getRemark());
+            info.setLogicDeleteFlag(false);
+
+            subPreGxjInfoMapper.save(info);
+
+            List<SubPreGxjCon> collect = vo.getProcedureList().stream().map(item -> {
                 SubPreGxjCon subPreGxjCon = new SubPreGxjCon();
-                subPreGxjCon.setSubPreFlowGxjId(item.getId());
-                subPreGxjCon.setTitle(item.getTitle());
-                subPreGxjCon.setDatePre(DateUtil.format(item.getDatePre(), "yyyy-MM-dd"));
+                subPreGxjCon.setId(IdUtil.getSnowflakeNextIdStr());
+                subPreGxjCon.setSubPreGxjId(preGxjId);
+                subPreGxjCon.setSubPreFlowGxjId(item.getSubPreFlowGxjId());
+                subPreGxjCon.setDatePre(item.getDatePre());
+                subPreGxjCon.setLogicDeleteFlag(false);
                 return subPreGxjCon;
-            }).collect(Collectors.toList()));
+            }).collect(Collectors.toList());
+            subPreGxjConMapper.saveAll(collect);
+        }else {
+            SubPreGxjInfo info = new SubPreGxjInfo();
+            info.setId(vo.getId());
+            info.setLastUpdateTime(new Date());
+            info.setLastUpdateUserId(userVO.getId());
+            info.setLastUpdateUserName(userVO.getRealName());
+            info.setSubId(vo.getSubId());
+            info.setRemark(vo.getRemark());
+            info.setLogicDeleteFlag(false);
+            subPreGxjInfoMapper.updateById(info);
+            subPreGxjConMapper.updateById(vo.getProcedureList());
         }
-        return preFlowGxjVO;
+        // 保存项目最新的手续信息到 sub_pre_new_gxj 表中
+        String subId = vo.getSubId();
+        delPreNewGxjBySubIds(Collections.singletonList(subId));
+        List<SubPreNewGxj> list = vo.getProcedureList().stream().map(item -> {
+                    SubPreNewGxj preNewGxj = new SubPreNewGxj();
+                    preNewGxj.setId(IdUtil.getSnowflakeNextIdStr());
+                    preNewGxj.setSubId(subId);
+                    preNewGxj.setSubPreGxjId(item.getSubPreFlowGxjId());
+                    preNewGxj.setDatePre(item.getDatePre());
+                    preNewGxj.setLastUpdateUserName(userVO.getLoginName());
+                    preNewGxj.setLastUpdateTime(new Date());
+                    preNewGxj.setLastUpdateUserid(userVO.getId());
+                    preNewGxj.setLogicDeleteFlag(false);
+                    return preNewGxj;
+                }
+        ).collect(Collectors.toList());
+        savePreNewGxj(list);
     }
 
     @Override
-    public Map<String, SubInfoPreNewVO> getGxjPreNewInfoList() {
-        List<SubPreGxjInfo> lastNewInfoList = subPreGxjInfoMapper.getLastNewInfo();
-        if (CollUtil.isEmpty(lastNewInfoList)) {
-            return Collections.emptyMap();
+    public SubPreFlowGxjVO getGxjPreNewInfo(SubPreFlowGxjVO vo, LoginUserVO loginUser) {
+        if (StrUtil.isNotBlank(vo.getId())){
+            return subPreGxjConMapper.findById(vo.getId());
+        }else {
+            List<SubPreGxjCon> procedureList = subPreGxjConMapper.findAllPreFlowGxj();
+            procedureList.forEach(e -> e.setDatePre(DateUtil.format(new Date(), "yyyy-MM-dd")));
+            return new SubPreFlowGxjVO().setProcedureList(procedureList);
         }
+    }
 
-        Set<String> ids = new HashSet<>();
-        Map<String, SubPreGxjInfo> collect = lastNewInfoList.stream()
-                .peek(e -> ids.add(e.getId()))
-                .collect(Collectors.toMap(SubPreGxjInfo::getId, Function.identity(), (v1, v2) -> v2));
-        Map<String, SubPreGxjInfo> subIdGroup = lastNewInfoList.stream()
-                .collect(Collectors.toMap(SubPreGxjInfo::getSubId, Function.identity(), (v1, v2) -> v2));
-
-        // 获取所有符合条件的 conList
-        List<SubPreGxjCon> conList = subPreGxjInfoMapper.findALlCon().stream()
-                .filter(item -> ids.contains(item.getSubPreGxjId()))
-                .peek(e -> e.setSubId(collect.get(e.getSubPreGxjId()).getSubId()))
-                .collect(Collectors.toList());
-
-        // 将 conList 分组并转换
-        return conList.stream()
-                .collect(Collectors.groupingBy(SubPreGxjCon::getSubId))
+    @Override
+    public Map<String, PreInfoVO> getNewPreNewList() {
+        List<SubPreNewGxj> list = subPreGxjInfoMapper.findAllPreNewGxj();
+        return list.stream().collect(Collectors.groupingBy(SubPreNewGxj::getSubId))
                 .entrySet().stream()
                 .map(entry -> {
-                    SubInfoPreNewVO vo = new SubInfoPreNewVO();
+                    PreInfoVO vo = new PreInfoVO();
                     vo.setSubId(entry.getKey());
-                    SubPreGxjInfo subPreGxjInfo = subIdGroup.get(entry.getKey());
-                    vo.setCreateTime(subPreGxjInfo.getCreateTime());
-                    vo.setCreateUserName(subPreGxjInfo.getCreateUserName());
-                    entry.getValue().forEach(con -> processSubPreGxjCon(vo, con));
+                    entry.getValue().forEach(con -> vo.fillDatePreByCode(con.getSubPreGxjId(),con.getDatePre()));
                     return vo;
                 })
-                .collect(Collectors.toMap(SubInfoPreNewVO::getSubId, Function.identity(), (v1, v2) -> v2));
+                .collect(Collectors.toMap(PreInfoVO::getSubId, Function.identity(), (v1, v2) -> v2));
     }
 
     @Override
     public boolean delPreInfo(MoveDbParamVo vo) {
-        List<String> infoIds = subPreGxjInfoMapper.findIdBySubId(vo.getId());
-        if (CollUtil.isNotEmpty(infoIds)){
-            subPreGxjInfoMapper.delConByInfoIds(infoIds);
-            subPreGxjInfoMapper.delInfoByInfoIds(infoIds);
-        }
+        subPreGxjInfoMapper.deleteById(vo.getId());
         return true;
     }
 
-    private void processSubPreGxjCon(SubInfoPreNewVO vo, SubPreGxjCon con) {
-        String datePre = con.getDatePre();
-        if (StringUtil.isNotEmpty(datePre)) {
-            Date parsedDate = DateUtil.parse(datePre, "yyyy-MM-dd");
-            if (StringUtil.isNotEmpty(con.getSubPreFlowGxjId())){
-                switch (con.getSubPreFlowGxjId()) {
-                    case "10":
-                        vo.setEnvPlan(parsedDate);
-                        break;
-                    case "13":
-                        vo.setProPlanPermit(parsedDate);
-                        break;
-                    case "14":
-                        vo.setWorkPermit(parsedDate);
-                        break;
-                    case "2":
-                        vo.setPrePlan(parsedDate);
-                        break;
-                    case "3":
-                    case "5":
-                        vo.setRecord(parsedDate);
-                        break;
-                    case "9":
-                        vo.setEnergyPlan(parsedDate);
-                        break;
-                    default:
-                        // 忽略其他情况
-                        break;
+    @Override
+    public void savePreNewGxj(List<SubPreNewGxj> preNewGxjList) {
+        subPreGxjInfoMapper.saveBatchPreNew(preNewGxjList);
+    }
+
+    @Override
+    public void delPreNewGxjBySubIds(List<String> subIds) {
+        if (CollUtil.isNotEmpty(subIds)){
+            subPreGxjInfoMapper.delPreNewGxjBySubIds(subIds);
+        }
+    }
+
+    @Override
+    public List<PreInfoVO> queryAllPreInfo(LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
+        Map<String, String> kindMap = tSysTableService.getCodeTitleMapByKind(SysTableKind.JSDD);
+        List<PreInfoVO> list = subPreGxjInfoMapper.queryAllPreInfo(queryVO);
+        list.forEach(e -> {
+            e.setSubjectName(kindMap.get(e.getSubjectId()));
+        });
+        return list;
+    }
+
+    @Override
+    public List<PreInfoVO> queryAllPreInfoAndCon(LoginUserVO userVO, SubInfoQueryTzVO queryVO) {
+        Map<String, String> kindMap = tSysTableService.getCodeTitleMapByKind(SysTableKind.JSDD);
+        List<PreInfoVO> list = subPreGxjInfoMapper.queryAllPreInfo(queryVO);
+        List<SubPreFlowGxjVO> conList = subPreGxjConMapper.findByIds(list.stream().map(PreInfoVO::getId).collect(Collectors.toList()));
+        Map<String, SubPreFlowGxjVO> infoMap = conList.stream().collect(Collectors.toMap(SubPreFlowGxjVO::getId, Function.identity(), (o1, o2) -> o1));
+
+        list.forEach(e -> {
+            e.setSubjectName(kindMap.get(e.getSubjectId()));
+            List<SubPreGxjCon> subConList = Optional.ofNullable(infoMap.get(e.getId())).map(SubPreFlowGxjVO::getProcedureList).orElse(new ArrayList<>());
+            if (CollUtil.isNotEmpty(subConList)){
+                for (SubPreGxjCon subPreGxjCon : subConList) {
+                    e.fillDatePreByCode(subPreGxjCon.getSubPreFlowGxjId(), subPreGxjCon.getDatePre());
                 }
             }
-        }
+        });
+        return list;
+    }
+
+    @Override
+    public Page queryProcedurePage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
+        PageHelper.startPage(page.getPageNo(), page.getPageSize());
+        List<PreInfoVO> data = this.queryAllPreInfo(loginUser, queryVO);
+        PageInfo<PreInfoVO> pageInfo = new PageInfo<>(data);
+        page.setList(data);
+        page.setTotalCount(pageInfo.getTotal());
+        return page;
     }
 }

+ 28 - 9
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/PreInfoVO.java

@@ -1,19 +1,38 @@
 package com.rtrh.projects.modules.projects.vo;
 
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.rtrh.projects.modules.projects.vo.export.PreNewConGxjVO;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
-import java.util.List;
+import java.math.BigDecimal;
+import java.util.Date;
 
 @Data
-public class PreInfoVO{
-	private String id;
+@EqualsAndHashCode(callSuper = true)
+public class PreInfoVO extends PreNewConGxjVO {
+    // info id
+    private String id;
     private String subId;
-    private String remark;
-    private String createdName;
-    private List<PreCon> conList;
+    private String subName;
+    private String subjectId;
+    private String subjectName;
+    private String content;
+    private BigDecimal amtTotal;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date createTime;
+    private String createUserName;
 
-    static class PreCon{
-        private String id;
-        private String datePre;
+    public Date findDateByCode(String code){
+        return super.findDateByCode(code);
+    }
+
+    public void fillDatePreByCode(String code,String datePreStr){
+        if (StrUtil.isNotBlank(datePreStr)){
+            Date datePre = DateUtil.parse(datePreStr, "yyyy-MM-dd");
+            super.fillDatePreByCode(code, datePre);
+        }
     }
 }

+ 2 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/SubPreFlowGxjVO.java

@@ -1,14 +1,15 @@
 package com.rtrh.projects.modules.projects.vo;
 
 import com.rtrh.projects.modules.projects.po.SubPreGxjCon;
-import lombok.Data;
 import lombok.Getter;
 import lombok.Setter;
+import lombok.experimental.Accessors;
 
 import java.util.List;
 
 @Setter
 @Getter
+@Accessors(chain = true)
 public class SubPreFlowGxjVO {
 
 	private String id;

+ 104 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/PreNewConGxjVO.java

@@ -0,0 +1,104 @@
+package com.rtrh.projects.modules.projects.vo.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
+import com.rtrh.projects.modules.projects.po.SubPreNewGxj;
+import com.rtrh.projects.modules.system.vo.LoginUserVO;
+import lombok.Data;
+
+import java.util.*;
+
+@Data
+public class PreNewConGxjVO {
+    // 备案(核准)3,5
+    @Excel(name = "备案(核准)", format = "yyyy年MM月")
+    private Date record;
+
+    // 用地预审与选址意见书 2
+    @Excel(name = "用地预审与选址意见书", format = "yyyy年MM月")
+    private Date prePlan;
+
+    // 环评批复 10
+    @Excel(name = "环评批复", format = "yyyy年MM月")
+    private Date envPlan;
+
+    // 能评批复 9
+    @Excel(name = "能评批复", format = "yyyy年MM月")
+    private Date energyPlan;
+
+    // 安评批复 11
+    @Excel(name = "安评批复", format = "yyyy年MM月")
+    private Date safePlan;
+
+    // 水土保持批复 19
+    @Excel(name = "水土保持批复", format = "yyyy年MM月")
+    private Date soilPlan;
+
+    // 建设用地规划许可证 7
+    @Excel(name = "建设用地规划许可证", format = "yyyy年MM月")
+    private Date planPermit;
+
+    // 土地证
+    // @Excel(name = "土地证",  format = "yyyy年MM月")
+    // private Date landPermit;
+
+    // 建设工程规划许可证 13
+    @Excel(name = "建设工程规划许可证", format = "yyyy年MM月")
+    private Date proPlanPermit;
+
+    // 施工图联合审查 15
+    @Excel(name = "施工图联合审查", format = "yyyy年MM月")
+    private Date unionPlanPermit;
+
+    // 施工许可证 14
+    @Excel(name = "施工许可证", format = "yyyy年MM月")
+    private Date workPermit;
+
+    public final static Map<String, String> codeMap = new HashMap<String, String>() {{
+        put("3", "record");
+        put("5", "record");
+        put("2", "prePlan");
+        put("10", "envPlan");
+        put("9", "energyPlan");
+        put("11", "safePlan");
+        put("19", "soilPlan");
+        put("7", "planPermit");
+        put("14", "workPermit");
+        put("13", "proPlanPermit");
+        put("15", "unionPlanPermit");
+    }};
+
+    public void fillDatePreByCode(String code, Date datePre) {
+        if (StrUtil.isNotBlank(codeMap.get(code))){
+            BeanUtil.setProperty(this, codeMap.get(code), datePre);
+        }
+    }
+
+    public Date findDateByCode(String code){
+        if (StrUtil.isNotBlank(code)){
+            return BeanUtil.getProperty(this, codeMap.get(code));
+        }
+        return null;
+    }
+
+    public List<SubPreNewGxj> convertSubPreNewGxj(LoginUserVO loginUser, String subId) {
+        List<SubPreNewGxj> list = new ArrayList<>();
+        codeMap.forEach((k, v) -> {
+            SubPreNewGxj subPreNewGxj = new SubPreNewGxj();
+            subPreNewGxj.setId(IdUtil.getSnowflakeNextIdStr());
+            subPreNewGxj.setSubId(subId);
+            subPreNewGxj.setSubPreGxjId(k);
+            subPreNewGxj.setLastUpdateTime(new Date());
+            subPreNewGxj.setLastUpdateUserid(loginUser.getId());
+            subPreNewGxj.setLastUpdateUserName(loginUser.getRealName());
+            subPreNewGxj.setLogicDeleteFlag(false);
+            Date datePre = BeanUtil.getProperty(this, v);
+            subPreNewGxj.setDatePre(DateUtil.format(datePre, "yyyy-MM-dd"));
+            list.add(subPreNewGxj);
+        });
+        return list;
+    }
+}

+ 0 - 44
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoPreNewVO.java

@@ -1,44 +0,0 @@
-package com.rtrh.projects.modules.projects.vo.export;
-
-import lombok.Data;
-
-import java.util.Date;
-
-@Data
-public class SubInfoPreNewVO {
-    private String id;
-    private String subId;
-    private String createUserName;
-    private Date createTime;
-
-    //    备案(核准) 3,5
-    private Date record;
-
-    //    用地预审与选址意见书 2
-    private Date prePlan;
-
-    //    环评批复 10
-    private Date envPlan;
-
-    //    能评批复 9
-    private Date energyPlan;
-
-    //    安评批复 11
-    private Date safePlan;
-
-    //    水土保持批复 19
-    private Date soilPlan;
-
-    //    建设用地规划许可证 7
-    private Date planPermit;
-
-    //    建设工程规划许可证 13
-    private Date proPlanPermit;
-
-    //    施工图联合审查 15
-    private Date unionPlanPermit;
-
-    //    施工许可证  14
-    private Date workPermit;
-
-}

+ 3 - 44
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoProcedureVO.java

@@ -1,15 +1,11 @@
 package com.rtrh.projects.modules.projects.vo.export;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
-import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
+import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
 import lombok.Data;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.ToString;
 
 import java.math.BigDecimal;
 import java.util.Date;
-import java.util.List;
 
 @Data
 public class SubInfoProcedureVO {
@@ -33,43 +29,6 @@ public class SubInfoProcedureVO {
     @Excel(name = "填写人",width = 15.0)
     private String createUserName;
 
-    //    备案(核准)3,5
-    @Excel(name = "备案(核准)", format = "yyyy年MM月")
-    private Date record;
-
-    //    用地预审与选址意见书 2
-    @Excel(name = "用地预审与选址意见书", format = "yyyy年MM月")
-    private Date prePlan;
-
-    //    环评批复 10
-    @Excel(name = "环评批复",   format = "yyyy年MM月")
-    private Date envPlan;
-
-    //    能评批复 9
-    @Excel(name = "能评批复",format = "yyyy年MM月")
-    private Date energyPlan;
-
-    //    安评批复 11
-    @Excel(name = "安评批复", format = "yyyy年MM月")
-    private Date safePlan;
-
-    //    水土保持批复 19
-    @Excel(name = "水土保持批复",  format = "yyyy年MM月")
-    private Date soilPlan;
-
-    //    建设用地规划许可证 7
-    @Excel(name = "建设用地规划许可证",format = "yyyy年MM月")
-    private Date planPermit;
-
-    //    建设工程规划许可证 13
-    @Excel(name = "建设工程规划许可证", format = "yyyy年MM月")
-    private Date proPlanPermit;
-
-    //    施工图联合审查 15
-    @Excel(name = "施工图联合审查",  format = "yyyy年MM月")
-    private Date unionPlanPermit;
-
-    //    施工许可证 14
-    @Excel(name = "施工许可证",   format = "yyyy年MM月")
-    private Date workPermit;
+    @ExcelEntity(name = "手续")
+    private PreNewConGxjVO preNewInfo;
 }

+ 2 - 51
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoXjVO.java

@@ -2,8 +2,7 @@ package com.rtrh.projects.modules.projects.vo.export;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
-import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
-import lombok.*;
+import lombok.Data;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -33,7 +32,7 @@ public class SubInfoXjVO {
     private Date beginDate;
 
     @ExcelCollection(name = "前期手续办理情况(已取得的填写已取得,无需办理的填写“/”,未取得的需填写预计取得时间**年**月)")
-    private List<PreNewInfo> preNewInfo;
+    private List<PreNewConGxjVO> preNewInfo;
 
     @Excel(name = "前期手续办理情况",  width = 50.0)
     private String preContent;
@@ -63,52 +62,4 @@ public class SubInfoXjVO {
     @Excel(name = "备注",width = 30.0)
     private String remark;
 
-    @Getter
-    @Setter
-    @ToString
-    public static class PreNewInfo {
-        //    备案(核准)3,5
-        @Excel(name = "备案(核准)", format = "yyyy年MM月")
-        private Date record;
-
-        //    用地预审与选址意见书 2
-        @Excel(name = "用地预审与选址意见书", format = "yyyy年MM月")
-        private Date prePlan;
-
-        //    环评批复 10
-        @Excel(name = "环评批复",   format = "yyyy年MM月")
-        private Date envPlan;
-
-        //    能评批复 9
-        @Excel(name = "能评批复",format = "yyyy年MM月")
-        private Date energyPlan;
-
-        //    安评批复 11
-        @Excel(name = "安评批复", format = "yyyy年MM月")
-        private Date safePlan;
-
-        //    水土保持批复 19
-        @Excel(name = "水土保持批复",  format = "yyyy年MM月")
-        private Date soilPlan;
-
-        //    建设用地规划许可证 7
-        @Excel(name = "建设用地规划许可证",format = "yyyy年MM月")
-        private Date planPermit;
-
-        //    土地证
-        // @Excel(name = "土地证",  format = "yyyy年MM月")
-        // private Date landPermit;
-
-        //    建设工程规划许可证 13
-        @Excel(name = "建设工程规划许可证", format = "yyyy年MM月")
-        private Date proPlanPermit;
-
-        //    施工图联合审查 15
-        @Excel(name = "施工图联合审查",  format = "yyyy年MM月")
-        private Date unionPlanPermit;
-
-        //    施工许可证 14
-        @Excel(name = "施工许可证",   format = "yyyy年MM月")
-        private Date workPermit;
-    }
 }

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

@@ -1,6 +1,7 @@
 package com.rtrh.projects.modules.system.service;
 
 import java.util.List;
+import java.util.Map;
 
 import com.rtrh.core.repository.Page;
 import com.rtrh.projects.modules.system.enums.SysTableKind;
@@ -14,6 +15,7 @@ public interface TSysTableService {
 	 * @return
 	 */
 	List<TSystable> getByKind(SysTableKind kind);
+	Map<String,String> getCodeTitleMapByKind(SysTableKind kind);
 
 	List<TSystable> getByKind(SysTableKind kind, String catId);
 

+ 14 - 0
projects-service/src/main/java/com/rtrh/projects/modules/system/service/impl/TSysTableServiceImpl.java

@@ -1,8 +1,12 @@
 package com.rtrh.projects.modules.system.service.impl;
 
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
+import cn.hutool.core.collection.CollUtil;
 import com.rtrh.projects.modules.projects.mapper.TSystableMapper;
 import com.rtrh.projects.modules.rolemeun.dao.MeunInfoDao;
 import com.rtrh.projects.modules.rolemeun.po.MeunInfo;
@@ -41,6 +45,16 @@ public class TSysTableServiceImpl implements TSysTableService {
 		// return tSystableDao.getSysDataByKind(kind);
 	}
 
+	@Override
+	public Map<String, String> getCodeTitleMapByKind(SysTableKind kind) {
+		List<TSystable> byKind = tSystableMapper.getSysDataByKind(kind.getCode());
+		if (CollUtil.isNotEmpty(byKind)) {
+			return byKind.stream().collect(Collectors.toMap(TSystable::getCode, TSystable::getTitle, (v1, v2) -> v1));
+		} else {
+			return new HashMap<>();
+		}
+	}
+
 
 	@Override
 	public List<TSystable> getByKind(SysTableKind kind, String catId) {

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

@@ -11,6 +11,7 @@ import java.util.stream.Collectors;
 
 import javax.servlet.http.HttpServletResponse;
 
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.rtrh.projects.modules.projects.dao.SubMajorMonthDao;
@@ -900,32 +901,15 @@ public class SubInfoController extends BaseController {
     }
 
     @GetMapping("editProcedure")
-    public ModelAndView editProcedure(String subId, ModelMap model) {
-        if (StringUtil.isNotEmpty(subId)){
-            model.put("subId", subId);
+    public ModelAndView editProcedure(String id,String statusArrStr, ModelMap model) {
+        if (StringUtil.isNotEmpty(id)){
+            model.put("id", id);
         }
-        List<JUnit> unit = jUnitService.getUnitByKind(JUnitKind.ZFDW);
-        model.addAttribute("unit", unit);
-
-
-        List<JUnit> allUnit = jUnitService.getUnitByKind(null);
-        model.addAttribute("allUnit", allUnit);
-
-        List<Map<String, Object>> subNameList = subInfoService.queryAllSubNames();
+        List<String> subjectIds = getSubjectIds();
+        List<Map<String, Object>> subNameList = subInfoService.queryAllSubNames(statusArrStr,subjectIds);
         model.put("subNameList", subNameList);
-
-        //资金来源
-        model.put("ZJLY", tSysTableService.getByKind(SysTableKind.ZJLY));
-        //所属行业
-        model.put("HYFL", tSysTableService.getByKind(SysTableKind.HYFL));
-        //项目类型
-        model.put("XMLX", tSysTableService.getByKind(SysTableKind.XMLX));
-        //建设性质
-        model.put("JSXZ", tSysTableService.getByKind(SysTableKind.JSXZ));
         //建设地点
         model.put("JSDD", tSysTableService.getByKind(SysTableKind.JSDD));
-        //投资类型
-        model.put("TZXZ", tSysTableService.getByKind(SysTableKind.TZXZ));
         return new ModelAndView("/vmodules/subject/subInfo/editProcedure.jsp");
     }
 

+ 145 - 151
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -2,6 +2,7 @@ package com.rtrh.projects.web.controller.subject;
 
 import cn.afterturn.easypoi.entity.BaseTypeConstants;
 import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import cn.afterturn.easypoi.excel.entity.ExportParams;
 import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
 import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
@@ -112,6 +113,7 @@ public class SubInfoExportController extends BaseController {
     private ISubHisService subHisService;
     @Autowired
     private ISubPreGxjInfoService subPreGxjInfoService;
+
     /**
      * 导出汇总表
      *
@@ -653,7 +655,7 @@ public class SubInfoExportController extends BaseController {
 
         try {
             List<String> subjectIds = getSubjectIds();
-            List<SubInfoTotalExcel> subInfoTotalExcel = subInfoService.getFixTotalExcel(vo,subjectIds);
+            List<SubInfoTotalExcel> subInfoTotalExcel = subInfoService.getFixTotalExcel(vo, subjectIds);
             if (subInfoTotalExcel == null) {
                 subInfoTotalExcel = new ArrayList<>();
             }
@@ -679,10 +681,10 @@ public class SubInfoExportController extends BaseController {
                         } else {
                             data.setInduskind(first.get().getTitle());
                         }
-                    }else {
+                    } else {
                         data.setInduskind("");
                     }
-                }else {
+                } else {
                     data.setInduskind("");
                 }
                 if (StringUtil.isNotEmpty(subjectId)) {
@@ -691,7 +693,7 @@ public class SubInfoExportController extends BaseController {
                         data.setSubjectId("");
                     }
                     first.ifPresent(tSystable -> data.setSubjectId(tSystable.getTitle()));
-                }else{
+                } else {
                     data.setSubjectId("");
                 }
                 //将金额由万元为单位转换为亿元为单位,并且保留两位小数,避免空指针异常
@@ -747,7 +749,7 @@ public class SubInfoExportController extends BaseController {
             LinkedHashMap<String, List<SubInfoTotalExcel>> industryList = subInfoTotalExcel.stream().collect(Collectors.groupingBy(SubInfoTotalExcel::getInduskind, LinkedHashMap::new, Collectors.toList()));
 
             //遍历subInfoTotalExcel数据计算总金额
-            BigDecimal totalAmt = subInfoTotalExcel.stream().map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO, BigDecimal::add);
+            BigDecimal totalAmt = subInfoTotalExcel.stream().map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO, BigDecimal::add);
             Integer totalNum = subInfoTotalExcel.size();
 
             LinkedHashMap<String, List<List<String>>> finalDataMap = new LinkedHashMap<>();
@@ -759,7 +761,7 @@ public class SubInfoExportController extends BaseController {
                 data.add("按属地分");
                 data.add(subInfoListEntry.getKey());
                 data.add(String.valueOf(subInfoListEntry.getValue().size()));
-                data.add(String.valueOf(subInfoListEntry.getValue().stream().map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO, BigDecimal::add)));
+                data.add(String.valueOf(subInfoListEntry.getValue().stream().map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO, BigDecimal::add)));
                 areaData.add(data);
             }
             finalDataMap.put("按属地划分", areaData);
@@ -771,7 +773,7 @@ public class SubInfoExportController extends BaseController {
                     data.add("按规模划分");
                     data.add(subInfoListEntry.getKey());
                     data.add(String.valueOf(subInfoListEntry.getValue().size()));
-                    data.add(String.valueOf(subInfoListEntry.getValue().stream().map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO, BigDecimal::add)));
+                    data.add(String.valueOf(subInfoListEntry.getValue().stream().map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO, BigDecimal::add)));
                     moneyData.add(data);
                 }
                 finalDataMap.put("按规模划分", moneyData);
@@ -783,7 +785,7 @@ public class SubInfoExportController extends BaseController {
                 data.add("按行业分");
                 data.add(subInfoListEntry.getKey());
                 data.add(String.valueOf(subInfoListEntry.getValue().size()));
-                data.add(String.valueOf(subInfoListEntry.getValue().stream().map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO, BigDecimal::add)));
+                data.add(String.valueOf(subInfoListEntry.getValue().stream().map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO, BigDecimal::add)));
                 industryData.add(data);
             }
             finalDataMap.put("按行业划分", industryData);
@@ -797,7 +799,7 @@ public class SubInfoExportController extends BaseController {
 
                 for (Map.Entry<String, List<List<String>>> dataListEntry : finalDataMap.entrySet()) {
                     List<List<String>> dataList = dataListEntry.getValue();
-                    if (dataList != null && dataList.size() > 0){
+                    if (dataList != null && dataList.size() > 0) {
                         int dataSize = dataList.size();
                         if (dataSize == 1) {
                             indexStart += dataSize;
@@ -850,6 +852,7 @@ public class SubInfoExportController extends BaseController {
             }
         }
     }
+
     // 将数字转换为中文数字的方法
     public static String toChineseNumber(int num) {
         String[] chineseDigits = {"", "一", "二", "三", "四", "五", "六", "七", "八", "九"};
@@ -879,7 +882,6 @@ public class SubInfoExportController extends BaseController {
 
     /**
      * 新建库 导出明细
-     *
      */
     @PostMapping("/exportNewDetailExcel")
     public void exportNewDetailExcel(@RequestBody SubInfoQueryTzVO queryVO) {
@@ -890,7 +892,7 @@ public class SubInfoExportController extends BaseController {
         // 按行业分组
         Map<String, List<SubInfoGxj>> groupMap = list.stream()
                 .collect(Collectors.groupingBy(e -> {
-                    if (StringUtils.isNotBlank(e.getIndusKind())){
+                    if (StringUtils.isNotBlank(e.getIndusKind())) {
                         return e.getIndusKind().substring(0, 2);
                     }
                     return "未知行业";
@@ -899,9 +901,9 @@ public class SubInfoExportController extends BaseController {
         List<SubPreNew> subPreNewList = subPreNewService.findList();
         Map<String, List<SubPreNew>> subIdGroups = subPreNewList.stream().collect(Collectors.groupingBy(SubPreNew::getSubId));
         // 查询工信局设置的手续
-        Map<String, SubInfoPreNewVO> collect = subPreGxjInfoService.getGxjPreNewInfoList();
+        Map<String, PreInfoVO> collect = subPreGxjInfoService.getNewPreNewList();
 
-        ExportParams exportParams = new ExportParams("“四个一批”工业项目表(新建项目库)","新建项目库",ExcelType.XSSF);
+        ExportParams exportParams = new ExportParams("“四个一批”工业项目表(新建项目库)", "新建项目库", ExcelType.XSSF);
         exportParams.setStyle(ExcelStyleUtil.class);
 
         List<SubInfoXjVO> exportList = new ArrayList<>();
@@ -931,43 +933,25 @@ public class SubInfoExportController extends BaseController {
                 BeanUtils.copyProperties(subInfoGxj, vo);
                 vo.setAmtTotal(convertAmount(subInfoGxj.getAmtTotal()));
                 vo.setIndex(i + 1 + "");
-                SubInfoXjVO.PreNewInfo preNewInfo = new SubInfoXjVO.PreNewInfo();
+                // SubInfoXjVO.PreNewInfo preNewInfo = new SubInfoXjVO.PreNewInfo();
+                PreNewConGxjVO preNewInfo = new PreNewConGxjVO();
                 vo.setPreNewInfo(Collections.singletonList(preNewInfo));
+                // 前期手续
                 List<SubPreNew> preNews = subIdGroups.get(subInfoGxj.getSubId());
-                SubInfoPreNewVO subInfoPreNewVO = collect.get(subInfoGxj.getSubId());
-
-                if (CollUtil.isNotEmpty(preNews)){
-                    preNews.forEach(e -> {
-                        if ("3".equals(e.getPreFlowId()) || "5".equals(e.getPreFlowId())) {
-                            preNewInfo.setRecord(e.getDateConfirm() != null ? e.getDateConfirm() :subInfoPreNewVO!=null? subInfoPreNewVO.getRecord():null); // 备案核准
-                        } else if ("2".equals(e.getPreFlowId())) {
-                            preNewInfo.setPrePlan(e.getDateConfirm() != null ? e.getDateConfirm() : subInfoPreNewVO == null ? null : subInfoPreNewVO.getPrePlan()); // 用地预审与选址意见书
-                        } else if ("13".equals(e.getPreFlowId())) {
-                            preNewInfo.setProPlanPermit(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getProPlanPermit()); // 建设工程规划许可证
-                        } else if ("14".equals(e.getPreFlowId())) {
-                            preNewInfo.setWorkPermit(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getWorkPermit()); // 施工许可证
-                        }else if ("10".equals(e.getPreFlowId())){
-                            preNewInfo.setEnvPlan(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getEnvPlan()); // 环评
-                        }else if ("9".equals(e.getPreFlowId())){
-                            preNewInfo.setEnergyPlan(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getEnergyPlan()); // 能评
-                        }else if ("11".equals(e.getPreFlowId())){
-                            preNewInfo.setSafePlan(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getSafePlan()); // 安评
-                        }else if ("19".equals(e.getPreFlowId())){
-                            preNewInfo.setSoilPlan(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getSoilPlan()); // 生产建设项目水土保持方案审批
-                        }else if ("7".equals(e.getPreFlowId())){
-                            preNewInfo.setPlanPermit(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getPlanPermit()); // 建设用地规划许可证
-                        }else if ("15".equals(e.getPreFlowId())){
-                            preNewInfo.setUnionPlanPermit(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getUnionPlanPermit()); // 施工图联合审查
-                        }
-                    });
-                }else {
-                    if (subInfoPreNewVO != null){
-                        BeanUtils.copyProperties(subInfoPreNewVO, preNewInfo);
+                // 工信局设置的前期手续时间
+                PreInfoVO subInfoPreNewVO = collect.get(subInfoGxj.getSubId());
+
+                if (subInfoPreNewVO != null) {
+                    BeanUtils.copyProperties(subInfoPreNewVO, preNewInfo);
+                }
+                if (CollUtil.isNotEmpty(preNews)) {
+                    for (SubPreNew preNew : preNews) {
+                        preNewInfo.fillDatePreByCode(preNew.getPreFlowId(), preNew.getDateConfirm());
                     }
                 }
                 hyList.add(vo);
             }
-            // 添加前计算行业类型合并行
+            // 行业类型合并行
             allSize.add(exportList.size() + 3);
             // 合计(832个)行
             allSize.add(3);
@@ -990,13 +974,13 @@ public class SubInfoExportController extends BaseController {
         // 按行业分组
         Map<String, List<SubInfoGxj>> groupMap = list.stream()
                 .collect(Collectors.groupingBy(e -> {
-                    if (StringUtils.isNotBlank(e.getIndusKind())){
+                    if (StringUtils.isNotBlank(e.getIndusKind())) {
                         return e.getIndusKind().substring(0, 2);
                     }
                     return "未知行业";
                 }));
 
-        ExportParams exportParams = new ExportParams("“四个一批”工业项目表(在建项目库)","在建项目库",ExcelType.XSSF);
+        ExportParams exportParams = new ExportParams("“四个一批”工业项目表(在建项目库)", "在建项目库", ExcelType.XSSF);
         exportParams.setStyle(ExcelStyleUtil.class);
         List<SubInfoZjVO> exportList = new ArrayList<>();
         // 合计行
@@ -1032,13 +1016,13 @@ public class SubInfoExportController extends BaseController {
                 vo.setIndex(i + 1 + "");
 
                 // 每月完成工程量
-                List<RptCont> subRptConts = rptContGroup.getOrDefault(subInfoGxj.getSubId(),new ArrayList<>());
+                List<RptCont> subRptConts = rptContGroup.getOrDefault(subInfoGxj.getSubId(), new ArrayList<>());
 
                 SubInfoZjVO.MonthNumBl monthNumBl = new SubInfoZjVO.MonthNumBl();
 
                 Map<String, BigDecimal> map = subRptConts.stream()
                         .filter(Objects::nonNull)
-                        .filter(e->StringUtils.isNotBlank(e.getKjMonth()))
+                        .filter(e -> StringUtils.isNotBlank(e.getKjMonth()))
                         .collect(Collectors.toMap(RptCont::getKjMonth, e -> Optional.ofNullable(e.getNumBl()).orElse(BigDecimal.ZERO), (a, b) -> a));
                 monthNumBl.setMonth1(map.getOrDefault(DateUtil.thisYear() + "01", BigDecimal.ZERO) + "%");
                 monthNumBl.setMonth2(map.getOrDefault(DateUtil.thisYear() + "02", BigDecimal.ZERO) + "%");
@@ -1063,7 +1047,8 @@ public class SubInfoExportController extends BaseController {
             index++;
         }
         // 构建表头
-        List<ExcelExportEntity> entityList = new ArrayList<ExcelExportEntity>(){{
+        List<ExcelExportEntity> entityList = new ArrayList<ExcelExportEntity>() {{
+            add(new ExcelExportEntity("id", "id", 0));
             add(new ExcelExportEntity("序号", "index", 12));
             add(new ExcelExportEntity("项目名称", "subName", 20));
             add(new ExcelExportEntity("项目所在地", "subjectName", 15));
@@ -1072,7 +1057,7 @@ public class SubInfoExportController extends BaseController {
             add(new ExcelExportEntity("建成投产时间", "endDate", 15));
 
             ExcelExportEntity monthNumBlEntity = new ExcelExportEntity(year + "年1-12月项目工程进度(每月完成工程量)", "monthNumBlList", 12);
-            List<ExcelExportEntity> subHeadEntities = new ArrayList<ExcelExportEntity>(){{
+            List<ExcelExportEntity> subHeadEntities = new ArrayList<ExcelExportEntity>() {{
                 add(new ExcelExportEntity("1月", "month1"));
                 add(new ExcelExportEntity("2月", "month2"));
                 add(new ExcelExportEntity("3月", "month3"));
@@ -1089,13 +1074,17 @@ public class SubInfoExportController extends BaseController {
             monthNumBlEntity.setList(subHeadEntities);
             add(monthNumBlEntity);
 
+            add(new ExcelExportEntity("产值", "amtCz", 12));
+            add(new ExcelExportEntity("增加值", "amtZjz", 12));
+            add(new ExcelExportEntity("税收", "amtSs", 12));
+            add(new ExcelExportEntity("解决就业人数", "numP", 12));
             add(new ExcelExportEntity("年度投资(亿元)", "yearPlanAmt", 12));
             add(new ExcelExportEntity("进展情况", "progress", 30));
             add(new ExcelExportEntity("牵头部门", "deptName", 30));
             add(new ExcelExportEntity("责任领导", "leader", 15));
             add(new ExcelExportEntity("备注", "remark", 15));
         }};
-        List<Map<String, Object>> collect = exportList.stream().map(e->{
+        List<Map<String, Object>> collect = exportList.stream().map(e -> {
             Map<String, Object> map = BeanUtil.beanToMap(e);
             Object o = map.get("endDate");
             if (o != null) {
@@ -1110,7 +1099,6 @@ public class SubInfoExportController extends BaseController {
 
     /**
      * 4库/总库 导出明细
-     *
      */
     @PostMapping("/exportDetailExcel")
     public void exportDetailExcel(@RequestBody SubInfoQueryTzVO queryVO) {
@@ -1118,9 +1106,9 @@ public class SubInfoExportController extends BaseController {
         try {
             if (SubInfoStatusEnum.CB.getCode().equals(queryVO.getStatus())) {
                 exportCbDetailExcel(queryVO);
-            }else if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())){
+            } else if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())) {
                 exportNewDetailExcel(queryVO);
-            }else if (SubInfoStatusEnum.ZJ.getCode().equals(queryVO.getStatus())){
+            } else if (SubInfoStatusEnum.ZJ.getCode().equals(queryVO.getStatus())) {
                 exportMainDetailExcel(queryVO);
             } else if (SubInfoStatusEnum.TC.getCode().equals(queryVO.getStatus())) {
                 exportTcDetailExcel(queryVO);
@@ -1140,25 +1128,30 @@ public class SubInfoExportController extends BaseController {
     @PostMapping("/exportProcedureExcel")
     public void exportProcedureExcel(@RequestBody SubInfoQueryTzVO queryVO) {
         queryVO.setSubjectAuthIds(getSubjectIds());
-        List<SubInfoGxj> list = subInfoQueryService.queryAll(getCurUser().getLoginUser(), queryVO);
+        List<PreInfoVO> list = subPreGxjInfoService.queryAllPreInfoAndCon(getCurUser().getLoginUser(), queryVO);
+
+        // List<SubInfoGxj> list = subInfoQueryService.queryAll(getCurUser().getLoginUser(), queryVO);
         // 查询工信局设置的手续
-        Map<String, SubInfoPreNewVO> collect = subPreGxjInfoService.getGxjPreNewInfoList();
+        // Map<String, SubInfoPreNewVO> collect = subPreGxjInfoService.getGxjPreNewInfoList();
 
-        ExportParams exportParams = new ExportParams("手续明细","手续明细",ExcelType.XSSF);
+        ExportParams exportParams = new ExportParams("手续明细", "手续明细", ExcelType.XSSF);
         exportParams.setStyle(ExcelStyleUtil.class);
 
         List<SubInfoProcedureVO> exportList = new ArrayList<>();
         int index = 1;
-        for (SubInfoGxj subInfoGxj : list) {
+        for (PreInfoVO subInfoGxj : list) {
             SubInfoProcedureVO vo = new SubInfoProcedureVO();
+            PreNewConGxjVO conVo = new PreNewConGxjVO();
             BeanUtil.copyProperties(subInfoGxj, vo);
+            BeanUtil.copyProperties(subInfoGxj, conVo);
+            vo.setPreNewInfo(conVo);
             vo.setAmtTotal(convertAmount(subInfoGxj.getAmtTotal()));
             vo.setIndex(String.valueOf(index++));
             // 手续
-            SubInfoPreNewVO subInfoPreNewVO = collect.get(subInfoGxj.getSubId());
-            if (subInfoPreNewVO != null) {
-                BeanUtils.copyProperties(subInfoPreNewVO, vo);
-            }
+            // SubInfoPreNewVO subInfoPreNewVO = collect.get(subInfoGxj.getSubId());
+            // if (subInfoPreNewVO != null) {
+            //     BeanUtils.copyProperties(subInfoPreNewVO, vo);
+            // }
             exportList.add(vo);
         }
         Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoProcedureVO.class, exportList);
@@ -1173,7 +1166,7 @@ public class SubInfoExportController extends BaseController {
         try (OutputStream outputStream = response.getOutputStream()) {
             workbook.write(outputStream);
             workbook.close();
-        }catch (IOException e) {
+        } catch (IOException e) {
             // 处理 IO 异常
             handleErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "导出 Excel 文件时出现错误:" + e.getMessage());
         } catch (Exception e) {
@@ -1194,7 +1187,7 @@ public class SubInfoExportController extends BaseController {
         // 按行业分组
         Map<String, List<SubInfoGxj>> groupMap = list.stream()
                 .collect(Collectors.groupingBy(e -> {
-                    if (StringUtils.isNotBlank(e.getIndusKind())){
+                    if (StringUtils.isNotBlank(e.getIndusKind())) {
                         return e.getIndusKind().substring(0, 2);
                     }
                     return "未知行业";
@@ -1251,7 +1244,7 @@ public class SubInfoExportController extends BaseController {
         // 按行业分组
         Map<String, List<SubInfoGxj>> groupMap = list.stream()
                 .collect(Collectors.groupingBy(e -> {
-                    if (StringUtils.isNotBlank(e.getIndusKind())){
+                    if (StringUtils.isNotBlank(e.getIndusKind())) {
                         return e.getIndusKind().substring(0, 2);
                     }
                     return "未知行业";
@@ -1307,7 +1300,7 @@ public class SubInfoExportController extends BaseController {
         // 按行业分组
         Map<String, List<SubInfoGxj>> groupMap = list.stream()
                 .collect(Collectors.groupingBy(e -> {
-                    if (StringUtils.isNotBlank(e.getIndusKind())){
+                    if (StringUtils.isNotBlank(e.getIndusKind())) {
                         return e.getIndusKind().substring(0, 2);
                     }
                     return "未知行业";
@@ -1385,7 +1378,7 @@ public class SubInfoExportController extends BaseController {
                 SubInfoStatusEnum anEnum = SubInfoStatusEnum.getEnum(key);
                 String statusRate = new BigDecimal(value.size()).multiply(new BigDecimal(100)).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP) + "%";
                 BigDecimal totalAmt = value.stream()
-                        .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                        .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                         .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP);
                 String format = String.format("%s项目%s个,占工业项目总数的%s,计划总投资%s亿元;", anEnum.getDesc(), value.size(), statusRate, totalAmt);
                 statusStrBuilder.append(format);
@@ -1399,7 +1392,7 @@ public class SubInfoExportController extends BaseController {
             subjectGroupList.forEach((key, value) -> {
                 String rate = new BigDecimal(value.size()).multiply(new BigDecimal(100)).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP) + "%";
                 BigDecimal totalAmt = value.stream()
-                        .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                        .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                         .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP);
                 String format = String.format("%s%s个,占工业项目总数的%s,计划总投资%s亿元;", jsddMap.get(key), value.size(), rate, totalAmt);
                 subjectStrBuilder.append(format);
@@ -1415,7 +1408,7 @@ public class SubInfoExportController extends BaseController {
             groupBoundaries.put("50-100亿元", new BigDecimal("1000000"));
             Map<String, List<SubInfoTotalExcel>> scaleGroupList = list.stream().collect(Collectors.groupingBy(transaction -> {
                 for (Map.Entry<String, BigDecimal> entry : groupBoundaries.entrySet()) {
-                    if ((transaction.getAmtTotal() == null?BigDecimal.ZERO:transaction.getAmtTotal()).compareTo(entry.getValue()) < 0) {
+                    if ((transaction.getAmtTotal() == null ? BigDecimal.ZERO : transaction.getAmtTotal()).compareTo(entry.getValue()) < 0) {
                         return entry.getKey();
                     }
                 }
@@ -1424,7 +1417,7 @@ public class SubInfoExportController extends BaseController {
             scaleGroupList.forEach((key, value) -> {
                 String rate = new BigDecimal(value.size()).multiply(new BigDecimal(100)).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP) + "%";
                 BigDecimal totalAmt = value.stream()
-                        .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                        .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                         .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP);
                 String format = String.format("计划总投资%s项目%s个,占工业项目总数的%s,计划总投资%s亿元;", key, value.size(), rate, totalAmt);
                 scaleStrBuilder.append(format);
@@ -1446,7 +1439,7 @@ public class SubInfoExportController extends BaseController {
             hyGroupList.forEach((key, value) -> {
                 String rate = new BigDecimal(value.size()).multiply(new BigDecimal(100)).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP) + "%";
                 BigDecimal totalAmt = value.stream()
-                        .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                        .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                         .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP);
                 String format = String.format("%s项目%s个,占工业项目总数的%s,计划总投资%s亿元;", hyflMap.getOrDefault(key, key), value.size(), rate, totalAmt);
                 hyStrBuilder.append(format);
@@ -1461,7 +1454,7 @@ public class SubInfoExportController extends BaseController {
 
             List<LogOperateVO> logList = logOperateService.queryByYear(year);
             String preText = String.format("%s年1-%s月,", year, month);
-            StringBuilder s = buildZhParagraph(preText, logList, month,lastMonth,subHisList,currSubInfoList);
+            StringBuilder s = buildZhParagraph(preText, logList, month, lastMonth, subHisList, currSubInfoList);
             data.put("mainZhStr", s);
 
             // 分属地看
@@ -1471,32 +1464,32 @@ public class SubInfoExportController extends BaseController {
             StringBuilder subjectZhStr = new StringBuilder();
             subjectZhGroups.forEach((key, value) -> {
                 String tempPreText = String.format("%s年1-%s月,%s", year, month, jsddMap.get(key));
-                StringBuilder s1 = buildZhParagraph(tempPreText, value, month, lastMonth, hisSubjectGroups.getOrDefault(key,new ArrayList<>()), currSubjectGroups.getOrDefault(key,new ArrayList<>()));
+                StringBuilder s1 = buildZhParagraph(tempPreText, value, month, lastMonth, hisSubjectGroups.getOrDefault(key, new ArrayList<>()), currSubjectGroups.getOrDefault(key, new ArrayList<>()));
                 subjectZhStr.append(s1);
             });
             data.put("subjectZhStr", subjectZhStr);
 
             // 分规模看
             Map<String, List<SubHisVO>> hisScaleGroups = subHisList.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亿元以上";
-                    })
-                );
+                    .collect(Collectors.groupingBy(transaction -> {
+                                for (Map.Entry<String, BigDecimal> entry : groupBoundaries.entrySet()) {
+                                    if (transaction.getAmtTotal().compareTo(entry.getValue()) < 0) {
+                                        return entry.getKey();
+                                    }
+                                }
+                                return "100亿元以上";
+                            })
+                    );
             Map<String, List<SubInfoGxj>> currScaleGroups = currSubInfoList.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亿元以上";
-                    })
-                );
+                    .collect(Collectors.groupingBy(transaction -> {
+                                for (Map.Entry<String, BigDecimal> entry : groupBoundaries.entrySet()) {
+                                    if (transaction.getAmtTotal().compareTo(entry.getValue()) < 0) {
+                                        return entry.getKey();
+                                    }
+                                }
+                                return "100亿元以上";
+                            })
+                    );
             Map<String, List<LogOperateVO>> scaleZhGroups = logList.stream().collect(Collectors.groupingBy(transaction -> {
                 for (Map.Entry<String, BigDecimal> entry : groupBoundaries.entrySet()) {
                     if (transaction.getAmtTotal().compareTo(entry.getValue()) < 0) {
@@ -1508,7 +1501,7 @@ public class SubInfoExportController extends BaseController {
             StringBuilder scaleZhStr = new StringBuilder();
             scaleZhGroups.forEach((key, value) -> {
                 String tempPreText = String.format("%s年1-%s月,%s", year, month, "计划总投资" + key);
-                StringBuilder s1 = buildZhParagraph(tempPreText, value, month, lastMonth, hisScaleGroups.getOrDefault(key,CollUtil.newArrayList()), currScaleGroups.getOrDefault(key,CollUtil.newArrayList()));
+                StringBuilder s1 = buildZhParagraph(tempPreText, value, month, lastMonth, hisScaleGroups.getOrDefault(key, CollUtil.newArrayList()), currScaleGroups.getOrDefault(key, CollUtil.newArrayList()));
                 scaleZhStr.append(s1);
             });
             data.put("scaleZhStr", scaleZhStr);
@@ -1544,7 +1537,7 @@ public class SubInfoExportController extends BaseController {
             StringBuilder hyZhStr = new StringBuilder();
             hyZhGroups.forEach((key, value) -> {
                 String tempPreText = String.format("%s年1-%s月,%s", year, month, hyflMap.get(key));
-                StringBuilder s1 = buildZhParagraph(tempPreText, value, month,lastMonth, hisHyGroups.getOrDefault(key,CollUtil.newArrayList()), currHyGroups.getOrDefault(key,CollUtil.newArrayList()));
+                StringBuilder s1 = buildZhParagraph(tempPreText, value, month, lastMonth, hisHyGroups.getOrDefault(key, CollUtil.newArrayList()), currHyGroups.getOrDefault(key, CollUtil.newArrayList()));
                 scaleZhStr.append(s1);
             });
             data.put("hyZhStr", hyZhStr);
@@ -1577,12 +1570,12 @@ public class SubInfoExportController extends BaseController {
 
         WordExportUtil.exportWord07(word, data);
         addBreakInCell(word.getParagraphs());
-        response.setHeader("content-disposition","attachment;filename="+new String("analysis".getBytes(),"ISO8859-1"));
+        response.setHeader("content-disposition", "attachment;filename=" + new String("analysis".getBytes(), "ISO8859-1"));
         response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
         word.write(response.getOutputStream());
     }
 
-    private StringBuilder buildZhParagraph(String preText, List<LogOperateVO> value, int month,int lastMonth, List<SubHisVO> subHisVOList, List<SubInfoGxj> subInfoGxjList) {
+    private StringBuilder buildZhParagraph(String preText, List<LogOperateVO> value, int month, int lastMonth, List<SubHisVO> subHisVOList, List<SubInfoGxj> subInfoGxjList) {
         StringBuilder zhStrBuilder = new StringBuilder().append("\t");
         StatusChangeCountersVO tempVo = new StatusChangeCountersVO();
         addNum(value, tempVo);
@@ -1601,7 +1594,7 @@ public class SubInfoExportController extends BaseController {
         AtomicReference<Long> rgNum = new AtomicReference<>(0L);
         Map<String, Long> collect = subInfoGxjList.stream()
                 .peek(subInfoGxj -> {
-                    if (subInfoGxj.getBoolRg()){
+                    if (subInfoGxj.getBoolRg()) {
                         rgNum.set(rgNum.get() + 1);
                     }
                 })
@@ -1614,9 +1607,9 @@ public class SubInfoExportController extends BaseController {
         BigDecimal tcl = BigDecimal.ZERO;
         BigDecimal rgl = BigDecimal.ZERO;
         if (fm.compareTo(BigDecimal.ZERO) != 0) {
-           kgl = new BigDecimal((zjNum + tcNum) * 100).divide(fm, 2, RoundingMode.HALF_UP);
-           tcl = new BigDecimal(tcNum * 100).divide(fm, 2, RoundingMode.HALF_UP);
-           rgl = new BigDecimal(rgNum.get() * 100).divide(fm, 2, RoundingMode.HALF_UP);
+            kgl = new BigDecimal((zjNum + tcNum) * 100).divide(fm, 2, RoundingMode.HALF_UP);
+            tcl = new BigDecimal(tcNum * 100).divide(fm, 2, RoundingMode.HALF_UP);
+            rgl = new BigDecimal(rgNum.get() * 100).divide(fm, 2, RoundingMode.HALF_UP);
         }
 
         Map<String, Long> statusNumMap = subHisVOList.stream().collect(Collectors.groupingBy(SubHisVO::getStatus, Collectors.counting()));
@@ -1668,11 +1661,11 @@ public class SubInfoExportController extends BaseController {
     public static void addBreakInCell(List<XWPFParagraph> paragraphs) {
         for (XWPFParagraph p : paragraphs) {
             for (XWPFRun run : p.getRuns()) {//XWPFRun对象定义具有一组公共属性的文本区域
-                if(run.getText(0)!= null && run.getText(0).contains("\n")) {
+                if (run.getText(0) != null && run.getText(0).contains("\n")) {
                     String[] lines = run.getText(0).split("\n");
-                    if(lines.length > 0) {
+                    if (lines.length > 0) {
                         run.setText(lines[0], 0); // set first line into XWPFRun
-                        for(int i=1;i<lines.length;i++){
+                        for (int i = 1; i < lines.length; i++) {
                             // add break and insert new text
                             run.addBreak();//中断
 //                              run.addCarriageReturn();//回车符,但是不起作用
@@ -1702,7 +1695,7 @@ public class SubInfoExportController extends BaseController {
 
             // 获取数据
             List<String> subjectIds = getSubjectIds();
-            List<SmzkDetailVo> subInfoTotalExcel = subInfoService.exportSmzkDetailExcel(vo,subjectIds);
+            List<SmzkDetailVo> subInfoTotalExcel = subInfoService.exportSmzkDetailExcel(vo, subjectIds);
 
             // 写入标题行
             writer.writeHeadRow(CollUtil.newArrayList("“四个一批”工业项目表(项目总库)"));
@@ -1729,7 +1722,7 @@ public class SubInfoExportController extends BaseController {
             // 设置单元格样式
             SXSSFWorkbook workbook = (SXSSFWorkbook) writer.getWorkbook();
             SXSSFSheet sheet = workbook.getSheetAt(0);
-            CellStyle cellStyle=writer.getStyleSet().getCellStyle();
+            CellStyle cellStyle = writer.getStyleSet().getCellStyle();
             cellStyle.setWrapText(true);
             cellStyle.setAlignment(HorizontalAlignment.LEFT);
 
@@ -1788,7 +1781,7 @@ public class SubInfoExportController extends BaseController {
         }
     }
 
-    private <K extends SubInfoBaseDetailVo> void exportDetail(HttpServletResponse response,ExportParams exportParams,Class<K> clazz, List<SubInfoGxj> list, Map<String, String> hyDictMap, Map<String, List<SubInfoGxj>> groupMap) {
+    private <K extends SubInfoBaseDetailVo> void exportDetail(HttpServletResponse response, ExportParams exportParams, Class<K> clazz, List<SubInfoGxj> list, Map<String, String> hyDictMap, Map<String, List<SubInfoGxj>> groupMap) {
         List<K> exportList = new ArrayList<>();
         // 合计行
         K hjCount = BeanUtils.instantiateClass(clazz);
@@ -1859,7 +1852,7 @@ public class SubInfoExportController extends BaseController {
         try (OutputStream outputStream = response.getOutputStream()) {
             workbook.write(outputStream);
             workbook.close();
-        }catch (IOException e) {
+        } catch (IOException e) {
             // 处理 IO 异常
             handleErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "导出 Excel 文件时出现错误:" + e.getMessage());
         } catch (Exception e) {
@@ -1885,6 +1878,7 @@ public class SubInfoExportController extends BaseController {
         cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
         return cellStyle;
     }
+
     private static CellStyle createBorderStyle(Workbook workbook) {
         CellStyle cellStyle = workbook.createCellStyle();
         cellStyle.setBorderBottom(BorderStyle.THIN);   // 下边框
@@ -1946,7 +1940,7 @@ public class SubInfoExportController extends BaseController {
                             jsddMap.getOrDefault(entry.getKey(), entry.getKey()),
                             entry.getValue().size(),
                             entry.getValue().stream()
-                                    .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                                    .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                                     .reduce(BigDecimal.ZERO, BigDecimal::add)
                                     .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
                     ))
@@ -1986,7 +1980,7 @@ public class SubInfoExportController extends BaseController {
                             entry.getKey(),
                             entry.getValue().size(),
                             entry.getValue().stream()
-                                    .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                                    .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                                     .reduce(BigDecimal.ZERO, BigDecimal::add)
                                     .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
                     ))
@@ -2020,7 +2014,7 @@ public class SubInfoExportController extends BaseController {
                                     hyflMap.getOrDefault(entry.getKey(), entry.getKey()),
                                     entry.getValue().size(),
                                     entry.getValue().stream()
-                                            .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                                            .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                                             .reduce(BigDecimal.ZERO, BigDecimal::add)
                                             .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
                             )
@@ -2041,21 +2035,21 @@ public class SubInfoExportController extends BaseController {
             exportData.addAll(amtList);
             exportData.addAll(hyList);
             BigDecimal reduce = list.stream()
-                    .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                    .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                     .reduce(BigDecimal.ZERO, BigDecimal::add);
             exportData.add(new SubInfoTotalInfoVO("合计", "合计", list.size(), reduce.divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)));
             // 4.导出
             ExportParams exportParams = null;
-            if (vo.getStatus().equals("1")){
-                exportParams = new ExportParams("“四个一批”储备项目库基本情况","“四个一批”储备项目库基本情况", ExcelType.XSSF);
-            }else if (vo.getStatus().equals("2")){
-                exportParams = new ExportParams("“四个一批”新建项目库基本情况","“四个一批”新建项目库基本情况", ExcelType.XSSF);
-            }else if (vo.getStatus().equals("3")){
-                exportParams = new ExportParams("“四个一批”在建项目库基本情况","“四个一批”在建项目库基本情况", ExcelType.XSSF);
-            }else if (vo.getStatus().equals("9")){
-                exportParams = new ExportParams("“四个一批”投产库基本情况","“四个一批”投产库基本情况", ExcelType.XSSF);
-            }else {
-                exportParams = new ExportParams("“四个一批”项目库基本情况","“四个一批”项目库基本情况", ExcelType.XSSF);
+            if (vo.getStatus().equals("1")) {
+                exportParams = new ExportParams("“四个一批”储备项目库基本情况", "“四个一批”储备项目库基本情况", ExcelType.XSSF);
+            } else if (vo.getStatus().equals("2")) {
+                exportParams = new ExportParams("“四个一批”新建项目库基本情况", "“四个一批”新建项目库基本情况", ExcelType.XSSF);
+            } else if (vo.getStatus().equals("3")) {
+                exportParams = new ExportParams("“四个一批”在建项目库基本情况", "“四个一批”在建项目库基本情况", ExcelType.XSSF);
+            } else if (vo.getStatus().equals("9")) {
+                exportParams = new ExportParams("“四个一批”投产库基本情况", "“四个一批”投产库基本情况", ExcelType.XSSF);
+            } else {
+                exportParams = new ExportParams("“四个一批”项目库基本情况", "“四个一批”项目库基本情况", ExcelType.XSSF);
             }
             exportParams.setStyle(ExcelStyleUtil.class);
             int mergeTotalStartRow = exportData.size() + 1;
@@ -2066,10 +2060,10 @@ public class SubInfoExportController extends BaseController {
             // 合并单元格
             sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 1));
 
-            if (ddList.size() > 1){
+            if (ddList.size() > 1) {
                 sheet.addMergedRegion(new CellRangeAddress(2, ddList.size() + 1, 0, 0));
             }
-            if (amtList.size() > 1){
+            if (amtList.size() > 1) {
                 sheet.addMergedRegion(new CellRangeAddress(ddList.size() + 2, ddList.size() + amtList.size() + 1, 0, 0));
             }
             if (hyList.size() > 1) {
@@ -2108,19 +2102,19 @@ public class SubInfoExportController extends BaseController {
 
         // 创建for循环,循环5次
         List<String> newSubjectIds = new ArrayList<>();
-        if (subjectIds.contains(jsddTitleMap.get("伊州区"))){
+        if (subjectIds.contains(jsddTitleMap.get("伊州区"))) {
             newSubjectIds.add(jsddTitleMap.get("伊州区"));
         }
-        if (subjectIds.contains(jsddTitleMap.get("巴里坤县"))){
+        if (subjectIds.contains(jsddTitleMap.get("巴里坤县"))) {
             newSubjectIds.add(jsddTitleMap.get("巴里坤县"));
         }
-        if (subjectIds.contains(jsddTitleMap.get("伊吾县"))){
+        if (subjectIds.contains(jsddTitleMap.get("伊吾县"))) {
             newSubjectIds.add(jsddTitleMap.get("伊吾县"));
         }
-        if (subjectIds.contains(jsddTitleMap.get("高新区"))){
+        if (subjectIds.contains(jsddTitleMap.get("高新区"))) {
             newSubjectIds.add(jsddTitleMap.get("高新区"));
         }
-        if (subjectIds.contains(jsddTitleMap.get("市本级"))){
+        if (subjectIds.contains(jsddTitleMap.get("市本级"))) {
             newSubjectIds.add(jsddTitleMap.get("市本级"));
         }
 
@@ -2129,7 +2123,7 @@ public class SubInfoExportController extends BaseController {
             ExcelExportEntity jsdd = null;
             if (jsddMap.get(subjectId).equals("市本级")) {
                 jsdd = new ExcelExportEntity("其他", subjectId);
-            }else {
+            } else {
                 jsdd = new ExcelExportEntity(jsddMap.get(subjectId), subjectId);
             }
             List<ExcelExportEntity> ddHead = new ArrayList<>();
@@ -2140,12 +2134,12 @@ public class SubInfoExportController extends BaseController {
         }
         // 0.2 构建数据
         Map<String, List<SubInfoTotalExcel>> statusGroup = list.stream().collect(Collectors.groupingBy(SubInfoTotalExcel::getStatus));
-        List<Map<String,Object>> dataList = new ArrayList<>();
+        List<Map<String, Object>> dataList = new ArrayList<>();
         // 0.2.1 储备项目
-        List<SubInfoTotalExcel> cb = statusGroup.getOrDefault(SubInfoStatusEnum.CB.getCode(),new ArrayList<>());
-        List<SubInfoTotalExcel> xj = statusGroup.getOrDefault(SubInfoStatusEnum.XJ.getCode(),new ArrayList<>());
-        List<SubInfoTotalExcel> zj = statusGroup.getOrDefault(SubInfoStatusEnum.ZJ.getCode(),new ArrayList<>());
-        List<SubInfoTotalExcel> tc = statusGroup.getOrDefault(SubInfoStatusEnum.TC.getCode(),new ArrayList<>());
+        List<SubInfoTotalExcel> cb = statusGroup.getOrDefault(SubInfoStatusEnum.CB.getCode(), new ArrayList<>());
+        List<SubInfoTotalExcel> xj = statusGroup.getOrDefault(SubInfoStatusEnum.XJ.getCode(), new ArrayList<>());
+        List<SubInfoTotalExcel> zj = statusGroup.getOrDefault(SubInfoStatusEnum.ZJ.getCode(), new ArrayList<>());
+        List<SubInfoTotalExcel> tc = statusGroup.getOrDefault(SubInfoStatusEnum.TC.getCode(), new ArrayList<>());
 
         fillRowData(subjectIds, dataList, cb, SubInfoStatusEnum.CB.getDesc() + "项目");
         fillRowData(subjectIds, dataList, xj, SubInfoStatusEnum.XJ.getDesc() + "项目");
@@ -2165,7 +2159,7 @@ public class SubInfoExportController extends BaseController {
             workbook.write(outputStream);
         } catch (IOException e) {
             e.printStackTrace();
-        }finally {
+        } finally {
             try {
                 workbook.close();
             } catch (IOException e) {
@@ -2182,7 +2176,7 @@ public class SubInfoExportController extends BaseController {
      * @param statusGroup 分组待处理的数据
      * @param name        项目类别
      */
-    private void fillRowData(List<String> subjectIds, List<Map<String, Object>> dataList, List<SubInfoTotalExcel> statusGroup,String name) {
+    private void fillRowData(List<String> subjectIds, List<Map<String, Object>> dataList, List<SubInfoTotalExcel> statusGroup, String name) {
         Map<String, List<SubInfoTotalExcel>> collect = statusGroup.stream().collect(Collectors.groupingBy(e -> StringUtils.defaultIfBlank(e.getSubjectId(), ".")));
         Map<String, List<Object>> map = new LinkedHashMap<>();
         // 处理有数据的区县列
@@ -2190,7 +2184,7 @@ public class SubInfoExportController extends BaseController {
             map.put(key, Collections.singletonList(new LinkedHashMap<String, Object>() {{
                 put("count", value.size());
                 BigDecimal reduce = value.stream()
-                        .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                        .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                         .map(amt -> Optional.ofNullable(amt).orElse(BigDecimal.ZERO))
                         .reduce(BigDecimal.ZERO, BigDecimal::add);
                 put("amt", reduce.divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP));
@@ -2202,7 +2196,7 @@ public class SubInfoExportController extends BaseController {
 
         // 合计列
         BigDecimal cbAmtSum = statusGroup.stream()
-                .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                 .reduce(BigDecimal.ZERO, BigDecimal::add);
         rowMap.put("hj", Collections.singletonList(new LinkedHashMap<String, Object>() {{
             put("count", statusGroup.size());
@@ -2234,8 +2228,8 @@ public class SubInfoExportController extends BaseController {
 
             // 获取数据
             List<String> subjectIds = getSubjectIds();
-            List<SubInfoFixDetail> subInfoTotalExcel = subInfoService.exportFixDetailExcel(vo,subjectIds);
-            if (CollUtil.isEmpty(subInfoTotalExcel)){
+            List<SubInfoFixDetail> subInfoTotalExcel = subInfoService.exportFixDetailExcel(vo, subjectIds);
+            if (CollUtil.isEmpty(subInfoTotalExcel)) {
                 subInfoTotalExcel = CollUtil.newArrayList();
             }
 
@@ -2255,7 +2249,7 @@ public class SubInfoExportController extends BaseController {
 
             // 写入合计行
             BigDecimal totalAmt = subInfoTotalExcel.stream()
-                    .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                    .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                     .reduce(BigDecimal.ZERO, BigDecimal::add);
             writer.writeRow(CollUtil.newArrayList(
                     "合计(" + subInfoTotalExcel.size() + "个)", "", "", "", totalAmt.toString(), "", "", ""));
@@ -2286,7 +2280,7 @@ public class SubInfoExportController extends BaseController {
                 }
 
                 //写入行业标题行
-                List<String> hyflTitleRow = CollUtil.newArrayList(newKey,newKey,newKey,newKey,hyflTotalAmt.toString(),"","","");
+                List<String> hyflTitleRow = CollUtil.newArrayList(newKey, newKey, newKey, newKey, hyflTotalAmt.toString(), "", "", "");
                 valueList.add(hyflTitleRow);
                 mergeRowList.add(startRow);
                 startRow++;
@@ -2354,7 +2348,7 @@ public class SubInfoExportController extends BaseController {
 
             // 获取数据
             List<String> subjectIds = getSubjectIds();
-            List<SubInfoFixCbDetail> subInfoTotalExcel = subInfoService.exportFixCbDetailExcel(vo,subjectIds);
+            List<SubInfoFixCbDetail> subInfoTotalExcel = subInfoService.exportFixCbDetailExcel(vo, subjectIds);
 
             // 写入标题行
             writer.writeHeadRow(CollUtil.newArrayList("四个一批工业项目表"));
@@ -2372,7 +2366,7 @@ public class SubInfoExportController extends BaseController {
 
             // 写入合计行
             BigDecimal totalAmt = subInfoTotalExcel.stream()
-                    .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                    .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                     .reduce(BigDecimal.ZERO, BigDecimal::add);
             writer.writeRow(CollUtil.newArrayList(
                     "合计(" + subInfoTotalExcel.size() + "个)", "", "", "", totalAmt.toString(), "", ""));
@@ -2403,7 +2397,7 @@ public class SubInfoExportController extends BaseController {
                 }
 
                 //写入行业标题行
-                List<String> hyflTitleRow = CollUtil.newArrayList(newKey,newKey,newKey,newKey,hyflTotalAmt.toString(),"","");
+                List<String> hyflTitleRow = CollUtil.newArrayList(newKey, newKey, newKey, newKey, hyflTotalAmt.toString(), "", "");
                 valueList.add(hyflTitleRow);
                 mergeRowList.add(startRow);
                 startRow++;
@@ -2454,14 +2448,14 @@ public class SubInfoExportController extends BaseController {
 
             // 获取数据
             List<String> subjectIds = getSubjectIds();
-            List<SubInfoFixZjDetail> subInfoTotalExcel = subInfoService.exportFixZjDetailExcel(vo,subjectIds);
+            List<SubInfoFixZjDetail> subInfoTotalExcel = subInfoService.exportFixZjDetailExcel(vo, subjectIds);
 
             // 写入标题行
             writer.writeHeadRow(CollUtil.newArrayList("四个一批工业项目表"));
             writer.merge(0, 0, 0, 8, "“四个一批”工业项目表(在建项目库)", true);
 
             // 写入子标题行
-            writer.writeHeadRow(CollUtil.newArrayList("序号", "项目名称", "项目所在地", "项目建设内容", "计划总投资(亿元)", "建成投产时间","年度投资(亿元)","进展情况", "备注"));
+            writer.writeHeadRow(CollUtil.newArrayList("序号", "项目名称", "项目所在地", "项目建设内容", "计划总投资(亿元)", "建成投产时间", "年度投资(亿元)", "进展情况", "备注"));
 
             // 设置每列的默认宽度
             SXSSFSheet sheet = ((SXSSFWorkbook) writer.getWorkbook()).getSheetAt(0);
@@ -2472,7 +2466,7 @@ public class SubInfoExportController extends BaseController {
 
             // 写入合计行
             BigDecimal totalAmt = subInfoTotalExcel.stream()
-                    .map(e->Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
+                    .map(e -> Optional.ofNullable(e.getAmtTotal()).orElse(BigDecimal.ZERO))
                     .reduce(BigDecimal.ZERO, BigDecimal::add);
             writer.writeRow(CollUtil.newArrayList(
                     "合计(" + subInfoTotalExcel.size() + "个)", "", "", "", totalAmt.toString(), "", ""));
@@ -2503,7 +2497,7 @@ public class SubInfoExportController extends BaseController {
                 }
 
                 //写入行业标题行
-                List<String> hyflTitleRow = CollUtil.newArrayList(newKey,newKey,newKey,newKey,hyflTotalAmt.toString(),"","");
+                List<String> hyflTitleRow = CollUtil.newArrayList(newKey, newKey, newKey, newKey, hyflTotalAmt.toString(), "", "");
                 valueList.add(hyflTitleRow);
                 mergeRowList.add(startRow);
                 startRow++;
@@ -2570,14 +2564,14 @@ public class SubInfoExportController extends BaseController {
 
             // 获取数据
             List<String> subjectIds = getSubjectIds();
-            List<SubInfoFixTcDetail> subInfoTotalExcel = subInfoService.exportFixTcDetailExcel(vo,subjectIds);
+            List<SubInfoFixTcDetail> subInfoTotalExcel = subInfoService.exportFixTcDetailExcel(vo, subjectIds);
 
             // 写入标题行
             writer.writeHeadRow(CollUtil.newArrayList("四个一批工业项目表"));
             writer.merge(0, 0, 0, 6, "“四个一批”工业项目表(投产项目库)", true);
 
             // 写入子标题行
-            writer.writeHeadRow(CollUtil.newArrayList("序号", "项目名称", "项目所在地", "项目基本情况", "升规入统时间","进展情况", "备注"));
+            writer.writeHeadRow(CollUtil.newArrayList("序号", "项目名称", "项目所在地", "项目基本情况", "升规入统时间", "进展情况", "备注"));
 
             // 设置每列的默认宽度
             SXSSFSheet sheet = ((SXSSFWorkbook) writer.getWorkbook()).getSheetAt(0);
@@ -2613,7 +2607,7 @@ public class SubInfoExportController extends BaseController {
                 }
 
                 //写入行业标题行
-                List<String> hyflTitleRow = CollUtil.newArrayList(newKey,newKey,newKey,newKey,"","","");
+                List<String> hyflTitleRow = CollUtil.newArrayList(newKey, newKey, newKey, newKey, "", "", "");
                 valueList.add(hyflTitleRow);
                 mergeRowList.add(startRow);
                 startRow++;

+ 3 - 3
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java

@@ -258,7 +258,7 @@ public class SubInfoApiController extends BaseController {
         }
         ImportParams params = new ImportParams();
         params.setTitleRows(1);
-        params.setHeadRows(1);
+        params.setHeadRows(2);
         try {
             List<SubInfoXjVO> list = ExcelImportUtil.importExcel(file.getInputStream(),
                     SubInfoXjVO.class, params);
@@ -284,7 +284,7 @@ public class SubInfoApiController extends BaseController {
         }
         ImportParams params = new ImportParams();
         params.setTitleRows(1);
-        params.setHeadRows(1);
+        params.setHeadRows(2);
         try {
             List<SubInfoZjVO> list = ExcelImportUtil.importExcel(file.getInputStream(),
                     SubInfoZjVO.class, params);
@@ -309,7 +309,7 @@ public class SubInfoApiController extends BaseController {
         }
         ImportParams params = new ImportParams();
         params.setTitleRows(1);
-        params.setHeadRows(1);
+        params.setHeadRows(2);
         try {
             List<SubInfoTcVO> list = ExcelImportUtil.importExcel(file.getInputStream(),
                     SubInfoTcVO.class, params);

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

@@ -284,20 +284,6 @@ public class SubInfoQueryApiController extends BaseController {
         return message;
     }
 
-    @PostMapping("queryProcedurePage")
-    @Log("分页查询")
-    public ListMessage queryProcedurePage(@RequestBody Page page, @RequestBody SubInfoQueryTzVO queryVO) {
-        queryVO.setSubjectAuthIds(getSubjectIds());
-        ListMessage message = new ListMessage();
-        try {
-            Page pageData = subInfoQueryService.queryProcedurePage(page, getCurUser().getLoginUser(), queryVO);
-            message.add(pageData.getList(), pageData.getTotalCount());
-        } catch (Exception e) {
-            logger.error("", e);
-            message.add("查询失败");
-        }
-        return message;
-    }
 
     @PostMapping("/problemStatistics")
     public Message problemStatistics(@RequestBody SubInfoQueryTzVO queryVO) {

+ 0 - 16
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubPreFlowApiController.java

@@ -87,20 +87,4 @@ public class SubPreFlowApiController extends BaseController {
 		return message;
 	}
 
-
-	/**
-	 * 查找公信局前期手续
-	 */
-	@PostMapping("findGxjPreFlow")
-	public Message findGxjPreFlow() {
-		Message message = new Message();
-		try {
-			List<SubPreFlowGxj> list = subPreFlowService.findAllPreFlowGxj();
-			message.setData(list);
-		} catch (Exception e) {
-			logger.error("", e);
-			message.addError("查询失败");
-		}
-		return message;
-	}
 }

+ 19 - 0
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubPreGxjInfoApiController.java

@@ -2,11 +2,15 @@ package com.rtrh.projects.web.controller.subject.api;
 
 
 import cn.hutool.core.lang.Assert;
+import cn.hutool.core.util.StrUtil;
+import com.rtrh.core.repository.Page;
+import com.rtrh.core.vo.ListMessage;
 import com.rtrh.core.vo.Message;
 import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.po.SubPreFlowGxj;
 import com.rtrh.projects.modules.projects.service.ISubPreGxjInfoService;
 import com.rtrh.projects.modules.projects.service.SubPreFlowService;
+import com.rtrh.projects.modules.projects.vo.SubInfoQueryTzVO;
 import com.rtrh.projects.modules.projects.vo.SubPreFlowGxjVO;
 import com.rtrh.projects.vo.subject.MoveDbParamVo;
 import com.rtrh.projects.web.controller.BaseController;
@@ -71,4 +75,19 @@ public class SubPreGxjInfoApiController extends BaseController {
         }
         return message;
     }
+
+    @PostMapping("queryProcedurePage")
+    @Log("分页查询")
+    public ListMessage queryProcedurePage(@RequestBody Page page, @RequestBody SubInfoQueryTzVO queryVO) {
+        queryVO.setSubjectAuthIds(getSubjectIds());
+        ListMessage message = new ListMessage();
+        try {
+            Page pageData = subPreGxjInfoService.queryProcedurePage(page, getCurUser().getLoginUser(), queryVO);
+            message.add(pageData.getList(), pageData.getTotalCount());
+        } catch (Exception e) {
+            logger.error("", e);
+            message.add("查询失败");
+        }
+        return message;
+    }
 }

+ 9 - 22
projects/src/main/webapp/vmodules/subject/subInfo/editProcedure.jsp

@@ -98,7 +98,7 @@
 </head>
 <body>
 <div id="app"></div>
-<input type="hidden" id="id" value="${subId}"/>
+<input type="hidden" id="id" value="${id}"/>
 <template id="template">
     <div>
         <div class="right_title">
@@ -214,32 +214,19 @@
                 });
                 this.getForm();
                 setTimeout(function () {
+                    layui.form.render();
                     self.initProcedureList();
                 }, 300);
 
             },
             getForm: function () {
-                var id = $("#id").val();
-                var self = this;
-
-                if (id == "") {
-                    // 新增
-                    App.postJson("/api/subPreFlow/findGxjPreFlow", {}, function (res) {
-                        if (res.success) {
-                            self.subInfo.procedureList = res.data;
-                        }
-                    });
-                } else {
-                    // 编辑
-                    App.postJson("/api/preGxjInfo/getGxjPreNewInfo", {subId: id}, function (res) {
-                        if (res.success) {
-                            self.subInfo = res.data;
-                            setTimeout(function () {
-                                layui.form.render();
-                            }, 300);
-                        }
-                    });
-                }
+                let self = this;
+                let infoId = $("#id").val();
+                App.postJson("/api/preGxjInfo/getGxjPreNewInfo", {id: infoId}, function (res) {
+                    if (res.success) {
+                        self.subInfo = res.data;
+                    }
+                });
             },
             saveSubInfo: function () {
                 let self = this;

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

@@ -523,15 +523,17 @@
         },
         methods: {
             toEditProcedure: function (obj) {
-                window.location.href = App.getUrl("/subject/subInfo/editProcedure?subId=" + obj.data.id + "&queryType=3");
+                let statusArrStr = this.subInfoStatus.getValue("valueList").map(item => item.value).join(',')
+                window.location.href = App.getUrl("/subject/subInfo/editProcedure?id=" + obj.data.id+"&statusArrStr"+ statusArrStr);
             },
             addProcedure(){
-                window.location.href = App.getUrl("/subject/subInfo/editProcedure?subId=");
+                let statusArrStr = this.subInfoStatus.getValue("valueList").map(item => item.value).join(',')
+                window.location.href = App.getUrl("/subject/subInfo/editProcedure?id=''&statusArrStr=" + statusArrStr);
             },
             delProcedure(obj){
                 let self = this;
                 App.msg.confirm(`确认删除` + obj.data.subName + `项目设置的手续?`, () => {
-                    App.postJson("/api/preGxjInfo/delPreInfo", {id: obj.data.subId}, (res) => {
+                    App.postJson("/api/preGxjInfo/delPreInfo", {id: obj.data.id}, (res) => {
                         if (res.success) {
                             App.msg.success("删除成功");
                             self.getData()
@@ -859,7 +861,6 @@
             getData: function () {
                 var self = this;
                 var param = this.getSearchParams();
-                console.log("param====getData",param)
                 param.pageNo = this.pageNo;
                 param.pageSize = this.pageSize;
                 param.orderBy = this.sort.field;
@@ -868,7 +869,7 @@
                     param.statusList = ["1","2","3","9"]
                 }
                 // 表格分页数据
-                App.postJson("/api/subInfo/query/queryPage", param, function (res) {
+                App.postJson("/api/preGxjInfo/queryProcedurePage", param, function (res) {
                     self.dataList = res.rows;
                     self.loadPage(res.total);
                     self.loadTable();
@@ -916,7 +917,7 @@
                             width: 100,
                             templet: d => `<span class="new-roman">` + (d.amtTotal / 10000).toFixed(2) + `</span>` + "亿元",
                         },
-                        {field: 'lastUpdateTime', title: '填写时间', width: 140},
+                        {field: 'createTime', title: '填写时间', width: 140},
                         {title: '操作', width: 120, toolbar: '#toolBar', fixed: 'right'},
                     ]],
                     fixed: true,
@@ -1088,7 +1089,6 @@
             },
             exportFixDetailExcel: function () {
                 var param = this.getSearchParams();
-                console.log("param====",param)
                 App.common.utils.downFile(App.getUrl("/subInfoExport/exportProcedureExcel"), "POST", param, "手续明细.xlsx", "导出失败");
             },
             exportAnalysis: function () {