Commit ff4e5d3e authored by wdy's avatar wdy

Merge branch 'wangdingyi' into 'dev'

暂存任务

See merge request !143
parents 3541d4f4 264abdef
...@@ -3,6 +3,8 @@ package com.ruoyi.mapper; ...@@ -3,6 +3,8 @@ package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.web.request.ReviewStandardListByPageRequest; import com.ruoyi.web.request.ReviewStandardListByPageRequest;
import com.ruoyi.web.request.ReviewStandardListRequest;
import com.ruoyi.web.response.ReviewStandardListResponse;
import com.ruoyi.web.response.ReviewStandardResponse; import com.ruoyi.web.response.ReviewStandardResponse;
import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -30,4 +32,6 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> { ...@@ -30,4 +32,6 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
* @return * @return
*/ */
List<ReviewStandardTestInspectionContentResponse> selectTestInspectionContent(Long id); List<ReviewStandardTestInspectionContentResponse> selectTestInspectionContent(Long id);
List<ReviewStandardListResponse> findReviewStandardList(ReviewStandardListRequest request);
} }
...@@ -3,7 +3,9 @@ package com.ruoyi.service; ...@@ -3,7 +3,9 @@ package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.web.request.ReviewStandardListByPageRequest; import com.ruoyi.web.request.ReviewStandardListByPageRequest;
import com.ruoyi.web.request.ReviewStandardListRequest;
import com.ruoyi.web.response.ReviewStandardInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardInspectionContentResponse;
import com.ruoyi.web.response.ReviewStandardListResponse;
import com.ruoyi.web.response.ReviewStandardResponse; import com.ruoyi.web.response.ReviewStandardResponse;
import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse;
...@@ -43,4 +45,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> { ...@@ -43,4 +45,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* @return * @return
*/ */
List<ReviewStandardTestInspectionContentResponse> selectTestInspectionContent(Long id); List<ReviewStandardTestInspectionContentResponse> selectTestInspectionContent(Long id);
/**
* 查询标准要求
* @param request
* @return
*/
List<ReviewStandardListResponse> findReviewStandardList(ReviewStandardListRequest request);
} }
...@@ -6,7 +6,9 @@ import com.ruoyi.domain.*; ...@@ -6,7 +6,9 @@ import com.ruoyi.domain.*;
import com.ruoyi.mapper.ReviewStandardMapper; import com.ruoyi.mapper.ReviewStandardMapper;
import com.ruoyi.service.*; import com.ruoyi.service.*;
import com.ruoyi.web.request.ReviewStandardListByPageRequest; import com.ruoyi.web.request.ReviewStandardListByPageRequest;
import com.ruoyi.web.request.ReviewStandardListRequest;
import com.ruoyi.web.response.ReviewStandardInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardInspectionContentResponse;
import com.ruoyi.web.response.ReviewStandardListResponse;
import com.ruoyi.web.response.ReviewStandardResponse; import com.ruoyi.web.response.ReviewStandardResponse;
import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -98,6 +100,11 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper, ...@@ -98,6 +100,11 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
return list; return list;
} }
@Override
public List<ReviewStandardListResponse> findReviewStandardList(ReviewStandardListRequest request) {
return reviewStandardMapper.findReviewStandardList(request);
}
/** /**
* 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中 * 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中
* @param reviewStandardList * @param reviewStandardList
......
...@@ -402,20 +402,24 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -402,20 +402,24 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
} }
} }
// 任务组长
task.setLeaderId(leader.getUserId());
task.setLeader(leader.getName());
}
// 暂存
taskService.save(task);
if (auditors.size() != 0 && auditors != null) {
// 构建并保存该任务所关联的审核组信息 // 构建并保存该任务所关联的审核组信息
for(TaskUserRelation auditor : auditors) { for(TaskUserRelation auditor : auditors) {
auditor.setTaskId(task.getId()); auditor.setTaskId(task.getId());
} }
taskUserRelationService.saveBatch(auditors); taskUserRelationService.saveBatch(auditors);
// 任务组长
task.setLeaderId(leader.getUserId());
task.setLeader(leader.getName());
} }
// 暂存
taskService.save(task);
// 保存关联的整车样品信息 // 保存关联的整车样品信息
......
package com.ruoyi.web;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.service.ReviewKeyPointService;
import com.ruoyi.web.request.KeyPointFindListRequest;
import com.ruoyi.web.request.TaskFindPendingRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "审查要点")
@RestController
@RequestMapping("/review/keypoint")
public class ReviewKeyPointController extends BaseController {
@Autowired
private ReviewKeyPointService reviewKeyPointService;
@ApiOperation("查询审查要点")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findKeyPointList")
public TableDataInfo<ReviewStandard> findKeyPointList(@Validated @RequestBody KeyPointFindListRequest request) {
// return getDataTable(reviewKeyPointService.findKeyPointList(request));
return null;
}
}
...@@ -7,20 +7,19 @@ import com.ruoyi.common.core.domain.R; ...@@ -7,20 +7,19 @@ import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.service.ReviewStandardService; import com.ruoyi.service.ReviewStandardService;
import com.ruoyi.web.request.ReviewStandardInspectionContentRequest; import com.ruoyi.web.request.*;
import com.ruoyi.web.request.ReviewStandardListByPageRequest;
import com.ruoyi.web.request.ReviewStandardTestInspectionContentRequest;
import com.ruoyi.web.response.ReviewStandardInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardInspectionContentResponse;
import com.ruoyi.web.response.ReviewStandardListResponse;
import com.ruoyi.web.response.ReviewStandardResponse; import com.ruoyi.web.response.ReviewStandardResponse;
import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
...@@ -72,4 +71,12 @@ public class ReviewStandardController extends BaseController { ...@@ -72,4 +71,12 @@ public class ReviewStandardController extends BaseController {
List<ReviewStandardTestInspectionContentResponse> response = reviewStandardService.selectTestInspectionContent(request.getId()); List<ReviewStandardTestInspectionContentResponse> response = reviewStandardService.selectTestInspectionContent(request.getId());
return R.ok(response); return R.ok(response);
} }
@ApiOperation("查询标注要求列表")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findReviewStandardList")
public TableDataInfo<ReviewStandardListResponse> findReviewStandardList(@Validated @RequestBody ReviewStandardListRequest request) {
return getDataTable(reviewStandardService.findReviewStandardList(request));
}
} }
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@ApiModel(value = "KeyPointFindListRequest", description = "查询审查要点")
@Data
public class KeyPointFindListRequest {
@ApiModelProperty("审查要点")
private String text;
@ApiModelProperty("总标准ID")
@NotNull(message = "总标准ID不能为空")
private Long standardId;
@ApiModelProperty("标准类型[system、car、test]")
@NotNull(message = "标准类型不能为空")
@NotEmpty(message = "标准类型不能为空")
private String type;
}
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;
import java.util.Date;
@ApiModel(value = "ReviewStandardListRequest", description = "查询标准要求")
@Data
public class ReviewStandardListRequest {
@ApiModelProperty("章节")
private String chapter;
@ApiModelProperty("要求")
private String text;
@ApiModelProperty("分类要求[system、car、test]")
private String type;
}
package com.ruoyi.web.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "ReviewStandardListResponse", description = "查询标准要求")
public class ReviewStandardListResponse {
@ApiModelProperty("ID")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@ApiModelProperty("章节")
private String chapter;
@ApiModelProperty("文本内容")
private String text;
}
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
</resultMap> </resultMap>
<resultMap id="StandardListResultMap" type="com.ruoyi.web.response.ReviewStandardListResponse">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="chapter" column="chapter" jdbcType="VARCHAR"/>
<result property="text" column="text" jdbcType="VARCHAR"/>
</resultMap>
<select id="findTree" resultMap="StandardTreeResultMap"> <select id="findTree" resultMap="StandardTreeResultMap">
SELECT id, chapter, text, standard_id, name, standard_no, file, conformity, inconformity FROM t_review_standard; SELECT id, chapter, text, standard_id, name, standard_no, file, conformity, inconformity FROM t_review_standard;
</select> </select>
...@@ -62,6 +68,18 @@ ...@@ -62,6 +68,18 @@
WHERE WHERE
usecase.review_standard_id = #{id} usecase.review_standard_id = #{id}
</select> </select>
<select id="findReviewStandardList" resultType="com.ruoyi.web.response.ReviewStandardListResponse">
SELECT id,chapter,text FROM t_review_standard
<where>
type = #{type}
<if test="chapter != null and chapter != ''">
and chapter like concat('%', #{chapter}, '%')
</if>
<if test="text != null and text != ''">
and text like concat('%', #{text}, '%')
</if>
</where>
</select>
</mapper> </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