Commit d432c6b3 authored by 高滢's avatar 高滢

样品下拉框

parent 1b1194ea
......@@ -51,4 +51,10 @@ public interface SampleManagementMapper extends BaseMapper<Sample> {
* 查询样品编号是否重复
* */
public int selectSampleNumberCount(Sample sampleManagement);
/**
* 根据车辆识别码和样品编号查询样品信息
* */
public List<Sample> selectSampleList(SampleManagementRequest sampleManagementRequest);
}
......@@ -45,4 +45,9 @@ public interface SampleManagementService extends IService<Sample>
* @return 结果
*/
public int updateSampleManagement(Sample tSampleManagement);
/**
* 根据车辆识别码和样品编号查询样品信息
* */
public List<Sample> selectSampleList(SampleManagementRequest sampleManagementRequest);
}
......@@ -98,4 +98,12 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
sampleManagement.setUpdateTime(DateUtils.getNowDate());
return sampleManagementMapper.updateSampleManagement(sampleManagement);
}
/**
* 根据车辆识别码和样品编号查询样品信息
* */
@Override
public List<Sample> selectSampleList(SampleManagementRequest sampleManagementRequest){
return sampleManagementMapper.selectSampleList(sampleManagementRequest);
}
}
......@@ -100,4 +100,12 @@ public class SampleManagementController extends BaseController
{
return toAjax(sampleManagementService.removeById(request.getId()));
}
@ApiOperation("样品信息下拉框/识别码和编号条件查询")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/sampleList")
public R<List<Sample>> selectSampleList(@Validated @RequestBody SampleManagementRequest request){
return R.ok(sampleManagementService.selectSampleList(request));
}
}
......@@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="identificationCode != null and identificationCode != ''"> and sm.identification_code like concat('%', #{identificationCode}, '%')</if>
<if test="sampleNumber != null and sampleNumber != ''"> and sm.sample_number like concat('%', #{sampleNumber}, '%')</if>
<if test="sampleName != null and sampleName != ''"> and sm.sample_name like concat('%', #{sampleName}, '%')</if>
<if test="flag != null and flag != ''"> sm.flag = #{flag} </if>
<if test="flag != null and flag != ''"> and sm.flag = #{flag} </if>
</where>
</select>
......@@ -155,4 +155,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null and id != ''">and id != #{id}</if>
</where>
</select>
<select id="selectSampleList" parameterType="com.ruoyi.domain.Sample" resultMap="SampleManagementResult">
<include refid="selectTSampleManagementVo"/>
<where>
sm.deleted = 0
<if test="identificationCode != null and identificationCode != ''"> and sm.identification_code = #{identificationCode}</if>
<if test="sampleNumber != null and sampleNumber != ''"> and sm.sample_number = #{sampleNumber}</if>
<if test="flag != null and flag != ''"> and sm.flag = #{flag} </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