Commit 1a8c04b5 authored by 高滢's avatar 高滢

车型实验

parent 6618d1eb
...@@ -33,7 +33,7 @@ public class TTestPlanRecordServiceImpl extends ServiceImpl<TTestPlanRecordMappe ...@@ -33,7 +33,7 @@ public class TTestPlanRecordServiceImpl extends ServiceImpl<TTestPlanRecordMappe
@Override @Override
public int insertTestPlanRecord(TTestPlanRecord tTestPlanRecord){ public int insertTestPlanRecord(TTestPlanRecord tTestPlanRecord){
tTestPlanRecord.setInspectCarCompanyId(SecurityUtils.getDeptId()); tTestPlanRecord.setTestOrganizationId(SecurityUtils.getDeptId());
tTestPlanRecord.setCreateTime(new Date()); tTestPlanRecord.setCreateTime(new Date());
return tTestPlanRecordMapper.insert(tTestPlanRecord); return tTestPlanRecordMapper.insert(tTestPlanRecord);
} }
......
...@@ -8,6 +8,7 @@ import com.ruoyi.common.core.page.TableDataInfo; ...@@ -8,6 +8,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.domain.TTestPlanRecord; import com.ruoyi.domain.TTestPlanRecord;
import com.ruoyi.mapper.TTestPlanRecordMapper;
import com.ruoyi.service.TTestPlanRecordService; import com.ruoyi.service.TTestPlanRecordService;
import com.ruoyi.service.impl.ReviewStandardServiceImpl; import com.ruoyi.service.impl.ReviewStandardServiceImpl;
import com.ruoyi.web.request.PlanDetailStandardRequest; import com.ruoyi.web.request.PlanDetailStandardRequest;
...@@ -39,6 +40,9 @@ public class TestPlanRecordController extends BaseController{ ...@@ -39,6 +40,9 @@ public class TestPlanRecordController extends BaseController{
@Autowired @Autowired
private ReviewStandardServiceImpl reviewStandardService; private ReviewStandardServiceImpl reviewStandardService;
@Autowired
private TTestPlanRecordMapper tTestPlanRecordMapper;
@ApiOperation("新增检测方案") @ApiOperation("新增检测方案")
@Trace @Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
...@@ -94,4 +98,12 @@ public class TestPlanRecordController extends BaseController{ ...@@ -94,4 +98,12 @@ public class TestPlanRecordController extends BaseController{
public R<List> getUseCases(@Validated @RequestBody String request ) throws IOException { public R<List> getUseCases(@Validated @RequestBody String request ) throws IOException {
return R.ok(tTestPlanRecordService.getCarTestDetail(request)); return R.ok(tTestPlanRecordService.getCarTestDetail(request));
} }
@ApiOperation("检验记录删除")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/del")
public R<Integer> getUseCases(@Validated @RequestBody TestPlanRecordGetInfoRequest testPlanRecordGetInfoRequest ) {
return R.ok(tTestPlanRecordMapper.deleteById(testPlanRecordGetInfoRequest.getId()));
}
} }
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
<result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/>
<result property="useCaseNo" column="use_case_no" jdbcType="INTEGER"/> <result property="useCaseNo" column="use_case_no" jdbcType="INTEGER"/>
<result property="inspectionStandardId" column="inspection_standard_id" jdbcType="BIGINT"/> <result property="inspectionStandardId" column="inspection_standard_id" jdbcType="BIGINT"/>
<result property="inspectionStandardId" column="name" jdbcType="VARCHAR"/> <result property="inspectionStandardName" column="name" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="selectTestPlanRecordVo"> <sql id="selectTestPlanRecordVo">
select pr.*, select pr.*,
ts.name, ts.name,
tae.enterprise_name, tae.enterprise_name,
pr.dept_name sd.dept_name
from t_test_plan_record pr from t_test_plan_record pr
left join t_standard ts on ts.id = pr.inspection_standard_id left join t_standard ts on ts.id = pr.inspection_standard_id
left join t_automobile_enterprise tae on tae.id = pr.inspect_car_company_id left join t_automobile_enterprise tae on tae.id = pr.inspect_car_company_id
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<select id="selectTestPlanRecordDetails" parameterType="Long" resultMap="BaseResultMap"> <select id="selectTestPlanRecordDetails" parameterType="Long" resultMap="BaseResultMap">
<include refid="selectTestPlanRecordVo"/> <include refid="selectTestPlanRecordVo"/>
where sm.id = #{id} where pr.id = #{id}
</select> </select>
<select id="selectTestPlanRecordPage" parameterType="com.ruoyi.web.request.TestPlanRecordPageRequest" resultMap="BaseResultMap"> <select id="selectTestPlanRecordPage" parameterType="com.ruoyi.web.request.TestPlanRecordPageRequest" resultMap="BaseResultMap">
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
<if test="carModel != null and carModel != ''"> and pr.car_model like concat('%', #{carModel}, '%')</if> <if test="carModel != null and carModel != ''"> and pr.car_model like concat('%', #{carModel}, '%')</if>
<if test="inspectCarCompanyId != null and inspectCarCompanyId != ''"> and pr.inspectCarCompanyId= #{inspectCarCompanyId}</if> <if test="inspectCarCompanyId != null and inspectCarCompanyId != ''"> and pr.inspectCarCompanyId= #{inspectCarCompanyId}</if>
</where> </where>
ORDER BY pr.car_model,pr.create_time desc
</select> </select>
<update id="updateTestPlanRecord" parameterType="com.ruoyi.web.request.TestPlanRecordGetInfoRequest"> <update id="updateTestPlanRecord" parameterType="com.ruoyi.web.request.TestPlanRecordGetInfoRequest">
......
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