From 9c5072716aa77d3502d035791bc2497a2a209cd9 Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Sat, 6 Jan 2024 16:57:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=AA=E5=99=A8=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/domain/entity/WxInstrument.java | 480 ++++++++++++++++++ .../core/domain/req/WxInstrumentReq.java | 65 +++ .../core/mapper/WxInstrumentMapper.java | 66 +++ .../resources/mapper/WxInstrumentMapper.xml | 237 +++++++++ .../controller/WxInstrumentController.java | 87 ++++ .../system/service/IWxInstrumentService.java | 70 +++ .../service/impl/WxInstrumentServiceImpl.java | 97 ++++ flossom-ui/src/api/system/instrument.js | 44 ++ .../src/views/system/instrument/index.vue | 450 ++++++++++++++++ 9 files changed, 1596 insertions(+) create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrument.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentReq.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxInstrumentMapper.java create mode 100644 flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentMapper.xml create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentController.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxInstrumentService.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentServiceImpl.java create mode 100644 flossom-ui/src/api/system/instrument.js create mode 100644 flossom-ui/src/views/system/instrument/index.vue diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrument.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrument.java new file mode 100644 index 0000000..68fb841 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrument.java @@ -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、普通仪器 2、iot仪器 + */ + 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(); + } +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentReq.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentReq.java new file mode 100644 index 0000000..22106f2 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentReq.java @@ -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、普通仪器 2、iot仪器 + */ + 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; + } +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxInstrumentMapper.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxInstrumentMapper.java new file mode 100644 index 0000000..c2ad68b --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxInstrumentMapper.java @@ -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 selectWxInstrumentList(WxInstrument wxInstrument); + + List 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); + + +} diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentMapper.xml new file mode 100644 index 0000000..9815d6c --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentMapper.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + insert into wx_instrument + + 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, + + + #{name}, + #{type}, + #{model}, + #{banner}, + #{logo}, + #{serial}, + #{guarantee}, + #{dailyClockCredit}, + #{extraClockCredit}, + #{startTime}, + #{endTime}, + #{miniTagIds}, + #{miniTagNames}, + #{wecomTagIds}, + #{wecomTagNames}, + #{sceneIds}, + #{sceneNames}, + #{nursingTime}, + #{iotVersion}, + #{iotUpgradeData}, + #{isScanCode}, + #{isPurchase}, + #{shoppingAppid}, + #{shoppingPath}, + #{bluetoothConnecting}, + #{bluetoothClosed}, + #{iotVersionUpgrade}, + #{sortNo}, + #{status}, + #{manualCodeBinding}, + #{scanCodeBinding}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update wx_instrument + + name = #{name}, + type = #{type}, + model = #{model}, + banner = #{banner}, + logo = #{logo}, + serial = #{serial}, + guarantee = #{guarantee}, + daily_clock_credit = #{dailyClockCredit}, + extra_clock_credit = #{extraClockCredit}, + start_time = #{startTime}, + end_time = #{endTime}, + mini_tag_ids = #{miniTagIds}, + mini_tag_names = #{miniTagNames}, + wecom_tag_ids = #{wecomTagIds}, + wecom_tag_names = #{wecomTagNames}, + scene_ids = #{sceneIds}, + scene_names = #{sceneNames}, + nursing_time = #{nursingTime}, + iot_version = #{iotVersion}, + iot_upgrade_data = #{iotUpgradeData}, + isScanCode = #{isScanCode}, + isPurchase = #{isPurchase}, + shopping_appid = #{shoppingAppid}, + shopping_path = #{shoppingPath}, + bluetooth_connecting = #{bluetoothConnecting}, + bluetooth_closed = #{bluetoothClosed}, + iot_version_upgrade = #{iotVersionUpgrade}, + sort_no = #{sortNo}, + status = #{status}, + manual_code_binding = #{manualCodeBinding}, + scan_code_binding = #{scanCodeBinding}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from wx_instrument where id = #{id} + + + + delete from wx_instrument where id in + + #{id} + + + \ No newline at end of file diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentController.java new file mode 100644 index 0000000..7dde24e --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentController.java @@ -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 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)); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxInstrumentService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxInstrumentService.java new file mode 100644 index 0000000..af37334 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxInstrumentService.java @@ -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 selectWxInstrumentList(WxInstrument wxInstrument); + + /** + * 查询仪器列列表 + * + * @return 仪器列集合 + */ + public List 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); +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentServiceImpl.java new file mode 100644 index 0000000..5547f71 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentServiceImpl.java @@ -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 selectWxInstrumentList(WxInstrument wxInstrument) { + return wxInstrumentMapper.selectWxInstrumentList(wxInstrument); + } + + @Override + public List 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); + } +} diff --git a/flossom-ui/src/api/system/instrument.js b/flossom-ui/src/api/system/instrument.js new file mode 100644 index 0000000..ef515ff --- /dev/null +++ b/flossom-ui/src/api/system/instrument.js @@ -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' + }) +} diff --git a/flossom-ui/src/views/system/instrument/index.vue b/flossom-ui/src/views/system/instrument/index.vue new file mode 100644 index 0000000..97ed532 --- /dev/null +++ b/flossom-ui/src/views/system/instrument/index.vue @@ -0,0 +1,450 @@ + + +