仪器管理页面
parent
c307d04179
commit
9c5072716a
@ -0,0 +1,66 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrument;
|
||||
import com.flossom.common.core.domain.req.WxInstrumentReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仪器列Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-06
|
||||
*/
|
||||
public interface WxInstrumentMapper {
|
||||
/**
|
||||
* 查询仪器列
|
||||
*
|
||||
* @param id 仪器列主键
|
||||
* @return 仪器列
|
||||
*/
|
||||
public WxInstrument selectWxInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询仪器列列表
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 仪器列集合
|
||||
*/
|
||||
public List<WxInstrument> selectWxInstrumentList(WxInstrument wxInstrument);
|
||||
|
||||
List<WxInstrument> selectWxInstrumentPage(WxInstrumentReq wxInstrumentReq);
|
||||
|
||||
/**
|
||||
* 新增仪器列
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxInstrument(WxInstrument wxInstrument);
|
||||
|
||||
/**
|
||||
* 修改仪器列
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxInstrument(WxInstrument wxInstrument);
|
||||
|
||||
/**
|
||||
* 删除仪器列
|
||||
*
|
||||
* @param id 仪器列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除仪器列
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentByIds(Long[] ids);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.flossom.common.core.mapper.WxInstrumentMapper">
|
||||
|
||||
<resultMap type="WxInstrument" id="WxInstrumentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="model" column="model" />
|
||||
<result property="banner" column="banner" />
|
||||
<result property="logo" column="logo" />
|
||||
<result property="serial" column="serial" />
|
||||
<result property="guarantee" column="guarantee" />
|
||||
<result property="dailyClockCredit" column="daily_clock_credit" />
|
||||
<result property="extraClockCredit" column="extra_clock_credit" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="miniTagIds" column="mini_tag_ids" />
|
||||
<result property="miniTagNames" column="mini_tag_names" />
|
||||
<result property="wecomTagIds" column="wecom_tag_ids" />
|
||||
<result property="wecomTagNames" column="wecom_tag_names" />
|
||||
<result property="sceneIds" column="scene_ids" />
|
||||
<result property="sceneNames" column="scene_names" />
|
||||
<result property="nursingTime" column="nursing_time" />
|
||||
<result property="iotVersion" column="iot_version" />
|
||||
<result property="iotUpgradeData" column="iot_upgrade_data" />
|
||||
<result property="isScanCode" column="isScanCode" />
|
||||
<result property="isPurchase" column="isPurchase" />
|
||||
<result property="shoppingAppid" column="shopping_appid" />
|
||||
<result property="shoppingPath" column="shopping_path" />
|
||||
<result property="bluetoothConnecting" column="bluetooth_connecting" />
|
||||
<result property="bluetoothClosed" column="bluetooth_closed" />
|
||||
<result property="iotVersionUpgrade" column="iot_version_upgrade" />
|
||||
<result property="sortNo" column="sort_no" />
|
||||
<result property="status" column="status" />
|
||||
<result property="manualCodeBinding" column="manual_code_binding" />
|
||||
<result property="scanCodeBinding" column="scan_code_binding" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxInstrumentVo">
|
||||
select id, name, type, model, banner, logo, serial, guarantee, daily_clock_credit, extra_clock_credit, start_time, end_time, mini_tag_ids, mini_tag_names, wecom_tag_ids, wecom_tag_names, scene_ids, scene_names, nursing_time, iot_version, iot_upgrade_data, isScanCode, isPurchase, shopping_appid, shopping_path, bluetooth_connecting, bluetooth_closed, iot_version_upgrade, sort_no, status, manual_code_binding, scan_code_binding, create_by, create_time, update_by, update_time, remark from wx_instrument
|
||||
</sql>
|
||||
|
||||
<select id="selectWxInstrumentList" parameterType="WxInstrument" resultMap="WxInstrumentResult">
|
||||
<include refid="selectWxInstrumentVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="model != null and model != ''"> and model = #{model}</if>
|
||||
<if test="banner != null and banner != ''"> and banner = #{banner}</if>
|
||||
<if test="logo != null and logo != ''"> and logo = #{logo}</if>
|
||||
<if test="serial != null and serial != ''"> and serial = #{serial}</if>
|
||||
<if test="guarantee != null "> and guarantee = #{guarantee}</if>
|
||||
<if test="dailyClockCredit != null "> and daily_clock_credit = #{dailyClockCredit}</if>
|
||||
<if test="extraClockCredit != null "> and extra_clock_credit = #{extraClockCredit}</if>
|
||||
<if test="startTime != null "> and start_time = #{startTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
<if test="miniTagIds != null and miniTagIds != ''"> and mini_tag_ids = #{miniTagIds}</if>
|
||||
<if test="miniTagNames != null and miniTagNames != ''"> and mini_tag_names = #{miniTagNames}</if>
|
||||
<if test="wecomTagIds != null and wecomTagIds != ''"> and wecom_tag_ids = #{wecomTagIds}</if>
|
||||
<if test="wecomTagNames != null and wecomTagNames != ''"> and wecom_tag_names = #{wecomTagNames}</if>
|
||||
<if test="sceneIds != null and sceneIds != ''"> and scene_ids = #{sceneIds}</if>
|
||||
<if test="sceneNames != null and sceneNames != ''"> and scene_names = #{sceneNames}</if>
|
||||
<if test="nursingTime != null "> and nursing_time = #{nursingTime}</if>
|
||||
<if test="iotVersion != null and iotVersion != ''"> and iot_version = #{iotVersion}</if>
|
||||
<if test="iotUpgradeData != null and iotUpgradeData != ''"> and iot_upgrade_data = #{iotUpgradeData}</if>
|
||||
<if test="isScanCode != null "> and isScanCode = #{isScanCode}</if>
|
||||
<if test="isPurchase != null "> and isPurchase = #{isPurchase}</if>
|
||||
<if test="shoppingAppid != null and shoppingAppid != ''"> and shopping_appid = #{shoppingAppid}</if>
|
||||
<if test="shoppingPath != null and shoppingPath != ''"> and shopping_path = #{shoppingPath}</if>
|
||||
<if test="bluetoothConnecting != null and bluetoothConnecting != ''"> and bluetooth_connecting = #{bluetoothConnecting}</if>
|
||||
<if test="bluetoothClosed != null and bluetoothClosed != ''"> and bluetooth_closed = #{bluetoothClosed}</if>
|
||||
<if test="iotVersionUpgrade != null and iotVersionUpgrade != ''"> and iot_version_upgrade = #{iotVersionUpgrade}</if>
|
||||
<if test="sortNo != null "> and sort_no = #{sortNo}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="manualCodeBinding != null and manualCodeBinding != ''"> and manual_code_binding = #{manualCodeBinding}</if>
|
||||
<if test="scanCodeBinding != null and scanCodeBinding != ''"> and scan_code_binding = #{scanCodeBinding}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWxInstrumentPage" parameterType="WxInstrumentReq" resultMap="WxInstrumentResult">
|
||||
<include refid="selectWxInstrumentVo"/>
|
||||
<where>
|
||||
<if test="id != null"> and id like concat('%', #{id}, '%')</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWxInstrumentById" parameterType="Long" resultMap="WxInstrumentResult">
|
||||
<include refid="selectWxInstrumentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxInstrument" parameterType="WxInstrument" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_instrument
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="model != null and model != ''">model,</if>
|
||||
<if test="banner != null and banner != ''">banner,</if>
|
||||
<if test="logo != null and logo != ''">logo,</if>
|
||||
<if test="serial != null and serial != ''">serial,</if>
|
||||
<if test="guarantee != null">guarantee,</if>
|
||||
<if test="dailyClockCredit != null">daily_clock_credit,</if>
|
||||
<if test="extraClockCredit != null">extra_clock_credit,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="miniTagIds != null">mini_tag_ids,</if>
|
||||
<if test="miniTagNames != null">mini_tag_names,</if>
|
||||
<if test="wecomTagIds != null">wecom_tag_ids,</if>
|
||||
<if test="wecomTagNames != null">wecom_tag_names,</if>
|
||||
<if test="sceneIds != null and sceneIds != ''">scene_ids,</if>
|
||||
<if test="sceneNames != null">scene_names,</if>
|
||||
<if test="nursingTime != null">nursing_time,</if>
|
||||
<if test="iotVersion != null">iot_version,</if>
|
||||
<if test="iotUpgradeData != null">iot_upgrade_data,</if>
|
||||
<if test="isScanCode != null">isScanCode,</if>
|
||||
<if test="isPurchase != null">isPurchase,</if>
|
||||
<if test="shoppingAppid != null">shopping_appid,</if>
|
||||
<if test="shoppingPath != null">shopping_path,</if>
|
||||
<if test="bluetoothConnecting != null">bluetooth_connecting,</if>
|
||||
<if test="bluetoothClosed != null">bluetooth_closed,</if>
|
||||
<if test="iotVersionUpgrade != null">iot_version_upgrade,</if>
|
||||
<if test="sortNo != null">sort_no,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="manualCodeBinding != null and manualCodeBinding != ''">manual_code_binding,</if>
|
||||
<if test="scanCodeBinding != null and scanCodeBinding != ''">scan_code_binding,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="model != null and model != ''">#{model},</if>
|
||||
<if test="banner != null and banner != ''">#{banner},</if>
|
||||
<if test="logo != null and logo != ''">#{logo},</if>
|
||||
<if test="serial != null and serial != ''">#{serial},</if>
|
||||
<if test="guarantee != null">#{guarantee},</if>
|
||||
<if test="dailyClockCredit != null">#{dailyClockCredit},</if>
|
||||
<if test="extraClockCredit != null">#{extraClockCredit},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="miniTagIds != null">#{miniTagIds},</if>
|
||||
<if test="miniTagNames != null">#{miniTagNames},</if>
|
||||
<if test="wecomTagIds != null">#{wecomTagIds},</if>
|
||||
<if test="wecomTagNames != null">#{wecomTagNames},</if>
|
||||
<if test="sceneIds != null and sceneIds != ''">#{sceneIds},</if>
|
||||
<if test="sceneNames != null">#{sceneNames},</if>
|
||||
<if test="nursingTime != null">#{nursingTime},</if>
|
||||
<if test="iotVersion != null">#{iotVersion},</if>
|
||||
<if test="iotUpgradeData != null">#{iotUpgradeData},</if>
|
||||
<if test="isScanCode != null">#{isScanCode},</if>
|
||||
<if test="isPurchase != null">#{isPurchase},</if>
|
||||
<if test="shoppingAppid != null">#{shoppingAppid},</if>
|
||||
<if test="shoppingPath != null">#{shoppingPath},</if>
|
||||
<if test="bluetoothConnecting != null">#{bluetoothConnecting},</if>
|
||||
<if test="bluetoothClosed != null">#{bluetoothClosed},</if>
|
||||
<if test="iotVersionUpgrade != null">#{iotVersionUpgrade},</if>
|
||||
<if test="sortNo != null">#{sortNo},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="manualCodeBinding != null and manualCodeBinding != ''">#{manualCodeBinding},</if>
|
||||
<if test="scanCodeBinding != null and scanCodeBinding != ''">#{scanCodeBinding},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxInstrument" parameterType="WxInstrument">
|
||||
update wx_instrument
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="model != null and model != ''">model = #{model},</if>
|
||||
<if test="banner != null and banner != ''">banner = #{banner},</if>
|
||||
<if test="logo != null and logo != ''">logo = #{logo},</if>
|
||||
<if test="serial != null and serial != ''">serial = #{serial},</if>
|
||||
<if test="guarantee != null">guarantee = #{guarantee},</if>
|
||||
<if test="dailyClockCredit != null">daily_clock_credit = #{dailyClockCredit},</if>
|
||||
<if test="extraClockCredit != null">extra_clock_credit = #{extraClockCredit},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="miniTagIds != null">mini_tag_ids = #{miniTagIds},</if>
|
||||
<if test="miniTagNames != null">mini_tag_names = #{miniTagNames},</if>
|
||||
<if test="wecomTagIds != null">wecom_tag_ids = #{wecomTagIds},</if>
|
||||
<if test="wecomTagNames != null">wecom_tag_names = #{wecomTagNames},</if>
|
||||
<if test="sceneIds != null and sceneIds != ''">scene_ids = #{sceneIds},</if>
|
||||
<if test="sceneNames != null">scene_names = #{sceneNames},</if>
|
||||
<if test="nursingTime != null">nursing_time = #{nursingTime},</if>
|
||||
<if test="iotVersion != null">iot_version = #{iotVersion},</if>
|
||||
<if test="iotUpgradeData != null">iot_upgrade_data = #{iotUpgradeData},</if>
|
||||
<if test="isScanCode != null">isScanCode = #{isScanCode},</if>
|
||||
<if test="isPurchase != null">isPurchase = #{isPurchase},</if>
|
||||
<if test="shoppingAppid != null">shopping_appid = #{shoppingAppid},</if>
|
||||
<if test="shoppingPath != null">shopping_path = #{shoppingPath},</if>
|
||||
<if test="bluetoothConnecting != null">bluetooth_connecting = #{bluetoothConnecting},</if>
|
||||
<if test="bluetoothClosed != null">bluetooth_closed = #{bluetoothClosed},</if>
|
||||
<if test="iotVersionUpgrade != null">iot_version_upgrade = #{iotVersionUpgrade},</if>
|
||||
<if test="sortNo != null">sort_no = #{sortNo},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="manualCodeBinding != null and manualCodeBinding != ''">manual_code_binding = #{manualCodeBinding},</if>
|
||||
<if test="scanCodeBinding != null and scanCodeBinding != ''">scan_code_binding = #{scanCodeBinding},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxInstrumentById" parameterType="Long">
|
||||
delete from wx_instrument where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxInstrumentByIds" parameterType="String">
|
||||
delete from wx_instrument where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,87 @@
|
||||
package com.flossom.system.controller;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrument;
|
||||
import com.flossom.common.core.domain.req.WxInstrumentReq;
|
||||
import com.flossom.common.core.web.controller.BaseController;
|
||||
import com.flossom.common.core.web.domain.AjaxResult;
|
||||
import com.flossom.common.core.web.page.TableDataInfo;
|
||||
import com.flossom.common.log.annotation.Log;
|
||||
import com.flossom.common.log.enums.BusinessType;
|
||||
import com.flossom.common.security.annotation.RequiresPermissions;
|
||||
import com.flossom.system.service.IWxInstrumentService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仪器列Controller
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/instrument")
|
||||
public class WxInstrumentController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWxInstrumentService wxInstrumentService;
|
||||
|
||||
/**
|
||||
* 查询仪器列列表
|
||||
*/
|
||||
@RequiresPermissions("system:instrument:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WxInstrumentReq wxInstrumentReq) {
|
||||
startPage();
|
||||
List<WxInstrument> list = wxInstrumentService.selectWxInstrumentPage(wxInstrumentReq);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取仪器列详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:instrument:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(wxInstrumentService.selectWxInstrumentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仪器列
|
||||
*/
|
||||
@RequiresPermissions("system:instrument:add")
|
||||
@Log(title = "仪器列", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WxInstrument wxInstrument) {
|
||||
return toAjax(wxInstrumentService.insertWxInstrument(wxInstrument));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仪器列
|
||||
*/
|
||||
@RequiresPermissions("system:instrument:edit")
|
||||
@Log(title = "仪器列", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WxInstrument wxInstrument) {
|
||||
return toAjax(wxInstrumentService.updateWxInstrument(wxInstrument));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仪器列
|
||||
*/
|
||||
@RequiresPermissions("system:instrument:remove")
|
||||
@Log(title = "仪器列", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(wxInstrumentService.deleteWxInstrumentByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.flossom.system.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrument;
|
||||
import com.flossom.common.core.domain.req.WxInstrumentReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 仪器列Service接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-06
|
||||
*/
|
||||
public interface IWxInstrumentService {
|
||||
/**
|
||||
* 查询仪器列
|
||||
*
|
||||
* @param id 仪器列主键
|
||||
* @return 仪器列
|
||||
*/
|
||||
public WxInstrument selectWxInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询仪器列列表
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 仪器列集合
|
||||
*/
|
||||
public List<WxInstrument> selectWxInstrumentList(WxInstrument wxInstrument);
|
||||
|
||||
/**
|
||||
* 查询仪器列列表
|
||||
*
|
||||
* @return 仪器列集合
|
||||
*/
|
||||
public List<WxInstrument> selectWxInstrumentPage(WxInstrumentReq wxInstrumentReq);
|
||||
|
||||
/**
|
||||
* 新增仪器列
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxInstrument(WxInstrument wxInstrument);
|
||||
|
||||
/**
|
||||
* 修改仪器列
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxInstrument(WxInstrument wxInstrument);
|
||||
|
||||
/**
|
||||
* 批量删除仪器列
|
||||
*
|
||||
* @param ids 需要删除的仪器列主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除仪器列信息
|
||||
*
|
||||
* @param id 仪器列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentById(Long id);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.flossom.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrument;
|
||||
import com.flossom.common.core.domain.req.WxInstrumentReq;
|
||||
import com.flossom.common.core.mapper.WxInstrumentMapper;
|
||||
import com.flossom.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.flossom.system.service.IWxInstrumentService;
|
||||
|
||||
/**
|
||||
* 仪器列Service业务层处理
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-06
|
||||
*/
|
||||
@Service
|
||||
public class WxInstrumentServiceImpl implements IWxInstrumentService {
|
||||
|
||||
@Autowired
|
||||
private WxInstrumentMapper wxInstrumentMapper;
|
||||
|
||||
/**
|
||||
* 查询仪器列
|
||||
*
|
||||
* @param id 仪器列主键
|
||||
* @return 仪器列
|
||||
*/
|
||||
@Override
|
||||
public WxInstrument selectWxInstrumentById(Long id) {
|
||||
return wxInstrumentMapper.selectWxInstrumentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询仪器列列表
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 仪器列
|
||||
*/
|
||||
@Override
|
||||
public List<WxInstrument> selectWxInstrumentList(WxInstrument wxInstrument) {
|
||||
return wxInstrumentMapper.selectWxInstrumentList(wxInstrument);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WxInstrument> selectWxInstrumentPage(WxInstrumentReq wxInstrumentReq) {
|
||||
return wxInstrumentMapper.selectWxInstrumentPage(wxInstrumentReq);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仪器列
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxInstrument(WxInstrument wxInstrument) {
|
||||
wxInstrument.setCreateTime(DateUtils.getNowDate());
|
||||
return wxInstrumentMapper.insertWxInstrument(wxInstrument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仪器列
|
||||
*
|
||||
* @param wxInstrument 仪器列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxInstrument(WxInstrument wxInstrument) {
|
||||
wxInstrument.setUpdateTime(DateUtils.getNowDate());
|
||||
return wxInstrumentMapper.updateWxInstrument(wxInstrument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除仪器列
|
||||
*
|
||||
* @param ids 需要删除的仪器列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxInstrumentByIds(Long[] ids) {
|
||||
return wxInstrumentMapper.deleteWxInstrumentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仪器列信息
|
||||
*
|
||||
* @param id 仪器列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxInstrumentById(Long id) {
|
||||
return wxInstrumentMapper.deleteWxInstrumentById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询仪器列列表
|
||||
export function listInstrument(query) {
|
||||
return request({
|
||||
url: '/system/instrument/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询仪器列详细
|
||||
export function getInstrument(id) {
|
||||
return request({
|
||||
url: '/system/instrument/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增仪器列
|
||||
export function addInstrument(data) {
|
||||
return request({
|
||||
url: '/system/instrument',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改仪器列
|
||||
export function updateInstrument(data) {
|
||||
return request({
|
||||
url: '/system/instrument',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除仪器列
|
||||
export function delInstrument(id) {
|
||||
return request({
|
||||
url: '/system/instrument/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue