Commit 0f14f512 authored by 高滢's avatar 高滢

样品管理 类名修改

parent 2686c6f7
...@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -22,7 +21,7 @@ import lombok.Data; ...@@ -22,7 +21,7 @@ import lombok.Data;
@ApiModel @ApiModel
@TableName(value ="t_sample") @TableName(value ="t_sample")
@Data @Data
public class SampleManagement extends BaseEntity public class Sample extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.ruoyi.mapper; package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.SampleManagement; import com.ruoyi.domain.Sample;
import com.ruoyi.web.request.SampleManagementRequest; import com.ruoyi.web.request.SampleManagementRequest;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -9,14 +9,14 @@ import java.util.List; ...@@ -9,14 +9,14 @@ import java.util.List;
@Repository @Repository
public interface SampleManagementMapper extends BaseMapper<SampleManagement> { public interface SampleManagementMapper extends BaseMapper<Sample> {
/** /**
* 查询样品管理 * 查询样品管理
* *
* @param id 样品管理主键 * @param id 样品管理主键
* @return 样品管理 * @return 样品管理
*/ */
public SampleManagement selectSampleManagementById(Long id); public Sample selectSampleManagementById(Long id);
/** /**
* 查询样品管理列表 * 查询样品管理列表
...@@ -24,7 +24,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> { ...@@ -24,7 +24,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> {
* @param sampleManagementRequest 样品管理 * @param sampleManagementRequest 样品管理
* @return 样品管理集合 * @return 样品管理集合
*/ */
public List<SampleManagement> selectSampleManagementList(SampleManagementRequest sampleManagementRequest); public List<Sample> selectSampleManagementList(SampleManagementRequest sampleManagementRequest);
/** /**
* 新增样品管理 * 新增样品管理
...@@ -32,7 +32,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> { ...@@ -32,7 +32,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> {
* @param tSampleManagement 样品管理 * @param tSampleManagement 样品管理
* @return 结果 * @return 结果
*/ */
public int insertSampleManagement(SampleManagement tSampleManagement); public int insertSampleManagement(Sample tSampleManagement);
/** /**
* 修改样品管理 * 修改样品管理
...@@ -40,7 +40,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> { ...@@ -40,7 +40,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> {
* @param tSampleManagement 样品管理 * @param tSampleManagement 样品管理
* @return 结果 * @return 结果
*/ */
public int updateSampleManagement(SampleManagement tSampleManagement); public int updateSampleManagement(Sample tSampleManagement);
/** /**
* 删除样品管理 * 删除样品管理
...@@ -53,10 +53,10 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> { ...@@ -53,10 +53,10 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> {
/** /**
* 查询车辆识别码是否重复 * 查询车辆识别码是否重复
* */ * */
public int selectIdentificationCodeCount(SampleManagement sampleManagement); public int selectIdentificationCodeCount(Sample sampleManagement);
/** /**
* 查询样品编号是否重复 * 查询样品编号是否重复
* */ * */
public int selectSampleNumberCount(SampleManagement sampleManagement); public int selectSampleNumberCount(Sample sampleManagement);
} }
...@@ -3,7 +3,7 @@ package com.ruoyi.service; ...@@ -3,7 +3,7 @@ package com.ruoyi.service;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.SampleManagement; import com.ruoyi.domain.Sample;
import com.ruoyi.web.request.SampleManagementRequest; import com.ruoyi.web.request.SampleManagementRequest;
/** /**
...@@ -12,7 +12,7 @@ import com.ruoyi.web.request.SampleManagementRequest; ...@@ -12,7 +12,7 @@ import com.ruoyi.web.request.SampleManagementRequest;
* @author ruoyi * @author ruoyi
* @date 2024-01-29 * @date 2024-01-29
*/ */
public interface SampleManagementService extends IService<SampleManagement> public interface SampleManagementService extends IService<Sample>
{ {
/** /**
* 查询样品管理 * 查询样品管理
...@@ -20,7 +20,7 @@ public interface SampleManagementService extends IService<SampleManagement> ...@@ -20,7 +20,7 @@ public interface SampleManagementService extends IService<SampleManagement>
* @param id 样品管理主键 * @param id 样品管理主键
* @return 样品管理 * @return 样品管理
*/ */
public SampleManagement selectSampleManagementById(Long id); public Sample selectSampleManagementById(Long id);
/** /**
* 查询样品管理列表 * 查询样品管理列表
...@@ -28,7 +28,7 @@ public interface SampleManagementService extends IService<SampleManagement> ...@@ -28,7 +28,7 @@ public interface SampleManagementService extends IService<SampleManagement>
* @param sampleManagementRequest 样品管理 * @param sampleManagementRequest 样品管理
* @return 样品管理集合 * @return 样品管理集合
*/ */
public List<SampleManagement> selectSampleManagementList(SampleManagementRequest sampleManagementRequest); public List<Sample> selectSampleManagementList(SampleManagementRequest sampleManagementRequest);
/** /**
* 新增样品管理 * 新增样品管理
...@@ -36,7 +36,7 @@ public interface SampleManagementService extends IService<SampleManagement> ...@@ -36,7 +36,7 @@ public interface SampleManagementService extends IService<SampleManagement>
* @param tSampleManagement 样品管理 * @param tSampleManagement 样品管理
* @return 结果 * @return 结果
*/ */
public int insertSampleManagement(SampleManagement tSampleManagement); public int insertSampleManagement(Sample tSampleManagement);
/** /**
* 修改样品管理 * 修改样品管理
...@@ -44,7 +44,7 @@ public interface SampleManagementService extends IService<SampleManagement> ...@@ -44,7 +44,7 @@ public interface SampleManagementService extends IService<SampleManagement>
* @param tSampleManagement 样品管理 * @param tSampleManagement 样品管理
* @return 结果 * @return 结果
*/ */
public int updateSampleManagement(SampleManagement tSampleManagement); public int updateSampleManagement(Sample tSampleManagement);
/** /**
* 删除样品管理信息 * 删除样品管理信息
......
...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.SampleManagement; import com.ruoyi.domain.Sample;
import com.ruoyi.mapper.SampleManagementMapper; import com.ruoyi.mapper.SampleManagementMapper;
import com.ruoyi.service.SampleManagementService; import com.ruoyi.service.SampleManagementService;
import com.ruoyi.web.request.SampleManagementRequest; import com.ruoyi.web.request.SampleManagementRequest;
...@@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
*/ */
@Service @Service
@Transactional @Transactional
public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMapper, SampleManagement> implements SampleManagementService public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMapper, Sample> implements SampleManagementService
{ {
@Autowired @Autowired
private SampleManagementMapper sampleManagementMapper; private SampleManagementMapper sampleManagementMapper;
...@@ -34,7 +34,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap ...@@ -34,7 +34,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
* @return 样品管理 * @return 样品管理
*/ */
@Override @Override
public SampleManagement selectSampleManagementById(Long id) public Sample selectSampleManagementById(Long id)
{ {
return sampleManagementMapper.selectSampleManagementById(id); return sampleManagementMapper.selectSampleManagementById(id);
} }
...@@ -46,7 +46,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap ...@@ -46,7 +46,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
* @return 样品管理 * @return 样品管理
*/ */
@Override @Override
public List<SampleManagement> selectSampleManagementList(SampleManagementRequest sampleManagementRequest) public List<Sample> selectSampleManagementList(SampleManagementRequest sampleManagementRequest)
{ {
return sampleManagementMapper.selectSampleManagementList(sampleManagementRequest); return sampleManagementMapper.selectSampleManagementList(sampleManagementRequest);
} }
...@@ -58,7 +58,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap ...@@ -58,7 +58,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertSampleManagement(SampleManagement sampleManagement) public int insertSampleManagement(Sample sampleManagement)
{ {
// 判断车辆识别码是否重复 // 判断车辆识别码是否重复
int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement); int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement);
...@@ -82,7 +82,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap ...@@ -82,7 +82,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateSampleManagement(SampleManagement sampleManagement) public int updateSampleManagement(Sample sampleManagement)
{ {
// 判断车辆识别码是否重复 // 判断车辆识别码是否重复
int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement); int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement);
......
...@@ -3,7 +3,7 @@ package com.ruoyi.web; ...@@ -3,7 +3,7 @@ package com.ruoyi.web;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.domain.SampleManagement; import com.ruoyi.domain.Sample;
import com.ruoyi.service.SampleManagementService; import com.ruoyi.service.SampleManagementService;
import com.ruoyi.web.request.SampleManagementGetInfoRequest; import com.ruoyi.web.request.SampleManagementGetInfoRequest;
import com.ruoyi.web.request.SampleManagementRequest; import com.ruoyi.web.request.SampleManagementRequest;
...@@ -12,7 +12,6 @@ import io.swagger.annotations.ApiOperation; ...@@ -12,7 +12,6 @@ import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag; import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags; import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace; import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -46,7 +45,7 @@ public class SampleManagementController extends BaseController ...@@ -46,7 +45,7 @@ public class SampleManagementController extends BaseController
public TableDataInfo list(@Validated @RequestBody SampleManagementRequest request) public TableDataInfo list(@Validated @RequestBody SampleManagementRequest request)
{ {
startPage(); startPage();
List<SampleManagement> list = sampleManagementService.selectSampleManagementList(request); List<Sample> list = sampleManagementService.selectSampleManagementList(request);
return getDataTable(list); return getDataTable(list);
} }
...@@ -57,7 +56,7 @@ public class SampleManagementController extends BaseController ...@@ -57,7 +56,7 @@ public class SampleManagementController extends BaseController
@Trace @Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getInfo") @RequestMapping(method = RequestMethod.POST, value = "/getInfo")
public R<SampleManagement> getInfo(@Validated @RequestBody SampleManagementGetInfoRequest request) public R<Sample> getInfo(@Validated @RequestBody SampleManagementGetInfoRequest request)
{ {
return R.ok(sampleManagementService.selectSampleManagementById(request.getId())); return R.ok(sampleManagementService.selectSampleManagementById(request.getId()));
} }
...@@ -70,7 +69,7 @@ public class SampleManagementController extends BaseController ...@@ -70,7 +69,7 @@ public class SampleManagementController extends BaseController
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "样品管理", businessType = BusinessType.INSERT) @Log(title = "样品管理", businessType = BusinessType.INSERT)
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
public R<Integer> add(@Validated @RequestBody SampleManagement tSampleManagement) public R<Integer> add(@Validated @RequestBody Sample tSampleManagement)
{ {
return R.ok(sampleManagementService.insertSampleManagement(tSampleManagement)); return R.ok(sampleManagementService.insertSampleManagement(tSampleManagement));
} }
...@@ -84,7 +83,7 @@ public class SampleManagementController extends BaseController ...@@ -84,7 +83,7 @@ public class SampleManagementController extends BaseController
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "样品管理", businessType = BusinessType.UPDATE) @Log(title = "样品管理", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/edit") @RequestMapping(method = RequestMethod.POST, value = "/edit")
public R<Integer> edit(@Validated @RequestBody SampleManagement tSampleManagement) public R<Integer> edit(@Validated @RequestBody Sample tSampleManagement)
{ {
return R.ok(sampleManagementService.updateSampleManagement(tSampleManagement)); return R.ok(sampleManagementService.updateSampleManagement(tSampleManagement));
} }
......
...@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.mapper.SampleManagementMapper"> <mapper namespace="com.ruoyi.mapper.SampleManagementMapper">
<resultMap type="com.ruoyi.domain.SampleManagement" id="SampleManagementResult"> <resultMap type="com.ruoyi.domain.Sample" id="SampleManagementResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="identificationCode" column="identification_code" /> <result property="identificationCode" column="identification_code" />
<result property="sampleNumber" column="sample_number" /> <result property="sampleNumber" column="sample_number" />
...@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join t_automobile_enterprise ae on ae.id = sm.enterprise_id left join t_automobile_enterprise ae on ae.id = sm.enterprise_id
</sql> </sql>
<select id="selectSampleManagementList" parameterType="com.ruoyi.domain.SampleManagement" resultMap="SampleManagementResult"> <select id="selectSampleManagementList" parameterType="com.ruoyi.domain.Sample" resultMap="SampleManagementResult">
<include refid="selectTSampleManagementVo"/> <include refid="selectTSampleManagementVo"/>
<where> <where>
sm.deleted = 0 sm.deleted = 0
...@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where sm.id = #{id} where sm.id = #{id}
</select> </select>
<insert id="insertSampleManagement" parameterType="com.ruoyi.domain.SampleManagement" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSampleManagement" parameterType="com.ruoyi.domain.Sample" useGeneratedKeys="true" keyProperty="id">
insert into t_sample insert into t_sample
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="identificationCode != null">identification_code,</if> <if test="identificationCode != null">identification_code,</if>
...@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<update id="updateSampleManagement" parameterType="com.ruoyi.domain.SampleManagement"> <update id="updateSampleManagement" parameterType="com.ruoyi.domain.Sample">
update t_sample update t_sample
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="identificationCode != null">identification_code = #{identificationCode},</if> <if test="identificationCode != null">identification_code = #{identificationCode},</if>
...@@ -141,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -141,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</delete> </delete>
<select id="selectIdentificationCodeCount" parameterType="com.ruoyi.domain.SampleManagement" resultType="integer"> <select id="selectIdentificationCodeCount" parameterType="com.ruoyi.domain.Sample" resultType="integer">
select count(id) from t_sample select count(id) from t_sample
<where> <where>
deleted = 0 deleted = 0
...@@ -151,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -151,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="selectSampleNumberCount" parameterType="com.ruoyi.domain.SampleManagement" resultType="integer"> <select id="selectSampleNumberCount" parameterType="com.ruoyi.domain.Sample" resultType="integer">
select count(id) from t_sample select count(id) from t_sample
<where> <where>
deleted = 0 deleted = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment