| | |
| | | ADD COLUMN `cur_flag` int DEFAULT 0 COMMENT '无功返送(1:大于0是,-1:小于0是)'; |
| | | |
| | | ALTER TABLE `t_power_net_factor` |
| | | ADD COLUMN `node_code` varchar(50) NULL DEFAULT NULL COMMENT '节点编号'; |
| | | ADD COLUMN `node_code` varchar(50) NULL DEFAULT NULL COMMENT '节点编号'; |
| | | |
| | | -- ---------------------------- |
| | | -- 电力功率因数-发电机组实时状态 |
| | |
| | | `process` varchar(20) NULL DEFAULT NULL COMMENT '工序名称', |
| | | `sug_obj` varchar(20) NULL DEFAULT NULL COMMENT '建议对象', |
| | | `clock` varchar(20) NULL DEFAULT NULL COMMENT '查询时间', |
| | | `group_name` varchar(20) NULL DEFAULT NULL COMMENT '分组名称', |
| | | `ind_name` varchar(20) NULL DEFAULT NULL COMMENT '指标名称', |
| | | `ind_value` varchar(20) NULL DEFAULT NULL COMMENT '偏差值', |
| | | `ind_unit` varchar(20) NULL DEFAULT NULL COMMENT '单位', |
| | | `ind1_name` varchar(20) NULL DEFAULT NULL COMMENT '一级指标-偏差值-名称', |
| | | `ind1_value` varchar(20) NULL DEFAULT NULL COMMENT '一级指标-偏差值-值', |
| | | `ind1_unit` varchar(20) NULL DEFAULT NULL COMMENT '一级指标-偏差值-单位', |
| | | `ind2_name` varchar(20) NULL DEFAULT NULL COMMENT '二级指标-偏差值-名称', |
| | | `ind2_value` varchar(20) NULL DEFAULT NULL COMMENT '二级指标-偏差值-值', |
| | | `ind2_unit` varchar(20) NULL DEFAULT NULL COMMENT '二级指标-偏差值-单位', |
| | | `fac1_name` varchar(20) NULL DEFAULT NULL COMMENT '影响因素1-偏差值-名称', |
| | | `fac1_value` varchar(20) NULL DEFAULT NULL COMMENT '影响因素1-偏差值-值', |
| | | `fac1_unit` varchar(20) NULL DEFAULT NULL COMMENT '影响因素1-偏差值-单位', |
| | | `fac2_name` varchar(20) NULL DEFAULT NULL COMMENT '影响因素2-偏差值-名称', |
| | | `fac2_value` varchar(20) NULL DEFAULT NULL COMMENT '影响因素2-偏差值-值', |
| | | `fac2_unit` varchar(20) NULL DEFAULT NULL COMMENT '影响因素2-偏差值-单位', |
| | | `fac3_name` varchar(20) NULL DEFAULT NULL COMMENT '影响因素3-偏差值-名称', |
| | | `fac3_value` varchar(20) NULL DEFAULT NULL COMMENT '影响因素3-偏差值-值', |
| | | `fac3_unit` varchar(20) NULL DEFAULT NULL COMMENT '影响因素4-偏差值-单位', |
| | | `fac4_name` varchar(20) NULL DEFAULT NULL COMMENT '影响因素4-偏差值-名称', |
| | | `fac4_value` varchar(20) NULL DEFAULT NULL COMMENT '影响因素4-偏差值-值', |
| | | `fac4_unit` varchar(20) NULL DEFAULT NULL COMMENT '影响因素4-偏差值-单位', |
| | | `fac5_name` varchar(20) NULL DEFAULT NULL COMMENT '影响因素5-偏差值-名称', |
| | | `fac5_value` varchar(20) NULL DEFAULT NULL COMMENT '影响因素5-偏差值-值', |
| | | `fac5_unit` varchar(20) NULL DEFAULT NULL COMMENT '影响因素5-偏差值-单位', |
| | | `create_date` datetime COMMENT '创建时间', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | key idx_clock (clock) |
| | | ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC COMMENT '焦化工序影响因数偏差值'; |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 焦化工序-异常溯源折线图 |
| | |
| | | DROP TABLE IF EXISTS `t_coking_trace_data`; |
| | | CREATE TABLE `t_coking_trace_data` |
| | | ( |
| | | `id` varchar(36) NOT NULL COMMENT 'id', |
| | | `rel_id` varchar(36) NULL DEFAULT NULL COMMENT '关联ID', |
| | | `id` varchar(36) NOT NULL COMMENT 'id', |
| | | `rel_id` varchar(36) NULL DEFAULT NULL COMMENT '关联ID', |
| | | `process` varchar(20) NULL DEFAULT NULL COMMENT '工序名称', |
| | | `ex_obj` varchar(20) NULL DEFAULT NULL COMMENT '异常对象', |
| | | `ex_obj` varchar(20) NULL DEFAULT NULL COMMENT '异常对象', |
| | | `clock` varchar(20) NULL DEFAULT NULL COMMENT '查询时间', |
| | | `data_type` varchar(20) NULL DEFAULT NULL COMMENT '数据类型', |
| | | `point_no` varchar(20) NULL DEFAULT NULL COMMENT '异常点位编号', |
| | | `point_name` varchar(20) NULL DEFAULT NULL COMMENT '异常点位名称', |
| | | `ex_time` datetime NULL DEFAULT NULL COMMENT '异常时间', |
| | | `ex_type` varchar(200) NULL DEFAULT NULL COMMENT '异常原因', |
| | | `data_type` varchar(20) NULL DEFAULT NULL COMMENT '数据类型', |
| | | `point_no` varchar(20) NULL DEFAULT NULL COMMENT '异常点位编号', |
| | | `point_name` varchar(20) NULL DEFAULT NULL COMMENT '异常点位名称', |
| | | `ex_time` datetime NULL DEFAULT NULL COMMENT '异常时间', |
| | | `ex_type` varchar(200) NULL DEFAULT NULL COMMENT '异常原因', |
| | | `create_date` datetime COMMENT '创建时间', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | key idx_rel_id (rel_id) |
| | |
| | | -- 焦化工序-能耗整体情况 |
| | | -- ---------------------------- |
| | | DROP TABLE IF EXISTS `t_coking_overview`; |
| | | CREATE TABLE `t_coking_overview` ( |
| | | `id` varchar(36) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'id', |
| | | `rel_id` varchar(36) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '关联ID', |
| | | `process_type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '工序类型', |
| | | `sub_process_type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '子工序类型', |
| | | `clock` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '查询时间', |
| | | `steam_p` decimal(10,4) DEFAULT NULL COMMENT '蒸汽发生', |
| | | `dj_steam_p` decimal(10,4) DEFAULT NULL COMMENT '吨焦产蒸汽', |
| | | `steam_c` decimal(10,4) DEFAULT NULL COMMENT '蒸汽消耗', |
| | | `steam_only_c` decimal(10,4) DEFAULT NULL COMMENT '蒸汽单耗', |
| | | `steam_v` decimal(10,4) DEFAULT NULL COMMENT '蒸汽量', |
| | | `gas_p` decimal(10,4) DEFAULT NULL COMMENT '煤气发生', |
| | | `gas_c` decimal(10,4) DEFAULT NULL COMMENT '煤气消耗', |
| | | `power_c` decimal(10,4) DEFAULT NULL COMMENT '电力消耗', |
| | | `power_only_c` decimal(10,4) DEFAULT NULL COMMENT '电力单耗', |
| | | `power_c_standard` decimal(10,4) DEFAULT NULL COMMENT '电耗基准', |
| | | `idle_time` decimal(10,4) DEFAULT NULL COMMENT '空转时间', |
| | | `bfg_c` decimal(10,4) DEFAULT NULL COMMENT 'BFG消耗', |
| | | `cog_p` decimal(10,4) DEFAULT NULL COMMENT 'COG回收', |
| | | `cog_c` decimal(10,4) DEFAULT NULL COMMENT 'COG消耗', |
| | | `bfg_only_c` decimal(10,4) DEFAULT NULL COMMENT 'BFG单耗', |
| | | `cog_only_c` decimal(10,4) DEFAULT NULL COMMENT 'COG单耗', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `process_type_clock_unique` (`process_type`,`sub_process_type`,`clock`), |
| | | KEY `idx_rel_id` (`rel_id`) |
| | | CREATE TABLE `t_coking_overview` |
| | | ( |
| | | `id` varchar(36) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'id', |
| | | `rel_id` varchar(36) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '关联ID', |
| | | `process_type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '工序类型', |
| | | `sub_process_type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '子工序类型', |
| | | `clock` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '查询时间', |
| | | `steam_p` decimal(10, 4) DEFAULT NULL COMMENT '蒸汽发生', |
| | | `dj_steam_p` decimal(10, 4) DEFAULT NULL COMMENT '吨焦产蒸汽', |
| | | `steam_c` decimal(10, 4) DEFAULT NULL COMMENT '蒸汽消耗', |
| | | `steam_only_c` decimal(10, 4) DEFAULT NULL COMMENT '蒸汽单耗', |
| | | `steam_v` decimal(10, 4) DEFAULT NULL COMMENT '蒸汽量', |
| | | `gas_p` decimal(10, 4) DEFAULT NULL COMMENT '煤气发生', |
| | | `gas_c` decimal(10, 4) DEFAULT NULL COMMENT '煤气消耗', |
| | | `power_c` decimal(10, 4) DEFAULT NULL COMMENT '电力消耗', |
| | | `power_only_c` decimal(10, 4) DEFAULT NULL COMMENT '电力单耗', |
| | | `power_c_standard` decimal(10, 4) DEFAULT NULL COMMENT '电耗基准', |
| | | `idle_time` decimal(10, 4) DEFAULT NULL COMMENT '空转时间', |
| | | `bfg_c` decimal(10, 4) DEFAULT NULL COMMENT 'BFG消耗', |
| | | `cog_p` decimal(10, 4) DEFAULT NULL COMMENT 'COG回收', |
| | | `cog_c` decimal(10, 4) DEFAULT NULL COMMENT 'COG消耗', |
| | | `bfg_only_c` decimal(10, 4) DEFAULT NULL COMMENT 'BFG单耗', |
| | | `cog_only_c` decimal(10, 4) DEFAULT NULL COMMENT 'COG单耗', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `process_type_clock_unique` (`process_type`,`sub_process_type`,`clock`), |
| | | KEY `idx_rel_id` (`rel_id`) |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='工序概况情况'; |
| | | |
| | | -- ---------------------------- |
| | |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='月最大需量,实测需量,有功功率'; |
| | | |
| | | ALTER TABLE `t_power_demand` |
| | | ADD COLUMN `code` varchar(50) NULL DEFAULT NULL COMMENT '编号'; |
| | | ADD COLUMN `code` varchar(50) NULL DEFAULT NULL COMMENT '编号'; |
| | | |
| | | CREATE UNIQUE INDEX `idx_code` ON t_power_demand(`code`); |
| | | CREATE UNIQUE INDEX `idx_code` ON t_power_demand (`code`); |
| | | |
| | | -- ---------------------------- |
| | | -- 负荷移植-调整后的功率因数与无功倒送量 |
| | | -- ---------------------------- |
| | | CREATE TABLE `t_power_adjusted_factor` ( |
| | | `id` varchar(36) NOT NULL, |
| | | `code` varchar(50) DEFAULT NULL COMMENT '编码', |
| | | `name` varchar(50) DEFAULT NULL COMMENT '名称', |
| | | `data_type` varchar(20) NULL DEFAULT NULL COMMENT '数据类型', |
| | | `point_no` varchar(50) DEFAULT NULL COMMENT '点位', |
| | | `sort` varchar(50) DEFAULT NULL COMMENT '排序', |
| | | PRIMARY KEY (`id`), |
| | | UNIQUE key uk_code (code) |
| | | CREATE TABLE `t_power_adjusted_factor` |
| | | ( |
| | | `id` varchar(36) NOT NULL, |
| | | `code` varchar(50) DEFAULT NULL COMMENT '编码', |
| | | `name` varchar(50) DEFAULT NULL COMMENT '名称', |
| | | `data_type` varchar(20) NULL DEFAULT NULL COMMENT '数据类型', |
| | | `point_no` varchar(50) DEFAULT NULL COMMENT '点位', |
| | | `sort` varchar(50) DEFAULT NULL COMMENT '排序', |
| | | PRIMARY KEY (`id`), |
| | | UNIQUE key uk_code (code) |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='调整后的功率因数与无功倒送量'; |
| | |
| | | @GetMapping("/analy-ind/list") |
| | | @Operation(summary = "焦化总图-指标分析") |
| | | public CommonResult<List<CokingAnalyIndDTO>> getCokingAnalyIndList(@RequestParam Map<String, Object> params) { |
| | | String analyDate = (String) params.get("analyDate"); |
| | | if (StringUtils.isBlank(analyDate)) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(Calendar.MILLISECOND, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | int hour = calendar.get(Calendar.HOUR_OF_DAY); |
| | | String analyClass = ""; |
| | | if (hour >= 8 && hour < 16) { |
| | | analyDate = DateUtils.format(calendar.getTime()); |
| | | analyClass = "甲班"; |
| | | } else if (hour >= 16 && hour < 24) { |
| | | analyDate = DateUtils.format(calendar.getTime()); |
| | | analyClass = "乙班"; |
| | | } else if (hour >= 0 && hour < 8) { |
| | | calendar.add(Calendar.DAY_OF_YEAR, -1); |
| | | analyDate = DateUtils.format(calendar.getTime()); |
| | | analyClass = "丙班"; |
| | | } |
| | | params.put("analyDate", analyDate); |
| | | params.put("analyClass", analyClass); |
| | | } |
| | | List<CokingAnalyIndEntity> list = cokingAnalyIndService.list(params); |
| | | return success(ConvertUtils.sourceToTarget(list, CokingAnalyIndDTO.class)); |
| | | } |
| | |
| | | * cog单耗 |
| | | */ |
| | | private BigDecimal cogOnlyC; |
| | | |
| | | /** |
| | | * 干熄炉数 |
| | | */ |
| | | private BigDecimal gxls; |
| | | |
| | | /** |
| | | * 峰谷占比 |
| | | */ |
| | | private BigDecimal fgRatio; |
| | | } |
| | |
| | | @Schema(description = "查询时间") |
| | | private String clock; |
| | | |
| | | @Schema(description = "分组名称") |
| | | private String groupName; |
| | | @Schema(description = "一级指标-偏差值-名称") |
| | | private String ind1Name; |
| | | |
| | | @Schema(description = "指标名称") |
| | | private String indName; |
| | | @Schema(description = "一级指标-偏差值-值") |
| | | private String ind1Value; |
| | | |
| | | @Schema(description = "偏差值") |
| | | private String indValue; |
| | | @Schema(description = "一级指标-偏差值-单位") |
| | | private String ind1Unit; |
| | | |
| | | @Schema(description = "单位") |
| | | private String indUnit; |
| | | @Schema(description = "二级指标-偏差值-名称") |
| | | private String ind2Name; |
| | | |
| | | @Schema(description = "二级指标-偏差值-值") |
| | | private String ind2Value; |
| | | |
| | | @Schema(description = "二级指标-偏差值-单位") |
| | | private String ind2Unit; |
| | | |
| | | @Schema(description = "影响因素1-偏差值-名称") |
| | | private String fac1Name; |
| | | |
| | | @Schema(description = "影响因素1-偏差值-值") |
| | | private String fac1Value; |
| | | |
| | | @Schema(description = "影响因素1-偏差值-单位") |
| | | private String fac1Unit; |
| | | |
| | | @Schema(description = "影响因素2-偏差值-名称") |
| | | private String fac2Name; |
| | | |
| | | @Schema(description = "影响因素2-偏差值-值") |
| | | private String fac2Value; |
| | | |
| | | @Schema(description = "影响因素2-偏差值-单位") |
| | | private String fac2Unit; |
| | | |
| | | @Schema(description = "影响因素3-偏差值-名称") |
| | | private String fac3Name; |
| | | |
| | | @Schema(description = "影响因素3-偏差值-值") |
| | | private String fac3Value; |
| | | |
| | | @Schema(description = "影响因素3-偏差值-单位") |
| | | private String fac3Unit; |
| | | |
| | | @Schema(description = "影响因素4-偏差值-名称") |
| | | private String fac4Name; |
| | | |
| | | @Schema(description = "影响因素4-偏差值-值") |
| | | private String fac4Value; |
| | | |
| | | @Schema(description = "影响因素4-偏差值-单位") |
| | | private String fac4Unit; |
| | | |
| | | @Schema(description = "影响因素5-偏差值-名称") |
| | | private String fac5Name; |
| | | |
| | | @Schema(description = "影响因素5-偏差值-值") |
| | | private String fac5Value; |
| | | |
| | | @Schema(description = "影响因素5-偏差值-单位") |
| | | private String fac5Unit; |
| | | |
| | | @Schema(description = "创建时间") |
| | | private Date createDate; |
| | |
| | | * cog单耗 |
| | | */ |
| | | private BigDecimal cogOnlyC; |
| | | |
| | | /** |
| | | * 干熄炉数 |
| | | */ |
| | | private BigDecimal gxls; |
| | | |
| | | /** |
| | | * 峰谷占比 |
| | | */ |
| | | private BigDecimal fgRatio; |
| | | } |
| | |
| | | public class CokingTraceDeviationEntity { |
| | | |
| | | @TableId(type = IdType.ASSIGN_UUID) |
| | | private String id; |
| | | private String id; |
| | | /** |
| | | * 关联ID |
| | | */ |
| | | private String relId; |
| | | private String relId; |
| | | /** |
| | | * 工序名称 |
| | | */ |
| | | private String process; |
| | | private String process; |
| | | /** |
| | | * 建议对象 |
| | | */ |
| | |
| | | /** |
| | | * 查询时间 |
| | | */ |
| | | private String clock; |
| | | private String clock; |
| | | /** |
| | | * 分组名称 |
| | | * 一级指标-偏差值-名称 |
| | | */ |
| | | private String groupName; |
| | | private String ind1Name; |
| | | /** |
| | | * 指标名称 |
| | | * 一级指标-偏差值-值 |
| | | */ |
| | | private String indName; |
| | | private String ind1Value; |
| | | /** |
| | | * 偏差值 |
| | | * 一级指标-偏差值-单位 |
| | | */ |
| | | private String indValue; |
| | | private String ind1Unit; |
| | | |
| | | |
| | | /** |
| | | * 单位 |
| | | * 二级指标-偏差值-名称 |
| | | */ |
| | | private String indUnit; |
| | | private String ind2Name; |
| | | /** |
| | | * 二级指标-偏差值-值 |
| | | */ |
| | | private String ind2Value; |
| | | /** |
| | | * 二级指标-偏差值-单位 |
| | | */ |
| | | private String ind2Unit; |
| | | |
| | | /** |
| | | * 影响因素1-偏差值-名称 |
| | | */ |
| | | private String fac1Name; |
| | | /** |
| | | * 影响因素1-偏差值-值 |
| | | */ |
| | | private String fac1Value; |
| | | /** |
| | | * 影响因素1-偏差值-单位 |
| | | */ |
| | | private String fac1Unit; |
| | | |
| | | /** |
| | | * 影响因素2-偏差值-名称 |
| | | */ |
| | | private String fac2Name; |
| | | /** |
| | | * 影响因素2-偏差值-值 |
| | | */ |
| | | private String fac2Value; |
| | | /** |
| | | * 影响因素2-偏差值-单位 |
| | | */ |
| | | private String fac2Unit; |
| | | |
| | | /** |
| | | * 影响因素3-偏差值-名称 |
| | | */ |
| | | private String fac3Name; |
| | | /** |
| | | * 影响因素3-偏差值-值 |
| | | */ |
| | | private String fac3Value; |
| | | /** |
| | | * 影响因素3-偏差值-单位 |
| | | */ |
| | | private String fac3Unit; |
| | | |
| | | /** |
| | | * 影响因素4-偏差值-名称 |
| | | */ |
| | | private String fac4Name; |
| | | /** |
| | | * 影响因素4-偏差值-值 |
| | | */ |
| | | private String fac4Value; |
| | | /** |
| | | * 影响因素4-偏差值-单位 |
| | | */ |
| | | private String fac4Unit; |
| | | |
| | | /** |
| | | * 影响因素5-偏差值-名称 |
| | | */ |
| | | private String fac5Name; |
| | | /** |
| | | * 影响因素5-偏差值-值 |
| | | */ |
| | | private String fac5Value; |
| | | /** |
| | | * 影响因素5-偏差值-单位 |
| | | */ |
| | | private String fac5Unit; |
| | | |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createDate; |
| | | private Date createDate; |
| | | } |
| | |
| | | import com.iailab.module.ansteel.coking.entity.CokingAnalyIndEntity; |
| | | import com.iailab.module.ansteel.coking.service.CokingAnalyIndService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Override |
| | | public List<CokingAnalyIndEntity> list(Map<String, Object> params) { |
| | | String analyDate = (String) params.get("analyDate"); |
| | | String analyClass = (String) params.get("analyClass"); |
| | | QueryWrapper<CokingAnalyIndEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.orderByAsc("sort"); |
| | | queryWrapper.eq(StringUtils.isNotBlank(analyDate),"analy_date", analyDate) |
| | | .eq(StringUtils.isNotBlank(analyClass),"analy_class", analyClass) |
| | | .orderByAsc("sort"); |
| | | return cokingAnalyIndDao.selectList(queryWrapper); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | String clock = (String) params.get("clock"); |
| | | String month; |
| | | String monthStartClock; |
| | | 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); |
| | | monthStartClock = 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); |
| | | monthStartClock= DateUtils.format(c.getTime(), "yyyy-MM-dd"); |
| | | } |
| | | |
| | | // 天数据 |
| | |
| | | // 月数据 |
| | | 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", monthStartClock,clock); |
| | | 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); |
| | |
| | | @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#焦炉"), |
| | |
| | | @Resource |
| | | private CokingTraceReportService cokingTraceReportService; |
| | | @Resource |
| | | private CokingTraceChartService cokingTraceChartService; |
| | | @Resource |
| | | private CokingTraceSuggestService cokingTraceSuggestService; |
| | | @Resource |
| | | private CokingTraceDataService cokingTraceDataService; |
| | | |
| | | @Override |
| | |
| | | queryParams.setIndType(processType); |
| | | List<CokingProcessConfEntity> list = cokingProcessConfService.list(queryParams); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | logger.info("ConfLis is Empty"); |
| | | return; |
| | | logger.info("ConfList is Empty"); |
| | | continue; |
| | | } |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | |
| | | Map<String, List<CokingProcessConfEntity>> processTypeMap = list.stream().filter(e -> e.getInfoType().equals("2")).collect(Collectors.groupingBy(CokingProcessConfEntity::getExt2)); |
| | | // 结果 <子工序类型,<数据key,数据value>> |
| | | List<CokingOverviewEntity> result = new ArrayList<>(processTypeMap.size()); |
| | | List<CokingTraceDataEntity> exDatalist = new ArrayList<>(); |
| | | |
| | | for (Map.Entry<String, List<CokingProcessConfEntity>> entry : processTypeMap.entrySet()) { |
| | | Map<String,Double> values = new HashMap<>(entry.getValue().size()); |
| | |
| | | logger.info("PointNo is Empty"); |
| | | continue; |
| | | } |
| | | Double value = 0.0; |
| | | Double value = null; |
| | | switch (ProcessConfDataTypeEnum.getEumByCode(conf.getDataType())) { |
| | | case DATAPOINT: |
| | | List<String> points = new ArrayList<>(); |
| | |
| | | |
| | | } |
| | | values.put(conf.getExt1(),value); |
| | | |
| | | // 异常数据处理 |
| | | String content = null; |
| | | if (value != null) { |
| | | if (value.equals(0.0)) { |
| | | content = clock + " " + conf.getIndName() + "数据异常(数据为0)"; |
| | | }else if (value.compareTo(Double.valueOf(conf.getExt3())) > 0) { |
| | | content = clock + " " + conf.getIndName() + "数据异常(超上限)"; |
| | | }else if (value.compareTo(Double.valueOf(conf.getExt4())) < 0) { |
| | | content = clock + " " + conf.getIndName() + "数据异常(超下限)"; |
| | | } |
| | | }else { |
| | | content = clock + " " + conf.getIndName() + "数据异常(无数据)"; |
| | | } |
| | | if (StringUtils.isNotBlank(content)) { |
| | | CokingTraceDataEntity ctd = new CokingTraceDataEntity(); |
| | | ctd.setId(UUID.randomUUID().toString()); |
| | | ctd.setRelId(relId); |
| | | ctd.setProcess(ProcessTypeEnum.getEumByCode(conf.getIndType()).getReportName()); |
| | | ctd.setClock(clock); |
| | | ctd.setExObj(conf.getIndType()+"_AD"); |
| | | ctd.setExTime(calendar.getTime()); |
| | | ctd.setExType(content); |
| | | ctd.setCreateDate(new Date()); |
| | | exDatalist.add(ctd); |
| | | } |
| | | |
| | | } |
| | | CokingOverviewEntity overviewEntity = new CokingOverviewEntity(); |
| | | BeanUtil.fillBeanWithMap(values,overviewEntity,true); |
| | |
| | | cokingTraceDataService.deleteByExObj(processType, clock); |
| | | } |
| | | cokingOverviewService.insert(result); |
| | | |
| | | // 指标运行趋势 |
| | | List<CokingProcessConfEntity> indRunTrend = list.stream().filter(e -> e.getInfoType().equals("1")).collect(Collectors.toList()); |
| | | List<CokingTraceChartEntity> cokingTraceChartEntityList = new ArrayList<>(indRunTrend.size()); |
| | | // List<CokingTraceSuggestEntity> suggestEntitieList = new ArrayList<>(); |
| | | List<CokingTraceDataEntity> exDatalist = new ArrayList<>(indRunTrend.size()); |
| | | indRunTrend.forEach(e -> { |
| | | CokingTraceChartEntity cokingTraceChartEntity = new CokingTraceChartEntity(); |
| | | cokingTraceChartEntity.setRelId(relId); |
| | | cokingTraceChartEntity.setName(e.getIndName()); |
| | | cokingTraceChartEntity.setClock(clock); |
| | | cokingTraceChartEntity.setDataNo(e.getPointNo()); |
| | | cokingTraceChartEntity.setDataType(e.getDataType()); |
| | | |
| | | Calendar clone = (Calendar) calendar.clone(); |
| | | cokingTraceChartEntity.setEndTime(clone.getTime()); |
| | | if (e.getExt2().equals("month")) { |
| | | clone.add(Calendar.MONTH,-1 * Integer.parseInt(e.getExt1())); |
| | | } else if (e.getExt2().equals("day")) { |
| | | clone.add(Calendar.DAY_OF_YEAR,-1 * Integer.parseInt(e.getExt1())); |
| | | } |
| | | cokingTraceChartEntity.setStartTime(clone.getTime()); |
| | | cokingTraceChartEntity.setCreateDate(new Date()); |
| | | cokingTraceChartEntityList.add(cokingTraceChartEntity); |
| | | |
| | | // 异常数据处理 |
| | | exDatalist.addAll(handleAbnormalData(e, cokingTraceChartEntity.getStartTime(), cokingTraceChartEntity.getEndTime(),relId,clock)); |
| | | }); |
| | | cokingTraceChartService.insert(cokingTraceChartEntityList); |
| | | // cokingTraceSuggestService.insert(suggestEntitieList); |
| | | cokingTraceDataService.insertList(exDatalist); |
| | | |
| | | } |
| | | } catch (Exception ex) { |
| | | logger.error("runCokingOverviewTask运行异常",ex); |
| | | } |
| | | logger.info("runCokingOverviewTask运行完成"); |
| | | |
| | | } |
| | | |
| | | private List<CokingTraceDataEntity> handleAbnormalData(CokingProcessConfEntity e, Date startTime, Date endTime, String relId, String clock) { |
| | | List<CokingTraceDataEntity> suggestEntities = new ArrayList<>(); |
| | | switch (ProcessConfDataTypeEnum.getEumByCode(e.getDataType())) { |
| | | case DATAPOINT: |
| | | ApiPointValueQueryDTO queryDTO = new ApiPointValueQueryDTO(); |
| | | queryDTO.setPointNo(e.getPointNo()); |
| | | queryDTO.setStart(startTime); |
| | | queryDTO.setEnd(endTime); |
| | | List<ApiPointValueDTO> pointValues = dataPointApi.queryPointHistoryValue(queryDTO); |
| | | Map<Date, Double> pointValueMap = pointValues.stream().collect(Collectors.toMap(ApiPointValueDTO::getT, ApiPointValueDTO::getV, (e1, e2) -> e1)); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(startTime); |
| | | while (!calendar.getTime().after(endTime)) { |
| | | String content = null; |
| | | if (pointValueMap.containsKey(calendar.getTime())) { |
| | | Double value = pointValueMap.get(calendar.getTime()); |
| | | if (value.equals(0.0)) { |
| | | content = DateUtils.format(calendar.getTime()) + " " + e.getIndName() + "数据异常(数据为0)"; |
| | | }else if (value.compareTo(Double.valueOf(e.getExt3())) > 0) { |
| | | content = DateUtils.format(calendar.getTime()) + " " + e.getIndName() + "数据异常(超上限)"; |
| | | }else if (value.compareTo(Double.valueOf(e.getExt4())) < 0) { |
| | | content = DateUtils.format(calendar.getTime()) + " " + e.getIndName() + "数据异常(超下限)"; |
| | | } |
| | | }else { |
| | | content = DateUtils.format(calendar.getTime()) + " " + e.getIndName() + "数据异常(无数据)"; |
| | | } |
| | | if (StringUtils.isNotBlank(content)) { |
| | | CokingTraceDataEntity ctd = new CokingTraceDataEntity(); |
| | | ctd.setId(UUID.randomUUID().toString()); |
| | | ctd.setRelId(relId); |
| | | ctd.setProcess(ProcessTypeEnum.getEumByCode(e.getIndType()).getReportName()); |
| | | ctd.setClock(clock); |
| | | ctd.setExObj(e.getIndType()+"_AD"); |
| | | ctd.setExTime(calendar.getTime()); |
| | | ctd.setExType(content); |
| | | suggestEntities.add(ctd); |
| | | } |
| | | calendar.add(Calendar.DAY_OF_YEAR,1); |
| | | } |
| | | break; |
| | | case IND: |
| | | ApiIndItemQueryDTO query = new ApiIndItemQueryDTO(); |
| | | query.setItemNo(e.getPointNo()); |
| | | query.setStart(startTime); |
| | | query.setEnd(endTime); |
| | | List<ApiIndItemValueDTO> indValues = indItemApi.queryIndItemHistoryValue(query); |
| | | Map<String, Double> indValueMap = indValues.stream().collect(Collectors.toMap(ApiIndItemValueDTO::getDataTime, ind -> Double.valueOf(ind.getDataValue().toString()), (e1, e2) -> e1)); |
| | | Calendar intCalendar = Calendar.getInstance(); |
| | | intCalendar.setTime(startTime); |
| | | while (!intCalendar.getTime().after(endTime)) { |
| | | String content = null; |
| | | String time = DateUtils.format(intCalendar.getTime()); |
| | | if (indValueMap.containsKey(time)) { |
| | | Double value = indValueMap.get(time); |
| | | if (value.equals(0.0)) { |
| | | content = time + " " + e.getIndName() + "数据异常(数据为0)"; |
| | | }else if (value.compareTo(Double.valueOf(e.getExt3())) > 0) { |
| | | content = time + " " + e.getIndName() + "数据异常(超上限)"; |
| | | }else if (value.compareTo(Double.valueOf(e.getExt4())) < 0) { |
| | | content = time + " " + e.getIndName() + "数据异常(超下限)"; |
| | | } |
| | | }else { |
| | | content = time + " " + e.getIndName() + "数据异常(无数据)"; |
| | | } |
| | | if (StringUtils.isNotBlank(content)) { |
| | | CokingTraceDataEntity ctd = new CokingTraceDataEntity(); |
| | | ctd.setId(UUID.randomUUID().toString()); |
| | | ctd.setRelId(relId); |
| | | ctd.setProcess(ProcessTypeEnum.getEumByCode(e.getIndType()).getReportName()); |
| | | ctd.setClock(clock); |
| | | ctd.setExObj(e.getIndType()+"_AD"); |
| | | ctd.setExTime(intCalendar.getTime()); |
| | | ctd.setExType(content); |
| | | suggestEntities.add(ctd); |
| | | // suggestEntities.add(new CokingTraceSuggestEntity(UUID.randomUUID().toString(),relId,ProcessTypeEnum.getEumByCode(e.getIndType()).getReportName(),e.getIndType()+"_AD",clock,content,new Date())); |
| | | } |
| | | intCalendar.add(Calendar.DAY_OF_YEAR,1); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | |
| | | } |
| | | return suggestEntities; |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | |
| | | private final static String indType = "备煤工序异常溯源"; |
| | | |
| | | private final static String coalRow = "coalRow"; |
| | | |
| | | private static final HashMap<String, Object> coalColoumMap = new HashMap<String, Object>() {{ |
| | | put("coalColoum0", "一级指标-偏差值"); |
| | | put("coalColoum1", "二级指标-偏差值"); |
| | |
| | | "\"coalPrepElecIndex\":[[0.8,0.73],[723,608],[1782,1782],[752,743],[729,783]],\n" + |
| | | "\"coalPrepElecTotal1\":\"1#粉碎机耗电因粉碎机偏高增加220KW/h,经模型计算,建建议调整单班用煤量,预计可使粉碎机耗电量指标降低170KW/h\",\n" + |
| | | "\"coalPrepElecTotal2\":\"1#粉碎机耗电量数据异常\",\n" + |
| | | "\"coalColoum0\":[[0,450],[0,137],[0,342]],\n" + |
| | | "\"coalColoum1\":[[2,306],[3,134],[1,142]],\n" + |
| | | "\"coalColoum2\":[[4,142],[4,132],[4,349]],\n" + |
| | | "\"coalRow0\":[[0,450],[0,137],[0,342]],\n" + |
| | | "\"coalRow1\":[[0,450],[3,134],[1,142]],\n" + |
| | | "\"coalRow2\":[[4,142],[4,132],[4,349]],\n" + |
| | | "\"coalPrepElecHomePage\":[[50,42],[10,10]],\n" + |
| | | "\"coalHomeIndex\":[[90.4,90.2],[80.3,78],[103,100],[280,270]],\n" + |
| | | "\"coalIndexInfo\":\"2月18日甲班:备煤耗电异常\",\n" + |
| | | "\"coalErr\":\"2月18日粉碎机耗电数据异常(无数据)\"\n" + " }" + "}"; |
| | | "\"coalIndexInfo\":\"4月25日甲班:备煤耗电异常\",\n" + |
| | | "\"coalErr\":\"4月25日粉碎机耗电数据异常(无数据)\"\n" + " }" + "}"; |
| | | |
| | | @Override |
| | | public void run(String params) { |
| | |
| | | public void saveTraceDeviation(String relId, String process, String clock, JSONObject result) { |
| | | List<ChartParamDTO> list = mcsApi.getChartParamList(CommonConstant.COAL_INDEX_CHARTCODE); |
| | | Map<String, String> steamIndexMaps = list.stream().collect(Collectors.toMap(ChartParamDTO::getParamCode, e -> e.getParamName())); |
| | | for (int i = 0; i <= 2; i++) { |
| | | String coalColoum = result.get("coalColoum" + i).toString(); |
| | | if (StringUtils.isNotBlank(coalColoum)) { |
| | | JSONArray responseArr = JSON.parseArray(coalColoum); |
| | | List<CokingTraceDeviationEntity> entityList = new ArrayList<>(); |
| | | for (int j = 0; j < responseArr.size(); j++) { |
| | | JSONArray element = JSON.parseArray(responseArr.get(j).toString()); |
| | | CokingTraceDeviationEntity deviationEntity = new CokingTraceDeviationEntity(); |
| | | deviationEntity.setRelId(relId); |
| | | deviationEntity.setProcess(process); |
| | | deviationEntity.setClock(clock); |
| | | deviationEntity.setSugObj(SugObj); |
| | | deviationEntity.setGroupName(coalColoumMap.get("coalColoum" + i).toString()); |
| | | deviationEntity.setIndName(steamIndexMaps.get(element.get(0).toString())); |
| | | deviationEntity.setIndValue(element.get(1).toString()); |
| | | deviationEntity.setCreateDate(new Date()); |
| | | entityList.add(deviationEntity); |
| | | } |
| | | cokingTraceDeviationService.save(entityList); |
| | | |
| | | List<String> coalRowKeys = new ArrayList<>(); |
| | | result.forEach((key, value) -> { |
| | | if (StringUtils.isNotBlank(key) && key.contains(coalRow)) { |
| | | coalRowKeys.add(key); |
| | | } |
| | | |
| | | }); |
| | | |
| | | List<CokingTraceDeviationEntity> entityList = new ArrayList<>(); |
| | | for (String key : coalRowKeys) { |
| | | JSONArray rowArr = JSON.parseArray(result.get(key).toString()); |
| | | if (CollectionUtils.isEmpty(rowArr)) { |
| | | continue; |
| | | } |
| | | CokingTraceDeviationEntity entity = new CokingTraceDeviationEntity(); |
| | | entity.setRelId(relId); |
| | | entity.setProcess(process); |
| | | entity.setClock(clock); |
| | | entity.setSugObj(SugObj); |
| | | |
| | | entity.setInd1Name(steamIndexMaps.get(rowArr.getJSONArray(0).get(0).toString())); |
| | | entity.setInd1Value(rowArr.getJSONArray(0).get(1).toString()); |
| | | entity.setInd1Unit(""); |
| | | |
| | | entity.setInd2Name(steamIndexMaps.get(rowArr.getJSONArray(1).get(0).toString())); |
| | | entity.setInd2Value(rowArr.getJSONArray(1).get(1).toString()); |
| | | entity.setInd2Unit(""); |
| | | |
| | | if (rowArr.size() > 2) { |
| | | entity.setFac1Name(steamIndexMaps.get(rowArr.getJSONArray(2).get(0).toString())); |
| | | entity.setFac1Value(rowArr.getJSONArray(2).get(1).toString()); |
| | | entity.setFac1Unit(""); |
| | | } |
| | | if (rowArr.size() > 3) { |
| | | entity.setFac2Name(steamIndexMaps.get(rowArr.getJSONArray(3).get(0).toString())); |
| | | entity.setFac2Value(rowArr.getJSONArray(3).get(1).toString()); |
| | | entity.setFac2Unit(""); |
| | | } |
| | | if (rowArr.size() > 4) { |
| | | entity.setFac3Name(steamIndexMaps.get(rowArr.getJSONArray(4).get(0).toString())); |
| | | entity.setFac3Value(rowArr.getJSONArray(4).get(1).toString()); |
| | | entity.setFac3Unit(""); |
| | | } |
| | | if (rowArr.size() > 5) { |
| | | entity.setFac4Name(steamIndexMaps.get(rowArr.getJSONArray(5).get(0).toString())); |
| | | entity.setFac4Value(rowArr.getJSONArray(5).get(1).toString()); |
| | | entity.setFac4Unit(""); |
| | | } |
| | | if (rowArr.size() > 6) { |
| | | entity.setFac5Name(steamIndexMaps.get(rowArr.getJSONArray(6).get(0).toString())); |
| | | entity.setFac5Value(rowArr.getJSONArray(6).get(1).toString()); |
| | | entity.setFac5Unit(""); |
| | | } |
| | | entityList.add(entity); |
| | | } |
| | | |
| | | cokingTraceDeviationService.save(entityList); |
| | | } |
| | | |
| | | public void saveAnalyInd(String relId, String process, String analyDate, String analyClass, String analyContent) { |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | private CokingTraceIndService cokingTraceIndService; |
| | | |
| | | @Autowired |
| | | private CokingTraceConfService cokingTraceConfService; |
| | | |
| | | @Autowired |
| | | private McsApi mcsApi; |
| | | |
| | | @Autowired |
| | | private DataPointApi dataPointApi; |
| | | |
| | | @Autowired |
| | | private IndItemApi indItemApi; |
| | | |
| | | private final static String process = "干熄焦工序"; |
| | | |
| | | private final static String reportName = "干熄焦工序异常溯源"; |
| | | |
| | | private final static String indType = "干熄焦工序异常溯源"; |
| | | |
| | | private final static String steamRow = "steamRow"; |
| | | |
| | | private static final HashMap<String, Object> steamFirstColoumMap = new HashMap<String, Object>() {{ |
| | | put("steamFirstColoum0", "一级指标-偏差值"); |
| | | put("steamFirstColoum1", "二级指标-偏差值"); |
| | |
| | | private static final String jsonStr="{\"result\":{" + |
| | | " \"steamTotal1\":\"2#干熄焦蒸汽发生量因空气导入量偏高、锅炉入口温度偏低而减少13t,经模型计算,建议调整空气导入量,预计可使主蒸汽流量指标升高20m3/h\",\n" + |
| | | " \"steamTotal2\":\"2#干熄焦蒸汽发生量因空气导入量偏高、锅炉入口温度偏低而减少13m3/h,经模型计算,建议调整循环风机转速,预计可使主蒸汽流量指标升高32m3/h\",\n" + |
| | | " \"steamFirstColoum0\":[[14,20],[14,30],[14,35]],\n" + |
| | | " \"steamFirstColoum1\":[[10,5],[11,15],[21,20]],\n" + |
| | | " \"steamFirstColoum2\":[[74,8],[36,18],[35,34]],\n" + |
| | | " \"steamFirstColoum3\":[[24,67],[6,12],[19,21]],\n" + |
| | | " \"steamFirstColoum4\":[[21,19],[22,31],[8,42]],\n" + |
| | | " \"steamFirstColoum5\":[[11,45],[9,62],[18,34]],\n" + |
| | | " \"steamRow0\":[[14,20],[14,30],[14,35]],\n" + |
| | | " \"steamRow1\":[[10,5],[11,15],[21,20]],\n" + |
| | | " \"steamRow2\":[[74,8],[36,18],[35,34]],\n" + |
| | | " \"steamRow3\":[[24,67],[6,12],[19,21]],\n" + |
| | | " \"steamRow4\":[[21,19],[22,31],[8,42]],\n" + |
| | | " \"steamRow5\":[[11,45],[9,62],[18,34]],\n" + |
| | | " \"steamSecondColoum0\":[[14,20],[14,50],[14,13]],\n" + |
| | | " \"steamSecondColoum1\":[[11,27],[10,35],[22,16]],\n" + |
| | | " \"steamSecondColoum2\":[[36,90],[35,34],[74,55]],\n" + |
| | |
| | | " \"steamSecondColoum5\":[[9,29],[11,56],[18,61]],\n" + |
| | | " \"steamHomePage\":[[663,617],[66.5,68.9]],\n" + |
| | | " \"steamHomeIndex\":[[90.4,90.2],[80.3,78],[103,100],[280,270]],\n" + |
| | | " \"steamHomeIndexInfo\":\"2月18日甲班:干熄焦产蒸汽量异常\",\n" + |
| | | " \"steamHomeErr\":\"2月18日循环风机转速数据异常(无数据)\"}}"; |
| | | " \"steamHomeIndexInfo\":\"4月25日甲班:干熄焦产蒸汽量异常\",\n" + |
| | | " \"steamHomeErr\":\"4月25日循环风机转速数据异常(无数据)\"}}"; |
| | | |
| | | @Override |
| | | public void run(String params) { |
| | |
| | | |
| | | // 保存报告 |
| | | String analyDate = DateUtils.format(startDate); |
| | | String analyContent = result.getString("coalIndexInfo"); |
| | | String analyContent = result.getString("steamHomeIndexInfo"); |
| | | String relId = cokingTraceReportService.save(process, reportName, analyDate, analyClass, clock, analyContent); |
| | | |
| | | // 保存一级分析指标 |
| | |
| | | public void saveTraceDeviation(String relId, String process, String clock, JSONObject result) { |
| | | List<ChartParamDTO> list = mcsApi.getChartParamList(CommonConstant.STEAM_INDEX_CHARTCODE); |
| | | Map<String, String> steamIndexMaps = list.stream().collect(Collectors.toMap(ChartParamDTO::getParamCode, e -> e.getParamName())); |
| | | for(int i=0;i<=5;i++){ |
| | | String steamFirstColoum = result.get("steamFirstColoum"+i).toString(); |
| | | if(StringUtils.isNotBlank(steamFirstColoum)){ |
| | | JSONArray responseArr = JSON.parseArray(steamFirstColoum); |
| | | List<CokingTraceDeviationEntity> entityList = new ArrayList<>(); |
| | | for (int j = 0; j < responseArr.size(); j++) { |
| | | JSONArray element = JSON.parseArray(responseArr.get(j).toString()); |
| | | CokingTraceDeviationEntity deviationEntity = new CokingTraceDeviationEntity(); |
| | | deviationEntity.setRelId(relId); |
| | | deviationEntity.setProcess(process); |
| | | deviationEntity.setClock(clock); |
| | | deviationEntity.setSugObj("1#"); |
| | | deviationEntity.setGroupName(steamFirstColoumMap.get("steamFirstColoum"+i).toString()); |
| | | deviationEntity.setIndName(steamIndexMaps.get(element.get(0).toString())); |
| | | deviationEntity.setIndValue(element.get(1).toString()); |
| | | deviationEntity.setCreateDate(new Date()); |
| | | entityList.add(deviationEntity); |
| | | } |
| | | cokingTraceDeviationService.save(entityList); |
| | | |
| | | List<String> coalRowKeys = new ArrayList<>(); |
| | | result.forEach((key, value) -> { |
| | | if (StringUtils.isNotBlank(key) && key.contains(steamRow)) { |
| | | coalRowKeys.add(key); |
| | | } |
| | | } |
| | | for(int i=0;i<=5;i++){ |
| | | String steamSecondColoum = result.get("steamSecondColoum"+i).toString(); |
| | | if(StringUtils.isNotBlank(steamSecondColoum)){ |
| | | JSONArray responseArr = JSON.parseArray(steamSecondColoum); |
| | | List<CokingTraceDeviationEntity> entityList = new ArrayList<>(); |
| | | for (int j = 0; j < responseArr.size(); j++) { |
| | | JSONArray element = JSON.parseArray(responseArr.get(j).toString()); |
| | | CokingTraceDeviationEntity deviationEntity = new CokingTraceDeviationEntity(); |
| | | deviationEntity.setRelId(relId); |
| | | deviationEntity.setProcess(process); |
| | | deviationEntity.setClock(clock); |
| | | deviationEntity.setSugObj("2#"); |
| | | deviationEntity.setGroupName(steamSecondColoumMap.get("steamSecondColoum" + i).toString()); |
| | | deviationEntity.setIndName(steamIndexMaps.get(element.get(0).toString())); |
| | | deviationEntity.setIndValue(element.get(1).toString()); |
| | | deviationEntity.setCreateDate(new Date()); |
| | | entityList.add(deviationEntity); |
| | | } |
| | | cokingTraceDeviationService.save(entityList); |
| | | |
| | | }); |
| | | logger.info("coalRowKeys=" + coalRowKeys); |
| | | List<CokingTraceDeviationEntity> entityList = new ArrayList<>(); |
| | | for (String key : coalRowKeys) { |
| | | JSONArray rowArr = JSON.parseArray(result.get(key).toString()); |
| | | if (CollectionUtils.isEmpty(rowArr)) { |
| | | logger.info("rowArr is empty"); |
| | | continue; |
| | | } |
| | | CokingTraceDeviationEntity entity = new CokingTraceDeviationEntity(); |
| | | entity.setRelId(relId); |
| | | entity.setProcess(process); |
| | | entity.setClock(clock); |
| | | entity.setSugObj(""); |
| | | |
| | | entity.setInd1Name(steamIndexMaps.get(rowArr.getJSONArray(0).get(0).toString())); |
| | | entity.setInd1Value(rowArr.getJSONArray(0).get(1).toString()); |
| | | entity.setInd1Unit(""); |
| | | |
| | | entity.setInd2Name(steamIndexMaps.get(rowArr.getJSONArray(1).get(0).toString())); |
| | | entity.setInd2Value(rowArr.getJSONArray(1).get(1).toString()); |
| | | entity.setInd2Unit(""); |
| | | |
| | | if (rowArr.size() > 2) { |
| | | entity.setFac1Name(steamIndexMaps.get(rowArr.getJSONArray(2).get(0).toString())); |
| | | entity.setFac1Value(rowArr.getJSONArray(2).get(1).toString()); |
| | | entity.setFac1Unit(""); |
| | | } |
| | | if (rowArr.size() > 3) { |
| | | entity.setFac2Name(steamIndexMaps.get(rowArr.getJSONArray(3).get(0).toString())); |
| | | entity.setFac2Value(rowArr.getJSONArray(3).get(1).toString()); |
| | | entity.setFac2Unit(""); |
| | | } |
| | | if (rowArr.size() > 4) { |
| | | entity.setFac3Name(steamIndexMaps.get(rowArr.getJSONArray(4).get(0).toString())); |
| | | entity.setFac3Value(rowArr.getJSONArray(4).get(1).toString()); |
| | | entity.setFac3Unit(""); |
| | | } |
| | | if (rowArr.size() > 5) { |
| | | entity.setFac4Name(steamIndexMaps.get(rowArr.getJSONArray(5).get(0).toString())); |
| | | entity.setFac4Value(rowArr.getJSONArray(5).get(1).toString()); |
| | | entity.setFac4Unit(""); |
| | | } |
| | | if (rowArr.size() > 6) { |
| | | entity.setFac5Name(steamIndexMaps.get(rowArr.getJSONArray(6).get(0).toString())); |
| | | entity.setFac5Value(rowArr.getJSONArray(6).get(1).toString()); |
| | | entity.setFac5Unit(""); |
| | | } |
| | | entityList.add(entity); |
| | | } |
| | | |
| | | cokingTraceDeviationService.save(entityList); |
| | | } |
| | | |
| | | public void saveAnalyInd(String relId, String process, String analyDate, String analyClass, String analyContent) { |
| | |
| | | import com.iailab.module.ansteel.coking.entity.*; |
| | | import com.iailab.module.ansteel.coking.service.*; |
| | | import com.iailab.module.ansteel.common.constant.CommonConstant; |
| | | import com.iailab.module.ansteel.common.enums.ProcessConfDataTypeEnum; |
| | | import com.iailab.module.data.api.ind.IndItemApi; |
| | | import com.iailab.module.data.api.ind.dto.ApiIndItemValueDTO; |
| | | import com.iailab.module.data.api.point.DataPointApi; |
| | | import com.iailab.module.model.api.mcs.McsApi; |
| | | import com.iailab.module.model.api.mcs.dto.ChartParamDTO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | |
| | | private final static String indType = "化产工序异常溯源"; |
| | | |
| | | private final static String chemProdRow = "chemProdRow"; |
| | | |
| | | private static final HashMap<String, Object> chemProdColoumMap = new HashMap<String, Object>() {{ |
| | | put("chemProdFirstColoum0", "一级指标-偏差值"); |
| | | put("chemProdFirstColoum1", "二级指标-偏差值"); |
| | |
| | | "\"chemProdSteam\":[[33836,33925]], \n" + |
| | | "\"chemProdIndex\":[[352,355],[68,66.3],[82.5,87.6],[50.7,56.5],[73.5,73.1]],\n" + |
| | | "\"chemProdTotal\":\"蒸汽消耗量异常,当前值1342,经模型计算,指标1异常,当前值1342,建议调整指标1至区间[90,110],指标2异常,当前值1342,建议调整指标2至区间[50,80]\",\n" + |
| | | "\"chemProdFirstColoum0\":[[0,42]],\n" + " \"chemProdFirstColoum1\":[[5,1342],[7,1342],[9,1342]],\n" + |
| | | "\"chemProdFirstColoum2\":[[5,10,1342],[5,16,1342],[7,18,1342]],\n" + |
| | | "\"chemProdRow0\":[[0,42],[5,345],[2,41]],\n" + " " + |
| | | "\"chemProdRow1\":[[5,1342],[7,1342],[9,1342]],\n" + |
| | | "\"chemProdRow2\":[[5,1342],[5,1342],[7,1342]],\n" + |
| | | "\"chemProdHomePage\":[[9,1342],[9,1342]],\n" + |
| | | "\"chemProdHomeIndex\":[[90.4,90.2],[80.3,78],[103,100],[280,270]],\n" + |
| | | "\"chemProdHomeIndexInfo\":\"2月18日甲班:化产蒸汽消耗量异常\",\n" + |
| | | "\"chemProdHomeErr\":\"2月18日化产蒸汽消耗量数据异常(无数据)\"\n" + " }" + "}"; |
| | | "\"chemProdHomeIndexInfo\":\"4月25日甲班:化产蒸汽消耗量异常\",\n" + |
| | | "\"chemProdHomeErr\":\"4月25日化产蒸汽消耗量数据异常(无数据)\"\n" + " }" + "}"; |
| | | |
| | | @Override |
| | | public void run(String params) { |
| | |
| | | public void saveTraceDeviation(String relId, String process, String clock, JSONObject result) { |
| | | List<ChartParamDTO> list = mcsApi.getChartParamList(CommonConstant.CHEMPROD_INDEX_CHARTCODE); |
| | | Map<String, String> steamIndexMaps = list.stream().collect(Collectors.toMap(ChartParamDTO::getParamCode, e -> e.getParamName())); |
| | | for (int i = 0; i <= 2; i++) { |
| | | String chemProdFirstColoum = result.get("chemProdFirstColoum" + i).toString(); |
| | | if (StringUtils.isNotBlank(chemProdFirstColoum)) { |
| | | JSONArray responseArr = JSON.parseArray(chemProdFirstColoum); |
| | | List<CokingTraceDeviationEntity> cokingTraceDeviationEntities = new ArrayList<>(); |
| | | for (int j = 0; j < responseArr.size(); j++) { |
| | | JSONArray element = JSON.parseArray(responseArr.get(j).toString()); |
| | | CokingTraceDeviationEntity deviationEntity = new CokingTraceDeviationEntity(); |
| | | deviationEntity.setRelId(relId); |
| | | deviationEntity.setProcess(process); |
| | | deviationEntity.setClock(clock); |
| | | deviationEntity.setSugObj(SugObj); |
| | | deviationEntity.setGroupName(chemProdColoumMap.get("chemProdFirstColoum" + i).toString()); |
| | | deviationEntity.setIndName(steamIndexMaps.get(element.get(0).toString())); |
| | | deviationEntity.setIndValue(element.get(1).toString()); |
| | | deviationEntity.setCreateDate(new Date()); |
| | | cokingTraceDeviationEntities.add(deviationEntity); |
| | | } |
| | | cokingTraceDeviationService.save(cokingTraceDeviationEntities); |
| | | |
| | | List<String> coalRowKeys = new ArrayList<>(); |
| | | result.forEach((key, value) -> { |
| | | if (StringUtils.isNotBlank(key) && key.contains(chemProdRow)) { |
| | | coalRowKeys.add(key); |
| | | } |
| | | |
| | | }); |
| | | |
| | | List<CokingTraceDeviationEntity> entityList = new ArrayList<>(); |
| | | for (String key : coalRowKeys) { |
| | | JSONArray rowArr = JSON.parseArray(result.get(key).toString()); |
| | | if (CollectionUtils.isEmpty(rowArr)) { |
| | | continue; |
| | | } |
| | | CokingTraceDeviationEntity entity = new CokingTraceDeviationEntity(); |
| | | entity.setRelId(relId); |
| | | entity.setProcess(process); |
| | | entity.setClock(clock); |
| | | entity.setSugObj(SugObj); |
| | | |
| | | entity.setInd1Name(steamIndexMaps.get(rowArr.getJSONArray(0).get(0).toString())); |
| | | entity.setInd1Value(rowArr.getJSONArray(0).get(1).toString()); |
| | | entity.setInd1Unit(""); |
| | | |
| | | entity.setInd2Name(steamIndexMaps.get(rowArr.getJSONArray(1).get(0).toString())); |
| | | entity.setInd2Value(rowArr.getJSONArray(1).get(1).toString()); |
| | | entity.setInd2Unit(""); |
| | | |
| | | if (rowArr.size() > 2) { |
| | | entity.setFac1Name(steamIndexMaps.get(rowArr.getJSONArray(2).get(0).toString())); |
| | | entity.setFac1Value(rowArr.getJSONArray(2).get(1).toString()); |
| | | entity.setFac1Unit(""); |
| | | } |
| | | if (rowArr.size() > 3) { |
| | | entity.setFac2Name(steamIndexMaps.get(rowArr.getJSONArray(3).get(0).toString())); |
| | | entity.setFac2Value(rowArr.getJSONArray(3).get(1).toString()); |
| | | entity.setFac2Unit(""); |
| | | } |
| | | if (rowArr.size() > 4) { |
| | | entity.setFac3Name(steamIndexMaps.get(rowArr.getJSONArray(4).get(0).toString())); |
| | | entity.setFac3Value(rowArr.getJSONArray(4).get(1).toString()); |
| | | entity.setFac3Unit(""); |
| | | } |
| | | if (rowArr.size() > 5) { |
| | | entity.setFac4Name(steamIndexMaps.get(rowArr.getJSONArray(5).get(0).toString())); |
| | | entity.setFac4Value(rowArr.getJSONArray(5).get(1).toString()); |
| | | entity.setFac4Unit(""); |
| | | } |
| | | if (rowArr.size() > 6) { |
| | | entity.setFac5Name(steamIndexMaps.get(rowArr.getJSONArray(6).get(0).toString())); |
| | | entity.setFac5Value(rowArr.getJSONArray(6).get(1).toString()); |
| | | entity.setFac5Unit(""); |
| | | } |
| | | entityList.add(entity); |
| | | } |
| | | |
| | | cokingTraceDeviationService.save(entityList); |
| | | } |
| | | |
| | | public void saveAnalyInd(String relId, String process, String analyDate, String analyClass, String analyContent) { |
| | |
| | | import com.iailab.module.ansteel.coking.entity.CokingTraceSuggestEntity; |
| | | import com.iailab.module.ansteel.coking.service.*; |
| | | import com.iailab.module.ansteel.common.constant.CommonConstant; |
| | | import com.iailab.module.data.api.ind.IndItemApi; |
| | | import com.iailab.module.data.api.point.DataPointApi; |
| | | import com.iailab.module.model.api.mcs.McsApi; |
| | | import com.iailab.module.model.api.mcs.dto.ChartParamDTO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | private CokingTraceIndService cokingTraceIndService; |
| | | |
| | | @Autowired |
| | | private CokingTraceConfService cokingTraceConfService; |
| | | |
| | | @Autowired |
| | | private CokingTraceChartService cokingTraceChartService; |
| | | |
| | | @Autowired |
| | | private McsApi mcsApi; |
| | | |
| | | @Autowired |
| | | private DataPointApi dataPointApi; |
| | | |
| | | @Autowired |
| | | private IndItemApi indItemApi; |
| | | |
| | | private final static String process = "炼焦工序"; |
| | | |
| | |
| | | private final static String SugObj = "LJ"; |
| | | |
| | | private final static String indType = "炼焦工序异常溯源"; |
| | | |
| | | private final static String cokeRow = "cokeRow"; |
| | | |
| | | private static final HashMap<String, Object> cokeColoumMap = new HashMap<String, Object>() {{ |
| | | put("cokeColoum0", "一级指标-偏差值"); |
| | |
| | | "\"cokeHeat\":[3.7,3.8],\n" + " " + |
| | | "\"cokeIndex\":[[0.8,0.7],[608,608],[1440,1460],[1346,1293],[0.8,0.7],[1372,1293]],\n" + " " + |
| | | "\"cokeTotal\":\"炼焦吨焦耗热量因煤气流量偏高、煤气水分偏低而增加23,经模型计算,延建议调整煤气流量,预计可使吨焦耗热量指标降低17\",\n" + " " + |
| | | "\"cokeColoum0\":[[0,13],[0,42],[0,34]],\n" + " " + |
| | | "\"cokeColoum1\":[[13,12],[12,34],[24,42]],\n" + " " + |
| | | "\"cokeColoum2\":[[27,45],[58,42],[70,31]],\n" + " " + |
| | | "\"cokeColoum3\":[[108,56],[110,89],[185,21]],\n" + " " + |
| | | "\"cokeColoum4\":[[199,13],[200,51],[197,34]],\n" + " " + |
| | | "\"cokeColoum5\":[[147,33],[131,12],[122,13]],\n" + " " + |
| | | "\"cokeRow0\":[[0,13],[0,42],[0,34]],\n" + " " + |
| | | "\"cokeRow1\":[[13,12],[12,34],[24,42]],\n" + " " + |
| | | "\"cokeRow2\":[[27,45],[58,42],[70,31]],\n" + " " + |
| | | "\"cokeRow3\":[[18,56],[10,89],[15,21]],\n" + " " + |
| | | "\"cokeRow4\":[[19,13],[20,51],[17,34]],\n" + " " + |
| | | "\"cokeRow5\":[[47,33],[31,12],[22,13]],\n" + " " + |
| | | "\"cokeHomePage\":[[202,42],[203,13],[204,45],[205,34],[206,17]],\n" + " " + |
| | | "\"cokeHomeIndex\":[[90.4,90.2],[80.3,78],[103,100],[280,270]],\n" + " " + |
| | | "\"cokeHomeIndexInfo\":\"2月18日甲班:吨焦耗热量异常\",\n" + " " + |
| | | "\"cokeHomeErr\":\"2月18日煤气预热器前数据异常(无数据)\"\n" + " " + "}\n" + "}"; |
| | | "\"cokeHomeIndexInfo\":\"4月25日甲班:吨焦耗热量异常\",\n" + " " + |
| | | "\"cokeHomeErr\":\"4月25日煤气预热器前数据异常(无数据)\"\n" + " " + "}\n" + "}"; |
| | | |
| | | @Override |
| | | public void run(String params) { |
| | |
| | | |
| | | // 保存报告 |
| | | String analyDate = DateUtils.format(startDate); |
| | | String analyContent = result.getString("coalIndexInfo"); |
| | | String analyContent = result.getString("cokeHomeIndexInfo"); |
| | | String relId = cokingTraceReportService.save(process, reportName, analyDate, analyClass, clock, analyContent); |
| | | |
| | | // 保存一级分析指标 |
| | |
| | | public void saveTraceDeviation(String relId, String process, String clock, JSONObject result) { |
| | | List<ChartParamDTO> list = mcsApi.getChartParamList(CommonConstant.COKE_INDEX_CHARTCODE); |
| | | Map<String, String> steamIndexMaps = list.stream().collect(Collectors.toMap(ChartParamDTO::getParamCode, e -> e.getParamName())); |
| | | for (int i = 0; i <= 5; i++) { |
| | | String cokeColoum = result.get("cokeColoum" + i).toString(); |
| | | if (StringUtils.isNotBlank(cokeColoum)) { |
| | | JSONArray responseArr = JSON.parseArray(cokeColoum); |
| | | List<CokingTraceDeviationEntity> entityList = new ArrayList<>(); |
| | | for (int j = 0; j < responseArr.size(); j++) { |
| | | JSONArray element = JSON.parseArray(responseArr.get(j).toString()); |
| | | CokingTraceDeviationEntity deviationEntity = new CokingTraceDeviationEntity(); |
| | | deviationEntity.setRelId(relId); |
| | | deviationEntity.setProcess(process); |
| | | deviationEntity.setClock(clock); |
| | | deviationEntity.setSugObj(SugObj); |
| | | deviationEntity.setGroupName(cokeColoumMap.get("cokeColoum" + i).toString()); |
| | | deviationEntity.setIndName(steamIndexMaps.get(element.get(0).toString())); |
| | | deviationEntity.setIndValue(element.get(1).toString()); |
| | | deviationEntity.setCreateDate(new Date()); |
| | | entityList.add(deviationEntity); |
| | | } |
| | | cokingTraceDeviationService.save(entityList); |
| | | |
| | | List<String> coalRowKeys = new ArrayList<>(); |
| | | result.forEach((key, value) -> { |
| | | if (StringUtils.isNotBlank(key) && key.contains(cokeRow)) { |
| | | coalRowKeys.add(key); |
| | | } |
| | | |
| | | }); |
| | | |
| | | List<CokingTraceDeviationEntity> entityList = new ArrayList<>(); |
| | | for (String key : coalRowKeys) { |
| | | JSONArray rowArr = JSON.parseArray(result.get(key).toString()); |
| | | if (CollectionUtils.isEmpty(rowArr)) { |
| | | continue; |
| | | } |
| | | CokingTraceDeviationEntity entity = new CokingTraceDeviationEntity(); |
| | | entity.setRelId(relId); |
| | | entity.setProcess(process); |
| | | entity.setClock(clock); |
| | | entity.setSugObj(SugObj); |
| | | |
| | | entity.setInd1Name(steamIndexMaps.get(rowArr.getJSONArray(0).get(0).toString())); |
| | | entity.setInd1Value(rowArr.getJSONArray(0).get(1).toString()); |
| | | entity.setInd1Unit(""); |
| | | |
| | | entity.setInd2Name(steamIndexMaps.get(rowArr.getJSONArray(1).get(0).toString())); |
| | | entity.setInd2Value(rowArr.getJSONArray(1).get(1).toString()); |
| | | entity.setInd2Unit(""); |
| | | |
| | | if (rowArr.size() > 2) { |
| | | entity.setFac1Name(steamIndexMaps.get(rowArr.getJSONArray(2).get(0).toString())); |
| | | entity.setFac1Value(rowArr.getJSONArray(2).get(1).toString()); |
| | | entity.setFac1Unit(""); |
| | | } |
| | | if (rowArr.size() > 3) { |
| | | entity.setFac2Name(steamIndexMaps.get(rowArr.getJSONArray(3).get(0).toString())); |
| | | entity.setFac2Value(rowArr.getJSONArray(3).get(1).toString()); |
| | | entity.setFac2Unit(""); |
| | | } |
| | | if (rowArr.size() > 4) { |
| | | entity.setFac3Name(steamIndexMaps.get(rowArr.getJSONArray(4).get(0).toString())); |
| | | entity.setFac3Value(rowArr.getJSONArray(4).get(1).toString()); |
| | | entity.setFac3Unit(""); |
| | | } |
| | | if (rowArr.size() > 5) { |
| | | entity.setFac4Name(steamIndexMaps.get(rowArr.getJSONArray(5).get(0).toString())); |
| | | entity.setFac4Value(rowArr.getJSONArray(5).get(1).toString()); |
| | | entity.setFac4Unit(""); |
| | | } |
| | | if (rowArr.size() > 6) { |
| | | entity.setFac5Name(steamIndexMaps.get(rowArr.getJSONArray(6).get(0).toString())); |
| | | entity.setFac5Value(rowArr.getJSONArray(6).get(1).toString()); |
| | | entity.setFac5Unit(""); |
| | | } |
| | | entityList.add(entity); |
| | | } |
| | | |
| | | cokingTraceDeviationService.save(entityList); |
| | | } |
| | | |
| | | public void saveAnalyInd(String relId, String process, String analyDate, String analyClass, String analyContent) { |