Commit f39b4e8c authored by W_Y's avatar W_Y

task表相关文件

parent 50cafe26
package com.ruoyi.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.StandardJsonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
/**
* 任务表
*/
@ApiModel
@TableName(value ="t_task", autoResultMap = true)
@Accessors(chain = true)
@Data
public class Task {
@TableField(exist = false)
public static final String STATUS_NEW = "NEW";
@TableField(exist = false)
public static final String STATUS_PENDING = "PENDING";
@TableField(exist = false)
public static final String STATUS_FINISH = "FINISH";
@ApiModelProperty("主键")
@TableId(type = IdType.ASSIGN_ID)
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@ApiModelProperty("体系审查任务id")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long systemReviewTaskId;
@ApiModelProperty("车辆检查任务id")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long carReviewTaskId;
@ApiModelProperty("任务编号")
private String taskNo;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("任务状态(NEW、PENDING、FINISH)")
private String taskStatus;
@ApiModelProperty("产品名称")
private String productName;
@ApiModelProperty("产品型号")
private String productModel;
@ApiModelProperty("委托单位")
private String entrustedUnit;
@ApiModelProperty("委托单位地址")
private String entrustedUnitAddress;
@ApiModelProperty("委托单位电话")
private String entrustedUnitPhone;
@ApiModelProperty("委托单位邮政编码")
private String entrustedUnitCode;
@ApiModelProperty("车辆类型")
private String carType;
@ApiModelProperty("车辆识别码")
private String carIdentificationCode;
@ApiModelProperty("保密等级")
private String confidentialityLevel;
@ApiModelProperty("样品名称")
private String sampleName;
@ApiModelProperty("生产企业")
private String productionEnterprise;
@ApiModelProperty("送样者")
private String sampleSender;
@ApiModelProperty("送样日期")
private Date sendDate;
@ApiModelProperty("样品数量")
private String sampleNumber;
@ApiModelProperty("生成日期")
private Date productionDate;
@ApiModelProperty("商标")
private String trademark;
@ApiModelProperty("检验依据")
private String inspectionBasis;
@ApiModelProperty("任务发起人姓名")
private String taskInitiator;
@ApiModelProperty("任务发起人部门")
private String taskInitiatorDept;
@ApiModelProperty("任务开始时间")
private Date taskBeginTime;
@ApiModelProperty("任务结束时间")
private Date taskEndTime;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@ApiModelProperty("审核组长id")
private Long leaderId;
@ApiModelProperty("审核组长姓名")
private String leader;
@ApiModelProperty("创建时间")
private Date createTime;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@ApiModelProperty("关联标准表id")
private Long standardId;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准号")
private String standardNo;
@ApiModelProperty("文件路径")
private String file;
}
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.Task;
import com.ruoyi.web.request.TaskListRequest;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface TaskMapper extends BaseMapper<Task> {
List<Task> findList(TaskListRequest request);
}
package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.Task;
import com.ruoyi.web.request.TaskListRequest;
import java.util.List;
public interface TaskService extends IService<Task> {
/**
* 查询任务表
* @param request
* @return
*/
List<Task> findList(TaskListRequest request);
}
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.Task;
import com.ruoyi.mapper.TaskMapper;
import com.ruoyi.service.TaskService;
import com.ruoyi.web.request.TaskListRequest;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
@Service
public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService {
@Autowired
private TaskMapper taskMapper;
@Override
public List<Task> findList(TaskListRequest request) {
return taskMapper.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;
import java.util.Date;
@ApiModel(value = "TaskListRequest", description = "查询总任务")
@Data
public class TaskListRequest extends PageDomain {
@ApiModelProperty("任务开始时间")
private Date taskBeginTime;
@ApiModelProperty("任务状态")
private String taskStatus;
}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<result property="inconformity" column="inconformity" jdbcType="VARCHAR"/> <result property="inconformity" column="inconformity" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<select id="findList" parameterType="com.ruoyi.domain.Standard" resultMap="BaseResultMap"> <select id="findList" parameterType="com.ruoyi.web.request.StandardListRequest" resultMap="BaseResultMap">
SELECT id, name, standard_no, file, conformity, inconformity SELECT id, name, standard_no, file, conformity, inconformity
FROM t_standard FROM t_standard
<where> <where>
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
<result property="taskEndTime" column="task_end_time" jdbcType="TIMESTAMP"/> <result property="taskEndTime" column="task_end_time" jdbcType="TIMESTAMP"/>
<result property="standard" column="standard" typeHandler="com.ruoyi.common.StandardJsonTypeHandler"/> <result property="standard" column="standard" typeHandler="com.ruoyi.common.StandardJsonTypeHandler"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="leaderId" column="leader_id" jdbcType="BIGINT"/>
<result property="leader" column="leader" jdbcType="VARCHAR"/>
<result property="standardId" column="standard_id" jdbcType="BIGINT"/> <result property="standardId" column="standard_id" jdbcType="BIGINT"/>
<result property="name" column="name" jdbcType="VARCHAR"/> <result property="name" column="name" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="VARCHAR"/> <result property="standardNo" column="standard_no" jdbcType="VARCHAR"/>
...@@ -24,13 +26,13 @@ ...@@ -24,13 +26,13 @@
</resultMap> </resultMap>
<select id="findListByStatus" resultMap="BaseResultMap"> <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, create_time, standard_id, name, standard_no, file, submit_by_id, submit_by_name SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time,leader,leader_id, standard_id, name, standard_no, file, submit_by_id, submit_by_name
FROM t_system_review_task WHERE task_status = #{status} FROM t_system_review_task WHERE task_status = #{status}
ORDER BY create_time DESC ORDER BY create_time DESC
</select> </select>
<select id="findListInProcess" resultMap="BaseResultMap"> <select id="findListInProcess" resultMap="BaseResultMap">
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time, standard_id, name, standard_no, file, submit_by_id, submit_by_name SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time,leader,leader_id, standard_id, name, standard_no, file, submit_by_id, submit_by_name
FROM t_system_review_task WHERE task_status IN ('NEW','PENDING') FROM t_system_review_task WHERE task_status IN ('NEW','PENDING')
ORDER BY create_time DESC ORDER BY create_time DESC
</select> </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.TaskMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.Task">
<id property="id" column="id" jdbcType="BIGINT"/>
<id property="systemReviewTaskId" column="system_review_task_id" jdbcType="BIGINT"/>
<id property="carReviewTaskId" column="car_review_task_id" jdbcType="BIGINT"/>
<result property="taskNo" column="task_no" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="productName" column="product_name" jdbcType="VARCHAR"/>
<result property="productModel" column="product_model" jdbcType="VARCHAR"/>
<result property="entrustedUnit" column="entrusted_unit" jdbcType="VARCHAR"/>
<result property="entrustedUnitAddress" column="entrusted_unit_address" jdbcType="VARCHAR"/>
<result property="entrustedUnitPhone" column="entrusted_unit_phone" jdbcType="VARCHAR"/>
<result property="entrustedUnitCode" column="entrusted_unit_code" jdbcType="VARCHAR"/>
<result property="carType" column="car_type" jdbcType="VARCHAR"/>
<result property="carIdentificationCode" column="car_identification_code" jdbcType="VARCHAR"/>
<result property="confidentialityLevel" column="confidentiality_level" jdbcType="VARCHAR"/>
<result property="sampleName" column="sample_name" jdbcType="VARCHAR"/>
<result property="productionEnterprise" column="production_enterprise" jdbcType="VARCHAR"/>
<result property="sampleSender" column="sample_sender" jdbcType="VARCHAR"/>
<result property="sendDate" column="send_date" jdbcType="TIMESTAMP"/>
<result property="sampleNumber" column="sample_number" jdbcType="VARCHAR"/>
<result property="productionDate" column="production_date" jdbcType="TIMESTAMP"/>
<result property="trademark" column="trademark" jdbcType="VARCHAR"/>
<result property="inspectionBasis" column="inspection_basis" jdbcType="VARCHAR"/>
<result property="taskInitiator" column="task_initiator" jdbcType="VARCHAR"/>
<result property="taskInitiatorDept" column="task_initiator_dept" jdbcType="VARCHAR"/>
<result property="taskBeginTime" column="task_begin_time" jdbcType="TIMESTAMP"/>
<result property="taskEndTime" column="task_end_time" jdbcType="TIMESTAMP"/>
<result property="leaderId" column="leader_id" jdbcType="BIGINT"/>
<result property="leader" column="leader" 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="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap">
SELECT id, system_review_task_id, car_review_task_id,
task_no,task_name,task_status,product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,car_type,car_identification_code,
confidentiality_level,sample_name,production_enterprise,
sample_sender,send_date,sample_number,production_date,
trademark,inspection_basis,task_initiator,task_initiator_dept,
task_begin_time,task_end_time,create_time,
leader_id,leader,standard_id,name,
standard_no,file
FROM t_task
<where>
<if test="taskBeginTime != null and taskBeginTime != ''">
task_begin_time = #{taskBeginTime}
</if>
<if test="taskStatus != null and taskStatus != ''">
task_status = #{taskStatus}
</if>
</where>
order by create_time desc
</select>
</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