From ee58e54a2ff4c4a7c39276abc12431298c39c144 Mon Sep 17 00:00:00 2001 From: elliott <382696293@qq.com> Date: Wed, 10 Jan 2024 20:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BB=91=E5=AE=9A=E4=BB=AA?= =?UTF-8?q?=E5=99=A8=E6=A8=A1=E5=9D=97=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/entity/WxInstrumentSerial.java | 124 ++++ .../core/domain/entity/WxUserInstrument.java | 306 ++++++++ .../domain/entity/WxUserInstrumentLog.java | 179 +++++ .../core/mapper/WxInstrumentSerialMapper.java | 62 ++ .../mapper/WxUserInstrumentLogMapper.java | 62 ++ .../core/mapper/WxUserInstrumentMapper.java | 62 ++ .../mapper/WxInstrumentSerialMapper.xml | 93 +++ .../mapper/WxUserInstrumentLogMapper.xml | 110 +++ .../mapper/WxUserInstrumentMapper.xml | 144 ++++ .../WxInstrumentSerialController.java | 106 +++ .../WxUserInstrumentController.java | 151 ++++ .../WxUserInstrumentLogController.java | 106 +++ .../service/IWxInstrumentSerialService.java | 62 ++ .../service/IWxUserInstrumentLogService.java | 62 ++ .../service/IWxUserInstrumentService.java | 79 +++ .../system/service/IWxUserMemberService.java | 29 +- .../impl/WxInstrumentSerialServiceImpl.java | 96 +++ .../service/impl/WxScriptTagServiceImpl.java | 8 +- .../impl/WxUserInstrumentLogServiceImpl.java | 97 +++ .../impl/WxUserInstrumentServiceImpl.java | 247 +++++++ .../service/impl/WxUserMemberServiceImpl.java | 5 + flossom-ui/src/api/system/userInstrument.js | 63 ++ .../src/api/system/userInstrumentLog.js | 44 ++ .../src/views/system/scriptTag/index.vue | 18 +- .../src/views/system/userInstrument/index.vue | 651 ++++++++++++++++++ .../src/views/system/wechatTag/index.vue | 1 + 26 files changed, 2948 insertions(+), 19 deletions(-) create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrumentSerial.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserInstrument.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserInstrumentLog.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxInstrumentSerialMapper.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserInstrumentLogMapper.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserInstrumentMapper.java create mode 100644 flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentSerialMapper.xml create mode 100644 flossom-common/flossom-common-core/src/main/resources/mapper/WxUserInstrumentLogMapper.xml create mode 100644 flossom-common/flossom-common-core/src/main/resources/mapper/WxUserInstrumentMapper.xml create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentSerialController.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserInstrumentController.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserInstrumentLogController.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxInstrumentSerialService.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserInstrumentLogService.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserInstrumentService.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentSerialServiceImpl.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentLogServiceImpl.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentServiceImpl.java create mode 100644 flossom-ui/src/api/system/userInstrument.js create mode 100644 flossom-ui/src/api/system/userInstrumentLog.js create mode 100644 flossom-ui/src/views/system/userInstrument/index.vue diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrumentSerial.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrumentSerial.java new file mode 100644 index 0000000..df85698 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrumentSerial.java @@ -0,0 +1,124 @@ +package com.flossom.common.core.domain.entity; + +import com.flossom.common.core.annotation.Excel; +import com.flossom.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 仪器序列号关联对象 wx_instrument_serial + * + * @author flossom + * @date 2024-01-10 + */ +public class WxInstrumentSerial extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 仪器id */ + @Excel(name = "仪器id") + private Long instrumentId; + + /** 仪器名称 */ + @Excel(name = "仪器名称") + private String instrumentName; + + /** 序列号 */ + @Excel(name = "序列号") + private String serial; + + /** 绑定状态,1未绑定,2已解绑 */ + @Excel(name = "绑定状态,0已经绑定,1未绑定,2已解绑") + private Integer bindingStatus; + + /** 序列号有效状态,1有效,0无效 */ + @Excel(name = "序列号有效状态,1有效,0无效") + private Integer validStatus; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private Long status; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setInstrumentId(Long instrumentId) + { + this.instrumentId = instrumentId; + } + + public Long getInstrumentId() + { + return instrumentId; + } + public void setInstrumentName(String instrumentName) + { + this.instrumentName = instrumentName; + } + + public String getInstrumentName() + { + return instrumentName; + } + public void setSerial(String serial) + { + this.serial = serial; + } + + public String getSerial() + { + return serial; + } + public void setBindingStatus(Integer bindingStatus) + { + this.bindingStatus = bindingStatus; + } + + public Integer getBindingStatus() + { + return bindingStatus; + } + public void setValidStatus(Integer validStatus) + { + this.validStatus = validStatus; + } + + public Integer getValidStatus() + { + return validStatus; + } + public void setStatus(Long status) + { + this.status = status; + } + + public Long getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("instrumentId", getInstrumentId()) + .append("instrumentName", getInstrumentName()) + .append("serial", getSerial()) + .append("bindingStatus", getBindingStatus()) + .append("validStatus", getValidStatus()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserInstrument.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserInstrument.java new file mode 100644 index 0000000..63b59cd --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserInstrument.java @@ -0,0 +1,306 @@ +package com.flossom.common.core.domain.entity; + +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.flossom.common.core.annotation.Excel; +import com.flossom.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 用户仪器绑定对象 wx_user_instrument + * + * @author flossom + * @date 2024-01-10 + */ +public class WxUserInstrument extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 用户id */ + @Excel(name = "用户id") + private Long userId; + + /** 序列号 */ + @Excel(name = "序列号") + private String serial; + + /** 仪器id */ + @Excel(name = "仪器id") + private Long instrumentId; + + /** 仪器名称 */ + @Excel(name = "仪器名称") + private String instrumentName; + + /** 序列号图片 */ + @Excel(name = "序列号图片") + private String serialImage; + + /** 保修日期 */ + @Excel(name = "保修日期") + private Long guarantee; + + + + /** 保修到期时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "保修到期时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date guaranteeEndtime; + + /** 绑定状态,1未绑定,2已解绑 */ + @Excel(name = "绑定状态,1未绑定,2已解绑,0-已绑定") + private Integer bindingStatus; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private Long status; + // 仪器实体 + private WxInstrument wxInstrument; + + // 微信用户实体 + private WxUserMember wxUserMember; + + // 查询用户ID 格式为xxx,xxx,xxx + private String userIds; + private List userIdArray; + // 用户手机 + private String userPhone; + // 查询仪器id集合 + private String instrumentIds; + // 仪器集合名称集合 + private List instrumentIdArray; + // 状态集合 + private List bindingStatusArray; + // 查询用的昵称 + private String nickName; + // 查询的绑定状态 + private List bindStatusQuery; + private String mapperBindStatus; + + private String startTime; + private String endTime; + + + public List getUserIdArray() { + return userIdArray; + } + + public void setUserIdArray(List userIdArray) { + this.userIdArray = userIdArray; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getUserIds() { + return userIds; + } + + public void setUserIds(String userIds) { + this.userIds = userIds; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public String getInstrumentIds() { + return instrumentIds; + } + + public void setInstrumentIds(String instrumentIds) { + this.instrumentIds = instrumentIds; + } + + public List getInstrumentIdArray() { + return instrumentIdArray; + } + + public void setInstrumentIdArray(List instrumentIdArray) { + this.instrumentIdArray = instrumentIdArray; + } + + public List getBindingStatusArray() { + return bindingStatusArray; + } + + public void setBindingStatusArray(List bindingStatusArray) { + this.bindingStatusArray = bindingStatusArray; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getMapperBindStatus() { + return mapperBindStatus; + } + + public void setMapperBindStatus(String mapperBindStatus) { + this.mapperBindStatus = mapperBindStatus; + } + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + public void setSerial(String serial) + { + this.serial = serial; + } + + public String getSerial() + { + return serial; + } + public void setInstrumentId(Long instrumentId) + { + this.instrumentId = instrumentId; + } + + public Long getInstrumentId() + { + return instrumentId; + } + public void setInstrumentName(String instrumentName) + { + this.instrumentName = instrumentName; + } + + public String getInstrumentName() + { + return instrumentName; + } + public void setSerialImage(String serialImage) + { + this.serialImage = serialImage; + } + + public String getSerialImage() + { + return serialImage; + } + public void setGuarantee(Long guarantee) + { + this.guarantee = guarantee; + } + + public Long getGuarantee() + { + return guarantee; + } + public void setGuaranteeEndtime(Date guaranteeEndtime) + { + this.guaranteeEndtime = guaranteeEndtime; + } + + public Date getGuaranteeEndtime() + { + return guaranteeEndtime; + } + public void setBindingStatus(Integer bindingStatus) + { + this.bindingStatus = bindingStatus; + } + + public Integer getBindingStatus() + { + return bindingStatus; + } + public void setStatus(Long status) + { + this.status = status; + } + + public Long getStatus() + { + return status; + } + + public WxInstrument getWxInstrument() { + return wxInstrument; + } + + public void setWxInstrument(WxInstrument wxInstrument) { + this.wxInstrument = wxInstrument; + } + + public WxUserMember getWxUserMember() { + return wxUserMember; + } + + public void setWxUserMember(WxUserMember wxUserMember) { + this.wxUserMember = wxUserMember; + } + + public List getBindStatusQuery() { + return bindStatusQuery; + } + + public void setBindStatusQuery(List bindStatusQuery) { + this.bindStatusQuery = bindStatusQuery; + } + + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("userId", getUserId()) + .append("serial", getSerial()) + .append("instrumentId", getInstrumentId()) + .append("instrumentName", getInstrumentName()) + .append("serialImage", getSerialImage()) + .append("guarantee", getGuarantee()) + .append("guaranteeEndtime", getGuaranteeEndtime()) + .append("bindingStatus", getBindingStatus()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserInstrumentLog.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserInstrumentLog.java new file mode 100644 index 0000000..1f17c90 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserInstrumentLog.java @@ -0,0 +1,179 @@ +package com.flossom.common.core.domain.entity; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.flossom.common.core.annotation.Excel; +import com.flossom.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 用户仪器绑定日志对象 wx_user_instrument_log + * + * @author flossom + * @date 2024-01-10 + */ +public class WxUserInstrumentLog extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 关联绑定ID */ + private Long userInstrumentId; + + /** 用户id */ + @Excel(name = "用户id") + private Long userId; + + /** 序列号 */ + @Excel(name = "序列号") + private String serial; + + /** 仪器id */ + @Excel(name = "仪器id") + private Long instrumentId; + + /** 仪器名称 */ + @Excel(name = "仪器名称") + private String instrumentName; + + /** 序列号图片 */ + @Excel(name = "序列号图片") + private String serialImage; + + /** 保修日期 */ + @Excel(name = "保修日期") + private Long guarantee; + + /** 保修到期时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "保修到期时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date guaranteeEndtime; + + /** 绑定状态,1未绑定,2已解绑 */ + @Excel(name = "绑定状态,1未绑定,2已解绑,0-已绑定") + private Integer bindingStatus; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private Long status; + + public Long getUserInstrumentId() { + return userInstrumentId; + } + + public void setUserInstrumentId(Long userInstrumentId) { + this.userInstrumentId = userInstrumentId; + } + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + public void setSerial(String serial) + { + this.serial = serial; + } + + public String getSerial() + { + return serial; + } + public void setInstrumentId(Long instrumentId) + { + this.instrumentId = instrumentId; + } + + public Long getInstrumentId() + { + return instrumentId; + } + public void setInstrumentName(String instrumentName) + { + this.instrumentName = instrumentName; + } + + public String getInstrumentName() + { + return instrumentName; + } + public void setSerialImage(String serialImage) + { + this.serialImage = serialImage; + } + + public String getSerialImage() + { + return serialImage; + } + public void setGuarantee(Long guarantee) + { + this.guarantee = guarantee; + } + + public Long getGuarantee() + { + return guarantee; + } + public void setGuaranteeEndtime(Date guaranteeEndtime) + { + this.guaranteeEndtime = guaranteeEndtime; + } + + public Date getGuaranteeEndtime() + { + return guaranteeEndtime; + } + public void setBindingStatus(Integer bindingStatus) + { + this.bindingStatus = bindingStatus; + } + + public Integer getBindingStatus() + { + return bindingStatus; + } + public void setStatus(Long status) + { + this.status = status; + } + + public Long getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("userId", getUserId()) + .append("serial", getSerial()) + .append("instrumentId", getInstrumentId()) + .append("instrumentName", getInstrumentName()) + .append("serialImage", getSerialImage()) + .append("guarantee", getGuarantee()) + .append("guaranteeEndtime", getGuaranteeEndtime()) + .append("bindingStatus", getBindingStatus()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxInstrumentSerialMapper.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxInstrumentSerialMapper.java new file mode 100644 index 0000000..0282e4a --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxInstrumentSerialMapper.java @@ -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 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); +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserInstrumentLogMapper.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserInstrumentLogMapper.java new file mode 100644 index 0000000..880782a --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserInstrumentLogMapper.java @@ -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 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); +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserInstrumentMapper.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserInstrumentMapper.java new file mode 100644 index 0000000..152dda1 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserInstrumentMapper.java @@ -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 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); +} diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentSerialMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentSerialMapper.xml new file mode 100644 index 0000000..700721b --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentSerialMapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + select id, instrument_id, instrument_name, serial, binding_status, valid_status, status, create_by, create_time, remark from wx_instrument_serial + + + + + + + + insert into wx_instrument_serial + + instrument_id, + instrument_name, + serial, + binding_status, + valid_status, + status, + create_by, + create_time, + remark, + + + #{instrumentId}, + #{instrumentName}, + #{serial}, + #{bindingStatus}, + #{validStatus}, + #{status}, + #{createBy}, + #{createTime}, + #{remark}, + + + + + update wx_instrument_serial + + instrument_id = #{instrumentId}, + instrument_name = #{instrumentName}, + serial = #{serial}, + binding_status = #{bindingStatus}, + valid_status = #{validStatus}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from wx_instrument_serial where id = #{id} + + + + delete from wx_instrument_serial where id in + + #{id} + + + diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserInstrumentLogMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserInstrumentLogMapper.xml new file mode 100644 index 0000000..ff9d85c --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserInstrumentLogMapper.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into wx_user_instrument_log + + user_instrument_id, + user_id, + serial, + instrument_id, + instrument_name, + serial_image, + guarantee, + guarantee_endtime, + binding_status, + status, + create_by, + create_time, + + + #{userInstrumentId}, + #{userId}, + #{serial}, + #{instrumentId}, + #{instrumentName}, + #{serialImage}, + #{guarantee}, + #{guaranteeEndtime}, + #{bindingStatus}, + #{status}, + #{createBy}, + #{createTime}, + + + + + update wx_user_instrument_log + + user_instrument_id = #{userInstrumentId}, + user_id = #{userId}, + serial = #{serial}, + instrument_id = #{instrumentId}, + instrument_name = #{instrumentName}, + serial_image = #{serialImage}, + guarantee = #{guarantee}, + guarantee_endtime = #{guaranteeEndtime}, + binding_status = #{bindingStatus}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from wx_user_instrument_log where id = #{id} + + + + delete from wx_user_instrument_log where id in + + #{id} + + + diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserInstrumentMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserInstrumentMapper.xml new file mode 100644 index 0000000..b4fc4d7 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserInstrumentMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into wx_user_instrument + + user_id, + serial, + instrument_id, + instrument_name, + serial_image, + guarantee, + guarantee_endtime, + binding_status, + status, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{userId}, + #{serial}, + #{instrumentId}, + #{instrumentName}, + #{serialImage}, + #{guarantee}, + #{guaranteeEndtime}, + #{bindingStatus}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update wx_user_instrument + + user_id = #{userId}, + serial = #{serial}, + instrument_id = #{instrumentId}, + instrument_name = #{instrumentName}, + serial_image = #{serialImage}, + guarantee = #{guarantee}, + guarantee_endtime = #{guaranteeEndtime}, + binding_status = #{bindingStatus}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + and + + user_id = #{item} + + + + and + + instrument_id = #{item} + + + + and + + binding_status = #{item} + + + + and create_time >= #{startTime} + + + and create_time <= #{endTime} + + + where id = #{id} + + + + delete from wx_user_instrument where id = #{id} + + + + delete from wx_user_instrument where id in + + #{id} + + + diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentSerialController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentSerialController.java new file mode 100644 index 0000000..c981040 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentSerialController.java @@ -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 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 list = wxInstrumentSerialService.selectWxInstrumentSerialList(wxInstrumentSerial); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserInstrumentController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserInstrumentController.java new file mode 100644 index 0000000..b12d32f --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserInstrumentController.java @@ -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 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 list = wxUserInstrumentService.selectWxUserInstrumentList(wxUserInstrument); + ExcelUtil util = new ExcelUtil(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 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)); + } + + +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserInstrumentLogController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserInstrumentLogController.java new file mode 100644 index 0000000..7001cb9 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserInstrumentLogController.java @@ -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 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 list = wxUserInstrumentLogService.selectWxUserInstrumentLogList(wxUserInstrumentLog); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxInstrumentSerialService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxInstrumentSerialService.java new file mode 100644 index 0000000..6a57273 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxInstrumentSerialService.java @@ -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 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); +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserInstrumentLogService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserInstrumentLogService.java new file mode 100644 index 0000000..23e7722 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserInstrumentLogService.java @@ -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 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); +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserInstrumentService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserInstrumentService.java new file mode 100644 index 0000000..cc75bbb --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserInstrumentService.java @@ -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 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 changeSerial(WxUserInstrument wxUserInstrument); + + /** + * 变革保修期限 + * + * @param wxUserInstrument 用户仪器绑定 + * @return 结果 + */ + public int changeGuarantee(WxUserInstrument wxUserInstrument); +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserMemberService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserMemberService.java index d94e565..63bff80 100644 --- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserMemberService.java +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserMemberService.java @@ -12,23 +12,36 @@ import java.util.List; /** * 用户Service接口 - * + * * @author flossom * @date 2023-12-08 */ -public interface IWxUserMemberService +public interface + + + +IWxUserMemberService { /** * 查询用户 - * + * * @param id 用户主键 * @return 用户 */ public WxUserMemberVo selectWxUserMemberById(Long id); + /** + * 查询用户 + * + * @param id 用户主键原始方法 + * @return 用户 + */ + public WxUserMember selectWxUserMemberByIdInit(Long id); + + /** * 查询用户列表 - * + * * @param wxUserMember 用户 * @return 用户集合 */ @@ -44,7 +57,7 @@ public interface IWxUserMemberService /** * 新增用户 - * + * * @param wxUserMember 用户 * @return 结果 */ @@ -52,7 +65,7 @@ public interface IWxUserMemberService /** * 修改用户 - * + * * @param wxUserMember 用户 * @return 结果 */ @@ -60,7 +73,7 @@ public interface IWxUserMemberService /** * 批量删除用户 - * + * * @param ids 需要删除的用户主键集合 * @return 结果 */ @@ -68,7 +81,7 @@ public interface IWxUserMemberService /** * 删除用户信息 - * + * * @param id 用户主键 * @return 结果 */ diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentSerialServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentSerialServiceImpl.java new file mode 100644 index 0000000..e8bf7ce --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentSerialServiceImpl.java @@ -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 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); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxScriptTagServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxScriptTagServiceImpl.java index a5fb7da..84fd329 100644 --- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxScriptTagServiceImpl.java +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxScriptTagServiceImpl.java @@ -114,21 +114,27 @@ public class WxScriptTagServiceImpl implements IWxScriptTagService WxScriptTag tag = new WxScriptTag(); tag.setTagId(tagId); List wxScriptTags = wxScriptTagMapper.selectWxScriptTagList(tag); + System.out.println("根据删除的标签ID:"+tag+",获取到话术标签列表信息:"+wxScriptTags.size()); // 开始组装新的数据以及更新源数据 if (!CollectionUtils.isEmpty(wxScriptTags)) { for (WxScriptTag wxScriptTag: wxScriptTags) { Long scriptId = wxScriptTag.getScriptId(); // 话术模板 WxScriptTemplate wxScriptTemplate = wxScriptTemplateMapper.selectWxScriptTemplateById(scriptId); + System.out.println("根据删除的标签ID:"+tag+",话术模板:"+wxScriptTemplate.getScriptName()); if (Objects.nonNull(wxScriptTemplate)) { WxScriptTag tagsVO = new WxScriptTag(); tagsVO.setScriptId(scriptId); // 反查得到所有的标签 List wxScriptTotalTags = wxScriptTagMapper.selectWxScriptTagList(tagsVO); + System.out.println("根据删除的标签ID:"+tag+",获取到所有的标签信息:"+wxScriptTotalTags.size()); // 过滤删除的标签 if (!CollectionUtils.isEmpty(wxScriptTotalTags)) { + wxScriptTemplate.setTagNames(""); + wxScriptTemplate.setTagIds(""); // 获取过滤后的标签的信息 List collectList = wxScriptTotalTags.stream().filter(x -> !String.valueOf(x.getTagId()).equals(String.valueOf(tagId))).collect(Collectors.toList()); + System.out.println("根据删除的标签ID:"+tag+",过滤后:"+collectList.size()); List createSysTagList = Lists.newArrayList(); if (!CollectionUtils.isEmpty(collectList)) { for (WxScriptTag scriptTag : collectList) { @@ -144,8 +150,8 @@ public class WxScriptTagServiceImpl implements IWxScriptTagService List resultList = createSysTagList.stream().map(SysTag::getId).collect(Collectors.toList()); String ids = StringUtils.join(resultList, ","); wxScriptTemplate.setTagIds(ids); - wxScriptTemplateMapper.updateWxScriptTemplate(wxScriptTemplate); } + wxScriptTemplateMapper.updateWxScriptTemplate(wxScriptTemplate); } } } diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentLogServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentLogServiceImpl.java new file mode 100644 index 0000000..a35fbcf --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentLogServiceImpl.java @@ -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 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); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentServiceImpl.java new file mode 100644 index 0000000..18fc8db --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentServiceImpl.java @@ -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 selectWxUserInstrumentList(WxUserInstrument wxUserInstrument) + { + // 处理用户昵称 + if (StringUtils.isNotEmpty(wxUserInstrument.getNickName())){ + WxUserMember userMember = new WxUserMember(); + userMember.setNickname(wxUserInstrument.getNickName()); + List 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 userIdList = Lists.newArrayList(); + // 获取手机集合 + List mobileList = Arrays.asList(wxUserInstrument.getUserPhone().split(",")).stream().map(String::valueOf).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(mobileList)) { + for (String mobile: mobileList) { + List 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 changeSerial(WxUserInstrument wxUserInstrument) { + Map resultMap = Maps.newHashMap(); + // 查询序列号是否有效存在 + WxInstrumentSerial serial = new WxInstrumentSerial(); + serial.setSerial(wxUserInstrument.getSerial()); + List 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 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); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserMemberServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserMemberServiceImpl.java index da63535..50f6868 100644 --- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserMemberServiceImpl.java +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserMemberServiceImpl.java @@ -97,6 +97,11 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService { return wxUserMemberVo; } + @Override + public WxUserMember selectWxUserMemberByIdInit(Long id) { + return wxUserMemberMapper.selectWxUserMemberById(id); + } + /** * 查询用户列表 * diff --git a/flossom-ui/src/api/system/userInstrument.js b/flossom-ui/src/api/system/userInstrument.js new file mode 100644 index 0000000..18940ec --- /dev/null +++ b/flossom-ui/src/api/system/userInstrument.js @@ -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 + }) +} + diff --git a/flossom-ui/src/api/system/userInstrumentLog.js b/flossom-ui/src/api/system/userInstrumentLog.js new file mode 100644 index 0000000..cead001 --- /dev/null +++ b/flossom-ui/src/api/system/userInstrumentLog.js @@ -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' + }) +} diff --git a/flossom-ui/src/views/system/scriptTag/index.vue b/flossom-ui/src/views/system/scriptTag/index.vue index 9f59b02..3eb16ab 100644 --- a/flossom-ui/src/views/system/scriptTag/index.vue +++ b/flossom-ui/src/views/system/scriptTag/index.vue @@ -154,37 +154,37 @@ - + - + - + - + - + - + - + @@ -354,15 +354,13 @@ export default { if (row.id) { this.topAdd = false; this.title = "添加二级话术"; - this.form.type = 0; + // this.form.type = 0; } else { this.topAdd = true; this.title = "添加一级话术"; } } - this.open = true; - listTemplate().then(response => { this.deptOptions = this.handleTree(response.data, "id"); }); diff --git a/flossom-ui/src/views/system/userInstrument/index.vue b/flossom-ui/src/views/system/userInstrument/index.vue new file mode 100644 index 0000000..61d5acd --- /dev/null +++ b/flossom-ui/src/views/system/userInstrument/index.vue @@ -0,0 +1,651 @@ + + + diff --git a/flossom-ui/src/views/system/wechatTag/index.vue b/flossom-ui/src/views/system/wechatTag/index.vue index 3ac9fc3..36f51ff 100644 --- a/flossom-ui/src/views/system/wechatTag/index.vue +++ b/flossom-ui/src/views/system/wechatTag/index.vue @@ -335,6 +335,7 @@ export default { this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, + /** 导出按钮操作 */ handleExport() { this.download('system/tagInfo/export', {