Przeglądaj źródła

项目4库bug修改

JiangPengLi 4 miesięcy temu
rodzic
commit
e582148c9f

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

@@ -84,4 +84,10 @@ public interface SubInfoMapper {
     Long queryExceed();
 
     Long queryNotExceed();
+
+    Long queryExceedWithin();
+
+    Long queryExceedOutside();
+
+    List<WorkBenchVO> queryWarningStatistics();
 }

+ 115 - 16
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml

@@ -601,6 +601,7 @@
             AND sub_info.amt_total &lt;= #{queryVO.endAmt}
         </if>
     </select>
+    <!--预警-->
     <select id="queryWarning" resultType="java.lang.Long">
         SELECT SUM(counts)
         FROM (
@@ -609,8 +610,8 @@
         FROM sub_info
         WHERE cb_status = 3
         AND qy_date IS NOT NULL
-        AND DATE_ADD(qy_date, INTERVAL cb_num DAY) &lt; NOW()
-        AND DATE_ADD(qy_date, INTERVAL cb_num DAY) > DATE_SUB(NOW(), INTERVAL 3 DAY)
+        AND DATE_ADD(qy_date, INTERVAL cb_num DAY) > NOW()
+        AND DATE_ADD(qy_date, INTERVAL cb_num DAY) &lt; DATE_ADD(NOW(), INTERVAL 3 DAY)
         AND `status` = 1
 
         UNION ALL
@@ -618,8 +619,8 @@
         -- 新建未转在建预警
         SELECT COUNT(*) AS counts
         FROM sub_info
-        WHERE DATE_ADD(begin_date, INTERVAL xj_num DAY) &lt; NOW()
-        AND DATE_ADD(begin_date, INTERVAL xj_num DAY) > DATE_SUB(NOW(), INTERVAL 3 DAY)
+        WHERE begin_date > NOW()
+        AND begin_date &lt; DATE_ADD(NOW(), INTERVAL 3 DAY)
         AND `status` = 2
 
         UNION ALL
@@ -627,8 +628,8 @@
         -- 在建未转投产预警
         SELECT COUNT(*) AS counts
         FROM sub_info
-        WHERE DATE_ADD(end_date, INTERVAL xj_num DAY) &lt; NOW()
-        AND DATE_ADD(end_date, INTERVAL xj_num DAY) > DATE_SUB(NOW(), INTERVAL 3 DAY)
+        WHERE end_date > NOW()
+        AND end_date &lt; DATE_ADD(NOW(), INTERVAL 3 DAY)
         AND `status` = 3
 
         UNION ALL
@@ -636,11 +637,12 @@
         -- 投产未入规预警
         SELECT COUNT(*) AS counts
         FROM sub_info
-        WHERE DATE_ADD(rt_date, INTERVAL xj_num DAY) &lt; NOW()
-        AND DATE_ADD(rt_date, INTERVAL xj_num DAY) > DATE_SUB(NOW(), INTERVAL 3 DAY)
+        WHERE rt_date > NOW()
+        AND rt_date &lt; DATE_ADD(NOW(), INTERVAL 3 DAY)
         AND `status` = 9
         ) AS combined_counts;
     </select>
+    <!-- 超期 -->
     <select id="queryExceed" resultType="java.lang.Long">
         SELECT SUM(counts) AS total_count
         FROM (
@@ -649,7 +651,7 @@
                  FROM sub_info
                  WHERE cb_status = 3
                    AND qy_date IS NOT NULL
-                   AND DATE_ADD(qy_date, INTERVAL cb_num DAY) > NOW()
+                   AND DATE_ADD(qy_date, INTERVAL cb_num DAY) &lt; NOW()
                    AND `status` = 1
 
                  UNION ALL
@@ -658,7 +660,7 @@
                  SELECT COUNT(*) AS counts
                  FROM sub_info
                  WHERE
-                       DATE_ADD(begin_date, INTERVAL xj_num DAY) > NOW()
+                     begin_date  &lt;  NOW()
                    AND `status` = 2
 
                  UNION ALL
@@ -666,7 +668,7 @@
                  -- 在建未转投产
                  SELECT COUNT(*) AS counts
                  FROM sub_info
-                 WHERE DATE_ADD(end_date, INTERVAL xj_num DAY) > NOW()
+                 WHERE end_date  &lt;  NOW()
                    AND `status` = 3
 
                  UNION ALL
@@ -674,10 +676,11 @@
                  -- 投产未入规
                  SELECT COUNT(*) AS counts
                  FROM sub_info
-                 WHERE DATE_ADD(rt_date, INTERVAL xj_num DAY) > NOW()
+                 WHERE rt_date  &lt;  NOW()
                    AND `status` = 9
              ) AS combined_counts;
     </select>
+    <!-- 绿灯 未超期-->
     <select id="queryNotExceed" resultType="java.lang.Long">
         SELECT SUM(counts) AS total_count
         FROM (
@@ -686,7 +689,7 @@
         FROM sub_info
         WHERE cb_status = 3
         AND qy_date IS NOT NULL
-        AND DATE_ADD(qy_date, INTERVAL cb_num DAY) &lt; DATE_SUB(NOW(), INTERVAL 3 DAY)
+        AND DATE_ADD(qy_date, INTERVAL cb_num DAY) > NOW()
         AND `status` = 1
 
         UNION ALL
@@ -695,7 +698,7 @@
         SELECT COUNT(*) AS counts
         FROM sub_info
         WHERE
-         DATE_ADD(begin_date, INTERVAL xj_num DAY) &lt; DATE_SUB(NOW(), INTERVAL 3 DAY)
+            begin_date > NOW()
         AND `status` = 2
 
         UNION ALL
@@ -704,7 +707,7 @@
         SELECT COUNT(*) AS counts
         FROM sub_info
         WHERE
-         DATE_ADD(end_date, INTERVAL xj_num DAY) &lt; DATE_SUB(NOW(), INTERVAL 3 DAY)
+            end_date > NOW()
         AND `status` = 3
 
         UNION ALL
@@ -713,8 +716,104 @@
         SELECT COUNT(*) AS counts
         FROM sub_info
         WHERE
-         DATE_ADD(rt_date, INTERVAL xj_num DAY) &lt; DATE_SUB(NOW(), INTERVAL 3 DAY)
+            rt_date > NOW()
         AND `status` = 9
         ) AS combined_counts;
     </select>
+    <!-- 黄灯 -->
+    <select id="queryExceedWithin" resultType="java.lang.Long">
+        SELECT SUM(counts) AS total_count
+        FROM (
+                 -- 已签约(未转新建)
+                 SELECT COUNT(*) AS counts
+                 FROM sub_info
+                 WHERE cb_status = 3
+                   AND qy_date IS NOT NULL
+                   AND DATE_ADD(qy_date, INTERVAL cb_num DAY) > DATE_SUB(NOW(), INTERVAL 3 DAY)
+                   AND DATE_ADD(qy_date, INTERVAL cb_num DAY) &lt; NOW()
+                   AND `status` = 1
+
+                 UNION ALL
+
+                 -- 新建未转在建
+                 SELECT COUNT(*) AS counts
+                 FROM sub_info
+                 WHERE
+                     begin_date > DATE_SUB(NOW(), INTERVAL 3 DAY)
+                   AND begin_date &lt; NOW()
+                   AND `status` = 2
+
+                 UNION ALL
+
+                 -- 在建未转投产
+                 SELECT COUNT(*) AS counts
+                 FROM sub_info
+                 WHERE
+                     end_date > DATE_SUB(NOW(), INTERVAL 3 DAY)
+                   AND end_date &lt; NOW()
+                   AND `status` = 3
+
+                 UNION ALL
+
+                 -- 投产未入规
+                 SELECT COUNT(*) AS counts
+                 FROM sub_info
+                 WHERE
+                       rt_date > DATE_SUB(NOW(), INTERVAL 3 DAY)
+                   AND rt_date &lt; NOW()
+                   AND `status` = 9
+             ) AS combined_counts;
+    </select>
+    <!-- 红灯 -->
+    <select id="queryExceedOutside" resultType="java.lang.Long">
+        SELECT SUM(counts) AS total_count
+        FROM (
+                 -- 已签约(未转新建)
+                 SELECT COUNT(*) AS counts
+                 FROM sub_info
+                 WHERE cb_status = 3
+                   AND qy_date IS NOT NULL
+                   AND DATE_ADD(qy_date, INTERVAL cb_num DAY) &lt; DATE_SUB(NOW(), INTERVAL 3 DAY)
+                   AND `status` = 1
+
+                 UNION ALL
+
+                 -- 新建未转在建
+                 SELECT COUNT(*) AS counts
+                 FROM sub_info
+                 WHERE
+                     begin_date &lt; DATE_SUB(NOW(), INTERVAL 3 DAY)
+                   AND `status` = 2
+
+                 UNION ALL
+
+                 -- 在建未转投产
+                 SELECT COUNT(*) AS counts
+                 FROM sub_info
+                 WHERE end_date &lt; DATE_SUB(NOW(), INTERVAL 3 DAY)
+                   AND `status` = 3
+
+                 UNION ALL
+
+                 -- 投产未入规
+                 SELECT COUNT(*) AS counts
+                 FROM sub_info
+                 WHERE rt_date &lt; DATE_SUB(NOW(), INTERVAL 3 DAY)
+                   AND `status` = 9
+             ) AS combined_counts;
+    </select>
+    <select id="queryWarningStatistics" resultType="com.rtrh.projects.modules.projects.vo.WorkBenchVO">
+        SELECT
+            id,
+            STATUS,
+            cb_status cbStatus,
+            qy_date qyDate,
+            begin_date beginDate,
+            end_date endDate,
+            rt_date rtDate
+        FROM
+            sub_info
+        WHERE
+            logic_delete_flag = 0
+    </select>
 </mapper>

+ 6 - 4
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java

@@ -265,12 +265,14 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
         List<SubInfoGxj> data = this.queryAll(loginUser, queryVO);
         data.forEach(e -> {
             if (StringUtils.isNotBlank(e.getContent())) {
-                int maxLength = Math.min(e.getContent().length(), 100);
-                e.setContent(e.getContent().substring(0, maxLength) + "...");
+                int maxLength = Math.min(e.getContent().length(), 48);
+                String content = e.getContent().substring(0, maxLength);
+                e.setContent(content.length()>=48? content + "..." : content);
             }
             if (StringUtils.isNotBlank(e.getProgress())) {
-                int maxLength = Math.min(e.getProgress().length(), 100);
-                e.setProgress(e.getProgress().substring(0, maxLength) + "...");
+                int maxLength = Math.min(e.getProgress().length(), 48);
+                String progress = e.getProgress().substring(0, maxLength);
+                e.setProgress(progress.length()>=48? progress + "..." : progress);
             }
         });
         PageInfo<SubInfoGxj> pageInfo = new PageInfo<>(data);

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

@@ -9,10 +9,14 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import com.rtrh.projects.modules.projects.enums.SubInfoCbStatusEnum;
 import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.mapper.SubInfoMapper;
 import com.rtrh.projects.modules.projects.po.SubInfoGxj;
 import com.rtrh.projects.modules.projects.vo.SubInfoQueryTzVO;
+import com.rtrh.projects.modules.projects.vo.WorkBenchVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -108,13 +112,21 @@ public class WorkBenchServiceImpl implements WorkBenchService {
 	@Override
 	public Map<String, Object> statisticData() {
 		Map<String, Object> map = new HashMap<>();
-		// 预警
+		// 预警 提前3天内
 		Long warningNum = subInfoMapper.queryWarning();
+		// 超期 进度红灯
 		Long exceedNum = subInfoMapper.queryExceed();
+		// 未超期绿灯
 		Long notExceedNum = subInfoMapper.queryNotExceed();
+		// 黄灯超期3天内
+		Long withinNum = subInfoMapper.queryExceedWithin();
+		// 红灯超期超过3天
+		Long outsideNum = subInfoMapper.queryExceedOutside();
 		map.put("warningNum", warningNum);
 		map.put("exceedNum", exceedNum);
 		map.put("notExceedNum", notExceedNum);
+		map.put("withinNum", withinNum);
+		map.put("outsideNum", outsideNum);
 		return map;
 	}
 

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

@@ -0,0 +1,44 @@
+package com.rtrh.projects.modules.projects.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+@Setter
+@Getter
+@Accessors(chain = true)
+public class WorkBenchVO {
+    private String id;
+
+    private String status;
+    private String cbStatus;
+
+    // 签约日期
+    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
+    private Date qyDate;
+
+    // 开始计划日期
+    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
+    private Date beginDate;
+
+    // 计划投产日期
+    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
+    private Date endDate;
+
+    // 计划申规入统时间
+    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
+    private Date rtDate;
+
+
+    // 储备转新建周期
+    private Integer cbNum;
+
+    // 新建转在建周期
+    private Integer xjNum;
+
+    // 在建转投产周期
+    private Integer zjNum;
+}

+ 24 - 1
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -43,6 +43,7 @@ import com.rtrh.projects.modules.utils.DateUtils;
 import com.rtrh.projects.modules.utils.QualificationsDeclareCellWriteHandler;
 import com.rtrh.projects.modules.utils.MyStringUtils;
 import com.rtrh.projects.outapi.result.JsonResult;
+import com.rtrh.projects.web.util.ExcelStyleUtil;
 import com.rtrh.projects.web.util.SheetData;
 import com.rtrh.projects.web.util.SheetHead;
 import org.apache.commons.lang3.StringUtils;
@@ -874,16 +875,24 @@ public class SubInfoExportController extends BaseController {
         Map<String, String> hyDictMap = subInduService.queryParentAll().stream().collect(Collectors.toMap(SubIndu::getCode, SubIndu::getTitle));
         // 按行业分组
         Map<String, List<SubInfoGxj>> groupMap = list.stream()
-                .collect(Collectors.groupingBy(e -> StringUtils.defaultIfBlank(e.getIndusKind(), "未知行业")));
+                .collect(Collectors.groupingBy(e -> {
+                    if (StringUtils.isNotBlank(e.getIndusKind())){
+                        return e.getIndusKind().substring(0, 2);
+                    }
+                    return "未知行业";
+                }));
         Workbook workbook;
         if (SubInfoStatusEnum.CB.getCode().equals(queryVO.getStatus())) {
             ExportParams exportParams = new ExportParams("“四个一批”工业项目表(储备项目库)", "储备项目库", ExcelType.XSSF);
+            exportParams.setStyle(ExcelStyleUtil.class);
             exportDetail(response, exportParams, SubInfoCbVO.class, list, hyDictMap, groupMap);
         }else if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())){
             ExportParams exportParams = new ExportParams("“四个一批”工业项目表(新建项目库)","新建项目库",ExcelType.XSSF);
+            exportParams.setStyle(ExcelStyleUtil.class);
             exportDetail(response, exportParams, SubInfoXjVO.class, list, hyDictMap, groupMap);
         }else if (SubInfoStatusEnum.ZJ.getCode().equals(queryVO.getStatus())){
             ExportParams exportParams = new ExportParams("“四个一批”工业项目表(在建项目库)","在建项目库",ExcelType.XSSF);
+            exportParams.setStyle(ExcelStyleUtil.class);
             exportDetail(response, exportParams, SubInfoZjVO.class, list, hyDictMap, groupMap);
         }else if(SubInfoStatusEnum.TC.getCode().equals(queryVO.getStatus())) {
             List<SubInfoTcVO> exportList = new ArrayList<>();
@@ -918,6 +927,8 @@ public class SubInfoExportController extends BaseController {
                 index++;
             }
             ExportParams exportParams = new ExportParams("“四个一批”工业项目表(投产项目库)","投产项目库",ExcelType.XSSF);
+            exportParams.setStyle(ExcelStyleUtil.class);
+            // 设置默认样式(这里设置所有单元格都有边框)
             workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoTcVO.class, exportList);
             extracted(response, list, workbook, allSize);
         }else {
@@ -952,6 +963,7 @@ public class SubInfoExportController extends BaseController {
                 index++;
             }
             ExportParams exportParams = new ExportParams("“四个一批”工业项目表(项目总库)", "项目总库", ExcelType.XSSF);
+            exportParams.setStyle(ExcelStyleUtil.class);
             workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoZkVO.class, exportList);
             // workbook = ExcelExportUtil.exportBigExcel(exportParams, SubInfoZkVO.class, new IExcelExportServer() {
             //     /**
@@ -1071,6 +1083,15 @@ public class SubInfoExportController extends BaseController {
         cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
         return cellStyle;
     }
+    private static CellStyle createBorderStyle(Workbook workbook) {
+        CellStyle cellStyle = workbook.createCellStyle();
+        cellStyle.setBorderBottom(BorderStyle.THIN);   // 下边框
+        cellStyle.setBorderLeft(BorderStyle.THIN);     // 左边框
+        cellStyle.setBorderTop(BorderStyle.THIN);      // 上边框
+        cellStyle.setBorderRight(BorderStyle.THIN);    // 右边框
+        return cellStyle;
+    }
+
 
     private ExcelExportEntity getExcelExportEntity(String name, Object key, int width) {
         ExcelExportEntity excelExportEntity = new ExcelExportEntity(name, key, width);
@@ -1133,6 +1154,7 @@ public class SubInfoExportController extends BaseController {
 
             // 3.导出
             ExportParams exportParams = new ExportParams("哈密市“四个一批”工业项目库总体情况", "项目库总体情况", ExcelType.XSSF);
+            exportParams.setStyle(ExcelStyleUtil.class);
             Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, dataList);
             response.setContentType("application/xlsx;charset=utf-8");
             response.setHeader("Content-Disposition", "attachment; filename=" + URLEncodeUtil.encode("项目库总体情况") + System.currentTimeMillis() + ".xlsx");
@@ -1222,6 +1244,7 @@ public class SubInfoExportController extends BaseController {
                 exportData.add(new SubInfoTotalInfoVO("合计", "合计", list.size(), reduce.divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)));
                 // 4.导出
                 ExportParams exportParams = new ExportParams("项目库基本情况","项目库基本情况", ExcelType.XSSF);
+                exportParams.setStyle(ExcelStyleUtil.class);
                 int mergeTotalStartRow = exportData.size() + 1;
                 Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoTotalInfoVO.class, exportData);
                 response.setContentType("application/xlsx;charset=utf-8");

+ 176 - 0
projects/src/main/java/com/rtrh/projects/web/util/ExcelStyleUtil.java

@@ -0,0 +1,176 @@
+package com.rtrh.projects.web.util;
+
+import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
+import cn.afterturn.easypoi.excel.entity.params.ExcelForEachParams;
+import cn.afterturn.easypoi.excel.export.styler.IExcelExportStyler;
+import org.apache.poi.ss.usermodel.*;
+
+public class ExcelStyleUtil implements IExcelExportStyler {
+    private static final short STRING_FORMAT = (short) BuiltinFormats.getBuiltinFormat("TEXT");
+    private static final short FONT_SIZE_TEN = 9;
+    private static final short FONT_SIZE_ELEVEN = 10;
+    private static final short FONT_SIZE_TWELVE = 10;
+    /**
+     * 大标题样式
+     */
+    private CellStyle headerStyle;
+    /**
+     * 每列标题样式
+     */
+    private CellStyle titleStyle;
+    /**
+     * 数据行样式
+     */
+    private CellStyle styles;
+
+    public ExcelStyleUtil(Workbook workbook) {
+        this.init(workbook);
+    }
+
+    /**
+     * 初始化样式
+     *
+     * @param workbook
+     */
+    private void init(Workbook workbook) {
+        this.headerStyle = initHeaderStyle(workbook);
+        this.titleStyle = initTitleStyle(workbook);
+        this.styles = initStyles(workbook);
+    }
+
+    /**
+     * 大标题样式
+     *
+     * @param color
+     * @return
+     */
+    @Override
+    public CellStyle getHeaderStyle(short color) {
+        return headerStyle;
+    }
+
+    /**
+     * 每列标题样式
+     *
+     * @param color
+     * @return
+     */
+    @Override
+    public CellStyle getTitleStyle(short color) {
+        return titleStyle;
+    }
+
+    /**
+     * 数据行样式
+     *
+     * @param parity 可以用来表示奇偶行
+     * @param entity 数据内容
+     * @return 样式
+     */
+    @Override
+    public CellStyle getStyles(boolean parity, ExcelExportEntity entity) {
+        return styles;
+    }
+
+    /**
+     * 获取样式方法
+     *
+     * @param dataRow 数据行
+     * @param obj     对象
+     * @param data    数据
+     */
+    @Override
+    public CellStyle getStyles(Cell cell, int dataRow, ExcelExportEntity entity, Object obj, Object data) {
+        return getStyles(true, entity);
+    }
+
+    /**
+     * 模板使用的样式设置
+     */
+    @Override
+    public CellStyle getTemplateStyles(boolean isSingle, ExcelForEachParams excelForEachParams) {
+        return null;
+    }
+
+    /**
+     * 初始化--大标题样式
+     *
+     * @param workbook
+     * @return
+     */
+    private CellStyle initHeaderStyle(Workbook workbook) {
+        CellStyle style = getBaseCellStyle(workbook);
+        style.setFont(getFont(workbook, FONT_SIZE_TWELVE, true));
+        return style;
+    }
+
+    /**
+     * 初始化--每列标题样式
+     *
+     * @param workbook
+     * @return
+     */
+    private CellStyle initTitleStyle(Workbook workbook) {
+        CellStyle style = getBaseCellStyle(workbook);
+        style.setFont(getFont(workbook, FONT_SIZE_ELEVEN, false));
+        //背景色
+        style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
+        style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+        return style;
+    }
+
+    /**
+     * 初始化--数据行样式
+     *
+     * @param workbook
+     * @return
+     */
+    private CellStyle initStyles(Workbook workbook) {
+        CellStyle style = getBaseCellStyle(workbook);
+        style.setFont(getFont(workbook, FONT_SIZE_TEN, false));
+        style.setDataFormat(STRING_FORMAT);
+        return style;
+    }
+
+    /**
+     * 基础样式
+     *
+     * @return
+     */
+    private CellStyle getBaseCellStyle(Workbook workbook) {
+        CellStyle style = workbook.createCellStyle();
+        //下边框
+        style.setBorderBottom(BorderStyle.THIN);
+        //左边框
+        style.setBorderLeft(BorderStyle.THIN);
+        //上边框
+        style.setBorderTop(BorderStyle.THIN);
+        //右边框
+        style.setBorderRight(BorderStyle.THIN);
+        //水平居中
+        style.setAlignment(HorizontalAlignment.CENTER);
+        //上下居中
+        style.setVerticalAlignment(VerticalAlignment.CENTER);
+        //设置自动换行
+        style.setWrapText(true);
+        return style;
+    }
+
+    /**
+     * 字体样式
+     *
+     * @param size   字体大小
+     * @param isBold 是否加粗
+     * @return
+     */
+    private Font getFont(Workbook workbook, short size, boolean isBold) {
+        Font font = workbook.createFont();
+        //字体样式
+        font.setFontName("宋体");
+        //是否加粗
+        font.setBold(isBold);
+        //字体大小
+        font.setFontHeightInPoints(size);
+        return font;
+    }
+}

+ 2 - 0
projects/src/main/webapp/vmodules/problem/info/preInfo.jsp

@@ -30,6 +30,8 @@
         <!-- 内容区域 -->
         <div class="right_title">
             <div class="tab-group">
+                <button class="btn btn1" :class="{active: tabActive === 1}" @click="onChangeActive(1)">储备转新建超期
+                    <span class="button-card" @click="ct('','','','','1')">{{preWarnNum}}</span></button>
                 <button class="btn btn1" :class="{active: tabActive === 1}" @click="onChangeActive(1)">前期手续办理超期
                     <span class="button-card" @click="ct('','','','','1')">{{preWarnNum}}</span></button>
                 <button class="btn btn2" :class="{active: tabActive === 3}" @click="onChangeActive(3)">项目开工超期

+ 50 - 49
projects/src/main/webapp/vmodules/subject/subInfo/editSubInfo.jsp

@@ -239,31 +239,31 @@
                     <div class="layui-row">
                         <h2 style="width: 80%;background-color: #EDE9EC;margin-bottom: 20px;margin-top: 20px">资金信息</h2>
                     </div>
-                    <div class="layui-row">
-                        <div class="layui-col-xs6 layui-col-sm6">
-                            <div class="layui-form-item">
-                                <label class="layui-form-label required"
-                                >投资类型</label>
-                                <div class="layui-input-block">
-                                    <select lay-verify="required" lay-filter="kindNature" v-model="subInfo.kindNature">
-                                        <option value="">请选择</option>
-                                        <c:forEach items="${TZXZ }" var="tz">
-                                            <option value="${tz.code }">${tz.title }</option>
-                                        </c:forEach>
-                                    </select>
-                                </div>
-                            </div>
-                        </div>
-                        <%--                        <div class="layui-col-xs6 layui-col-sm6" style="display: none;">
-                                                    <div class="layui-form-item">
-                                                        <label class="layui-form-label required" >年度计划投资金额(万元)</label>
-                                                        <div class="layui-input-block">
-                                                            <input type="number" placeholder="请输入" autocomplete="off" class="layui-input"
-                                                                   v-model="subInfo.amtYear">
-                                                        </div>
-                                                    </div>
-                                                </div>--%>
-                    </div>
+<%--                    <div class="layui-row">--%>
+<%--                        <div class="layui-col-xs6 layui-col-sm6">--%>
+<%--                            <div class="layui-form-item">--%>
+<%--                                <label class="layui-form-label required"--%>
+<%--                                >投资类型</label>--%>
+<%--                                <div class="layui-input-block">--%>
+<%--                                    <select lay-verify="required" lay-filter="kindNature" v-model="subInfo.kindNature">--%>
+<%--                                        <option value="">请选择</option>--%>
+<%--                                        <c:forEach items="${TZXZ }" var="tz">--%>
+<%--                                            <option value="${tz.code }">${tz.title }</option>--%>
+<%--                                        </c:forEach>--%>
+<%--                                    </select>--%>
+<%--                                </div>--%>
+<%--                            </div>--%>
+<%--                        </div>--%>
+<%--                        &lt;%&ndash;                        <div class="layui-col-xs6 layui-col-sm6" style="display: none;">--%>
+<%--                                                    <div class="layui-form-item">--%>
+<%--                                                        <label class="layui-form-label required" >年度计划投资金额(万元)</label>--%>
+<%--                                                        <div class="layui-input-block">--%>
+<%--                                                            <input type="number" placeholder="请输入" autocomplete="off" class="layui-input"--%>
+<%--                                                                   v-model="subInfo.amtYear">--%>
+<%--                                                        </div>--%>
+<%--                                                    </div>--%>
+<%--                                                </div>&ndash;%&gt;--%>
+<%--                    </div>--%>
                     <%--                    <div class="layui-row">
                                             <div class="layui-col-xs6 layui-col-sm6">
                                                 <div class="layui-form-item">
@@ -436,6 +436,7 @@
                                         <option value="A">A类</option>
                                         <option value="B">B类</option>
                                         <option value="C">C类</option>
+                                        <option value="D">D类</option>
                                     </select>
                                 </div>
                             </div>
@@ -482,30 +483,30 @@
                             </div>
                         </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="number" name="xjNum" id="xjNum" placeholder="请输入"
-                                           autocomplete="off"  class="layui-input"
-                                           v-model="subInfo.xjNum">
-                                </div>
-                            </div>
-                        </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="number" name="zjNum" id="zjNum" placeholder="请输入"
-                                           autocomplete="off" class="layui-input"
-                                           v-model="subInfo.zjNum">
-                                </div>
-                            </div>
-                        </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="number" name="xjNum" id="xjNum" placeholder="请输入"--%>
+<%--                                           autocomplete="off"  class="layui-input"--%>
+<%--                                           v-model="subInfo.xjNum">--%>
+<%--                                </div>--%>
+<%--                            </div>--%>
+<%--                        </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="number" name="zjNum" id="zjNum" placeholder="请输入"--%>
+<%--                                           autocomplete="off" class="layui-input"--%>
+<%--                                           v-model="subInfo.zjNum">--%>
+<%--                                </div>--%>
+<%--                            </div>--%>
+<%--                        </div>--%>
+<%--                    </div>--%>
 
                     <div class="layui-row">
                         <div class='layui-form-item'>

+ 3 - 2
projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp

@@ -201,7 +201,8 @@
         <div>
             <div class="layui-row">
                 <div style="display: flex;margin-bottom: 3px">
-                    <label class="juli" onclick="levelList('abcs','A类','')">
+<%--                    <label class="juli" onclick="levelList('abcs','A类','')">--%>
+                    <label class="juli">
                         储备项目总数
                         <span class="info-icon" title="A类项目:成熟类项目,可研或初设已编制并完成初审,达到项目等资金的进度">?</span>
                         <span class="lanse-first">{{beginRate.num}}</span>
@@ -843,7 +844,7 @@
                         {
                             field: 'amtTotal',
                             title: '计划总投资(亿元)',
-                            width: 100,
+                            width: 80,
                             templet: d => (d.amtTotal / 10000).toFixed(2) + "亿元"
                         },
                         {field: 'progress', title: '进展情况', minWidth: 300},

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

@@ -1110,7 +1110,7 @@
                         {field: 'subjectName', title: '项目所在地', width: 100},
                         {field: 'content',  title: '项目建设内容', minWidth: 300},
                         {
-                            field: 'amtTotal', title: '计划总投资(亿元)', width: 100, templet: function (d) {
+                            field: 'amtTotal', title: '计划总投资(亿元)', width: 80, templet: function (d) {
                                 return (d.amtTotal / 10000).toFixed(2) + "亿元";
                             }
                         },

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

@@ -1149,7 +1149,7 @@
                         {field: 'subjectName', title: '项目所在地', width: 100},
                         {field: 'content', title: '项目建设内容', width: 300},
                         {
-                            field: 'amtTotal',  title: '计划总投资(亿元)', width: 100, templet: function (d) {
+                            field: 'amtTotal',  title: '计划总投资(亿元)', width: 80, templet: function (d) {
                                 return (d.amtTotal / 10000).toFixed(2) + "亿元";
                             }
                         },

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

@@ -1136,7 +1136,7 @@
                         {field: 'subjectName', title: '项目所在地', minWidth: 100},
                         {field: 'content', title: '项目建设内容', minWidth: 200},
                         {
-                            field: 'amtTotal',  title: '计划总投资(亿元)', minWidth: 120, templet: function (d) {
+                            field: 'amtTotal',  title: '计划总投资(亿元)', minWidth: 80, templet: function (d) {
                                 return (d.amtTotal / 10000).toFixed(2) + "亿元";
                             }
                         },

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

@@ -1062,7 +1062,7 @@
                         {field: 'subjectName', title: '项目所在地', width: 100},
                         {field: 'content', title: '项目建设内容', minWidth: 300},
                         {
-                            field: 'amtTotal', title: '计划总投资(亿元)', width: 100, templet: function (d) {
+                            field: 'amtTotal', title: '计划总投资(亿元)', width: 80, templet: function (d) {
                                 return (d.amtTotal / 10000).toFixed(2) + "亿元";
                             }
                         },

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

@@ -1132,7 +1132,7 @@
                         {field: 'subjectName', title: '项目所在地', width: 100},
                         {field: 'content', title: '项目建设内容', minWidth: 300},
                         {
-                            field: 'amtTotal', title: '计划总投资(亿元)', width: 100, templet: function (d) {
+                            field: 'amtTotal', title: '计划总投资(亿元)', width: 80, templet: function (d) {
                                 return (d.amtTotal / 10000).toFixed(2) + "亿元";
                             }
                         },

+ 2 - 2
projects/src/main/webapp/vmodules/workBench/zr_gzt.jsp

@@ -386,11 +386,11 @@
                         </div>
                         <div>
                             <span class="title">黄灯项目数</span>
-                            <span class="num" id="yellowNum">${warningNum}</span>
+                            <span class="num" id="yellowNum">${withinNum}</span>
                         </div>
                         <div>
                             <span class="title">红灯项目数</span>
-                            <span class="num" id="redNum">${exceedNum}</span>
+                            <span class="num" id="redNum">${outsideNum}</span>
                         </div>
                     </div>
 <%--                    <div class="monthly-charts" id="charts-year-done"></div>--%>