Commit 122b8a70 authored by 高滢's avatar 高滢

检测方案更新

parent 208a961e
......@@ -2,6 +2,7 @@ package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.TTestPlanRecord;
import com.ruoyi.web.request.TestPlanRecordGetInfoRequest;
import com.ruoyi.web.request.TestPlanRecordPageRequest;
import org.springframework.stereotype.Repository;
......@@ -22,6 +23,8 @@ public interface TTestPlanRecordMapper extends BaseMapper<TTestPlanRecord> {
public List<TTestPlanRecord> selectTestPlanRecordPage(TestPlanRecordPageRequest testPlanRecordPageRequest);
public int updateTestPlanRecord(TestPlanRecordGetInfoRequest testPlanRecordGetInfoRequest);
}
......
......@@ -20,4 +20,6 @@ public interface TTestPlanRecordService extends IService<TTestPlanRecord> {
public List<TTestPlanRecord> selectTestPlanRecordPage(TestPlanRecordPageRequest testPlanRecordPageRequest);
public int updateTestPlanRecord(TestPlanRecordGetInfoRequest testPlanRecordGetInfoRequest);
}
......@@ -41,6 +41,11 @@ public class TTestPlanRecordServiceImpl extends ServiceImpl<TTestPlanRecordMappe
public List<TTestPlanRecord> selectTestPlanRecordPage(TestPlanRecordPageRequest testPlanRecordPageRequest){
return tTestPlanRecordMapper.selectTestPlanRecordPage(testPlanRecordPageRequest);
}
@Override
public int updateTestPlanRecord(TestPlanRecordGetInfoRequest testPlanRecordGetInfoRequest){
return tTestPlanRecordMapper.updateTestPlanRecord(testPlanRecordGetInfoRequest);
}
}
......
......@@ -75,4 +75,12 @@ public class TestPlanRecordController extends BaseController{
List<TTestPlanRecord> list = tTestPlanRecordService.selectTestPlanRecordPage(testPlanRecordPageRequest);
return getDataTable(list);
}
@ApiOperation("更新检验方案")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/update")
public R<Integer> updateTestPlanRecord(TestPlanRecordGetInfoRequest testPlanRecordGetInfoRequest){
return R.ok(tTestPlanRecordService.updateTestPlanRecord(testPlanRecordGetInfoRequest));
}
}
......@@ -9,4 +9,10 @@ import lombok.Data;
public class TestPlanRecordGetInfoRequest {
@ApiModelProperty("ID")
private Long id;
/**
* 文件路径
*/
@ApiModelProperty("文件路径")
private String fileUrl;
}
......@@ -68,4 +68,12 @@
<if test="inspectCarCompanyId != null and inspectCarCompanyId != ''"> and pr.inspectCarCompanyId= #{inspectCarCompanyId}</if>
</where>
</select>
<update id="updateTestPlanRecord" parameterType="com.ruoyi.web.request.TestPlanRecordGetInfoRequest">
update t_test_plan_record
<trim prefix="SET" suffixOverrides=",">
<if test="fileUrl != null">file_url = #{fileUrl},</if>
</trim>
where id = #{id}
</update>
</mapper>
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