Commit baf324b3 authored by wdy's avatar wdy

根据任务id分页查询车企留档文件

parent 00e13906
......@@ -3,6 +3,7 @@ package com.ruoyi.mapper;
import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindByTaskIdRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -29,6 +30,8 @@ public interface ReviewEnterpriseArchiveMapper extends BaseMapper<ReviewEnterpri
ReviewEnterpriseArchive findByFileName(@Param("fileName") String fileName);
List<ReviewEnterpriseArchive> findList(@Param("taskId") Long taskId);
List<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(ReviewEnterpriseArchiveFindByTaskIdRequest request);
}
......
......@@ -3,6 +3,7 @@ package com.ruoyi.service;
import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindByTaskIdRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindFileNameListRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveGetInfoRequest;
......@@ -36,4 +37,6 @@ public interface ReviewEnterpriseArchiveService extends IService<ReviewEnterpris
ReviewEnterpriseArchive getInfo(ReviewEnterpriseArchiveGetInfoRequest request);
List<ReviewEnterpriseArchive> findList(ReviewEnterpriseArchiveFindFileNameListRequest request);
List<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(ReviewEnterpriseArchiveFindByTaskIdRequest request);
}
......@@ -12,6 +12,7 @@ import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import com.ruoyi.service.ReviewEnterpriseArchiveService;
import com.ruoyi.mapper.ReviewEnterpriseArchiveMapper;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindByTaskIdRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindFileNameListRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveGetInfoRequest;
......@@ -88,6 +89,11 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
return reviewEnterpriseArchiveMapper.findList(request.getTaskId());
}
@Override
public List<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(ReviewEnterpriseArchiveFindByTaskIdRequest request) {
return reviewEnterpriseArchiveMapper.findEnterpriseArchiveByTaskId(request);
}
private List<ReviewEnterpriseArchiveViewVO> buildReviewEnterpriseArchiveViewVO(List<ReviewEnterpriseArchive> archives, List<ReviewEnterpriseArchiveViewItemVO> viewItems) {
List<ReviewEnterpriseArchiveViewVO> viewList = new ArrayList();
......
......@@ -40,6 +40,15 @@ public class ReviewEnterpriseArchiveController extends BaseController {
return getDataTable(reviewEnterpriseArchiveService.findEnterpriseArchive(request));
}
@ApiOperation("根据任务id分页查询车企文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findEnterpriseArchiveByTaskId")
public TableDataInfo<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(@Validated @RequestBody ReviewEnterpriseArchiveFindByTaskIdRequest request) {
startPage(request);
return getDataTable(reviewEnterpriseArchiveService.findEnterpriseArchiveByTaskId(request));
}
@ApiOperation("根据id查询")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
......
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 = "ReviewEnterpriseArchiveFindByTaskIdRequest", description = "根据任务id查询车企文件")
@Data
public class ReviewEnterpriseArchiveFindByTaskIdRequest extends PageDomain {
@ApiModelProperty("文件名称")
private String fileName;
@ApiModelProperty("文件状态")
private String status;
@ApiModelProperty("文件识别号")
private String identifyNumber;
@ApiModelProperty("任务id")
private Long taskId;
}
......@@ -65,4 +65,20 @@
FROM t_review_enterprise_archive
where task_id = #{taskId}
</select>
<select id="findEnterpriseArchiveByTaskId" resultType="com.ruoyi.domain.ReviewEnterpriseArchive">
SELECT id, enterprise_name, file_name, version, publish_date, status, identify_number, storage, photo, task_id, create_by, create_time
FROM t_review_enterprise_archive
<where>
task_id = #{taskId}
<if test="fileName != null and fileName != ''">
and file_name like concat('%',#{fileName},'%')
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
<if test="identifyNumber != null and identifyNumber != ''">
and identify_number = #{identifyNumber}
</if>
</where>
</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