Commit e938b9d6 authored by 王飞's avatar 王飞

Merge branch 'wangdingyi' into 'dev'

问卷-审查标准添加字段&体系审查任务添加字段&新建体系审查任务参数添加字段

See merge request !19
parents cce38604 9320e35f
......@@ -38,4 +38,24 @@ public class ReviewStandard {
@TableField(exist = false)
private List<ReviewKeyPoint> keyPointList;
/**
* 关联标准表id
*/
private Long standardId;
/**
* 标准名称
*/
private String name;
/**
* 标准号
*/
private String standardNo;
/**
* 文件路径
*/
private String file;
}
package com.ruoyi.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 标准
* @TableName t_standard
*/
@ApiModel(value = "Standard", description = "标准")
@TableName(value ="t_standard", autoResultMap = true)
@Accessors(chain = true)
@Data
public class Standard {
/**
* 主键
*/
@ApiModelProperty("主键")
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 标准名称
*/
@ApiModelProperty("标准名称")
private String name;
/**
* 标准号
*/
@ApiModelProperty("标准号")
private String standardNo;
/**
* 文件路径
*/
@ApiModelProperty("文件路径")
private String file;
}
......@@ -97,4 +97,24 @@ public class SystemReviewTask {
*/
private Date createTime;
}
\ No newline at end of file
/**
* 关联标准表id
*/
private Long standardId;
/**
* 标准名称
*/
private String name;
/**
* 标准号
*/
private String standardNo;
/**
* 文件路径
*/
private String file;
}
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.Standard;
import com.ruoyi.web.request.StandardListRequest;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface StandardMapper extends BaseMapper<Standard> {
// 分页查询
List<Standard> findList(@Param("params") StandardListRequest request);
}
package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.Standard;
import com.ruoyi.web.request.StandardListRequest;
import java.util.List;
/**
* @description 针对表【t_standard(标准)】的数据库操作Service
*/
public interface StandardService extends IService<Standard> {
// 分页查询
List<Standard> findList(StandardListRequest request);
}
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.Standard;
import com.ruoyi.mapper.StandardMapper;
import com.ruoyi.service.StandardService;
import com.ruoyi.web.request.StandardListRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> implements StandardService {
@Autowired
private StandardMapper standardMapper;
/**
* 分页查询
* @param request
* @return
*/
@Override
public List<Standard> findList(StandardListRequest request) {
return standardMapper.findList(request);
}
}
package com.ruoyi.web;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.Standard;
import com.ruoyi.service.StandardService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.StandardListRequest;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
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("标准")
@RestController
@RequestMapping("/standard")
public class StandardController extends BaseController {
@Autowired
private StandardService standardService;
/**
* 分页查询
* @return
*/
@ApiOperation("分页查询")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findStandardList")
public TableDataInfo<Standard> findList(@Validated @RequestBody StandardListRequest request) {
startPage(request);
return getDataTable(standardService.findList(request));
}
}
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;
@ApiModel(value = "StandardListRequest", description = "查询标准")
@Data
public class StandardListRequest extends PageDomain {
/**
* 标准名称
*/
@ApiModelProperty("标准名称")
private String name;
/**
* 标准号
*/
@ApiModelProperty("标准号")
private String standardNo;
}
......@@ -12,4 +12,10 @@ public class SystemReviewTaskCreateRequest {
private List<SystemReviewTaskUserRelation> auditors;
/**
* 标准id
* 根据哪个标准新建的审查任务
*/
private Long standardId;
}
......@@ -9,6 +9,10 @@
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="chapter" column="chapter" jdbcType="VARCHAR"/>
<result property="text" column="text" jdbcType="VARCHAR"/>
<result property="standardId" column="standard_id" jdbcType="BIGINT"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="VARCHAR"/>
<result property="file" column="file" jdbcType="VARCHAR"/>
<collection property="keyPointList" ofType="com.ruoyi.domain.ReviewKeyPoint" select="com.ruoyi.mapper.ReviewKeyPointMapper.findAllByReviewStandardId" column="id">
<result property="id" column="u_id" jdbcType="BIGINT"/>
......@@ -18,7 +22,7 @@
</resultMap>
<select id="findTree" resultMap="StandardTreeResultMap">
SELECT id, chapter, text FROM t_review_standard;
SELECT id, chapter, text, standard_id, name, standard_no, file FROM t_review_standard;
</select>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.mapper.StandardMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.Standard">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="VARCHAR"/>
<result property="file" column="file" jdbcType="VARCHAR"/>
</resultMap>
<select id="findList" parameterType="com.ruoyi.domain.Standard" resultMap="BaseResultMap">
SELECT id, name, standard_no, file
FROM t_standard
<where>
<if test="params.name != null and params.name != ''">
name like concat('%',#{params.name},'%')
</if>
<if test="params.standardNo != null and params.standardNo != ''">
standard_no = #{params.standardNo}
</if>
</where>
</select>
</mapper>
......@@ -16,10 +16,14 @@
<result property="standard" column="standard" typeHandler="com.ruoyi.common.StandardJsonTypeHandler"/>
<result property="bizInfo" column="biz_info" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="standardId" column="standard_id" jdbcType="BIGINT"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="VARCHAR"/>
<result property="file" column="file" jdbcType="VARCHAR"/>
</resultMap>
<select id="findListByStatus" resultMap="BaseResultMap">
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, biz_info, create_time
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, biz_info, create_time, standard_id, name, standard_no, file
FROM t_system_review_task WHERE task_status = #{status}
</select>
......
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