Compare commits
No commits in common. "14f55ccea6343d95dde6750e5cedb7cbc4d5142d" and "421b3e386eede1843b4eaf9ac9d3314914b53128" have entirely different histories.
14f55ccea6
...
421b3e386e
|
|
@ -1,64 +0,0 @@
|
|||
package org.qinan.safetyeval.adapter.web;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.qinan.safetyeval.client.api.QualFilingReviewApi;
|
||||
import org.qinan.safetyeval.client.co.QualFilingReviewCO;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewAddCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewModifyCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewPageQuery;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 资质审核记录适配层(Controller)
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Api(tags = "资质审核记录管理")
|
||||
@RestController
|
||||
@RequestMapping("/qual-filing-review")
|
||||
public class QualFilingReviewController {
|
||||
|
||||
@Resource
|
||||
private QualFilingReviewApi qualFilingReviewApi;
|
||||
|
||||
@ApiOperation("新增资质审核记录")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<QualFilingReviewCO> add(@Validated @RequestBody QualFilingReviewAddCmd cmd) {
|
||||
return qualFilingReviewApi.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("查询资质审核记录详情")
|
||||
@GetMapping("/get")
|
||||
public SingleResponse<QualFilingReviewCO> get(@RequestParam Long id) {
|
||||
return qualFilingReviewApi.get(id);
|
||||
}
|
||||
|
||||
@ApiOperation("修改资质审核记录")
|
||||
@PostMapping("/modify")
|
||||
public SingleResponse<QualFilingReviewCO> modify(@Validated @RequestBody QualFilingReviewModifyCmd cmd) {
|
||||
return qualFilingReviewApi.modify(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("删除资质审核记录")
|
||||
@PostMapping("/delete")
|
||||
public SingleResponse<Void> delete(@RequestParam Long id) {
|
||||
return qualFilingReviewApi.delete(id);
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询资质审核记录")
|
||||
@GetMapping("/page")
|
||||
public PageResponse<QualFilingReviewCO> page(@Validated QualFilingReviewPageQuery query) {
|
||||
return qualFilingReviewApi.page(query);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
package org.qinan.safetyeval.app.executor;
|
||||
|
||||
import org.qinan.safetyeval.client.api.QualFilingReviewApi;
|
||||
import org.qinan.safetyeval.client.co.QualFilingReviewCO;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewAddCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewModifyCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewPageQuery;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingReviewEntity;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingReviewQuery;
|
||||
import org.qinan.safetyeval.domain.service.QualFilingReviewDomainService;
|
||||
import org.qinan.safetyeval.infrastructure.adapter.auth.AuthUserContextAdapter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 资质审核记录执行器(App层)
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Service
|
||||
public class QualFilingReviewExecutor implements QualFilingReviewApi {
|
||||
|
||||
@Lazy
|
||||
@Autowired(required = false)
|
||||
private QualFilingReviewDomainService qualFilingReviewDomainService;
|
||||
|
||||
@Override
|
||||
public SingleResponse<QualFilingReviewCO> add(QualFilingReviewAddCmd cmd) {
|
||||
QualFilingReviewEntity entity = new QualFilingReviewEntity();
|
||||
entity.setFilingId(cmd.getFilingId());
|
||||
entity.setReviewResult(cmd.getReviewResult());
|
||||
entity.setReviewResultRemark(cmd.getReviewResultRemark());
|
||||
entity.setFilingExpertId(cmd.getFilingExpertId());
|
||||
entity.setFilingExpertName(cmd.getFilingExpertName());
|
||||
entity.setReviewOpinion(cmd.getReviewOpinion());
|
||||
|
||||
QualFilingReviewEntity result = qualFilingReviewDomainService.add(entity);
|
||||
return SingleResponse.success(toCO(result));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<QualFilingReviewCO> get(Long id) {
|
||||
QualFilingReviewEntity entity = qualFilingReviewDomainService.get(id);
|
||||
return SingleResponse.success(toCO(entity));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<QualFilingReviewCO> modify(QualFilingReviewModifyCmd cmd) {
|
||||
QualFilingReviewEntity entity = new QualFilingReviewEntity();
|
||||
entity.setId(cmd.getId());
|
||||
entity.setFilingId(cmd.getFilingId());
|
||||
entity.setReviewResult(cmd.getReviewResult());
|
||||
entity.setReviewResultRemark(cmd.getReviewResultRemark());
|
||||
entity.setFilingExpertId(cmd.getFilingExpertId());
|
||||
entity.setFilingExpertName(cmd.getFilingExpertName());
|
||||
entity.setReviewOpinion(cmd.getReviewOpinion());
|
||||
|
||||
QualFilingReviewEntity result = qualFilingReviewDomainService.modify(entity);
|
||||
return SingleResponse.success(toCO(result));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<Void> delete(Long id) {
|
||||
qualFilingReviewDomainService.delete(id);
|
||||
return SingleResponse.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<QualFilingReviewCO> page(QualFilingReviewPageQuery query) {
|
||||
QualFilingReviewQuery domainQuery = new QualFilingReviewQuery();
|
||||
domainQuery.setPageNum(query.getCurrent());
|
||||
domainQuery.setPageSize(query.getSize());
|
||||
domainQuery.setTenantId(AuthUserContextAdapter.getCurrentTenantId());
|
||||
domainQuery.setFilingId(query.getFilingId());
|
||||
domainQuery.setReviewResult(query.getReviewResult());
|
||||
domainQuery.setFilingExpertId(query.getFilingExpertId());
|
||||
|
||||
PageResult<QualFilingReviewEntity> pageResult = qualFilingReviewDomainService.page(domainQuery);
|
||||
|
||||
return PageResponse.of(
|
||||
pageResult.getRecords().stream()
|
||||
.map(this::toCO)
|
||||
.collect(java.util.stream.Collectors.toList()),
|
||||
pageResult.getTotal());
|
||||
}
|
||||
|
||||
private QualFilingReviewCO toCO(QualFilingReviewEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
QualFilingReviewCO co = new QualFilingReviewCO();
|
||||
co.setId(entity.getId());
|
||||
co.setFilingId(entity.getFilingId());
|
||||
co.setReviewResult(entity.getReviewResult());
|
||||
co.setReviewResultRemark(entity.getReviewResultRemark());
|
||||
co.setFilingExpertId(entity.getFilingExpertId());
|
||||
co.setFilingExpertName(entity.getFilingExpertName());
|
||||
co.setReviewOpinion(entity.getReviewOpinion());
|
||||
co.setTenantId(entity.getTenantId());
|
||||
return co;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
package org.qinan.safetyeval.client.api;
|
||||
|
||||
import org.qinan.safetyeval.client.co.QualFilingReviewCO;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewAddCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewModifyCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingReviewPageQuery;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
|
||||
/**
|
||||
* 资质审核记录接口定义(Client层)
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
public interface QualFilingReviewApi {
|
||||
|
||||
SingleResponse<QualFilingReviewCO> add(QualFilingReviewAddCmd cmd);
|
||||
|
||||
SingleResponse<QualFilingReviewCO> get(Long id);
|
||||
|
||||
SingleResponse<QualFilingReviewCO> modify(QualFilingReviewModifyCmd cmd);
|
||||
|
||||
SingleResponse<Void> delete(Long id);
|
||||
|
||||
PageResponse<QualFilingReviewCO> page(QualFilingReviewPageQuery query);
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
package org.qinan.safetyeval.client.co;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资质审核记录CO(Client Object)
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Data
|
||||
public class QualFilingReviewCO {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "机构id")
|
||||
private Long filingId;
|
||||
|
||||
@ApiModelProperty(value = "审核结果 1通过 2待定 3不通过")
|
||||
private String reviewResult;
|
||||
|
||||
@ApiModelProperty(value = "审核结果文字描述")
|
||||
private String reviewResultRemark;
|
||||
|
||||
@ApiModelProperty(value = "专家id")
|
||||
private Long filingExpertId;
|
||||
|
||||
@ApiModelProperty(value = "专家名称")
|
||||
private String filingExpertName;
|
||||
|
||||
@ApiModelProperty(value = "综合审核意见")
|
||||
private String reviewOpinion;
|
||||
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private Long tenantId;
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package org.qinan.safetyeval.client.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资质审核记录新增命令
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Data
|
||||
public class QualFilingReviewAddCmd {
|
||||
|
||||
/** 机构id */
|
||||
private Long filingId;
|
||||
|
||||
/** 审核结果 1通过 2待定 3不通过 */
|
||||
private String reviewResult;
|
||||
|
||||
/** 审核结果文字描述 */
|
||||
private String reviewResultRemark;
|
||||
|
||||
/** 专家id */
|
||||
private Long filingExpertId;
|
||||
|
||||
/** 专家名称 */
|
||||
private String filingExpertName;
|
||||
|
||||
/** 综合审核意见 */
|
||||
private String reviewOpinion;
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
package org.qinan.safetyeval.client.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资质审核记录修改命令
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Data
|
||||
public class QualFilingReviewModifyCmd {
|
||||
|
||||
/** 主键(必填) */
|
||||
private Long id;
|
||||
|
||||
/** 机构id */
|
||||
private Long filingId;
|
||||
|
||||
/** 审核结果 1通过 2待定 3不通过 */
|
||||
private String reviewResult;
|
||||
|
||||
/** 审核结果文字描述 */
|
||||
private String reviewResultRemark;
|
||||
|
||||
/** 专家id */
|
||||
private Long filingExpertId;
|
||||
|
||||
/** 专家名称 */
|
||||
private String filingExpertName;
|
||||
|
||||
/** 综合审核意见 */
|
||||
private String reviewOpinion;
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
package org.qinan.safetyeval.client.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 资质审核记录分页查询参数
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class QualFilingReviewPageQuery extends BasePageQuery {
|
||||
|
||||
/** 机构id */
|
||||
private Long filingId;
|
||||
|
||||
/** 审核结果 1通过 2待定 3不通过 */
|
||||
private String reviewResult;
|
||||
|
||||
/** 专家id */
|
||||
private Long filingExpertId;
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package org.qinan.safetyeval.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资质审核记录领域实体
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Data
|
||||
public class QualFilingReviewEntity {
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 机构id */
|
||||
private Long filingId;
|
||||
|
||||
/** 审核结果 1通过 2待定 3不通过 */
|
||||
private String reviewResult;
|
||||
|
||||
/** 审核结果文字描述 */
|
||||
private String reviewResultRemark;
|
||||
|
||||
/** 专家id */
|
||||
private Long filingExpertId;
|
||||
|
||||
/** 专家名称 */
|
||||
private String filingExpertName;
|
||||
|
||||
/** 综合审核意见 */
|
||||
private String reviewOpinion;
|
||||
|
||||
/** 租户ID */
|
||||
private Long tenantId;
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
package org.qinan.safetyeval.domain.gateway;
|
||||
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingReviewEntity;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingReviewQuery;
|
||||
|
||||
/**
|
||||
* 资质审核记录Gateway接口(Domain层定义)
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
public interface QualFilingReviewGateway {
|
||||
|
||||
QualFilingReviewEntity save(QualFilingReviewEntity entity);
|
||||
|
||||
QualFilingReviewEntity get(Long id);
|
||||
|
||||
QualFilingReviewEntity modify(QualFilingReviewEntity entity);
|
||||
|
||||
void delete(Long id);
|
||||
|
||||
PageResult<QualFilingReviewEntity> page(QualFilingReviewQuery query);
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package org.qinan.safetyeval.domain.query;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资质审核记录领域查询对象
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Data
|
||||
public class QualFilingReviewQuery {
|
||||
|
||||
/** 当前页 */
|
||||
private Long pageNum;
|
||||
|
||||
/** 每页条数 */
|
||||
private Long pageSize;
|
||||
|
||||
/** 租户ID */
|
||||
private Long tenantId;
|
||||
|
||||
/** 机构id */
|
||||
private Long filingId;
|
||||
|
||||
/** 审核结果 1通过 2待定 3不通过 */
|
||||
private String reviewResult;
|
||||
|
||||
/** 专家id */
|
||||
private Long filingExpertId;
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
package org.qinan.safetyeval.domain.service;
|
||||
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingReviewEntity;
|
||||
import org.qinan.safetyeval.domain.gateway.QualFilingReviewGateway;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingReviewQuery;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 资质审核记录领域服务
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Service
|
||||
public class QualFilingReviewDomainService {
|
||||
|
||||
@Resource
|
||||
private QualFilingReviewGateway qualFilingReviewGateway;
|
||||
|
||||
public QualFilingReviewEntity add(QualFilingReviewEntity entity) {
|
||||
return qualFilingReviewGateway.save(entity);
|
||||
}
|
||||
|
||||
public QualFilingReviewEntity get(Long id) {
|
||||
return qualFilingReviewGateway.get(id);
|
||||
}
|
||||
|
||||
public QualFilingReviewEntity modify(QualFilingReviewEntity entity) {
|
||||
return qualFilingReviewGateway.modify(entity);
|
||||
}
|
||||
|
||||
public void delete(Long id) {
|
||||
qualFilingReviewGateway.delete(id);
|
||||
}
|
||||
|
||||
public PageResult<QualFilingReviewEntity> page(QualFilingReviewQuery query) {
|
||||
return qualFilingReviewGateway.page(query);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
package org.qinan.safetyeval.infrastructure.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 资质审核记录数据对象
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Data
|
||||
@TableName("qual_filing_review")
|
||||
public class QualFilingReviewDO {
|
||||
|
||||
private Long id;
|
||||
private Long filingId;
|
||||
private String reviewResult;
|
||||
private String reviewResultRemark;
|
||||
private Long filingExpertId;
|
||||
private String filingExpertName;
|
||||
private String reviewOpinion;
|
||||
|
||||
// ---- GBS默认字段 ----
|
||||
private String deleteEnum;
|
||||
private String remarks;
|
||||
private String createName;
|
||||
private String updateName;
|
||||
private Long tenantId;
|
||||
private Integer version;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
private Long createId;
|
||||
private Long updateId;
|
||||
private String env;
|
||||
}
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
package org.qinan.safetyeval.infrastructure.gatewayimpl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingReviewEntity;
|
||||
import org.qinan.safetyeval.domain.gateway.QualFilingReviewGateway;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingReviewQuery;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.QualFilingReviewDO;
|
||||
import org.qinan.safetyeval.infrastructure.mapper.QualFilingReviewMapper;
|
||||
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 资质审核记录Gateway实现(Infrastructure层)
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Component
|
||||
public class QualFilingReviewGatewayImpl implements QualFilingReviewGateway {
|
||||
|
||||
@Resource
|
||||
private QualFilingReviewMapper qualFilingReviewMapper;
|
||||
|
||||
@Override
|
||||
public QualFilingReviewEntity save(QualFilingReviewEntity entity) {
|
||||
QualFilingReviewDO dataObject = toDO(entity);
|
||||
InsertFieldDefaults.applyIgnoreOrgId(dataObject);
|
||||
qualFilingReviewMapper.insert(dataObject);
|
||||
entity.setId(dataObject.getId());
|
||||
entity.setTenantId(dataObject.getTenantId());
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public QualFilingReviewEntity get(Long id) {
|
||||
QualFilingReviewDO dataObject = qualFilingReviewMapper.selectById(id);
|
||||
return toEntity(dataObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QualFilingReviewEntity modify(QualFilingReviewEntity entity) {
|
||||
QualFilingReviewDO dataObject = toDO(entity);
|
||||
dataObject.setId(entity.getId());
|
||||
InsertFieldDefaults.applyForUpdate(dataObject);
|
||||
qualFilingReviewMapper.updateById(dataObject);
|
||||
return get(entity.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
qualFilingReviewMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<QualFilingReviewEntity> page(QualFilingReviewQuery query) {
|
||||
LambdaQueryWrapper<QualFilingReviewDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(QualFilingReviewDO::getDeleteEnum, "false");
|
||||
if (query.getFilingId() != null) {
|
||||
wrapper.eq(QualFilingReviewDO::getFilingId, query.getFilingId());
|
||||
}
|
||||
if (StringUtils.hasText(query.getReviewResult())) {
|
||||
wrapper.eq(QualFilingReviewDO::getReviewResult, query.getReviewResult());
|
||||
}
|
||||
if (query.getFilingExpertId() != null) {
|
||||
wrapper.eq(QualFilingReviewDO::getFilingExpertId, query.getFilingExpertId());
|
||||
}
|
||||
|
||||
Page<QualFilingReviewDO> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
IPage<QualFilingReviewDO> result = qualFilingReviewMapper.selectPage(page, wrapper);
|
||||
|
||||
List<QualFilingReviewEntity> entities = result.getRecords().stream()
|
||||
.map(this::toEntity)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return PageResult.of(entities, result.getTotal(), result.getCurrent(), result.getSize());
|
||||
}
|
||||
|
||||
private QualFilingReviewDO toDO(QualFilingReviewEntity entity) {
|
||||
QualFilingReviewDO dataObject = new QualFilingReviewDO();
|
||||
dataObject.setFilingId(entity.getFilingId());
|
||||
dataObject.setReviewResult(entity.getReviewResult());
|
||||
dataObject.setReviewResultRemark(entity.getReviewResultRemark());
|
||||
dataObject.setFilingExpertId(entity.getFilingExpertId());
|
||||
dataObject.setFilingExpertName(entity.getFilingExpertName());
|
||||
dataObject.setReviewOpinion(entity.getReviewOpinion());
|
||||
dataObject.setTenantId(entity.getTenantId());
|
||||
return dataObject;
|
||||
}
|
||||
|
||||
private QualFilingReviewEntity toEntity(QualFilingReviewDO dataObject) {
|
||||
if (dataObject == null) {
|
||||
return null;
|
||||
}
|
||||
QualFilingReviewEntity entity = new QualFilingReviewEntity();
|
||||
entity.setId(dataObject.getId());
|
||||
entity.setFilingId(dataObject.getFilingId());
|
||||
entity.setReviewResult(dataObject.getReviewResult());
|
||||
entity.setReviewResultRemark(dataObject.getReviewResultRemark());
|
||||
entity.setFilingExpertId(dataObject.getFilingExpertId());
|
||||
entity.setFilingExpertName(dataObject.getFilingExpertName());
|
||||
entity.setReviewOpinion(dataObject.getReviewOpinion());
|
||||
entity.setTenantId(dataObject.getTenantId());
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
package org.qinan.safetyeval.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.QualFilingReviewDO;
|
||||
|
||||
@Mapper
|
||||
public interface QualFilingReviewMapper extends BaseMapper<QualFilingReviewDO> {
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<?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="org.qinan.safetyeval.infrastructure.mapper.QualFilingReviewMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="org.qinan.safetyeval.infrastructure.dataobject.QualFilingReviewDO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="filing_id" property="filingId"/>
|
||||
<result column="review_result" property="reviewResult"/>
|
||||
<result column="review_result_remark" property="reviewResultRemark"/>
|
||||
<result column="filing_expert_id" property="filingExpertId"/>
|
||||
<result column="filing_expert_name" property="filingExpertName"/>
|
||||
<result column="review_opinion" property="reviewOpinion"/>
|
||||
<result column="delete_enum" property="deleteEnum"/>
|
||||
<result column="remarks" property="remarks"/>
|
||||
<result column="create_name" property="createName"/>
|
||||
<result column="update_name" property="updateName"/>
|
||||
<result column="tenant_id" property="tenantId"/>
|
||||
<result column="version" property="version"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="create_id" property="createId"/>
|
||||
<result column="update_id" property="updateId"/>
|
||||
<result column="env" property="env"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
`id`, `filing_id`, `review_result`, `review_result_remark`, `filing_expert_id`, `filing_expert_name`, `review_opinion`, `delete_enum`, `remarks`, `create_name`, `update_name`, `tenant_id`, `version`, `create_time`, `update_time`, `create_id`, `update_id`, `env`
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue