feat(REQ-3282): 添加qualificationsApply
This commit is contained in:
parent
8501568b39
commit
6235280b9d
@ -0,0 +1,15 @@
|
||||
package cn.axzo.orgmanax.infra.dao.qualification.dao;
|
||||
|
||||
import cn.axzo.orgmanax.infra.dao.qualification.entity.QualificationsApply;
|
||||
import cn.axzo.orgmanax.infra.dao.qualification.mapper.QualificationsApplyMapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author : zhanghonghao@axzo.cn
|
||||
* @since : 2024/12/24
|
||||
*/
|
||||
@Repository
|
||||
public class QualificationsApplyDao extends ServiceImpl<QualificationsApplyMapper, QualificationsApply> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,172 @@
|
||||
package cn.axzo.orgmanax.infra.dao.qualification.entity;
|
||||
|
||||
import cn.axzo.trade.datasecurity.core.annotation.CryptField;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 资质申请记录
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2022-06-05 10:59:30
|
||||
*/
|
||||
@TableName(value = "qualifications_apply", autoResultMap = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class QualificationsApply implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -92011957938725711L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 单位/团队注册记录id
|
||||
*/
|
||||
private Long ouRegisterId;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 企业名称(冗余查询用)
|
||||
*/
|
||||
private String ouName;
|
||||
|
||||
/**
|
||||
* 企业主体类型(冗余查询用)
|
||||
*/
|
||||
private Integer mainBodyType;
|
||||
|
||||
/**
|
||||
* 证书名称
|
||||
* 1:建筑业企业资质证书
|
||||
* 2:房地产开发企业资质证书
|
||||
* 3:工程监理资质证书
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 资质认证到期时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 资质文件名称
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
/**
|
||||
* 资质文件url
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 审批状态 0:已撤销 10:审核中,20:审核拒绝,30:审核通过 与单位表的状态枚举一致
|
||||
*/
|
||||
private Integer approvalStatus;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
private String approvalMsg;
|
||||
|
||||
/**
|
||||
* 审批人身份id
|
||||
*/
|
||||
private Long approver;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
* 操作日志: {"type":1,"time":1238988889}
|
||||
* 动作类型: 1:资料完善 2:协议勾选 3:审核中(提交) 4:审核完成(通过/拒绝)
|
||||
*/
|
||||
private String actionLog;
|
||||
|
||||
/**
|
||||
* 提交人姓名
|
||||
*/
|
||||
private String presenterName;
|
||||
|
||||
/**
|
||||
* 提交人手机号
|
||||
*/
|
||||
@CryptField
|
||||
private String presenterPhone;
|
||||
|
||||
/**
|
||||
* 证书编号
|
||||
*/
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* 资质序列/资质分类: 1:施工总承包 2:建设单位 3:监理单位 4:劳务分包 5:专业承包 30:其他
|
||||
* 建筑业企业资质证书--施工总承包、专业承包、劳务分包
|
||||
* 房地产开发企业资质证书--建设单位
|
||||
* 工程监理资质证书--监理单位
|
||||
* 其他 -- 自定义
|
||||
* REQ-1806
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 资质类别(纯手录)
|
||||
* REQ-1806
|
||||
*/
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 资质等级
|
||||
* a. 房地产开发企业资质证书(壹级、贰级、叁级、肆级)、
|
||||
* b. 建筑业企业资质证书(特级、壹级、贰级、叁级、不分)、
|
||||
* c. 工程监理资质证书(甲级、乙级、丙级)
|
||||
* REQ-1806
|
||||
*/
|
||||
private String categoryLevel;
|
||||
|
||||
/**
|
||||
* 证书类型: 1:建筑业企业资质证书 2:房地产开发企业资质证书 3:工程监理资质证书 20:其他
|
||||
*/
|
||||
private Integer qualificationType;
|
||||
|
||||
/**
|
||||
* 工作流实例id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 是否删除 0否,其他是
|
||||
*/
|
||||
private Long isDelete = 0L;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createAt;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateAt;
|
||||
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package cn.axzo.orgmanax.infra.dao.qualification.mapper;
|
||||
|
||||
import cn.axzo.orgmanax.infra.dao.qualification.entity.QualificationsApply;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface QualificationsApplyMapper extends BaseMapper<QualificationsApply> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,141 @@
|
||||
package cn.axzo.orgmanax.infra.dao.qualification.repositrory;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.dao.support.wrapper.Operator;
|
||||
import cn.axzo.foundation.page.IPageReq;
|
||||
import cn.axzo.foundation.page.PageReqV2;
|
||||
import cn.axzo.foundation.page.PageResp;
|
||||
import cn.axzo.orgmanax.infra.dao.qualification.entity.QualificationsApply;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
public interface QualificationsApplyQueryRepository {
|
||||
|
||||
PageResp<QualificationsApplyResp> page(ListReq paramReq);
|
||||
|
||||
default List<QualificationsApplyResp> list(ListReq req) {
|
||||
PageReq pageReq = BeanUtil.toBean(req, PageReq.class);
|
||||
pageReq.setPage(1);
|
||||
pageReq.setPageSize(1000);
|
||||
return page(pageReq).getData();
|
||||
}
|
||||
|
||||
default QualificationsApplyResp one(OneReq req) {
|
||||
return oneOpt(req).orElse(null);
|
||||
}
|
||||
|
||||
default Optional<QualificationsApplyResp> oneOpt(OneReq req) {
|
||||
req.check();
|
||||
PageReq page = BeanUtil.toBean(req, PageReq.class);
|
||||
page.setPage(1);
|
||||
page.setPageSize(1);
|
||||
return page(page).getData().stream().findFirst();
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@SuperBuilder
|
||||
class OneReq {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* id集合
|
||||
*/
|
||||
private Set<Long> ids;
|
||||
|
||||
/**
|
||||
* 单位/团队注册记录id
|
||||
*/
|
||||
private Long ouRegisterId;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 企业名称(冗余查询用)
|
||||
*/
|
||||
private String ouName;
|
||||
|
||||
/**
|
||||
* 企业主体类型(冗余查询用)
|
||||
*/
|
||||
private Integer mainBodyType;
|
||||
|
||||
public void check() {
|
||||
}
|
||||
}
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@SuperBuilder
|
||||
class ListReq extends PageReqV2 {
|
||||
@CriteriaField
|
||||
private Long id;
|
||||
@CriteriaField(field = "id", operator = Operator.IN)
|
||||
private Set<Long> ids;
|
||||
/**
|
||||
* 用于遍历数据
|
||||
*/
|
||||
@CriteriaField(field = "id", operator = Operator.GT)
|
||||
private Long idGt;
|
||||
@CriteriaField(field = "ouId", operator = Operator.IN)
|
||||
private Set<Long> ouIds;
|
||||
@CriteriaField(field = "ouRegisterId", operator = Operator.IN)
|
||||
private Set<Long> ouRegisterIs;
|
||||
@CriteriaField
|
||||
private String number;
|
||||
@CriteriaField
|
||||
private String ouName;
|
||||
@CriteriaField(field = "approvalStatus", operator = Operator.IN)
|
||||
private Set<Integer> approvalStatusList;
|
||||
@CriteriaField
|
||||
private String processInstanceId;
|
||||
@CriteriaField(field = "createAt", operator = Operator.GE)
|
||||
private Date startCreateAt;
|
||||
@CriteriaField(field = "createAt", operator = Operator.LE)
|
||||
private Date endCreateAt;
|
||||
}
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@SuperBuilder
|
||||
class PageReq extends ListReq implements IPageReq {
|
||||
@CriteriaField(ignore = true)
|
||||
Integer page;
|
||||
@CriteriaField(ignore = true)
|
||||
Integer pageSize;
|
||||
@CriteriaField(ignore = true)
|
||||
List<String> sort;
|
||||
}
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@SuperBuilder
|
||||
class QualificationsApplyResp extends QualificationsApply {
|
||||
// 按需扩展字段,占个位。避免报错
|
||||
private String todo;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package cn.axzo.orgmanax.infra.dao.qualification.repositrory.impl;
|
||||
|
||||
import cn.axzo.foundation.dao.support.converter.PageConverter;
|
||||
import cn.axzo.foundation.dao.support.mysql.QueryWrapperHelper;
|
||||
import cn.axzo.foundation.page.PageResp;
|
||||
import cn.axzo.orgmanax.infra.dao.qualification.dao.QualificationsApplyDao;
|
||||
import cn.axzo.orgmanax.infra.dao.qualification.entity.QualificationsApply;
|
||||
import cn.axzo.orgmanax.infra.dao.qualification.repositrory.QualificationsApplyQueryRepository;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : zhanghonghao@axzo.cn
|
||||
* @since : 2024/12/24
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class QualificationsApplyQueryRepositoryImpl implements QualificationsApplyQueryRepository {
|
||||
|
||||
private final QualificationsApplyDao qualificationsApplyDao;
|
||||
|
||||
@Override
|
||||
public PageResp<QualificationsApplyResp> page(ListReq req) {
|
||||
IPage<QualificationsApply> page = PageConverter.toMybatis(req, QualificationsApply.class);
|
||||
QueryWrapper<QualificationsApply> wrapper = QueryWrapperHelper.fromBean(req, QualificationsApply.class);
|
||||
IPage<QualificationsApplyQueryRepository.QualificationsApplyResp> results = qualificationsApplyDao.page(page, wrapper).convert(e -> BeanUtil.toBean(e, QualificationsApplyQueryRepository.QualificationsApplyResp.class));
|
||||
PageResp<QualificationsApplyQueryRepository.QualificationsApplyResp> resp = PageConverter.toResp(results);
|
||||
List<QualificationsApplyQueryRepository.QualificationsApplyResp> records = resp.getData();
|
||||
CollUtil.isEmpty(records);
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user