用户绑定仪器模块开发
parent
f7ba814037
commit
ee58e54a2f
@ -0,0 +1,62 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentSerial;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仪器序列号关联Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
public interface WxInstrumentSerialMapper
|
||||
{
|
||||
/**
|
||||
* 查询仪器序列号关联
|
||||
*
|
||||
* @param id 仪器序列号关联主键
|
||||
* @return 仪器序列号关联
|
||||
*/
|
||||
public WxInstrumentSerial selectWxInstrumentSerialById(Long id);
|
||||
|
||||
/**
|
||||
* 查询仪器序列号关联列表
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 仪器序列号关联集合
|
||||
*/
|
||||
public List<WxInstrumentSerial> selectWxInstrumentSerialList(WxInstrumentSerial wxInstrumentSerial);
|
||||
|
||||
/**
|
||||
* 新增仪器序列号关联
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxInstrumentSerial(WxInstrumentSerial wxInstrumentSerial);
|
||||
|
||||
/**
|
||||
* 修改仪器序列号关联
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxInstrumentSerial(WxInstrumentSerial wxInstrumentSerial);
|
||||
|
||||
/**
|
||||
* 删除仪器序列号关联
|
||||
*
|
||||
* @param id 仪器序列号关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentSerialById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除仪器序列号关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentSerialByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrumentLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户仪器绑定日志Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
public interface WxUserInstrumentLogMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户仪器绑定日志
|
||||
*
|
||||
* @param id 用户仪器绑定日志主键
|
||||
* @return 用户仪器绑定日志
|
||||
*/
|
||||
public WxUserInstrumentLog selectWxUserInstrumentLogById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定日志列表
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 用户仪器绑定日志集合
|
||||
*/
|
||||
public List<WxUserInstrumentLog> selectWxUserInstrumentLogList(WxUserInstrumentLog wxUserInstrumentLog);
|
||||
|
||||
/**
|
||||
* 新增用户仪器绑定日志
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog);
|
||||
|
||||
/**
|
||||
* 修改用户仪器绑定日志
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog);
|
||||
|
||||
/**
|
||||
* 删除用户仪器绑定日志
|
||||
*
|
||||
* @param id 用户仪器绑定日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserInstrumentLogById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户仪器绑定日志
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserInstrumentLogByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrument;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户仪器绑定Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
public interface WxUserInstrumentMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户仪器绑定
|
||||
*
|
||||
* @param id 用户仪器绑定主键
|
||||
* @return 用户仪器绑定
|
||||
*/
|
||||
public WxUserInstrument selectWxUserInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定列表
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 用户仪器绑定集合
|
||||
*/
|
||||
public List<WxUserInstrument> selectWxUserInstrumentList(WxUserInstrument wxUserInstrument);
|
||||
|
||||
/**
|
||||
* 新增用户仪器绑定
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxUserInstrument(WxUserInstrument wxUserInstrument);
|
||||
|
||||
/**
|
||||
* 修改用户仪器绑定
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxUserInstrument(WxUserInstrument wxUserInstrument);
|
||||
|
||||
/**
|
||||
* 删除用户仪器绑定
|
||||
*
|
||||
* @param id 用户仪器绑定主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户仪器绑定
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserInstrumentByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
<?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.WxInstrumentSerialMapper">
|
||||
|
||||
<resultMap type="WxInstrumentSerial" id="WxInstrumentSerialResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="instrumentId" column="instrument_id" />
|
||||
<result property="instrumentName" column="instrument_name" />
|
||||
<result property="serial" column="serial" />
|
||||
<result property="bindingStatus" column="binding_status" />
|
||||
<result property="validStatus" column="valid_status" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxInstrumentSerialVo">
|
||||
select id, instrument_id, instrument_name, serial, binding_status, valid_status, status, create_by, create_time, remark from wx_instrument_serial
|
||||
</sql>
|
||||
|
||||
<select id="selectWxInstrumentSerialList" parameterType="WxInstrumentSerial" resultMap="WxInstrumentSerialResult">
|
||||
<include refid="selectWxInstrumentSerialVo"/>
|
||||
<where>
|
||||
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
||||
<if test="instrumentName != null and instrumentName != ''"> and instrument_name like concat('%', #{instrumentName}, '%')</if>
|
||||
<if test="serial != null and serial != ''"> and serial = #{serial}</if>
|
||||
<if test="bindingStatus != null "> and binding_status = #{bindingStatus}</if>
|
||||
<if test="validStatus != null "> and valid_status = #{validStatus}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWxInstrumentSerialById" parameterType="Long" resultMap="WxInstrumentSerialResult">
|
||||
<include refid="selectWxInstrumentSerialVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxInstrumentSerial" parameterType="WxInstrumentSerial" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_instrument_serial
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="instrumentId != null">instrument_id,</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">instrument_name,</if>
|
||||
<if test="serial != null and serial != ''">serial,</if>
|
||||
<if test="bindingStatus != null">binding_status,</if>
|
||||
<if test="validStatus != null">valid_status,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="instrumentId != null">#{instrumentId},</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">#{instrumentName},</if>
|
||||
<if test="serial != null and serial != ''">#{serial},</if>
|
||||
<if test="bindingStatus != null">#{bindingStatus},</if>
|
||||
<if test="validStatus != null">#{validStatus},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxInstrumentSerial" parameterType="WxInstrumentSerial">
|
||||
update wx_instrument_serial
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">instrument_name = #{instrumentName},</if>
|
||||
<if test="serial != null and serial != ''">serial = #{serial},</if>
|
||||
<if test="bindingStatus != null">binding_status = #{bindingStatus},</if>
|
||||
<if test="validStatus != null">valid_status = #{validStatus},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxInstrumentSerialById" parameterType="Long">
|
||||
delete from wx_instrument_serial where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxInstrumentSerialByIds" parameterType="String">
|
||||
delete from wx_instrument_serial where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,110 @@
|
||||
<?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.WxUserInstrumentLogMapper">
|
||||
|
||||
<resultMap type="WxUserInstrumentLog" id="WxUserInstrumentLogResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userInstrumentId" column="user_instrument_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="serial" column="serial" />
|
||||
<result property="instrumentId" column="instrument_id" />
|
||||
<result property="instrumentName" column="instrument_name" />
|
||||
<result property="serialImage" column="serial_image" />
|
||||
<result property="guarantee" column="guarantee" />
|
||||
<result property="guaranteeEndtime" column="guarantee_endtime" />
|
||||
<result property="bindingStatus" column="binding_status" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxUserInstrumentLogVo">
|
||||
select id, user_id, serial, instrument_id, instrument_name, serial_image, guarantee, guarantee_endtime, binding_status, status, create_by, create_time from wx_user_instrument_log
|
||||
</sql>
|
||||
|
||||
<select id="selectWxUserInstrumentLogList" parameterType="WxUserInstrumentLog" resultMap="WxUserInstrumentLogResult">
|
||||
<include refid="selectWxUserInstrumentLogVo"/>
|
||||
<where>
|
||||
<if test="userInstrumentId != null "> and user_instrument_id = #{userInstrumentId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="serial != null and serial != ''"> and serial = #{serial}</if>
|
||||
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
||||
<if test="instrumentName != null and instrumentName != ''"> and instrument_name like concat('%', #{instrumentName}, '%')</if>
|
||||
<if test="serialImage != null and serialImage != ''"> and serial_image = #{serialImage}</if>
|
||||
<if test="guarantee != null "> and guarantee = #{guarantee}</if>
|
||||
<if test="guaranteeEndtime != null "> and guarantee_endtime = #{guaranteeEndtime}</if>
|
||||
<if test="bindingStatus != null "> and binding_status = #{bindingStatus}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWxUserInstrumentLogById" parameterType="Long" resultMap="WxUserInstrumentLogResult">
|
||||
<include refid="selectWxUserInstrumentLogVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxUserInstrumentLog" parameterType="WxUserInstrumentLog" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_user_instrument_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userInstrumentId != null">user_instrument_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="serial != null and serial != ''">serial,</if>
|
||||
<if test="instrumentId != null">instrument_id,</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">instrument_name,</if>
|
||||
<if test="serialImage != null and serialImage != ''">serial_image,</if>
|
||||
<if test="guarantee != null">guarantee,</if>
|
||||
<if test="guaranteeEndtime != null">guarantee_endtime,</if>
|
||||
<if test="bindingStatus != null">binding_status,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userInstrumentId != null">#{userInstrumentId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="serial != null and serial != ''">#{serial},</if>
|
||||
<if test="instrumentId != null">#{instrumentId},</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">#{instrumentName},</if>
|
||||
<if test="serialImage != null and serialImage != ''">#{serialImage},</if>
|
||||
<if test="guarantee != null">#{guarantee},</if>
|
||||
<if test="guaranteeEndtime != null">#{guaranteeEndtime},</if>
|
||||
<if test="bindingStatus != null">#{bindingStatus},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxUserInstrumentLog" parameterType="WxUserInstrumentLog">
|
||||
update wx_user_instrument_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userInstrumentId != null">user_instrument_id = #{userInstrumentId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="serial != null and serial != ''">serial = #{serial},</if>
|
||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">instrument_name = #{instrumentName},</if>
|
||||
<if test="serialImage != null and serialImage != ''">serial_image = #{serialImage},</if>
|
||||
<if test="guarantee != null">guarantee = #{guarantee},</if>
|
||||
<if test="guaranteeEndtime != null">guarantee_endtime = #{guaranteeEndtime},</if>
|
||||
<if test="bindingStatus != null">binding_status = #{bindingStatus},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxUserInstrumentLogById" parameterType="Long">
|
||||
delete from wx_user_instrument_log where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxUserInstrumentLogByIds" parameterType="String">
|
||||
delete from wx_user_instrument_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,144 @@
|
||||
<?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.WxUserInstrumentMapper">
|
||||
|
||||
<resultMap type="WxUserInstrument" id="WxUserInstrumentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="serial" column="serial" />
|
||||
<result property="instrumentId" column="instrument_id" />
|
||||
<result property="instrumentName" column="instrument_name" />
|
||||
<result property="serialImage" column="serial_image" />
|
||||
<result property="guarantee" column="guarantee" />
|
||||
<result property="guaranteeEndtime" column="guarantee_endtime" />
|
||||
<result property="bindingStatus" column="binding_status" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxUserInstrumentVo">
|
||||
select id, user_id, serial, instrument_id, instrument_name, serial_image, guarantee, guarantee_endtime, binding_status, status, create_by, create_time, update_by, update_time, remark from wx_user_instrument
|
||||
</sql>
|
||||
|
||||
<select id="selectWxUserInstrumentList" parameterType="WxUserInstrument" resultMap="WxUserInstrumentResult">
|
||||
<include refid="selectWxUserInstrumentVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="serial != null and serial != ''"> and serial like concat('%', #{serial}, '%')</if>
|
||||
<if test="instrumentId != null "> and instrument_id like concat('%', #{instrumentId}, '%')</if>
|
||||
<if test="instrumentName != null and instrumentName != ''"> and instrument_name like concat('%', #{instrumentName}, '%')</if>
|
||||
<if test="serialImage != null and serialImage != ''"> and serial_image = #{serialImage}</if>
|
||||
<if test="guarantee != null "> and guarantee = #{guarantee}</if>
|
||||
<if test="guaranteeEndtime != null "> and guarantee_endtime = #{guaranteeEndtime}</if>
|
||||
<if test="bindingStatus != null "> and binding_status = #{bindingStatus}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWxUserInstrumentById" parameterType="Long" resultMap="WxUserInstrumentResult">
|
||||
<include refid="selectWxUserInstrumentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxUserInstrument" parameterType="WxUserInstrument" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_user_instrument
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="serial != null and serial != ''">serial,</if>
|
||||
<if test="instrumentId != null">instrument_id,</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">instrument_name,</if>
|
||||
<if test="serialImage != null and serialImage != ''">serial_image,</if>
|
||||
<if test="guarantee != null">guarantee,</if>
|
||||
<if test="guaranteeEndtime != null">guarantee_endtime,</if>
|
||||
<if test="bindingStatus != null">binding_status,</if>
|
||||
<if test="status != null">status,</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>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="serial != null and serial != ''">#{serial},</if>
|
||||
<if test="instrumentId != null">#{instrumentId},</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">#{instrumentName},</if>
|
||||
<if test="serialImage != null and serialImage != ''">#{serialImage},</if>
|
||||
<if test="guarantee != null">#{guarantee},</if>
|
||||
<if test="guaranteeEndtime != null">#{guaranteeEndtime},</if>
|
||||
<if test="bindingStatus != null">#{bindingStatus},</if>
|
||||
<if test="status != null">#{status},</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>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxUserInstrument" parameterType="WxUserInstrument">
|
||||
update wx_user_instrument
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="serial != null and serial != ''">serial = #{serial},</if>
|
||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
||||
<if test="instrumentName != null and instrumentName != ''">instrument_name = #{instrumentName},</if>
|
||||
<if test="serialImage != null and serialImage != ''">serial_image = #{serialImage},</if>
|
||||
<if test="guarantee != null">guarantee = #{guarantee},</if>
|
||||
<if test="guaranteeEndtime != null">guarantee_endtime = #{guaranteeEndtime},</if>
|
||||
<if test="bindingStatus != null">binding_status = #{bindingStatus},</if>
|
||||
<if test="status != null">status = #{status},</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>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="userIds!=null and userIds !=''">
|
||||
and
|
||||
<foreach collection="userIds.split(',')" index="index" item="item" open="(" separator="OR"
|
||||
close=")">
|
||||
user_id = #{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="instrumentIds!=null and instrumentIds !=''">
|
||||
and
|
||||
<foreach collection="instrumentIds.split(',')" index="index" item="item" open="(" separator="OR"
|
||||
close=")">
|
||||
instrument_id = #{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="mapperBindStatus!=null and mapperBindStatus !=''">
|
||||
and
|
||||
<foreach collection="mapperBindStatus.split(',')" index="index" item="item" open="(" separator="OR"
|
||||
close=")">
|
||||
binding_status = #{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
and create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and create_time <= #{endTime}
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxUserInstrumentById" parameterType="Long">
|
||||
delete from wx_user_instrument where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxUserInstrumentByIds" parameterType="String">
|
||||
delete from wx_user_instrument where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,106 @@
|
||||
package com.flossom.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentSerial;
|
||||
import com.flossom.common.core.utils.poi.ExcelUtil;
|
||||
import com.flossom.common.core.web.controller.BaseController;
|
||||
import com.flossom.common.core.web.domain.AjaxResult;
|
||||
import com.flossom.common.core.web.page.TableDataInfo;
|
||||
import com.flossom.common.log.annotation.Log;
|
||||
import com.flossom.common.log.enums.BusinessType;
|
||||
import com.flossom.common.security.annotation.RequiresPermissions;
|
||||
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.flossom.system.service.IWxInstrumentSerialService;
|
||||
|
||||
/**
|
||||
* 仪器序列号关联Controller
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/serial")
|
||||
public class WxInstrumentSerialController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWxInstrumentSerialService wxInstrumentSerialService;
|
||||
|
||||
/**
|
||||
* 查询仪器序列号关联列表
|
||||
*/
|
||||
@RequiresPermissions("system:serial:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WxInstrumentSerial wxInstrumentSerial)
|
||||
{
|
||||
startPage();
|
||||
List<WxInstrumentSerial> list = wxInstrumentSerialService.selectWxInstrumentSerialList(wxInstrumentSerial);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出仪器序列号关联列表
|
||||
*/
|
||||
@RequiresPermissions("system:serial:export")
|
||||
@Log(title = "仪器序列号关联", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WxInstrumentSerial wxInstrumentSerial)
|
||||
{
|
||||
List<WxInstrumentSerial> list = wxInstrumentSerialService.selectWxInstrumentSerialList(wxInstrumentSerial);
|
||||
ExcelUtil<WxInstrumentSerial> util = new ExcelUtil<WxInstrumentSerial>(WxInstrumentSerial.class);
|
||||
util.exportExcel(response, list, "仪器序列号关联数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取仪器序列号关联详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:serial:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(wxInstrumentSerialService.selectWxInstrumentSerialById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仪器序列号关联
|
||||
*/
|
||||
@RequiresPermissions("system:serial:add")
|
||||
@Log(title = "仪器序列号关联", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WxInstrumentSerial wxInstrumentSerial)
|
||||
{
|
||||
return toAjax(wxInstrumentSerialService.insertWxInstrumentSerial(wxInstrumentSerial));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仪器序列号关联
|
||||
*/
|
||||
@RequiresPermissions("system:serial:edit")
|
||||
@Log(title = "仪器序列号关联", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WxInstrumentSerial wxInstrumentSerial)
|
||||
{
|
||||
return toAjax(wxInstrumentSerialService.updateWxInstrumentSerial(wxInstrumentSerial));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仪器序列号关联
|
||||
*/
|
||||
@RequiresPermissions("system:serial:remove")
|
||||
@Log(title = "仪器序列号关联", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(wxInstrumentSerialService.deleteWxInstrumentSerialByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,151 @@
|
||||
package com.flossom.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrument;
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrument;
|
||||
import com.flossom.common.core.domain.entity.WxUserMember;
|
||||
import com.flossom.common.core.domain.vo.WxUserMemberVo;
|
||||
import com.flossom.common.core.utils.poi.ExcelUtil;
|
||||
import com.flossom.common.core.web.controller.BaseController;
|
||||
import com.flossom.common.core.web.domain.AjaxResult;
|
||||
import com.flossom.common.core.web.page.TableDataInfo;
|
||||
import com.flossom.common.log.annotation.Log;
|
||||
import com.flossom.common.log.enums.BusinessType;
|
||||
import com.flossom.common.security.annotation.RequiresPermissions;
|
||||
import com.flossom.system.service.IWxInstrumentService;
|
||||
import com.flossom.system.service.IWxUserMemberService;
|
||||
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.flossom.system.service.IWxUserInstrumentService;
|
||||
|
||||
/**
|
||||
* 用户仪器绑定Controller
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/userInstrument")
|
||||
public class WxUserInstrumentController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWxUserInstrumentService wxUserInstrumentService;
|
||||
@Autowired
|
||||
private IWxUserMemberService wxUserMemberService;
|
||||
@Autowired
|
||||
private IWxInstrumentService wxInstrumentService;
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定列表
|
||||
*/
|
||||
@RequiresPermissions("system:userInstrument:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
startPage();
|
||||
List<WxUserInstrument> list = wxUserInstrumentService.selectWxUserInstrumentList(wxUserInstrument);
|
||||
//循环查询对应的信息
|
||||
for (WxUserInstrument userInstrument: list) {
|
||||
if (Objects.nonNull(userInstrument.getInstrumentId())) {
|
||||
WxInstrument wxInstrument = wxInstrumentService.selectWxInstrumentById(userInstrument.getInstrumentId());
|
||||
userInstrument.setWxInstrument(wxInstrument);
|
||||
}
|
||||
if (Objects.nonNull(userInstrument.getUserId())) {
|
||||
WxUserMember wxUserMember = wxUserMemberService.selectWxUserMemberByIdInit(userInstrument.getUserId());
|
||||
userInstrument.setWxUserMember(wxUserMember);
|
||||
}
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户仪器绑定列表
|
||||
*/
|
||||
@RequiresPermissions("system:userInstrument:export")
|
||||
@Log(title = "用户仪器绑定", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
List<WxUserInstrument> list = wxUserInstrumentService.selectWxUserInstrumentList(wxUserInstrument);
|
||||
ExcelUtil<WxUserInstrument> util = new ExcelUtil<WxUserInstrument>(WxUserInstrument.class);
|
||||
util.exportExcel(response, list, "用户仪器绑定数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户仪器绑定详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:userInstrument:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(wxUserInstrumentService.selectWxUserInstrumentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户仪器绑定
|
||||
*/
|
||||
@RequiresPermissions("system:userInstrument:add")
|
||||
@Log(title = "用户仪器绑定", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
return toAjax(wxUserInstrumentService.insertWxUserInstrument(wxUserInstrument));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户仪器绑定
|
||||
*/
|
||||
@RequiresPermissions("system:userInstrument:edit")
|
||||
@Log(title = "用户仪器绑定", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
return toAjax(wxUserInstrumentService.updateWxUserInstrument(wxUserInstrument));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户仪器绑定
|
||||
*/
|
||||
@RequiresPermissions("system:userInstrument:remove")
|
||||
@Log(title = "用户仪器绑定", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(wxUserInstrumentService.deleteWxUserInstrumentByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更换序列号
|
||||
*/
|
||||
@Log(title = "用户仪器更换序列号", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeSerial")
|
||||
public AjaxResult changeSerial(@RequestBody WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
Map<String, String> stringStringMap = wxUserInstrumentService.changeSerial(wxUserInstrument);
|
||||
return AjaxResult.success(stringStringMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更换序列号
|
||||
*/
|
||||
@Log(title = "更换序列号", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeGuarantee")
|
||||
public AjaxResult changeGuarantee(@RequestBody WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
return toAjax(wxUserInstrumentService.changeGuarantee(wxUserInstrument));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package com.flossom.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrumentLog;
|
||||
import com.flossom.common.core.utils.poi.ExcelUtil;
|
||||
import com.flossom.common.core.web.controller.BaseController;
|
||||
import com.flossom.common.core.web.domain.AjaxResult;
|
||||
import com.flossom.common.core.web.page.TableDataInfo;
|
||||
import com.flossom.common.log.annotation.Log;
|
||||
import com.flossom.common.log.enums.BusinessType;
|
||||
import com.flossom.common.security.annotation.RequiresPermissions;
|
||||
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.flossom.system.service.IWxUserInstrumentLogService;
|
||||
|
||||
/**
|
||||
* 用户仪器绑定日志Controller
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/log")
|
||||
public class WxUserInstrumentLogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWxUserInstrumentLogService wxUserInstrumentLogService;
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定日志列表
|
||||
*/
|
||||
@RequiresPermissions("system:log:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WxUserInstrumentLog wxUserInstrumentLog)
|
||||
{
|
||||
startPage();
|
||||
List<WxUserInstrumentLog> list = wxUserInstrumentLogService.selectWxUserInstrumentLogList(wxUserInstrumentLog);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户仪器绑定日志列表
|
||||
*/
|
||||
@RequiresPermissions("system:log:export")
|
||||
@Log(title = "用户仪器绑定日志", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WxUserInstrumentLog wxUserInstrumentLog)
|
||||
{
|
||||
List<WxUserInstrumentLog> list = wxUserInstrumentLogService.selectWxUserInstrumentLogList(wxUserInstrumentLog);
|
||||
ExcelUtil<WxUserInstrumentLog> util = new ExcelUtil<WxUserInstrumentLog>(WxUserInstrumentLog.class);
|
||||
util.exportExcel(response, list, "用户仪器绑定日志数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户仪器绑定日志详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:log:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(wxUserInstrumentLogService.selectWxUserInstrumentLogById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户仪器绑定日志
|
||||
*/
|
||||
@RequiresPermissions("system:log:add")
|
||||
@Log(title = "用户仪器绑定日志", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WxUserInstrumentLog wxUserInstrumentLog)
|
||||
{
|
||||
return toAjax(wxUserInstrumentLogService.insertWxUserInstrumentLog(wxUserInstrumentLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户仪器绑定日志
|
||||
*/
|
||||
@RequiresPermissions("system:log:edit")
|
||||
@Log(title = "用户仪器绑定日志", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WxUserInstrumentLog wxUserInstrumentLog)
|
||||
{
|
||||
return toAjax(wxUserInstrumentLogService.updateWxUserInstrumentLog(wxUserInstrumentLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户仪器绑定日志
|
||||
*/
|
||||
@RequiresPermissions("system:log:remove")
|
||||
@Log(title = "用户仪器绑定日志", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(wxUserInstrumentLogService.deleteWxUserInstrumentLogByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.flossom.system.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentSerial;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仪器序列号关联Service接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
public interface IWxInstrumentSerialService
|
||||
{
|
||||
/**
|
||||
* 查询仪器序列号关联
|
||||
*
|
||||
* @param id 仪器序列号关联主键
|
||||
* @return 仪器序列号关联
|
||||
*/
|
||||
public WxInstrumentSerial selectWxInstrumentSerialById(Long id);
|
||||
|
||||
/**
|
||||
* 查询仪器序列号关联列表
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 仪器序列号关联集合
|
||||
*/
|
||||
public List<WxInstrumentSerial> selectWxInstrumentSerialList(WxInstrumentSerial wxInstrumentSerial);
|
||||
|
||||
/**
|
||||
* 新增仪器序列号关联
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxInstrumentSerial(WxInstrumentSerial wxInstrumentSerial);
|
||||
|
||||
/**
|
||||
* 修改仪器序列号关联
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxInstrumentSerial(WxInstrumentSerial wxInstrumentSerial);
|
||||
|
||||
/**
|
||||
* 批量删除仪器序列号关联
|
||||
*
|
||||
* @param ids 需要删除的仪器序列号关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentSerialByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除仪器序列号关联信息
|
||||
*
|
||||
* @param id 仪器序列号关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentSerialById(Long id);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.flossom.system.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrumentLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户仪器绑定日志Service接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
public interface IWxUserInstrumentLogService
|
||||
{
|
||||
/**
|
||||
* 查询用户仪器绑定日志
|
||||
*
|
||||
* @param id 用户仪器绑定日志主键
|
||||
* @return 用户仪器绑定日志
|
||||
*/
|
||||
public WxUserInstrumentLog selectWxUserInstrumentLogById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定日志列表
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 用户仪器绑定日志集合
|
||||
*/
|
||||
public List<WxUserInstrumentLog> selectWxUserInstrumentLogList(WxUserInstrumentLog wxUserInstrumentLog);
|
||||
|
||||
/**
|
||||
* 新增用户仪器绑定日志
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog);
|
||||
|
||||
/**
|
||||
* 修改用户仪器绑定日志
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog);
|
||||
|
||||
/**
|
||||
* 批量删除用户仪器绑定日志
|
||||
*
|
||||
* @param ids 需要删除的用户仪器绑定日志主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserInstrumentLogByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户仪器绑定日志信息
|
||||
*
|
||||
* @param id 用户仪器绑定日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserInstrumentLogById(Long id);
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.flossom.system.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrument;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 用户仪器绑定Service接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
public interface IWxUserInstrumentService
|
||||
{
|
||||
/**
|
||||
* 查询用户仪器绑定
|
||||
*
|
||||
* @param id 用户仪器绑定主键
|
||||
* @return 用户仪器绑定
|
||||
*/
|
||||
public WxUserInstrument selectWxUserInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定列表
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 用户仪器绑定集合
|
||||
*/
|
||||
public List<WxUserInstrument> selectWxUserInstrumentList(WxUserInstrument wxUserInstrument);
|
||||
|
||||
/**
|
||||
* 新增用户仪器绑定
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxUserInstrument(WxUserInstrument wxUserInstrument);
|
||||
|
||||
/**
|
||||
* 修改用户仪器绑定
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxUserInstrument(WxUserInstrument wxUserInstrument);
|
||||
|
||||
/**
|
||||
* 批量删除用户仪器绑定
|
||||
*
|
||||
* @param ids 需要删除的用户仪器绑定主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserInstrumentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户仪器绑定信息
|
||||
*
|
||||
* @param id 用户仪器绑定主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 变更序列号
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 结果
|
||||
*/
|
||||
public Map<String,String> changeSerial(WxUserInstrument wxUserInstrument);
|
||||
|
||||
/**
|
||||
* 变革保修期限
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 结果
|
||||
*/
|
||||
public int changeGuarantee(WxUserInstrument wxUserInstrument);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.flossom.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentSerial;
|
||||
import com.flossom.common.core.mapper.WxInstrumentSerialMapper;
|
||||
import com.flossom.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.flossom.system.service.IWxInstrumentSerialService;
|
||||
|
||||
/**
|
||||
* 仪器序列号关联Service业务层处理
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
@Service
|
||||
public class WxInstrumentSerialServiceImpl implements IWxInstrumentSerialService
|
||||
{
|
||||
@Autowired
|
||||
private WxInstrumentSerialMapper wxInstrumentSerialMapper;
|
||||
|
||||
/**
|
||||
* 查询仪器序列号关联
|
||||
*
|
||||
* @param id 仪器序列号关联主键
|
||||
* @return 仪器序列号关联
|
||||
*/
|
||||
@Override
|
||||
public WxInstrumentSerial selectWxInstrumentSerialById(Long id)
|
||||
{
|
||||
return wxInstrumentSerialMapper.selectWxInstrumentSerialById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询仪器序列号关联列表
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 仪器序列号关联
|
||||
*/
|
||||
@Override
|
||||
public List<WxInstrumentSerial> selectWxInstrumentSerialList(WxInstrumentSerial wxInstrumentSerial)
|
||||
{
|
||||
return wxInstrumentSerialMapper.selectWxInstrumentSerialList(wxInstrumentSerial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仪器序列号关联
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxInstrumentSerial(WxInstrumentSerial wxInstrumentSerial)
|
||||
{
|
||||
wxInstrumentSerial.setCreateTime(DateUtils.getNowDate());
|
||||
return wxInstrumentSerialMapper.insertWxInstrumentSerial(wxInstrumentSerial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仪器序列号关联
|
||||
*
|
||||
* @param wxInstrumentSerial 仪器序列号关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxInstrumentSerial(WxInstrumentSerial wxInstrumentSerial)
|
||||
{
|
||||
return wxInstrumentSerialMapper.updateWxInstrumentSerial(wxInstrumentSerial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除仪器序列号关联
|
||||
*
|
||||
* @param ids 需要删除的仪器序列号关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxInstrumentSerialByIds(Long[] ids)
|
||||
{
|
||||
return wxInstrumentSerialMapper.deleteWxInstrumentSerialByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仪器序列号关联信息
|
||||
*
|
||||
* @param id 仪器序列号关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxInstrumentSerialById(Long id)
|
||||
{
|
||||
return wxInstrumentSerialMapper.deleteWxInstrumentSerialById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.flossom.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrumentLog;
|
||||
import com.flossom.common.core.mapper.WxUserInstrumentLogMapper;
|
||||
import com.flossom.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.flossom.system.service.IWxUserInstrumentLogService;
|
||||
|
||||
/**
|
||||
* 用户仪器绑定日志Service业务层处理
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
@Service
|
||||
public class WxUserInstrumentLogServiceImpl implements IWxUserInstrumentLogService
|
||||
{
|
||||
@Autowired
|
||||
private WxUserInstrumentLogMapper wxUserInstrumentLogMapper;
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定日志
|
||||
*
|
||||
* @param id 用户仪器绑定日志主键
|
||||
* @return 用户仪器绑定日志
|
||||
*/
|
||||
@Override
|
||||
public WxUserInstrumentLog selectWxUserInstrumentLogById(Long id)
|
||||
{
|
||||
return wxUserInstrumentLogMapper.selectWxUserInstrumentLogById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定日志列表
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 用户仪器绑定日志
|
||||
*/
|
||||
@Override
|
||||
public List<WxUserInstrumentLog> selectWxUserInstrumentLogList(WxUserInstrumentLog wxUserInstrumentLog)
|
||||
{
|
||||
return wxUserInstrumentLogMapper.selectWxUserInstrumentLogList(wxUserInstrumentLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户仪器绑定日志
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog)
|
||||
{
|
||||
wxUserInstrumentLog.setCreateTime(DateUtils.getNowDate());
|
||||
// 设置系列号图片
|
||||
return wxUserInstrumentLogMapper.insertWxUserInstrumentLog(wxUserInstrumentLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户仪器绑定日志
|
||||
*
|
||||
* @param wxUserInstrumentLog 用户仪器绑定日志
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog)
|
||||
{
|
||||
return wxUserInstrumentLogMapper.updateWxUserInstrumentLog(wxUserInstrumentLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户仪器绑定日志
|
||||
*
|
||||
* @param ids 需要删除的用户仪器绑定日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxUserInstrumentLogByIds(Long[] ids)
|
||||
{
|
||||
return wxUserInstrumentLogMapper.deleteWxUserInstrumentLogByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户仪器绑定日志信息
|
||||
*
|
||||
* @param id 用户仪器绑定日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxUserInstrumentLogById(Long id)
|
||||
{
|
||||
return wxUserInstrumentLogMapper.deleteWxUserInstrumentLogById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,247 @@
|
||||
package com.flossom.system.service.impl;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.alibaba.nacos.shaded.com.google.common.collect.Maps;
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentSerial;
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrument;
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrumentLog;
|
||||
import com.flossom.common.core.domain.entity.WxUserMember;
|
||||
import com.flossom.common.core.mapper.*;
|
||||
import com.flossom.common.core.utils.DateUtils;
|
||||
import com.flossom.common.core.utils.StringUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.flossom.system.service.IWxUserInstrumentService;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.unit.DataUnit;
|
||||
|
||||
/**
|
||||
* 用户仪器绑定Service业务层处理
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
@Service
|
||||
public class WxUserInstrumentServiceImpl implements IWxUserInstrumentService
|
||||
{
|
||||
@Autowired
|
||||
private WxUserInstrumentMapper wxUserInstrumentMapper;
|
||||
@Autowired
|
||||
private WxUserMemberMapper wxUserMemberMapper;
|
||||
@Autowired
|
||||
private WxInstrumentMapper wxInstrumentMapper;
|
||||
@Autowired
|
||||
private WxInstrumentSerialMapper instrumentSerialMapper;
|
||||
@Autowired
|
||||
private WxUserInstrumentLogMapper wxUserInstrumentLogMapper;
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定
|
||||
*
|
||||
* @param id 用户仪器绑定主键
|
||||
* @return 用户仪器绑定
|
||||
*/
|
||||
@Override
|
||||
public WxUserInstrument selectWxUserInstrumentById(Long id)
|
||||
{
|
||||
return wxUserInstrumentMapper.selectWxUserInstrumentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户仪器绑定列表
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 用户仪器绑定
|
||||
*/
|
||||
@Override
|
||||
public List<WxUserInstrument> selectWxUserInstrumentList(WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
// 处理用户昵称
|
||||
if (StringUtils.isNotEmpty(wxUserInstrument.getNickName())){
|
||||
WxUserMember userMember = new WxUserMember();
|
||||
userMember.setNickname(wxUserInstrument.getNickName());
|
||||
List<WxUserMember> wxUserMembersList = wxUserMemberMapper.selectWxUserMemberList(userMember);
|
||||
if (!CollectionUtils.isEmpty(wxUserMembersList)) {
|
||||
String userIds = (wxUserMembersList.stream().map(WxUserMember::getId).collect(Collectors.toList())).stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
wxUserInstrument.setUserIds(userIds);
|
||||
}
|
||||
}
|
||||
// 处理用户ID
|
||||
if (!CollectionUtils.isEmpty(wxUserInstrument.getUserIdArray())){
|
||||
String userIds =wxUserInstrument.getUserIdArray().stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
if (StringUtils.isNotEmpty(wxUserInstrument.getUserIds())) {
|
||||
wxUserInstrument.setUserIds(wxUserInstrument.getUserIds()+","+userIds);
|
||||
} else {
|
||||
wxUserInstrument.setUserIds(userIds);
|
||||
}
|
||||
}
|
||||
// 处理手机号码
|
||||
if (StringUtils.isNotEmpty(wxUserInstrument.getUserPhone())){
|
||||
List<Long> userIdList = Lists.newArrayList();
|
||||
// 获取手机集合
|
||||
List<String> mobileList = Arrays.asList(wxUserInstrument.getUserPhone().split(",")).stream().map(String::valueOf).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(mobileList)) {
|
||||
for (String mobile: mobileList) {
|
||||
List<WxUserMember> wxUserMembers = wxUserMemberMapper.selectWxUserMemberByMobile(mobile);
|
||||
if (!CollectionUtils.isEmpty(wxUserMembers)) {
|
||||
userIdList.add(wxUserMembers.get(0).getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(userIdList)) {
|
||||
String userIds = userIdList.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
if (StringUtils.isNotEmpty(wxUserInstrument.getUserIds())) {
|
||||
wxUserInstrument.setUserIds(wxUserInstrument.getUserIds()+","+userIds);
|
||||
} else {
|
||||
wxUserInstrument.setUserIds(userIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 处理仪器字段
|
||||
if (!CollectionUtils.isEmpty(wxUserInstrument.getInstrumentIdArray())) {
|
||||
String instrumentIds = wxUserInstrument.getInstrumentIdArray().stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
wxUserInstrument.setInstrumentIds(instrumentIds);
|
||||
}
|
||||
// 查询绑定的状态
|
||||
if (!CollectionUtils.isEmpty(wxUserInstrument.getBindingStatusArray())) {
|
||||
String bindStatus = wxUserInstrument.getBindingStatusArray().stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
wxUserInstrument.setMapperBindStatus(bindStatus);
|
||||
}
|
||||
|
||||
return wxUserInstrumentMapper.selectWxUserInstrumentList(wxUserInstrument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户仪器绑定
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxUserInstrument(WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
wxUserInstrument.setCreateTime(DateUtils.getNowDate());
|
||||
return wxUserInstrumentMapper.insertWxUserInstrument(wxUserInstrument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户仪器绑定
|
||||
*
|
||||
* @param wxUserInstrument 用户仪器绑定
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxUserInstrument(WxUserInstrument wxUserInstrument)
|
||||
{
|
||||
wxUserInstrument.setUpdateTime(DateUtils.getNowDate());
|
||||
return wxUserInstrumentMapper.updateWxUserInstrument(wxUserInstrument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户仪器绑定
|
||||
*
|
||||
* @param ids 需要删除的用户仪器绑定主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxUserInstrumentByIds(Long[] ids)
|
||||
{
|
||||
return wxUserInstrumentMapper.deleteWxUserInstrumentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户仪器绑定信息
|
||||
*
|
||||
* @param id 用户仪器绑定主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxUserInstrumentById(Long id)
|
||||
{
|
||||
return wxUserInstrumentMapper.deleteWxUserInstrumentById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,String> changeSerial(WxUserInstrument wxUserInstrument) {
|
||||
Map<String,String> resultMap = Maps.newHashMap();
|
||||
// 查询序列号是否有效存在
|
||||
WxInstrumentSerial serial = new WxInstrumentSerial();
|
||||
serial.setSerial(wxUserInstrument.getSerial());
|
||||
List<WxInstrumentSerial> serialList = instrumentSerialMapper.selectWxInstrumentSerialList(serial);
|
||||
if (CollectionUtils.isEmpty(serialList)) {
|
||||
resultMap.put("message","序列号无效,请确定后再绑定");
|
||||
resultMap.put("code", "500");
|
||||
return resultMap;
|
||||
}
|
||||
// 查看是否已经被绑定
|
||||
WxUserInstrument userInstrument = new WxUserInstrument();
|
||||
userInstrument.setSerial(wxUserInstrument.getSerial());
|
||||
List<WxUserInstrument> wxUserInstrumentsList = wxUserInstrumentMapper.selectWxUserInstrumentList(userInstrument);
|
||||
if (!CollectionUtils.isEmpty(wxUserInstrumentsList)) {
|
||||
resultMap.put("message","该序列号已经被绑定");
|
||||
resultMap.put("code", "500");
|
||||
return resultMap;
|
||||
}
|
||||
// 开始绑定
|
||||
WxUserInstrument userInstrumentRecord = wxUserInstrumentMapper.selectWxUserInstrumentById(wxUserInstrument.getId());
|
||||
|
||||
// 操作变更日记
|
||||
// 是否已经绑定
|
||||
if (0 == userInstrumentRecord.getBindingStatus()) {
|
||||
// 已经绑定的情况下,先解绑,再绑定 0-已绑 2-解绑
|
||||
this.saveLog(userInstrumentRecord,2);
|
||||
}
|
||||
// 更新信息
|
||||
WxInstrumentSerial instrumentSerialVo = serialList.get(0);
|
||||
userInstrumentRecord.setInstrumentId(instrumentSerialVo.getInstrumentId());
|
||||
userInstrumentRecord.setSerial(instrumentSerialVo.getSerial());
|
||||
userInstrumentRecord.setInstrumentName(instrumentSerialVo.getInstrumentName());
|
||||
// userInstrumentRecord.setSerialImage(userInstrument.getSerialImage());
|
||||
// 从新绑定
|
||||
this.saveLog(userInstrumentRecord,0);
|
||||
|
||||
// 更新绑定数据
|
||||
wxUserInstrumentMapper.updateWxUserInstrument(userInstrumentRecord);
|
||||
resultMap.put("message","换绑序列号成功");
|
||||
resultMap.put("code", "200");
|
||||
return resultMap ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int changeGuarantee(WxUserInstrument wxUserInstrument) {
|
||||
WxUserInstrument userInstrumentRecord = wxUserInstrumentMapper.selectWxUserInstrumentById(wxUserInstrument.getId());
|
||||
if (Objects.nonNull(wxUserInstrument.getGuarantee())) {
|
||||
// 开始处理时间 需要变更的时间
|
||||
Long guarantee = wxUserInstrument.getGuarantee();
|
||||
userInstrumentRecord.setGuarantee(guarantee);
|
||||
// 设置到期时间
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
// 将当前时间加多少年
|
||||
calendar.add(Calendar.YEAR, wxUserInstrument.getGuarantee().intValue());
|
||||
Date lastYear = calendar.getTime();
|
||||
userInstrumentRecord.setGuaranteeEndtime(lastYear);
|
||||
wxUserInstrumentMapper.updateWxUserInstrument(userInstrumentRecord);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int saveLog(WxUserInstrument userInstrumentRecord, int status){
|
||||
WxUserInstrumentLog log = new WxUserInstrumentLog();
|
||||
log.setUserInstrumentId(userInstrumentRecord.getId());
|
||||
log.setBindingStatus(status);
|
||||
log.setGuarantee(userInstrumentRecord.getGuarantee());
|
||||
log.setInstrumentId(userInstrumentRecord.getInstrumentId());
|
||||
log.setUserId(userInstrumentRecord.getUserId());
|
||||
log.setInstrumentName(userInstrumentRecord.getInstrumentName());
|
||||
log.setSerialImage(userInstrumentRecord.getSerialImage());
|
||||
log.setSerial(userInstrumentRecord.getSerial());
|
||||
log.setGuaranteeEndtime(userInstrumentRecord.getGuaranteeEndtime());
|
||||
log.setCreateTime((DateUtils.getNowDate()));
|
||||
return wxUserInstrumentLogMapper.insertWxUserInstrumentLog(log);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询用户仪器绑定列表
|
||||
export function listUserInstrument(query) {
|
||||
return request({
|
||||
url: '/system/userInstrument/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户仪器绑定详细
|
||||
export function getInstrument(id) {
|
||||
return request({
|
||||
url: '/system/userInstrument/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增用户仪器绑定
|
||||
export function addInstrument(data) {
|
||||
return request({
|
||||
url: '/system/userInstrument',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户仪器绑定
|
||||
export function updateInstrument(data) {
|
||||
return request({
|
||||
url: '/system/userInstrument',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户仪器绑定
|
||||
export function delInstrument(id) {
|
||||
return request({
|
||||
url: '/system/userInstrument/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 换绑序列号
|
||||
export function changeSerial(data) {
|
||||
return request({
|
||||
url: '/system/userInstrument/changeSerial',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 变更保修日期
|
||||
export function changeGuarantee(data) {
|
||||
return request({
|
||||
url: '/system/userInstrument/changeGuarantee',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询用户仪器绑定日志列表
|
||||
export function listLog(query) {
|
||||
return request({
|
||||
url: '/system/log/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户仪器绑定日志详细
|
||||
export function getLog(id) {
|
||||
return request({
|
||||
url: '/system/log/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增用户仪器绑定日志
|
||||
export function addLog(data) {
|
||||
return request({
|
||||
url: '/system/log',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户仪器绑定日志
|
||||
export function updateLog(data) {
|
||||
return request({
|
||||
url: '/system/log',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户仪器绑定日志
|
||||
export function delLog(id) {
|
||||
return request({
|
||||
url: '/system/log/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue