站点仪器关联关系以及消息模板仪器关联对接
parent
9c5072716a
commit
9d67a0d59d
@ -0,0 +1,69 @@
|
|||||||
|
package com.flossom.common.core.domain.entity;
|
||||||
|
|
||||||
|
import com.flossom.common.core.annotation.Excel;
|
||||||
|
import com.flossom.common.core.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点仪器关联对象 site_info_instrument
|
||||||
|
*
|
||||||
|
* @author flossom
|
||||||
|
* @date 2024-01-08
|
||||||
|
*/
|
||||||
|
public class SiteInfoInstrument extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 站点id */
|
||||||
|
@Excel(name = "站点id")
|
||||||
|
private Long siteId;
|
||||||
|
|
||||||
|
/** 仪器ID */
|
||||||
|
@Excel(name = "仪器ID")
|
||||||
|
private Long instrumentId;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setSiteId(Long siteId)
|
||||||
|
{
|
||||||
|
this.siteId = siteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSiteId()
|
||||||
|
{
|
||||||
|
return siteId;
|
||||||
|
}
|
||||||
|
public void setInstrumentId(Long instrumentId)
|
||||||
|
{
|
||||||
|
this.instrumentId = instrumentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getInstrumentId()
|
||||||
|
{
|
||||||
|
return instrumentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("siteId", getSiteId())
|
||||||
|
.append("instrumentId", getInstrumentId())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.flossom.common.core.mapper;
|
||||||
|
|
||||||
|
import com.flossom.common.core.domain.entity.SiteInfoInstrument;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点仪器关联Mapper接口
|
||||||
|
*
|
||||||
|
* @author flossom
|
||||||
|
* @date 2024-01-08
|
||||||
|
*/
|
||||||
|
public interface SiteInfoInstrumentMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询站点仪器关联
|
||||||
|
*
|
||||||
|
* @param id 站点仪器关联主键
|
||||||
|
* @return 站点仪器关联
|
||||||
|
*/
|
||||||
|
public SiteInfoInstrument selectSiteInfoInstrumentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点仪器关联列表
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 站点仪器关联集合
|
||||||
|
*/
|
||||||
|
public List<SiteInfoInstrument> selectSiteInfoInstrumentList(SiteInfoInstrument siteInfoInstrument);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点仪器关联
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSiteInfoInstrument(SiteInfoInstrument siteInfoInstrument);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点仪器关联
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSiteInfoInstrument(SiteInfoInstrument siteInfoInstrument);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点仪器关联
|
||||||
|
*
|
||||||
|
* @param id 站点仪器关联主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSiteInfoInstrumentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点仪器关联
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSiteInfoInstrumentByIds(Long[] ids);
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
<?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.flossom.common.core.mapper.SiteInfoInstrumentMapper">
|
||||||
|
|
||||||
|
<resultMap type="SiteInfoInstrument" id="SiteInfoInstrumentResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="siteId" column="site_id" />
|
||||||
|
<result property="instrumentId" column="instrument_id" />
|
||||||
|
<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="selectSiteInfoInstrumentVo">
|
||||||
|
select id, site_id, instrument_id, create_by, create_time, update_by, update_time from site_info_instrument
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSiteInfoInstrumentList" parameterType="SiteInfoInstrument" resultMap="SiteInfoInstrumentResult">
|
||||||
|
<include refid="selectSiteInfoInstrumentVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||||
|
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSiteInfoInstrumentById" parameterType="Long" resultMap="SiteInfoInstrumentResult">
|
||||||
|
<include refid="selectSiteInfoInstrumentVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSiteInfoInstrument" parameterType="SiteInfoInstrument">
|
||||||
|
insert into site_info_instrument
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">id,</if>
|
||||||
|
<if test="siteId != null">site_id,</if>
|
||||||
|
<if test="instrumentId != null">instrument_id,</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="id != null">#{id},</if>
|
||||||
|
<if test="siteId != null">#{siteId},</if>
|
||||||
|
<if test="instrumentId != null">#{instrumentId},</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="updateSiteInfoInstrument" parameterType="SiteInfoInstrument">
|
||||||
|
update site_info_instrument
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="siteId != null">site_id = #{siteId},</if>
|
||||||
|
<if test="instrumentId != null">instrument_id = #{instrumentId},</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 id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSiteInfoInstrumentById" parameterType="Long">
|
||||||
|
delete from site_info_instrument where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSiteInfoInstrumentByIds" parameterType="String">
|
||||||
|
delete from site_info_instrument where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.flossom.system.service;
|
||||||
|
|
||||||
|
import com.flossom.common.core.domain.entity.SiteInfoInstrument;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点仪器关联Service接口
|
||||||
|
*
|
||||||
|
* @author flossom
|
||||||
|
* @date 2024-01-08
|
||||||
|
*/
|
||||||
|
public interface ISiteInfoInstrumentService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询站点仪器关联
|
||||||
|
*
|
||||||
|
* @param id 站点仪器关联主键
|
||||||
|
* @return 站点仪器关联
|
||||||
|
*/
|
||||||
|
public SiteInfoInstrument selectSiteInfoInstrumentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点仪器关联列表
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 站点仪器关联集合
|
||||||
|
*/
|
||||||
|
public List<SiteInfoInstrument> selectSiteInfoInstrumentList(SiteInfoInstrument siteInfoInstrument);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点仪器关联
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSiteInfoInstrument(SiteInfoInstrument siteInfoInstrument);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点仪器关联
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSiteInfoInstrument(SiteInfoInstrument siteInfoInstrument);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点仪器关联
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的站点仪器关联主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSiteInfoInstrumentByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点仪器关联信息
|
||||||
|
*
|
||||||
|
* @param id 站点仪器关联主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSiteInfoInstrumentById(Long id);
|
||||||
|
}
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
package com.flossom.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.flossom.common.core.domain.entity.SiteInfoInstrument;
|
||||||
|
import com.flossom.common.core.mapper.SiteInfoInstrumentMapper;
|
||||||
|
import com.flossom.common.core.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.flossom.system.service.ISiteInfoInstrumentService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点仪器关联Service业务层处理
|
||||||
|
*
|
||||||
|
* @author flossom
|
||||||
|
* @date 2024-01-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SiteInfoInstrumentServiceImpl implements ISiteInfoInstrumentService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SiteInfoInstrumentMapper siteInfoInstrumentMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点仪器关联
|
||||||
|
*
|
||||||
|
* @param id 站点仪器关联主键
|
||||||
|
* @return 站点仪器关联
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SiteInfoInstrument selectSiteInfoInstrumentById(Long id)
|
||||||
|
{
|
||||||
|
return siteInfoInstrumentMapper.selectSiteInfoInstrumentById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点仪器关联列表
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 站点仪器关联
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SiteInfoInstrument> selectSiteInfoInstrumentList(SiteInfoInstrument siteInfoInstrument)
|
||||||
|
{
|
||||||
|
return siteInfoInstrumentMapper.selectSiteInfoInstrumentList(siteInfoInstrument);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点仪器关联
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSiteInfoInstrument(SiteInfoInstrument siteInfoInstrument)
|
||||||
|
{
|
||||||
|
siteInfoInstrument.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return siteInfoInstrumentMapper.insertSiteInfoInstrument(siteInfoInstrument);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点仪器关联
|
||||||
|
*
|
||||||
|
* @param siteInfoInstrument 站点仪器关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSiteInfoInstrument(SiteInfoInstrument siteInfoInstrument)
|
||||||
|
{
|
||||||
|
siteInfoInstrument.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return siteInfoInstrumentMapper.updateSiteInfoInstrument(siteInfoInstrument);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点仪器关联
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的站点仪器关联主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSiteInfoInstrumentByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return siteInfoInstrumentMapper.deleteSiteInfoInstrumentByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点仪器关联信息
|
||||||
|
*
|
||||||
|
* @param id 站点仪器关联主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSiteInfoInstrumentById(Long id)
|
||||||
|
{
|
||||||
|
return siteInfoInstrumentMapper.deleteSiteInfoInstrumentById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue