change - 人员信息加岗位
parent
6c7ef6495a
commit
c72ea3c9e7
@ -0,0 +1,100 @@
|
|||||||
|
package com.os.ems.report.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.os.common.annotation.Log;
|
||||||
|
import com.os.common.core.controller.BaseController;
|
||||||
|
import com.os.common.core.domain.AjaxResult;
|
||||||
|
import com.os.common.enums.BusinessType;
|
||||||
|
import com.os.ems.report.domain.EmsReportPointSteam;
|
||||||
|
import com.os.ems.report.service.IEmsReportPointSteamService;
|
||||||
|
import com.os.common.utils.poi.ExcelUtil;
|
||||||
|
import com.os.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 蒸汽整点数据Controller
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-06-11
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ems/report/reportPointSteam")
|
||||||
|
public class EmsReportPointSteamController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IEmsReportPointSteamService emsReportPointSteamService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询蒸汽整点数据列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('ems/report:reportPointSteam:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(EmsReportPointSteam emsReportPointSteam) {
|
||||||
|
startPage();
|
||||||
|
List<EmsReportPointSteam> list = emsReportPointSteamService.selectEmsReportPointSteamList(emsReportPointSteam);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出蒸汽整点数据列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('ems/report:reportPointSteam:export')")
|
||||||
|
@Log(title = "蒸汽整点数据", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, EmsReportPointSteam emsReportPointSteam) {
|
||||||
|
List<EmsReportPointSteam> list = emsReportPointSteamService.selectEmsReportPointSteamList(emsReportPointSteam);
|
||||||
|
ExcelUtil<EmsReportPointSteam> util = new ExcelUtil<EmsReportPointSteam>(EmsReportPointSteam.class);
|
||||||
|
util.exportExcel(response, list, "蒸汽整点数据数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取蒸汽整点数据详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('ems/report:reportPointSteam:query')")
|
||||||
|
@GetMapping(value = "/{objId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("objId") Long objId) {
|
||||||
|
return success(emsReportPointSteamService.selectEmsReportPointSteamByObjId(objId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增蒸汽整点数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('ems/report:reportPointSteam:add')")
|
||||||
|
@Log(title = "蒸汽整点数据", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody EmsReportPointSteam emsReportPointSteam) {
|
||||||
|
emsReportPointSteam.setCreateBy(getUsername());
|
||||||
|
return toAjax(emsReportPointSteamService.insertEmsReportPointSteam(emsReportPointSteam));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改蒸汽整点数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('ems/report:reportPointSteam:edit')")
|
||||||
|
@Log(title = "蒸汽整点数据", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody EmsReportPointSteam emsReportPointSteam) {
|
||||||
|
emsReportPointSteam.setUpdateBy(getUsername());
|
||||||
|
return toAjax(emsReportPointSteamService.updateEmsReportPointSteam(emsReportPointSteam));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除蒸汽整点数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('ems/report:reportPointSteam:remove')")
|
||||||
|
@Log(title = "蒸汽整点数据", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{objIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] objIds) {
|
||||||
|
return toAjax(emsReportPointSteamService.deleteEmsReportPointSteamByObjIds(objIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.os.ems.report.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.os.ems.report.domain.EmsReportPointSteam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 蒸汽整点数据Mapper接口
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-06-11
|
||||||
|
*/
|
||||||
|
public interface EmsReportPointSteamMapper {
|
||||||
|
/**
|
||||||
|
* 查询蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param objId 蒸汽整点数据主键
|
||||||
|
* @return 蒸汽整点数据
|
||||||
|
*/
|
||||||
|
public EmsReportPointSteam selectEmsReportPointSteamByObjId(Long objId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询蒸汽整点数据列表
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 蒸汽整点数据集合
|
||||||
|
*/
|
||||||
|
public List<EmsReportPointSteam> selectEmsReportPointSteamList(EmsReportPointSteam emsReportPointSteam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertEmsReportPointSteam(EmsReportPointSteam emsReportPointSteam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateEmsReportPointSteam(EmsReportPointSteam emsReportPointSteam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param objId 蒸汽整点数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEmsReportPointSteamByObjId(Long objId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param objIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEmsReportPointSteamByObjIds(Long[] objIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.os.ems.report.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.os.ems.report.domain.EmsReportPointSteam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 蒸汽整点数据Service接口
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-06-11
|
||||||
|
*/
|
||||||
|
public interface IEmsReportPointSteamService {
|
||||||
|
/**
|
||||||
|
* 查询蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param objId 蒸汽整点数据主键
|
||||||
|
* @return 蒸汽整点数据
|
||||||
|
*/
|
||||||
|
public EmsReportPointSteam selectEmsReportPointSteamByObjId(Long objId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询蒸汽整点数据列表
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 蒸汽整点数据集合
|
||||||
|
*/
|
||||||
|
public List<EmsReportPointSteam> selectEmsReportPointSteamList(EmsReportPointSteam emsReportPointSteam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertEmsReportPointSteam(EmsReportPointSteam emsReportPointSteam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateEmsReportPointSteam(EmsReportPointSteam emsReportPointSteam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param objIds 需要删除的蒸汽整点数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEmsReportPointSteamByObjIds(Long[] objIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除蒸汽整点数据信息
|
||||||
|
*
|
||||||
|
* @param objId 蒸汽整点数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEmsReportPointSteamByObjId(Long objId);
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.os.ems.report.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.os.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.os.ems.report.mapper.EmsReportPointSteamMapper;
|
||||||
|
import com.os.ems.report.domain.EmsReportPointSteam;
|
||||||
|
import com.os.ems.report.service.IEmsReportPointSteamService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 蒸汽整点数据Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-06-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EmsReportPointSteamServiceImpl implements IEmsReportPointSteamService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private EmsReportPointSteamMapper emsReportPointSteamMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param objId 蒸汽整点数据主键
|
||||||
|
* @return 蒸汽整点数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EmsReportPointSteam selectEmsReportPointSteamByObjId(Long objId)
|
||||||
|
{
|
||||||
|
return emsReportPointSteamMapper.selectEmsReportPointSteamByObjId(objId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询蒸汽整点数据列表
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 蒸汽整点数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<EmsReportPointSteam> selectEmsReportPointSteamList(EmsReportPointSteam emsReportPointSteam)
|
||||||
|
{
|
||||||
|
return emsReportPointSteamMapper.selectEmsReportPointSteamList(emsReportPointSteam);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertEmsReportPointSteam(EmsReportPointSteam emsReportPointSteam)
|
||||||
|
{
|
||||||
|
emsReportPointSteam.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return emsReportPointSteamMapper.insertEmsReportPointSteam(emsReportPointSteam);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param emsReportPointSteam 蒸汽整点数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateEmsReportPointSteam(EmsReportPointSteam emsReportPointSteam)
|
||||||
|
{
|
||||||
|
emsReportPointSteam.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return emsReportPointSteamMapper.updateEmsReportPointSteam(emsReportPointSteam);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除蒸汽整点数据
|
||||||
|
*
|
||||||
|
* @param objIds 需要删除的蒸汽整点数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteEmsReportPointSteamByObjIds(Long[] objIds)
|
||||||
|
{
|
||||||
|
return emsReportPointSteamMapper.deleteEmsReportPointSteamByObjIds(objIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除蒸汽整点数据信息
|
||||||
|
*
|
||||||
|
* @param objId 蒸汽整点数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteEmsReportPointSteamByObjId(Long objId)
|
||||||
|
{
|
||||||
|
return emsReportPointSteamMapper.deleteEmsReportPointSteamByObjId(objId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,124 @@
|
|||||||
|
<?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="com.os.ems.report.mapper.EmsReportPointSteamMapper">
|
||||||
|
|
||||||
|
<resultMap type="EmsReportPointSteam" id="EmsReportPointSteamResult">
|
||||||
|
<result property="objId" column="obj_id"/>
|
||||||
|
<result property="monitorCode" column="monitor_code"/>
|
||||||
|
<result property="instrumentValue" column="instrument_value"/>
|
||||||
|
<result property="expend" column="expend"/>
|
||||||
|
<result property="recordTime" column="record_time"/>
|
||||||
|
<result property="beginTime" column="begin_time"/>
|
||||||
|
<result property="endTime" column="end_time"/>
|
||||||
|
<result property="updateFlag" column="update_flag"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectEmsReportPointSteamVo">
|
||||||
|
select obj_id,
|
||||||
|
monitor_code,
|
||||||
|
instrument_value,
|
||||||
|
expend,
|
||||||
|
record_time,
|
||||||
|
begin_time,
|
||||||
|
end_time,
|
||||||
|
update_flag,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time
|
||||||
|
from ems_report_point_steam
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectEmsReportPointSteamList" parameterType="EmsReportPointSteam"
|
||||||
|
resultMap="EmsReportPointSteamResult">
|
||||||
|
<include refid="selectEmsReportPointSteamVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="monitorCode != null and monitorCode != ''">and monitor_code = #{monitorCode}</if>
|
||||||
|
<if test="instrumentValue != null ">and instrument_value = #{instrumentValue}</if>
|
||||||
|
<if test="expend != null ">and expend = #{expend}</if>
|
||||||
|
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''">
|
||||||
|
and record_time between #{params.beginRecordTime} and #{params.endRecordTime}
|
||||||
|
</if>
|
||||||
|
<if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''">
|
||||||
|
and begin_time between #{params.beginBeginTime} and #{params.endBeginTime}
|
||||||
|
</if>
|
||||||
|
<if test="params.beginEndTime != null and params.beginEndTime != '' and params.endEndTime != null and params.endEndTime != ''">
|
||||||
|
and end_time between #{params.beginEndTime} and #{params.endEndTime}
|
||||||
|
</if>
|
||||||
|
<if test="updateFlag != null and updateFlag != ''">and update_flag = #{updateFlag}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectEmsReportPointSteamByObjId" parameterType="Long" resultMap="EmsReportPointSteamResult">
|
||||||
|
<include refid="selectEmsReportPointSteamVo"/>
|
||||||
|
where obj_id = #{objId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertEmsReportPointSteam" parameterType="EmsReportPointSteam" useGeneratedKeys="true"
|
||||||
|
keyProperty="objId">
|
||||||
|
insert into ems_report_point_steam
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="monitorCode != null">monitor_code,</if>
|
||||||
|
<if test="instrumentValue != null">instrument_value,</if>
|
||||||
|
<if test="expend != null">expend,</if>
|
||||||
|
<if test="recordTime != null">record_time,</if>
|
||||||
|
<if test="beginTime != null">begin_time,</if>
|
||||||
|
<if test="endTime != null">end_time,</if>
|
||||||
|
<if test="updateFlag != null">update_flag,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="monitorCode != null">#{monitorCode},</if>
|
||||||
|
<if test="instrumentValue != null">#{instrumentValue},</if>
|
||||||
|
<if test="expend != null">#{expend},</if>
|
||||||
|
<if test="recordTime != null">#{recordTime},</if>
|
||||||
|
<if test="beginTime != null">#{beginTime},</if>
|
||||||
|
<if test="endTime != null">#{endTime},</if>
|
||||||
|
<if test="updateFlag != null">#{updateFlag},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateEmsReportPointSteam" parameterType="EmsReportPointSteam">
|
||||||
|
update ems_report_point_steam
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="monitorCode != null">monitor_code = #{monitorCode},</if>
|
||||||
|
<if test="instrumentValue != null">instrument_value = #{instrumentValue},</if>
|
||||||
|
<if test="expend != null">expend = #{expend},</if>
|
||||||
|
<if test="recordTime != null">record_time = #{recordTime},</if>
|
||||||
|
<if test="beginTime != null">begin_time = #{beginTime},</if>
|
||||||
|
<if test="endTime != null">end_time = #{endTime},</if>
|
||||||
|
<if test="updateFlag != null">update_flag = #{updateFlag},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where obj_id = #{objId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteEmsReportPointSteamByObjId" parameterType="Long">
|
||||||
|
delete
|
||||||
|
from ems_report_point_steam
|
||||||
|
where obj_id = #{objId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteEmsReportPointSteamByObjIds" parameterType="String">
|
||||||
|
delete from ems_report_point_steam where obj_id in
|
||||||
|
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{objId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue