仪器管理页面

master
382696293@qq.com 2 years ago
parent c307d04179
commit 9c5072716a

@ -0,0 +1,480 @@
package com.flossom.common.core.domain.entity;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* wx_instrument
*
* @author flossom
* @date 2024-01-06
*/
public class WxInstrument extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private Long id;
/**
*
*/
private String name;
/**
* 1 2iot
*/
private Integer type;
/**
* iot
*/
private String model;
/**
*
*/
private String banner;
/**
* logo
*/
private String logo;
/**
*
*/
private String serial;
/**
*
*/
private Long guarantee;
/**
*
*/
private Long dailyClockCredit;
/**
*
*/
private Long extraClockCredit;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/**
* ID(xxxx,xxxx,xxx)
*/
private String miniTagIds;
/**
* (xxx,xxx,xxx)
*/
private String miniTagNames;
/**
* ID(xxxx,xxxx,xxx)
*/
private String wecomTagIds;
/**
* (xxx,xxx,xxx)
*/
private String wecomTagNames;
/**
* ID(xxxx,xxxx,xxx)
*/
private String sceneIds;
/**
* (xxx,xxx,xxx)
*/
private String sceneNames;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date nursingTime;
/**
* iot
*/
private String iotVersion;
/**
* iot
*/
private String iotUpgradeData;
/**
* 0 1
*/
private Integer isScanCode;
/**
* 0 1
*/
private Integer isPurchase;
/**
* appid
*/
private String shoppingAppid;
/**
* path
*/
private String shoppingPath;
/**
*
*/
private String bluetoothConnecting;
/**
*
*/
private String bluetoothClosed;
/**
* iot
*/
private String iotVersionUpgrade;
/**
* :
*/
private Long sortNo;
/**
* 0 1
*/
private Long status;
/**
*
*/
private String manualCodeBinding;
/**
*
*/
private String scanCodeBinding;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getType() {
return type;
}
public void setModel(String model) {
this.model = model;
}
public String getModel() {
return model;
}
public void setBanner(String banner) {
this.banner = banner;
}
public String getBanner() {
return banner;
}
public void setLogo(String logo) {
this.logo = logo;
}
public String getLogo() {
return logo;
}
public void setSerial(String serial) {
this.serial = serial;
}
public String getSerial() {
return serial;
}
public void setGuarantee(Long guarantee) {
this.guarantee = guarantee;
}
public Long getGuarantee() {
return guarantee;
}
public void setDailyClockCredit(Long dailyClockCredit) {
this.dailyClockCredit = dailyClockCredit;
}
public Long getDailyClockCredit() {
return dailyClockCredit;
}
public void setExtraClockCredit(Long extraClockCredit) {
this.extraClockCredit = extraClockCredit;
}
public Long getExtraClockCredit() {
return extraClockCredit;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getStartTime() {
return startTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Date getEndTime() {
return endTime;
}
public void setMiniTagIds(String miniTagIds) {
this.miniTagIds = miniTagIds;
}
public String getMiniTagIds() {
return miniTagIds;
}
public void setMiniTagNames(String miniTagNames) {
this.miniTagNames = miniTagNames;
}
public String getMiniTagNames() {
return miniTagNames;
}
public void setWecomTagIds(String wecomTagIds) {
this.wecomTagIds = wecomTagIds;
}
public String getWecomTagIds() {
return wecomTagIds;
}
public void setWecomTagNames(String wecomTagNames) {
this.wecomTagNames = wecomTagNames;
}
public String getWecomTagNames() {
return wecomTagNames;
}
public void setSceneIds(String sceneIds) {
this.sceneIds = sceneIds;
}
public String getSceneIds() {
return sceneIds;
}
public void setSceneNames(String sceneNames) {
this.sceneNames = sceneNames;
}
public String getSceneNames() {
return sceneNames;
}
public void setNursingTime(Date nursingTime) {
this.nursingTime = nursingTime;
}
public Date getNursingTime() {
return nursingTime;
}
public void setIotVersion(String iotVersion) {
this.iotVersion = iotVersion;
}
public String getIotVersion() {
return iotVersion;
}
public void setIotUpgradeData(String iotUpgradeData) {
this.iotUpgradeData = iotUpgradeData;
}
public String getIotUpgradeData() {
return iotUpgradeData;
}
public void setIsScanCode(Integer isScanCode) {
this.isScanCode = isScanCode;
}
public Integer getIsScanCode() {
return isScanCode;
}
public void setIsPurchase(Integer isPurchase) {
this.isPurchase = isPurchase;
}
public Integer getIsPurchase() {
return isPurchase;
}
public void setShoppingAppid(String shoppingAppid) {
this.shoppingAppid = shoppingAppid;
}
public String getShoppingAppid() {
return shoppingAppid;
}
public void setShoppingPath(String shoppingPath) {
this.shoppingPath = shoppingPath;
}
public String getShoppingPath() {
return shoppingPath;
}
public void setBluetoothConnecting(String bluetoothConnecting) {
this.bluetoothConnecting = bluetoothConnecting;
}
public String getBluetoothConnecting() {
return bluetoothConnecting;
}
public void setBluetoothClosed(String bluetoothClosed) {
this.bluetoothClosed = bluetoothClosed;
}
public String getBluetoothClosed() {
return bluetoothClosed;
}
public void setIotVersionUpgrade(String iotVersionUpgrade) {
this.iotVersionUpgrade = iotVersionUpgrade;
}
public String getIotVersionUpgrade() {
return iotVersionUpgrade;
}
public void setSortNo(Long sortNo) {
this.sortNo = sortNo;
}
public Long getSortNo() {
return sortNo;
}
public void setStatus(Long status) {
this.status = status;
}
public Long getStatus() {
return status;
}
public void setManualCodeBinding(String manualCodeBinding) {
this.manualCodeBinding = manualCodeBinding;
}
public String getManualCodeBinding() {
return manualCodeBinding;
}
public void setScanCodeBinding(String scanCodeBinding) {
this.scanCodeBinding = scanCodeBinding;
}
public String getScanCodeBinding() {
return scanCodeBinding;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("type", getType())
.append("model", getModel())
.append("banner", getBanner())
.append("logo", getLogo())
.append("serial", getSerial())
.append("guarantee", getGuarantee())
.append("dailyClockCredit", getDailyClockCredit())
.append("extraClockCredit", getExtraClockCredit())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("miniTagIds", getMiniTagIds())
.append("miniTagNames", getMiniTagNames())
.append("wecomTagIds", getWecomTagIds())
.append("wecomTagNames", getWecomTagNames())
.append("sceneIds", getSceneIds())
.append("sceneNames", getSceneNames())
.append("nursingTime", getNursingTime())
.append("iotVersion", getIotVersion())
.append("iotUpgradeData", getIotUpgradeData())
.append("isScanCode", getIsScanCode())
.append("isPurchase", getIsPurchase())
.append("shoppingAppid", getShoppingAppid())
.append("shoppingPath", getShoppingPath())
.append("bluetoothConnecting", getBluetoothConnecting())
.append("bluetoothClosed", getBluetoothClosed())
.append("iotVersionUpgrade", getIotVersionUpgrade())
.append("sortNo", getSortNo())
.append("status", getStatus())
.append("manualCodeBinding", getManualCodeBinding())
.append("scanCodeBinding", getScanCodeBinding())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -0,0 +1,65 @@
package com.flossom.common.core.domain.req;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* wx_instrument
*
* @author flossom
* @date 2024-01-06
*/
public class WxInstrumentReq {
/**
* ID
*/
private Long id;
/**
*
*/
private String name;
/**
* 1 2iot
*/
private Integer type;
public WxInstrumentReq() {
}
public WxInstrumentReq(Long id, String name, Integer type) {
this.id = id;
this.name = name;
this.type = type;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}

@ -0,0 +1,66 @@
package com.flossom.common.core.mapper;
import com.flossom.common.core.domain.entity.WxInstrument;
import com.flossom.common.core.domain.req.WxInstrumentReq;
import java.util.List;
/**
* Mapper
*
* @author flossom
* @date 2024-01-06
*/
public interface WxInstrumentMapper {
/**
*
*
* @param id
* @return
*/
public WxInstrument selectWxInstrumentById(Long id);
/**
*
*
* @param wxInstrument
* @return
*/
public List<WxInstrument> selectWxInstrumentList(WxInstrument wxInstrument);
List<WxInstrument> selectWxInstrumentPage(WxInstrumentReq wxInstrumentReq);
/**
*
*
* @param wxInstrument
* @return
*/
public int insertWxInstrument(WxInstrument wxInstrument);
/**
*
*
* @param wxInstrument
* @return
*/
public int updateWxInstrument(WxInstrument wxInstrument);
/**
*
*
* @param id
* @return
*/
public int deleteWxInstrumentById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteWxInstrumentByIds(Long[] ids);
}

@ -0,0 +1,237 @@
<?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.WxInstrumentMapper">
<resultMap type="WxInstrument" id="WxInstrumentResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="model" column="model" />
<result property="banner" column="banner" />
<result property="logo" column="logo" />
<result property="serial" column="serial" />
<result property="guarantee" column="guarantee" />
<result property="dailyClockCredit" column="daily_clock_credit" />
<result property="extraClockCredit" column="extra_clock_credit" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="miniTagIds" column="mini_tag_ids" />
<result property="miniTagNames" column="mini_tag_names" />
<result property="wecomTagIds" column="wecom_tag_ids" />
<result property="wecomTagNames" column="wecom_tag_names" />
<result property="sceneIds" column="scene_ids" />
<result property="sceneNames" column="scene_names" />
<result property="nursingTime" column="nursing_time" />
<result property="iotVersion" column="iot_version" />
<result property="iotUpgradeData" column="iot_upgrade_data" />
<result property="isScanCode" column="isScanCode" />
<result property="isPurchase" column="isPurchase" />
<result property="shoppingAppid" column="shopping_appid" />
<result property="shoppingPath" column="shopping_path" />
<result property="bluetoothConnecting" column="bluetooth_connecting" />
<result property="bluetoothClosed" column="bluetooth_closed" />
<result property="iotVersionUpgrade" column="iot_version_upgrade" />
<result property="sortNo" column="sort_no" />
<result property="status" column="status" />
<result property="manualCodeBinding" column="manual_code_binding" />
<result property="scanCodeBinding" column="scan_code_binding" />
<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="selectWxInstrumentVo">
select id, name, type, model, banner, logo, serial, guarantee, daily_clock_credit, extra_clock_credit, start_time, end_time, mini_tag_ids, mini_tag_names, wecom_tag_ids, wecom_tag_names, scene_ids, scene_names, nursing_time, iot_version, iot_upgrade_data, isScanCode, isPurchase, shopping_appid, shopping_path, bluetooth_connecting, bluetooth_closed, iot_version_upgrade, sort_no, status, manual_code_binding, scan_code_binding, create_by, create_time, update_by, update_time, remark from wx_instrument
</sql>
<select id="selectWxInstrumentList" parameterType="WxInstrument" resultMap="WxInstrumentResult">
<include refid="selectWxInstrumentVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null "> and type = #{type}</if>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="banner != null and banner != ''"> and banner = #{banner}</if>
<if test="logo != null and logo != ''"> and logo = #{logo}</if>
<if test="serial != null and serial != ''"> and serial = #{serial}</if>
<if test="guarantee != null "> and guarantee = #{guarantee}</if>
<if test="dailyClockCredit != null "> and daily_clock_credit = #{dailyClockCredit}</if>
<if test="extraClockCredit != null "> and extra_clock_credit = #{extraClockCredit}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<if test="miniTagIds != null and miniTagIds != ''"> and mini_tag_ids = #{miniTagIds}</if>
<if test="miniTagNames != null and miniTagNames != ''"> and mini_tag_names = #{miniTagNames}</if>
<if test="wecomTagIds != null and wecomTagIds != ''"> and wecom_tag_ids = #{wecomTagIds}</if>
<if test="wecomTagNames != null and wecomTagNames != ''"> and wecom_tag_names = #{wecomTagNames}</if>
<if test="sceneIds != null and sceneIds != ''"> and scene_ids = #{sceneIds}</if>
<if test="sceneNames != null and sceneNames != ''"> and scene_names = #{sceneNames}</if>
<if test="nursingTime != null "> and nursing_time = #{nursingTime}</if>
<if test="iotVersion != null and iotVersion != ''"> and iot_version = #{iotVersion}</if>
<if test="iotUpgradeData != null and iotUpgradeData != ''"> and iot_upgrade_data = #{iotUpgradeData}</if>
<if test="isScanCode != null "> and isScanCode = #{isScanCode}</if>
<if test="isPurchase != null "> and isPurchase = #{isPurchase}</if>
<if test="shoppingAppid != null and shoppingAppid != ''"> and shopping_appid = #{shoppingAppid}</if>
<if test="shoppingPath != null and shoppingPath != ''"> and shopping_path = #{shoppingPath}</if>
<if test="bluetoothConnecting != null and bluetoothConnecting != ''"> and bluetooth_connecting = #{bluetoothConnecting}</if>
<if test="bluetoothClosed != null and bluetoothClosed != ''"> and bluetooth_closed = #{bluetoothClosed}</if>
<if test="iotVersionUpgrade != null and iotVersionUpgrade != ''"> and iot_version_upgrade = #{iotVersionUpgrade}</if>
<if test="sortNo != null "> and sort_no = #{sortNo}</if>
<if test="status != null "> and status = #{status}</if>
<if test="manualCodeBinding != null and manualCodeBinding != ''"> and manual_code_binding = #{manualCodeBinding}</if>
<if test="scanCodeBinding != null and scanCodeBinding != ''"> and scan_code_binding = #{scanCodeBinding}</if>
</where>
order by create_time desc
</select>
<select id="selectWxInstrumentPage" parameterType="WxInstrumentReq" resultMap="WxInstrumentResult">
<include refid="selectWxInstrumentVo"/>
<where>
<if test="id != null"> and id like concat('%', #{id}, '%')</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null "> and type = #{type}</if>
</where>
order by create_time desc
</select>
<select id="selectWxInstrumentById" parameterType="Long" resultMap="WxInstrumentResult">
<include refid="selectWxInstrumentVo"/>
where id = #{id}
</select>
<insert id="insertWxInstrument" parameterType="WxInstrument" useGeneratedKeys="true" keyProperty="id">
insert into wx_instrument
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="type != null">type,</if>
<if test="model != null and model != ''">model,</if>
<if test="banner != null and banner != ''">banner,</if>
<if test="logo != null and logo != ''">logo,</if>
<if test="serial != null and serial != ''">serial,</if>
<if test="guarantee != null">guarantee,</if>
<if test="dailyClockCredit != null">daily_clock_credit,</if>
<if test="extraClockCredit != null">extra_clock_credit,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="miniTagIds != null">mini_tag_ids,</if>
<if test="miniTagNames != null">mini_tag_names,</if>
<if test="wecomTagIds != null">wecom_tag_ids,</if>
<if test="wecomTagNames != null">wecom_tag_names,</if>
<if test="sceneIds != null and sceneIds != ''">scene_ids,</if>
<if test="sceneNames != null">scene_names,</if>
<if test="nursingTime != null">nursing_time,</if>
<if test="iotVersion != null">iot_version,</if>
<if test="iotUpgradeData != null">iot_upgrade_data,</if>
<if test="isScanCode != null">isScanCode,</if>
<if test="isPurchase != null">isPurchase,</if>
<if test="shoppingAppid != null">shopping_appid,</if>
<if test="shoppingPath != null">shopping_path,</if>
<if test="bluetoothConnecting != null">bluetooth_connecting,</if>
<if test="bluetoothClosed != null">bluetooth_closed,</if>
<if test="iotVersionUpgrade != null">iot_version_upgrade,</if>
<if test="sortNo != null">sort_no,</if>
<if test="status != null">status,</if>
<if test="manualCodeBinding != null and manualCodeBinding != ''">manual_code_binding,</if>
<if test="scanCodeBinding != null and scanCodeBinding != ''">scan_code_binding,</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="name != null and name != ''">#{name},</if>
<if test="type != null">#{type},</if>
<if test="model != null and model != ''">#{model},</if>
<if test="banner != null and banner != ''">#{banner},</if>
<if test="logo != null and logo != ''">#{logo},</if>
<if test="serial != null and serial != ''">#{serial},</if>
<if test="guarantee != null">#{guarantee},</if>
<if test="dailyClockCredit != null">#{dailyClockCredit},</if>
<if test="extraClockCredit != null">#{extraClockCredit},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="miniTagIds != null">#{miniTagIds},</if>
<if test="miniTagNames != null">#{miniTagNames},</if>
<if test="wecomTagIds != null">#{wecomTagIds},</if>
<if test="wecomTagNames != null">#{wecomTagNames},</if>
<if test="sceneIds != null and sceneIds != ''">#{sceneIds},</if>
<if test="sceneNames != null">#{sceneNames},</if>
<if test="nursingTime != null">#{nursingTime},</if>
<if test="iotVersion != null">#{iotVersion},</if>
<if test="iotUpgradeData != null">#{iotUpgradeData},</if>
<if test="isScanCode != null">#{isScanCode},</if>
<if test="isPurchase != null">#{isPurchase},</if>
<if test="shoppingAppid != null">#{shoppingAppid},</if>
<if test="shoppingPath != null">#{shoppingPath},</if>
<if test="bluetoothConnecting != null">#{bluetoothConnecting},</if>
<if test="bluetoothClosed != null">#{bluetoothClosed},</if>
<if test="iotVersionUpgrade != null">#{iotVersionUpgrade},</if>
<if test="sortNo != null">#{sortNo},</if>
<if test="status != null">#{status},</if>
<if test="manualCodeBinding != null and manualCodeBinding != ''">#{manualCodeBinding},</if>
<if test="scanCodeBinding != null and scanCodeBinding != ''">#{scanCodeBinding},</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="updateWxInstrument" parameterType="WxInstrument">
update wx_instrument
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="type != null">type = #{type},</if>
<if test="model != null and model != ''">model = #{model},</if>
<if test="banner != null and banner != ''">banner = #{banner},</if>
<if test="logo != null and logo != ''">logo = #{logo},</if>
<if test="serial != null and serial != ''">serial = #{serial},</if>
<if test="guarantee != null">guarantee = #{guarantee},</if>
<if test="dailyClockCredit != null">daily_clock_credit = #{dailyClockCredit},</if>
<if test="extraClockCredit != null">extra_clock_credit = #{extraClockCredit},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="miniTagIds != null">mini_tag_ids = #{miniTagIds},</if>
<if test="miniTagNames != null">mini_tag_names = #{miniTagNames},</if>
<if test="wecomTagIds != null">wecom_tag_ids = #{wecomTagIds},</if>
<if test="wecomTagNames != null">wecom_tag_names = #{wecomTagNames},</if>
<if test="sceneIds != null and sceneIds != ''">scene_ids = #{sceneIds},</if>
<if test="sceneNames != null">scene_names = #{sceneNames},</if>
<if test="nursingTime != null">nursing_time = #{nursingTime},</if>
<if test="iotVersion != null">iot_version = #{iotVersion},</if>
<if test="iotUpgradeData != null">iot_upgrade_data = #{iotUpgradeData},</if>
<if test="isScanCode != null">isScanCode = #{isScanCode},</if>
<if test="isPurchase != null">isPurchase = #{isPurchase},</if>
<if test="shoppingAppid != null">shopping_appid = #{shoppingAppid},</if>
<if test="shoppingPath != null">shopping_path = #{shoppingPath},</if>
<if test="bluetoothConnecting != null">bluetooth_connecting = #{bluetoothConnecting},</if>
<if test="bluetoothClosed != null">bluetooth_closed = #{bluetoothClosed},</if>
<if test="iotVersionUpgrade != null">iot_version_upgrade = #{iotVersionUpgrade},</if>
<if test="sortNo != null">sort_no = #{sortNo},</if>
<if test="status != null">status = #{status},</if>
<if test="manualCodeBinding != null and manualCodeBinding != ''">manual_code_binding = #{manualCodeBinding},</if>
<if test="scanCodeBinding != null and scanCodeBinding != ''">scan_code_binding = #{scanCodeBinding},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteWxInstrumentById" parameterType="Long">
delete from wx_instrument where id = #{id}
</delete>
<delete id="deleteWxInstrumentByIds" parameterType="String">
delete from wx_instrument where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,87 @@
package com.flossom.system.controller;
import com.flossom.common.core.domain.entity.WxInstrument;
import com.flossom.common.core.domain.req.WxInstrumentReq;
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 org.springframework.beans.BeanUtils;
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 java.util.List;
/**
* Controller
*
* @author flossom
* @date 2024-01-06
*/
@RestController
@RequestMapping("/instrument")
public class WxInstrumentController extends BaseController {
@Autowired
private IWxInstrumentService wxInstrumentService;
/**
*
*/
@RequiresPermissions("system:instrument:list")
@GetMapping("/list")
public TableDataInfo list(WxInstrumentReq wxInstrumentReq) {
startPage();
List<WxInstrument> list = wxInstrumentService.selectWxInstrumentPage(wxInstrumentReq);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:instrument:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(wxInstrumentService.selectWxInstrumentById(id));
}
/**
*
*/
@RequiresPermissions("system:instrument:add")
@Log(title = "仪器列", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WxInstrument wxInstrument) {
return toAjax(wxInstrumentService.insertWxInstrument(wxInstrument));
}
/**
*
*/
@RequiresPermissions("system:instrument:edit")
@Log(title = "仪器列", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WxInstrument wxInstrument) {
return toAjax(wxInstrumentService.updateWxInstrument(wxInstrument));
}
/**
*
*/
@RequiresPermissions("system:instrument:remove")
@Log(title = "仪器列", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(wxInstrumentService.deleteWxInstrumentByIds(ids));
}
}

@ -0,0 +1,70 @@
package com.flossom.system.service;
import com.flossom.common.core.domain.entity.WxInstrument;
import com.flossom.common.core.domain.req.WxInstrumentReq;
import java.util.List;
/**
* Service
*
* @author flossom
* @date 2024-01-06
*/
public interface IWxInstrumentService {
/**
*
*
* @param id
* @return
*/
public WxInstrument selectWxInstrumentById(Long id);
/**
*
*
* @param wxInstrument
* @return
*/
public List<WxInstrument> selectWxInstrumentList(WxInstrument wxInstrument);
/**
*
*
* @return
*/
public List<WxInstrument> selectWxInstrumentPage(WxInstrumentReq wxInstrumentReq);
/**
*
*
* @param wxInstrument
* @return
*/
public int insertWxInstrument(WxInstrument wxInstrument);
/**
*
*
* @param wxInstrument
* @return
*/
public int updateWxInstrument(WxInstrument wxInstrument);
/**
*
*
* @param ids
* @return
*/
public int deleteWxInstrumentByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteWxInstrumentById(Long id);
}

@ -0,0 +1,97 @@
package com.flossom.system.service.impl;
import java.util.List;
import com.flossom.common.core.domain.entity.WxInstrument;
import com.flossom.common.core.domain.req.WxInstrumentReq;
import com.flossom.common.core.mapper.WxInstrumentMapper;
import com.flossom.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxInstrumentService;
/**
* Service
*
* @author flossom
* @date 2024-01-06
*/
@Service
public class WxInstrumentServiceImpl implements IWxInstrumentService {
@Autowired
private WxInstrumentMapper wxInstrumentMapper;
/**
*
*
* @param id
* @return
*/
@Override
public WxInstrument selectWxInstrumentById(Long id) {
return wxInstrumentMapper.selectWxInstrumentById(id);
}
/**
*
*
* @param wxInstrument
* @return
*/
@Override
public List<WxInstrument> selectWxInstrumentList(WxInstrument wxInstrument) {
return wxInstrumentMapper.selectWxInstrumentList(wxInstrument);
}
@Override
public List<WxInstrument> selectWxInstrumentPage(WxInstrumentReq wxInstrumentReq) {
return wxInstrumentMapper.selectWxInstrumentPage(wxInstrumentReq);
}
/**
*
*
* @param wxInstrument
* @return
*/
@Override
public int insertWxInstrument(WxInstrument wxInstrument) {
wxInstrument.setCreateTime(DateUtils.getNowDate());
return wxInstrumentMapper.insertWxInstrument(wxInstrument);
}
/**
*
*
* @param wxInstrument
* @return
*/
@Override
public int updateWxInstrument(WxInstrument wxInstrument) {
wxInstrument.setUpdateTime(DateUtils.getNowDate());
return wxInstrumentMapper.updateWxInstrument(wxInstrument);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteWxInstrumentByIds(Long[] ids) {
return wxInstrumentMapper.deleteWxInstrumentByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteWxInstrumentById(Long id) {
return wxInstrumentMapper.deleteWxInstrumentById(id);
}
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询仪器列列表
export function listInstrument(query) {
return request({
url: '/system/instrument/list',
method: 'get',
params: query
})
}
// 查询仪器列详细
export function getInstrument(id) {
return request({
url: '/system/instrument/' + id,
method: 'get'
})
}
// 新增仪器列
export function addInstrument(data) {
return request({
url: '/system/instrument',
method: 'post',
data: data
})
}
// 修改仪器列
export function updateInstrument(data) {
return request({
url: '/system/instrument',
method: 'put',
data: data
})
}
// 删除仪器列
export function delInstrument(id) {
return request({
url: '/system/instrument/' + id,
method: 'delete'
})
}

@ -0,0 +1,450 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="仪器类型" prop="model">
<el-select v-model="queryParams.type" @keyup.enter.native="handleQuery" style="width: 50%">
<el-option label="全部" :value="null"></el-option>
<el-option label="非IOT仪器" :value="1"></el-option>
<el-option label="IOT仪器" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="仪器名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入仪器名称进行搜索"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仪器ID" prop="id">
<el-input
v-model="queryParams.id"
placeholder="请输入仪器ID进行搜索"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:instrument:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="instrumentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" fixed="left" width="55" align="center" />
<el-table-column label="升序排序" align="center" prop="sortNo" />
<el-table-column label="仪器ID" align="center" prop="id" />
<el-table-column label="仪器类型" align="center" prop="type" >
<template slot-scope="scope">
<span v-show="scope.row.type == 1"></span>
<span v-show="scope.row.type == 2">iot</span>
</template>
</el-table-column>
<el-table-column label="仪器封面" align="center" prop="banner" width="150px">
<template slot-scope="scope">
<el-avatar shape="square" :size="100" :src="scope.row.banner"></el-avatar>
</template>
</el-table-column>
<el-table-column label="仪器LOGO" align="center" prop="logo" width="150px">
<template slot-scope="scope">
<el-avatar shape="square" :size="100" :src="scope.row.logo"></el-avatar>
</template>
</el-table-column>
<el-table-column label="仪器名称" align="center" prop="name" width="150px"/>
<el-table-column label="仪器型号" align="center" prop="model" />
<el-table-column label="保修日期" align="center" prop="guarantee" >
<template slot-scope="scope">
<span v-show="scope.row.guarantee != null">{{scope.row.guarantee}}</span>
</template>
</el-table-column>
<el-table-column label="小程序标签" align="center" prop="miniTagNames" width="150px">
<template slot-scope="scope">
<el-tag v-for="item in scope.row.miniTagNames.split(',')">
{{ item }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="企微标签" align="center" prop="wecomTagNames" width="150px">
<template slot-scope="scope">
<el-tag v-for="item in scope.row.wecomTagNames.split(',')">
{{ item }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="日常打卡奖励" align="center" prop="dailyClockCredit" />
<el-table-column label="额外打卡奖励" align="center" prop="extraClockCredit" />
<el-table-column label="操作" align="center" width="200px" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:instrument:edit']"
>编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
>设置小程序可见标签</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
>设置微信可见标签</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
>正品控名称配置</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
>配置说明书</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:instrument:remove']"
>隐藏</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改仪器列对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="仪器名称" prop="name">
<el-input v-model="form.name" placeholder="请输入仪器名称" />
</el-form-item>
<el-form-item label="iot仪器特有仪器型号" prop="model">
<el-input v-model="form.model" placeholder="请输入iot仪器特有仪器型号" />
</el-form-item>
<el-form-item label="仪器封面" prop="banner">
<el-input v-model="form.banner" placeholder="请输入仪器封面" />
</el-form-item>
<el-form-item label="仪器logo图" prop="logo">
<el-input v-model="form.logo" placeholder="请输入仪器logo图" />
</el-form-item>
<el-form-item label="序列号位置图片" prop="serial">
<el-input v-model="form.serial" placeholder="请输入序列号位置图片" />
</el-form-item>
<el-form-item label="保修日期" prop="guarantee">
<el-input v-model="form.guarantee" placeholder="请输入保修日期" />
</el-form-item>
<el-form-item label="日常打卡获得积分" prop="dailyClockCredit">
<el-input v-model="form.dailyClockCredit" placeholder="请输入日常打卡获得积分" />
</el-form-item>
<el-form-item label="额外打卡奖励积分" prop="extraClockCredit">
<el-input v-model="form.extraClockCredit" placeholder="请输入额外打卡奖励积分" />
</el-form-item>
<el-form-item label="额外打卡时间开始" prop="startTime">
<el-date-picker clearable
v-model="form.startTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择额外打卡时间开始">
</el-date-picker>
</el-form-item>
<el-form-item label="额外打卡时间结束" prop="endTime">
<el-date-picker clearable
v-model="form.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择额外打卡时间结束">
</el-date-picker>
</el-form-item>
<el-form-item label="标签ID(xxxx,xxxx,xxx)" prop="miniTagIds">
<el-input v-model="form.miniTagIds" placeholder="请输入标签ID(xxxx,xxxx,xxx)" />
</el-form-item>
<el-form-item label="标签名字(xxx,xxx,xxx)" prop="miniTagNames">
<el-input v-model="form.miniTagNames" placeholder="请输入标签名字(xxx,xxx,xxx)" />
</el-form-item>
<el-form-item label="标签ID(xxxx,xxxx,xxx)" prop="wecomTagIds">
<el-input v-model="form.wecomTagIds" placeholder="请输入标签ID(xxxx,xxxx,xxx)" />
</el-form-item>
<el-form-item label="标签名称(xxx,xxx,xxx)" prop="wecomTagNames">
<el-input v-model="form.wecomTagNames" placeholder="请输入标签名称(xxx,xxx,xxx)" />
</el-form-item>
<el-form-item label="场景ID(xxxx,xxxx,xxx)" prop="sceneIds">
<el-input v-model="form.sceneIds" placeholder="请输入场景ID(xxxx,xxxx,xxx)" />
</el-form-item>
<el-form-item label="场景名称(xxx,xxx,xxx)" prop="sceneNames">
<el-input v-model="form.sceneNames" placeholder="请输入场景名称(xxx,xxx,xxx)" />
</el-form-item>
<el-form-item label="护理时长" prop="nursingTime">
<el-date-picker clearable
v-model="form.nursingTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择护理时长">
</el-date-picker>
</el-form-item>
<el-form-item label="iot版本" prop="iotVersion">
<el-input v-model="form.iotVersion" placeholder="请输入iot版本" />
</el-form-item>
<el-form-item label="iot升级数据文件" prop="iotUpgradeData">
<el-input v-model="form.iotUpgradeData" placeholder="请输入iot升级数据文件" />
</el-form-item>
<el-form-item label="是否开启扫机身码0、关闭 1、开启" prop="isScanCode">
<el-input v-model="form.isScanCode" placeholder="请输入是否开启扫机身码0、关闭 1、开启" />
</el-form-item>
<el-form-item label="是否支持购买0、不支持 1、支持" prop="isPurchase">
<el-input v-model="form.isPurchase" placeholder="请输入是否支持购买0、不支持 1、支持" />
</el-form-item>
<el-form-item label="商城小程序appid" prop="shoppingAppid">
<el-input v-model="form.shoppingAppid" placeholder="请输入商城小程序appid" />
</el-form-item>
<el-form-item label="商城小程序path" prop="shoppingPath">
<el-input v-model="form.shoppingPath" placeholder="请输入商城小程序path" />
</el-form-item>
<el-form-item label="蓝牙连接中图片" prop="bluetoothConnecting">
<el-input v-model="form.bluetoothConnecting" placeholder="请输入蓝牙连接中图片" />
</el-form-item>
<el-form-item label="蓝牙关闭图片" prop="bluetoothClosed">
<el-input v-model="form.bluetoothClosed" placeholder="请输入蓝牙关闭图片" />
</el-form-item>
<el-form-item label="iot版本升级说明" prop="iotVersionUpgrade">
<el-input v-model="form.iotVersionUpgrade" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="排序:值越大,排序越前" prop="sortNo">
<el-input v-model="form.sortNo" placeholder="请输入排序:值越大,排序越前" />
</el-form-item>
<el-form-item label="手动绑定介绍图片" prop="manualCodeBinding">
<el-input v-model="form.manualCodeBinding" placeholder="请输入手动绑定介绍图片" />
</el-form-item>
<el-form-item label="扫码绑定介绍图片" prop="scanCodeBinding">
<el-input v-model="form.scanCodeBinding" placeholder="请输入扫码绑定介绍图片" />
</el-form-item>
<el-form-item label="${comment}" prop="remark">
<el-input v-model="form.remark" placeholder="请输入${comment}" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInstrument, getInstrument, delInstrument, addInstrument, updateInstrument } from "@/api/system/instrument";
export default {
name: "Instrument",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
instrumentList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
name: null,
type: null,
},
//
form: {},
//
rules: {
name: [
{ required: true, message: "仪器名称不能为空", trigger: "blur" }
],
model: [
{ required: true, message: "iot仪器特有仪器型号不能为空", trigger: "blur" }
],
banner: [
{ required: true, message: "仪器封面不能为空", trigger: "blur" }
],
logo: [
{ required: true, message: "仪器logo图不能为空", trigger: "blur" }
],
serial: [
{ required: true, message: "序列号位置图片不能为空", trigger: "blur" }
],
guarantee: [
{ required: true, message: "保修日期不能为空", trigger: "blur" }
],
sceneIds: [
{ required: true, message: "场景ID(xxxx,xxxx,xxx)不能为空", trigger: "blur" }
],
nursingTime: [
{ required: true, message: "护理时长不能为空", trigger: "blur" }
],
manualCodeBinding: [
{ required: true, message: "手动绑定介绍图片不能为空", trigger: "blur" }
],
scanCodeBinding: [
{ required: true, message: "扫码绑定介绍图片不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询仪器列列表 */
getList() {
this.loading = true;
listInstrument(this.queryParams).then(response => {
this.instrumentList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
type: null,
model: null,
banner: null,
logo: null,
serial: null,
guarantee: null,
dailyClockCredit: null,
extraClockCredit: null,
startTime: null,
endTime: null,
miniTagIds: null,
miniTagNames: null,
wecomTagIds: null,
wecomTagNames: null,
sceneIds: null,
sceneNames: null,
nursingTime: null,
iotVersion: null,
iotUpgradeData: null,
isScanCode: null,
isPurchase: null,
shoppingAppid: null,
shoppingPath: null,
bluetoothConnecting: null,
bluetoothClosed: null,
iotVersionUpgrade: null,
sortNo: null,
status: null,
manualCodeBinding: null,
scanCodeBinding: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加仪器列";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getInstrument(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改仪器列";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInstrument(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInstrument(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除仪器列编号为"' + ids + '"的数据项?').then(function() {
return delInstrument(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
}
};
</script>
Loading…
Cancel
Save