Commit b04916e3 authored by 王飞's avatar 王飞

Merge branch 'gaoying' into 'dev'

Gao Ying

See merge request !72
parents 7ab22bac 94e7e79b
......@@ -42,14 +42,6 @@ public interface SampleManagementMapper extends BaseMapper<Sample> {
*/
public int updateSampleManagement(Sample tSampleManagement);
/**
* 删除样品管理
*
* @param id 样品管理主键
* @return 结果
*/
public int deleteSampleManagementById(Long id);
/**
* 查询车辆识别码是否重复
* */
......@@ -59,4 +51,10 @@ public interface SampleManagementMapper extends BaseMapper<Sample> {
* 查询样品编号是否重复
* */
public int selectSampleNumberCount(Sample sampleManagement);
/**
* 根据车辆识别码和样品编号查询样品信息
* */
public List<Sample> selectSampleList(SampleManagementRequest sampleManagementRequest);
}
......@@ -47,10 +47,7 @@ public interface SampleManagementService extends IService<Sample>
public int updateSampleManagement(Sample tSampleManagement);
/**
* 删除样品管理信息
*
* @param id 样品管理主键
* @return 结果
*/
public int deleteSampleManagementById(Long id);
* 根据车辆识别码和样品编号查询样品信息
* */
public List<Sample> selectSampleList(SampleManagementRequest sampleManagementRequest);
}
......@@ -99,15 +99,11 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
return sampleManagementMapper.updateSampleManagement(sampleManagement);
}
/**
* 删除样品管理信息
* @param id 样品管理主键
* @return 结果
*/
* 根据车辆识别码和样品编号查询样品信息
* */
@Override
public int deleteSampleManagementById(Long id)
{
return sampleManagementMapper.deleteSampleManagementById(id);
public List<Sample> selectSampleList(SampleManagementRequest sampleManagementRequest){
return sampleManagementMapper.selectSampleList(sampleManagementRequest);
}
}
......@@ -98,6 +98,14 @@ public class SampleManagementController extends BaseController
@PostMapping ("/del")
public AjaxResult remove(@Validated @RequestBody SampleManagementGetInfoRequest request)
{
return toAjax(sampleManagementService.deleteSampleManagementById(request.getId()));
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>
......@@ -136,11 +136,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<delete id="deleteSampleManagementById" parameterType="Long">
update t_sample set deleted = 1
where id = #{id}
</delete>
<select id="selectIdentificationCodeCount" parameterType="com.ruoyi.domain.Sample" resultType="integer">
select count(id) from t_sample
<where>
......@@ -160,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