Commit 4bc87890 authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'dev'

Songyuanshuo

See merge request !426
parents 3c030345 0bafb7e9
...@@ -5,6 +5,8 @@ import com.ruoyi.domain.ReviewDetails; ...@@ -5,6 +5,8 @@ import com.ruoyi.domain.ReviewDetails;
import com.ruoyi.domain.ReviewKeyPoint; import com.ruoyi.domain.ReviewKeyPoint;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.web.request.ReviewFindListRequest; import com.ruoyi.web.request.ReviewFindListRequest;
import com.ruoyi.web.response.ReviewDetailsListResponse;
import com.ruoyi.web.response.ReviewKeyPointListResponse;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -20,4 +22,8 @@ public interface ReviewKeyPointMapper extends BaseMapper<ReviewKeyPoint> { ...@@ -20,4 +22,8 @@ public interface ReviewKeyPointMapper extends BaseMapper<ReviewKeyPoint> {
// 根据细则列表查询要点列表 // 根据细则列表查询要点列表
List<ReviewKeyPoint> findByDetailsList(@Param("detailsList") List<ReviewDetails> detailsList); List<ReviewKeyPoint> findByDetailsList(@Param("detailsList") List<ReviewDetails> detailsList);
List<ReviewKeyPointListResponse> getKeyPointList(@Param("standardId") Long standardId);
List<ReviewDetailsListResponse> getDetailsList(@Param("keyPointId") Long keyPointId);
} }
...@@ -6,6 +6,8 @@ import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest; ...@@ -6,6 +6,8 @@ import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.response.ReviewDetailsListResponse;
import com.ruoyi.web.response.ReviewKeyPointListResponse;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse; import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import java.util.Date; import java.util.Date;
...@@ -102,4 +104,15 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange ...@@ -102,4 +104,15 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
* @return * @return
*/ */
void innovationBaseAudit(ReviewSceneChangeTaskPassRequest request); void innovationBaseAudit(ReviewSceneChangeTaskPassRequest request);
/*
* 发起评审-新增审查场景-获取要点列表
* */
List<ReviewKeyPointListResponse> getKeyPointList(Long standardId);
/*
* 发起评审-新增审查场景-获取细则列表
* */
List<ReviewDetailsListResponse> getDetailsList(Long keyPointId);
} }
...@@ -38,7 +38,6 @@ public interface ReviewStandardService extends IService<ReviewStandard> { ...@@ -38,7 +38,6 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* @return * @return
*/ */
ReviewStandardInspectionContentResponse selectInspectionContent(Long id); ReviewStandardInspectionContentResponse selectInspectionContent(Long id);
/** /**
* 根据标准主键ID查询车型试验的检验内容 * 根据标准主键ID查询车型试验的检验内容
* @param id * @param id
......
...@@ -9,6 +9,7 @@ import com.ruoyi.common.utils.SecurityUtils; ...@@ -9,6 +9,7 @@ import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.ReviewSceneChangeTask; import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.domain.ReviewSceneChangeTaskUserRelation; import com.ruoyi.domain.ReviewSceneChangeTaskUserRelation;
import com.ruoyi.framework.web.domain.server.Sys; import com.ruoyi.framework.web.domain.server.Sys;
import com.ruoyi.mapper.ReviewKeyPointMapper;
import com.ruoyi.service.ReviewSceneChangeTaskService; import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.mapper.ReviewSceneChangeTaskMapper; import com.ruoyi.mapper.ReviewSceneChangeTaskMapper;
import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService; import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService;
...@@ -20,6 +21,8 @@ import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest; ...@@ -20,6 +21,8 @@ import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.response.ReviewDetailsListResponse;
import com.ruoyi.web.response.ReviewKeyPointListResponse;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse; import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -57,6 +60,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -57,6 +60,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
@Autowired @Autowired
private SysUserRoleMapper sysUserRoleMapper; private SysUserRoleMapper sysUserRoleMapper;
@Autowired
private ReviewKeyPointMapper reviewKeyPointMapper;
@Override @Override
public void create(ReviewSceneChangeTask reviewSceneChangeTask) { public void create(ReviewSceneChangeTask reviewSceneChangeTask) {
...@@ -406,7 +411,6 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -406,7 +411,6 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
throw new ServiceException("审核状态不正确",HttpStatus.ERROR); throw new ServiceException("审核状态不正确",HttpStatus.ERROR);
} }
} }
/** /**
* 创新基地评审任务 * 创新基地评审任务
* @param taskId * @param taskId
...@@ -450,6 +454,21 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -450,6 +454,21 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
} }
/*
* 发起评审-新增审查场景-获取要点列表
* */
@Override
public List<ReviewKeyPointListResponse> getKeyPointList(Long standardId) {
return reviewKeyPointMapper.getKeyPointList(standardId);
}
/*
* 发起评审-新增审查场景-获取细则列表
* */
@Override
public List<ReviewDetailsListResponse> getDetailsList(Long keyPointId) {
return reviewKeyPointMapper.getDetailsList(keyPointId);
}
} }
......
...@@ -68,11 +68,20 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange, ...@@ -68,11 +68,20 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange,
.setReviewStandardId(reviewSceneChangeTask.getStandardId()); .setReviewStandardId(reviewSceneChangeTask.getStandardId());
reviewKeyPointMapper.insert(reviewKeyPoint); reviewKeyPointMapper.insert(reviewKeyPoint);
//为新增细则变更任务的细则关联id字段赋值
reviewSceneChangeTask.setKeypointId(reviewKeyPoint.getId());
reviewSceneChangeTaskService.updateById(reviewSceneChangeTask);
// 细则 // 细则
ReviewDetails reviewDetails = new ReviewDetails() ReviewDetails reviewDetails = new ReviewDetails()
.setText(reviewSceneChangeTask.getDetails()) .setText(reviewSceneChangeTask.getDetails())
.setReviewKeypointId(reviewKeyPoint.getId()); .setReviewKeypointId(reviewKeyPoint.getId());
reviewDetailsMapper.insert(reviewDetails); reviewDetailsMapper.insert(reviewDetails);
//为新增细则变更任务的细则关联id字段赋值
reviewSceneChangeTask.setDetailsId(reviewDetails.getId());
reviewSceneChangeTaskService.updateById(reviewSceneChangeTask);
} }
// 保存新增的细则 // 保存新增的细则
...@@ -82,6 +91,10 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange, ...@@ -82,6 +91,10 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange,
.setText(reviewSceneChangeTask.getDetails()) .setText(reviewSceneChangeTask.getDetails())
.setReviewKeypointId(reviewSceneChangeTask.getKeypointId()); .setReviewKeypointId(reviewSceneChangeTask.getKeypointId());
reviewDetailsMapper.insert(reviewDetails); reviewDetailsMapper.insert(reviewDetails);
//为新增细则变更任务的细则关联id字段赋值
reviewSceneChangeTask.setDetailsId(reviewDetails.getId());
reviewSceneChangeTaskService.updateById(reviewSceneChangeTask);
} }
......
...@@ -6,9 +6,16 @@ import com.ruoyi.common.core.domain.R; ...@@ -6,9 +6,16 @@ import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.ReviewKeyPoint;
import com.ruoyi.domain.ReviewSceneChangeTask; import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.service.ReviewSceneChangeTaskService; import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.web.request.ReviewSceneChangeTaskCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.response.ReviewDetailsListResponse;
import com.ruoyi.web.response.ReviewKeyPointListResponse;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import com.ruoyi.web.request.*; import com.ruoyi.web.request.*;
import com.ruoyi.web.response.ReviewStandardListResponse;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse; import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -22,6 +29,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -22,6 +29,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api(tags = "场景变更任务") @Api(tags = "场景变更任务")
@RestController @RestController
@RequestMapping("/review/scene/change/task") @RequestMapping("/review/scene/change/task")
...@@ -100,7 +109,8 @@ public class ReviewSceneChangeTaskController extends BaseController { ...@@ -100,7 +109,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getById") @RequestMapping(method = RequestMethod.POST, value = "/getById")
public R<ReviewSceneChangeTask> getInfo(@Validated @RequestBody ReviewSceneChangeTaskGetInfoRequest request) { public R<ReviewSceneChangeTask> getInfo(@Validated @RequestBody ReviewSceneChangeTaskGetInfoRequest request) {
return R.ok(reviewSceneChangeTaskService.getBySceneChangeTaskId(request.getId())); Long id = Long.parseLong(request.getId());
return R.ok(reviewSceneChangeTaskService.getBySceneChangeTaskId(id));
} }
/** /**
...@@ -138,7 +148,8 @@ public class ReviewSceneChangeTaskController extends BaseController { ...@@ -138,7 +148,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/innovationBaseGetById") @RequestMapping(method = RequestMethod.POST, value = "/innovationBaseGetById")
public R<ReviewSceneChangeTask> innovationBaseGetById(@Validated @RequestBody ReviewSceneChangeTaskGetInfoRequest request) { public R<ReviewSceneChangeTask> innovationBaseGetById(@Validated @RequestBody ReviewSceneChangeTaskGetInfoRequest request) {
return R.ok(reviewSceneChangeTaskService.getBySceneChange(request.getId())); Long id = Long.parseLong(request.getId());
return R.ok(reviewSceneChangeTaskService.getBySceneChange(id));
} }
/** /**
...@@ -155,4 +166,30 @@ public class ReviewSceneChangeTaskController extends BaseController { ...@@ -155,4 +166,30 @@ public class ReviewSceneChangeTaskController extends BaseController {
return R.ok(); return R.ok();
} }
/*
* 发起评审-新增审查场景-获取要点列表
* */
@ApiOperation("发起评审-新增审查场景-获取要点列表")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "发起评审-新增审查场景-获取要点列表", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/getKeyPointList")
public R<List<ReviewKeyPointListResponse>> getKeyPointList(@Validated @RequestBody ReviewKeyPointListRequest request){
List<ReviewKeyPointListResponse> list = reviewSceneChangeTaskService.getKeyPointList(request.getStandardId());
return R.ok(list);
}
/*
* 发起评审-新增审查场景-获取细则列表
* */
@ApiOperation("发起评审-新增审查场景-获取细则列表")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "发起评审-新增审查场景-获取细则列表", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/getDetailsList")
public R<List<ReviewDetailsListResponse>> getKeyPointList(@Validated @RequestBody ReviewDetailsListRequest request){
List<ReviewDetailsListResponse> list = reviewSceneChangeTaskService.getDetailsList(request.getKeyPointId());
return R.ok(list);
}
} }
...@@ -45,7 +45,6 @@ public class ReviewStandardController extends BaseController { ...@@ -45,7 +45,6 @@ public class ReviewStandardController extends BaseController {
List<ReviewStandardResponse> list = reviewStandardService.listByPage(request); List<ReviewStandardResponse> list = reviewStandardService.listByPage(request);
return getDataTable(list); return getDataTable(list);
} }
/** /**
* 根据标准主键ID查询树状结构 * 根据标准主键ID查询树状结构
* @param request * @param request
......
...@@ -8,6 +8,10 @@ import lombok.Data; ...@@ -8,6 +8,10 @@ import lombok.Data;
@ApiModel @ApiModel
public class ReviewSceneChangeTaskGetInfoRequest { public class ReviewSceneChangeTaskGetInfoRequest {
/*
* 由于Long类型的id太长,前端接受数据时会产生差错,这里将Long改为String确保id正常传递
* */
@ApiModelProperty("ID") @ApiModelProperty("ID")
private Long id; private String id;
} }
package com.ruoyi.web.request; package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain; import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -44,4 +45,10 @@ public class ReviewStandardListByPageRequest extends PageDomain { ...@@ -44,4 +45,10 @@ public class ReviewStandardListByPageRequest extends PageDomain {
@ApiModelProperty("测试方法") @ApiModelProperty("测试方法")
private String testMethod; private String testMethod;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准号")
private String standardNo;
} }
...@@ -13,10 +13,10 @@ import java.util.Date; ...@@ -13,10 +13,10 @@ import java.util.Date;
public class ReviewSceneChangeTaskResponse { public class ReviewSceneChangeTaskResponse {
/** /**
* 主键 * 主键 由于主键太长返回给前端时会造成数据不对问题,这里将id改为String类型。
*/ */
@ApiModelProperty("主键") @ApiModelProperty("主键")
private Long id; private String id;
/** /**
* 任务编号 * 任务编号
......
...@@ -35,4 +35,10 @@ public class ReviewStandardResponse { ...@@ -35,4 +35,10 @@ public class ReviewStandardResponse {
@ApiModelProperty("测试方法(车型试验专有)") @ApiModelProperty("测试方法(车型试验专有)")
private String testMethod; private String testMethod;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准号")
private String standardNo;
} }
...@@ -26,5 +26,13 @@ ...@@ -26,5 +26,13 @@
#{detail.reviewKeypointId} #{detail.reviewKeypointId}
</foreach> </foreach>
</select> </select>
<select id="getKeyPointList" resultType="com.ruoyi.web.response.ReviewKeyPointListResponse">
select id, text from t_review_keypoint
where review_standard_id = #{standardId}
</select>
<select id="getDetailsList" resultType="com.ruoyi.web.response.ReviewDetailsListResponse">
select id, text from t_review_details
where review_keypoint_id = #{keyPointId}
</select>
</mapper> </mapper>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<select id="findCreateListByUserId" resultType="com.ruoyi.domain.ReviewSceneChangeTask"> <select id="findCreateListByUserId" resultType="com.ruoyi.domain.ReviewSceneChangeTask">
SELECT * FROM t_review_scene_change_task SELECT * FROM t_review_scene_change_task
WHERE task_initiator_id = #{userId} WHERE task_initiator_id = #{userId} and innovation_base_result = 'PASS'
<if test="request.operationSort != null and request.operationSort != ''"> <if test="request.operationSort != null and request.operationSort != ''">
and operation_sort = #{request.operationSort} and operation_sort = #{request.operationSort}
</if> </if>
......
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
id, id,
chapter, chapter,
text, text,
test_method AS testMethod test_method AS testMethod,
name,
standard_no AS standardNo
from from
t_review_standard t_review_standard
<where> <where>
...@@ -53,6 +55,8 @@ ...@@ -53,6 +55,8 @@
<if test="chapter != null and chapter != ''"> and chapter like concat('%', #{chapter}, '%') </if> <if test="chapter != null and chapter != ''"> and chapter like concat('%', #{chapter}, '%') </if>
<if test="text != null and text != ''"> and text like concat('%', #{text}, '%') </if> <if test="text != null and text != ''"> and text like concat('%', #{text}, '%') </if>
<if test="testMethod != null and testMethod != ''"> and test_method like concat('%', #{testMethod}, '%') </if> <if test="testMethod != null and testMethod != ''"> and test_method like concat('%', #{testMethod}, '%') </if>
<if test="name != null and text != ''">and name like concat('%',#{name}, '%')</if>
<if test="standardNo != null and standardNo != ''">and standard_no like concat('%',#{standardNo},'%')</if>
</where> </where>
ORDER BY ORDER BY
chapter chapter
...@@ -95,4 +99,5 @@ ...@@ -95,4 +99,5 @@
</select> </select>
</mapper> </mapper>
...@@ -3,12 +3,14 @@ package com.ruoyi.system.mapper; ...@@ -3,12 +3,14 @@ package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.ruoyi.system.domain.SysUserRole; import com.ruoyi.system.domain.SysUserRole;
import org.springframework.stereotype.Repository;
/** /**
* 用户与角色关联表 数据层 * 用户与角色关联表 数据层
* *
* @author ruoyi * @author ruoyi
*/ */
@Repository
public interface SysUserRoleMapper public interface SysUserRoleMapper
{ {
/** /**
......
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