change - 人员信息加岗位

main
yinq 5 months ago
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,152 @@
package com.os.ems.report.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.os.common.annotation.Excel;
import com.os.common.core.domain.BaseEntity;
/**
* ems_report_point_steam
*
* @author Yinq
* @date 2024-06-11
*/
public class EmsReportPointSteam extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "计量设备编号")
private String monitorCode;
/**
*
*/
@Excel(name = "仪表值")
private BigDecimal instrumentValue;
/**
*
*/
@Excel(name = "耗量")
private BigDecimal expend;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date recordTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date beginTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
/**
* 0 1
*/
@Excel(name = "修改标识", readConverterExp = "0=是,1=否")
private String updateFlag;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setMonitorCode(String monitorCode) {
this.monitorCode = monitorCode;
}
public String getMonitorCode() {
return monitorCode;
}
public void setInstrumentValue(BigDecimal instrumentValue) {
this.instrumentValue = instrumentValue;
}
public BigDecimal getInstrumentValue() {
return instrumentValue;
}
public void setExpend(BigDecimal expend) {
this.expend = expend;
}
public BigDecimal getExpend() {
return expend;
}
public void setRecordTime(Date recordTime) {
this.recordTime = recordTime;
}
public Date getRecordTime() {
return recordTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getBeginTime() {
return beginTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Date getEndTime() {
return endTime;
}
public void setUpdateFlag(String updateFlag) {
this.updateFlag = updateFlag;
}
public String getUpdateFlag() {
return updateFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("monitorCode", getMonitorCode())
.append("instrumentValue", getInstrumentValue())
.append("expend", getExpend())
.append("recordTime", getRecordTime())
.append("beginTime", getBeginTime())
.append("endTime", getEndTime())
.append("updateFlag", getUpdateFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -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…
Cancel
Save