Commit 6abb8cf4 authored by 王飞's avatar 王飞
parents f2ac83bb dd6ef37d
...@@ -27,8 +27,8 @@ public class Sample extends BaseEntity ...@@ -27,8 +27,8 @@ public class Sample extends BaseEntity
// 整车样品 // 整车样品
public static final String SAMPLE_FLAG_CAR = "0"; public static final String SAMPLE_FLAG_CAR = "0";
// 零部件样品 // 零部件样品
public static final String SAMPLE_FLAG_PART = "1";
public static final String SAMPLE_FLAG_PART = "1";
/** 主键 */ /** 主键 */
@ApiModelProperty("主键") @ApiModelProperty("主键")
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
...@@ -78,10 +78,6 @@ public class Sample extends BaseEntity ...@@ -78,10 +78,6 @@ public class Sample extends BaseEntity
@ApiModelProperty("0:整车样品 1:零部件样品") @ApiModelProperty("0:整车样品 1:零部件样品")
private String flag; private String flag;
/** 生产企业名称*/
@ApiModelProperty("生产企业名称")
private String enterpriseName;
/** 商标 */ /** 商标 */
@ApiModelProperty("商标") @ApiModelProperty("商标")
private String trademark; private String trademark;
......
package com.ruoyi.domain;
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.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ApiModel
@TableName(value ="t_test_scenario")
@Data
public class TestScenario extends BaseEntity {
/** 主键 */
@ApiModelProperty("主键")
@TableId(type = IdType.ASSIGN_ID)
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@ApiModelProperty("标准分类")
private String standardClassification;
@ApiModelProperty("测试场景")
private String testScenario;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("入库时间")
private Date storageTime;
}
package com.ruoyi.domain;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ApiModel
@TableName(value ="t_test_type")
@Data
public class TestType extends BaseEntity {
/** 主键 */
@ApiModelProperty("主键")
@TableId(type = IdType.ASSIGN_ID)
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@ApiModelProperty("标准分类")
private String standardClassification;
@ApiModelProperty("测试类型")
private String testType;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("入库时间")
private Date storageTime;
}
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.TestScenario;
import com.ruoyi.web.request.TestScenarioRequest;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface TestScenarioMapper extends BaseMapper<TestScenario> {
/**
* 查询测试场景库列表
*
* @param testScenarioRequest 测试场景库
* @return 测试场景库集合
*/
public List<TestScenario> selectTestScenarioList(TestScenarioRequest testScenarioRequest);
}
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.TestScenario;
import com.ruoyi.domain.TestType;
import com.ruoyi.web.request.TestScenarioRequest;
import com.ruoyi.web.request.TestTypeRequest;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface TestTypeMapper extends BaseMapper<TestType> {
/**
* 查询测试场景库列表
*
* @param testTypeRequest 测试场景库
* @return 测试场景库集合
*/
public List<TestType> selectTestTypeList(TestTypeRequest testTypeRequest);
}
package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.TestScenario;
import com.ruoyi.domain.TestType;
import com.ruoyi.web.request.TestScenarioRequest;
import java.util.List;
public interface ITestScenarioService extends IService<TestScenario> {
/**
* 查询测试场景库列表
*
* @param testScenarioRequest 测试场景库
* @return 测试场景库集合
*/
public List<TestScenario> selectTestScenarioList(TestScenarioRequest testScenarioRequest);
}
package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.TestType;
import com.ruoyi.web.request.TestTypeRequest;
import java.util.List;
public interface ITestTypeService extends IService<TestType> {
/**
* 查询测试类型库列表
*
* @param testTypeRequest 测试类型库
* @return 测试类型库集合
*/
public List<TestType> selectTestTypeList(TestTypeRequest testTypeRequest);
}
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.TestScenario;
import com.ruoyi.mapper.TestScenarioMapper;
import com.ruoyi.service.ITestScenarioService;
import com.ruoyi.web.request.TestScenarioRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class TestScenarioServiceImpl extends ServiceImpl<TestScenarioMapper, TestScenario> implements ITestScenarioService {
@Autowired
private TestScenarioMapper testScenarioMapper;
@Override
public List<TestScenario> selectTestScenarioList(TestScenarioRequest testScenarioRequest){
return testScenarioMapper.selectTestScenarioList(testScenarioRequest);
}
}
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.TestType;
import com.ruoyi.mapper.TestTypeMapper;
import com.ruoyi.service.ITestTypeService;
import com.ruoyi.web.request.TestTypeRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class TestTypeServiceImpl extends ServiceImpl<TestTypeMapper, TestType> implements ITestTypeService {
@Autowired
private TestTypeMapper testTypeMapper;
/**
* 查询测试类型库列表
*
* @param testTypeRequest 测试类型库
* @return 测试类型库
*/
@Override
public List<TestType> selectTestTypeList(TestTypeRequest testTypeRequest)
{
return testTypeMapper.selectTestTypeList(testTypeRequest);
}
}
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel
public class TestScenarioRequest extends PageDomain {
@ApiModelProperty("标准分类")
private String standardClassification;
@ApiModelProperty("测试场景")
private String testScenario;
}
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel
public class TestTypeRequest extends PageDomain {
@ApiModelProperty("标准分类")
private String standardClassification;
@ApiModelProperty("测试类型")
private String testType;
}
<?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.ruoyi.mapper.TestScenarioMapper">
<resultMap type="com.ruoyi.domain.TestScenario" id="TestScenarioResult">
<result property="id" column="id" />
<result property="standardClassification" column="standard_classification" />
<result property="testScenario" column="test_scenario" />
<result property="storageTime" column="storage_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTTestScenarioVo">
select id, standard_classification, test_scenario, storage_time, create_by, create_time, update_by, update_time from t_test_scenario
</sql>
<select id="selectTestScenarioList" parameterType="com.ruoyi.domain.TestScenario" resultMap="TestScenarioResult">
<include refid="selectTTestScenarioVo"/>
<where>
<if test="standardClassification != null and standardClassification != ''"> and standard_classification = #{standardClassification}</if>
<if test="testScenario != null and testScenario != ''"> and test_scenario like concat('%', #{testScenario}, '%')</if>
</where>
</select>
</mapper>
\ No newline at end of file
<?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.ruoyi.mapper.TestTypeMapper">
<resultMap type="com.ruoyi.domain.TestType" id="TTestTypeResult">
<result property="id" column="id" />
<result property="standardClassification" column="standard_classification" />
<result property="testType" column="test_type" />
<result property="storageTime" column="storage_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTTestTypeVo">
select id, standard_classification, test_type, storage_time, create_by, create_time, update_by, update_time from t_test_type
</sql>
<select id="selectTestTypeList" parameterType="com.ruoyi.domain.TestType" resultMap="TTestTypeResult">
<include refid="selectTTestTypeVo"/>
<where>
<if test="standardClassification != null and standardClassification != ''"> and standard_classification = #{standardClassification}</if>
<if test="testType != null and testType != ''"> and test_type like concat('%', #{testType}, '%')</if>
</where>
</select>
</mapper>
\ No newline at end of file
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