Commit 7f8a2ca6 authored by 王飞's avatar 王飞

1、开发企业留档文件模块。

parent ae8babf8
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 java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 车企留档文件
* @TableName t_review_enterprise_archive
*/
@TableName(value ="t_review_enterprise_archive")
@Data
public class ReviewEnterpriseArchive implements Serializable {
@ApiModelProperty("主键")
@TableId(type = IdType.ASSIGN_ID)
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
/**
* 企业名称
*/
private String enterpriceName;
/**
* 文件名称
*/
private String fileName;
/**
* 文件版本
*/
private String version;
/**
* 发布日期
*/
private Date publishDate;
/**
* 文件状态
*/
private String status;
/**
* 文件识别号
*/
private String identifyNumber;
/**
* 存储位置
*/
private String storage;
/**
* 图片地址
*/
private String photo;
/**
* 关联到任务id
*/
private Long taskId;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.ruoyi.domain.vo;
import lombok.Data;
@Data
public class ReviewEnterpriseArchiveViewItemVO {
// 文件目录
private String catalogue;
// 标准章节
private String chapter;
// 标准要求
private String standard;
// 要点要求
private String keyPoint;
}
package com.ruoyi.domain.vo;
import lombok.Data;
import java.util.List;
@Data
public class ReviewEnterpriseArchiveViewVO {
// 文件名称
private String fileName;
// 条目
private List<ReviewEnterpriseArchiveViewItemVO> items;
}
package com.ruoyi.mapper;
import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author wangfei
* @description 针对表【t_review_enterprise_archive(车企留档文件)】的数据库操作Mapper
* @createDate 2024-02-22 15:32:57
* @Entity com.ruoyi.domain.ReviewEnterpriseArchive
*/
@Repository
public interface ReviewEnterpriseArchiveMapper extends BaseMapper<ReviewEnterpriseArchive> {
List<ReviewEnterpriseArchive> findByTaskId(@Param("taskId") Long taskId);
}
package com.ruoyi.service;
import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import java.util.List;
/**
* @author wangfei
* @description 针对表【t_review_enterprise_archive(车企留档文件)】的数据库操作Service
* @createDate 2024-02-22 15:32:57
*/
public interface ReviewEnterpriseArchiveService extends IService<ReviewEnterpriseArchive> {
List<ReviewEnterpriseArchiveViewVO> view(Long taskId);
}
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import com.ruoyi.service.ReviewEnterpriseArchiveService;
import com.ruoyi.mapper.ReviewEnterpriseArchiveMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author wangfei
* @description 针对表【t_review_enterprise_archive(车企留档文件)】的数据库操作Service实现
* @createDate 2024-02-22 15:32:57
*/
@Service
public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterpriseArchiveMapper, ReviewEnterpriseArchive>
implements ReviewEnterpriseArchiveService{
@Autowired
private ReviewEnterpriseArchiveMapper reviewEnterpriseArchiveMapper;
@Override
public List<ReviewEnterpriseArchiveViewVO> view(Long taskId) {
List<ReviewEnterpriseArchive> archives = reviewEnterpriseArchiveMapper.findByTaskId(taskId);
return null;
}
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@ApiModel(value = "ReviewEnterpriseArchiveViewResponse", description = "预览企业留档文件")
@Data
public class ReviewEnterpriseArchiveViewResponse {
}
<?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.ReviewEnterpriseArchiveMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.ReviewEnterpriseArchive">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="enterpriceName" column="enterprice_name" jdbcType="VARCHAR"/>
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
<result property="version" column="version" jdbcType="VARCHAR"/>
<result property="publishDate" column="publish_date" jdbcType="DATE"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="identifyNumber" column="identify_number" jdbcType="VARCHAR"/>
<result property="storage" column="storage" jdbcType="VARCHAR"/>
<result property="photo" column="photo" jdbcType="VARCHAR"/>
<result property="taskId" column="task_id" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
id,enterprice_name,file_name,
version,publish_date,status,
identify_number,storage,photo,
task_id
</sql>
<select id="findByTaskId" resultType="com.ruoyi.domain.ReviewEnterpriseArchive">
SELECT id, enterpriceName, fileName, version, publishDate, status, identifyNumber, storage, photo, taskId FROM t_review_enterprise_archive WHERE task_id = #{taskId}
</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