鞍钢鲅鱼圈能源管控系统后端代码
dengzedong
12 小时以前 c41b7ce7452e3dc3ce15204254b2243890f07d35
焦化概况
已修改4个文件
44 ■■■■ 文件已修改
ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/dto/CokingOverviewDTO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/entity/CokingOverviewEntity.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/service/impl/CokingOverviewServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ansteel-biz/src/main/java/com/iailab/module/ansteel/common/enums/SubProcessTypeEnum.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/dto/CokingOverviewDTO.java
@@ -106,4 +106,14 @@
     * cog单耗
     */
    private BigDecimal cogOnlyC;
    /**
     * 干熄炉数
     */
    private BigDecimal gxls;
    /**
     * 峰谷占比
     */
    private BigDecimal fgRatio;
}
ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/entity/CokingOverviewEntity.java
@@ -100,4 +100,14 @@
     * cog单耗
     */
    private BigDecimal cogOnlyC;
    /**
     * 干熄炉数
     */
    private BigDecimal gxls;
    /**
     * 峰谷占比
     */
    private BigDecimal fgRatio;
}
ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/service/impl/CokingOverviewServiceImpl.java
@@ -32,15 +32,19 @@
        }
        String clock = (String) params.get("clock");
        String month;
        String monthEndClock;
        if (StringUtils.isBlank(clock)) {
            Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.DAY_OF_YEAR, -1);
            clock = DateUtils.format(calendar.getTime(), "yyyy-MM-dd");
            month = DateUtils.format(calendar.getTime(), "yyyy-MM");
            calendar.add(Calendar.DAY_OF_YEAR, -30);
            monthEndClock = DateUtils.format(calendar.getTime(), "yyyy-MM-dd");
        }else {
            Date parse = DateUtils.parse(clock, "yyyy-MM-dd");
            month = DateUtils.format(parse, "yyyy-MM");
            Calendar c = Calendar.getInstance();
            c.setTime(parse);
            c.add(Calendar.DAY_OF_YEAR, -29);
            monthEndClock = DateUtils.format(c.getTime(), "yyyy-MM-dd");
        }
        // 天数据
@@ -59,12 +63,12 @@
        // 月数据
        QueryWrapper<CokingOverviewEntity> queryWrapperMonth = new QueryWrapper<>();
        queryWrapperMonth.eq("process_type", processType);
        queryWrapperMonth.like("clock", month);
        queryWrapperMonth.select("sub_process_type","SUM(steam_p) as steam_p","SUM(dj_steam_p) as dj_steam_p","SUM(steam_c) as steam_c","SUM(steam_only_c) as steam_only_c","SUM(steam_v) as steam_v","SUM(gas_p) as gas_p","SUM(gas_c) as gas_c","SUM(power_c) as power_c","SUM(power_only_c) as power_only_c","SUM(power_c_standard) as power_c_standard","SUM(idle_time) as idle_time","SUM(bfg_c) as bfg_c","SUM(cog_p) as cog_p","SUM(cog_c) as cog_c","SUM(bfg_only_c) as bfg_only_c","SUM(cog_only_c) as cog_only_c")
        queryWrapperMonth.between("clock", clock,monthEndClock);
        queryWrapperMonth.select("sub_process_type","SUM(steam_p) as steam_p","SUM(dj_steam_p) as dj_steam_p","SUM(steam_c) as steam_c","SUM(steam_only_c) as steam_only_c","SUM(steam_v) as steam_v","SUM(gas_p) as gas_p","SUM(gas_c) as gas_c","SUM(power_c) as power_c","SUM(power_only_c) as power_only_c","SUM(power_c_standard) as power_c_standard","SUM(idle_time) as idle_time","SUM(bfg_c) as bfg_c","SUM(cog_p) as cog_p","SUM(cog_c) as cog_c","SUM(bfg_only_c) as bfg_only_c","SUM(cog_only_c) as cog_only_c","SUM(gxls) as gxls","SUM(fg_ratio) as fg_ratio")
                .groupBy("sub_process_type");
        List<CokingOverviewEntity> monthList = cokingOverviewDao.selectList(queryWrapperMonth);
        monthList.forEach(e -> e.setClock(month));
        monthList.forEach(e -> e.setClock("前30日累计"));
        List<CokingOverviewDTO> monthDTOList = ConvertUtils.sourceToTarget(monthList, CokingOverviewDTO.class);
        monthDTOList.forEach(e -> {
            e.setProcessTypeName(processName);
ansteel-biz/src/main/java/com/iailab/module/ansteel/common/enums/SubProcessTypeEnum.java
@@ -11,8 +11,12 @@
@Getter
@AllArgsConstructor
public enum SubProcessTypeEnum {
    YFSJ("YFSJ", "预粉碎机"),
    FSJ("FSJ", "粉碎机"),
    GYPD("GYPD", "高压皮带"),
    DYPD("DYPD", "低压皮带"),
    YFSJJCC("YFSJJCC", "预粉碎机及除尘"),
    FSJ1825("FSJ1825", "1825粉碎机"),
    FSJCC("FSJCC", "粉碎机除尘"),
    QTSBHD("QTSBHD", "其他设备耗电"),
    PSJ("PSJ", "破碎机"),
    JL_12("JL_12", "1#2#焦炉"),
    JL_34("JL_34", "3#4#焦炉"),