Ver Fonte

行业设置

JiangPengLi há 5 meses atrás
pai
commit
689b14c9ec
23 ficheiros alterados com 1158 adições e 270 exclusões
  1. 32 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInduMapper.java
  2. 44 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInduMapper.xml
  3. 5 3
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml
  4. 40 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubIndu.java
  5. 7 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java
  6. 3 3
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java
  7. 2 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/SubInfoQueryTzVO.java
  8. 26 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoTotalInfoVO.java
  9. 33 0
      projects-service/src/main/java/com/rtrh/projects/modules/system/service/ISubInduService.java
  10. 126 0
      projects-service/src/main/java/com/rtrh/projects/modules/system/service/impl/SubInduServiceImpl.java
  11. 6 3
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java
  12. 117 179
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java
  13. 47 0
      projects/src/main/java/com/rtrh/projects/web/controller/system/SubInduController.java
  14. 96 0
      projects/src/main/java/com/rtrh/projects/web/controller/system/api/SubInduApiController.java
  15. 5 0
      projects/src/main/webapp/vmodules/leftMenu.jsp
  16. 142 0
      projects/src/main/webapp/vmodules/subIndu/form.jsp
  17. 231 0
      projects/src/main/webapp/vmodules/subIndu/list.jsp
  18. 5 1
      projects/src/main/webapp/vmodules/subject/subInfo/editSubInfo.jsp
  19. 48 19
      projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp
  20. 36 15
      projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp
  21. 32 16
      projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp
  22. 39 16
      projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp
  23. 36 15
      projects/src/main/webapp/vmodules/subject/subInfo/tz/xmzk.jsp

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

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

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

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

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

@@ -188,10 +188,12 @@
                 and s.subject_id = #{vo.subjectId}
             </if>
             <if test="vo.indusKind!=null and vo.indusKind!=''">
-                and s.indus_kind = #{vo.indusKind}
+                and s.indus_kind like CONCAT(#{vo.indusKind}, '%')
             </if>
-            <if test="vo.indusKinds!=null and vo.indusKinds!=''">
-                and s.indus_kind = #{vo.indusKinds}
+            <if test="vo.iks!=null">
+                <foreach collection="vo.iks" open="(" close=")" separator="," item="item">
+                    and s.indus_kind IN (#{item})
+                </foreach>
             </if>
             <if test="vo.startAmt!=null and vo.startAmt!=''">
                 and s.amt_total >= #{vo.startAmt}

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

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

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

@@ -166,6 +166,9 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
     public List<SubInfoGxj> queryAll(LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
         queryVO.setMonth(DateUtil.thisYear() + "01");
         List<SubInfoGxj> data = subInfoMapper.queryPage(queryVO);
+        if (CollectionUtil.isEmpty(data)){
+            return new ArrayList<>();
+        }
         List<String> ids = data.stream().map(SubInfoGxj::getId).collect(Collectors.toList());
         // 项目前期手续办理情况
         List<SubInfoFixDetailPreNew> preNewList =  subInfoMapper.selectSubPreNewBySubIds(ids);
@@ -240,6 +243,10 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
         if (StringUtils.isNotBlank(queryVO.getEndAmt())) {
             queryVO.setEndAmt(new BigDecimal(queryVO.getEndAmt()).multiply(new BigDecimal("10000")).toString());
         }
+        Optional.ofNullable(queryVO.getIndusKinds()).ifPresent(s -> {
+            String[] split = s.split(",");
+            queryVO.setIks(Arrays.asList(split));
+        });
 
 
         PageHelper.startPage(page.getPageNo(), page.getPageSize());

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

@@ -1572,9 +1572,9 @@ public class SubInfoServiceImpl implements SubInfoService {
 
 
             //所属行业
-            if (!Objects.equals(old.getIndusKind(), subInfo.getIndusKind())) {
-                subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "indus_kind", "所属行业", "", StringUtil.isNotEmpty(old.getIndusKind()) ? tSysTableService.getById(old.getIndusKind()).getTitle() : "", StringUtil.isNotEmpty(subInfo.getIndusKind()) ? tSysTableService.getById(subInfo.getIndusKind()).getTitle() : "", null, userVO.getLoginName(), new Date(), "修改");
-            }
+            // if (!Objects.equals(old.getIndusKind(), subInfo.getIndusKind())) {
+            //     subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "indus_kind", "所属行业", "", StringUtil.isNotEmpty(old.getIndusKind()) ? tSysTableService.getById(old.getIndusKind()).getTitle() : "", StringUtil.isNotEmpty(subInfo.getIndusKind()) ? tSysTableService.getById(subInfo.getIndusKind()).getTitle() : "", null, userVO.getLoginName(), new Date(), "修改");
+            // }
 
             //建设地点
             if (!Objects.equals(old.getSubjectId(), subInfo.getSubjectId())) {

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

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

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

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

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

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

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

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

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

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

+ 117 - 179
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -3,6 +3,7 @@ package com.rtrh.projects.web.controller.subject;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -30,9 +31,11 @@ import com.rtrh.core.vo.ListMessage;
 import com.rtrh.projects.modules.projects.dao.SubSourceDao;
 import com.rtrh.projects.modules.projects.enums.ProjectStatusEnum;
 import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
+import com.rtrh.projects.modules.projects.po.SubIndu;
 import com.rtrh.projects.modules.projects.po.SubInfoGxj;
 import com.rtrh.projects.modules.projects.vo.SubInfoTotalExcel;
 import com.rtrh.projects.modules.projects.vo.export.*;
+import com.rtrh.projects.modules.system.service.ISubInduService;
 import com.rtrh.projects.modules.utils.CustomCellWriteWidthStrategy;
 import com.rtrh.projects.modules.utils.DateUtils;
 import com.rtrh.projects.modules.utils.QualificationsDeclareCellWriteHandler;
@@ -40,6 +43,7 @@ import com.rtrh.projects.outapi.result.JsonResult;
 import com.rtrh.projects.web.util.SheetData;
 import com.rtrh.projects.web.util.SheetHead;
 import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.xssf.streaming.SXSSFSheet;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -90,6 +94,8 @@ public class SubInfoExportController extends BaseController {
     private TSysTableService tSysTableService;
     @Autowired
     private SubSourceDao subSourceDao;
+    @Autowired
+    private ISubInduService subInduService;
 
     /**
      * 导出汇总表
@@ -622,6 +628,7 @@ public class SubInfoExportController extends BaseController {
 
     /**
      * 导出总表
+     *
      * @param response
      * @param vo
      */
@@ -637,7 +644,7 @@ public class SubInfoExportController extends BaseController {
             List<TSystable> gxjHyfl = tSysTableService.getGxjHyfl(SysTableKind.HYFL);
             //遍历subInfoTotalExcel,将subjectId替换为jsddList中code=subjectId的title
             for (SubInfoTotalExcel data : subInfoTotalExcel) {
-                if (data == null){
+                if (data == null) {
                     continue;
                 }
                 String subjectId = data.getSubjectId();
@@ -662,7 +669,7 @@ public class SubInfoExportController extends BaseController {
             // 合并标题行的所有单元格
             writer.merge(0, 0, 0, 3, null, true);
 
-            List<String> rowHead2 = CollUtil.newArrayList("项目分类","项目分类","项目个数","计划总投资(亿元)");
+            List<String> rowHead2 = CollUtil.newArrayList("项目分类", "项目分类", "项目个数", "计划总投资(亿元)");
             writer.writeHeadRow(rowHead2);
             writer.merge(1, 1, 0, 1, null, true);
 
@@ -742,9 +749,9 @@ public class SubInfoExportController extends BaseController {
                 for (Map.Entry<String, List<List<String>>> dataListEntry : finalDataMap.entrySet()) {
                     List<List<String>> dataList = dataListEntry.getValue();
                     int dataSize = dataList.size();
-                    if (dataSize == 1){
+                    if (dataSize == 1) {
                         indexStart += dataSize;
-                    }else{
+                    } else {
                         writer.merge(indexStart, indexStart + dataSize - 1, 0, 0, null, true);
                         indexStart += dataSize;
                     }
@@ -766,7 +773,7 @@ public class SubInfoExportController extends BaseController {
                 response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("重点项目调度-项目数据.xlsx", "UTF-8"));
                 out = response.getOutputStream();
                 writer.flush(out, true);
-            }finally {
+            } finally {
                 //关闭输出Servlet流
                 IoUtil.close(out);
                 //关闭writer,释放内存
@@ -792,6 +799,7 @@ public class SubInfoExportController extends BaseController {
             }
         }
     }
+
     /**
      * 导出明细
      *
@@ -800,25 +808,23 @@ public class SubInfoExportController extends BaseController {
     @PostMapping("/exportDetailExcel")
     public void exportDetailExcel(HttpServletResponse response, @RequestBody SubInfoQueryTzVO queryVO) {
         List<SubInfoGxj> list = subInfoQueryService.queryAll(getCurUser().getLoginUser(), queryVO);
-        ExportParams exportParams = new ExportParams();
-        exportParams.setType(ExcelType.XSSF);
         Workbook workbook;
-        if (SubInfoStatusEnum.CB.getCode().equals(queryVO.getStatus())){
+        if (SubInfoStatusEnum.CB.getCode().equals(queryVO.getStatus())) {
             workbook = exportExcel(list, SubInfoCbVO.class, "“四个一批”工业项目表(储备项目库)", "储备项目库");
-        }else if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())){
+        } else if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())) {
             workbook = exportExcel(list, SubInfoXjVO.class, "“四个一批”工业项目表(新建项目库)", "新建项目库");
-        }else if (SubInfoStatusEnum.ZJ.getCode().equals(queryVO.getStatus())){
+        } else if (SubInfoStatusEnum.ZJ.getCode().equals(queryVO.getStatus())) {
             workbook = exportExcel(list, SubInfoZjVO.class, "“四个一批”工业项目表(在建项目库)", "在建项目库");
-        }else if (SubInfoStatusEnum.TC.getCode().equals(queryVO.getStatus())){
+        } else if (SubInfoStatusEnum.TC.getCode().equals(queryVO.getStatus())) {
             workbook = exportExcel(list, SubInfoTcVO.class, "“四个一批”工业项目表(投产项目库)", "投产项目库");
-        }else {
+        } else {
             workbook = exportExcel(list, SubInfoZkVO.class, "“四个一批”工业项目表(项目总库)", "项目总库");
         }
         response.setContentType("application/xlsx;charset=utf-8");
         response.setHeader("Content-Disposition", "attachment; filename=" + URLEncodeUtil.encode("项目明细表") + System.currentTimeMillis() + ".xlsx");
         // workbook.getSheetAt(0).autoSizeColumn(2);
         Sheet sheet = workbook.getSheetAt(0);
-        // 设置自适应行高,i为需要自适应行高的起始行号, 起始行号为3 但是因为下标从0开始3需要减一, i<=20, 因为表格是循环生成,需要一行一行设置自适应高度
+        // 设置自适应行高,i为需要自适应行高的起始行号, 起始行号为3 但是因为下标从0开始3需要减一,因为表格是循环生成,需要一行一行设置自适应高度
         for (int i = 2; i <= list.size() + 1; i++) {
             sheet.getRow(i).setHeight((short) -1);
         }
@@ -854,174 +860,112 @@ public class SubInfoExportController extends BaseController {
      */
     @PostMapping("/exportTotalExcelByStatus")
     public void exportTotalExcelByStatus(HttpServletResponse response, @RequestBody SubInfoQueryTzVO vo) {
+        // 查询数据以及字典
+        List<SubInfoTotalExcel> list = subInfoService.exportTotalExcelByStatus(vo);
+        List<TSystable> jsddDict = tSysTableService.getByKind(SysTableKind.JSDD);
+        Map<String, String> jsddMap = jsddDict.stream().collect(Collectors.toMap(TSystable::getCode, TSystable::getTitle));
+        Map<String, String> hyflMap = subInduService.queryParentAll().stream().collect(Collectors.toMap(SubIndu::getCode, SubIndu::getTitle));
+        // 处理数据
+        List<SubInfoTotalInfoVO> exportData = new ArrayList<>();
+        if (CollectionUtil.isNotEmpty(list)) {
+            // 1.按属地分
+            List<SubInfoTotalInfoVO> ddList = list.stream()
+                    .collect(Collectors.groupingBy(SubInfoTotalExcel::getSubjectId))
+                    .entrySet().stream()
+                    .map(entry -> new SubInfoTotalInfoVO(
+                            "按属地分",
+                            jsddMap.getOrDefault(entry.getKey(), entry.getKey()),
+                            entry.getValue().size(),
+                            entry.getValue().stream()
+                                    .map(SubInfoTotalExcel::getAmtTotal)
+                                    .reduce(BigDecimal.ZERO, BigDecimal::add)
+                                    .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
+                    ))
+                    .collect(Collectors.toList());
 
-        try {
-            List<SubInfoTotalExcel> subInfoTotalExcel = subInfoService.exportTotalExcelByStatus(vo);
-
-            //获取属地字典
-            List<TSystable> jsddList = tSysTableService.getByKind(SysTableKind.JSDD);
-            //获取行业字典
-            List<TSystable> hyflList = tSysTableService.getByKind(SysTableKind.HYFL);
-            //遍历subInfoTotalExcel,将subjectId替换为jsddList中code=subjectId的title
-            for (SubInfoTotalExcel data : subInfoTotalExcel) {
-                if (data == null) {
-                    continue;
-                }
-                String subjectId = data.getSubjectId();
-                String induskind = data.getInduskind();
-                if (StringUtil.isNotEmpty(induskind)) {
-                    Optional<TSystable> first = hyflList.stream().filter(item -> item.getId().equals(induskind)).findFirst();
-                    first.ifPresent(tSystable -> data.setInduskind(tSystable.getTitle()));
-                }
-                if (StringUtil.isNotEmpty(subjectId)) {
-                    Optional<TSystable> first = jsddList.stream().filter(item -> item.getCode().equals(subjectId)).findFirst();
-                    first.ifPresent(tSystable -> data.setSubjectId(tSystable.getTitle()));
-                }
-            }
-
-            //通过ExcelUtil.getBigWriter()创建Writer对象,BigExcelWriter用于大数据量的导出,不会引起溢出;
-            cn.hutool.poi.excel.ExcelWriter writer = ExcelUtil.getBigWriter();
-
-            //写入标题
-            // 写入标题行
-            List<String> titleRow = CollUtil.newArrayList("储备项目库基本情况");
-            writer.writeHeadRow(titleRow);
-            // 合并标题行的所有单元格
-            writer.merge(0, 0, 0, 3, null, true);
-
-            List<String> rowHead2 = CollUtil.newArrayList("项目分类", "项目分类", "项目个数", "计划总投资(亿元)");
-            writer.writeHeadRow(rowHead2);
-            writer.merge(1, 1, 0, 1, null, true);
-
-            // 获取 SXSSFSheet 对象(确保在写入数据之后)
-            SXSSFSheet sheet = ((SXSSFWorkbook) writer.getWorkbook()).getSheetAt(0);
-
-            // 设置每列的默认宽度
-            int defaultColumnWidth = 40; // 默认宽度为20个字符
-            for (int i = 0; i < rowHead2.size(); i++) {
-                sheet.setColumnWidth(i, defaultColumnWidth * 256); // 其他列保持默认宽度
-            }
-
-            //4、对数据按照属地字段进行分组
-            LinkedHashMap<String, List<SubInfoTotalExcel>> subjectIdList = subInfoTotalExcel.stream().collect(Collectors.groupingBy(SubInfoTotalExcel::getSubjectId, LinkedHashMap::new, Collectors.toList()));
-            //5、对数据按照金额1000-3000,3000-5000,5000-10000进行分组
-            LinkedHashMap<String, List<SubInfoTotalExcel>> moneyList = subInfoTotalExcel.stream().collect(Collectors.groupingBy(data -> {
-                if (data.getAmtTotal().compareTo(new BigDecimal(1000000)) >= 0) {
-                    return "100亿元以上";
-                } else if (data.getAmtTotal().compareTo(new BigDecimal(500000)) >= 0 && data.getAmtTotal().compareTo(new BigDecimal(1000000)) < 0) {
-                    return "50-100亿元";
-                } else if (data.getAmtTotal().compareTo(new BigDecimal(100000)) >= 0 && data.getAmtTotal().compareTo(new BigDecimal(500000)) < 0) {
-                    return "10-50亿元";
-                } else {
-                    return "10亿元以下";
-                }
-            }, LinkedHashMap::new, Collectors.toList()));
-            //6、对数据按照行业进行分组
-            LinkedHashMap<String, List<SubInfoTotalExcel>> industryList = subInfoTotalExcel.stream().collect(Collectors.groupingBy(SubInfoTotalExcel::getInduskind, LinkedHashMap::new, Collectors.toList()));
-
-            //遍历subInfoTotalExcel数据计算总金额
-            BigDecimal totalAmt = subInfoTotalExcel.stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add);
-            Integer totalNum = subInfoTotalExcel.size();
-
-            LinkedHashMap<String, List<List<String>>> finalDataMap = new LinkedHashMap<>();
-
-            //7、需要保存的数据
-            List<List<String>> areaData = CollUtil.newArrayList();
-            for (Map.Entry<String, List<SubInfoTotalExcel>> subInfoListEntry : subjectIdList.entrySet()) {
-                List<String> data = CollUtil.newArrayList();
-                data.add("按属地分");
-                data.add(subInfoListEntry.getKey());
-                data.add(String.valueOf(subInfoListEntry.getValue().size()));
-                data.add(String.valueOf(subInfoListEntry.getValue().stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add)));
-                areaData.add(data);
-            }
-            finalDataMap.put("按属地划分", areaData);
-
-            List<List<String>> moneyData = CollUtil.newArrayList();
-            for (Map.Entry<String, List<SubInfoTotalExcel>> subInfoListEntry : moneyList.entrySet()) {
-                List<String> data = CollUtil.newArrayList();
-                data.add("按金额分");
-                data.add(subInfoListEntry.getKey());
-                data.add(String.valueOf(subInfoListEntry.getValue().size()));
-                data.add(String.valueOf(subInfoListEntry.getValue().stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add)));
-                moneyData.add(data);
-            }
-            finalDataMap.put("按金额划分", moneyData);
-
-            List<List<String>> industryData = CollUtil.newArrayList();
-            for (Map.Entry<String, List<SubInfoTotalExcel>> subInfoListEntry : industryList.entrySet()) {
-                List<String> data = CollUtil.newArrayList();
-                data.add("按行业分");
-                data.add(subInfoListEntry.getKey());
-                data.add(String.valueOf(subInfoListEntry.getValue().size()));
-                data.add(String.valueOf(subInfoListEntry.getValue().stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add)));
-                industryData.add(data);
-            }
-            finalDataMap.put("按行业划分", industryData);
-
-            ServletOutputStream out = null;
-
-            try {
-                //6.定义容器保存人物数据
-                List<List<String>> finalDataRows = new LinkedList<>();
-                int indexStart = 2;   //行业分类起始行
-
-                for (Map.Entry<String, List<List<String>>> dataListEntry : finalDataMap.entrySet()) {
-                    List<List<String>> dataList = dataListEntry.getValue();
-                    int dataSize = dataList.size();
-                    if (dataSize == 1) {
-                        indexStart += dataSize;
-                    } else {
-                        writer.merge(indexStart, indexStart + dataSize - 1, 0, 0, null, true);
-                        indexStart += dataSize;
-                    }
-                    //18.保存数据
-                    finalDataRows.addAll(dataList);
-                }
-                writer.write(finalDataRows, true);
-
-                // 创建合计行
-                List<String> totalRow = CollUtil.newArrayList("合计", "合计", totalNum.toString(), totalAmt.toString());
-                writer.writeHeadRow(totalRow);
-                writer.merge(indexStart, indexStart, 0, 1, null, true);
-
+            // 2.按金额分 定义分组边界
+            Map<String, BigDecimal> groupBoundaries = new LinkedHashMap<>();
+            groupBoundaries.put("10亿元以下", new BigDecimal("100000"));
+            groupBoundaries.put("10-50亿元", new BigDecimal("500000"));
+            groupBoundaries.put("50-100亿元", new BigDecimal("1000000"));
+            List<SubInfoTotalInfoVO> amtList = list.stream()
+                    .collect(Collectors.groupingBy(transaction -> {
+                        for (Map.Entry<String, BigDecimal> entry : groupBoundaries.entrySet()) {
+                            if (transaction.getAmtTotal().compareTo(entry.getValue()) < 0) {
+                                return entry.getKey();
+                            }
+                        }
+                        return "100亿元以上"; // 超过最高范围的默认分组
+                    }))
+                    .entrySet().stream()
+                    .map(entry -> new SubInfoTotalInfoVO(
+                            "按金额分",
+                            entry.getKey(),
+                            entry.getValue().size(),
+                            entry.getValue().stream()
+                                    .map(SubInfoTotalExcel::getAmtTotal)
+                                    .reduce(BigDecimal.ZERO, BigDecimal::add)
+                                    .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
+                    ))
+                    .collect(Collectors.toList());
 
-                response.setContentType("application/vnd.ms-excel;charset=utf-8");
-                Date currentDate = new Date();
-                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-                String date = sdf.format(currentDate);
-                response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("重点项目调度-项目数据.xlsx", "UTF-8"));
-                out = response.getOutputStream();
-                writer.flush(out, true);
-            } finally {
-                //关闭输出Servlet流
-                IoUtil.close(out);
-                //关闭writer,释放内存
-                writer.close();
-            }
-        } catch (IOException e) {
-            // 设置错误状态码和消息
-            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-            try {
+            // 3.按行业分
+            List<SubInfoTotalInfoVO> hyList = list.stream()
+                    .collect(Collectors.groupingBy(transaction ->{
+                        String code = transaction.getInduskind();
+                        // 确保code不为空且长度至少为2
+                        if (code == null || code.length() < 2) {
+                            return "未知行业";  // 默认未知行业
+                        }
+                        return code.substring(0, 2);
+                    }))
+                    .entrySet().stream()
+                    .map(entry -> new SubInfoTotalInfoVO(
+                            "按行业分",
+                            hyflMap.getOrDefault(entry.getKey(),entry.getKey()),
+                            entry.getValue().size(),
+                            entry.getValue().stream()
+                                    .map(SubInfoTotalExcel::getAmtTotal)
+                                    .reduce(BigDecimal.ZERO, BigDecimal::add)
+                                    .divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)
+                            )
+                    )
+                    .collect(Collectors.toList());
+            exportData.addAll(ddList);
+            exportData.addAll(amtList);
+            exportData.addAll(hyList);
+            BigDecimal reduce = list.stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add);
+            exportData.add(new SubInfoTotalInfoVO("合计", "合计", list.size(), reduce.divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)));
+            // 4.导出
+            ExportParams exportParams = new ExportParams();
+            exportParams.setTitle("项目库基本情况");
+            exportParams.setSheetName("项目库基本情况");
+            exportParams.setType(ExcelType.XSSF);
+            int mergeTotalStartRow = exportData.size() + 1;
+            Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoTotalInfoVO.class, exportData);
+            response.setContentType("application/xlsx;charset=utf-8");
+            response.setHeader("Content-Disposition", "attachment; filename=" + URLEncodeUtil.encode("项目明细表") + System.currentTimeMillis() + ".xlsx");
+            Sheet sheet = workbook.getSheetAt(0);
+            // 合并单元格
+            sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 1));
+            sheet.addMergedRegion(new CellRangeAddress(2, ddList.size() + 1, 0, 0));
+            sheet.addMergedRegion(new CellRangeAddress(ddList.size() + 2, ddList.size() + amtList.size() + 1, 0, 0));
+            sheet.addMergedRegion(new CellRangeAddress(ddList.size() + amtList.size() + 2, ddList.size() + amtList.size() + hyList.size() + 1, 0, 0));
+            sheet.addMergedRegion(new CellRangeAddress(mergeTotalStartRow, mergeTotalStartRow, 0, 1));
+
+            try (OutputStream outputStream = response.getOutputStream()) {
+                workbook.write(outputStream);
+                workbook.close();
+            } catch (IOException e) {
                 e.printStackTrace();
-                response.getWriter().write("导出 Excel 文件时出现错误:" + e.getMessage());
-            } catch (IOException ex) {
-                ex.printStackTrace();
-            }
-        } catch (Exception e) {
-            // 处理其他可能的异常
-            response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-            e.printStackTrace();
-            try {
-                response.getWriter().write("请求参数错误或发生其他错误:" + e.getMessage());
-            } catch (IOException ex) {
-                ex.printStackTrace();
             }
         }
+
     }
 
     /**
      * 导出重点项目明细表
+     *
      * @param response
      * @param vo
      */
@@ -1219,7 +1163,7 @@ public class SubInfoExportController extends BaseController {
                 listMain.get(i).put("statusSource", "3");
             }
             for (int j = 0; j < tableList.size(); j++) {
-                if (listMain.get(i).get("propKind")!=null&&listMain.get(i).get("propKind").equals(tableList.get(j).getCode())) {
+                if (listMain.get(i).get("propKind") != null && listMain.get(i).get("propKind").equals(tableList.get(j).getCode())) {
                     listMain.get(i).put("propKindName", tableList.get(j).getTitle());
                 }
             }
@@ -1324,7 +1268,6 @@ public class SubInfoExportController extends BaseController {
     }
 
 
-
     /**
      * 导出调度表
      *
@@ -1448,9 +1391,4 @@ public class SubInfoExportController extends BaseController {
     }
 
 
-
-
-
-
-
 }

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -89,7 +89,11 @@
         .layui-form-select dl {
             height: 120px;
         }
-
+        .taller-select {
+            height: 200px; /* 设置固定高度 */
+            max-height: 300px; /* 设置最大高度,防止过长 */
+            overflow-y: auto; /* 启用垂直滚动条 */
+        }
     </style>
 </head>
 <body>
@@ -135,11 +139,22 @@
                                         </div>
                                     </div>
                                 </div>
+
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
+                                            <%-- <div id="indusKind"></div>--%>
+                                            <select name="indusKind" class="taller-select">
+                                                <option value="">请选择</option>
+                                                <c:forEach items="${HYFL }" var="hy">
+                                                    <option value="${hy.code }">${hy.title}
+                                                    <c:forEach items="${hy.children }" var="hy2">
+                                                        <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                    </c:forEach>
+                                                    </option>
+                                                </c:forEach>
+                                            </select>
                                         </div>
                                     </div>
                                 </div>
@@ -512,6 +527,7 @@
         template: "#template",
         data: {
             JSDD: [],
+            HYFL: [],
             winH: 0,
             dataList: [],
             startDate: "",
@@ -553,6 +569,8 @@
 
                 App.postJson("/api/dict/query/index", {}, function (res) {
                     self.JSDD = res.data.JSDD;
+                    self.HYFL = res.data.HYFL;
+
                 })
 
                 this.winH = document.body.clientHeight;
@@ -578,20 +596,31 @@
                 <c:forEach items="${XMLX}" var="xm">
                 xmlx.push({value: "${xm.code}", name: "${xm.title}"});
                 </c:forEach>
-                /*           this.kind = layui.xmSelect.render({
-                               el: "#kind",
-                               language: 'zn',
-                               data: xmlx
-                           });*/
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+
+
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--    var childData = [];--%>
+                <%--    <c:forEach items="${xm.children}" var="c">--%>
+                <%--        childData.push({--%>
+                <%--            value: "${c.code}",--%>
+                <%--            name: "${c.title}",--%>
+                <%--        })--%>
+                <%--    </c:forEach>--%>
+                <%--    indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                // this.indusKind = layui.xmSelect.render({
+                //     el: "#indusKind",
+                //     language: 'zn',
+                //     data: indusKindData,
+                // });
+
+
                 layui.laydate.render({
                     elem: '#year',
                     type: 'year',
@@ -726,9 +755,9 @@
                 if (this.light) {
                     param.light = this.light.getValue("valueStr");
                 }
-                if (this.indusKind) {
-                    param.indusKind = this.indusKind.getValue("valueStr");
-                }
+                // if (this.indusKind) {
+                //     param.indusKind = this.indusKind.getValue("valueStr");
+                // }
                 delete (param.select);
                 /*     param.kind = this.kind.getValue("value").sort().join(",");*/
                 return param;

+ 36 - 15
projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp

@@ -169,7 +169,17 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
+<%--                                            <div id="indusKind"></div>--%>
+                                                <select name="indusKind">
+                                                    <option value="">请选择</option>
+                                                    <c:forEach items="${HYFL }" var="hy">
+                                                        <option value="${hy.code }">${hy.title}
+                                                        <c:forEach items="${hy.children }" var="hy2">
+                                                            <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                        </c:forEach>
+                                                        </option>
+                                                    </c:forEach>
+                                                </select>
                                         </div>
                                     </div>
                                 </div>
@@ -784,20 +794,31 @@
                 <c:forEach items="${XMLX}" var="xm">
                 xmlx.push({value: "${xm.code}", name: "${xm.title}"});
                 </c:forEach>
-                // this.kind = layui.xmSelect.render({
-                //     el: "#kind",
-                //     language: 'zn',
-                //     data: xmlx
-                // });
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+
+
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--var childData = [];--%>
+                <%--<c:forEach items="${xm.children}" var="c">--%>
+                <%--childData.push({--%>
+                <%--    value: "${c.code}",--%>
+                <%--    name: "${c.title}",--%>
+                <%--})--%>
+                <%--</c:forEach>--%>
+                <%--indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                <%--this.indusKind = layui.xmSelect.render({--%>
+                <%--    el: "#indusKind",--%>
+                <%--    language: 'zn',--%>
+                <%--    data: indusKindData,--%>
+                <%--});--%>
+
+
                 layui.laydate.render({
                     elem: '#year',
                     type: 'year',

+ 32 - 16
projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp

@@ -127,13 +127,17 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label label-longers required">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
-                                            <%--         <select name="indusKind" lay-search="" multiple>
-                                                         <option value="">请选择</option>
-                                                         <c:forEach items="${HYFL }" var="hy">
-                                                             <option value="${hy.id }">${hy.title }</option>
-                                                         </c:forEach>
-                                                     </select>--%>
+<%--                                            <div id="indusKind"></div>--%>
+                                            <select name="indusKind">
+                                                <option value="">请选择</option>
+                                                <c:forEach items="${HYFL }" var="hy">
+                                                    <option value="${hy.code }">${hy.title}
+                                                    <c:forEach items="${hy.children }" var="hy2">
+                                                        <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                    </c:forEach>
+                                                    </option>
+                                                </c:forEach>
+                                            </select>
                                         </div>
                                     </div>
                                 </div>
@@ -813,15 +817,27 @@
                     layui.form.val("searchForm", JSON.parse(params));
                 }
 
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--var childData = [];--%>
+                <%--<c:forEach items="${xm.children}" var="c">--%>
+                <%--childData.push({--%>
+                <%--    value: "${c.code}",--%>
+                <%--    name: "${c.title}",--%>
+                <%--})--%>
+                <%--</c:forEach>--%>
+                <%--indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                <%--this.indusKind = layui.xmSelect.render({--%>
+                <%--    el: "#indusKind",--%>
+                <%--    language: 'zn',--%>
+                <%--    data: indusKindData,--%>
+                <%--});--%>
 
                 document.getElementById("exportId", function () {
                     self.showExport = true;

+ 39 - 16
projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp

@@ -138,10 +138,21 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
+<%--                                            <div id="indusKind"></div>--%>
+                                                <select name="indusKind">
+                                                    <option value="">请选择</option>
+                                                    <c:forEach items="${HYFL }" var="hy">
+                                                        <option value="${hy.code }">${hy.title}
+                                                        <c:forEach items="${hy.children }" var="hy2">
+                                                            <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                        </c:forEach>
+                                                        </option>
+                                                    </c:forEach>
+                                                </select>
                                         </div>
                                     </div>
                                 </div>
+
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers" style="width: 100px;">项目总投资</label>
@@ -701,6 +712,7 @@
                 layui.form.on("select(moveStatus)", function (data) {
                     self.moveDbParam.status = data.value;
                 });
+
                 this.winH = document.body.clientHeight;
                 var nowdate = new Date();
                 nowdate.setMonth(nowdate.getMonth() + 1);
@@ -724,20 +736,31 @@
                 <c:forEach items="${XMLX}" var="xm">
                 xmlx.push({value: "${xm.code}", name: "${xm.title}"});
                 </c:forEach>
-                /*           this.kind = layui.xmSelect.render({
-                               el: "#kind",
-                               language: 'zn',
-                               data: xmlx
-                           });*/
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+
+
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--var childData = [];--%>
+                <%--<c:forEach items="${xm.children}" var="c">--%>
+                <%--childData.push({--%>
+                <%--    value: "${c.code}",--%>
+                <%--    name: "${c.title}",--%>
+                <%--})--%>
+                <%--</c:forEach>--%>
+                <%--indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                <%--this.indusKind = layui.xmSelect.render({--%>
+                <%--    el: "#indusKind",--%>
+                <%--    language: 'zn',--%>
+                <%--    data: indusKindData,--%>
+                <%--});--%>
+
+
                 layui.laydate.render({
                     elem: '#year',
                     type: 'year',
@@ -748,6 +771,7 @@
                 if (params) {
                     layui.form.val("searchForm", JSON.parse(params));
                 }
+
                 <%--if(${isHydw}) {--%>
                 <%--	this.light = layui.xmSelect.render({--%>
                 <%--		el: "#light",--%>
@@ -921,7 +945,6 @@
                 });
                 App.postJson("/api/subInfo/query/statistics", param, function (res) {
                     if (res.success) {
-                        console.log(res.data,"========")
                         self.beginRate = res.data;
                         self.beginRate.hyflList = self.beginRate.hyflData;
                         self.beginRate.jsddList = self.beginRate.jsddData;

+ 36 - 15
projects/src/main/webapp/vmodules/subject/subInfo/tz/xmzk.jsp

@@ -139,7 +139,17 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers">行业类别</label>
                                         <div class="layui-input-block">
-                                            <div id="indusKind"></div>
+<%--                                            <div id="indusKind"></div>--%>
+                                                <select name="indusKind">
+                                                    <option value="">请选择</option>
+                                                    <c:forEach items="${HYFL }" var="hy">
+                                                        <option value="${hy.code }">${hy.title}
+                                                        <c:forEach items="${hy.children }" var="hy2">
+                                                            <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
+                                                        </c:forEach>
+                                                        </option>
+                                                    </c:forEach>
+                                                </select>
                                         </div>
                                     </div>
                                 </div>
@@ -582,20 +592,31 @@
                 <c:forEach items="${XMLX}" var="xm">
                 xmlx.push({value: "${xm.code}", name: "${xm.title}"});
                 </c:forEach>
-                /*           this.kind = layui.xmSelect.render({
-                               el: "#kind",
-                               language: 'zn',
-                               data: xmlx
-                           });*/
-                var indusKindData = [];
-                <c:forEach items="${HYFL}" var="xm">
-                indusKindData.push({value: "${xm.id}", name: "${xm.title}"});
-                </c:forEach>
-                this.indusKind = layui.xmSelect.render({
-                    el: "#indusKind",
-                    language: 'zn',
-                    data: indusKindData
-                });
+
+
+                <%--var indusKindData = [];--%>
+                <%--<c:forEach items="${HYFL}" var="xm">--%>
+                <%--var childData = [];--%>
+                <%--<c:forEach items="${xm.children}" var="c">--%>
+                <%--childData.push({--%>
+                <%--    value: "${c.code}",--%>
+                <%--    name: "${c.title}",--%>
+                <%--})--%>
+                <%--</c:forEach>--%>
+                <%--indusKindData.push(--%>
+                <%--    {--%>
+                <%--        value: "${xm.code}",--%>
+                <%--        name: "${xm.title}",--%>
+                <%--        children: childData--%>
+                <%--    });--%>
+                <%--</c:forEach>--%>
+                <%--this.indusKind = layui.xmSelect.render({--%>
+                <%--    el: "#indusKind",--%>
+                <%--    language: 'zn',--%>
+                <%--    data: indusKindData,--%>
+                <%--});--%>
+
+
                 var kindNatureData = [];
                 <c:forEach items="${TZXZ}" var="xm">
                 kindNatureData.push({value: "${xm.code}", name: "${xm.title}"});