Browse Source

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

张维明 2 months ago
parent
commit
78a71518bc

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

@@ -4,6 +4,8 @@ import com.rtrh.core.repository.mybatis.MyBatisRepository;
 import com.rtrh.projects.modules.projects.po.LogOperate;
 import com.rtrh.projects.modules.projects.po.LogOperate;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
+import java.util.List;
+
 /**
 /**
  * <p>
  * <p>
  * 操作日志表 Mapper 接口
  * 操作日志表 Mapper 接口
@@ -16,4 +18,6 @@ import org.apache.ibatis.annotations.Param;
 public interface LogOperateMapper {
 public interface LogOperateMapper {
 
 
     void save(@Param("log") LogOperate logOperate);
     void save(@Param("log") LogOperate logOperate);
+
+    List<LogOperate> queryByYear(@Param("year") int year);
 }
 }

+ 21 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/LogOperateMapper.xml

@@ -20,5 +20,26 @@
                     #{log.title}
                     #{log.title}
                     )
                     )
     </insert>
     </insert>
+    <select id="queryByYear" resultType="com.rtrh.projects.modules.projects.po.LogOperate">
+        SELECT
+            log.id AS id,
+            log.userid AS userid,
+            log.username AS username,
+            log.menu AS menu,
+            log.button AS button,
+            log.title AS title,
+            log.kind AS kind,
+            log.sub_id AS subId,
+            log.status_first AS statusFirst,
+            log.status_after AS statusAfter,
+            log.zh_date AS zhDate,
+            log.remark AS remark,
+            log.create_user_id AS createUserId,
+            log.create_user_name AS createUserName,
+            log.create_time AS createTime,
+            log.logic_delete_flag AS logicDeleteFlag
+        FROM
+            t_log_operate log
+    </select>
 
 
 </mapper>
 </mapper>

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

@@ -2,6 +2,8 @@ package com.rtrh.projects.modules.projects.service;
 
 
 import com.rtrh.projects.modules.projects.po.LogOperate;
 import com.rtrh.projects.modules.projects.po.LogOperate;
 
 
+import java.util.List;
+
 /**
 /**
  * <p>
  * <p>
  * 操作日志表 服务类
  * 操作日志表 服务类
@@ -13,4 +15,6 @@ import com.rtrh.projects.modules.projects.po.LogOperate;
 public interface ILogOperateService {
 public interface ILogOperateService {
 
 
     void save(LogOperate logOperate);
     void save(LogOperate logOperate);
+
+    List<LogOperate> queryByYear(int year);
 }
 }

+ 6 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/LogOperateServiceImpl.java

@@ -6,6 +6,7 @@ import com.rtrh.projects.modules.projects.service.ILogOperateService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import java.util.List;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -24,4 +25,9 @@ public class LogOperateServiceImpl implements ILogOperateService {
     public void save(LogOperate logOperate) {
     public void save(LogOperate logOperate) {
         logOperateMapper.save(logOperate);
         logOperateMapper.save(logOperate);
     }
     }
+
+    @Override
+    public List<LogOperate> queryByYear(int year) {
+        return logOperateMapper.queryByYear(year);
+    }
 }
 }

+ 22 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/StatusChangeCountersVO.java

@@ -0,0 +1,22 @@
+package com.rtrh.projects.modules.projects.vo;
+
+import lombok.Data;
+
+@Data
+public class StatusChangeCountersVO {
+    public int cbToXjNum;
+    public int xjToZjNum;
+    public int zjToTcNum;
+    public int tcToRgNum;
+    public int xjToCbNum;
+    public int rgToZjNum;
+
+    public StatusChangeCountersVO() {
+        cbToXjNum = 0;
+        xjToZjNum = 0;
+        zjToTcNum = 0;
+        tcToRgNum = 0;
+        xjToCbNum = 0;
+        rgToZjNum = 0;
+    }
+}

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

@@ -1,46 +1,41 @@
 package com.rtrh.projects.web.controller.subject;
 package com.rtrh.projects.web.controller.subject;
 
 
 import java.io.IOException;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStream;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.math.RoundingMode;
 import java.net.URLEncoder;
 import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
-import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
-import javax.annotation.Resource;
 import javax.servlet.ServletOutputStream;
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
 import cn.afterturn.easypoi.excel.ExcelExportUtil;
 import cn.afterturn.easypoi.excel.ExcelExportUtil;
-import cn.afterturn.easypoi.handler.inter.IExcelExportServer;
-import cn.hutool.core.bean.BeanUtil;
+import cn.afterturn.easypoi.word.WordExportUtil;
+import cn.afterturn.easypoi.word.entity.MyXWPFDocument;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.core.io.IoUtil;
-import cn.hutool.poi.excel.ExcelReader;
 import cn.hutool.poi.excel.ExcelUtil;
 import cn.hutool.poi.excel.ExcelUtil;
-import cn.hutool.poi.excel.StyleSet;
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.EasyExcelFactory;
 import com.alibaba.excel.EasyExcelFactory;
 import com.alibaba.excel.ExcelWriter;
 import com.alibaba.excel.ExcelWriter;
 import com.alibaba.excel.write.metadata.WriteSheet;
 import com.alibaba.excel.write.metadata.WriteSheet;
-import com.alibaba.excel.write.metadata.style.WriteCellStyle;
-import com.alibaba.excel.write.metadata.style.WriteFont;
-import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
 import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
 import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Lists;
 import com.rtrh.common.util.StringUtil;
 import com.rtrh.common.util.StringUtil;
-import com.rtrh.core.vo.ListMessage;
-import com.rtrh.core.vo.Message;
 import com.rtrh.projects.modules.projects.dao.SubSourceDao;
 import com.rtrh.projects.modules.projects.dao.SubSourceDao;
 import com.rtrh.projects.modules.projects.enums.ProjectStatusEnum;
 import com.rtrh.projects.modules.projects.enums.ProjectStatusEnum;
 import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
+import com.rtrh.projects.modules.projects.po.LogOperate;
 import com.rtrh.projects.modules.projects.po.SubIndu;
 import com.rtrh.projects.modules.projects.po.SubIndu;
 import com.rtrh.projects.modules.projects.po.SubInfoGxj;
 import com.rtrh.projects.modules.projects.po.SubInfoGxj;
+import com.rtrh.projects.modules.projects.service.ILogOperateService;
+import com.rtrh.projects.modules.projects.vo.StatusChangeCountersVO;
 import com.rtrh.projects.modules.projects.vo.SubInfoTotalExcel;
 import com.rtrh.projects.modules.projects.vo.SubInfoTotalExcel;
-import com.rtrh.projects.modules.projects.vo.XmzhtjDetailVo;
 import com.rtrh.projects.modules.projects.vo.export.*;
 import com.rtrh.projects.modules.projects.vo.export.*;
 import com.rtrh.projects.modules.system.service.ISubInduService;
 import com.rtrh.projects.modules.system.service.ISubInduService;
 import com.rtrh.projects.modules.utils.CustomCellWriteWidthStrategy;
 import com.rtrh.projects.modules.utils.CustomCellWriteWidthStrategy;
@@ -55,18 +50,18 @@ import com.rtrh.projects.web.util.ExcelStyleUtil;
 import com.rtrh.projects.web.util.SheetData;
 import com.rtrh.projects.web.util.SheetData;
 import com.rtrh.projects.web.util.SheetHead;
 import com.rtrh.projects.web.util.SheetHead;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.ss.formula.functions.T;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.xssf.streaming.SXSSFSheet;
 import org.apache.poi.xssf.streaming.SXSSFSheet;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
+import org.apache.poi.xwpf.usermodel.XWPFParagraph;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.ModelAndView;
 
 
 import com.rtrh.common.util.CollectionUtil;
 import com.rtrh.common.util.CollectionUtil;
@@ -110,6 +105,8 @@ public class SubInfoExportController extends BaseController {
     private ISubInduService subInduService;
     private ISubInduService subInduService;
     @Autowired
     @Autowired
     private HttpServletResponse response;
     private HttpServletResponse response;
+    @Autowired
+    private ILogOperateService logOperateService;
     /**
     /**
      * 导出汇总表
      * 导出汇总表
      *
      *
@@ -983,6 +980,217 @@ public class SubInfoExportController extends BaseController {
         }
         }
     }
     }
 
 
+    /**
+     * “四个一批”工业项目情况分析报告
+     */
+    @PostMapping("/xmzkAnalysisExport")
+    public void xmzkAnalysisExport(@RequestBody SubInfoQueryTzVO vo) throws Exception {
+        InputStream inStream = this.getClass().getResourceAsStream("/template/analysis.docx");
+        XWPFDocument word = new MyXWPFDocument(inStream);
+        Map<String, Object> data = new HashMap<>();
+        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));
+
+        // 处理数据
+        if (CollectionUtil.isNotEmpty(list)) {
+            int year = DateUtil.year(new Date());
+            int month = DateUtil.month(DateUtil.date()) + 1;
+            int lastMonth = DateUtil.month(DateUtil.offsetMonth(DateUtil.date(), -1)) + 1;
+            data.put("year", year);
+            data.put("month", month);
+            data.put("lastMonth", lastMonth);
+            data.put("gyxmNum", list.size());
+
+            // 按4库状态划分
+            StringBuilder statusStrBuilder = new StringBuilder();
+            Map<String, List<SubInfoTotalExcel>> statusGroupList = list.stream().collect(Collectors.groupingBy(SubInfoTotalExcel::getStatus));
+            statusGroupList.forEach((key, value) -> {
+                SubInfoStatusEnum anEnum = SubInfoStatusEnum.getEnum(key);
+                String statusRate = new BigDecimal(value.size()).multiply(new BigDecimal(100)).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP) + "%";
+                BigDecimal totalAmt = value.stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add);
+                String format = String.format("%s项目%s个,占工业项目总数的%s,计划总投资%s亿元;", anEnum.getDesc(), value.size(), statusRate, totalAmt);
+                statusStrBuilder.append(format);
+            });
+            String statusStr = statusStrBuilder.toString().replaceAll(";(?!.*;)", "。");
+            data.put("statusStr", statusStr);
+
+            // 按属地划分
+            StringBuilder subjectStrBuilder = new StringBuilder();
+            Map<String, List<SubInfoTotalExcel>> subjectGroupList = list.stream().collect(Collectors.groupingBy(SubInfoTotalExcel::getSubjectId));
+            subjectGroupList.forEach((key, value) -> {
+                String rate = new BigDecimal(value.size()).multiply(new BigDecimal(100)).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP) + "%";
+                BigDecimal totalAmt = value.stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add);
+                String format = String.format("%s%s个,占工业项目总数的%s,计划总投资%s亿元;", jsddMap.get(key), value.size(), rate, totalAmt);
+                subjectStrBuilder.append(format);
+            });
+            String subjectStr = subjectStrBuilder.toString().replaceAll(";(?!.*;)", "。");
+            data.put("subjectStr", subjectStr);
+
+            // 按规模划分
+            StringBuilder scaleStrBuilder = new StringBuilder();
+            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"));
+            Map<String, List<SubInfoTotalExcel>> scaleGroupList = 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亿元以上";
+            }));
+            scaleGroupList.forEach((key, value) -> {
+                String rate = new BigDecimal(value.size()).multiply(new BigDecimal(100)).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP) + "%";
+                BigDecimal totalAmt = value.stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add);
+                String format = String.format("计划总投资%s项目%s个,占工业项目总数的%s,计划总投资%s亿元;", key, value.size(), rate, totalAmt);
+                scaleStrBuilder.append(format);
+            });
+            String scaleStr = scaleStrBuilder.toString().replaceAll(";(?!.*;)", "。");
+            data.put("scaleStr", scaleStr);
+
+            // 3.按行业分
+            StringBuilder hyStrBuilder = new StringBuilder();
+            Map<String, List<SubInfoTotalExcel>> hyGroupList = list.stream()
+                    .collect(Collectors.groupingBy(transaction -> {
+                        String code = transaction.getInduskind();
+                        // 确保code不为空且长度至少为2
+                        if (code == null || code.length() < 2) {
+                            return "未知行业";  // 默认未知行业
+                        }
+                        return code.substring(0, 2);
+                    }));
+            hyGroupList.forEach((key, value) -> {
+                String rate = new BigDecimal(value.size()).multiply(new BigDecimal(100)).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP) + "%";
+                BigDecimal totalAmt = value.stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add);
+                String format = String.format("%s项目%s个,占工业项目总数的%s,计划总投资%s亿元;", hyflMap.getOrDefault(key, key), value.size(), rate, totalAmt);
+                hyStrBuilder.append(format);
+            });
+            String hyStr = hyStrBuilder.toString().replaceAll(";(?!.*;)", "。");
+            data.put("hyStr", hyStr);
+
+            // 一、项目转化情况
+            List<LogOperate> logList = logOperateService.queryByYear(year);
+            StatusChangeCountersVO totalCounterVo = new StatusChangeCountersVO();
+            addNum(logList, totalCounterVo);
+            data.put("cbToXjNum", totalCounterVo.cbToXjNum);
+            data.put("xjToZjNum", totalCounterVo.xjToZjNum);
+            data.put("zjToTcNum", totalCounterVo.zjToTcNum);
+            data.put("tcToRgNum", totalCounterVo.tcToRgNum);
+            data.put("xjToCbNum", totalCounterVo.xjToCbNum);
+            data.put("rgToZjNum", totalCounterVo.rgToZjNum);
+
+            List<LogOperate> lastLogList = logList.stream().filter(logOperate -> DateUtil.month(logOperate.getCreateTime()) < DateUtil.month(new Date())).collect(Collectors.toList());
+            StatusChangeCountersVO lastCounterVo = new StatusChangeCountersVO();
+            addNum(lastLogList, lastCounterVo);
+            data.put("lastCbToXjNum", lastCounterVo.cbToXjNum);
+            data.put("lastXjToZjNum", lastCounterVo.xjToZjNum);
+            data.put("lastZjToTcNum", lastCounterVo.zjToTcNum);
+            data.put("lastTcToRgNum", lastCounterVo.tcToRgNum);
+            data.put("lastXjToCbNum", lastCounterVo.xjToCbNum);
+            data.put("lastRgToZjNum", lastCounterVo.rgToZjNum);
+
+            // 分属地看
+            String text = "%s年1-%s月,%s储备项目转新建%s个、新建项目转在建%s个、在建项目转投产%s个、投产项目转入规%s个,新建项目降级为储备%s个、入规项目转为在建%s个。" +
+                    "其中,%s月当月,储备项目转新建%s个、新建项目转在建%s个、在建项目转投产%s个、投产项目转入规%s个,新建项目降级为储备%s个、入规项目转为在建%s个。" +
+                    "1-%s月,项目开工率%s、投产率%s、入规率%s,较1-(%s)月,分别增长%s、%s、%s个百分点。";
+            String subjectZhStr = String.format(text,
+                    year, month, "subjectName", totalCounterVo.cbToXjNum, totalCounterVo.xjToZjNum, totalCounterVo.zjToTcNum, totalCounterVo.tcToRgNum, totalCounterVo.xjToCbNum, totalCounterVo.rgToZjNum,
+                    month, totalCounterVo.cbToXjNum, totalCounterVo.xjToZjNum, totalCounterVo.zjToTcNum, totalCounterVo.tcToRgNum, totalCounterVo.xjToCbNum, totalCounterVo.rgToZjNum,
+                    month, "kgl", "tcl", "rgl", lastMonth, "1", "2", "3"
+            );
+            data.put("subjectZhStr", subjectZhStr);
+            // 分规模看
+            String scaleZhStr = String.format(text,
+                    year, month, "计划总投资100亿元以上", totalCounterVo.cbToXjNum, totalCounterVo.xjToZjNum, totalCounterVo.zjToTcNum, totalCounterVo.tcToRgNum, totalCounterVo.xjToCbNum, totalCounterVo.rgToZjNum,
+                    month, totalCounterVo.cbToXjNum, totalCounterVo.xjToZjNum, totalCounterVo.zjToTcNum, totalCounterVo.tcToRgNum, totalCounterVo.xjToCbNum, totalCounterVo.rgToZjNum,
+                    month, "kgl", "tcl", "rgl", lastMonth, "1", "2", "3"
+            );
+            data.put("scaleZhStr", scaleZhStr);
+            // 分行业看
+            String hyZhStr = String.format(text,
+                    year, month, "制造业", totalCounterVo.cbToXjNum, totalCounterVo.xjToZjNum, totalCounterVo.zjToTcNum, totalCounterVo.tcToRgNum, totalCounterVo.xjToCbNum, totalCounterVo.rgToZjNum,
+                    month, totalCounterVo.cbToXjNum, totalCounterVo.xjToZjNum, totalCounterVo.zjToTcNum, totalCounterVo.tcToRgNum, totalCounterVo.xjToCbNum, totalCounterVo.rgToZjNum,
+                    month, "kgl", "tcl", "rgl", lastMonth, "1", "2", "3"
+            );
+            data.put("hyZhStr", hyZhStr);
+            // 二、存在问题
+            // (一)项目落地方面
+            data.put("xmldSubNameStr", "a项目、b项目、c项目");
+            data.put("xmldNum", 3);
+            data.put("xmldMonthNum", 3);
+            // (二)前期手续方面
+            data.put("qqsxNum", 3);
+            data.put("qqsxHpNames", "a项目、b项目、c项目");
+            data.put("qqsxHpNum", 3);
+            data.put("qqsxNpNames", "a项目、b项目、c项目");
+            data.put("qqsxNpNum", 3);
+            data.put("qqsxYdNames", "a项目、b项目、c项目");
+            data.put("qqsxYdNum", 3);
+            // (三)工程建设方面
+            data.put("gcjsNum", 3);
+            data.put("gcjsZjzhNames", "a项目、b项目、c项目");
+            data.put("gcjsZjzhNum", 3);
+            data.put("gcjsAqsgNames", "a项目、b项目、c项目");
+            // (四)升规入统方面
+            data.put("sgrtNum", 3);
+            data.put("sgrtCqNames", "a项目、b项目、c项目");
+            data.put("sgrtCqNum", 3);
+            data.put("sgrtZlzhNames", "a项目、b项目、c项目");
+            data.put("sgrtZlzhNum", 3);
+
+            // Map<String, List<LogOperate>> collect = logList.stream().collect(Collectors.groupingBy(LogOperate::getTitle));
+            // String currentYearZhStr = buildZhData(collect);
+            // data.put("currentYearZhStr", currentYearZhStr);
+            // Map<String, List<LogOperate>> collect1 = logList.stream().filter(item -> DateUtil.month(item.getZhDate()) == DateUtil.month(new Date())).collect(Collectors.groupingBy(LogOperate::getTitle));
+            // String currentMonthZhStr = buildZhData(collect1);
+            // data.put("currentMonthZhStr", currentMonthZhStr);
+            // 开工率 = (在建+投产)/(在建+投产+新建)
+            // 投产率 = (投产)/(在建+投产+新建)
+            // 入规率 = 入规/(在建+投产+新建)
+        }
+
+        WordExportUtil.exportWord07(word, data);
+        response.setHeader("content-disposition","attachment;filename="+new String("analysis".getBytes(),"ISO8859-1"));
+        response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+        word.write(response.getOutputStream());
+    }
+
+    private void addNum(List<LogOperate> lastLogList, StatusChangeCountersVO vo) {
+        for (LogOperate logOperate : lastLogList) {
+            if (SubInfoStatusEnum.CB.getCode().equals(logOperate.getStatusFirst()) && SubInfoStatusEnum.XJ.getCode().equals(logOperate.getStatusAfter())) {
+                ++vo.cbToXjNum;
+            }
+            if (SubInfoStatusEnum.XJ.getCode().equals(logOperate.getStatusFirst()) && SubInfoStatusEnum.ZJ.getCode().equals(logOperate.getStatusAfter())) {
+                ++vo.xjToZjNum;
+            }
+            if (SubInfoStatusEnum.ZJ.getCode().equals(logOperate.getStatusFirst()) && SubInfoStatusEnum.TC.getCode().equals(logOperate.getStatusAfter())) {
+                ++vo.zjToTcNum;
+            }
+            // if (SubInfoStatusEnum.TC.getCode().equals(logOperate.getStatusFirst()) && SubInfoStatusEnum.RG.getCode().equals(logOperate.getStatusAfter())) {
+            //     ++vo.tcToRgNum;
+            // }
+            if (SubInfoStatusEnum.XJ.getCode().equals(logOperate.getStatusFirst()) && SubInfoStatusEnum.CB.getCode().equals(logOperate.getStatusAfter())) {
+                ++vo.xjToCbNum;
+            }
+            // if (SubInfoStatusEnum.RG.getCode().equals(logOperate.getStatusFirst()) && SubInfoStatusEnum.ZJ.getCode().equals(logOperate.getStatusAfter())) {
+            //     ++vo.rgToZjNum;
+            // }
+        }
+    }
+
+
+    private String buildZhData(Map<String, List<LogOperate>> collect) {
+        StringBuilder zhStrBuilder = new StringBuilder();
+        collect.forEach((key, value) -> {
+            zhStrBuilder.append(key).append(value.size()).append("个、");
+        });
+        return zhStrBuilder.toString().replaceAll("、$", "。");
+    }
+
+
     /**
     /**
      * 导出重点项目储备明细表
      * 导出重点项目储备明细表
      *
      *

BIN
projects/src/main/resources/template/analysis.docx


+ 187 - 127
projects/src/main/webapp/vmodules/leftMenu.jsp

@@ -12,6 +12,42 @@
     </div>
     </div>
     <div class="expand_collapse_btn" @click="changeSide"></div>
     <div class="expand_collapse_btn" @click="changeSide"></div>
     <div class="layui-side-scroll">
     <div class="layui-side-scroll">
+<%--        <ul class="layui-nav layui-nav-tree" lay-filter="test">--%>
+<%--            <li :class="['layui-nav-item', {'layui-nav-itemed layui-nav-itemed-hand': Number(active) === index}]"--%>
+<%--                v-for="(item, index) in navLs" :key="index" v-if="menuCode.indexOf(item.code) >= 0"--%>
+<%--            >--%>
+<%--                <a :title="item.txt" @click="onSelectItem(index)" href="javascript:;">--%>
+<%--                    <div class="left">--%>
+<%--                        <i class='icon'--%>
+<%--                           :class="Number(active) === index ? item.activeIcon : item.icon"--%>
+<%--                        ></i>{{item.txt}}--%>
+<%--                    </div>--%>
+<%--                    <i class="layui-icon layui-icon-down"></i>--%>
+<%--                </a>--%>
+
+<%--                <!-- 二级菜单 -->--%>
+<%--                <dl class="layui-nav-child" v-if="item.child != null">--%>
+<%--                    <dd v-if="menuCode.indexOf(it.code) >= 0"--%>
+<%--                        v-for="(it, ind) in item.child" :key="'inner_' + ind"--%>
+<%--                        :class="{'layui-this': it.code === curSelectedMenu}"--%>
+<%--                    >--%>
+<%--                        <a :title="it.txt" href="javascript:;"--%>
+<%--                           @click="onSelectItem(index, ind)"--%>
+<%--                        >{{it.txt}}</a>--%>
+
+<%--                        <!-- 三级菜单 -->--%>
+<%--                        <dl class="layui-nav-child" v-if="it.child != null">--%>
+<%--                            <dd v-for="(third, thirdInd) in it.child" :key="'third_' + thirdInd"--%>
+<%--                            >--%>
+<%--                                <a :title="third.txt" href="javascript:;"--%>
+<%--                                   @click="onSelectItem(ind, thirdInd)"--%>
+<%--                                >{{third.txt}}</a>--%>
+<%--                            </dd>--%>
+<%--                        </dl>--%>
+<%--                    </dd>--%>
+<%--                </dl>--%>
+<%--            </li>--%>
+<%--        </ul>--%>
         <ul class="layui-nav layui-nav-tree" lay-filter="test">
         <ul class="layui-nav layui-nav-tree" lay-filter="test">
             <li :class="['layui-nav-item', {'layui-nav-itemed layui-nav-itemed-hand': Number(active) === index}]"
             <li :class="['layui-nav-item', {'layui-nav-itemed layui-nav-itemed-hand': Number(active) === index}]"
                 v-for="(item, index) in navLs" :key="index" v-if="menuCode.indexOf(item.code) >= 0"
                 v-for="(item, index) in navLs" :key="index" v-if="menuCode.indexOf(item.code) >= 0"
@@ -113,32 +149,6 @@
                         }
                         }
                     ]
                     ]
                 },
                 },
-                {
-                    icon: 'icon_work_bench_active',
-                    activeIcon: 'icon_work_bench_active',
-                    code: '201',
-                    txt: '互动工作台',
-                    url: 'workBench/zrWorkBench',
-                    kind: ["1", "4"]
-                },
-                {
-                    icon: 'icon_organ_manage_active',
-                    activeIcon: 'icon_organ_manage_active',
-                    code: '3',
-                    txt: '项目前期管理',
-                    child: [
-                        {
-                            txt: '项目信息申报',
-                            code: '301',
-                            url: 'subject/subInfo/report'
-                        },
-                        {
-                            txt: '前期手续办理情况',
-                            code: '303',
-                            url: 'subject/subInfo/pre'/* ?type=qx */
-                        }
-                    ]
-                },
                 {
                 {
                     icon: 'icon_project_active',
                     icon: 'icon_project_active',
                     activeIcon: 'icon_project_active',
                     activeIcon: 'icon_project_active',
@@ -186,6 +196,57 @@
                     url: 'tjfx/index'
                     url: 'tjfx/index'
                     // url: 'register/underConstruction'
                     // url: 'register/underConstruction'
                 },
                 },
+                {
+                    icon: 'icon_organ_manage_active',
+                    activeIcon: 'icon_organ_manage_active',
+                    code: '3',
+                    txt: '项目前期管理',
+                    child: [
+                        {
+                            txt: '项目信息申报',
+                            code: '301',
+                            url: 'subject/subInfo/report'
+                        },
+                        {
+                            txt: '前期手续办理情况',
+                            code: '303',
+                            url: 'subject/subInfo/pre'/* ?type=qx */
+                        },
+                        {
+                            icon: 'icon_zjfwk_active',
+                            activeIcon: 'icon_zjfwk_active',
+                            txt: '智联工地',
+                            code: '7',
+                            child: [
+                                {
+                                    code: '702',
+                                    txt: '项目地图',
+                                    url: 'smart/query'
+                                    //url: 'register/underConstruction'
+                                },
+                                {
+                                    code: '703',
+                                    txt: '实时视频',
+                                    url: 'smart/vedio'
+                                    //url: 'register/underConstruction'
+                                },
+                                {
+                                    txt: '周调度图片',
+                                    code: '706',
+                                    url: 'graphicProgress/list'
+                                    // url: 'register/underConstruction'
+                                },
+                                {
+                                    txt: '月航拍全景',
+                                    code: '707',
+                                    url: 'aerial/list'
+                                    // url: 'register/underConstruction'
+                                }
+
+                            ]
+                        },
+                    ]
+                },
                 {
                 {
                     icon: 'icon_over_time_active',
                     icon: 'icon_over_time_active',
                     activeIcon: 'icon_over_time_active',
                     activeIcon: 'icon_over_time_active',
@@ -209,37 +270,12 @@
                     ]
                     ]
                 },
                 },
                 {
                 {
-                    icon: 'icon_zjfwk_active',
-                    activeIcon: 'icon_zjfwk_active',
-                    txt: '智联工地',
-                    code: '7',
-                    child: [
-                        {
-                            code: '702',
-                            txt: '项目地图',
-                            url: 'smart/query'
-                            //url: 'register/underConstruction'
-                        },
-                        {
-                            code: '703',
-                            txt: '实时视频',
-                            url: 'smart/vedio'
-                            //url: 'register/underConstruction'
-                        },
-                        {
-                            txt: '周调度图片',
-                            code: '706',
-                            url: 'graphicProgress/list'
-                            // url: 'register/underConstruction'
-                        },
-                        {
-                            txt: '月航拍全景',
-                            code: '707',
-                            url: 'aerial/list'
-                            // url: 'register/underConstruction'
-                        }
-
-                    ]
+                    icon: 'icon_work_bench_active',
+                    activeIcon: 'icon_work_bench_active',
+                    code: '201',
+                    txt: '互动工作台',
+                    url: 'workBench/zrWorkBench',
+                    kind: ["1", "4"]
                 },
                 },
                 {
                 {
                     icon: 'icon_project_xtgl_active',
                     icon: 'icon_project_xtgl_active',
@@ -247,80 +283,104 @@
                     code: '9',
                     code: '9',
                     txt: '系统管理',
                     txt: '系统管理',
                     child: [
                     child: [
-                        {
-                            txt: '项目单位信息',
-                            code: '904',
-                            url: 'register/query'
-                        },
-                        {
-                            txt: '行业部门信息',
-                            code: '906',
-                            url: 'junit/index'
-                        },
-                        {
-                            txt: '字典管理',
-                            code: '909',
-                            url: 'dicsystable/index',
-                        },
-                        {
-                            txt: '行业设置',
-                            code: '918',
-                            url: 'subIndu/index',
-                        },
-                        {
-                            txt: '公告管理',
-                            code: '910',
-                            url: 'notice/index'
-                        },
-                        {
-                            txt: '系统参数设置',
-                            code: '911',
-                            url: 'sysTable/index'
-                        },
+                        // {   code: '91',
+                        //     txt: '部门及项目单位信息',
+                        //     child:[
+                                {
+                                    txt: '项目单位信息',
+                                    code: '904',
+                                    url: 'register/query'
+                                },
+                                {
+                                    txt: '行业部门信息',
+                                    code: '906',
+                                    url: 'junit/index'
+                                },
+                        //     ]
+                        // },
+                        // {
+                        //     txt: '日志信息',
+                        //     code: '92',
+                        //     child: [
+                                {
+                                    txt: '登录日志',
+                                    code: '920',
+                                    url: 'loginlog/index'
+                                },
+                                {
+                                    txt: '审计日志',
+                                    code: '408',
+                                    url: 'auditLog/index'
+                                },
+                                {
+                                    txt: '短信日志查询',
+                                    code: '915',
+                                    url: 'msgLog/index'
+                                },
+                        //     ]
+                        // },
+                        // {
+                        //     txt: '统计报告',
+                        //     code: '93',
+                        //     child: [
+                                {
+                                    code: '917',
+                                    txt: '项目年度计划',
+                                    // url: 'annualPlan/index'
+                                    url: 'annualPlan/index'
+                                },
+                                {
+                                    txt: '项目周报',
+                                    code: '406',
+                                    // url: 'weekReport/view'
+                                    url: 'weekReport/view'
+                                },
+                                {
+                                    txt: '项目月报',
+                                    code: '407',
+                                    // url: 'monthReport/view'
+                                    url: 'monthReport/view'
+                                },
+                                {
+                                    txt: '每个月项目转换情况',
+                                    code: '450',
+                                    url: 'tjfx/xmzhtj'
+                                    // url: 'register/underConstruction'
+                                },
+                        //     ]
+                        // },
+                        // {
+                        //     txt: '其他',
+                        //     code: '94',
+                        //     child: [
+                                {
+                                    txt: '字典管理',
+                                    code: '909',
+                                    url: 'dicsystable/index',
+                                },
+                                {
+                                    txt: '行业设置',
+                                    code: '918',
+                                    url: 'subIndu/index',
+                                },
+                                {
+                                    txt: '公告管理',
+                                    code: '910',
+                                    url: 'notice/index'
+                                },
+                                {
+                                    txt: '系统参数设置',
+                                    code: '911',
+                                    url: 'sysTable/index'
+                                },
+                        //     ]
+                        // },
+
                         // {
                         // {
                         //     txt: '操作日志查询',
                         //     txt: '操作日志查询',
                         //     code: '913',
                         //     code: '913',
                         //     url: 'subDataLog/index'
                         //     url: 'subDataLog/index'
                         // },
                         // },
-                        {
-                            txt: '登录日志',
-                            code: '920',
-                            url: 'loginlog/index'
-                        },
-                        {
-                            txt: '审计日志',
-                            code: '408',
-                            url: 'auditLog/index'
-                        },
-                        {
-                            txt: '短信日志查询',
-                            code: '915',
-                            url: 'msgLog/index'
-                        },
-                        {
-                            code: '917',
-                            txt: 'A项目年度计划',
-                            // url: 'annualPlan/index'
-                            url: 'annualPlan/index'
-                        },
-                        {
-                            txt: 'B项目周报',
-                            code: '406',
-                            // url: 'weekReport/view'
-                            url: 'weekReport/view'
-                        },
-                        {
-                            txt: 'C项目月报',
-                            code: '407',
-                            // url: 'monthReport/view'
-                            url: 'monthReport/view'
-                        },
-                        {
-                            txt: 'D每个月项目转换情况',
-                            code: '450',
-                            url: 'tjfx/xmzhtj'
-                            // url: 'register/underConstruction'
-                        },
                     ]
                     ]
                 }
                 }
             ],
             ],
@@ -460,7 +520,7 @@
                         const htmlStr = '<span style="margin-right: 5px; color: #dde1e6;">' + parentNodeText + ' /</span>' + chooseNode.txt
                         const htmlStr = '<span style="margin-right: 5px; color: #dde1e6;">' + parentNodeText + ' /</span>' + chooseNode.txt
                         this.topBreadcrumb = htmlStr
                         this.topBreadcrumb = htmlStr
                     } else {
                     } else {
-                        App.msg.warn("正在建设中");
+                        // App.msg.warn("正在建设中");
                     }
                     }
                 } else if (this.navLs[index].url) {
                 } else if (this.navLs[index].url) {
                     var chooseNode = this.navLs[index];
                     var chooseNode = this.navLs[index];

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

@@ -223,7 +223,8 @@
                     <div class="export-item" v-if="showExport" :style="{ top: '-93px' }">
                     <div class="export-item" v-if="showExport" :style="{ top: '-93px' }">
                         <button type="button" class="" @click="exportTotalExcel">汇总导出</button>
                         <button type="button" class="" @click="exportTotalExcel">汇总导出</button>
                         <button type="button" class="" @click="exportFixDetailExcel">项目明细导出</button>
                         <button type="button" class="" @click="exportFixDetailExcel">项目明细导出</button>
-                        <button type="button" class="" @click="exportMoreExcel">自定义导出</button>
+                        <button type="button" class="" @click="exportAnalysis">分析报告导出</button>
+<%--                        <button type="button" class="" @click="exportMoreExcel">自定义导出</button>--%>
                     </div>
                     </div>
                 </div>
                 </div>
                 <div style="position: relative; display: inline-block">
                 <div style="position: relative; display: inline-block">
@@ -1165,6 +1166,10 @@
                 var param = this.getSearchParams();
                 var param = this.getSearchParams();
                 App.common.utils.downFile(App.getUrl("/subInfoExport/exportXmzkDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
                 App.common.utils.downFile(App.getUrl("/subInfoExport/exportXmzkDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
             },
             },
+            exportAnalysis: function () {
+                var param = this.getSearchParams();
+                App.common.utils.downFile(App.getUrl("/subInfoExport/xmzkAnalysisExport"), "POST", param, "“四个一批”工业项目情况分析报告.docx", "导出失败");
+            },
             exportDetailExcel: function () {
             exportDetailExcel: function () {
                 var param = this.getSearchParams();
                 var param = this.getSearchParams();
                 App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
                 App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");