运维日志
This commit is contained in:
parent
57807e4576
commit
b621dfd1e0
|
|
@ -59,6 +59,18 @@ public class HeatanalysisController extends JeecgController<Heatanalysis, Heatan
|
||||||
return Result.OK("修改状态成功!");
|
return Result.OK("修改状态成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑故障等级
|
||||||
|
*
|
||||||
|
* @param heatanalysis
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/updateFaultLevel", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> updateFaultLevel(@RequestBody Heatanalysis heatanalysis){
|
||||||
|
heatanalysisService.updateFaultLevel(heatanalysis);
|
||||||
|
return Result.OK("修改故障等级!");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
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 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.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
import org.jeecg.modules.heating.entity.HeatanalysisReamrks;
|
||||||
|
import org.jeecg.modules.heating.service.HeatanalysisReamrksService;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heating/heatanalysisRemarks")
|
||||||
|
public class HeatanalysisRemarksController extends JeecgController<HeatanalysisReamrks, HeatanalysisReamrksService> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HeatanalysisReamrksService service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param HeatanalysisReamrks
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<IPage<HeatanalysisReamrks>> queryPageList(HeatanalysisReamrks HeatanalysisReamrks,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
Page<HeatanalysisReamrks> page = new Page<HeatanalysisReamrks>(pageNo, pageSize);
|
||||||
|
IPage<HeatanalysisReamrks> pageList = service.findPage(page, HeatanalysisReamrks);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param HeatanalysisReamrks
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody HeatanalysisReamrks HeatanalysisReamrks) {
|
||||||
|
HeatanalysisReamrks.setCreateDate(new Date());
|
||||||
|
service.save(HeatanalysisReamrks);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param HeatanalysisReamrks
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody HeatanalysisReamrks HeatanalysisReamrks) {
|
||||||
|
HeatanalysisReamrks.setUpdateDate(new Date());
|
||||||
|
service.updateById(HeatanalysisReamrks);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
service.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.service.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -133,6 +133,7 @@ public class Heatanalysis extends JeecgEntity {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String tableName;//表名字
|
private String tableName;//表名字
|
||||||
private String delFlag; // 删除标识
|
private String delFlag; // 删除标识
|
||||||
|
private String faultLevel; // 故障等级
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
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 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;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Class :运维备注Entity
|
||||||
|
* <p>功能描述:功能描述
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("bl_heatanalysis_remarks")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Tag(name ="bl_heatanalysis_remarks对象", description="运维备注")
|
||||||
|
public class HeatanalysisReamrks implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
private Integer mainId;
|
||||||
|
private Integer companyId;
|
||||||
|
private String companyName;
|
||||||
|
private Integer sourceId;
|
||||||
|
private String sourceName;
|
||||||
|
private Integer stationId;
|
||||||
|
private String stationName;
|
||||||
|
private String remarks;
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createDate;
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateDate;
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -12,6 +12,7 @@ public interface HeatanalysisMapper extends BaseMapper<Heatanalysis> {
|
||||||
Heatanalysis getHeatOne(Heatanalysis heatanalysis);
|
Heatanalysis getHeatOne(Heatanalysis heatanalysis);
|
||||||
Page<Heatanalysis> findPage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
|
Page<Heatanalysis> findPage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
|
||||||
void updateType(Heatanalysis heatanalysis);
|
void updateType(Heatanalysis heatanalysis);
|
||||||
|
void updateFaultLevel(Heatanalysis heatanalysis);
|
||||||
List<Heatanalysis> findSourceList(Heatanalysis heatanalysis);
|
List<Heatanalysis> findSourceList(Heatanalysis heatanalysis);
|
||||||
List<Heatanalysis> findList(Heatanalysis heatanalysis);
|
List<Heatanalysis> findList(Heatanalysis heatanalysis);
|
||||||
List<Heatanalysis> findStaticList(Heatanalysis heatanalysis);
|
List<Heatanalysis> findStaticList(Heatanalysis heatanalysis);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
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.HeatanalysisReamrks;
|
||||||
|
|
||||||
|
public interface HeatanalysisReamrksMapper extends BaseMapper<HeatanalysisReamrks> {
|
||||||
|
Page<HeatanalysisReamrks> findPage(Page<HeatanalysisReamrks> page, @Param("params") HeatanalysisReamrks heatanalysisReamrks);
|
||||||
|
}
|
||||||
|
|
@ -73,6 +73,7 @@
|
||||||
a.view046 AS "view046",
|
a.view046 AS "view046",
|
||||||
a.view047 AS "view047",
|
a.view047 AS "view047",
|
||||||
a.sim AS "sim",
|
a.sim AS "sim",
|
||||||
|
a.code AS "code",
|
||||||
a.create_by AS "createBy.id",
|
a.create_by AS "createBy.id",
|
||||||
a.create_date AS "createDate",
|
a.create_date AS "createDate",
|
||||||
a.update_by AS "updateBy.id",
|
a.update_by AS "updateBy.id",
|
||||||
|
|
@ -80,12 +81,16 @@
|
||||||
a.del_flag AS "delFlag",
|
a.del_flag AS "delFlag",
|
||||||
a.report_type AS "reportType",
|
a.report_type AS "reportType",
|
||||||
a.is_extract AS "isExtract",
|
a.is_extract AS "isExtract",
|
||||||
|
a.region_type AS "regionType",
|
||||||
|
a.fault_level AS "faultLevel",
|
||||||
(select count(*) from bl_data_extract_config bl where bl.one_pipe_sim = a.sim or bl.two_pipe_sim = a.sim) as isExtracted,
|
(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
|
(case when datatime > DATE_ADD(NOW(), INTERVAL -10 MINUTE) then 0 else 1 end) as isTimeout
|
||||||
FROM BL_HEATANALYSIS a
|
FROM BL_HEATANALYSIS a
|
||||||
<where>
|
<where>
|
||||||
a.region_type = #{params.regionType}
|
a.del_flag = '0'
|
||||||
And a.del_flag = '0'
|
<if test="params.regionType != null and params.regionType != ''">
|
||||||
|
AND a.region_type = #{params.regionType}
|
||||||
|
</if>
|
||||||
<if test="params.view001 != null and params.view001 != ''">
|
<if test="params.view001 != null and params.view001 != ''">
|
||||||
AND a.view001 = #{params.view001}
|
AND a.view001 = #{params.view001}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -122,6 +127,9 @@
|
||||||
<if test="params.sim != null and params.sim != ''">
|
<if test="params.sim != null and params.sim != ''">
|
||||||
AND a.sim = #{params.sim}
|
AND a.sim = #{params.sim}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.faultLevel != null and params.faultLevel != ''">
|
||||||
|
AND a.fault_level = #{params.faultLevel}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
) t
|
) t
|
||||||
<where>
|
<where>
|
||||||
|
|
@ -143,6 +151,12 @@
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateFaultLevel">
|
||||||
|
UPDATE BL_HEATANALYSIS
|
||||||
|
SET fault_level = #{faultLevel}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="findSourceList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
<select id="findSourceList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||||
SELECT
|
SELECT
|
||||||
a.id AS "id",
|
a.id AS "id",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?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.HeatanalysisReamrksMapper">
|
||||||
|
<select id="findPage" resultType="org.jeecg.modules.heating.entity.HeatanalysisReamrks">
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
main_id,
|
||||||
|
company_id,
|
||||||
|
company_name,
|
||||||
|
source_id,
|
||||||
|
source_name,
|
||||||
|
station_id,
|
||||||
|
station_name,
|
||||||
|
remarks,
|
||||||
|
create_date,
|
||||||
|
update_date,
|
||||||
|
del_flag
|
||||||
|
FROM bl_heatanalysis_remarks
|
||||||
|
<where>
|
||||||
|
<if test="params.delFlag != null and params.delFlag != ''">
|
||||||
|
AND del_flag = #{params.delFlag}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY id desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
@ -40,8 +40,10 @@
|
||||||
FROM BL_thermalcompany a
|
FROM BL_thermalcompany a
|
||||||
<include refid="thermalcompanyJoins"/>
|
<include refid="thermalcompanyJoins"/>
|
||||||
<where>
|
<where>
|
||||||
a.region_type = #{regionType}
|
|
||||||
AND a.del_flag = '0'
|
AND a.del_flag = '0'
|
||||||
|
<if test="regionType != null and regionType != ''">
|
||||||
|
AND a.region_type = #{regionType}
|
||||||
|
</if>
|
||||||
<if test="companyName != null and companyName != ''">
|
<if test="companyName != null and companyName != ''">
|
||||||
AND a.company_name LIKE concat('%',#{companyName},'%')
|
AND a.company_name LIKE concat('%',#{companyName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
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.HeatanalysisReamrks;
|
||||||
|
|
||||||
|
public interface HeatanalysisReamrksService extends IService<HeatanalysisReamrks> {
|
||||||
|
IPage<HeatanalysisReamrks> findPage(Page<HeatanalysisReamrks> page, HeatanalysisReamrks heatanalysisReamrks);
|
||||||
|
}
|
||||||
|
|
@ -12,6 +12,7 @@ public interface HeatanalysisService extends JeecgService<Heatanalysis> {
|
||||||
Heatanalysis getHeatOne(Heatanalysis heatanalysis);
|
Heatanalysis getHeatOne(Heatanalysis heatanalysis);
|
||||||
IPage<Heatanalysis> findPage(Page<Heatanalysis> page,Heatanalysis heatanalysis);
|
IPage<Heatanalysis> findPage(Page<Heatanalysis> page,Heatanalysis heatanalysis);
|
||||||
void updateType(Heatanalysis heatanalysis);
|
void updateType(Heatanalysis heatanalysis);
|
||||||
|
void updateFaultLevel(Heatanalysis heatanalysis);
|
||||||
List<Heatanalysis> findSourceList(Heatanalysis heatanalysis);
|
List<Heatanalysis> findSourceList(Heatanalysis heatanalysis);
|
||||||
List<Heatanalysis> findList(Heatanalysis heatanalysis);
|
List<Heatanalysis> findList(Heatanalysis heatanalysis);
|
||||||
List<Heatanalysis> findStaticList(Heatanalysis heatanalysis);
|
List<Heatanalysis> findStaticList(Heatanalysis heatanalysis);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.jeecg.modules.heating.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.heating.entity.HeatanalysisReamrks;
|
||||||
|
import org.jeecg.modules.heating.mapper.HeatanalysisReamrksMapper;
|
||||||
|
import org.jeecg.modules.heating.service.HeatanalysisReamrksService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class HeatanalysisReamrksServiceImpl extends ServiceImpl<HeatanalysisReamrksMapper, HeatanalysisReamrks> implements HeatanalysisReamrksService {
|
||||||
|
|
||||||
|
public IPage<HeatanalysisReamrks> findPage(Page<HeatanalysisReamrks> page, HeatanalysisReamrks heatanalysisReamrks){
|
||||||
|
return baseMapper.findPage(page,heatanalysisReamrks);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -29,6 +29,10 @@ public class HeatanalysisServiceImpl extends JeecgServiceImpl<HeatanalysisMapper
|
||||||
baseMapper.updateType(heatanalysis);
|
baseMapper.updateType(heatanalysis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateFaultLevel(Heatanalysis heatanalysis){
|
||||||
|
baseMapper.updateFaultLevel(heatanalysis);
|
||||||
|
}
|
||||||
|
|
||||||
public List<Heatanalysis> findList(Heatanalysis heatanalysis){
|
public List<Heatanalysis> findList(Heatanalysis heatanalysis){
|
||||||
return baseMapper.findList(heatanalysis);
|
return baseMapper.findList(heatanalysis);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue