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

样品管理 类名修改

parent 2686c6f7
......@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -22,7 +21,7 @@ import lombok.Data;
@ApiModel
@TableName(value ="t_sample")
@Data
public class SampleManagement extends BaseEntity
public class Sample extends BaseEntity
{
private static final long serialVersionUID = 1L;
......
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.SampleManagement;
import com.ruoyi.domain.Sample;
import com.ruoyi.web.request.SampleManagementRequest;
import org.springframework.stereotype.Repository;
......@@ -9,14 +9,14 @@ import java.util.List;
@Repository
public interface SampleManagementMapper extends BaseMapper<SampleManagement> {
public interface SampleManagementMapper extends BaseMapper<Sample> {
/**
* 查询样品管理
*
* @param id 样品管理主键
* @return 样品管理
*/
public SampleManagement selectSampleManagementById(Long id);
public Sample selectSampleManagementById(Long id);
/**
* 查询样品管理列表
......@@ -24,7 +24,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> {
* @param sampleManagementRequest 样品管理
* @return 样品管理集合
*/
public List<SampleManagement> selectSampleManagementList(SampleManagementRequest sampleManagementRequest);
public List<Sample> selectSampleManagementList(SampleManagementRequest sampleManagementRequest);
/**
* 新增样品管理
......@@ -32,7 +32,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> {
* @param tSampleManagement 样品管理
* @return 结果
*/
public int insertSampleManagement(SampleManagement tSampleManagement);
public int insertSampleManagement(Sample tSampleManagement);
/**
* 修改样品管理
......@@ -40,7 +40,7 @@ public interface SampleManagementMapper extends BaseMapper<SampleManagement> {
* @param tSampleManagement 样品管理
* @return 结果
*/
public int updateSampleManagement(SampleManagement tSampleManagement);
public int updateSampleManagement(Sample tSampleManagement);
/**
* 删除样品管理
......@@ -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;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.SampleManagement;
import com.ruoyi.domain.Sample;
import com.ruoyi.web.request.SampleManagementRequest;
/**
......@@ -12,7 +12,7 @@ import com.ruoyi.web.request.SampleManagementRequest;
* @author ruoyi
* @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>
* @param id 样品管理主键
* @return 样品管理
*/
public SampleManagement selectSampleManagementById(Long id);
public Sample selectSampleManagementById(Long id);
/**
* 查询样品管理列表
......@@ -28,7 +28,7 @@ public interface SampleManagementService extends IService<SampleManagement>
* @param sampleManagementRequest 样品管理
* @return 样品管理集合
*/
public List<SampleManagement> selectSampleManagementList(SampleManagementRequest sampleManagementRequest);
public List<Sample> selectSampleManagementList(SampleManagementRequest sampleManagementRequest);
/**
* 新增样品管理
......@@ -36,7 +36,7 @@ public interface SampleManagementService extends IService<SampleManagement>
* @param tSampleManagement 样品管理
* @return 结果
*/
public int insertSampleManagement(SampleManagement tSampleManagement);
public int insertSampleManagement(Sample tSampleManagement);
/**
* 修改样品管理
......@@ -44,7 +44,7 @@ public interface SampleManagementService extends IService<SampleManagement>
* @param tSampleManagement 样品管理
* @return 结果
*/
public int updateSampleManagement(SampleManagement tSampleManagement);
public int updateSampleManagement(Sample tSampleManagement);
/**
* 删除样品管理信息
......
......@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.SampleManagement;
import com.ruoyi.domain.Sample;
import com.ruoyi.mapper.SampleManagementMapper;
import com.ruoyi.service.SampleManagementService;
import com.ruoyi.web.request.SampleManagementRequest;
......@@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
*/
@Service
@Transactional
public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMapper, SampleManagement> implements SampleManagementService
public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMapper, Sample> implements SampleManagementService
{
@Autowired
private SampleManagementMapper sampleManagementMapper;
......@@ -34,7 +34,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
* @return 样品管理
*/
@Override
public SampleManagement selectSampleManagementById(Long id)
public Sample selectSampleManagementById(Long id)
{
return sampleManagementMapper.selectSampleManagementById(id);
}
......@@ -46,7 +46,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
* @return 样品管理
*/
@Override
public List<SampleManagement> selectSampleManagementList(SampleManagementRequest sampleManagementRequest)
public List<Sample> selectSampleManagementList(SampleManagementRequest sampleManagementRequest)
{
return sampleManagementMapper.selectSampleManagementList(sampleManagementRequest);
}
......@@ -58,7 +58,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
* @return 结果
*/
@Override
public int insertSampleManagement(SampleManagement sampleManagement)
public int insertSampleManagement(Sample sampleManagement)
{
// 判断车辆识别码是否重复
int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement);
......@@ -82,7 +82,7 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
* @return 结果
*/
@Override
public int updateSampleManagement(SampleManagement sampleManagement)
public int updateSampleManagement(Sample sampleManagement)
{
// 判断车辆识别码是否重复
int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement);
......
......@@ -3,7 +3,7 @@ package com.ruoyi.web;
import java.util.List;
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.web.request.SampleManagementGetInfoRequest;
import com.ruoyi.web.request.SampleManagementRequest;
......@@ -12,7 +12,6 @@ import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
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.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -46,7 +45,7 @@ public class SampleManagementController extends BaseController
public TableDataInfo list(@Validated @RequestBody SampleManagementRequest request)
{
startPage();
List<SampleManagement> list = sampleManagementService.selectSampleManagementList(request);
List<Sample> list = sampleManagementService.selectSampleManagementList(request);
return getDataTable(list);
}
......@@ -57,7 +56,7 @@ public class SampleManagementController extends BaseController
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@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()));
}
......@@ -70,7 +69,7 @@ public class SampleManagementController extends BaseController
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "样品管理", businessType = BusinessType.INSERT)
@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));
}
......@@ -84,7 +83,7 @@ public class SampleManagementController extends BaseController
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "样品管理", businessType = BusinessType.UPDATE)
@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));
}
......
......@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<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="identificationCode" column="identification_code" />
<result property="sampleNumber" column="sample_number" />
......@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join t_automobile_enterprise ae on ae.id = sm.enterprise_id
</sql>
<select id="selectSampleManagementList" parameterType="com.ruoyi.domain.SampleManagement" resultMap="SampleManagementResult">
<select id="selectSampleManagementList" parameterType="com.ruoyi.domain.Sample" resultMap="SampleManagementResult">
<include refid="selectTSampleManagementVo"/>
<where>
sm.deleted = 0
......@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where sm.id = #{id}
</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
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="identificationCode != null">identification_code,</if>
......@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateSampleManagement" parameterType="com.ruoyi.domain.SampleManagement">
<update id="updateSampleManagement" parameterType="com.ruoyi.domain.Sample">
update t_sample
<trim prefix="SET" suffixOverrides=",">
<if test="identificationCode != null">identification_code = #{identificationCode},</if>
......@@ -141,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</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
<where>
deleted = 0
......@@ -151,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</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
<where>
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