Commit b334456d authored by yuanshuo's avatar yuanshuo

Merge branch 'master' of...

Merge branch 'master' of http://gitlab.91isoft.com:90/car-database/car-database-api into songyuanshuo
parents 1430df1b a661e4d5
......@@ -69,7 +69,7 @@ public class TTestPlanRecord{
*/
@ApiModelProperty("检测机构名称")
@TableField(exist = false)
private String testOrganizationName;
private String deptName;
/**
* 关联的检验项目逗号分隔id
......
......@@ -17,6 +17,13 @@ import java.util.List;
public interface ReviewSceneChangeTaskUserRelationMapper extends BaseMapper<ReviewSceneChangeTaskUserRelation> {
List<ReviewSceneChangeTaskUserRelation> findListByTaskId(@Param("taskId") Long taskId);
/**
* 查询当前任务未处理的列表
* @param taskId
* @return
*/
List<ReviewSceneChangeTaskUserRelation> findListByTaskIdCancel(@Param("taskId") Long taskId);
}
......
......@@ -3,10 +3,7 @@ package com.ruoyi.service;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.domain.ReviewSceneChangeTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.request.*;
import com.ruoyi.web.response.ReviewDetailsListResponse;
import com.ruoyi.web.response.ReviewKeyPointListResponse;
import com.ruoyi.web.response.ReviewOpinionResponse;
......@@ -127,4 +124,9 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
* */
List<ReviewOpinionResponse> getReviewerOpinion(Long id);
/**
* 取消审核
* @return
*/
void cancel(ReviewSceneChangeTaskCancelRequest request);
}
......@@ -14,4 +14,10 @@ public interface ReviewSceneChangeTaskUserRelationService extends IService<Revie
List<ReviewSceneChangeTaskUserRelation> findListByTaskId(Long taskId);
/**
* 查询当前任务未处理的列表
* @param taskId
* @return
*/
List<ReviewSceneChangeTaskUserRelation> findListByTaskIdCancel(Long taskId);
}
......@@ -18,10 +18,7 @@ import com.ruoyi.service.ReviewTaskInboxService;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.request.*;
import com.ruoyi.web.response.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -540,6 +537,17 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
List<ReviewOpinionResponse> list = reviewSceneChangeTaskMapper.getReviewerOpinion(id);
return list;
}
/**
* 取消审核
* @return
*/
@Override
public void cancel(ReviewSceneChangeTaskCancelRequest request) {
ReviewSceneChangeTask task = getById(request.getId());
task.setTaskStatus(ReviewSceneChangeTask.STATUS_CLOSE);
updateById(task);
}
}
......
......@@ -26,6 +26,16 @@ public class ReviewSceneChangeTaskUserRelationServiceImpl extends ServiceImpl<Re
public List<ReviewSceneChangeTaskUserRelation> findListByTaskId(Long taskId) {
return reviewSceneChangeTaskUserRelationMapper.findListByTaskId(taskId);
}
/**
* 查询当前任务未处理的列表
* @param taskId
* @return
*/
@Override
public List<ReviewSceneChangeTaskUserRelation> findListByTaskIdCancel(Long taskId) {
return reviewSceneChangeTaskUserRelationMapper.findListByTaskIdCancel(taskId);
}
}
......
......@@ -2,6 +2,7 @@ package com.ruoyi.service.impl;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.TTestPlanRecord;
import com.ruoyi.domain.vo.ItemsByUseCaseVO;
......@@ -45,7 +46,10 @@ public class TTestPlanRecordServiceImpl extends ServiceImpl<TTestPlanRecordMappe
@Override
public List<TTestPlanRecord> selectTestPlanRecordPage(TestPlanRecordPageRequest testPlanRecordPageRequest){
Long roleId = SecurityUtils.getLoginUser().getUser().getRoleId();
if(roleId.equals(113)){
testPlanRecordPageRequest.setTestOrganizationId(SecurityUtils.getDeptId());
}
return tTestPlanRecordMapper.selectTestPlanRecordPage(testPlanRecordPageRequest);
}
......
......@@ -285,4 +285,18 @@ public class ReviewSceneChangeTaskController extends BaseController {
List<GetSceneListResponse> getSceneListResponses = reviewSceneService.getSceneListById(id);
return R.ok(getSceneListResponses);
}
/**
* 取消审核
* @return
*/
@ApiOperation("取消审核")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "取消审核", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/cancel")
public R<String> audit(@Validated @RequestBody ReviewSceneChangeTaskCancelRequest request) {
reviewSceneChangeTaskService.cancel(request);
return R.ok();
}
}
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "ReviewSceneChangeTaskCancelRequest", description = "取消审核任务")
@Data
public class ReviewSceneChangeTaskCancelRequest {
@ApiModelProperty(value = "id",required = true)
private Long id;
}
......@@ -61,7 +61,7 @@
<select id="findPendingListByUserId" resultType="com.ruoyi.web.response.ReviewSceneChangeTaskResponse">
SELECT sct.*, sctu.decision FROM t_review_scene_change_task sct
LEFT JOIN t_review_scene_change_task_user_relation sctu ON sct.id = sctu.task_id
WHERE sctu.user_id = #{userId} and sctu.decision IS NULL and sctu.role_id = 103
WHERE sctu.user_id = #{userId} and sct.task_status = 'PENDING' and sctu.decision IS NULL and sctu.role_id = 103
<if test="request.operationSort != null and request.operationSort != ''">
and sct.operation_sort = #{request.operationSort}
</if>
......
......@@ -24,4 +24,8 @@
SELECT id, task_id, user_id, decision, decision_time, name, role_id, comment, dept FROM t_review_scene_change_task_user_relation
WHERE task_id = #{taskId}
</select>
<select id="findListByTaskIdCancel" resultType="com.ruoyi.domain.ReviewSceneChangeTaskUserRelation">
SELECT id, task_id, user_id, decision, decision_time, name, role_id, comment, dept FROM t_review_scene_change_task_user_relation
WHERE task_id = #{taskId} and decision is null
</select>
</mapper>
......@@ -13,7 +13,7 @@
<result property="testResult" column="test_result" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="testOrganizationId" column="test_organization_id" jdbcType="BIGINT"/>
<result property="testOrganizationName" column="dept_name" jdbcType="VARCHAR"/>
<result property="deptName" column="dept_name" jdbcType="VARCHAR"/>
<result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/>
<result property="useCaseNo" column="use_case_no" jdbcType="INTEGER"/>
<result property="inspectionStandardId" column="inspection_standard_id" jdbcType="BIGINT"/>
......
......@@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://106.3.99.64:20011/vehicle-quality-review-2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&sessionVariables=group_concat_max_len=3000
url: jdbc:mysql://10.12.48.76:22030/vehicle-quality-review-2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&sessionVariables=group_concat_max_len=3000
username: root
password: 1qaz@WSX
# 从库数据源
......
......@@ -90,6 +90,9 @@ public class SysUser extends BaseEntity
/** 角色ID */
private Long roleId;
/** 角色 */
private String roleKey;
/** 用户签字图片 */
private String signaturePicture;
......
......@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="roleId" column="role_id" />
<result property="signaturePicture" column="signature_picture" />
<association property="dept" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
......@@ -50,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.signature_picture,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,r.role_key as roleKey
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
......
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