Przeglądaj źródła

储备库导入导出

JiangPengLi 1 miesiąc temu
rodzic
commit
01e6d41381
34 zmienionych plików z 1025 dodań i 137 usunięć
  1. 4 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.java
  2. 35 7
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml
  3. 11 7
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjConMapper.xml
  4. 15 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjInfoMapper.java
  5. 44 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjInfoMapper.xml
  6. 11 2
      projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java
  7. 3 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubPreGxjCon.java
  8. 8 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/ISubPreGxjInfoService.java
  9. 2 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoQueryService.java
  10. 5 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java
  11. 16 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java
  12. 98 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java
  13. 111 6
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreGxjInfoServiceImpl.java
  14. 1 1
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreNewServiceImpl.java
  15. 19 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/PreInfoVO.java
  16. 43 6
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoCbVO.java
  17. 44 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoPreNewVO.java
  18. 75 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoProcedureVO.java
  19. 27 9
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoTcVO.java
  20. 31 12
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoXjVO.java
  21. 17 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoZjVO.java
  22. 112 8
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java
  23. 107 1
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java
  24. 15 0
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoQueryApiController.java
  25. 20 0
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubPreGxjInfoApiController.java
  26. 1 1
      projects/src/main/resources/dbconfig.properties
  27. 1 1
      projects/src/main/webapp/vmodules/project/projectInfo.jsp
  28. 5 5
      projects/src/main/webapp/vmodules/statics/analysisScreen_four.jsp
  29. 7 26
      projects/src/main/webapp/vmodules/subject/subInfo/editProcedure.jsp
  30. 26 0
      projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp
  31. 28 1
      projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp
  32. 27 0
      projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp
  33. 26 0
      projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp
  34. 30 44
      projects/src/main/webapp/vmodules/subject/subInfo/tz/procedure.jsp

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

@@ -134,4 +134,8 @@ public interface SubInfoMapper {
     List<String> queryIds();
 
     List<Map<String, Object>> queryAllSubNames();
+
+    void batchUpdateCbSubInfo(@Param("list") List<SubInfoGxj> list);
+
+    List<PreInfoVO> queryAllPreInfo(SubInfoQueryTzVO queryVO);
 }

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

@@ -40,6 +40,23 @@
             red_date = #{vo.redDate}
         WHERE sub_id =#{vo.subId}
     </update>
+    <update id="batchUpdateCbSubInfo" parameterType="java.util.List">
+        <foreach collection="list" item="item" separator=";">
+            UPDATE sub_info
+            SET subject_id = #{item.subjectId},
+            content = #{item.content},
+            amt_total = #{item.amtTotal},
+            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>
     <select id="exportSmzkDetailExcel" resultType="com.rtrh.projects.modules.projects.vo.export.SmzkDetailVo">
         SELECT sub_info.id as id,
         sub_info.sub_name as subName,
@@ -205,17 +222,20 @@
         s.status AS status,
         s.is_rg AS boolRg,
         s.rg_date AS rgDate,
-        s.create_user_id AS createUserId,
+        s.amt_cz amtCz,
+        s.amt_zjz amtZjz,
+        s.amt_ss amtSs,
+        s.num_p numP,
         s.create_user_name AS createUserName,
-        s.create_time AS createTime,
-        s.last_update_user_id AS lastUpdateUserId,
         s.last_update_user_name AS lastUpdateUserName,
-        s.last_update_time AS lastUpdateTime,
-        s.logic_delete_flag AS logicDeleteFlag,
+--         s.create_user_id AS createUserId,
+--         s.create_time AS createTime,
+--         s.last_update_user_id AS lastUpdateUserId,
+--         s.last_update_time AS lastUpdateTime,
+--         s.logic_delete_flag AS logicDeleteFlag,
         s.kind_nature AS kindNature,
         s.addre AS addre,
-        s.filing_date AS filingDate
-               ,
+        s.filing_date AS filingDate,
         s.status_red AS statusRed,
         s.reason,
         s.red_name AS redName,
@@ -1316,4 +1336,12 @@
     <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>
 </mapper>

+ 11 - 7
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubPreGxjConMapper.xml

@@ -23,17 +23,21 @@
         FROM
             sub_pre_gxj_info
             where sub_id=#{subId}
+            order by last_update_time desc limit 1
     </select>
     <select id="findConByPreGxjId" resultType="com.rtrh.projects.modules.projects.po.SubPreGxjCon">
         SELECT
-            id,
-            sub_pre_gxj_id subPreGxjId,
-            sub_pre_flow_gxj_id subPreFlowGxjId,
-            date_pre datePre,
-            logic_delete_flag logicDeleteFlag
+            c.id,
+            c.sub_pre_gxj_id subPreGxjId,
+            c.sub_pre_flow_gxj_id subPreFlowGxjId,
+            c.date_pre datePre,
+            c.logic_delete_flag logicDeleteFlag,
+            f.title
         FROM
-            sub_pre_gxj_con
-        where sub_pre_gxj_id=#{id}
+            sub_pre_gxj_con c
+                left join sub_pre_flow_gxj f on f.id = c.sub_pre_flow_gxj_id
+        where
+            c.sub_pre_gxj_id =#{id}
     </select>
 
 </mapper>

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

@@ -1,7 +1,12 @@
 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 org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -15,4 +20,14 @@ import com.rtrh.projects.modules.projects.po.SubPreGxjInfo;
 public interface SubPreGxjInfoMapper  {
 
     void save(SubPreGxjInfo info);
+
+    List<SubPreGxjInfo> getLastNewInfo();
+
+    List<SubPreGxjCon> findALlCon();
+
+    List<String> findIdBySubId(@Param("id") String id);
+
+    void delConByInfoIds(@Param("infoIds") List<String> infoIds);
+
+    void delInfoByInfoIds(@Param("infoIds") List<String> infoIds);
 }

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

@@ -34,5 +34,49 @@
                 #{lastUpdateTime}
             )
     </insert>
+    <delete id="delConByInfoIds">
+        DELETE FROM sub_pre_gxj_con WHERE sub_pre_gxj_id IN
+        <foreach collection="infoIds" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <delete id="delInfoByInfoIds">
+        DELETE FROM sub_pre_gxj_info WHERE id IN
+        <foreach collection="infoIds" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <select id="getLastNewInfo" resultType="com.rtrh.projects.modules.projects.po.SubPreGxjInfo">
+        select
+            i.sub_id subId,
+            i.id,
+            i.last_update_user_name createUserName,
+            i.create_time createTime
+        from
+            sub_pre_gxj_info i
+                INNER JOIN (
+                select
+                    sub_id,
+                    max(last_update_time) last_update_time
+                from
+                    sub_pre_gxj_info
+                group by
+                    sub_id
+            ) a ON i.sub_id = a.sub_id
+                AND i.last_update_time = a.last_update_time;
+    </select>
+    <select id="findALlCon" resultType="com.rtrh.projects.modules.projects.po.SubPreGxjCon">
+        select
+            c.id as id,
+            c.sub_pre_gxj_id as subPreGxjId,
+            c.sub_pre_flow_gxj_id as subPreFlowGxjId,
+            c.date_pre as datePre,
+            c.logic_delete_flag as logicDeleteFlag
+        from
+            sub_pre_gxj_con c
+    </select>
+    <select id="findIdBySubId" resultType="java.lang.String">
+        select id from sub_pre_gxj_info where sub_id =#{id}
+    </select>
 
 </mapper>

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

@@ -153,7 +153,16 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     // // 删除标记 0正常 1删除
     // private Boolean logicDeleteFlag;
 
-    // 1-绿灯 2-红灯
+    // 产值
+    private BigDecimal amtCz;
+    // 增加值
+    private BigDecimal amtZjz;
+    // 税收
+    private BigDecimal amtSs;
+    // 解决就业人数
+    private Integer numP;
+
+
     private String statusLamp;
 
     // 投资类型: 1政府类、2 投资类
@@ -177,7 +186,7 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
 
     private String preContent;
 
-    private String filingDate;
+    private Date filingDate;
 
     public BigDecimal getAmtTotal() {
         return amtTotal == null ? BigDecimal.ZERO : amtTotal;

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

@@ -31,4 +31,7 @@ public class SubPreGxjCon implements Serializable {
     private Boolean logicDeleteFlag;
 
 
+
+    private String title;
+    private String subId;
 }

+ 8 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/ISubPreGxjInfoService.java

@@ -1,7 +1,12 @@
 package com.rtrh.projects.modules.projects.service;
 
 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;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -17,4 +22,7 @@ public interface ISubPreGxjInfoService {
 
     SubPreFlowGxjVO getGxjPreNewInfo(SubPreFlowGxjVO vo, LoginUserVO loginUser);
 
+    Map<String, SubInfoPreNewVO> getGxjPreNewInfoList();
+
+    boolean delPreInfo(MoveDbParamVo vo);
 }

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

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

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

@@ -469,4 +469,9 @@ public interface SubInfoService {
 
     List<Map<String, Object>> queryAllSubNames();
 
+	void importCbDetailExcel(List<SubInfoCbVO> readAll, LoginUserVO loginUser);
+
+	void importNewDetailExcel(List<SubInfoXjVO> list, LoginUserVO loginUser);
+	void importMainDetailExcel(List<SubInfoZjVO> list, LoginUserVO loginUser);
+	void importEndDetailExcel(List<SubInfoTcVO> list, LoginUserVO loginUser);
 }

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

@@ -274,6 +274,22 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
         return page;
     }
 
+
+    @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())){

+ 98 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java

@@ -5724,6 +5724,104 @@ public class SubInfoServiceImpl implements SubInfoService {
         }
     }
 
+
+    @Override
+    public void importCbDetailExcel(List<SubInfoCbVO> list, LoginUserVO userVO) {
+        // 获取区县
+        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 (SubInfoCbVO 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);
+    }
+
+    @Override
+    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 -> {
+                    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.batchUpdateCbSubInfo(data);
+    }
+
+    @Override
+    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);
+    }
+
+    @Override
+    public void importEndDetailExcel(List<SubInfoTcVO> 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 (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);
+    }
+
     @Override
     public List<SubInfoGxj> queryStatistics(SubInfoQueryTzVO queryVO){
         return subInfoMapper.queryStatistics(queryVO);

+ 111 - 6
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreGxjInfoServiceImpl.java

@@ -1,23 +1,31 @@
 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 com.rtrh.common.util.StringUtil;
 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.service.ISubPreGxjInfoService;
+import com.rtrh.projects.modules.projects.service.SubPreFlowService;
 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;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
  * <p>
- *  服务实现类
+ * 服务实现类
  * </p>
  *
  * @author jiangpengli
@@ -31,6 +39,9 @@ public class SubPreGxjInfoServiceImpl implements ISubPreGxjInfoService {
     @Resource
     private SubPreGxjConMapper subPreGxjConMapper;
 
+    @Resource
+    private SubPreFlowService subPreFlowService;
+
     @Override
     public void saveGxjPreNewInfo(SubPreFlowGxjVO vo, LoginUserVO userVO) {
         SubPreGxjInfo info = new SubPreGxjInfo();
@@ -40,6 +51,8 @@ public class SubPreGxjInfoServiceImpl implements ISubPreGxjInfoService {
         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());
 
@@ -49,7 +62,7 @@ public class SubPreGxjInfoServiceImpl implements ISubPreGxjInfoService {
             SubPreGxjCon subPreGxjCon = new SubPreGxjCon();
             subPreGxjCon.setId(IdUtil.getSnowflakeNextIdStr());
             subPreGxjCon.setSubPreGxjId(preGxjId);
-            subPreGxjCon.setSubPreFlowGxjId(item.getId());
+            subPreGxjCon.setSubPreFlowGxjId(item.getSubPreFlowGxjId());
             subPreGxjCon.setDatePre(item.getDatePre());
             return subPreGxjCon;
         }).collect(Collectors.toList());
@@ -60,8 +73,100 @@ public class SubPreGxjInfoServiceImpl implements ISubPreGxjInfoService {
     @Override
     public SubPreFlowGxjVO getGxjPreNewInfo(SubPreFlowGxjVO vo, LoginUserVO loginUser) {
         SubPreFlowGxjVO preFlowGxjVO = subPreGxjConMapper.findBySubId(vo.getSubId());
-        List<SubPreGxjCon> list = subPreGxjConMapper.findConByPreGxjId(preFlowGxjVO.getId());
-        preFlowGxjVO.setProcedureList(list);
+        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 -> {
+                SubPreGxjCon subPreGxjCon = new SubPreGxjCon();
+                subPreGxjCon.setSubPreFlowGxjId(item.getId());
+                subPreGxjCon.setTitle(item.getTitle());
+                subPreGxjCon.setDatePre(DateUtil.format(item.getDatePre(), "yyyy-MM-dd"));
+                return subPreGxjCon;
+            }).collect(Collectors.toList()));
+        }
         return preFlowGxjVO;
     }
+
+    @Override
+    public Map<String, SubInfoPreNewVO> getGxjPreNewInfoList() {
+        List<SubPreGxjInfo> lastNewInfoList = subPreGxjInfoMapper.getLastNewInfo();
+        if (CollUtil.isEmpty(lastNewInfoList)) {
+            return Collections.emptyMap();
+        }
+
+        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))
+                .entrySet().stream()
+                .map(entry -> {
+                    SubInfoPreNewVO vo = new SubInfoPreNewVO();
+                    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));
+                    return vo;
+                })
+                .collect(Collectors.toMap(SubInfoPreNewVO::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);
+        }
+        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;
+                }
+            }
+        }
+    }
 }

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

@@ -1615,7 +1615,7 @@ public class SubPreNewServiceImpl implements SubPreNewService {
     }
 
     @Override
-    @TargetDataSource("secondary")
+    // @TargetDataSource("secondary")
     public List<SubPreNew> findList() {
         return subPreNewMapper.findList();
     }

+ 19 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/PreInfoVO.java

@@ -0,0 +1,19 @@
+package com.rtrh.projects.modules.projects.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class PreInfoVO{
+	private String id;
+    private String subId;
+    private String remark;
+    private String createdName;
+    private List<PreCon> conList;
+
+    static class PreCon{
+        private String id;
+        private String datePre;
+    }
+}

+ 43 - 6
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoCbVO.java

@@ -4,15 +4,52 @@ import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 @Data
-@EqualsAndHashCode(callSuper = true)
-public class SubInfoCbVO extends SubInfoBaseDetailVo {
-    @Excel(name = "备案/核准时间", orderNum = "5", width = 30.0)
-    private String filingDate;
+// @EqualsAndHashCode(callSuper = true)
+public class SubInfoCbVO {
+    @Excel(name = "id", width = 0.0)
+    private String id;
+
+    @Excel(name = "序号")
+    private String index;
+
+    @Excel(name = "项目名称", width = 20.0)
+    private String subName;
+
+    @Excel(name = "项目所在地", width = 15.0)
+    private String subjectName;
 
-    @Excel(name = "进展情况", orderNum = "6", width = 30.0)
+    @Excel(name = "项目建设内容", width = 70.0)
+    private String content;
+
+    @Excel(name = "计划总投资(亿元)", width = 20.0)
+    private BigDecimal amtTotal;
+
+    @Excel(name = "备案/核准时间", width = 30.0,format = "yyyy-MM-dd")
+    private Date filingDate;
+
+    @Excel(name = "进展情况", width = 30.0)
     private String progress;
 
-    @Excel(name = "备注",orderNum = "7", width = 30.0)
+
+
+    @Excel(name = "产值", width = 12.0)
+    private BigDecimal amtCz;
+
+    @Excel(name = "增加值", width = 12.0)
+    private BigDecimal amtZjz;
+
+    @Excel(name = "税收", width = 12.0)
+    private BigDecimal amtSs;
+
+    @Excel(name = "解决就业人数", width = 12.0)
+    private Integer numP;
+
+
+
+    @Excel(name = "备注", width = 30.0)
     private String remark;
 }

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

@@ -0,0 +1,44 @@
+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;
+
+}

+ 75 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoProcedureVO.java

@@ -0,0 +1,75 @@
+package com.rtrh.projects.modules.projects.vo.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
+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 {
+    @Excel(name = "序号")
+    private String index;
+
+    @Excel(name = "项目名称",  width = 20.0)
+    private String subName;
+
+    @Excel(name = "项目所在地",  width = 15.0)
+    private String subjectName;
+
+    @Excel(name = "项目建设内容", width = 70.0)
+    private String content;
+
+    @Excel(name = "总投资(亿元)", width = 20.0)
+    private BigDecimal amtTotal;
+
+    @Excel(name = "填写时间", format = "yyyy年MM月", width = 15.0)
+    private Date createTime;
+    @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;
+}

+ 27 - 9
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoTcVO.java

@@ -8,33 +8,51 @@ import java.util.Date;
 
 @Data
 public class SubInfoTcVO {
-    @Excel(name = "序号", orderNum = "0")
+    @Excel(name = "id", width = 0.0)
+    private String id;
+
+    @Excel(name = "序号")
     private String index;
 
-    @Excel(name = "项目名称", orderNum = "1", width = 20.0)
+    @Excel(name = "项目名称", width = 20.0)
     private String subName;
 
-    @Excel(name = "项目所在地", orderNum = "2", width = 15.0)
+    @Excel(name = "项目所在地", width = 15.0)
     private String subjectName;
 
-    @Excel(name = "项目基本情况", orderNum = "3", width = 70.0)
+    @Excel(name = "项目基本情况",  width = 70.0)
     private String content;
 
     // @Excel(name = "计划总投资(亿元)", orderNum = "4", width = 20.0)
     // private BigDecimal amtTotal;
 
-    @Excel(name = "升规入统时间",format = "yyyy年MM月",orderNum = "4",width = 15.0)
+    @Excel(name = "升规入统时间",format = "yyyy年MM月",width = 15.0)
     private Date rtDate;
 
-    @Excel(name = "进展情况", orderNum = "5", width = 30.0)
+    @Excel(name = "进展情况",  width = 30.0)
     private String progress;
 
-    @Excel(name = "牵头部门", orderNum = "6", width = 30.0)
+    @Excel(name = "牵头部门", width = 30.0)
     private String deptName;
 
-    @Excel(name = "责任领导", orderNum = "7", width = 30.0)
+    @Excel(name = "责任领导",  width = 30.0)
     private String leader;
 
-    @Excel(name = "备注", orderNum = "8", width = 30.0)
+
+    @Excel(name = "产值", width = 12.0)
+    private BigDecimal amtCz;
+
+    @Excel(name = "增加值", width = 12.0)
+    private BigDecimal amtZjz;
+
+    @Excel(name = "税收", width = 12.0)
+    private BigDecimal amtSs;
+
+    @Excel(name = "解决就业人数", width = 12.0)
+    private Integer numP;
+
+
+
+    @Excel(name = "备注",  width = 30.0)
     private String remark;
 }

+ 31 - 12
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoXjVO.java

@@ -11,6 +11,9 @@ import java.util.List;
 
 @Data
 public class SubInfoXjVO {
+    @Excel(name = "id", width = 0.0)
+    private String id;
+
     @Excel(name = "序号")
     private String index;
 
@@ -41,6 +44,22 @@ public class SubInfoXjVO {
     @Excel(name = "责任领导",  width = 30.0)
     private String leader;
 
+
+
+    @Excel(name = "产值", width = 12.0)
+    private BigDecimal amtCz;
+
+    @Excel(name = "增加值", width = 12.0)
+    private BigDecimal amtZjz;
+
+    @Excel(name = "税收", width = 12.0)
+    private BigDecimal amtSs;
+
+    @Excel(name = "解决就业人数", width = 12.0)
+    private Integer numP;
+
+
+
     @Excel(name = "备注",width = 30.0)
     private String remark;
 
@@ -48,47 +67,47 @@ public class SubInfoXjVO {
     @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;
+        // @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;
     }

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

@@ -14,6 +14,9 @@ import java.util.List;
 
 @Data
 public class SubInfoZjVO{
+    @Excel(name = "id", width = 0.0)
+    private String id;
+
     @Excel(name = "序号")
     private String index;
 
@@ -48,6 +51,20 @@ public class SubInfoZjVO{
     @Excel(name = "责任领导", width = 30.0)
     private String leader;
 
+
+    @Excel(name = "产值", width = 12.0)
+    private BigDecimal amtCz;
+
+    @Excel(name = "增加值", width = 12.0)
+    private BigDecimal amtZjz;
+
+    @Excel(name = "税收", width = 12.0)
+    private BigDecimal amtSs;
+
+    @Excel(name = "解决就业人数", width = 12.0)
+    private Integer numP;
+
+
     @Excel(name = "备注", width = 30.0)
     private String remark;
 

+ 112 - 8
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -110,7 +110,8 @@ public class SubInfoExportController extends BaseController {
     private SubRptContService subRptContService;
     @Autowired
     private ISubHisService subHisService;
-
+    @Autowired
+    private ISubPreGxjInfoService subPreGxjInfoService;
     /**
      * 导出汇总表
      *
@@ -897,6 +898,8 @@ 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();
 
         ExportParams exportParams = new ExportParams("“四个一批”工业项目表(新建项目库)","新建项目库",ExcelType.XSSF);
         exportParams.setStyle(ExcelStyleUtil.class);
@@ -931,18 +934,36 @@ public class SubInfoExportController extends BaseController {
                 SubInfoXjVO.PreNewInfo preNewInfo = new SubInfoXjVO.PreNewInfo();
                 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());
+                            preNewInfo.setRecord(e.getDateConfirm() != null ? e.getDateConfirm() :subInfoPreNewVO!=null? subInfoPreNewVO.getRecord():null); // 备案核准
                         } else if ("2".equals(e.getPreFlowId())) {
-                            preNewInfo.setPrePlan(e.getDateConfirm());
+                            preNewInfo.setPrePlan(e.getDateConfirm() != null ? e.getDateConfirm() : subInfoPreNewVO == null ? null : subInfoPreNewVO.getPrePlan()); // 用地预审与选址意见书
                         } else if ("13".equals(e.getPreFlowId())) {
-                            preNewInfo.setProPlanPermit(e.getDateConfirm());
+                            preNewInfo.setProPlanPermit(e.getDateConfirm()!= null ? e.getDateConfirm() : subInfoPreNewVO== null ? null : subInfoPreNewVO.getProPlanPermit()); // 建设工程规划许可证
                         } else if ("14".equals(e.getPreFlowId())) {
-                            preNewInfo.setWorkPermit(e.getDateConfirm());
+                            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);
+                    }
                 }
                 hyList.add(vo);
             }
@@ -1116,6 +1137,51 @@ public class SubInfoExportController extends BaseController {
         }
     }
 
+    @PostMapping("/exportProcedureExcel")
+    public void exportProcedureExcel(@RequestBody SubInfoQueryTzVO queryVO) {
+        queryVO.setSubjectAuthIds(getSubjectIds());
+        List<SubInfoGxj> list = subInfoQueryService.queryAll(getCurUser().getLoginUser(), queryVO);
+        // 查询工信局设置的手续
+        Map<String, SubInfoPreNewVO> collect = subPreGxjInfoService.getGxjPreNewInfoList();
+
+        ExportParams exportParams = new ExportParams("手续明细","手续明细",ExcelType.XSSF);
+        exportParams.setStyle(ExcelStyleUtil.class);
+
+        List<SubInfoProcedureVO> exportList = new ArrayList<>();
+        int index = 1;
+        for (SubInfoGxj subInfoGxj : list) {
+            SubInfoProcedureVO vo = new SubInfoProcedureVO();
+            BeanUtil.copyProperties(subInfoGxj, vo);
+            vo.setAmtTotal(convertAmount(subInfoGxj.getAmtTotal()));
+            vo.setIndex(String.valueOf(index++));
+            // 手续
+            SubInfoPreNewVO subInfoPreNewVO = collect.get(subInfoGxj.getSubId());
+            if (subInfoPreNewVO != null) {
+                BeanUtils.copyProperties(subInfoPreNewVO, vo);
+            }
+            exportList.add(vo);
+        }
+        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoProcedureVO.class, exportList);
+        response.setContentType("application/xlsx;charset=utf-8");
+        response.setHeader("Content-Disposition", "attachment; filename=" + URLEncodeUtil.encode("项目明细表") + System.currentTimeMillis() + ".xlsx");
+        Sheet sheet = workbook.getSheetAt(0);
+        // 设置自适应行高
+        for (int i = 3; i <= list.size() + exportList.size() + 3; i++) {
+            Optional.ofNullable(sheet.getRow(i)).ifPresent(row -> row.setHeight((short) -1));
+        }
+        list.clear();
+        try (OutputStream outputStream = response.getOutputStream()) {
+            workbook.write(outputStream);
+            workbook.close();
+        }catch (IOException e) {
+            // 处理 IO 异常
+            handleErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "导出 Excel 文件时出现错误:" + e.getMessage());
+        } catch (Exception e) {
+            // 处理其他异常
+            handleErrorResponse(response, HttpServletResponse.SC_BAD_REQUEST, "请求参数错误或发生其他错误:" + e.getMessage());
+        }
+    }
+
     /**
      * 总库 导出明细
      */
@@ -1248,7 +1314,45 @@ public class SubInfoExportController extends BaseController {
                 }));
         ExportParams exportParams = new ExportParams("“四个一批”工业项目表(储备项目库)", "储备项目库", ExcelType.XSSF);
         exportParams.setStyle(ExcelStyleUtil.class);
-        exportDetail(response, exportParams, SubInfoCbVO.class, list, hyDictMap, groupMap);
+
+        List<SubInfoCbVO> exportList = new ArrayList<>();
+        // 合计行
+        SubInfoCbVO hjCount = BeanUtils.instantiateClass(SubInfoCbVO.class);
+        hjCount.setIndex(String.format("合计(%s个)", list.size()));
+        BigDecimal total = list.stream().reduce(BigDecimal.ZERO, (a, b) -> a.add(b.getAmtTotal()), BigDecimal::add);
+        hjCount.setAmtTotal(convertAmount(total));
+        exportList.add(hjCount);
+
+        int index = 1;
+        List<Integer> allSize = new ArrayList<>();
+        for (Map.Entry<String, List<SubInfoGxj>> entry : groupMap.entrySet()) {
+            String key = entry.getKey();
+            List<SubInfoGxj> value = entry.getValue();
+            List<SubInfoCbVO> hyList = new ArrayList<>();
+            // 行业合计行
+            SubInfoCbVO hyCount = BeanUtils.instantiateClass(SubInfoCbVO.class);
+            hyCount.setIndex(String.format("%s、%s( %s个 )", toChineseNumber(index), hyDictMap.getOrDefault(key, key), value.size()));
+            BigDecimal reduce = value.stream().reduce(BigDecimal.ZERO, (a, b) -> a.add(b.getAmtTotal()), BigDecimal::add);
+            hyCount.setAmtTotal(convertAmount(reduce));
+            // 每条数据行
+            hyList.add(hyCount);
+            for (int i = 0; i < value.size(); i++) {
+                SubInfoGxj subInfoGxj = value.get(i);
+                SubInfoCbVO vo = BeanUtils.instantiateClass(SubInfoCbVO.class);
+                BeanUtils.copyProperties(subInfoGxj, vo);
+                vo.setAmtTotal(convertAmount(subInfoGxj.getAmtTotal()));
+                vo.setIndex(i + 1 + "");
+                hyList.add(vo);
+            }
+            // allSize 需要合并的行
+            allSize.add(exportList.size() + 2);
+            allSize.add(2);
+            exportList.addAll(hyList);
+            index++;
+        }
+        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoCbVO.class, exportList);
+        extracted(response, list, workbook, allSize);
+        // exportDetail(response, exportParams, SubInfoCbVO.class, list, hyDictMap, groupMap);
     }
 
     /**
@@ -1737,11 +1841,11 @@ public class SubInfoExportController extends BaseController {
         Sheet sheet = workbook.getSheetAt(0);
         // allSize.add(2);
         for (Integer row : new HashSet<>(allSize)) {
-            sheet.addMergedRegion(new CellRangeAddress(row, row, 0, 3));
+            sheet.addMergedRegion(new CellRangeAddress(row, row, 1, 4));
             // 获取合并区域的左上角单元格并设置样式
             Row mergedRow = sheet.getRow(row);
             if (mergedRow != null) {
-                Cell cell = mergedRow.getCell(0);
+                Cell cell = mergedRow.getCell(1);
                 if (cell != null) {
                     cell.setCellStyle(nonCenterCellStyle);
                 }

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

@@ -6,8 +6,10 @@ import java.util.stream.Collectors;
 
 
 import cn.afterturn.easypoi.excel.ExcelImportUtil;
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.lang.Assert;
+import cn.hutool.core.util.StrUtil;
 import cn.hutool.poi.excel.ExcelReader;
 import cn.hutool.poi.excel.ExcelUtil;
 import com.alibaba.fastjson.JSON;
@@ -18,7 +20,7 @@ import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.po.*;
 import com.rtrh.projects.modules.projects.service.*;
 import com.rtrh.projects.modules.projects.vo.*;
-import com.rtrh.projects.modules.projects.vo.export.SubInfoFixVO;
+import com.rtrh.projects.modules.projects.vo.export.*;
 import com.rtrh.projects.modules.system.enums.SubLogEnum;
 import com.rtrh.projects.modules.system.service.SubDataLogService;
 import com.rtrh.projects.modules.utils.DateUtils;
@@ -216,6 +218,110 @@ public class SubInfoApiController extends BaseController {
 
     }
 
+    /**
+     * 导入储备明细表
+     */
+    @PostMapping("/importCbDetailExcel")
+    public Message importCbDetailExcel(@RequestParam("file") MultipartFile file) {
+        Message message = new Message();
+        if (file.isEmpty()) {
+            message.addError("文件不能为空");
+            return message;
+        }
+        ImportParams params = new ImportParams();
+        params.setTitleRows(1);
+        params.setHeadRows(1);
+        try {
+            List<SubInfoCbVO> result = ExcelImportUtil.importExcel(file.getInputStream(),
+                    SubInfoCbVO.class, params);
+            if (CollUtil.isNotEmpty(result)){
+                List<SubInfoCbVO> list = result.stream().filter(e -> StrUtil.isNotBlank(e.getId())).collect(Collectors.toList());
+                subInfoService.importCbDetailExcel(list,getCurUser().getLoginUser());
+            }
+            message.add("导入成功");
+        } catch (Exception e) {
+            message.add("导入失败:" + e.getMessage());
+            e.printStackTrace();
+        }
+        return message;
+    }
+
+    /**
+     * 导入新建明细表
+     */
+    @PostMapping("/importNewDetailExcel")
+    public Message importNewDetailExcel(@RequestParam("file") MultipartFile file) {
+        Message message = new Message();
+        if (file.isEmpty()) {
+            message.addError("文件不能为空");
+            return message;
+        }
+        ImportParams params = new ImportParams();
+        params.setTitleRows(1);
+        params.setHeadRows(1);
+        try {
+            List<SubInfoXjVO> list = ExcelImportUtil.importExcel(file.getInputStream(),
+                    SubInfoXjVO.class, params);
+            subInfoService.importNewDetailExcel(list,getCurUser().getLoginUser());
+            message.add("导入成功");
+        } catch (Exception e) {
+            message.add("导入失败:" + e.getMessage());
+            e.printStackTrace();
+        }
+        return message;
+    }
+
+
+    /**
+     * 导入在建明细表
+     */
+    @PostMapping("/importMainDetailExcel")
+    public Message importMainDetailExcel(@RequestParam("file") MultipartFile file) {
+        Message message = new Message();
+        if (file.isEmpty()) {
+            message.addError("文件不能为空");
+            return message;
+        }
+        ImportParams params = new ImportParams();
+        params.setTitleRows(1);
+        params.setHeadRows(1);
+        try {
+            List<SubInfoZjVO> list = ExcelImportUtil.importExcel(file.getInputStream(),
+                    SubInfoZjVO.class, params);
+            subInfoService.importMainDetailExcel(list,getCurUser().getLoginUser());
+            message.add("导入成功");
+        } catch (Exception e) {
+            message.add("导入失败:" + e.getMessage());
+            e.printStackTrace();
+        }
+        return message;
+    }
+
+    /**
+     * 导入投产明细表
+     */
+    @PostMapping("/importEndDetailExcel")
+    public Message importEndDetailExcel(@RequestParam("file") MultipartFile file) {
+        Message message = new Message();
+        if (file.isEmpty()) {
+            message.addError("文件不能为空");
+            return message;
+        }
+        ImportParams params = new ImportParams();
+        params.setTitleRows(1);
+        params.setHeadRows(1);
+        try {
+            List<SubInfoTcVO> list = ExcelImportUtil.importExcel(file.getInputStream(),
+                    SubInfoTcVO.class, params);
+            subInfoService.importEndDetailExcel(list,getCurUser().getLoginUser());
+            message.add("导入成功");
+        } catch (Exception e) {
+            message.add("导入失败:" + e.getMessage());
+            e.printStackTrace();
+        }
+        return message;
+    }
+
 
 
 

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

@@ -284,6 +284,21 @@ 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) {
         queryVO.setSubjectAuthIds(getSubjectIds());

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

@@ -1,12 +1,18 @@
 package com.rtrh.projects.web.controller.subject.api;
 
 
+import cn.hutool.core.lang.Assert;
 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.SubPreFlowGxjVO;
+import com.rtrh.projects.vo.subject.MoveDbParamVo;
 import com.rtrh.projects.web.controller.BaseController;
+import com.rtrh.projects.web.log.Log;
+import com.rtrh.projects.web.log.WebLogAspect;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -51,4 +57,18 @@ public class SubPreGxjInfoApiController extends BaseController {
         }
         return message;
     }
+
+    @PostMapping(value = "/delPreInfo")
+    public Message delPreInfo(@RequestBody MoveDbParamVo vo) {
+        Message message = new Message();
+        try {
+            Assert.notBlank(vo.getId(), "项目ID不能为空");
+            boolean isSuccess = subPreGxjInfoService.delPreInfo(vo);
+            message.add(isSuccess ? "删除成功" : "删除失败");
+        } catch (Exception e) {
+            logger.error("", e);
+            message.add("删除失败");
+        }
+        return message;
+    }
 }

+ 1 - 1
projects/src/main/resources/dbconfig.properties

@@ -18,6 +18,6 @@ jdbc.password=Chaoliu@0917!@#
 
 #\u4ECE\u6570\u636E\u6E90\uFF0C\u5728mybatis\u67E5\u8BE2\u7684\u65B9\u6CD5\u4E0A\u6DFB\u52A0\u6CE8\u89E3@TargetDataSource("secondary")\u5219\u4F7F\u7528\u8BE5\u6570\u636E\u6E90\u8FDB\u884C\u67E5\u8BE2
 jdbc.secondary.driver=com.mysql.jdbc.Driver
-jdbc.secondary.url=jdbc:mysql://139.155.7.62:3306/subject?useUnicode=true&useSSL=false&characterEncoding=UTF-8&autoReconnect=true&allowMultiQueries=true
+jdbc.secondary.url=jdbc:mysql://139.155.7.62:3306/subject_gxj?useUnicode=true&useSSL=false&characterEncoding=UTF-8&autoReconnect=true&allowMultiQueries=true
 jdbc.secondary.username=root
 jdbc.secondary.password=Chaoliu@0917!@#

+ 1 - 1
projects/src/main/webapp/vmodules/project/projectInfo.jsp

@@ -248,7 +248,7 @@
         {{#} }}
     </div>
 </script>--%>
-<script>
+<script type="application/javascript">
     new Vue({
         el: "#app",
         template: "#template",

+ 5 - 5
projects/src/main/webapp/vmodules/statics/analysisScreen_four.jsp

@@ -876,13 +876,13 @@
                 radius: '94%',
                 // color: ['#A50107'], // 蓝色
                 // color: ['#7100C3'],
-                color: ['#6A0DAD'],
+                color: ['#00939A'],
                 outline: {
                     borderDistance: 2, // 外边框距离
                     itemStyle: {
                         borderWidth: 4, // 外边框宽度
                         // borderColor: '#A50107' // 外边框颜色
-                        borderColor: '#6A0DAD'
+                        borderColor: '#00939A'
                     }
                 },
                 backgroundStyle: {
@@ -923,15 +923,15 @@
             }]
         };
         var liquidFillOption2 = JSON.parse(JSON.stringify(liquidFillOption));
-        // liquidFillOption2.series[0].color = ['#BA3C00']; // 绿色
+        // liquidFillOption2.series[0].color = ['#00939A']; // 绿色
         // liquidFillOption2.series[0].outline.itemStyle.borderColor = '#BA3C00'; // 边框颜色也为绿色
         liquidFillOption2.series[0].data=[openRate];
         liquidFillOption2.series[0].label.formatter = (param) => {
             return (param.value * 100).toFixed(2) + '%'; // 显示为百分比格式
         };
         var liquidFillOption3 = JSON.parse(JSON.stringify(liquidFillOption));
-        // liquidFillOption3.series[0].color = ['#00939A']; // 红色
-        // liquidFillOption3.series[0].outline.itemStyle.borderColor = '#00939A'; // 边框颜色也为红色
+        liquidFillOption3.series[0].color = ['#00939A']; // 红色
+        liquidFillOption3.series[0].outline.itemStyle.borderColor = '#00939A'; // 边框颜色也为红色
         liquidFillOption3.series[0].data=[workRate];
         liquidFillOption3.series[0].label.formatter = (param) => {
             return (param.value * 100).toFixed(2) + '%'; // 显示为百分比格式

+ 7 - 26
projects/src/main/webapp/vmodules/subject/subInfo/editProcedure.jsp

@@ -215,7 +215,7 @@
                 this.getForm();
                 setTimeout(function () {
                     self.initProcedureList();
-                }, 200);
+                }, 300);
 
             },
             getForm: function () {
@@ -226,15 +226,9 @@
                     // 新增
                     App.postJson("/api/subPreFlow/findGxjPreFlow", {}, function (res) {
                         if (res.success) {
-                            self.procedureList = res.data;
+                            self.subInfo.procedureList = res.data;
                         }
                     });
-                    // App.postJson("/api/subject/subInfo/getSubInfoNamesList", {}, function (res) {
-                    //     if (res.success) {
-                    //
-                    //     }
-                    // });
-                    //
                 } else {
                     // 编辑
                     App.postJson("/api/preGxjInfo/getGxjPreNewInfo", {subId: id}, function (res) {
@@ -242,7 +236,7 @@
                             self.subInfo = res.data;
                             setTimeout(function () {
                                 layui.form.render();
-                            }, 200);
+                            }, 300);
                         }
                     });
                 }
@@ -253,36 +247,23 @@
                     App.msg.error("请选择项目");
                     return;
                 }
-                let procedureList = layui.table.getData("procedureTable");
-                this.subInfo.procedureList = procedureList.map(item => ({
-                    id: item.id,
-                    datePre: item.datePre
-                }));
-
+                this.subInfo.procedureList = layui.table.getData("procedureTable");
 
                 let saveUrl = "/api/preGxjInfo/saveGxjPreNewInfo";
 
                 App.msg.confirm("确认提交手续信息吗?", function () {
-                    console.log(self.subInfo)
                     App.postJson(saveUrl, self.subInfo, function (res) {
                         if (res.success) {
                             self.closeMark = true;
                             App.msg.success("保存成功");
-                            // App.postJson("/api/subject/subInfo/getById", {id: self.subInfo.id}, function (resc) {
-                            //     if (resc.success) {
-                            //         self.subInfo = resc.data;
-                            //         setTimeout(function () {
-                            //             layui.form.render();
-                            //         }, 200);
-                                    self.closeWin();
-                            //     }
-                            // });
+                            self.closeWin();
                         }
                     });
                 })
             },
             initProcedureList: function () {
                 let self = this;
+                console.log("self.procedureList",self.procedureList)
                 layui.table.render({
                     elem: '#procedureTable', // 指定原始表格元素选择器(推荐id选择器)
                     even: true,
@@ -293,7 +274,7 @@
                                 return '<input type="text" class="datetest" lay-event="date" value="' + e.datePre + '" />'
                             }},
                     ]],
-                    data: self.procedureList
+                    data: self.subInfo.procedureList
                 });
                 //监听单元格事件
                 layui.table.on('tool(procedureTable)', function(obj) {

+ 26 - 0
projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp

@@ -311,6 +311,13 @@
 <%--                        <button type="button" class="" @click="exportMoreExcel">自定义导出</button>--%>
                     </div>
                 </div>
+                <div style="position: relative; display: inline-block">
+                    <div class="export" id="uploadBtn">
+                        <img src="${WebSite.asset}/css/images/left/export.svg"/>
+                        <span>导入</span>
+                    </div>
+                </div>
+                请先导出文件,再点击导入上传修改后的数据!
                 <table id="table1" lay-filter="test"></table>
                 <div class="pagination-box" id="pagination"></div>
             </div>
@@ -476,6 +483,25 @@
                     self.moveDbParam.status = data.value;
                 });
 
+                // 文件上传
+                layui.upload.render({
+                    elem: '#uploadBtn',
+                    url: App.getUrl("/api/subject/subInfo/importCbDetailExcel"),
+                    accept: 'file', // 普通文件
+                    exts: 'xls|xlsx', // 限制文件类型
+                    done: function (res) {
+                        if (res.success === true) {
+                            self.getData();
+                            // layui.layer.msg('导入成功!');
+                        } else {
+                            layui.layer.msg('导入失败:' + res.message, {icon: 5});
+                        }
+                    },
+                    error: function (res) {
+                        layui.layer.msg('上传失败,请稍后再试' + res.message, {icon: 5});
+                    }
+                });
+
                 this.winH = document.body.clientHeight;
                 var nowdate = new Date();
                 nowdate.setMonth(nowdate.getMonth() + 1);

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

@@ -337,7 +337,13 @@
 <%--                        <button type="button" class="" @click="exportMoreExcel">自定义导出</button>--%>
                     </div>
                 </div>
-
+                <div style="position: relative; display: inline-block">
+                    <div class="export" id="uploadBtn">
+                        <img src="${WebSite.asset}/css/images/left/export.svg"/>
+                        <span>导入</span>
+                    </div>
+                </div>
+                请先导出文件,再点击导入上传修改后的数据!
                 <table id="table1" lay-filter="test"></table>
                 <div class="pagination-box" id="pagination"></div>
             </div>
@@ -653,6 +659,27 @@
                 });
             },
             init: function () {
+                let self = this;
+
+                // 文件上传
+                layui.upload.render({
+                    elem: '#uploadBtn',
+                    url: App.getUrl("/api/subject/subInfo/importEndDetailExcel"),
+                    accept: 'file', // 普通文件
+                    exts: 'xls|xlsx', // 限制文件类型
+                    done: function (res) {
+                        if (res.success === true) {
+                            self.getData();
+                            // layui.layer.msg('导入成功!');
+                        } else {
+                            layui.layer.msg('导入失败:' + res.message, {icon: 5});
+                        }
+                    },
+                    error: function (res) {
+                        layui.layer.msg('上传失败,请稍后再试' + res.message, {icon: 5});
+                    }
+                });
+
                 this.winH = document.body.clientHeight;
                 var nowdate = new Date();
                 nowdate.setMonth(nowdate.getMonth() + 1);

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

@@ -401,6 +401,13 @@
 <%--                        <button type="button" class="" @click="exportMoreExcel">自定义导出</button>--%>
                     </div>
                 </div>
+                <div style="position: relative; display: inline-block">
+                    <div class="export" id="uploadBtn">
+                        <img src="${WebSite.asset}/css/images/left/export.svg"/>
+                        <span>导入</span>
+                    </div>
+                </div>
+                请先导出文件,再点击导入上传修改后的数据!
                 <table id="table1" lay-filter="test" style="position: relative;"></table>
                 <div class="pagination-box" id="pagination"></div>
             </div>
@@ -847,6 +854,26 @@
                 layui.form.on("select(moveStatus)", function (data) {
                     self.moveDbParam.status = data.value;
                 });
+
+                // 文件上传
+                layui.upload.render({
+                    elem: '#uploadBtn',
+                    url: App.getUrl("/api/subject/subInfo/importMainDetailExcel"),
+                    accept: 'file', // 普通文件
+                    exts: 'xls|xlsx', // 限制文件类型
+                    done: function (res) {
+                        if (res.success === true) {
+                            self.getData();
+                            // layui.layer.msg('导入成功!');
+                        } else {
+                            layui.layer.msg('导入失败:' + res.message, {icon: 5});
+                        }
+                    },
+                    error: function (res) {
+                        layui.layer.msg('上传失败,请稍后再试' + res.message, {icon: 5});
+                    }
+                });
+
                 this.winH = document.body.clientHeight;
                 layui.laydate.render({
                     elem: '#startTime',

+ 26 - 0
projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp

@@ -302,6 +302,13 @@
 <%--                        <button type="button" class="" @click="exportMoreExcel">自定义导出</button>--%>
                     </div>
                 </div>
+                <div style="position: relative; display: inline-block">
+                    <div class="export" id="uploadBtn">
+                        <img src="${WebSite.asset}/css/images/left/export.svg"/>
+                        <span>导入</span>
+                    </div>
+                </div>
+                请先导出文件,再点击导入上传修改后的数据!
                 <table id="table1" lay-filter="test"></table>
                 <div class="pagination-box" id="pagination"></div>
             </div>
@@ -703,6 +710,25 @@
                     self.moveDbParam.status = data.value;
                 });
 
+                // 文件上传
+                layui.upload.render({
+                    elem: '#uploadBtn',
+                    url: App.getUrl("/api/subject/subInfo/importNewDetailExcel"),
+                    accept: 'file', // 普通文件
+                    exts: 'xls|xlsx', // 限制文件类型
+                    done: function (res) {
+                        if (res.success === true) {
+                            self.getData();
+                            // layui.layer.msg('导入成功!');
+                        } else {
+                            layui.layer.msg('导入失败:' + res.message, {icon: 5});
+                        }
+                    },
+                    error: function (res) {
+                        layui.layer.msg('上传失败,请稍后再试' + res.message, {icon: 5});
+                    }
+                });
+
                 this.winH = document.body.clientHeight;
                 var nowdate = new Date();
                 nowdate.setMonth(nowdate.getMonth() + 1);

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

@@ -200,10 +200,10 @@
                         <img src="${WebSite.asset}/css/images/left/export.svg"/>
                         <span>导出</span>
                     </div>
-                    <div class="export-item" v-if="showExport" :style="{ top: '-93px' }">
-                        <button type="button" class="" @click="exportTotalExcel">汇总导出</button>
-                        <button type="button" class="" @click="exportFixDetailExcel">项目明细导出</button>
-                        <button type="button" class="" @click="exportAnalysis">分析报告导出</button>
+                    <div class="export-item" v-if="showExport" :style="{ top: '-31px' }">
+<%--                        <button type="button" class="" @click="exportTotalExcel">汇总导出</button>--%>
+                        <button type="button" class="" @click="exportFixDetailExcel">导出明细</button>
+<%--                        <button type="button" class="" @click="exportAnalysis">分析报告导出</button>--%>
                         <%--                        <button type="button" class="" @click="exportMoreExcel">自定义导出</button>--%>
                     </div>
                 </div>
@@ -397,7 +397,7 @@
         {{# if("${currUser.edit}" == 'true'||( d.propKind == '3' && "${currUser.id}" == d.create_user_id )) { }}
         <span title="编辑" lay-event="toEditProcedure" class="no-wrap">&nbsp;编辑</span>
         {{#} }}
-        <span title="删除" lay-event="toDelProcedure" class="no-wrap">删除</span>
+        <span title="删除" lay-event="delProcedure" class="no-wrap">删除</span>
     </div>
 </script>
 
@@ -528,8 +528,18 @@
             addProcedure(){
                 window.location.href = App.getUrl("/subject/subInfo/editProcedure?subId=");
             },
-            delProcedure(){
-                window.location.href = App.getUrl("/subject/subInfo/addProcedure?subId=" + obj.data.id + "&queryType=3");
+            delProcedure(obj){
+                let self = this;
+                App.msg.confirm(`确认删除` + obj.data.subName + `项目设置的手续?`, () => {
+                    App.postJson("/api/preGxjInfo/delPreInfo", {id: obj.data.subId}, (res) => {
+                        if (res.success) {
+                            App.msg.success("删除成功");
+                            self.getData()
+                        } else {
+                            App.msg.error(res.message || "删除失败,请重试");
+                        }
+                    })
+                });
             },
             // 红黄灯
             toEditLight(obj){
@@ -663,41 +673,27 @@
                 </c:forEach>
 
 
-                <%--var indusKindData = [];--%>
-                <%--<c:forEach items="${HYFL}" var="xm">--%>
-                <%--var childData = [];--%>
-                <%--<c:forEach items="${xm.children}" var="c">--%>
-                <%--childData.push({--%>
-                <%--    value: "${c.code}",--%>
-                <%--    name: "${c.title}",--%>
-                <%--})--%>
-                <%--</c:forEach>--%>
-                <%--indusKindData.push(--%>
-                <%--    {--%>
-                <%--        value: "${xm.code}",--%>
-                <%--        name: "${xm.title}",--%>
-                <%--        children: childData--%>
-                <%--    });--%>
-                <%--</c:forEach>--%>
-                <%--this.indusKind = layui.xmSelect.render({--%>
-                <%--    el: "#indusKind",--%>
-                <%--    language: 'zn',--%>
-                <%--    data: indusKindData,--%>
-                <%--});--%>
-
-
                 // var subInfoStatusData = [];
                 <c:forEach items="${subInfoStatus}" var="xm">
                 <c:if test="${xm.code == '1' || xm.code == '2' || xm.code == '3' || xm.code == '9'}">
                     self.subInfoStatusData.push({value: "${xm.code}", name: "${xm.desc}"});
                 </c:if>
                 </c:forEach>
+
+
+
+                self.subInfoStatusData = [
+                    {value: '1', name: '储备'},
+                    {value: '2', name: '新建',selected: true},
+                    {value: '3', name: '在建'},
+                    {value: '4', name: '投产'},
+                ]
                 this.subInfoStatus = layui.xmSelect.render({
                     el: "#subInfoStatus",
                     language: 'zn',
                     data: self.subInfoStatusData
                 });
-                console.log(self.subInfoStatusData)
+
                 layui.laydate.render({
                     elem: '#year',
                     type: 'year',
@@ -708,17 +704,7 @@
                 if (params) {
                     layui.form.val("searchForm", JSON.parse(params));
                 }
-                <%--if(${isHydw}) {--%>
-                <%--	this.light = layui.xmSelect.render({--%>
-                <%--		el: "#light",--%>
-                <%--		language:'zn',--%>
-                <%--		data: [--%>
-                <%--			{value: '0', name:'绿灯'},--%>
-                <%--			{value: '1', name:'黄灯'},--%>
-                <%--			{value: '2', name:'红灯'}--%>
-                <%--		]--%>
-                <%--	})--%>
-                <%--}--%>
+
                 this.getData();
                 window.addEventListener('message', this.receiveMessage, false);
                 window.parent.postMessage('init loaded')
@@ -1103,7 +1089,7 @@
             exportFixDetailExcel: function () {
                 var param = this.getSearchParams();
                 console.log("param====",param)
-                App.common.utils.downFile(App.getUrl("/subInfoExport/exportXmzkDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
+                App.common.utils.downFile(App.getUrl("/subInfoExport/exportProcedureExcel"), "POST", param, "手续明细.xlsx", "导出失败");
             },
             exportAnalysis: function () {
                 var param = this.getSearchParams();
@@ -1111,7 +1097,7 @@
             },
             exportDetailExcel: function () {
                 var param = this.getSearchParams();
-                App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
+                App.common.utils.downFile(App.getUrl("subInfoExport/exportProcedureExcel"), "POST", param, "手续明细.xlsx", "导出失败");
             },
             exportExcel: function () {
                 var param = this.getSearchParams();