初始化
This commit is contained in:
parent
b96d8585cb
commit
6c44fdd0a1
|
|
@ -1,5 +1,5 @@
|
|||
CREATE database if NOT EXISTS `jeecg-boot` default character set utf8mb4 collate utf8mb4_unicode_ci;
|
||||
USE `jeecg-boot`;
|
||||
CREATE database if NOT EXISTS `heating` default character set utf8mb4 collate utf8mb4_unicode_ci;
|
||||
USE `heating`;
|
||||
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
|
|
|||
|
|
@ -55,6 +55,21 @@
|
|||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimubi-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!--加载hutool-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-crypto</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-json</artifactId>
|
||||
<version>5.8.26</version> <!-- 建议用最新稳定版 -->
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,173 @@
|
|||
package org.jeecg.modules.analysisrule.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.modules.analysisrule.entity.AnalysisRule;
|
||||
import org.jeecg.modules.analysisrule.service.IAnalysisRuleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: bl_analysis_rule
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Tag(name = "bl_analysis_rule")
|
||||
@RestController
|
||||
@RequestMapping("/analysisrule/analysisRule")
|
||||
@Slf4j
|
||||
public class AnalysisRuleController extends JeecgController<AnalysisRule, IAnalysisRuleService> {
|
||||
@Autowired
|
||||
private IAnalysisRuleService analysisRuleService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param analysisRule
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "bl_analysis_rule-分页列表查询")
|
||||
@Operation(summary = "bl_analysis_rule-分页列表查询", description = "bl_analysis_rule-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<AnalysisRule>> queryPageList(AnalysisRule analysisRule,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("companyId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("sourceId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("stationId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<AnalysisRule> queryWrapper = QueryGenerator.initQueryWrapper(analysisRule, req.getParameterMap(), customeRuleMap);
|
||||
queryWrapper.eq("region_type", analysisRule.getRegionType());
|
||||
Page<AnalysisRule> page = new Page<AnalysisRule>(pageNo, pageSize);
|
||||
IPage<AnalysisRule> pageList = analysisRuleService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param analysisRule
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_analysis_rule-添加")
|
||||
@Operation(summary = "bl_analysis_rule-添加", description = "bl_analysis_rule-添加")
|
||||
@RequiresPermissions("analysisrule:bl_analysis_rule:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody AnalysisRule analysisRule) {
|
||||
analysisRuleService.save(analysisRule);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param analysisRule
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_analysis_rule-编辑")
|
||||
@RequiresPermissions("analysisrule:bl_analysis_rule:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody AnalysisRule analysisRule) {
|
||||
analysisRuleService.updateById(analysisRule);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_analysis_rule-通过id删除")
|
||||
@Operation(summary = "bl_analysis_rule-通过id删除", description = "bl_analysis_rule-通过id删除")
|
||||
@RequiresPermissions("analysisrule:bl_analysis_rule:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
analysisRuleService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_analysis_rule-批量删除")
|
||||
@Operation(summary = "bl_analysis_rule-批量删除", description = "bl_analysis_rule-批量删除")
|
||||
@RequiresPermissions("analysisrule:bl_analysis_rule:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
this.analysisRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "bl_analysis_rule-通过id查询")
|
||||
@Operation(summary = "bl_analysis_rule-通过id查询", description = "bl_analysis_rule-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<AnalysisRule> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
AnalysisRule analysisRule = analysisRuleService.getById(id);
|
||||
if (analysisRule == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(analysisRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param analysisRule
|
||||
*/
|
||||
@RequiresPermissions("analysisrule:bl_analysis_rule:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, AnalysisRule analysisRule) {
|
||||
return super.exportXls(request, analysisRule, AnalysisRule.class, "bl_analysis_rule");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("analysisrule:bl_analysis_rule:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, AnalysisRule.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package org.jeecg.modules.analysisrule.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: bl_analysis_rule
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_analysis_rule")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Tag(name ="bl_analysis_rule对象", description="bl_analysis_rule")
|
||||
public class AnalysisRule implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private java.lang.Integer id;
|
||||
/**卡号*/
|
||||
@Excel(name = "卡号", width = 15)
|
||||
private java.lang.String sim;
|
||||
/**规则代码 1 2 3 4 5 */
|
||||
@Excel(name = "规则代码 1 2 3 4 5 ", width = 15)
|
||||
private java.lang.String code;
|
||||
/**规则描述 1:0141规则码 2:31字节长度 3:73字节长度 4:26字节长度 5:不解析*/
|
||||
@Excel(name = "规则描述 1:0141规则码 2:31字节长度 3:73字节长度 4:26字节长度 5:不解析", width = 15)
|
||||
private java.lang.String remarks;
|
||||
/**热力公司ID*/
|
||||
@Excel(name = "热力公司ID", width = 15, dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id")
|
||||
@Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id")
|
||||
private java.lang.String companyId;
|
||||
/**热力公司*/
|
||||
@Excel(name = "热力公司", width = 15)
|
||||
private java.lang.String conpanyName;
|
||||
/**锅炉房ID*/
|
||||
@Excel(name = "锅炉房ID", width = 15, dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id")
|
||||
@Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id")
|
||||
private java.lang.String sourceId;
|
||||
/**锅炉房*/
|
||||
@Excel(name = "锅炉房", width = 15)
|
||||
private java.lang.String sourceName;
|
||||
/**换热站ID*/
|
||||
@Excel(name = "换热站ID", width = 15, dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id")
|
||||
@Dict(dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id")
|
||||
private java.lang.String stationId;
|
||||
/**换热站*/
|
||||
@Excel(name = "换热站", width = 15)
|
||||
private java.lang.String stationName;
|
||||
/**删除标识*/
|
||||
@Excel(name = "删除标识", width = 15)
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**创建时间*/
|
||||
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date createDate;
|
||||
/**更改时间*/
|
||||
@Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date updateDate;
|
||||
/**地区类型*/
|
||||
@Excel(name = "地区类型", width = 15)
|
||||
private java.lang.String regionType;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.analysisrule.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.analysisrule.entity.AnalysisRule;
|
||||
|
||||
/**
|
||||
* @Description: bl_analysis_rule
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface AnalysisRuleMapper extends BaseMapper<AnalysisRule> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.analysisrule.mapper.AnalysisRuleMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.analysisrule.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.analysisrule.entity.AnalysisRule;
|
||||
|
||||
/**
|
||||
* @Description: bl_analysis_rule
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IAnalysisRuleService extends IService<AnalysisRule> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package org.jeecg.modules.analysisrule.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.analysisrule.entity.AnalysisRule;
|
||||
import org.jeecg.modules.analysisrule.mapper.AnalysisRuleMapper;
|
||||
import org.jeecg.modules.analysisrule.service.IAnalysisRuleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: bl_analysis_rule
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class AnalysisRuleServiceImpl extends ServiceImpl<AnalysisRuleMapper, AnalysisRule> implements IAnalysisRuleService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,147 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.heating.entity.DataExtractConfig;
|
||||
import org.jeecg.modules.heating.service.DataExtractConfigService;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
|
||||
/**
|
||||
* @Description: 数据抽取配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Tag(name="数据抽取配置")
|
||||
@RestController
|
||||
@RequestMapping("/heating/dataExtractConfig")
|
||||
@Slf4j
|
||||
public class DataExtractConfigController extends JeecgController<DataExtractConfig, DataExtractConfigService> {
|
||||
@Autowired
|
||||
private DataExtractConfigService dataExtractConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param dataExtractConfig
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "数据抽取配置-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<DataExtractConfig>> queryPageList(DataExtractConfig dataExtractConfig,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<DataExtractConfig> page = new Page<DataExtractConfig>(pageNo, pageSize);
|
||||
IPage<DataExtractConfig> pageList = dataExtractConfigService.findPage(page, dataExtractConfig);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param dataExtractConfig
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "数据抽取配置-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody DataExtractConfig dataExtractConfig) {
|
||||
dataExtractConfigService.save(dataExtractConfig);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param dataExtractConfig
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "数据抽取配置-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DataExtractConfig dataExtractConfig) {
|
||||
dataExtractConfigService.updateById(dataExtractConfig);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "数据抽取配置-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
dataExtractConfigService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "数据抽取配置-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.dataExtractConfigService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "数据抽取配置-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<DataExtractConfig> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DataExtractConfig dataExtractConfig = dataExtractConfigService.getById(id);
|
||||
if(dataExtractConfig==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(dataExtractConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param dataExtractConfig
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DataExtractConfig dataExtractConfig) {
|
||||
return super.exportXls(request, dataExtractConfig, DataExtractConfig.class, "数据抽取配置");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DataExtractConfig.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.config.JeecgBaseConfig;
|
||||
import org.jeecg.modules.heating.entity.*;
|
||||
import org.jeecg.modules.heating.service.*;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/heating/heatanalysis")
|
||||
public class HeatanalysisController extends JeecgController<Heatanalysis, HeatanalysisService> {
|
||||
@Autowired
|
||||
private HeatanalysisService heatanalysisService;
|
||||
@Resource
|
||||
private JeecgBaseConfig jeecgBaseConfig;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param heatanalysis
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(Heatanalysis heatanalysis, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
|
||||
Page<Heatanalysis> page = new Page<Heatanalysis>(pageNo, pageSize);
|
||||
IPage<Heatanalysis> pageList = heatanalysisService.findPage(page, heatanalysis);
|
||||
return Result.ok(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param heatanalysis
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/updateType", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> updateType(@RequestBody Heatanalysis heatanalysis){
|
||||
heatanalysisService.updateType(heatanalysis);
|
||||
return Result.OK("修改状态成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param heatanalysis
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/findSourceList")
|
||||
public Result<?> findSourceList(Heatanalysis heatanalysis, HttpServletRequest req) {
|
||||
List<Heatanalysis> list = heatanalysisService.findSourceList(heatanalysis);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param heatanalysis
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryList(Heatanalysis heatanalysis, HttpServletRequest req) {
|
||||
List<Heatanalysis> list = heatanalysisService.findList(heatanalysis);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param heatanalysis
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/staticList")
|
||||
public Result<?> staticList(Heatanalysis heatanalysis, HttpServletRequest req) {
|
||||
List<Heatanalysis> list = heatanalysisService.findStaticList(heatanalysis);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param heatanalysis
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/lowest")
|
||||
public Result<?> lowest(Heatanalysis heatanalysis, HttpServletRequest req) {
|
||||
List<Heatanalysis> list = heatanalysisService.lowest(heatanalysis);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param heatanalysis
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Heatanalysis heatanalysis) {
|
||||
return exportXls(request, heatanalysis, Heatanalysis.class, "网关温压监测");
|
||||
}
|
||||
|
||||
protected ModelAndView exportXls(HttpServletRequest request, Heatanalysis object, Class<Heatanalysis> clazz, String title) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<Heatanalysis> exportList = heatanalysisService.findList(object);
|
||||
//AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, clazz);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
|
||||
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询抽取一次网
|
||||
*/
|
||||
@GetMapping(value = "/onePage")
|
||||
public Result<IPage<Heatanalysis>> onePage(Heatanalysis object,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<Heatanalysis> page = new Page<Heatanalysis>(pageNo, pageSize);
|
||||
IPage<Heatanalysis> pageList = heatanalysisService.findOnePage(page, object);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询抽取二次网
|
||||
*/
|
||||
@GetMapping(value = "/twoPage")
|
||||
public Result<IPage<Heatanalysis>> twoPage(Heatanalysis object,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<Heatanalysis> page = new Page<Heatanalysis>(pageNo, pageSize);
|
||||
IPage<Heatanalysis> pageList = heatanalysisService.findTwoPage(page, object);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询抽取一次网
|
||||
*/
|
||||
@GetMapping(value = "/extractedOnePage")
|
||||
public Result<IPage<Heatanalysis>> extractedOnePage(Heatanalysis object,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<Heatanalysis> page = new Page<Heatanalysis>(pageNo, pageSize);
|
||||
IPage<Heatanalysis> pageList = heatanalysisService.findExtractedOnePage(page, object);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询抽取一次网
|
||||
*/
|
||||
@GetMapping(value = "/extractedTwoPage")
|
||||
public Result<IPage<Heatanalysis>> extractedTwoPage(Heatanalysis object,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<Heatanalysis> page = new Page<Heatanalysis>(pageNo, pageSize);
|
||||
IPage<Heatanalysis> pageList = heatanalysisService.findExtractedTwoPage(page, object);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.modules.heating.entity.HeatanalysisHistory;
|
||||
import org.jeecg.modules.heating.service.HeatanalysisHistoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/heating/heatanalysishistory")
|
||||
public class HeatanalysisHistoryController extends JeecgController<HeatanalysisHistory, HeatanalysisHistoryService> {
|
||||
@Autowired
|
||||
private HeatanalysisHistoryService service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param heatanalysisHistory
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(HeatanalysisHistory heatanalysisHistory, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "SDateStr", required = false) String SDateStr,
|
||||
@RequestParam(name = "EDateStr", required = false) String EDateStr, HttpServletRequest req) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
if(StringUtils.isNotBlank(SDateStr)){
|
||||
heatanalysisHistory.setSDate(sdf.parse(SDateStr));
|
||||
}
|
||||
if(StringUtils.isNotBlank(EDateStr)){
|
||||
heatanalysisHistory.setEDate(sdf.parse(EDateStr));
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Page<HeatanalysisHistory> page = new Page<HeatanalysisHistory>(pageNo, pageSize);
|
||||
IPage<HeatanalysisHistory> pageList = service.findPage(page, heatanalysisHistory);
|
||||
return Result.ok(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param heatanalysisHistory
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/jxpage")
|
||||
public Result<?> queryJxPageList(HeatanalysisHistory heatanalysisHistory, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "SDateStr", required = false) String SDateStr,
|
||||
@RequestParam(name = "EDateStr", required = false) String EDateStr, HttpServletRequest req) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
if(StringUtils.isNotBlank(SDateStr)){
|
||||
heatanalysisHistory.setSDate(sdf.parse(SDateStr));
|
||||
}
|
||||
if(StringUtils.isNotBlank(EDateStr)){
|
||||
heatanalysisHistory.setEDate(sdf.parse(EDateStr));
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Page<HeatanalysisHistory> page = new Page<HeatanalysisHistory>(pageNo, pageSize);
|
||||
IPage<HeatanalysisHistory> pageList = service.findJxPage(page, heatanalysisHistory);
|
||||
return Result.ok(pageList);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/queryHistoryList")
|
||||
public Result<?> queryHistoryList(HeatanalysisHistory heatanalysisHistory, HttpServletRequest req) {
|
||||
return service.findHistoryList(heatanalysisHistory);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.modules.heating.entity.Heatsource;
|
||||
import org.jeecg.modules.heating.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/heating/heatsource")
|
||||
public class HeatsourceController extends JeecgController<Heatsource, HeatsourceService> {
|
||||
|
||||
@Autowired
|
||||
private HeatsourceService heatsourceService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param heatsource
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryList(Heatsource heatsource, HttpServletRequest req) {
|
||||
//所有热源
|
||||
List<Heatsource> list = heatsourceService.findList(heatsource);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param heatsource
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "热力源-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<Heatsource>> queryPageList(Heatsource heatsource,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("companyId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("sourceName", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<Heatsource> queryWrapper = QueryGenerator.initQueryWrapper(heatsource, req.getParameterMap(),customeRuleMap);
|
||||
Page<Heatsource> page = new Page<Heatsource>(pageNo, pageSize);
|
||||
IPage<Heatsource> pageList = heatsourceService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param heatsource
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力源-添加")
|
||||
@RequiresPermissions("heating:bl_heatsource:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Heatsource heatsource) {
|
||||
heatsourceService.save(heatsource);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param heatsource
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力源-编辑")
|
||||
@RequiresPermissions("heating:bl_heatsource:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Heatsource heatsource) {
|
||||
heatsourceService.updateById(heatsource);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力源-通过id删除")
|
||||
@RequiresPermissions("heating:bl_heatsource:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
heatsourceService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力源-批量删除")
|
||||
@RequiresPermissions("heating:bl_heatsource:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.heatsourceService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "热力源-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Heatsource> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Heatsource heatsource = heatsourceService.getById(id);
|
||||
if(heatsource==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(heatsource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param heatsource
|
||||
*/
|
||||
@RequiresPermissions("heating:bl_heatsource:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Heatsource heatsource) {
|
||||
return super.exportXls(request, heatsource, Heatsource.class, "热力源");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("heating:bl_heatsource:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, Heatsource.class);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.modules.heating.entity.Heatsourcestation;
|
||||
import org.jeecg.modules.heating.service.*;
|
||||
import org.jeecg.modules.system.entity.SysDepart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/heating/heatsourcestation")
|
||||
public class HeatsourcestationController extends JeecgController<Heatsourcestation, HeatsourcestationService> {
|
||||
|
||||
@Autowired
|
||||
private HeatsourcestationService heatsourcestationService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param heatsourcestation
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryList(Heatsourcestation heatsourcestation, HttpServletRequest req) {
|
||||
//所有站点
|
||||
List<Heatsourcestation> list = heatsourcestationService.findList(heatsourcestation);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param heatsourcestation
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/companyList")
|
||||
public Result<?> companyList(Heatsourcestation heatsourcestation, HttpServletRequest req) {
|
||||
//所有站点
|
||||
List<Heatsourcestation> list = heatsourcestationService.findCompanyList(heatsourcestation);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param heatsourcestation
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/sourceList")
|
||||
public Result<?> sourceList(Heatsourcestation heatsourcestation, HttpServletRequest req) {
|
||||
//所有站点
|
||||
List<Heatsourcestation> list = heatsourcestationService.findSourceList(heatsourcestation);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param heatsourcestation
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "热力站-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<Heatsourcestation>> queryPageList(Heatsourcestation heatsourcestation,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("companyId", QueryRuleEnum.EQ);
|
||||
customeRuleMap.put("sourceId", QueryRuleEnum.EQ);
|
||||
customeRuleMap.put("stationName", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<Heatsourcestation> queryWrapper = QueryGenerator.initQueryWrapper(heatsourcestation, req.getParameterMap(),customeRuleMap);
|
||||
queryWrapper.orderByAsc("company_id");
|
||||
queryWrapper.orderByAsc("source_id");
|
||||
Page<Heatsourcestation> page = new Page<Heatsourcestation>(pageNo, pageSize);
|
||||
IPage<Heatsourcestation> pageList = heatsourcestationService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param heatsourcestation
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力站-添加")
|
||||
@RequiresPermissions("heating:bl_heatsourcestation:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Heatsourcestation heatsourcestation) {
|
||||
heatsourcestationService.save(heatsourcestation);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param heatsourcestation
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力站-编辑")
|
||||
@RequiresPermissions("heating:bl_heatsourcestation:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Heatsourcestation heatsourcestation) {
|
||||
heatsourcestationService.updateById(heatsourcestation);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力站-通过id删除")
|
||||
@RequiresPermissions("heating:bl_heatsourcestation:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
heatsourcestationService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力站-批量删除")
|
||||
@RequiresPermissions("heating:bl_heatsourcestation:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.heatsourcestationService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "热力站-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Heatsourcestation> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Heatsourcestation heatsourcestation = heatsourcestationService.getById(id);
|
||||
if(heatsourcestation==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(heatsourcestation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param heatsourcestation
|
||||
*/
|
||||
@RequiresPermissions("heating:bl_heatsourcestation:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Heatsourcestation heatsourcestation) {
|
||||
return super.exportXls(request, heatsourcestation, Heatsourcestation.class, "热力站");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("heating:bl_heatsourcestation:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, Heatsourcestation.class);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.modules.heating.entity.Markinfo;
|
||||
import org.jeecg.modules.heating.service.MarkinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/heating/markinfo")
|
||||
public class MarkinfoController extends JeecgController<Markinfo, MarkinfoService> {
|
||||
|
||||
@Autowired
|
||||
private MarkinfoService markinfoService;
|
||||
|
||||
@GetMapping(value = "/queryTree")
|
||||
public Result<?> queryTree() {
|
||||
List<Map<String, Object>> list = markinfoService.queryTree();
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param markinfo
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryList(Markinfo markinfo, HttpServletRequest req) {
|
||||
List<Markinfo> list = markinfoService.findList(markinfo);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getMarkinfo")
|
||||
public Result<?> getMarkinfo(Markinfo markinfo, HttpServletRequest req) {
|
||||
Markinfo entity = markinfoService.getMarkinfo(markinfo);
|
||||
return Result.ok(entity);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getPointInfo")
|
||||
public Result<?> getPointInfo(Markinfo markinfo, HttpServletRequest req) {
|
||||
return markinfoService.getPointInfo(markinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param markinfo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/add")
|
||||
// @RequiresPermissions("heating:bl_markinfo:add")
|
||||
public Result<String> add(@RequestBody Markinfo markinfo) {
|
||||
markinfoService.save(markinfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过经纬度删除
|
||||
*
|
||||
* @param markinfo
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping(value = "/delete")
|
||||
// @RequiresPermissions("heating:bl_markinfo:delete")
|
||||
public Result<String> delete(@RequestBody Markinfo markinfo) {
|
||||
markinfoService.delete(markinfo);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
@DeleteMapping(value = "/deleteAll")
|
||||
// @RequiresPermissions("heating:bl_markinfo:delete")
|
||||
public Result<String> deleteAll() {
|
||||
markinfoService.deleteAll();
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/sourceList")
|
||||
public Result<?> sourceList(Markinfo markinfo, HttpServletRequest req) {
|
||||
//所有热源
|
||||
List<Markinfo> list = markinfoService.sourceList(markinfo);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/stationList")
|
||||
public Result<?> stationList(Markinfo markinfo, HttpServletRequest req) {
|
||||
//所有站点
|
||||
List<Markinfo> list = markinfoService.stationList(markinfo);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,250 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.modules.heating.entity.Simconfig;
|
||||
import org.jeecg.modules.heating.service.SimconfigService;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 设备信息管理
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Tag(name="设备信息管理")
|
||||
@RestController
|
||||
@RequestMapping("/heating/simconfig")
|
||||
@Slf4j
|
||||
public class SimconfigController extends JeecgController<Simconfig, SimconfigService> {
|
||||
@Autowired
|
||||
private SimconfigService simconfigService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param simconfig
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/companyList")
|
||||
public Result<?> companyList(Simconfig simconfig, HttpServletRequest req) {
|
||||
//所有站点
|
||||
List<Simconfig> list = simconfigService.findCompanyList(simconfig);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param simconfig
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/sourceList")
|
||||
public Result<?> sourceList(Simconfig simconfig, HttpServletRequest req) {
|
||||
//所有站点
|
||||
List<Simconfig> list = simconfigService.findSourceList(simconfig);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param simconfig
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/stationList")
|
||||
public Result<?> stationList(Simconfig simconfig, HttpServletRequest req) {
|
||||
//所有站点
|
||||
List<Simconfig> list = simconfigService.findStationList(simconfig);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param simconfig
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "设备信息管理-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Simconfig>> queryPageList(Simconfig simconfig,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("companyCompanyId", QueryRuleEnum.EQ);
|
||||
customeRuleMap.put("sourceSourceId", QueryRuleEnum.EQ);
|
||||
customeRuleMap.put("stationStationId", QueryRuleEnum.EQ);
|
||||
customeRuleMap.put("code", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("sim", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<Simconfig> queryWrapper = QueryGenerator.initQueryWrapper(simconfig, req.getParameterMap(),customeRuleMap);
|
||||
queryWrapper.eq("region_type",simconfig.getRegionType());
|
||||
queryWrapper.orderByAsc("company_company_id,source_source_id,station_station_id");
|
||||
Page<Simconfig> page = new Page<Simconfig>(pageNo, pageSize);
|
||||
IPage<Simconfig> pageList = simconfigService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param simconfig
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备信息管理-添加")
|
||||
@RequiresPermissions("heating:bl_simconfig:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Simconfig simconfig) {
|
||||
String sim = simconfig.getSim();
|
||||
if(sim!=null&&!sim.equals("")){
|
||||
Simconfig entity = new Simconfig();
|
||||
entity.setSim(sim);
|
||||
List<Simconfig> list = simconfigService.findSimconfig(entity);
|
||||
if(list.size()>0){
|
||||
return Result.error("添加失败,电话号已存在!");
|
||||
}
|
||||
}
|
||||
String code = simconfig.getCode();
|
||||
if(code!=null&&!code.equals("")){
|
||||
Simconfig entity = new Simconfig();
|
||||
entity.setCode(code);
|
||||
List<Simconfig> list = simconfigService.findSimconfig(entity);
|
||||
if(list.size()>0){
|
||||
return Result.error("添加失败,设备号已存在!");
|
||||
}
|
||||
}
|
||||
simconfigService.save(simconfig);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param simconfig
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备信息管理-编辑")
|
||||
@RequiresPermissions("heating:bl_simconfig:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Simconfig simconfig) {
|
||||
String sim = simconfig.getSim();
|
||||
if(sim!=null&&!sim.equals("")){
|
||||
Simconfig entity = new Simconfig();
|
||||
entity.setSim(sim);
|
||||
entity.setId(simconfig.getId());
|
||||
List<Simconfig> list = simconfigService.findSimconfig(entity);
|
||||
if(list.size()>0){
|
||||
return Result.error("添加失败,电话号已存在!");
|
||||
}
|
||||
}
|
||||
String code = simconfig.getCode();
|
||||
if(code!=null&&!code.equals("")){
|
||||
Simconfig entity = new Simconfig();
|
||||
entity.setCode(code);
|
||||
entity.setId(simconfig.getId());
|
||||
List<Simconfig> list = simconfigService.findSimconfig(entity);
|
||||
if(list.size()>0){
|
||||
return Result.error("添加失败,设备号已存在!");
|
||||
}
|
||||
}
|
||||
simconfigService.updateById(simconfig);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备信息管理-通过id删除")
|
||||
@RequiresPermissions("heating:bl_simconfig:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
simconfigService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备信息管理-批量删除")
|
||||
@RequiresPermissions("heating:bl_simconfig:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.simconfigService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "设备信息管理-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Simconfig> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Simconfig simconfig = simconfigService.getById(id);
|
||||
if(simconfig==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(simconfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param simconfig
|
||||
*/
|
||||
@RequiresPermissions("heating:bl_simconfig:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Simconfig simconfig) {
|
||||
return super.exportXls(request, simconfig, Simconfig.class, "设备信息管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("heating:bl_simconfig:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, Simconfig.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.modules.heating.entity.Substation;
|
||||
import org.jeecg.modules.heating.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/heating/substation")
|
||||
public class SubstationController extends JeecgController<Substation, SubstationService> {
|
||||
|
||||
@Autowired
|
||||
private SubstationService substationService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param substation
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryList(Substation substation, HttpServletRequest req) {
|
||||
//所有热力分所
|
||||
List<Substation> list = substationService.findList(substation);
|
||||
return Result.ok(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
package org.jeecg.modules.heating.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.modules.heating.entity.Heatanalysis;
|
||||
import org.jeecg.modules.heating.entity.Thermalcompany;
|
||||
import org.jeecg.modules.heating.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/heating/thermalcompany")
|
||||
public class ThermalcompanyController extends JeecgController<Thermalcompany, ThermalcompanyService> {
|
||||
|
||||
@Autowired
|
||||
private ThermalcompanyService thermalcompanyService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param thermalcompany
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryList(Thermalcompany thermalcompany, HttpServletRequest req) {
|
||||
//获取所有公司
|
||||
List<Thermalcompany> list = thermalcompanyService.findList(thermalcompany);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param thermalcompany
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "热力公司-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<Thermalcompany>> queryPageList(Thermalcompany thermalcompany,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("companyType", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("companyName", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<Thermalcompany> queryWrapper = QueryGenerator.initQueryWrapper(thermalcompany, req.getParameterMap(),customeRuleMap);
|
||||
queryWrapper.eq("region_type",thermalcompany.getRegionType());
|
||||
Page<Thermalcompany> page = new Page<Thermalcompany>(pageNo, pageSize);
|
||||
IPage<Thermalcompany> pageList = thermalcompanyService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param thermalcompany
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力公司-添加")
|
||||
@RequiresPermissions("heating:bl_thermalcompany:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Thermalcompany thermalcompany) {
|
||||
thermalcompanyService.save(thermalcompany);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param thermalcompany
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力公司-编辑")
|
||||
@RequiresPermissions("heating:bl_thermalcompany:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Thermalcompany thermalcompany) {
|
||||
thermalcompanyService.updateById(thermalcompany);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力公司-通过id删除")
|
||||
@RequiresPermissions("heating:bl_thermalcompany:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
thermalcompanyService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热力公司-批量删除")
|
||||
@RequiresPermissions("heating:bl_thermalcompany:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.thermalcompanyService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "热力公司-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Thermalcompany> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Thermalcompany thermalcompany = thermalcompanyService.getById(id);
|
||||
if(thermalcompany==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(thermalcompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param thermalcompany
|
||||
*/
|
||||
@RequiresPermissions("heating:bl_thermalcompany:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Thermalcompany thermalcompany) {
|
||||
return super.exportXls(request, thermalcompany, Thermalcompany.class, "热力公司");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("heating:bl_thermalcompany:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, Thermalcompany.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>Class :数据抽取配置Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_data_extract_config")
|
||||
public class DataExtractConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String sim; //手机号
|
||||
private String onePipeSim; //一次网抽取sim卡号
|
||||
private String onePipeType; //一次网抽取类型 0无 1一次网 2二次网
|
||||
private String twoPipeSim; //二次网抽取sim卡号
|
||||
private String twoPipeType; //二次网抽取类型 0无 1一次网 2二次网
|
||||
private String flag; //是否生效 0失效 1生效
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer companyId;//热力公司
|
||||
@TableField(exist = false)
|
||||
private String company;
|
||||
@TableField(exist = false)
|
||||
private Integer sourceId;//热源站
|
||||
@TableField(exist = false)
|
||||
private String source;
|
||||
@TableField(exist = false)
|
||||
private Integer stationId;//换热站
|
||||
@TableField(exist = false)
|
||||
private String station;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer oneCompanyId;//一次网热力公司
|
||||
@TableField(exist = false)
|
||||
private String oneCompany;
|
||||
@TableField(exist = false)
|
||||
private Integer oneSourceId;//一次网热源站
|
||||
@TableField(exist = false)
|
||||
private String oneSource;
|
||||
@TableField(exist = false)
|
||||
private Integer oneStationId;//一次网换热站
|
||||
@TableField(exist = false)
|
||||
private String oneStation;
|
||||
@TableField(exist = false)
|
||||
private Integer twoCompanyId;//二次网热力公司
|
||||
@TableField(exist = false)
|
||||
private String twoCompany;
|
||||
@TableField(exist = false)
|
||||
private Integer twoSourceId;//二次网热源站
|
||||
@TableField(exist = false)
|
||||
private String twoSource;
|
||||
@TableField(exist = false)
|
||||
private Integer twoStationId;//二次网换热站
|
||||
@TableField(exist = false)
|
||||
private String twoStation;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>Class :管网温压检测Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_heatanalysis")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class Heatanalysis extends JeecgEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String createBy;
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String updateBy;
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name="热力公司", width = 15)
|
||||
private String view001Name;//公司名称
|
||||
@TableField(exist = false)
|
||||
@Excel(name="热源名称", width = 15)
|
||||
private String view002Name;//热源名称
|
||||
@TableField(exist = false)
|
||||
private String view003Name;//热源所名称
|
||||
@TableField(exist = false)
|
||||
@Excel(name="换热站名称", width = 15)
|
||||
private String view004Name;//热力站名称
|
||||
|
||||
private Integer view001; // 热力公司
|
||||
private Integer view002; // 热源站
|
||||
private String view003; // 热源所
|
||||
private String view004; // 换热站
|
||||
@Excel(name = "数据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date datatime; // 数据时间
|
||||
private Integer caveat; // caveat
|
||||
@Excel(name="一次供水温度", width = 15)
|
||||
private String view005; // 一次供水温度
|
||||
@Excel(name="一次回水温度", width = 15)
|
||||
private String view006; // 一次回水温度
|
||||
@Excel(name="一次供水压力", width = 15)
|
||||
private String view007; // 一次供水压力
|
||||
@Excel(name="一次回水压力", width = 15)
|
||||
private String view008; // 一次回水压力
|
||||
@Excel(name="二次供水温度", width = 15)
|
||||
private String view009; // 二次供水温度
|
||||
@Excel(name="二次回水温度", width = 15)
|
||||
private String view010; // 二次回水温度
|
||||
@Excel(name="二次供水压力", width = 15)
|
||||
private String view011; // 二次供水压力
|
||||
@Excel(name="二次回水压力", width = 15)
|
||||
private String view012; // 二次回水压力
|
||||
private String view013; // view013
|
||||
private String view014; // view014
|
||||
private String view015; // view015
|
||||
private String view016; // view016
|
||||
private String view017; // view017
|
||||
private String view018; // view018
|
||||
private String view019; // view019
|
||||
private String view020; // view020
|
||||
private String view021; // view021
|
||||
private String view022; // view022
|
||||
private String view023; // view023
|
||||
private String view024; // view024
|
||||
private String view025; // view025
|
||||
private String view026; // view026
|
||||
private String view027; // view027
|
||||
private String view028; // view028
|
||||
private String view029; // view029
|
||||
private String view030; // view030
|
||||
private String sim; // sim
|
||||
private String code; // code
|
||||
private Integer reportType;//数据采集类型 1设备自动上报 2定时模拟
|
||||
private String fromFlow; // 温度是否从流量取 0否 1是
|
||||
private String view031; // 流量设备SN,view031到view047全是从流量表上获取的数据
|
||||
private String view032; // 流量数据上报时间
|
||||
private String view033; // 仪表ID
|
||||
private String view034; // 数据有效标识 0无效 1有效
|
||||
private String view035; // 供水温度
|
||||
private String view036; // 回水温度
|
||||
private String view037; // 瞬时流量
|
||||
private String view038; // 正累积流量
|
||||
private String view039; // 负累积流量
|
||||
private String view040; // 净累积流量
|
||||
private String view041; // 瞬时热量
|
||||
private String view042; // 正累积热量
|
||||
private String view043; // 负累积热量
|
||||
private String view044; // 净累积热量
|
||||
private String view045; // 流体速度
|
||||
private String view046; // 流量因子
|
||||
private String view047; // 热量因子
|
||||
private Integer isExtract;//是否抽取 0否 1是
|
||||
/**地区类型*/
|
||||
@Excel(name = "地区类型", width = 15)
|
||||
private java.lang.String regionType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer isExtracted;//是否被抽取 0否 1是
|
||||
@TableField(exist = false)
|
||||
private Integer isTimeout;//是否超时 0否 1是
|
||||
|
||||
@TableField(exist = false)
|
||||
private String SDate;//开始时间
|
||||
@TableField(exist = false)
|
||||
private String EDate;//结束时间
|
||||
@TableField(exist = false)
|
||||
private String tableName;//表名字
|
||||
private String delFlag; // 删除标识
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>Class :管网温压检测Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_heatanalysis_YYMM")
|
||||
public class HeatanalysisHistory extends JeecgEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name="热力公司", width = 15)
|
||||
private String view001Name;//公司名称
|
||||
@TableField(exist = false)
|
||||
@Excel(name="热源名称", width = 15)
|
||||
private String view002Name;//热源名称
|
||||
@TableField(exist = false)
|
||||
private String view003Name;//热源所名称
|
||||
@TableField(exist = false)
|
||||
@Excel(name="换热站名称", width = 15)
|
||||
private String view004Name;//热力站名称
|
||||
|
||||
private Integer view001; // 热力公司
|
||||
private Integer view002; // 热源站
|
||||
private String view003; // 热源所
|
||||
private String view004; // 换热站
|
||||
@Excel(name = "数据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date datatime; // 数据时间
|
||||
private Integer caveat; // caveat
|
||||
@Excel(name="一次供水温度", width = 15)
|
||||
private String view005; // 一次供水温度
|
||||
@Excel(name="一次回水温度", width = 15)
|
||||
private String view006; // 一次回水温度
|
||||
@Excel(name="一次供水压力", width = 15)
|
||||
private String view007; // 一次供水压力
|
||||
@Excel(name="一次回水压力", width = 15)
|
||||
private String view008; // 一次回水压力
|
||||
@Excel(name="二次供水温度", width = 15)
|
||||
private String view009; // 二次供水温度
|
||||
@Excel(name="二次回水温度", width = 15)
|
||||
private String view010; // 二次回水温度
|
||||
@Excel(name="二次供水压力", width = 15)
|
||||
private String view011; // 二次供水压力
|
||||
@Excel(name="二次回水压力", width = 15)
|
||||
private String view012; // 二次回水压力
|
||||
private String view013; // view013
|
||||
private String view014; // view014
|
||||
private String view015; // view015
|
||||
private String view016; // view016
|
||||
private String view017; // view017
|
||||
private String view018; // view018
|
||||
private String view019; // view019
|
||||
private String view020; // view020
|
||||
private String view021; // view021
|
||||
private String view022; // view022
|
||||
private String view023; // view023
|
||||
private String view024; // view024
|
||||
private String view025; // view025
|
||||
private String view026; // view026
|
||||
private String view027; // view027
|
||||
private String view028; // view028
|
||||
private String view029; // view029
|
||||
private String view030; // view030
|
||||
private String sim; // sim
|
||||
private String code; // code
|
||||
private Integer reportType;//数据采集类型 1设备自动上报 2定时模拟
|
||||
private String fromFlow; // 温度是否从流量取 0否 1是
|
||||
private String view031; // 流量设备SN,view031到view047全是从流量表上获取的数据
|
||||
private Date view032; // 流量数据上报时间
|
||||
private String view033; // 仪表ID
|
||||
private int view034; // 数据有效标识 0无效 1有效
|
||||
private Double view035; // 供水温度
|
||||
private Double view036; // 回水温度
|
||||
private Double view037; // 瞬时流量
|
||||
private Double view038; // 正累积流量
|
||||
private Double view039; // 负累积流量
|
||||
private Double view040; // 净累积流量
|
||||
private Double view041; // 瞬时热量
|
||||
private Double view042; // 正累积热量
|
||||
private Double view043; // 负累积热量
|
||||
private Double view044; // 净累积热量
|
||||
private Double view045; // 流体速度
|
||||
private Double view046; // 流量因子
|
||||
private Double view047; // 热量因子
|
||||
private Integer isExtract;//是否抽取 0否 1是
|
||||
/**地区类型*/
|
||||
@Excel(name = "地区类型", width = 15)
|
||||
private java.lang.String regionType;
|
||||
@TableField(exist = false)
|
||||
private Date SDate;//开始时间
|
||||
@TableField(exist = false)
|
||||
private Date EDate;//结束时间
|
||||
@TableField(exist = false)
|
||||
private String tableName;//表名字
|
||||
private String delFlag; // 删除标识
|
||||
@TableField(exist = false)
|
||||
private String startDate;//开始时间
|
||||
@TableField(exist = false)
|
||||
private String endDate;//结束时间
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>Class :热源信息管理Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_heatsource")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Tag(name ="bl_heatsource对象", description="热力源")
|
||||
public class Heatsource implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**锅炉规格*/
|
||||
@Excel(name = "锅炉规格", width = 15)
|
||||
private Double boilerCapacity;
|
||||
/**锅炉类型*/
|
||||
@Excel(name = "锅炉类型", width = 15)
|
||||
@Dict(dicCode = "h_boiler_type")
|
||||
private String boilerType;
|
||||
/**联系人*/
|
||||
@Excel(name = "联系人", width = 15)
|
||||
private String dutyPeople;
|
||||
/**流量回下限*/
|
||||
@Excel(name = "流量回下限", width = 15)
|
||||
private String llcomeDown;
|
||||
/**流量回上限*/
|
||||
@Excel(name = "流量回上限", width = 15)
|
||||
private String llcomeUp;
|
||||
/**流量入下限*/
|
||||
@Excel(name = "流量入下限", width = 15)
|
||||
private String llgoDown;
|
||||
/**流量入上限*/
|
||||
@Excel(name = "流量入上限", width = 15)
|
||||
private String llgoUp;
|
||||
/**建设时间*/
|
||||
@Excel(name = "建设时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date setupTime;
|
||||
/**热源名称*/
|
||||
@Excel(name = "热源名称", width = 15)
|
||||
private String sourceName;
|
||||
/**联系电话*/
|
||||
@Excel(name = "联系电话", width = 15)
|
||||
private String sourcePhone;
|
||||
/**热源类型*/
|
||||
@Excel(name = "热源类型", width = 15)
|
||||
@Dict(dicCode = "h_source_type")
|
||||
private String sourceType;
|
||||
/**热力回下限*/
|
||||
@Excel(name = "热力回下限", width = 15)
|
||||
private String wdcomeDown;
|
||||
/**热力回上限*/
|
||||
@Excel(name = "热力回上限", width = 15)
|
||||
private String wdcomeUp;
|
||||
/**热力入下限*/
|
||||
@Excel(name = "热力入下限", width = 15)
|
||||
private String wdgoDown;
|
||||
/**热力入上限*/
|
||||
@Excel(name = "热力入上限", width = 15)
|
||||
private String wdgoUp;
|
||||
/**压力回下限*/
|
||||
@Excel(name = "压力回下限", width = 15)
|
||||
private String ylcomeDown;
|
||||
/**压力回上限*/
|
||||
@Excel(name = "压力回上限", width = 15)
|
||||
private String ylcomeUp;
|
||||
/**压力入下限*/
|
||||
@Excel(name = "压力入下限", width = 15)
|
||||
private String ylgoDown;
|
||||
/**压力入上限*/
|
||||
@Excel(name = "压力入上限", width = 15)
|
||||
private String ylgoUp;
|
||||
/**所属公司*/
|
||||
@Excel(name = "所属公司", width = 15)
|
||||
private Integer company;
|
||||
/**公司名称*/
|
||||
@Excel(name = "公司名称", width = 15)
|
||||
private String companyName;
|
||||
/**公司ID*/
|
||||
@Excel(name = "公司ID", width = 15, dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id")
|
||||
@Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id")
|
||||
private String companyId;
|
||||
@TableField(exist = false)
|
||||
private String companyNameView;//公司名称
|
||||
private String sourceImage;//热源图片
|
||||
private String treeId; //树形ID
|
||||
private String heatingArea; //供热面积
|
||||
private String residentialArea; //住宅面积
|
||||
private String noresidentialArea; //非住宅面积
|
||||
private String yearcoal; //年用煤量
|
||||
private String nowcoal; //现储煤量
|
||||
private String yearwater; //年用水量
|
||||
private String yearelectricity; //年用电量
|
||||
private String onenet; //一次网
|
||||
private String secondarynet; //二次网
|
||||
private String boilernum; //锅炉数量
|
||||
private String tonnage; //吨位
|
||||
private String tonnageTwo; //锅炉吨位2
|
||||
@TableField(exist = false)
|
||||
private String stationName;
|
||||
@TableField(exist = false)
|
||||
private String stationAddress;
|
||||
@TableField(exist = false)
|
||||
private String datatime;
|
||||
@TableField(exist = false)
|
||||
private String supplyBuild;
|
||||
@Excel(name = "删除标识", width = 15)
|
||||
@TableLogic
|
||||
private String delFlag; // 删除标识
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建时间*/
|
||||
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date createDate;
|
||||
/**更改人*/
|
||||
private String updateBy;
|
||||
/**更改时间*/
|
||||
@Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date updateDate;
|
||||
@TableField(exist = false)
|
||||
private String typeFlag; // 类型标识 1热源 2换热站
|
||||
/**地区类型*/
|
||||
@Excel(name = "地区类型", width = 15)
|
||||
private java.lang.String regionType;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>Class :热力站点管理Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_heatsourcestation")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Tag(name ="bl_heatsourcestation对象", description="热力站")
|
||||
public class Heatsourcestation implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private java.lang.Integer id;
|
||||
@Excel(name="流量回下线", width = 15)
|
||||
private Double llcomeDown; // 流量回下线
|
||||
@Excel(name="流量回上线", width = 15)
|
||||
private Double llcomeUp; // 流量回上线
|
||||
@Excel(name="流量入下线", width = 15)
|
||||
private Double llgoDown; // 流量入下线
|
||||
@Excel(name="流量入上线", width = 15)
|
||||
private Double llgoUp; // 流量入上线
|
||||
@Excel(name="热力回下线", width = 15)
|
||||
private Double wdcomeDown; // 热力回下线
|
||||
@Excel(name="热力回上线", width = 15)
|
||||
private Double wdcomeUp; // 热力回上线
|
||||
@Excel(name="热力入下线", width = 15)
|
||||
private Double wdgoDown; // 热力入下线
|
||||
@Excel(name="热力入上线", width = 15)
|
||||
private Double wdgoUp; // 热力入上线
|
||||
@Excel(name="压力回下线", width = 15)
|
||||
private Double ylcomeDown; // 压力回下线
|
||||
@Excel(name="压力回上线", width = 15)
|
||||
private Double ylcomeUp; // 压力回上线
|
||||
@Excel(name="压力入下线", width = 15)
|
||||
private Double ylgoDown; // 压力入下线
|
||||
@Excel(name="压力入上线", width = 15)
|
||||
private Double ylgoUp; // 压力入上线
|
||||
@Excel(name="联系人", width = 15)
|
||||
private String dutyPeople; // 联系人
|
||||
@Excel(name = "建设时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date setupTime;
|
||||
@Excel(name="换热站地址", width = 15)
|
||||
private String stationAddress; // 换热站地址
|
||||
@Excel(name="换热站名称", width = 15)
|
||||
private String stationName; // 换热站名称
|
||||
@Excel(name="换热站电话", width = 15)
|
||||
private String stationPhone; // 换热站电话
|
||||
@Excel(name="公司", width = 15)
|
||||
private String company; // 公司
|
||||
@Excel(name="热源", width = 15)
|
||||
private String source; // 热源
|
||||
@Excel(name="热力", width = 15)
|
||||
private String substation; // 热力
|
||||
@Excel(name="公司ID", width = 15)
|
||||
@Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id")
|
||||
private String companyId; // 公司ID
|
||||
@Excel(name="公司名称", width = 15)
|
||||
private String companyName; // 公司名称
|
||||
@Excel(name="热源ID", width = 15)
|
||||
@Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id")
|
||||
private String sourceId; // 热源ID
|
||||
@Excel(name="热源名称", width = 15)
|
||||
private String sourceName; // 热源名称
|
||||
@Excel(name="热力ID", width = 15)
|
||||
private Integer substationId; // 热力ID
|
||||
@Excel(name="热力名称", width = 15)
|
||||
private String substationName; // 热力名称
|
||||
@TableField(exist = false)
|
||||
private String sourceNameView; //热源名称
|
||||
@TableField(exist = false)
|
||||
private String companyNameView;//公司名称
|
||||
@TableField(exist = false)
|
||||
private String substationNameView;//热力分所名称
|
||||
private String sourcestationImage;//热力站图片
|
||||
private String treeId; //树形ID
|
||||
private String supplyBuild; //所供楼宇
|
||||
private String delFlag; // 删除标识
|
||||
@TableField(exist = false)
|
||||
private String typeFlag; // 类型标识 1热源 2换热站
|
||||
@TableField(exist = false)
|
||||
private String regionType; // 地区类型 城区 郊县
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>Class:地图标注信息Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_markinfo")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Tag(name ="bl_markinfo对象", description="地图标注信息")
|
||||
public class Markinfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private java.lang.String id;
|
||||
private String description; // 描述
|
||||
private String latitude; // 纬度
|
||||
private String longitude; // 经度
|
||||
private String name; // 热源的名称
|
||||
@TableField(exist = false)
|
||||
private String stationId; // 热源的id
|
||||
private String delFlag; // 删除标识
|
||||
private String typeFlag; // 类型标识 1热源 2换热站
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建时间*/
|
||||
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date createDate;
|
||||
/**更改人*/
|
||||
private String updateBy;
|
||||
/**更改时间*/
|
||||
@Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date updateDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String heatSourceId; // 热源的id
|
||||
@TableField(exist = false)
|
||||
private String heatSourceName; // 热源的名称
|
||||
|
||||
@TableField(exist = false)
|
||||
private String heatStationId; // 热站的id
|
||||
@TableField(exist = false)
|
||||
private String heatStationName; // 热站的名称
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 设备信息管理
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_simconfig")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Tag(name ="bl_simconfig对象", description="设备信息管理")
|
||||
public class Simconfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**手机号*/
|
||||
@Excel(name = "手机号", width = 15)
|
||||
private String sim;
|
||||
/**注册设备时间*/
|
||||
@Excel(name = "注册设备时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date occurtime;
|
||||
/**公司名称*/
|
||||
@Excel(name = "公司名称", width = 15)
|
||||
@Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id")
|
||||
private Integer companyCompanyId;
|
||||
@TableField(exist = false)
|
||||
private String companyId;
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
/**热源名称*/
|
||||
@Excel(name = "热源名称", width = 15)
|
||||
@Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id")
|
||||
private Integer sourceSourceId;
|
||||
@TableField(exist = false)
|
||||
private String sourceId;
|
||||
@TableField(exist = false)
|
||||
private String sourceName;
|
||||
/**换热站名称*/
|
||||
@Excel(name = "换热站名称", width = 15)
|
||||
@Dict(dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id")
|
||||
private Integer stationStationId;
|
||||
@TableField(exist = false)
|
||||
private String stationId;
|
||||
@TableField(exist = false)
|
||||
private String stationName;
|
||||
/**热力分所名称*/
|
||||
@Excel(name = "热力分所名称", width = 15)
|
||||
private Integer substationId;
|
||||
/**创建者*/
|
||||
private String createBy;
|
||||
/**创建时间*/
|
||||
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date createDate;
|
||||
/**更改者*/
|
||||
private String updateBy;
|
||||
/**更改时间*/
|
||||
@Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date updateDate;
|
||||
/**删除标识*/
|
||||
@Excel(name = "删除标识", width = 15)
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**设备代码*/
|
||||
@Excel(name = "设备代码", width = 15)
|
||||
private String code;/**地区类型*/
|
||||
@Excel(name = "地区类型", width = 15)
|
||||
private java.lang.String regionType;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
/**
|
||||
* <p>Class :热力分所管理Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_substation")
|
||||
public class Substation extends JeecgEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Excel(name="供热所地址", width = 15)
|
||||
private String addres; // 供热所地址
|
||||
@Excel(name="供热面积", width = 15)
|
||||
private String area; // 供热面积
|
||||
@Excel(name="管线长度", width = 15)
|
||||
private String conduits; // 管线长度
|
||||
@Excel(name="供热总户数", width = 15)
|
||||
private Integer doorsum; // 供热总户数
|
||||
@Excel(name="成立时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date establishedtime; // 成立时间
|
||||
@Excel(name="供热区域", width = 15)
|
||||
private String heatarea; // 供热区域
|
||||
@Excel(name="负责人", width = 15)
|
||||
private String inperson; // 负责人
|
||||
@Excel(name="供热所名称", width = 15)
|
||||
private String name; // 供热所名称
|
||||
@Excel(name="十五年以上管网", width = 15)
|
||||
private Double old15conduits; // 十五年以上管网
|
||||
@Excel(name="换热站数量", width = 15)
|
||||
private Integer stacount; // 换热站数量
|
||||
@Excel(name="供热所电话", width = 15)
|
||||
private String tel; // 供热所电话
|
||||
@Excel(name="热力公司", width = 15)
|
||||
private String company; // 热力公司
|
||||
@Excel(name="热源", width = 15)
|
||||
private Integer source; // 热源
|
||||
@Excel(name="热力公司ID", width = 15)
|
||||
private Integer companyId; // 热力公司ID
|
||||
@Excel(name="热力公司名称", width = 15)
|
||||
private String companyName; // 热力公司名称
|
||||
@Excel(name="热源ID", width = 15)
|
||||
private Integer sourceId; // 热源ID
|
||||
@Excel(name="热源名称", width = 15)
|
||||
private String sourceName; // 热源名称
|
||||
@TableField(exist = false)
|
||||
private String companyNameView; // 热力公司名称
|
||||
@TableField(exist = false)
|
||||
private String sourceNameView; // 热源名称
|
||||
private String delFlag; // 删除标识
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package org.jeecg.modules.heating.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>Class :热力公司配置Entity
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_thermalcompany")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Tag(name ="bl_thermalcompany对象", description="热力公司")
|
||||
public class Thermalcompany implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private java.lang.Integer id;
|
||||
/**换热站个数*/
|
||||
@Excel(name = "换热站个数", width = 15)
|
||||
private java.lang.Integer barterHeat;
|
||||
/**锅炉房个数*/
|
||||
@Excel(name = "锅炉房个数", width = 15)
|
||||
private java.lang.Integer boilerHouse;
|
||||
/**公司地址*/
|
||||
@Excel(name = "公司地址", width = 15)
|
||||
private java.lang.String companyAddress;
|
||||
/**公司名称*/
|
||||
@Excel(name = "公司名称", width = 15)
|
||||
private java.lang.String companyName;
|
||||
/**电话*/
|
||||
@Excel(name = "电话", width = 15)
|
||||
private java.lang.String companyPhone;
|
||||
/**公司类型*/
|
||||
@Excel(name = "公司类型", width = 15, dicCode = "h_company_type")
|
||||
@Dict(dicCode = "h_company_type")
|
||||
private java.lang.String companyType;
|
||||
/**其中直供个数*/
|
||||
@Excel(name = "其中直供个数", width = 15)
|
||||
private java.lang.Integer direct;
|
||||
/**供热总户数*/
|
||||
@Excel(name = "供热总户数", width = 15)
|
||||
private java.lang.Integer doorsum;
|
||||
/**管线长度*/
|
||||
@Excel(name = "管线长度", width = 15)
|
||||
private java.lang.Double ductLength;
|
||||
/**负责人*/
|
||||
@Excel(name = "负责人", width = 15)
|
||||
private java.lang.String dutyPeople;
|
||||
/**供热区域*/
|
||||
@Excel(name = "供热区域", width = 15)
|
||||
private java.lang.String heatArea;
|
||||
/**拥有热源*/
|
||||
@Excel(name = "拥有热源", width = 15)
|
||||
private java.lang.Integer heatSource;
|
||||
/**供热面积*/
|
||||
@Excel(name = "供热面积", width = 15)
|
||||
private java.lang.Double heatingArea;
|
||||
/**其中间供个数*/
|
||||
@Excel(name = "其中间供个数", width = 15)
|
||||
private java.lang.Integer indirect;
|
||||
/**非居民热费价格*/
|
||||
@Excel(name = "非居民热费价格", width = 15)
|
||||
private java.lang.Double nonresidentPrice;
|
||||
/**十五年以上管网*/
|
||||
@Excel(name = "十五年以上管网", width = 15)
|
||||
private java.lang.Double old15Length;
|
||||
/**居民热费价格*/
|
||||
@Excel(name = "居民热费价格", width = 15)
|
||||
private java.lang.Double residentPrice;
|
||||
/**成立时间*/
|
||||
@Excel(name = "成立时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date setupTime;
|
||||
/**创建人*/
|
||||
private java.lang.String createBy;
|
||||
/**创建时间*/
|
||||
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date createDate;
|
||||
/**更改人*/
|
||||
private java.lang.String updateBy;
|
||||
/**更改时间*/
|
||||
@Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date updateDate;
|
||||
/**删除标识*/
|
||||
@Excel(name = "删除标识", width = 15)
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**树形ID*/
|
||||
@Excel(name = "树形ID", width = 15)
|
||||
private java.lang.String treeId;
|
||||
/**排序ID*/
|
||||
@Excel(name = "排序ID", width = 15)
|
||||
private java.lang.Integer orderId;
|
||||
/**地区类型*/
|
||||
@Excel(name = "地区类型", width = 15)
|
||||
private java.lang.String regionType;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
package org.jeecg.modules.heating.job;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.heating.entity.Heatanalysis;
|
||||
import org.jeecg.modules.heating.service.HeatanalysisService;
|
||||
import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig;
|
||||
import org.jeecg.modules.waterFlowConfig.service.IBlWaterFlowConfigService;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
/**
|
||||
* 发送消息任务
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
public class FlowanalysisJob implements Job {
|
||||
|
||||
@Autowired
|
||||
private HeatanalysisService heatanalysisService;
|
||||
|
||||
@Autowired
|
||||
private IBlWaterFlowConfigService WaterFlowConfigService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
|
||||
log.info(String.format("获取热量水流量数据 ! 时间:" + DateUtils.getTimestamp()));
|
||||
QueryWrapper<BlWaterFlowConfig> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("del_flag","0");
|
||||
List<BlWaterFlowConfig> list = WaterFlowConfigService.list(queryWrapper);
|
||||
for(BlWaterFlowConfig config : list){
|
||||
try{
|
||||
String sn = config.getSn();
|
||||
String json = getWebInfo(sn);
|
||||
if(StringUtils.equals(json,"false")) continue;
|
||||
JSONObject jsonObject = new JSONObject(json);
|
||||
log.info("jsonObject:"+jsonObject);
|
||||
String success = jsonObject.getStr("success");
|
||||
if(StringUtils.equals(success,"true")){
|
||||
QueryWrapper<Heatanalysis> heatanalysisQueryWrapper = new QueryWrapper<>();
|
||||
heatanalysisQueryWrapper.eq("view031",sn);
|
||||
heatanalysisQueryWrapper.last("limit 1");
|
||||
Heatanalysis heatanalysis = heatanalysisService.getOne(heatanalysisQueryWrapper);
|
||||
if(heatanalysis != null){
|
||||
String view032_old = heatanalysis.getView032();
|
||||
String data = jsonObject.getStr("data");
|
||||
JSONObject dataObject = new JSONObject(data);
|
||||
String view032 = dataObject.getStr("logat");
|
||||
if(StringUtils.equals(view032,view032_old)){
|
||||
log.info("--------数据重复---------");
|
||||
continue;
|
||||
}
|
||||
String view033 = dataObject.getStr("ID");
|
||||
String view034 = dataObject.getStr("valid");
|
||||
String view035 = dataObject.getStr("gswd");
|
||||
String view036 = dataObject.getStr("hswd");
|
||||
String view037 = dataObject.getStr("flowRate");
|
||||
String view037_2 = dataObject.getStr("ssll");
|
||||
String view038 = dataObject.getStr("pflowAccumulator");
|
||||
String view038_2 = dataObject.getStr("zljll");
|
||||
String view039 = dataObject.getStr("nflowAccumulator");
|
||||
String view039_2 = dataObject.getStr("fljll");
|
||||
String view040 = dataObject.getStr("netflowAccumulator");
|
||||
String view040_2 = dataObject.getStr("jljll");
|
||||
String view041 = dataObject.getStr("ssrl");
|
||||
String view042 = dataObject.getStr("zljrl");
|
||||
String view043 = dataObject.getStr("fljrl");
|
||||
String view044 = dataObject.getStr("jljrl");
|
||||
String view045 = dataObject.getStr("ltsd");
|
||||
String view046 = dataObject.getStr("n");
|
||||
String view047 = dataObject.getStr("m");
|
||||
heatanalysis.setView031(sn);
|
||||
heatanalysis.setView032(view032);
|
||||
heatanalysis.setView033(view033);
|
||||
heatanalysis.setView034(view034);
|
||||
heatanalysis.setView035(view035);
|
||||
heatanalysis.setView036(view036);
|
||||
if (StringUtils.isEmpty(view037)){
|
||||
heatanalysis.setView037(view037_2);
|
||||
}else{
|
||||
heatanalysis.setView037(view037);
|
||||
}
|
||||
if (StringUtils.isEmpty(view038)){
|
||||
heatanalysis.setView038(view038_2);
|
||||
}else{
|
||||
heatanalysis.setView038(view038);
|
||||
}
|
||||
if (StringUtils.isEmpty(view039)){
|
||||
heatanalysis.setView039(view039_2);
|
||||
}else{
|
||||
heatanalysis.setView039(view039);
|
||||
}
|
||||
if (StringUtils.isEmpty(view040)){
|
||||
heatanalysis.setView040(view040_2);
|
||||
}else{
|
||||
heatanalysis.setView040(view040);
|
||||
}
|
||||
heatanalysis.setView041(view041);
|
||||
heatanalysis.setView042(view042);
|
||||
heatanalysis.setView043(view043);
|
||||
heatanalysis.setView044(view044);
|
||||
heatanalysis.setView045(view045);
|
||||
heatanalysis.setView046(view046);
|
||||
heatanalysis.setView047(view047);
|
||||
heatanalysisService.exeWater(heatanalysis);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String getWebInfo(String sn) {
|
||||
String result = "false";
|
||||
try {
|
||||
// 1. 创建URL对象
|
||||
URL url = new URL("http://49.235.190.102:8068/api/v1/feeding/snap/b501a6e0-d23f-4282-8fab-78661bf999e7/"+sn);
|
||||
|
||||
// 2. 打开连接,转换为HttpURLConnection
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
|
||||
// 3. 设置请求方法为GET
|
||||
connection.setRequestMethod("GET");
|
||||
|
||||
// 4. 可选:设置请求头(例如,指定期望的响应内容类型)
|
||||
connection.setRequestProperty("Accept", "application/json");
|
||||
|
||||
// 5. 获取响应代码
|
||||
int responseCode = connection.getResponseCode();
|
||||
System.out.println("Response Code: " + responseCode);
|
||||
|
||||
// 6. 如果响应成功(200 OK),读取响应体
|
||||
if (responseCode == HttpURLConnection.HTTP_OK) {
|
||||
// 使用BufferedReader读取输入流
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
String inputLine;
|
||||
StringBuilder response = new StringBuilder();
|
||||
|
||||
while ((inputLine = in.readLine()) != null) {
|
||||
response.append(inputLine);
|
||||
}
|
||||
in.close(); // 关闭流
|
||||
|
||||
// 打印响应结果
|
||||
log.info(String.format("获取热量水流量数据 - Response Body:" + response.toString()));
|
||||
result = response.toString();
|
||||
} else {
|
||||
log.error(String.format("获取热量水流量数据 - GET request failed."));
|
||||
result = "false";
|
||||
}
|
||||
|
||||
// 7. 断开连接
|
||||
connection.disconnect();
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
result = "false";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
package org.jeecg.modules.heating.job;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.jeecg.common.api.dto.message.MessageDTO;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.heating.entity.Heatanalysis;
|
||||
import org.jeecg.modules.heating.service.HeatanalysisService;
|
||||
import org.jeecg.modules.message.entity.SysMessage;
|
||||
import org.jeecg.modules.message.handle.enums.SendMsgStatusEnum;
|
||||
import org.jeecg.modules.message.service.ISysMessageService;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发送消息任务
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
public class HeatingReportJob implements Job {
|
||||
|
||||
@Autowired
|
||||
private HeatanalysisService heatanalysisService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
|
||||
log.info(String.format("热量上报 HeatingReportJob ! 时间:" + DateUtils.getTimestamp()));
|
||||
|
||||
String body = PsdsjApiTask.getToken();
|
||||
JSONObject jsonObjectTok = new JSONObject(body);
|
||||
if(jsonObjectTok!=null && jsonObjectTok.get("access_token")!=null && !"".equals(jsonObjectTok.get("access_token"))){
|
||||
String token = jsonObjectTok.get("access_token").toString();
|
||||
log.info("token:"+token);
|
||||
String url = "http://36.135.12.177:12101/uploadsHeatData";
|
||||
SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String SDate = sdf.format(new Date());
|
||||
String tableName = "heatanalysis_"+SDate.substring(2, 4)+SDate.substring(5, 7);
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("22423010001");//磐石市白云物业管理有限责任公司 磐石白云物业供热站 白云锅炉房
|
||||
list.add("12423011000");//磐石市北亚供热有限公司 磐石北亚供热站 北亚锅炉房
|
||||
// list.add("");//磐石市颐和供热有限责任公司 磐石颐和供热站 三兴嘉园锅炉房
|
||||
list.add("22423030004");//磐石市鼎丰供热有限责任公司 磐石鼎丰供热站 汇城国樾府小区(香格里拉
|
||||
list.add("22423013000");//磐石市冬晨供热有限公司 磐石冬晨供热站 冬晨锅炉房
|
||||
list.add("22423014000");//磐石市海达供热有限公司 磐石海达供热站 海达锅炉房
|
||||
list.add("22423001001");//磐石市红大供热有限公司 磐石红大供热站 红大锅炉房
|
||||
list.add("22423002001");//磐石市宏城供热有限公司 磐石宏城供热站 宏城锅炉房
|
||||
list.add("22423003002");//磐石市隆昌物业管理有限公司 磐石隆昌物业供热站 隆昌1处锅炉房
|
||||
list.add("22423003005");//磐石市琉森供热管理有限公司 磐石琉森供热站 隆昌二处锅炉房
|
||||
list.add("32423012001");//磐石市牟力供热有限公司 磐石牟力供热站 牟力锅炉房
|
||||
list.add("22423004000");//磐石市三兴供热有限公司 磐石三兴供热站 三兴锅炉房
|
||||
list.add("12423005000");//磐石市升旺供热有限公司 磐石升旺供热站 升旺锅炉房
|
||||
list.add("22423008001");//磐石市万达物业管理有限公司 磐石万达供热站 万达锅炉房
|
||||
list.add("22423006000");//磐石市馨达供热有限公司 磐石馨达供热站 馨达锅炉房
|
||||
list.add("22423009000");//磐石市忠信供热有限公司 磐石忠信供热站 忠信锅炉房
|
||||
list.add("22423020000");//磐石市恒升供热有限公司 磐石恒升供热站 恒升锅炉房
|
||||
// list.add("");//磐石市柏悦供热有限公司 磐石柏悦供热站
|
||||
for(String sim:list){
|
||||
Heatanalysis heatanalysis = new Heatanalysis();
|
||||
heatanalysis.setSim(sim);
|
||||
heatanalysis.setTableName(tableName);
|
||||
Heatanalysis heatanalysis2 = heatanalysisService.getHeatOne(heatanalysis);
|
||||
String CompanyName = "";
|
||||
String HeatName = "";
|
||||
// if("1111111111".equals(sim)){
|
||||
if("22423010001".equals(sim)){
|
||||
CompanyName = "磐石市白云物业管理有限责任公司";
|
||||
HeatName = "磐石白云物业供热站";
|
||||
}else if("12423011000".equals(sim)){
|
||||
CompanyName = "磐石市北亚供热有限公司";
|
||||
HeatName = "磐石北亚供热站";
|
||||
}else if("12423007000".equals(sim)){
|
||||
CompanyName = "磐石市颐和供热有限责任公司";
|
||||
HeatName = "磐石颐和供热站";
|
||||
}else if("22423030004".equals(sim)){
|
||||
CompanyName = "磐石市鼎丰供热有限责任公司";
|
||||
HeatName = "磐石鼎丰供热站";
|
||||
}else if("22423013000".equals(sim)){
|
||||
CompanyName = "磐石市冬晨供热有限公司";
|
||||
HeatName = "磐石冬晨供热站";
|
||||
}else if("22423014000".equals(sim)){
|
||||
CompanyName = "磐石市海达供热有限公司";
|
||||
HeatName = "磐石海达供热站";
|
||||
}else if("22423001001".equals(sim)){
|
||||
CompanyName = "磐石市红大供热有限公司";
|
||||
HeatName = "磐石红大供热站";
|
||||
}else if("22423002001".equals(sim)){
|
||||
CompanyName = "磐石市宏城供热有限公司";
|
||||
HeatName = "磐石宏城供热站";
|
||||
}else if("22423003002".equals(sim)){
|
||||
CompanyName = "磐石市隆昌物业管理有限公司";
|
||||
HeatName = "磐石隆昌物业供热站";
|
||||
}else if("22423003005".equals(sim)){
|
||||
CompanyName = "磐石市琉森供热管理有限公司";
|
||||
HeatName = "磐石琉森供热站";
|
||||
}else if("32423012001".equals(sim)){
|
||||
CompanyName = "磐石市牟力供热有限公司";
|
||||
HeatName = "磐石牟力供热站";
|
||||
}else if("22423004000".equals(sim)){
|
||||
CompanyName = "磐石市三兴供热有限公司";
|
||||
HeatName = "磐石三兴供热站";
|
||||
}else if("12423005000".equals(sim)){
|
||||
CompanyName = "磐石市升旺供热有限公司";
|
||||
HeatName = "磐石升旺供热站";
|
||||
}else if("22423008001".equals(sim)){
|
||||
CompanyName = "磐石市万达物业管理有限公司";
|
||||
HeatName = "磐石万达供热站";
|
||||
}else if("22423006000".equals(sim)){
|
||||
CompanyName = "磐石市馨达供热有限公司";
|
||||
HeatName = "磐石馨达供热站";
|
||||
}else if("22423009000".equals(sim)){
|
||||
CompanyName = "磐石市忠信供热有限公司";
|
||||
HeatName = "磐石忠信供热站";
|
||||
}else if("22423020000".equals(sim)){
|
||||
CompanyName = "磐石市恒升供热有限公司";
|
||||
HeatName = "磐石恒升供热站";
|
||||
}
|
||||
// else if("".equals(sim)){
|
||||
// CompanyName = "磐石市柏悦供热有限公司";
|
||||
// HeatName = "磐石柏悦供热站";
|
||||
// }
|
||||
try{
|
||||
if(CompanyName!=null&&!"".equals(CompanyName)&&heatanalysis2!=null&&!"".equals(heatanalysis2.getId())){
|
||||
log.info("sim:"+sim);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
jsonObject2.put("CompanyName", CompanyName);//供热公司名称
|
||||
jsonObject2.put("HeatName", HeatName);//热源名称
|
||||
jsonObject2.put("DateTime", sdf.format(new Date()));//数据上传时间
|
||||
jsonObject2.put("PrimaryFeedTem", heatanalysis2.getView005());//供水温度
|
||||
jsonObject2.put("PrimaryFeedPressure", heatanalysis2.getView007());//供水压力
|
||||
jsonObject2.put("PrimaryReturnTem", heatanalysis2.getView006());//回水温度
|
||||
jsonObject2.put("PrimaryReturnPressure", heatanalysis2.getView008());//回水压力
|
||||
jsonObject2.put("FeedFlow","0");//供水瞬时流量
|
||||
jsonObject2.put("ReturnFlow", "0");//供水累计流量
|
||||
jsonObject.put("InParam", jsonObject2);
|
||||
jsonObject.put("RequestType", "normal");//默认填写
|
||||
jsonObject.put("RequestID","121");//默认填写
|
||||
log.info("jsonObject:"+jsonObject);
|
||||
uploadData5(url,jsonObject.toString(),token);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void uploadData5(String url,String params,String token) throws IOException {
|
||||
// 创建HttpClient对象
|
||||
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
|
||||
// 创建HttpPost对象
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
// 设置Content-Type为application/json
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
httpPost.setHeader("Authorization", "Bearer "+token);
|
||||
// 设置请求体参数
|
||||
String requestBody = params;
|
||||
// 设置请求体
|
||||
StringEntity entity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
// 发送请求并获取响应
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
// 解析响应
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
String responseBody = EntityUtils.toString(responseEntity);
|
||||
// 关闭响应和HttpClient
|
||||
response.close();
|
||||
httpClient.close();
|
||||
// 输出响应结果
|
||||
log.info(responseBody);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package org.jeecg.modules.heating.job;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.heating.entity.Heatanalysis;
|
||||
import org.jeecg.modules.heating.service.HeatanalysisService;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模拟数据
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
public class HeatingSimulateJob implements Job {
|
||||
|
||||
@Autowired
|
||||
private HeatanalysisService heatanalysisService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info(String.format("模拟生成数据 HeatingSimulateJob ! 时间:" + DateUtils.getTimestamp()));
|
||||
List<Heatanalysis> list = heatanalysisService.findSimulateList(new Heatanalysis());
|
||||
for (Heatanalysis heat : list)
|
||||
{
|
||||
log.info(String.format("code:"+heat.getCode()+" sim:" + heat.getSim()));
|
||||
heatanalysisService.exeProc(heat);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package org.jeecg.modules.heating.job;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.jeecg.modules.message.util.HttpPostTest;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
public class PsdsjApiTask {
|
||||
|
||||
//获取token
|
||||
public static String getToken() {
|
||||
String url = "http://36.135.12.74:11006/oauth/token";
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("grant_type", "password");
|
||||
params.put("client_id", "B81F19E0CE92A349");
|
||||
params.put("client_secret", "76061F7F697F1DBFCB3E7C3EA641985C");
|
||||
params.put("username", "postUsers");
|
||||
params.put("password", "jilinHeat@gg1.25");
|
||||
params.put("redirect_uri", "https://36.135.12.177:12103");
|
||||
String body = HttpPostTest.post(url, params);
|
||||
System.out.println(body);
|
||||
return body;
|
||||
}
|
||||
|
||||
public static void uploadData5(String url,String params,String token) throws IOException {
|
||||
// 创建HttpClient对象
|
||||
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
|
||||
// 创建HttpPost对象
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
// 设置Content-Type为application/json
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
httpPost.setHeader("Authorization", "Bearer "+token);
|
||||
// 设置请求体参数
|
||||
String requestBody = params;
|
||||
// 设置请求体
|
||||
StringEntity entity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
// 发送请求并获取响应
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
// 解析响应
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
String responseBody = EntityUtils.toString(responseEntity);
|
||||
// 关闭响应和HttpClient
|
||||
response.close();
|
||||
httpClient.close();
|
||||
// 输出响应结果
|
||||
System.out.println(responseBody);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.heating.entity.DataExtractConfig;
|
||||
|
||||
/**
|
||||
* @Description: 数据抽取配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DataExtractConfigMapper extends BaseMapper<DataExtractConfig> {
|
||||
Page<DataExtractConfig> findPage(Page<DataExtractConfig> page, @Param("params") DataExtractConfig dataExtractConfig);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.heating.entity.HeatanalysisHistory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HeatanalysisHistoryMapper extends BaseMapper<HeatanalysisHistory> {
|
||||
Page<HeatanalysisHistory> findPage(Page<HeatanalysisHistory> page, @Param("params") HeatanalysisHistory heatanalysisHistory);
|
||||
Page<HeatanalysisHistory> findJxPage(Page<HeatanalysisHistory> page, @Param("params") HeatanalysisHistory heatanalysisHistory);
|
||||
List<HeatanalysisHistory> findHistoryList(HeatanalysisHistory heatanalysisHistory);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.heating.entity.Heatanalysis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HeatanalysisMapper extends BaseMapper<Heatanalysis> {
|
||||
Heatanalysis getHeatOne(Heatanalysis heatanalysis);
|
||||
Page<Heatanalysis> findPage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
|
||||
void updateType(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> findSourceList(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> findList(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> findStaticList(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> findSimulateList(Heatanalysis heatanalysis);
|
||||
void exeProc(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> lowest(Heatanalysis heatanalysis);
|
||||
Page<Heatanalysis> findOnePage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
|
||||
Page<Heatanalysis> findTwoPage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
|
||||
Page<Heatanalysis> findExtractedOnePage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
|
||||
Page<Heatanalysis> findExtractedTwoPage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
|
||||
|
||||
void exeWater(Heatanalysis heatanalysis);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.heating.entity.Heatsource;
|
||||
import java.util.List;
|
||||
|
||||
public interface HeatsourceMapper extends BaseMapper<Heatsource> {
|
||||
List<Heatsource> findList(Heatsource heatsource);
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.heating.entity.Heatsourcestation;
|
||||
import java.util.List;
|
||||
|
||||
public interface HeatsourcestationMapper extends BaseMapper<Heatsourcestation> {
|
||||
List<Heatsourcestation> findList(Heatsourcestation heatsourcestation);
|
||||
List<Heatsourcestation> findCompanyList(Heatsourcestation heatsourcestation);
|
||||
List<Heatsourcestation> findSourceList(Heatsourcestation heatsourcestation);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.heating.entity.Markinfo;
|
||||
import java.util.List;
|
||||
|
||||
public interface MarkinfoMapper extends BaseMapper<Markinfo> {
|
||||
List<Markinfo> findList(Markinfo markinfo);
|
||||
Markinfo getMarkinfo(Markinfo markinfo);
|
||||
void deleteAll();
|
||||
List<Markinfo> sourceList(Markinfo markinfo);
|
||||
List<Markinfo> stationList(Markinfo markinfo);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.heating.entity.Simconfig;
|
||||
|
||||
/**
|
||||
* @Description: 设备信息管理
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface SimconfigMapper extends BaseMapper<Simconfig> {
|
||||
List<Simconfig> findCompanyList(Simconfig simconfig);
|
||||
List<Simconfig> findSourceList(Simconfig simconfig);
|
||||
List<Simconfig> findStationList(Simconfig simconfig);
|
||||
List<Simconfig> findSimconfig(Simconfig simconfig);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.heating.entity.Substation;
|
||||
import java.util.List;
|
||||
|
||||
public interface SubstationMapper extends BaseMapper<Substation> {
|
||||
List<Substation> findList(Substation substation);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package org.jeecg.modules.heating.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.heating.entity.Thermalcompany;
|
||||
import java.util.List;
|
||||
|
||||
public interface ThermalcompanyMapper extends BaseMapper<Thermalcompany> {
|
||||
List<Thermalcompany> findList(Thermalcompany thermalcompany);
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.DataExtractConfigMapper">
|
||||
|
||||
<select id="findPage" resultType="org.jeecg.modules.heating.entity.DataExtractConfig">
|
||||
SELECT
|
||||
a.id,
|
||||
a.sim,
|
||||
a.one_pipe_sim,
|
||||
a.one_pipe_type,
|
||||
a.two_pipe_sim,
|
||||
a.two_pipe_type,
|
||||
a.flag,
|
||||
b.company_company_id as companyId,
|
||||
tc.company_name as company,
|
||||
b.source_source_id as sourceId,
|
||||
hs.source_name as source,
|
||||
b.station_station_id as stationId,
|
||||
hss.station_name as station,
|
||||
t2.companyId as oneCompanyId,
|
||||
t2.company as oneCompany,
|
||||
t2.sourceId as oneSourceId,
|
||||
t2.source as oneSource,
|
||||
t2.stationId as oneStationId,
|
||||
t2.station as oneStation,
|
||||
t3.companyId as twoCompanyId,
|
||||
t3.company as twoCompany,
|
||||
t3.sourceId as twoSourceId,
|
||||
t3.source as twoSource,
|
||||
t3.stationId as twoStationId,
|
||||
t3.station as twoStation
|
||||
FROM bl_data_extract_config a
|
||||
left join BL_simconfig b on a.sim = b.sim
|
||||
left join BL_thermalcompany tc on tc.id = b.company_company_id
|
||||
left join BL_heatsource hs on hs.id = b.source_source_id
|
||||
left join BL_heatsourcestation hss on hss.id = b.station_station_id
|
||||
left join (
|
||||
select
|
||||
b.sim,
|
||||
b.company_company_id as companyId,
|
||||
tc.company_name as company,
|
||||
b.source_source_id as sourceId,
|
||||
hs.source_name as source,
|
||||
b.station_station_id as stationId,
|
||||
hss.station_name as station
|
||||
from BL_simconfig b
|
||||
left join BL_thermalcompany tc on tc.id = b.company_company_id
|
||||
left join BL_heatsource hs on hs.id = b.source_source_id
|
||||
left join BL_heatsourcestation hss on hss.id = b.station_station_id
|
||||
) t2 on a.one_pipe_sim = t2.sim
|
||||
left join (
|
||||
select
|
||||
b.sim,
|
||||
b.company_company_id as companyId,
|
||||
tc.company_name as company,
|
||||
b.source_source_id as sourceId,
|
||||
hs.source_name as source,
|
||||
b.station_station_id as stationId,
|
||||
hss.station_name as station
|
||||
from BL_simconfig b
|
||||
left join BL_thermalcompany tc on tc.id = b.company_company_id
|
||||
left join BL_heatsource hs on hs.id = b.source_source_id
|
||||
left join BL_heatsourcestation hss on hss.id = b.station_station_id
|
||||
) t3 on a.two_pipe_sim = t3.sim
|
||||
<where>
|
||||
<if test="params.sim != null and params.sim != ''">
|
||||
AND a.sim = #{params.sim}
|
||||
</if>
|
||||
<if test="params.companyId != null and params.companyId != ''">
|
||||
AND b.company_company_id = #{params.companyId}
|
||||
</if>
|
||||
<if test="params.sourceId != null and params.sourceId != ''">
|
||||
AND b.source_source_id = #{params.sourceId}
|
||||
</if>
|
||||
<if test="params.stationId != null and params.stationId != ''">
|
||||
AND b.station_station_id = #{params.stationId}
|
||||
</if>
|
||||
<if test="params.onePipeSim != null and params.onePipeSim != ''">
|
||||
AND a.one_pipe_sim = #{params.onePipeSim}
|
||||
</if>
|
||||
<if test="params.onePipeType != null and params.onePipeType != ''">
|
||||
AND a.one_pipe_type = #{params.onePipeType}
|
||||
</if>
|
||||
<if test="params.twoPipeSim != null and params.twoPipeSim != ''">
|
||||
AND a.two_pipe_sim = #{params.twoPipeSim}
|
||||
</if>
|
||||
<if test="params.twoPipeType != null and params.twoPipeType != ''">
|
||||
AND a.two_pipe_type = #{params.twoPipeType}
|
||||
</if>
|
||||
<if test="params.flag != null and params.flag != ''">
|
||||
AND a.flag = #{params.flag}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY b.company_company_id,b.source_source_id,b.station_station_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,256 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.HeatanalysisHistoryMapper">
|
||||
|
||||
<select id="findPage" resultType="org.jeecg.modules.heating.entity.HeatanalysisHistory">
|
||||
select * from (
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.sim AS "sim",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.report_type AS "reportType"
|
||||
FROM ${params.tableName} a
|
||||
<where>
|
||||
a.region_type = #{params.regionType}
|
||||
And a.del_flag = '0'
|
||||
<if test="params.view001 != null and params.view001 != ''">
|
||||
AND a.view001 = #{params.view001}
|
||||
</if>
|
||||
<if test="params.view002 != null and params.view002 != ''">
|
||||
AND a.view002 = #{params.view002}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != '' and params.view004 != -1">
|
||||
AND a.view004 = #{params.view004}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != '' and params.view004 == -1">
|
||||
AND a.view004 is null
|
||||
</if>
|
||||
<if test="params.SDate != null">
|
||||
AND a.datatime >= #{params.SDate}
|
||||
</if>
|
||||
<if test="params.EDate != null">
|
||||
AND a.datatime <= #{params.EDate}
|
||||
</if>
|
||||
<if test="params.caveat != null">
|
||||
AND a.caveat = #{params.caveat}
|
||||
</if>
|
||||
<if test="params.reportType != null">
|
||||
AND a.report_type = #{params.reportType}
|
||||
</if>
|
||||
<if test="params.sim != null and params.sim != ''">
|
||||
AND a.sim = #{params.sim}
|
||||
</if>
|
||||
</where>
|
||||
) t
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findJxPage" resultType="org.jeecg.modules.heating.entity.HeatanalysisHistory">
|
||||
select * from (
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.from_flow AS "fromFlow",
|
||||
a.view031 AS "view031",
|
||||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
a.view035 AS "view035",
|
||||
a.view036 AS "view036",
|
||||
a.view037 AS "view037",
|
||||
a.view038 AS "view038",
|
||||
a.view039 AS "view039",
|
||||
a.view040 AS "view040",
|
||||
a.view041 AS "view041",
|
||||
a.view042 AS "view042",
|
||||
a.view043 AS "view043",
|
||||
a.view044 AS "view044",
|
||||
a.view045 AS "view045",
|
||||
a.view046 AS "view046",
|
||||
a.view047 AS "view047",
|
||||
a.sim AS "sim",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.report_type AS "reportType"
|
||||
FROM ${params.tableName} a
|
||||
<where>
|
||||
a.region_type = #{params.regionType}
|
||||
And a.del_flag = '0'
|
||||
<if test="params.view001 != null and params.view001 != ''">
|
||||
AND a.view001 = #{params.view001}
|
||||
</if>
|
||||
<if test="params.view002 != null and params.view002 != ''">
|
||||
AND a.view002 = #{params.view002}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != '' and params.view004 != -1">
|
||||
AND a.view004 = #{params.view004}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != '' and params.view004 == -1">
|
||||
AND a.view004 is null
|
||||
</if>
|
||||
<if test="params.SDate != null">
|
||||
AND a.view032 >= #{params.SDate}
|
||||
</if>
|
||||
<if test="params.EDate != null">
|
||||
AND a.view032 <= #{params.EDate}
|
||||
</if>
|
||||
<if test="params.caveat != null">
|
||||
AND a.caveat = #{params.caveat}
|
||||
</if>
|
||||
<if test="params.reportType != null">
|
||||
AND a.report_type = #{params.reportType}
|
||||
</if>
|
||||
<if test="params.sim != null and params.sim != ''">
|
||||
AND a.sim = #{params.sim}
|
||||
</if>
|
||||
</where>
|
||||
) t
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findHistoryList" resultType="org.jeecg.modules.heating.entity.HeatanalysisHistory">
|
||||
select * from (
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.sim AS "sim",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.report_type AS "reportType"
|
||||
FROM ${tableName} a
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="view001 != null and view001 != ''">
|
||||
AND a.view001 = #{view001}
|
||||
</if>
|
||||
<if test="view002 != null and view002 != ''">
|
||||
AND a.view002 = #{view002}
|
||||
</if>
|
||||
<if test="view004 != null and view004 != ''">
|
||||
AND a.view004 = #{view004}
|
||||
</if>
|
||||
<if test="SDate != null">
|
||||
AND a.datatime >= #{SDate}
|
||||
</if>
|
||||
<if test="EDate != null">
|
||||
AND a.datatime <= #{EDate}
|
||||
</if>
|
||||
<if test="caveat != null">
|
||||
AND a.caveat = #{caveat}
|
||||
</if>
|
||||
<if test="reportType != null">
|
||||
AND a.report_type = #{reportType}
|
||||
</if>
|
||||
<if test="sim != null and sim != ''">
|
||||
AND a.sim = #{sim}
|
||||
</if>
|
||||
</where>
|
||||
) t
|
||||
ORDER BY t.datatime ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,507 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.HeatanalysisMapper">
|
||||
|
||||
<select id="getHeatOne" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
id,
|
||||
VIEW005,
|
||||
VIEW006,
|
||||
VIEW007,
|
||||
VIEW008
|
||||
FROM
|
||||
BL_HEATANALYSIS
|
||||
WHERE
|
||||
sim = #{sim}
|
||||
ORDER BY
|
||||
DATATIME DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="findPage" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
select * from (
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.from_flow AS "fromFlow",
|
||||
a.view031 AS "view031",
|
||||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
a.view035 AS "view035",
|
||||
a.view036 AS "view036",
|
||||
a.view037 AS "view037",
|
||||
a.view038 AS "view038",
|
||||
a.view039 AS "view039",
|
||||
a.view040 AS "view040",
|
||||
a.view041 AS "view041",
|
||||
a.view042 AS "view042",
|
||||
a.view043 AS "view043",
|
||||
a.view044 AS "view044",
|
||||
a.view045 AS "view045",
|
||||
a.view046 AS "view046",
|
||||
a.view047 AS "view047",
|
||||
a.sim AS "sim",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.report_type AS "reportType",
|
||||
a.is_extract AS "isExtract",
|
||||
(select count(*) from bl_data_extract_config bl where bl.one_pipe_sim = a.sim or bl.two_pipe_sim = a.sim) as isExtracted,
|
||||
(case when datatime > DATE_ADD(NOW(), INTERVAL -10 MINUTE) then 0 else 1 end) as isTimeout
|
||||
FROM BL_HEATANALYSIS a
|
||||
<where>
|
||||
a.region_type = #{params.regionType}
|
||||
And a.del_flag = '0'
|
||||
<if test="params.view001 != null and params.view001 != ''">
|
||||
AND a.view001 = #{params.view001}
|
||||
</if>
|
||||
<if test="params.view002 != null and params.view002 != ''">
|
||||
AND a.view002 = #{params.view002}
|
||||
</if>
|
||||
<if test="params.view003 != null and params.view003 != ''">
|
||||
AND a.view003 = #{params.view003}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != ''">
|
||||
AND a.view004 = #{params.view004}
|
||||
</if>
|
||||
<if test="params.view005 != null and params.view005 != ''">
|
||||
AND a.view005 <= #{params.view005}
|
||||
</if>
|
||||
<if test="params.view006 != null and params.view006 != ''">
|
||||
AND a.view006 <#{params.view006}
|
||||
</if>
|
||||
<if test="params.view009 != null and params.view009 != ''">
|
||||
AND a.view009 <#{params.view009}
|
||||
</if>
|
||||
<if test="params.view010 != null and params.view010 != ''">
|
||||
AND a.view010 <#{params.view010}
|
||||
</if>
|
||||
<if test="params.caveat != null">
|
||||
AND a.caveat = #{params.caveat}
|
||||
</if>
|
||||
<if test="params.reportType != null">
|
||||
AND a.report_type = #{params.reportType}
|
||||
</if>
|
||||
<if test="params.isExtract != null">
|
||||
AND a.is_extract = #{params.isExtract}
|
||||
</if>
|
||||
<if test="params.sim != null and params.sim != ''">
|
||||
AND a.sim = #{params.sim}
|
||||
</if>
|
||||
</where>
|
||||
) t
|
||||
<where>
|
||||
<if test="params.isExtracted != null">
|
||||
<if test="params.isExtracted == 0">
|
||||
AND isExtracted = 0
|
||||
</if>
|
||||
<if test="params.isExtracted > 0">
|
||||
AND isExtracted > 0
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||
</select>
|
||||
|
||||
<update id="updateType">
|
||||
UPDATE BL_HEATANALYSIS
|
||||
SET report_type = #{reportType}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="findSourceList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
-- b.company_name AS "view001Name",
|
||||
a.view027 AS "view001Name",
|
||||
a.view002 AS "view002",
|
||||
-- c.source_name AS "view002Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.sim AS "sim",
|
||||
a.code
|
||||
FROM BL_HEATANALYSIS a
|
||||
-- INNER JOIN thermalcompany b ON b.id=a.view001
|
||||
-- INNER JOIN heatsource c ON c.id=a.view002
|
||||
WHERE
|
||||
a.del_flag = '0'
|
||||
-- and b.del_flag = '0'
|
||||
-- and c.del_flag = '0'
|
||||
and ifnull(a.view001,'') != ''
|
||||
and ifnull(a.view002,'') != ''
|
||||
and ifnull(a.view004,'') = ''
|
||||
ORDER BY a.view001 asc ,a.view002 asc,A.DATATIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.sim AS "sim",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.report_type AS "reportType",
|
||||
a.is_extract AS "isExtract",
|
||||
-- b.company_name AS "view001Name",
|
||||
-- c.source_name AS "view002Name",
|
||||
-- d.name AS "view003Name",
|
||||
-- e.station_name AS "view004Name",
|
||||
(select count(*) from bl_data_extract_config bl where bl.one_pipe_sim = a.sim or bl.two_pipe_sim = a.sim) as isExtracted
|
||||
FROM BL_HEATANALYSIS a
|
||||
-- LEFT JOIN thermalcompany b ON b.id=a.view001
|
||||
-- LEFT JOIN heatsource c ON c.id=a.view002
|
||||
-- LEFT JOIN substation d ON d.id=a.view003
|
||||
-- LEFT JOIN heatsourcestation e ON e.id=a.view004
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
and ifnull(a.view001,'') != ''
|
||||
<if test="view001 != null and view001 != ''">
|
||||
AND a.view001 = #{view001}
|
||||
</if>
|
||||
<if test="view002 != null and view002 != ''">
|
||||
AND a.view002 = #{view002}
|
||||
</if>
|
||||
<if test="view003 != null and view003 != ''">
|
||||
AND a.view003 = #{view003}
|
||||
</if>
|
||||
<if test="view004 != null and view004 != ''">
|
||||
AND a.view004 = #{view004}
|
||||
</if>
|
||||
<if test="view005 != null and view005 != ''">
|
||||
AND a.view005 <= #{view005}
|
||||
</if>
|
||||
<if test="view006 != null and view006 != ''">
|
||||
AND a.view006 <#{view006}
|
||||
</if>
|
||||
<if test="view009 != null and view009 != ''">
|
||||
AND a.view009 <#{view009}
|
||||
</if>
|
||||
<if test="view010 != null and view010 != ''">
|
||||
AND a.view010 <#{view010}
|
||||
</if>
|
||||
<if test="caveat != null">
|
||||
AND a.caveat = #{caveat}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.view001 asc ,a.view002 asc,a.view004 asc,A.DATATIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findStaticList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
a.view001,
|
||||
b.company_name AS view001Name,
|
||||
count(distinct a.view002) as VIEW005,
|
||||
count(distinct replace(e.station_name,SUBSTR(e.station_name,instr(e.station_name,'('),10),'')) as VIEW006
|
||||
FROM BL_HEATANALYSIS a
|
||||
LEFT JOIN BL_thermalcompany b ON b.id=a.view001
|
||||
LEFT JOIN BL_heatsourcestation e ON e.id=a.view004 and e.id != 20
|
||||
where a.del_flag = '0'
|
||||
group by view001,view001Name
|
||||
ORDER BY A.view001 DESC
|
||||
</select>
|
||||
|
||||
<select id="findSimulateList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT *
|
||||
FROM BL_HEATANALYSIS a
|
||||
where a.del_flag = '0'
|
||||
and a.report_type = 2
|
||||
</select>
|
||||
|
||||
<insert id="exeProc">
|
||||
CALL P_Q_D_HEATANALYSIS_SIMULATE_NEW(#{code}, #{sim}, #{datatime}, #{view005}, #{view006}, #{view007}, #{view008}, #{view009}, #{view010}, #{view011}, #{view012})
|
||||
</insert>
|
||||
|
||||
<insert id="exeWater">
|
||||
CALL P_Q_D_HEATFLOWANALYSIS(#{view031}, #{view032}, #{view033}, #{view034}, #{view035}, #{view036}, #{view037}, #{view038}, #{view039}, #{view040}, #{view041}, #{view042}, #{view043}, #{view044}, #{view045}, #{view046}, #{view047})
|
||||
</insert>
|
||||
|
||||
<select id="lowest" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT * FROM (
|
||||
SELECT * FROM ${tableName} a
|
||||
WHERE A.VIEW002 = (
|
||||
SELECT IFNULL(STATION, SOURCE) FROM
|
||||
(
|
||||
SELECT
|
||||
VIEW002 SOURCE, VIEW004 STATION, VIEW005 VIEW005, VIEW006 VIEW006
|
||||
FROM BL_HEATANALYSIS
|
||||
WHERE IFNULL(VIEW004, 0) = 0
|
||||
UNION ALL
|
||||
SELECT VIEW002 SOURCE, VIEW004 STATION, VIEW009 VIEW005, VIEW010 VIEW006
|
||||
FROM BL_HEATANALYSIS
|
||||
WHERE IFNULL(VIEW004, 0) > 0
|
||||
) T
|
||||
ORDER BY VIEW005 LIMIT 0, 1
|
||||
)
|
||||
and a.DATATIME > DATE_SUB(NOW(),INTERVAL 2 HOUR)
|
||||
ORDER BY a.DATATIME DESC LIMIT 0, 20 ) T2
|
||||
union all
|
||||
SELECT * FROM
|
||||
(
|
||||
SELECT * FROM ${tableName} a
|
||||
WHERE A.VIEW004 = (
|
||||
SELECT IFNULL(STATION, SOURCE)
|
||||
FROM
|
||||
(
|
||||
SELECT VIEW002 SOURCE, VIEW004 STATION, VIEW005 VIEW005, VIEW006 VIEW006
|
||||
FROM BL_HEATANALYSIS
|
||||
WHERE IFNULL(VIEW004, 0) = 0
|
||||
UNION ALL
|
||||
SELECT VIEW002 SOURCE, VIEW004 STATION, VIEW009 VIEW005, VIEW010 VIEW006
|
||||
FROM BL_HEATANALYSIS
|
||||
WHERE IFNULL(VIEW004, 0) > 0
|
||||
) T
|
||||
ORDER BY VIEW005 LIMIT 0, 1
|
||||
)
|
||||
and a.DATATIME > DATE_SUB(NOW(),INTERVAL 2 HOUR)
|
||||
ORDER BY a.DATATIME DESC LIMIT 0, 20
|
||||
) T1
|
||||
ORDER BY DATATIME
|
||||
</select>
|
||||
|
||||
<select id="findOnePage" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.sim AS "sim",
|
||||
a.report_type AS "reportType"
|
||||
FROM BL_HEATANALYSIS a
|
||||
INNER JOIN bl_data_extract_config bl on a.sim = bl.one_pipe_sim and bl.sim = #{params.sim}
|
||||
where a.del_flag = '0'
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findTwoPage" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.sim AS "sim",
|
||||
a.report_type AS "reportType"
|
||||
FROM BL_HEATANALYSIS a
|
||||
INNER JOIN bl_data_extract_config bl on a.sim = bl.two_pipe_sim and bl.sim = #{params.sim}
|
||||
where a.del_flag = '0'
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findExtractedOnePage" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.sim AS "sim",
|
||||
a.report_type AS "reportType"
|
||||
FROM BL_HEATANALYSIS a
|
||||
INNER JOIN bl_data_extract_config bl on a.sim = bl.sim and bl.one_pipe_sim = #{params.sim}
|
||||
where a.del_flag = '0'
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findExtractedTwoPage" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.sim AS "sim",
|
||||
a.report_type AS "reportType"
|
||||
FROM BL_HEATANALYSIS a
|
||||
INNER JOIN bl_data_extract_config bl on a.sim = bl.sim and bl.two_pipe_sim = #{params.sim}
|
||||
where a.del_flag = '0'
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.HeatsourceMapper">
|
||||
|
||||
<sql id="heatsourceColumns">
|
||||
a.id AS "id",
|
||||
a.boiler_capacity AS "boilerCapacity",
|
||||
a.boiler_type AS "boilerType",
|
||||
a.duty_people AS "dutyPeople",
|
||||
a.llcome_down AS "llcomeDown",
|
||||
a.llcome_up AS "llcomeUp",
|
||||
a.llgo_down AS "llgoDown",
|
||||
a.llgo_up AS "llgoUp",
|
||||
a.setup_time AS "setupTime",
|
||||
a.source_name AS "sourceName",
|
||||
a.source_phone AS "sourcePhone",
|
||||
a.source_type AS "sourceType",
|
||||
a.wdcome_down AS "wdcomeDown",
|
||||
a.wdcome_up AS "wdcomeUp",
|
||||
a.wdgo_down AS "wdgoDown",
|
||||
a.wdgo_up AS "wdgoUp",
|
||||
a.ylcome_down AS "ylcomeDown",
|
||||
a.ylcome_up AS "ylcomeUp",
|
||||
a.ylgo_down AS "ylgoDown",
|
||||
a.ylgo_up AS "ylgoUp",
|
||||
a.company AS "company",
|
||||
a.company_name AS "companyName",
|
||||
a.company_id AS "companyId",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.source_image AS "sourceImage",
|
||||
b.company_name AS "companyNameView",
|
||||
a.tree_id AS "treeID",
|
||||
|
||||
a.heating_area AS "heatingArea",
|
||||
a.residential_area AS "residentialArea",
|
||||
a.noresidential_area AS "noresidentialArea",
|
||||
a.yearcoal AS "yearcoal",
|
||||
a.nowcoal AS "nowcoal",
|
||||
a.yearwater AS "yearwater",
|
||||
a.yearelectricity AS "yearelectricity",
|
||||
a.onenet AS "onenet",
|
||||
a.secondarynet AS "secondarynet",
|
||||
a.boilernum AS "boilernum",
|
||||
a.tonnage AS "tonnage",
|
||||
a.tonnage_two AS "tonnageTwo"
|
||||
|
||||
</sql>
|
||||
|
||||
<sql id="heatsourceJoins">
|
||||
LEFT JOIN BL_thermalcompany b ON b.id=a.company_id
|
||||
</sql>
|
||||
|
||||
<select id="findList" resultType="org.jeecg.modules.heating.entity.Heatsource">
|
||||
SELECT
|
||||
<include refid="heatsourceColumns"/>
|
||||
FROM BL_heatsource a
|
||||
<include refid="heatsourceJoins"/>
|
||||
<where>
|
||||
a.region_type = #{regionType}
|
||||
AND a.del_flag = '0'
|
||||
<if test="sourceName != null and sourceName != ''">
|
||||
AND a.source_name LIKE concat('%',#{sourceName},'%')
|
||||
</if>
|
||||
<if test="sourceType != null and sourceType != ''">
|
||||
AND a.source_type = #{sourceType}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
AND a.id = #{id}
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND a.company_id = #{companyId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.HeatsourcestationMapper">
|
||||
|
||||
<sql id="heatsourcestationColumns">
|
||||
a.id AS "id",
|
||||
a.llcome_down AS "llcomeDown",
|
||||
a.llcome_up AS "llcomeUp",
|
||||
a.llgo_down AS "llgoDown",
|
||||
a.llgo_up AS "llgoUp",
|
||||
a.wdcome_down AS "wdcomeDown",
|
||||
a.wdcome_up AS "wdcomeUp",
|
||||
a.wdgo_down AS "wdgoDown",
|
||||
a.wdgo_up AS "wdgoUp",
|
||||
a.ylcome_down AS "ylcomeDown",
|
||||
a.ylcome_up AS "ylcomeUp",
|
||||
a.ylgo_down AS "ylgoDown",
|
||||
a.ylgo_up AS "ylgoUp",
|
||||
a.duty_people AS "dutyPeople",
|
||||
a.setup_time AS "setupTime",
|
||||
a.station_address AS "stationAddress",
|
||||
a.station_name AS "stationName",
|
||||
a.station_phone AS "stationPhone",
|
||||
a.company AS "company",
|
||||
a.source AS "source",
|
||||
a.substation AS "substation",
|
||||
a.company_id AS "companyId",
|
||||
a.company_name AS "companyName",
|
||||
a.source_id AS "sourceId",
|
||||
a.source_name AS "sourceName",
|
||||
a.substation_id AS "substationId",
|
||||
a.substation_name AS "substationName",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
b.source_name AS "sourceNameView",
|
||||
c.company_name AS "companyNameView",
|
||||
d.name AS "substationNameView",
|
||||
a.sourcestation_image AS "sourcestationImage",
|
||||
a.tree_id AS "treeID",
|
||||
a.supply_build AS "supplybuild"
|
||||
</sql>
|
||||
|
||||
<sql id="heatsourcestationJoins">
|
||||
LEFT JOIN BL_substation d ON d.id=a.substation_id
|
||||
LEFT JOIN BL_heatsource b ON b.id=a.source_id
|
||||
LEFT JOIN BL_thermalcompany c ON c.id=a.company_id
|
||||
</sql>
|
||||
|
||||
<select id="findList" resultType="org.jeecg.modules.heating.entity.Heatsourcestation">
|
||||
SELECT
|
||||
<include refid="heatsourcestationColumns"/>
|
||||
FROM BL_heatsourcestation a
|
||||
<include refid="heatsourcestationJoins"/>
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="stationName != null and stationName != ''">
|
||||
AND a.station_name LIKE concat('%',#{stationName},'%')
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND a.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
AND a.id = #{id}
|
||||
</if>
|
||||
<if test="sourceId != null and sourceId != ''">
|
||||
AND a.source_id = #{sourceId}
|
||||
</if>
|
||||
<if test="substationId != null and substationId != ''">
|
||||
AND a.substation_id = #{substationId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
|
||||
<select id="findCompanyList" resultType="org.jeecg.modules.heating.entity.Heatsourcestation">
|
||||
SELECT id as companyId, company_name as companyName
|
||||
FROM BL_thermalcompany a
|
||||
<where>
|
||||
AND del_flag = '0'
|
||||
<if test="companyName != null and companyName != ''">
|
||||
AND a.company_name LIKE concat('%',#{companyName},'%')
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND a.id = #{companyId}
|
||||
</if>
|
||||
<if test="dutyPeople != null and dutyPeople != ''">
|
||||
AND a.duty_people LIKE concat('%',#{dutyPeople},'%')
|
||||
</if>
|
||||
<if test="regionType != null and regionType != ''">
|
||||
AND a.region_type = #{regionType}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
|
||||
<select id="findSourceList" resultType="org.jeecg.modules.heating.entity.Heatsourcestation">
|
||||
SELECT id as sourceId, source_name as sourceName
|
||||
FROM BL_heatsource a
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="sourceName != null and sourceName != ''">
|
||||
AND a.source_name LIKE concat('%',#{sourceName},'%')
|
||||
</if>
|
||||
<if test="sourceId != null and sourceId != ''">
|
||||
AND a.id = #{id}
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND a.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="regionType != null and regionType != ''">
|
||||
AND a.region_type = #{regionType}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.MarkinfoMapper">
|
||||
|
||||
<select id="findList" resultType="org.jeecg.modules.heating.entity.Markinfo">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.description AS "description",
|
||||
a.latitude AS "latitude",
|
||||
a.longitude AS "longitude",
|
||||
concat('b_',a.name) AS "stationId",
|
||||
b.source_name AS "name",
|
||||
a.del_flag AS "delFlag",
|
||||
a.type_flag AS "typeFlag"
|
||||
FROM bl_markinfo a
|
||||
inner join bl_heatsource b on a.name=b.id
|
||||
WHERE a.type_flag=1
|
||||
<if test="latitude != null and latitude != ''">
|
||||
AND a.latitude = #{latitude}
|
||||
</if>
|
||||
<if test="longitude != null and longitude != ''">
|
||||
AND a.longitude = #{longitude}
|
||||
</if>
|
||||
UNION
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.description AS "description",
|
||||
a.latitude AS "latitude",
|
||||
a.longitude AS "longitude",
|
||||
concat('c_',a.name) AS "stationId",
|
||||
d.station_name AS "name",
|
||||
a.del_flag AS "delFlag",
|
||||
a.type_flag AS "typeFlag"
|
||||
FROM bl_markinfo a
|
||||
inner join bl_heatsourcestation d on a.name=d.id
|
||||
WHERE a.type_flag=2
|
||||
<if test="latitude != null and latitude != ''">
|
||||
AND a.latitude = #{latitude}
|
||||
</if>
|
||||
<if test="longitude != null and longitude != ''">
|
||||
AND a.longitude = #{longitude}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getMarkinfo" resultType="org.jeecg.modules.heating.entity.Markinfo">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.description AS "description",
|
||||
a.latitude AS "latitude",
|
||||
a.longitude AS "longitude",
|
||||
concat('b_',a.name) AS "stationId",
|
||||
b.source_name AS "name",
|
||||
a.del_flag AS "delFlag",
|
||||
a.type_flag AS "typeFlag"
|
||||
FROM bl_markinfo a
|
||||
inner join bl_heatsource b on a.name=b.id
|
||||
WHERE a.type_flag=1
|
||||
and concat('b_',a.name) = #{id}
|
||||
UNION
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.description AS "description",
|
||||
a.latitude AS "latitude",
|
||||
a.longitude AS "longitude",
|
||||
concat('c_',a.name) AS "stationId",
|
||||
d.station_name AS "name",
|
||||
a.del_flag AS "delFlag",
|
||||
a.type_flag AS "typeFlag"
|
||||
FROM bl_markinfo a
|
||||
inner join bl_heatsourcestation d on a.name=d.id
|
||||
WHERE a.type_flag=2
|
||||
and concat('c_',a.name) = #{id}
|
||||
</select>
|
||||
|
||||
<update id="deleteAll">
|
||||
DELETE FROM bl_markinfo
|
||||
</update>
|
||||
|
||||
<select id="sourceList" resultType="org.jeecg.modules.heating.entity.Markinfo">
|
||||
SELECT
|
||||
a.id AS heatSourceId,
|
||||
a.source_name AS heatSourceName
|
||||
FROM bl_heatsource a
|
||||
WHERE a.del_flag = '0'
|
||||
and a.id not in (
|
||||
select name from bl_markinfo m where m.type_flag = 1 and m.del_flag = '0'
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="stationList" resultType="org.jeecg.modules.heating.entity.Markinfo">
|
||||
SELECT
|
||||
a.id AS heatStationId,
|
||||
a.station_name AS heatStationName
|
||||
FROM bl_heatsourcestation a
|
||||
WHERE a.del_flag = '0'
|
||||
and a.id not in (
|
||||
select name from bl_markinfo m where m.type_flag = 2 and m.del_flag = '0'
|
||||
)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.SimconfigMapper">
|
||||
<select id="findCompanyList" resultType="org.jeecg.modules.heating.entity.Simconfig">
|
||||
SELECT id as companyId, company_name as companyName
|
||||
FROM bl_thermalcompany a
|
||||
<where>
|
||||
AND del_flag = '0'
|
||||
<if test="regionType != null and regionType != ''">
|
||||
AND a.region_type = #{regionType}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
|
||||
<select id="findSourceList" resultType="org.jeecg.modules.heating.entity.Simconfig">
|
||||
SELECT id as sourceId, source_name as sourceName
|
||||
FROM bl_heatsource a
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="companyCompanyId != null and companyCompanyId != ''">
|
||||
AND a.company_id = #{companyCompanyId}
|
||||
</if>
|
||||
<if test="regionType != null and regionType != ''">
|
||||
AND a.region_type = #{regionType}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
|
||||
<select id="findStationList" resultType="org.jeecg.modules.heating.entity.Simconfig">
|
||||
SELECT id as stationId, station_name as stationName
|
||||
FROM bl_heatsourcestation a
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="sourceSourceId != null and sourceSourceId != ''">
|
||||
AND a.source_id = #{sourceSourceId}
|
||||
</if>
|
||||
<if test="companyCompanyId != null and companyCompanyId != ''">
|
||||
AND a.company_id = #{companyCompanyId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
|
||||
<select id="findSimconfig" resultType="org.jeecg.modules.heating.entity.Simconfig">
|
||||
SELECT *
|
||||
FROM bl_simconfig a
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="code != null and code != ''">
|
||||
AND a.code = #{code}
|
||||
</if>
|
||||
<if test="sim != null and sim != ''">
|
||||
AND a.sim = #{sim}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND a.id != #{id}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.SubstationMapper">
|
||||
|
||||
<sql id="substationColumns">
|
||||
a.id AS "id",
|
||||
a.addres AS "addres",
|
||||
a.area AS "area",
|
||||
a.conduits AS "conduits",
|
||||
a.doorsum AS "doorsum",
|
||||
a.establishedtime AS "establishedtime",
|
||||
a.heatarea AS "heatarea",
|
||||
a.inperson AS "inperson",
|
||||
a.name AS "name",
|
||||
a.old15conduits AS "old15conduits",
|
||||
a.stacount AS "stacount",
|
||||
a.tel AS "tel",
|
||||
a.company AS "company",
|
||||
a.source AS "source",
|
||||
a.company_id AS "companyId",
|
||||
a.company_name AS "companyName",
|
||||
a.source_id AS "sourceId",
|
||||
a.source_name AS "sourceName",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
b.source_name AS "sourceNameView",
|
||||
c.company_name AS "companyNameView"
|
||||
</sql>
|
||||
|
||||
<sql id="substationJoins">
|
||||
LEFT JOIN BL_heatsource b ON b.id=a.source_id
|
||||
LEFT JOIN BL_thermalcompany c ON c.id=b.company_id
|
||||
</sql>
|
||||
|
||||
<select id="findList" resultType="org.jeecg.modules.heating.entity.Substation">
|
||||
SELECT
|
||||
<include refid="substationColumns"/>
|
||||
FROM BL_substation a
|
||||
<include refid="substationJoins"/>
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="name != null and name != ''">
|
||||
AND a.name LIKE concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND a.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
AND a.id = #{id}
|
||||
</if>
|
||||
<if test="sourceId != null and sourceId != ''">
|
||||
AND a.source_id = #{sourceId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.update_date DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.heating.mapper.ThermalcompanyMapper">
|
||||
|
||||
<sql id="thermalcompanyColumns">
|
||||
a.id AS "id",
|
||||
a.barter_heat AS "barterHeat",
|
||||
a.boiler_house AS "boilerHouse",
|
||||
a.company_address AS "companyAddress",
|
||||
a.company_name AS "companyName",
|
||||
a.company_phone AS "companyPhone",
|
||||
a.company_type AS "companyType",
|
||||
a.direct AS "direct",
|
||||
a.doorsum AS "doorsum",
|
||||
a.duct_length AS "ductLength",
|
||||
a.duty_people AS "dutyPeople",
|
||||
a.heat_area AS "heatArea",
|
||||
a.heat_source AS "heatSource",
|
||||
a.heating_area AS "heatingArea",
|
||||
a.indirect AS "indirect",
|
||||
a.nonresident_price AS "nonresidentPrice",
|
||||
a.old15_length AS "old15Length",
|
||||
a.resident_price AS "residentPrice",
|
||||
a.setup_time AS "setupTime",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.tree_id AS "treeId",
|
||||
a.order_id AS "orderId"
|
||||
</sql>
|
||||
|
||||
<sql id="thermalcompanyJoins">
|
||||
</sql>
|
||||
|
||||
<select id="findList" resultType="org.jeecg.modules.heating.entity.Thermalcompany">
|
||||
SELECT
|
||||
<include refid="thermalcompanyColumns"/>
|
||||
FROM BL_thermalcompany a
|
||||
<include refid="thermalcompanyJoins"/>
|
||||
<where>
|
||||
a.region_type = #{regionType}
|
||||
AND a.del_flag = '0'
|
||||
<if test="companyName != null and companyName != ''">
|
||||
AND a.company_name LIKE concat('%',#{companyName},'%')
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
AND a.id = #{id}
|
||||
</if>
|
||||
<if test="dutyPeople != null and dutyPeople != ''">
|
||||
AND a.duty_people LIKE concat('%',#{dutyPeople},'%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.heating.entity.DataExtractConfig;
|
||||
|
||||
/**
|
||||
* @Description: 数据抽取配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DataExtractConfigService extends IService<DataExtractConfig> {
|
||||
IPage<DataExtractConfig> findPage(Page<DataExtractConfig> page, DataExtractConfig dataExtractConfig);
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.service.JeecgService;
|
||||
import org.jeecg.modules.heating.entity.HeatanalysisHistory;
|
||||
import java.util.List;
|
||||
|
||||
public interface HeatanalysisHistoryService extends JeecgService<HeatanalysisHistory> {
|
||||
IPage<HeatanalysisHistory> findPage(Page<HeatanalysisHistory> page,HeatanalysisHistory heatanalysisHistory);
|
||||
IPage<HeatanalysisHistory> findJxPage(Page<HeatanalysisHistory> page,HeatanalysisHistory heatanalysisHistory);
|
||||
Result<?> findHistoryList(HeatanalysisHistory heatanalysisHistory);
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.common.system.base.service.JeecgService;
|
||||
import org.jeecg.modules.heating.entity.Heatanalysis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HeatanalysisService extends JeecgService<Heatanalysis> {
|
||||
Heatanalysis getHeatOne(Heatanalysis heatanalysis);
|
||||
IPage<Heatanalysis> findPage(Page<Heatanalysis> page,Heatanalysis heatanalysis);
|
||||
void updateType(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> findSourceList(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> findList(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> findStaticList(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> findSimulateList(Heatanalysis heatanalysis);
|
||||
void exeProc(Heatanalysis heatanalysis);
|
||||
List<Heatanalysis> lowest(Heatanalysis heatanalysis);
|
||||
|
||||
IPage<Heatanalysis> findOnePage(Page<Heatanalysis> page, Heatanalysis heatanalysis);
|
||||
IPage<Heatanalysis> findTwoPage(Page<Heatanalysis> page, Heatanalysis heatanalysis);
|
||||
IPage<Heatanalysis> findExtractedOnePage(Page<Heatanalysis> page, Heatanalysis heatanalysis);
|
||||
IPage<Heatanalysis> findExtractedTwoPage(Page<Heatanalysis> page, Heatanalysis heatanalysis);
|
||||
|
||||
void exeWater(Heatanalysis heatanalysis);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.heating.entity.Heatsource;
|
||||
import java.util.List;
|
||||
|
||||
public interface HeatsourceService extends IService<Heatsource> {
|
||||
List<Heatsource> findList(Heatsource heatsource);
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.heating.entity.Heatsourcestation;
|
||||
import java.util.List;
|
||||
|
||||
public interface HeatsourcestationService extends IService<Heatsourcestation> {
|
||||
List<Heatsourcestation> findList(Heatsourcestation heatsourcestation);
|
||||
List<Heatsourcestation> findCompanyList(Heatsourcestation heatsourcestation);
|
||||
List<Heatsourcestation> findSourceList(Heatsourcestation heatsourcestation);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.heating.entity.Markinfo;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface MarkinfoService extends IService<Markinfo> {
|
||||
List<Map<String, Object>> queryTree();
|
||||
List<Markinfo> findList(Markinfo markinfo);
|
||||
Markinfo getMarkinfo(Markinfo markinfo);
|
||||
Result<?> getPointInfo(Markinfo markinfo);
|
||||
void delete(Markinfo markinfo);
|
||||
void deleteAll();
|
||||
List<Markinfo> sourceList(Markinfo markinfo);
|
||||
List<Markinfo> stationList(Markinfo markinfo);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.heating.entity.Simconfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 设备信息管理
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface SimconfigService extends IService<Simconfig> {
|
||||
List<Simconfig> findCompanyList(Simconfig simconfig);
|
||||
List<Simconfig> findSourceList(Simconfig simconfig);
|
||||
List<Simconfig> findStationList(Simconfig simconfig);
|
||||
List<Simconfig> findSimconfig(Simconfig simconfig);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import org.jeecg.common.system.base.service.JeecgService;
|
||||
import org.jeecg.modules.heating.entity.Substation;
|
||||
import java.util.List;
|
||||
|
||||
public interface SubstationService extends JeecgService<Substation> {
|
||||
List<Substation> findList(Substation substation);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package org.jeecg.modules.heating.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.heating.entity.Thermalcompany;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThermalcompanyService extends IService<Thermalcompany> {
|
||||
List<Thermalcompany> findList(Thermalcompany thermalcompany);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.heating.entity.DataExtractConfig;
|
||||
import org.jeecg.modules.heating.mapper.DataExtractConfigMapper;
|
||||
import org.jeecg.modules.heating.service.DataExtractConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 数据抽取配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DataExtractConfigServiceImpl extends ServiceImpl<DataExtractConfigMapper, DataExtractConfig> implements DataExtractConfigService {
|
||||
|
||||
public IPage<DataExtractConfig> findPage(Page<DataExtractConfig> page, DataExtractConfig dataExtractConfig){
|
||||
return baseMapper.findPage(page,dataExtractConfig);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.service.impl.JeecgServiceImpl;
|
||||
import org.jeecg.modules.heating.entity.HeatanalysisHistory;
|
||||
import org.jeecg.modules.heating.entity.Heatsource;
|
||||
import org.jeecg.modules.heating.mapper.HeatanalysisHistoryMapper;
|
||||
import org.jeecg.modules.heating.mapper.HeatsourceMapper;
|
||||
import org.jeecg.modules.heating.service.HeatanalysisHistoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class HeatanalysisHistoryServiceImpl extends JeecgServiceImpl<HeatanalysisHistoryMapper, HeatanalysisHistory> implements HeatanalysisHistoryService {
|
||||
|
||||
@Autowired
|
||||
HeatsourceMapper heatsourceMapper;
|
||||
|
||||
public IPage<HeatanalysisHistory> findPage(Page<HeatanalysisHistory> page,HeatanalysisHistory heatanalysisHistory){
|
||||
Date sDate = heatanalysisHistory.getSDate();
|
||||
String sDateStr = "";
|
||||
SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
if(sDate!=null){
|
||||
sDateStr = sdf.format(sDate);
|
||||
}else{
|
||||
sDateStr = sdf.format(new Date());
|
||||
heatanalysisHistory.setSDate(sDate);
|
||||
}
|
||||
String tableName = "bl_heatanalysis_"+sDateStr.substring(2, 4)+sDateStr.substring(5, 7);
|
||||
heatanalysisHistory.setTableName(tableName);
|
||||
Date eDate = heatanalysisHistory.getEDate();
|
||||
if(eDate==null){
|
||||
eDate = new Date();
|
||||
heatanalysisHistory.setEDate(eDate);
|
||||
}
|
||||
return baseMapper.findPage(page,heatanalysisHistory);
|
||||
}
|
||||
|
||||
public IPage<HeatanalysisHistory> findJxPage(Page<HeatanalysisHistory> page,HeatanalysisHistory heatanalysisHistory){
|
||||
Date sDate = heatanalysisHistory.getSDate();
|
||||
String sDateStr = "";
|
||||
SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
if(sDate!=null){
|
||||
sDateStr = sdf.format(sDate);
|
||||
}else{
|
||||
sDateStr = sdf.format(new Date());
|
||||
heatanalysisHistory.setSDate(sDate);
|
||||
}
|
||||
String tableName = "bl_heatanalysis_"+sDateStr.substring(2, 4)+sDateStr.substring(5, 7);
|
||||
heatanalysisHistory.setTableName(tableName);
|
||||
Date eDate = heatanalysisHistory.getEDate();
|
||||
if(eDate==null){
|
||||
eDate = new Date();
|
||||
heatanalysisHistory.setEDate(eDate);
|
||||
}
|
||||
return baseMapper.findJxPage(page,heatanalysisHistory);
|
||||
}
|
||||
|
||||
public Result<?> findHistoryList(HeatanalysisHistory heatanalysisHistory){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String startDate = heatanalysisHistory.getStartDate();
|
||||
if(startDate==null||startDate.equals("")) {
|
||||
startDate = dayFormat.format(new Date());
|
||||
heatanalysisHistory.setStartDate(startDate);
|
||||
}
|
||||
if(startDate!=null&&!startDate.equals("")){
|
||||
String sDateStr = startDate+" 00:00:00";
|
||||
Date sDate = null;
|
||||
try {
|
||||
sDate = timeFormat.parse(sDateStr);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
heatanalysisHistory.setSDate(sDate);
|
||||
}
|
||||
String tableName = "bl_heatanalysis_"+startDate.substring(2, 4)+startDate.substring(5, 7);
|
||||
heatanalysisHistory.setTableName(tableName);
|
||||
String endDate = heatanalysisHistory.getEndDate();
|
||||
if(endDate==null||endDate.equals("")) {
|
||||
endDate = dayFormat.format(new Date());
|
||||
heatanalysisHistory.setEndDate(endDate);
|
||||
}
|
||||
if(endDate!=null&&!endDate.equals("")){
|
||||
String eDateStr = endDate+" 23:59:59";
|
||||
Date eDate = null;
|
||||
try {
|
||||
eDate = timeFormat.parse(eDateStr);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
heatanalysisHistory.setEDate(eDate);
|
||||
}
|
||||
Integer sourceId = heatanalysisHistory.getView002();
|
||||
if(sourceId == null){
|
||||
List<Heatsource> sourceList = heatsourceMapper.findList(null);
|
||||
if(sourceList.size()>0){
|
||||
Heatsource heatsource = sourceList.get(0);
|
||||
heatanalysisHistory.setView002(heatsource.getId());
|
||||
}
|
||||
}
|
||||
List<HeatanalysisHistory> list = baseMapper.findHistoryList(heatanalysisHistory);
|
||||
map.put("data",heatanalysisHistory);
|
||||
map.put("list",list);
|
||||
return Result.ok(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.common.system.base.service.impl.JeecgServiceImpl;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.heating.entity.Heatanalysis;
|
||||
import org.jeecg.modules.heating.mapper.HeatanalysisMapper;
|
||||
import org.jeecg.modules.heating.service.HeatanalysisService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class HeatanalysisServiceImpl extends JeecgServiceImpl<HeatanalysisMapper, Heatanalysis> implements HeatanalysisService {
|
||||
|
||||
public Heatanalysis getHeatOne(Heatanalysis heatanalysis) {
|
||||
return baseMapper.getHeatOne(heatanalysis);
|
||||
}
|
||||
|
||||
public IPage<Heatanalysis> findPage(Page<Heatanalysis> page,Heatanalysis heatanalysis){
|
||||
return baseMapper.findPage(page,heatanalysis);
|
||||
}
|
||||
|
||||
public void updateType(Heatanalysis heatanalysis){
|
||||
baseMapper.updateType(heatanalysis);
|
||||
}
|
||||
|
||||
public List<Heatanalysis> findList(Heatanalysis heatanalysis){
|
||||
return baseMapper.findList(heatanalysis);
|
||||
}
|
||||
|
||||
public List<Heatanalysis> findSourceList(Heatanalysis heatanalysis){
|
||||
return baseMapper.findSourceList(heatanalysis);
|
||||
}
|
||||
|
||||
public List<Heatanalysis> findStaticList(Heatanalysis heatanalysis){
|
||||
return baseMapper.findStaticList(heatanalysis);
|
||||
}
|
||||
|
||||
public List<Heatanalysis> findSimulateList(Heatanalysis heatanalysis){
|
||||
return baseMapper.findSimulateList(heatanalysis);
|
||||
}
|
||||
|
||||
public void exeProc(Heatanalysis heatanalysis){
|
||||
baseMapper.exeProc(heatanalysis);
|
||||
}
|
||||
|
||||
public List<Heatanalysis> lowest(Heatanalysis heatanalysis){
|
||||
heatanalysis.setTableName(getTableName());
|
||||
try {
|
||||
String s = DateUtils.formatDate(new Date(), "yyyy-MM-dd 00:00:00");
|
||||
heatanalysis.setDatatime(DateUtils.parseDate(s, "yyyy-MM-dd HH:mm:ss"));
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return baseMapper.lowest(heatanalysis);
|
||||
}
|
||||
|
||||
private String getTableName(){
|
||||
SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String SDate = sdf.format(new Date());
|
||||
String tableName = "heatanalysis_"+SDate.substring(2, 4)+SDate.substring(5, 7);
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public IPage<Heatanalysis> findOnePage(Page<Heatanalysis> page, Heatanalysis heatanalysis){
|
||||
return baseMapper.findOnePage(page,heatanalysis);
|
||||
}
|
||||
|
||||
public IPage<Heatanalysis> findTwoPage(Page<Heatanalysis> page, Heatanalysis heatanalysis){
|
||||
return baseMapper.findTwoPage(page,heatanalysis);
|
||||
}
|
||||
|
||||
public IPage<Heatanalysis> findExtractedOnePage(Page<Heatanalysis> page, Heatanalysis heatanalysis){
|
||||
return baseMapper.findExtractedOnePage(page,heatanalysis);
|
||||
}
|
||||
|
||||
public IPage<Heatanalysis> findExtractedTwoPage(Page<Heatanalysis> page, Heatanalysis heatanalysis){
|
||||
return baseMapper.findExtractedTwoPage(page,heatanalysis);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exeWater(Heatanalysis heatanalysis) {
|
||||
baseMapper.exeWater(heatanalysis);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.heating.entity.Heatsource;
|
||||
import org.jeecg.modules.heating.mapper.HeatsourceMapper;
|
||||
import org.jeecg.modules.heating.service.HeatsourceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class HeatsourceServiceImpl extends ServiceImpl<HeatsourceMapper, Heatsource> implements HeatsourceService {
|
||||
|
||||
@Autowired
|
||||
HeatsourceMapper mapper;
|
||||
|
||||
public List<Heatsource> findList(Heatsource heatsource) {
|
||||
return mapper.findList(heatsource);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.heating.entity.Heatsourcestation;
|
||||
import org.jeecg.modules.heating.mapper.HeatsourcestationMapper;
|
||||
import org.jeecg.modules.heating.service.HeatsourcestationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class HeatsourcestationServiceImpl extends ServiceImpl<HeatsourcestationMapper, Heatsourcestation> implements HeatsourcestationService {
|
||||
|
||||
@Autowired
|
||||
HeatsourcestationMapper mapper;
|
||||
|
||||
public List<Heatsourcestation> findList(Heatsourcestation heatsourcestation) {
|
||||
return mapper.findList(heatsourcestation);
|
||||
}
|
||||
|
||||
public List<Heatsourcestation> findCompanyList(Heatsourcestation heatsourcestation) {
|
||||
return mapper.findCompanyList(heatsourcestation);
|
||||
}
|
||||
|
||||
public List<Heatsourcestation> findSourceList(Heatsourcestation heatsourcestation) {
|
||||
return mapper.findSourceList(heatsourcestation);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.heating.entity.Heatsource;
|
||||
import org.jeecg.modules.heating.entity.Heatsourcestation;
|
||||
import org.jeecg.modules.heating.entity.Markinfo;
|
||||
import org.jeecg.modules.heating.entity.Thermalcompany;
|
||||
import org.jeecg.modules.heating.mapper.HeatsourceMapper;
|
||||
import org.jeecg.modules.heating.mapper.HeatsourcestationMapper;
|
||||
import org.jeecg.modules.heating.mapper.MarkinfoMapper;
|
||||
import org.jeecg.modules.heating.mapper.ThermalcompanyMapper;
|
||||
import org.jeecg.modules.heating.service.MarkinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class MarkinfoServiceImpl extends ServiceImpl<MarkinfoMapper, Markinfo> implements MarkinfoService {
|
||||
|
||||
@Autowired
|
||||
private ThermalcompanyMapper thermalcompanyMapper;
|
||||
@Autowired
|
||||
private HeatsourceMapper heatsourceMapper;
|
||||
@Autowired
|
||||
private HeatsourcestationMapper heatsourcestationMapper;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryTree() {
|
||||
List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
|
||||
|
||||
QueryWrapper<Thermalcompany> companyWrapper = new QueryWrapper<>();
|
||||
companyWrapper.eq("del_flag","0");
|
||||
companyWrapper.orderByAsc("id");
|
||||
List<Thermalcompany> companyList = thermalcompanyMapper.selectList(companyWrapper);
|
||||
|
||||
QueryWrapper<Heatsource> heatsourceWrapper = new QueryWrapper<>();
|
||||
heatsourceWrapper.eq("del_flag","0");
|
||||
heatsourceWrapper.orderByAsc("id");
|
||||
List<Heatsource> heatsourceList = heatsourceMapper.selectList(heatsourceWrapper);
|
||||
|
||||
QueryWrapper<Heatsourcestation> stationWrapper = new QueryWrapper<>();
|
||||
stationWrapper.eq("del_flag","0");
|
||||
stationWrapper.orderByAsc("id");
|
||||
List<Heatsourcestation> stationList = heatsourcestationMapper.selectList(stationWrapper);
|
||||
|
||||
List<Map<String,Object>> heatsourceMapList = new ArrayList<Map<String,Object>>();
|
||||
for(Heatsource par : heatsourceList){
|
||||
Map<String,Object> heatsourceMap = new HashMap<String,Object>();
|
||||
List<Map<String,Object>> stationMapList = new ArrayList<Map<String,Object>>();
|
||||
for(Heatsourcestation heatsourcestation:stationList){
|
||||
if(StringUtils.equals(heatsourcestation.getSourceId(),par.getId().toString())){
|
||||
Map<String,Object> stationMap = new HashMap<String,Object>();
|
||||
stationMap.put("key","c_"+heatsourcestation.getId());
|
||||
stationMap.put("title",heatsourcestation.getStationName());
|
||||
stationMapList.add(stationMap);
|
||||
}
|
||||
}
|
||||
heatsourceMap.put("key","b_"+par.getId());
|
||||
heatsourceMap.put("parentId","a_"+par.getCompanyId());
|
||||
heatsourceMap.put("title",par.getSourceName());
|
||||
heatsourceMap.put("children",stationMapList);
|
||||
heatsourceMapList.add(heatsourceMap);
|
||||
}
|
||||
|
||||
List<Map<String,Object>> infoMapList = new ArrayList<Map<String,Object>>();
|
||||
for(Thermalcompany par : companyList){
|
||||
Map<String,Object> infoMap = new HashMap<String,Object>();
|
||||
List<Map<String,Object>> heatsourceMap2List = new ArrayList<Map<String,Object>>();
|
||||
for(Map<String,Object> heatsourcePar : heatsourceMapList){
|
||||
if(StringUtils.equals("a_"+par.getId(),heatsourcePar.get("parentId").toString())){
|
||||
heatsourceMap2List.add(heatsourcePar);
|
||||
}
|
||||
}
|
||||
infoMap.put("key","a_"+par.getId());
|
||||
infoMap.put("title",par.getCompanyName());
|
||||
infoMap.put("children",heatsourceMap2List);
|
||||
infoMapList.add(infoMap);
|
||||
}
|
||||
return infoMapList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Markinfo> findList(Markinfo markinfo) {
|
||||
return baseMapper.findList(markinfo);
|
||||
}
|
||||
@Override
|
||||
public Markinfo getMarkinfo(Markinfo markinfo) {
|
||||
return baseMapper.getMarkinfo(markinfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> getPointInfo(Markinfo markinfo) {
|
||||
List<Markinfo> infoList= baseMapper.findList(markinfo);
|
||||
if(infoList!=null&&infoList.size()>0){
|
||||
String typeFlag = infoList.get(0).getTypeFlag();
|
||||
String id = infoList.get(0).getStationId();
|
||||
id = id.replaceAll("b_","").replaceAll("c_","");
|
||||
if(typeFlag.equals("1")){
|
||||
Heatsource heatsource = heatsourceMapper.selectById(id);
|
||||
heatsource.setTypeFlag(typeFlag);
|
||||
return Result.ok(heatsource);
|
||||
}else{
|
||||
Heatsourcestation heatsourcestation = heatsourcestationMapper.selectById(id);
|
||||
heatsourcestation.setTypeFlag(typeFlag);
|
||||
return Result.ok(heatsourcestation);
|
||||
}
|
||||
}
|
||||
return Result.error("暂无该热源信息");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Markinfo markinfo){
|
||||
List<Markinfo> infoList= baseMapper.findList(markinfo);
|
||||
for(Markinfo info :infoList){
|
||||
baseMapper.deleteById(info.getId());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void deleteAll() {
|
||||
baseMapper.deleteAll();
|
||||
}
|
||||
|
||||
public List<Markinfo> sourceList(Markinfo markinfo) {
|
||||
return baseMapper.sourceList(markinfo);
|
||||
}
|
||||
|
||||
public List<Markinfo> stationList(Markinfo markinfo) {
|
||||
return baseMapper.stationList(markinfo);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import org.jeecg.modules.heating.entity.Simconfig;
|
||||
import org.jeecg.modules.heating.mapper.SimconfigMapper;
|
||||
import org.jeecg.modules.heating.service.SimconfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 设备信息管理
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class SimconfigServiceImpl extends ServiceImpl<SimconfigMapper, Simconfig> implements SimconfigService {
|
||||
public List<Simconfig> findCompanyList(Simconfig simconfig) {
|
||||
return baseMapper.findCompanyList(simconfig);
|
||||
}
|
||||
public List<Simconfig> findSourceList(Simconfig simconfig) {
|
||||
return baseMapper.findSourceList(simconfig);
|
||||
}
|
||||
public List<Simconfig> findStationList(Simconfig simconfig) {
|
||||
return baseMapper.findStationList(simconfig);
|
||||
}
|
||||
public List<Simconfig> findSimconfig(Simconfig simconfig) {
|
||||
return baseMapper.findSimconfig(simconfig);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import org.jeecg.common.system.base.service.impl.JeecgServiceImpl;
|
||||
import org.jeecg.modules.heating.entity.Substation;
|
||||
import org.jeecg.modules.heating.mapper.SubstationMapper;
|
||||
import org.jeecg.modules.heating.service.SubstationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SubstationServiceImpl extends JeecgServiceImpl<SubstationMapper, Substation> implements SubstationService {
|
||||
|
||||
@Autowired
|
||||
SubstationMapper mapper;
|
||||
|
||||
public List<Substation> findList(Substation substation) {
|
||||
return mapper.findList(substation);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.heating.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.heating.entity.Thermalcompany;
|
||||
import org.jeecg.modules.heating.mapper.ThermalcompanyMapper;
|
||||
import org.jeecg.modules.heating.service.ThermalcompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ThermalcompanyServiceImpl extends ServiceImpl<ThermalcompanyMapper, Thermalcompany> implements ThermalcompanyService {
|
||||
|
||||
@Autowired
|
||||
ThermalcompanyMapper mapper;
|
||||
|
||||
public List<Thermalcompany> findList(Thermalcompany thermalcompany) {
|
||||
return mapper.findList(thermalcompany);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
package org.jeecg.modules.message.util;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.ParseException;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.client.methods.HttpUriRequest;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.protocol.HTTP;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
public class HttpPostTest {
|
||||
private static Logger log = LoggerFactory.getLogger(HttpPostTest.class);
|
||||
Map<String, String> params;
|
||||
String url;
|
||||
public static String post(String url, Map<String, String> params) {
|
||||
DefaultHttpClient httpclient = new DefaultHttpClient();
|
||||
String body = null;
|
||||
|
||||
log.info("create httppost:" + url);
|
||||
HttpPost post = postForm(url, params);
|
||||
|
||||
body = invoke(httpclient, post);
|
||||
|
||||
httpclient.getConnectionManager().shutdown();
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
|
||||
public static String uploadData(String url, Map<String, String> params,String token) {
|
||||
DefaultHttpClient httpclient = new DefaultHttpClient();
|
||||
String body = null;
|
||||
|
||||
log.info("create httppost:" + url);
|
||||
HttpPost post = postForm(url, params);
|
||||
post.setHeader("Authorization","Bearer "+token);
|
||||
// post.setHeader("Content-Type","application/json");
|
||||
body = invoke(httpclient, post);
|
||||
httpclient.getConnectionManager().shutdown();
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
public HttpPostTest(String url, Map<String, String> params){
|
||||
this.url = url;
|
||||
this.params = params;
|
||||
}
|
||||
public static String get(String url) {
|
||||
DefaultHttpClient httpclient = new DefaultHttpClient();
|
||||
String body = null;
|
||||
|
||||
log.info("create httppost:" + url);
|
||||
HttpGet get = new HttpGet(url);
|
||||
body = invoke(httpclient, get);
|
||||
|
||||
httpclient.getConnectionManager().shutdown();
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
|
||||
private static String invoke(DefaultHttpClient httpclient,
|
||||
HttpUriRequest httpost) {
|
||||
|
||||
HttpResponse response = sendRequest(httpclient, httpost);
|
||||
String body = paseResponse(response);
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
private static String paseResponse(HttpResponse response) {
|
||||
log.info("get response from http server..");
|
||||
HttpEntity entity = response.getEntity();
|
||||
|
||||
log.info("response status: " + response.getStatusLine());
|
||||
String charset = EntityUtils.getContentCharSet(entity);
|
||||
log.info(charset);
|
||||
|
||||
String body = null;
|
||||
try {
|
||||
body = EntityUtils.toString(entity);
|
||||
log.info(body);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
private static HttpResponse sendRequest(DefaultHttpClient httpclient,
|
||||
HttpUriRequest httpost) {
|
||||
log.info("execute post...");
|
||||
HttpResponse response = null;
|
||||
|
||||
try {
|
||||
response = httpclient.execute(httpost);
|
||||
} catch (ClientProtocolException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
private static HttpPost postForm(String url, Map<String, String> params){
|
||||
|
||||
HttpPost httpost = new HttpPost(url);
|
||||
List<NameValuePair> nvps = new ArrayList <NameValuePair>();
|
||||
|
||||
Set<String> keySet = params.keySet();
|
||||
for(String key : keySet) {
|
||||
nvps.add(new BasicNameValuePair(key, params.get(key)));
|
||||
}
|
||||
|
||||
try {
|
||||
log.info("set utf-8 form entity to httppost");
|
||||
httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return httpost;
|
||||
}
|
||||
|
||||
public static void main(String []agrs){
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("name", "jeeplus");
|
||||
params.put("password", "admin");
|
||||
|
||||
String xml = HttpPostTest.post("http://localhost:8080/HeartCare/a/login", params);
|
||||
}
|
||||
|
||||
public String post(){
|
||||
|
||||
// Map<String, String> params = new HashMap<String, String>();
|
||||
// params.put("name", "admin");
|
||||
// params.put("password", "admin");
|
||||
|
||||
String xml = HttpPostTest.post(url, params);
|
||||
return xml;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package org.jeecg.modules.temperature.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.modules.temperature.entity.Temperature;
|
||||
import org.jeecg.modules.temperature.service.TemperatureService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/temp/temperature")
|
||||
public class TemperatureController extends JeecgController<Temperature, TemperatureService> {
|
||||
@Autowired
|
||||
private TemperatureService service;
|
||||
|
||||
/**
|
||||
* 查询1条
|
||||
*
|
||||
* @param Temperature
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/findOne")
|
||||
public Result<?> findOne(Temperature Temperature, HttpServletRequest req) {
|
||||
Temperature temp = service.findOne(Temperature);
|
||||
return Result.ok(temp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param Temperature
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryList(Temperature Temperature, HttpServletRequest req) {
|
||||
List<Temperature> list = service.findList(Temperature);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package org.jeecg.modules.temperature.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>Class:室内温度
|
||||
* <p>功能描述:功能描述
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_temperature")
|
||||
public class Temperature extends JeecgEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String code;
|
||||
private String upPeri;
|
||||
private String csq;
|
||||
private String bat;
|
||||
private String errNet;
|
||||
private String errTemp;
|
||||
private String offLine;
|
||||
private String errMove;
|
||||
private String reserved;
|
||||
private String roomTemp;
|
||||
private String humidity;
|
||||
private String reportTime;
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
// private Date createTime;
|
||||
@TableField(exist = false)
|
||||
private String reportHour;
|
||||
@TableField(exist = false)
|
||||
private String SDate;//开始时间
|
||||
@TableField(exist = false)
|
||||
private String EDate;//结束时间
|
||||
@TableField(exist = false)
|
||||
private String tableName;//表名字
|
||||
|
||||
@TableField(exist = false)
|
||||
private String houseName;//房屋名字
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package org.jeecg.modules.temperature.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.temperature.entity.Temperature;
|
||||
import java.util.List;
|
||||
|
||||
public interface TemperatureMapper extends BaseMapper<Temperature> {
|
||||
Temperature findOne(Temperature temperature);
|
||||
List<Temperature> findList(Temperature temperature);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.temperature.mapper.TemperatureMapper">
|
||||
|
||||
<select id="findOne" resultType="org.jeecg.modules.temperature.entity.Temperature">
|
||||
SELECT
|
||||
a.id,
|
||||
a.code,
|
||||
up_peri,
|
||||
csq,
|
||||
bat,
|
||||
err_net,
|
||||
err_temp,
|
||||
off_line,
|
||||
err_move,
|
||||
reserved,
|
||||
room_temp,
|
||||
humidity,
|
||||
report_time,
|
||||
create_time,
|
||||
(select b.house_name from bl_temperature_house b where a.code = b.code and b.del_flag = '0' limit 1) houseName
|
||||
FROM
|
||||
${tableName} a
|
||||
<where>
|
||||
<if test="code != null and code != ''">
|
||||
AND code = #{code}
|
||||
</if>
|
||||
<if test="SDate != null and SDate != ''">
|
||||
AND report_time >= #{SDate}
|
||||
</if>
|
||||
<if test="EDate != null and EDate != ''">
|
||||
AND report_time <#{EDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
report_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="findList" resultType="org.jeecg.modules.temperature.entity.Temperature">
|
||||
SELECT code,
|
||||
max(room_temp) as roomTemp,
|
||||
DATE_FORMAT(report_time, '%H') reportHour,
|
||||
concat(DATE_FORMAT(now(), '%Y-%m-%d %H'),':00') reportTime,
|
||||
(select b.house_name from bl_temperature_house b where a.code = b.code and b.del_flag = '0' limit 1) houseName
|
||||
FROM ${tableName} a
|
||||
<where>
|
||||
<if test="code != null and code != ''">
|
||||
AND code = #{code}
|
||||
</if>
|
||||
<if test="SDate != null and SDate != ''">
|
||||
AND report_time >= #{SDate}
|
||||
</if>
|
||||
<if test="EDate != null and EDate != ''">
|
||||
AND report_time <#{EDate}
|
||||
</if>
|
||||
</where>
|
||||
group by reportTime,reportHour,code
|
||||
ORDER BY reportHour asc,code asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package org.jeecg.modules.temperature.service;
|
||||
|
||||
import org.jeecg.common.system.base.service.JeecgService;
|
||||
import org.jeecg.modules.temperature.entity.Temperature;
|
||||
import java.util.List;
|
||||
|
||||
public interface TemperatureService extends JeecgService<Temperature> {
|
||||
Temperature findOne(Temperature temperature);
|
||||
List<Temperature> findList(Temperature temperature);
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package org.jeecg.modules.temperature.service.impl;
|
||||
|
||||
import org.jeecg.common.system.base.service.impl.JeecgServiceImpl;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.temperature.entity.Temperature;
|
||||
import org.jeecg.modules.temperature.mapper.TemperatureMapper;
|
||||
import org.jeecg.modules.temperature.service.TemperatureService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TemperatureServiceImpl extends JeecgServiceImpl<TemperatureMapper, Temperature> implements TemperatureService {
|
||||
|
||||
@Override
|
||||
public Temperature findOne(Temperature temperature){
|
||||
String suffix = "";
|
||||
String SDate = temperature.getSDate();
|
||||
if(SDate==null||SDate.equals("")){
|
||||
SDate = new SimpleDateFormat("YYYY-MM-dd").format(new Date())+" 00:00:00";
|
||||
suffix = new SimpleDateFormat("YYMM").format(new Date());
|
||||
}else{
|
||||
suffix = SDate.substring(2, 4)+SDate.substring(5, 7);
|
||||
}
|
||||
temperature.setTableName("bl_temperature_"+suffix);
|
||||
if(SDate.length()<=10){
|
||||
SDate = SDate +" 00:00:00";
|
||||
}
|
||||
temperature.setSDate(SDate);
|
||||
|
||||
String EDate = temperature.getEDate();
|
||||
if(EDate==null||EDate.equals("")) {
|
||||
// EDate = new SimpleDateFormat("YYYY-MM-dd").format(new Date()) + " 23:59:59";
|
||||
EDate = SDate.substring(0,10)+ " 23:59:59";
|
||||
}
|
||||
if(EDate.length()<=10){
|
||||
EDate = EDate +" 23:59:59";
|
||||
}
|
||||
temperature.setEDate(EDate);
|
||||
return baseMapper.findOne(temperature);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Temperature> findList(Temperature temperature){
|
||||
String suffix = "";
|
||||
String SDate = temperature.getSDate();
|
||||
if(SDate==null||SDate.equals("")){
|
||||
SDate = new SimpleDateFormat("YYYY-MM-dd").format(new Date())+" 00:00:00";
|
||||
suffix = new SimpleDateFormat("YYMM").format(new Date());
|
||||
}else{
|
||||
suffix = SDate.substring(2, 4)+SDate.substring(5, 7);
|
||||
}
|
||||
temperature.setTableName("bl_temperature_"+suffix);
|
||||
if(SDate.length()<=10){
|
||||
SDate = SDate +" 00:00:00";
|
||||
}
|
||||
temperature.setSDate(SDate);
|
||||
|
||||
String EDate = temperature.getEDate();
|
||||
if(EDate==null||EDate.equals("")) {
|
||||
// EDate = new SimpleDateFormat("YYYY-MM-dd").format(new Date()) + " 23:59:59";
|
||||
EDate = SDate.substring(0,10)+ " 23:59:59";
|
||||
}
|
||||
if(EDate.length()<=10){
|
||||
EDate = EDate +" 23:59:59";
|
||||
}
|
||||
temperature.setEDate(EDate);
|
||||
return baseMapper.findList(temperature);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package org.jeecg.modules.waterFlowConfig.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig;
|
||||
import org.jeecg.modules.waterFlowConfig.service.IBlWaterFlowConfigService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 热量水流量配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Tag(name="热量水流量配置")
|
||||
@RestController
|
||||
@RequestMapping("/waterFlowConfig/blWaterFlowConfig")
|
||||
@Slf4j
|
||||
public class BlWaterFlowConfigController extends JeecgController<BlWaterFlowConfig, IBlWaterFlowConfigService> {
|
||||
@Autowired
|
||||
private IBlWaterFlowConfigService blWaterFlowConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param blWaterFlowConfig
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "热量水流量配置-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<BlWaterFlowConfig>> queryPageList(BlWaterFlowConfig blWaterFlowConfig,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("companyCompanyId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("sourceSourceId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("stationStationId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<BlWaterFlowConfig> queryWrapper = QueryGenerator.initQueryWrapper(blWaterFlowConfig, req.getParameterMap(),customeRuleMap);
|
||||
Page<BlWaterFlowConfig> page = new Page<BlWaterFlowConfig>(pageNo, pageSize);
|
||||
IPage<BlWaterFlowConfig> pageList = blWaterFlowConfigService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param blWaterFlowConfig
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热量水流量配置-添加")
|
||||
@RequiresPermissions("waterFlowConfig:bl_water_flow_config:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody BlWaterFlowConfig blWaterFlowConfig) {
|
||||
blWaterFlowConfigService.save(blWaterFlowConfig);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param blWaterFlowConfig
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热量水流量配置-编辑")
|
||||
@RequiresPermissions("waterFlowConfig:bl_water_flow_config:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody BlWaterFlowConfig blWaterFlowConfig) {
|
||||
blWaterFlowConfigService.updateById(blWaterFlowConfig);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热量水流量配置-通过id删除")
|
||||
@RequiresPermissions("waterFlowConfig:bl_water_flow_config:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
blWaterFlowConfigService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "热量水流量配置-批量删除")
|
||||
@RequiresPermissions("waterFlowConfig:bl_water_flow_config:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.blWaterFlowConfigService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "热量水流量配置-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<BlWaterFlowConfig> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BlWaterFlowConfig blWaterFlowConfig = blWaterFlowConfigService.getById(id);
|
||||
if(blWaterFlowConfig==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(blWaterFlowConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param blWaterFlowConfig
|
||||
*/
|
||||
@RequiresPermissions("waterFlowConfig:bl_water_flow_config:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, BlWaterFlowConfig blWaterFlowConfig) {
|
||||
return super.exportXls(request, blWaterFlowConfig, BlWaterFlowConfig.class, "热量水流量配置");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("waterFlowConfig:bl_water_flow_config:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, BlWaterFlowConfig.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package org.jeecg.modules.waterFlowConfig.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 热量水流量配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_water_flow_config")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Tag(name ="bl_water_flow_config对象", description="热量水流量配置")
|
||||
public class BlWaterFlowConfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private java.lang.Integer id;
|
||||
/**sn*/
|
||||
@Excel(name = "sn", width = 15)
|
||||
private java.lang.String sn;
|
||||
/**注册设备时间*/
|
||||
@Excel(name = "注册设备时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date occurtime;
|
||||
/**公司名称*/
|
||||
@Excel(name = "公司名称", width = 15, dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id")
|
||||
@Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id")
|
||||
private java.lang.String companyCompanyId;
|
||||
/**热源名称*/
|
||||
@Excel(name = "热源名称", width = 15, dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id")
|
||||
@Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id")
|
||||
private java.lang.String sourceSourceId;
|
||||
/**换热站名称*/
|
||||
@Excel(name = "换热站名称", width = 15, dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id")
|
||||
@Dict(dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id")
|
||||
private java.lang.String stationStationId;
|
||||
/**热力分所名称*/
|
||||
@Excel(name = "热力分所名称", width = 15)
|
||||
private java.lang.String substationId;
|
||||
/**创建者*/
|
||||
private java.lang.String createBy;
|
||||
/**创建时间*/
|
||||
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date createDate;
|
||||
/**更改者*/
|
||||
private java.lang.String updateBy;
|
||||
/**更改时间*/
|
||||
@Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date updateDate;
|
||||
/**删除标识*/
|
||||
@Excel(name = "删除标识", width = 15)
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**地区类型*/
|
||||
@Excel(name = "地区类型", width = 15)
|
||||
private java.lang.String regionType;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.waterFlowConfig.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 热量水流量配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BlWaterFlowConfigMapper extends BaseMapper<BlWaterFlowConfig> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.waterFlowConfig.mapper.BlWaterFlowConfigMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.waterFlowConfig.service;
|
||||
|
||||
import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 热量水流量配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBlWaterFlowConfigService extends IService<BlWaterFlowConfig> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.waterFlowConfig.service.impl;
|
||||
|
||||
import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig;
|
||||
import org.jeecg.modules.waterFlowConfig.mapper.BlWaterFlowConfigMapper;
|
||||
import org.jeecg.modules.waterFlowConfig.service.IBlWaterFlowConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 热量水流量配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BlWaterFlowConfigServiceImpl extends ServiceImpl<BlWaterFlowConfigMapper, BlWaterFlowConfig> implements IBlWaterFlowConfigService {
|
||||
|
||||
}
|
||||
|
|
@ -154,9 +154,9 @@ spring:
|
|||
slow-sql-millis: 5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://192.168.2.199:3306/heating?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: nu_sys
|
||||
password: nu_sys
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 多数据源配置
|
||||
#multi-datasource1:
|
||||
|
|
@ -258,7 +258,7 @@ jeecg:
|
|||
#大屏报表参数设置
|
||||
jmreport:
|
||||
#多租户模式,默认值为空(created:按照创建人隔离、tenant:按照租户隔离) (v1.6.2+ 新增)
|
||||
saasMode:
|
||||
saasMode:
|
||||
# 平台上线安全配置(v1.6.2+ 新增)
|
||||
firewall:
|
||||
# 数据源安全 (开启后,不允许使用平台数据源、SQL解析加签并且不允许查询数据库)
|
||||
|
|
|
|||
10
pom.xml
10
pom.xml
|
|
@ -19,7 +19,7 @@
|
|||
<developerConnection>http://guojusoft.com</developerConnection>
|
||||
<url>http://www.jeecg.com/vip</url>
|
||||
</scm>
|
||||
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<alibaba.nacos.version>2.0.4</alibaba.nacos.version>
|
||||
<seata.version>1.7.0</seata.version>
|
||||
<xxl-job-core.version>2.4.1</xxl-job-core.version>
|
||||
|
||||
|
||||
<fastjson.version>2.0.57</fastjson.version>
|
||||
<aviator.version>5.2.6</aviator.version>
|
||||
<pegdown.version>1.6.0</pegdown.version>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
<!-- 国产数据库驱动 -->
|
||||
<kingbase8.version>9.0.0</kingbase8.version>
|
||||
<dm8.version>8.1.1.49</dm8.version>
|
||||
|
||||
|
||||
<!-- 积木报表-->
|
||||
<jimureport-spring-boot-starter.version>2.1.2</jimureport-spring-boot-starter.version>
|
||||
<jimubi-spring-boot-starter.version>2.1.2</jimubi-spring-boot-starter.version>
|
||||
|
|
@ -540,7 +540,7 @@
|
|||
<url>http://maven.jeecg.com:8090/nexus/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
|
||||
<!-- 环境 -->
|
||||
<profiles>
|
||||
<!-- 开发 -->
|
||||
|
|
@ -640,4 +640,4 @@
|
|||
</modules>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue