获取企业列表接口
parent
82ceeed10d
commit
db6e68d7d2
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.basic.info.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
|
|
@ -54,6 +55,11 @@ public class CorpInfoController {
|
|||
public PageResponse<CorpInfoCO> page(@Validated @RequestBody CorpInfoPageQry qry) {
|
||||
return corpInfoService.listPage(qry);
|
||||
}
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<CorpInfoCO> listAll(CorpInfoQry corpInfoQry) {
|
||||
return corpInfoService.listAll(corpInfoQry);
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@PostMapping("/info/{id}")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.basic.info.command.query;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
|
@ -17,10 +18,8 @@ import com.zcloud.basic.info.dto.*;
|
|||
import com.zcloud.basic.info.dto.clientobject.CorpDepartmentCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpInfoCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpUserMiddleCO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpFormDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpInfoDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.DepartmentDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.UserQualificationInfoDO;
|
||||
import com.zcloud.basic.info.dto.clientobject.UserCO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.*;
|
||||
import com.zcloud.basic.info.persistence.repository.*;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -87,7 +86,12 @@ public class CorpInfoQueryExe {
|
|||
});
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
|
||||
public MultiResponse<CorpInfoCO> executeListAll(CorpInfoQry corpInfoQry) {
|
||||
Map<String, Object> params = PageQueryHelper.toHashMap(corpInfoQry);
|
||||
List<CorpInfoDO> corpInfoDOList = corpInfoRepository.listAll(params);
|
||||
List<CorpInfoCO> corpInfoCOList = corpInfoCoConvertor.converDOsToCOs(corpInfoDOList);
|
||||
return MultiResponse.of(corpInfoCOList);
|
||||
}
|
||||
public CorpInfoCO info(Long id) {
|
||||
CorpInfoDO corpInfoDO = corpInfoRepository.getById(id);
|
||||
if (corpInfoDO == null){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.basic.info.service;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
|
|
@ -9,10 +10,7 @@ import com.zcloud.basic.info.command.*;
|
|||
import com.zcloud.basic.info.command.query.CorpInfoQueryExe;
|
||||
import com.zcloud.basic.info.domain.enums.CorpTypeEnum;
|
||||
import com.zcloud.basic.info.dto.*;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpDepartmentCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpInfoCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpInfoEncryCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpUserMiddleCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.*;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -45,6 +43,11 @@ public class CorpInfoServiceImpl implements CorpInfoServiceI {
|
|||
return corpInfoQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiResponse<CorpInfoCO> listAll(CorpInfoQry corpInfoQry) {
|
||||
return corpInfoQueryExe.executeListAll(corpInfoQry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse add(CorpInfoAddCmd cmd) {
|
||||
corpInfoAddExe.execute(cmd);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
package com.zcloud.basic.info.api;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.security.starter.api.co.DecryptCmd;
|
||||
import com.zcloud.basic.info.dto.*;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpDepartmentCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpInfoCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpInfoEncryCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpUserMiddleCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
|
@ -21,6 +19,7 @@ import java.util.List;
|
|||
public interface CorpInfoServiceI {
|
||||
PageResponse<CorpInfoCO> listPage(CorpInfoPageQry qry);
|
||||
|
||||
MultiResponse<CorpInfoCO> listAll(CorpInfoQry corpInfoQry);
|
||||
SingleResponse<CorpInfoCO> add(CorpInfoAddCmd cmd);
|
||||
|
||||
Boolean checkCorpCode(CorpInfoCheckCodeQry qry);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,129 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2025-10-30 15:12:50
|
||||
*/
|
||||
@Data
|
||||
public class CorpInfoQry {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "开户开始时间", name = "geCreateTime", required = true)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate geCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "开户结束时间", name = "leCreateTime", required = true)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate leCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "成立开始时间", name = "geCreateDate", required = true)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate geCreateDate;
|
||||
|
||||
@ApiModelProperty(value = "成立结束时间", name = "leCreateDate", required = true)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate leCreateDate;
|
||||
|
||||
@ApiModelProperty(value = "企业类型,0-普通企业,1-集团单位,2-股份单位,3-相关方企业,4-货主单位,5-驻港单位", name = "eqType")
|
||||
private Integer eqType;
|
||||
@ApiModelProperty(value = "企业类型集合,0-普通企业,1-集团单位,2-股份单位,3-相关方企业,4-货主单位,5-驻港单位", name = "inType")
|
||||
private List<Integer> inType;
|
||||
|
||||
@ApiModelProperty(value = "启用状态", name = "eqUseFlag")
|
||||
private Integer eqUseFlag;
|
||||
|
||||
// @ApiModelProperty(value = "企业id", name = "eqCorpinfoId")
|
||||
// private Long eqCorpinfoId;
|
||||
@ApiModelProperty(value = "企业名称", name = "likecorpName")
|
||||
private String likecorpName;
|
||||
/**、
|
||||
* 区分监管、企业、相关方
|
||||
* 2025-11-05 罗刚提出将相关方中的普通相关方企业、驻港单位、货主单位合并成同一个列表
|
||||
* 1:监管 2:企业 3:相关方
|
||||
*/
|
||||
@ApiModelProperty(value = "企业类型1:监管 2:企业 3:相关方", name = "enterpriseType", required = true)
|
||||
private Integer enterpriseType;
|
||||
|
||||
@ApiModelProperty(value = "统一社会信用代码", name = "code", required = true)
|
||||
private String eqCode;
|
||||
|
||||
@ApiModelProperty(value = "规模", name = "scale", required = true)
|
||||
private String eqScale;
|
||||
|
||||
@ApiModelProperty(value = "企业状态", name = "corpState", required = true)
|
||||
private String eqCorpState;
|
||||
|
||||
@ApiModelProperty(value = "资产总额(万元)", name = "totalAssets", required = true)
|
||||
private BigDecimal eqTotalAssets;
|
||||
@ApiModelProperty(value = "注册资金(万元)", name = "regcapital", required = true)
|
||||
private BigDecimal eqRegcapital;
|
||||
@ApiModelProperty(value = "企事业单位经营地址", name = "addressBusiness", required = true)
|
||||
private String eqAddressBusiness;
|
||||
@ApiModelProperty(value = "企事业单位办公地址", name = "addressOffice", required = true)
|
||||
private String eqAddressOffice;
|
||||
|
||||
@ApiModelProperty(value = "经济类型", name = "ecoType", required = true)
|
||||
private String eqEcoType;
|
||||
|
||||
@ApiModelProperty(value = "法定代表人", name = "lrName", required = true)
|
||||
private String eqLrName;
|
||||
@ApiModelProperty(value = "法人手机号", name = "lrMobile", required = true)
|
||||
private String eqLrMobile;
|
||||
@ApiModelProperty(value = "主要负责人", name = "contacts", required = true)
|
||||
private String eqContacts;
|
||||
@ApiModelProperty(value = "主要负责人手机号", name = "contactsPhone", required = true)
|
||||
private String eqContactsPhone;
|
||||
|
||||
@ApiModelProperty(value = "行业分类", name = "corpType", required = true)
|
||||
private String eqcorpType;
|
||||
|
||||
@ApiModelProperty(value = "行业分类", name = "corpType2", required = true)
|
||||
private String eqCorpType2;
|
||||
|
||||
@ApiModelProperty(value = "行业分类", name = "corpType3", required = true)
|
||||
private String eqCorpType3;
|
||||
|
||||
@ApiModelProperty(value = "行业分类", name = "corpType4", required = true)
|
||||
private String eqCorpType4;
|
||||
|
||||
@ApiModelProperty(value = "所属省编码", name = "province", required = true)
|
||||
private String eqProvince;
|
||||
|
||||
@ApiModelProperty(value = "所属市级编码", name = "city", required = true)
|
||||
private String eqCity;
|
||||
|
||||
@ApiModelProperty(value = "所属区县编码", name = "country", required = true)
|
||||
private String eqCountry;
|
||||
|
||||
@ApiModelProperty(value = "所属乡镇编码", name = "village", required = true)
|
||||
private String eqVillage;
|
||||
|
||||
@ApiModelProperty(value = "所属街道编码", name = "street", required = true)
|
||||
private String eqStreet;
|
||||
|
||||
private String menuPath;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ import java.util.Map;
|
|||
*/
|
||||
public interface CorpInfoRepository extends BaseRepository<CorpInfoDO> {
|
||||
PageResponse<CorpInfoDO> listPage(Map<String, Object> parmas);
|
||||
List<CorpInfoDO> listAll(Map<String, Object> params);
|
||||
|
||||
Long getCorpCountByCorpName(String corpName);
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,18 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
|
|||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CorpInfoDO> listAll(Map<String, Object> params) {
|
||||
QueryWrapper<CorpInfoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||
List<Integer> enterpriseType = CorpTypeEnum.getCodesByEnterpriseType((Integer) params.get("enterpriseType"));
|
||||
if(CollUtil.isNotEmpty(enterpriseType)){
|
||||
queryWrapper.in("type",enterpriseType );
|
||||
}
|
||||
queryWrapper.orderByAsc("corp_order").orderByDesc("create_time");
|
||||
return corpInfoMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getCorpCountByCorpName(String corpName) {
|
||||
QueryWrapper<CorpInfoDO> queryWrapper = new QueryWrapper<>();
|
||||
|
|
|
|||
|
|
@ -308,7 +308,6 @@ public class UserRepositoryImpl extends BaseRepositoryImpl<UserMapper, UserDO> i
|
|||
if(StringUtils.isEmpty(userDO.getUsername())){
|
||||
userDO.setUsername(userDO.getPhone());
|
||||
}
|
||||
|
||||
//TODO 流动人员同步gbs需要指定特殊tenantId
|
||||
// if(UserFlowFlagEnum.FLOW.getCode().equals(userDO.getFlowFlag())){
|
||||
// FacadeUserRegisterCmd facadeUserRegisterCmd = new FacadeUserRegisterCmd();
|
||||
|
|
|
|||
Loading…
Reference in New Issue