feat:[REQ-3282] 暂时提交,编写单位相关代码
This commit is contained in:
parent
1b6806f1bf
commit
5b65867e7f
@ -36,6 +36,10 @@
|
|||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.validator</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -1,9 +1,194 @@
|
|||||||
package cn.axzo.orgmanax.api.unit.req;
|
package cn.axzo.orgmanax.api.unit.req;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CreateUnitReq implements Serializable {
|
public class CreateUnitReq implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父单位id
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位logo url地址
|
||||||
|
*/
|
||||||
|
private String logoUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位介绍
|
||||||
|
*/
|
||||||
|
private String introduction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位类型 1:总包单位 2:建设单位 3:监理单位 4:劳务分包 5:专业分包 6.项目外班组 7.安心筑平台
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位性质:0:其他 1:团队 2:企业 3:班组
|
||||||
|
*/
|
||||||
|
private Integer nature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业执照号图片url地址
|
||||||
|
*/
|
||||||
|
private String usccPicUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 认证公函
|
||||||
|
*/
|
||||||
|
private String certificationLetterUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一社会信用码
|
||||||
|
*/
|
||||||
|
private String uniformSocialCreditCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人代表姓名
|
||||||
|
*/
|
||||||
|
private String legalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人手机号
|
||||||
|
*/
|
||||||
|
private String legalPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人代表身份证
|
||||||
|
*/
|
||||||
|
private String legalIdCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班组长身份id
|
||||||
|
*/
|
||||||
|
private Long identityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份类型 1.无身份 2.班组长
|
||||||
|
*/
|
||||||
|
private Integer identityType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位注册地址
|
||||||
|
*/
|
||||||
|
private String registeredAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存续状态
|
||||||
|
*/
|
||||||
|
private String survivalStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省市区区编码,以“/”隔开
|
||||||
|
*/
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省市区名字,以“/”隔开(四川省/成都市/武侯区)
|
||||||
|
*/
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业详细地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业POI地址
|
||||||
|
*/
|
||||||
|
private String addressPoi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经纬度,以“/”隔开经度,纬度(124.32421/142.424432)
|
||||||
|
*/
|
||||||
|
private String longLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 官网
|
||||||
|
*/
|
||||||
|
private String website;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0:初始化,10:审核中,20:审核拒绝,30:审核通过,40:未认证,50:已认证
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用:0禁用,1启用
|
||||||
|
*/
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源场景:0:其他,1:客户注册,2:平台录入,3:总包创建,4:网络抓取,5:班组创建
|
||||||
|
*/
|
||||||
|
private Integer sceneType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段
|
||||||
|
*/
|
||||||
|
private JSONObject extra;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业标签1正式企业 2测试企业
|
||||||
|
*/
|
||||||
|
private Integer entTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业期限(纯字符串不做解析)
|
||||||
|
*/
|
||||||
|
private String operatingPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经营范围(纯字符串不做解析)
|
||||||
|
*/
|
||||||
|
private String businessScope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业电话
|
||||||
|
*/
|
||||||
|
private String telephone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省编码
|
||||||
|
*/
|
||||||
|
private String provinceCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省份名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市编码
|
||||||
|
*/
|
||||||
|
private String cityCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市名称
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,6 @@ public interface NodeUpsertRepository {
|
|||||||
@Data
|
@Data
|
||||||
@SuperBuilder
|
@SuperBuilder
|
||||||
class UpdateReq extends OrganizationalNode {
|
class UpdateReq extends OrganizationalNode {
|
||||||
private Long id;
|
|
||||||
private String scene;
|
private String scene;
|
||||||
/**
|
/**
|
||||||
* 由于updateById不支持将值设置为null,这里提供这个
|
* 由于updateById不支持将值设置为null,这里提供这个
|
||||||
|
|||||||
@ -48,9 +48,27 @@ public interface UnitQueryRepository {
|
|||||||
@Data
|
@Data
|
||||||
@SuperBuilder
|
@SuperBuilder
|
||||||
class OneReq {
|
class OneReq {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id集合
|
||||||
|
*/
|
||||||
private Set<Long> ids;
|
private Set<Long> ids;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信用代码
|
||||||
|
*/
|
||||||
|
private String uniformSocialCreditCode;
|
||||||
|
|
||||||
public void check() {
|
public void check() {
|
||||||
Preconditions.checkArgument(id != null || CollUtil.isNotEmpty(ids), "参数异常");
|
Preconditions.checkArgument(id != null || CollUtil.isNotEmpty(ids), "参数异常");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,12 @@
|
|||||||
package cn.axzo.orgmanax.infra.dao.unit.repository;
|
package cn.axzo.orgmanax.infra.dao.unit.repository;
|
||||||
|
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.entity.OrganizationalUnit;
|
||||||
|
|
||||||
public interface UnitUpsertRepository {
|
public interface UnitUpsertRepository {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建单位
|
||||||
|
* @param organizationalUnit 组织单位
|
||||||
|
*/
|
||||||
|
void save(OrganizationalUnit organizationalUnit);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
package cn.axzo.orgmanax.infra.dao.unit.repository.impl;
|
|
||||||
|
|
||||||
import cn.axzo.orgmanax.infra.dao.unit.repository.UnitUpsertRepository;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class OrgUnitUpsertRepositoryImpl implements UnitUpsertRepository {
|
|
||||||
}
|
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package cn.axzo.orgmanax.infra.dao.unit.repository.impl;
|
||||||
|
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.dao.UnitDao;
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.entity.OrganizationalUnit;
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.repository.UnitUpsertRepository;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class UnitUpsertRepositoryImpl implements UnitUpsertRepository {
|
||||||
|
|
||||||
|
private final UnitDao unitDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save(OrganizationalUnit entity) {
|
||||||
|
unitDao.save(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,6 +9,7 @@ import cn.axzo.orgmanax.api.unit.resp.CreateUnitResp;
|
|||||||
import cn.axzo.orgmanax.api.unit.resp.OrgUnitDTO;
|
import cn.axzo.orgmanax.api.unit.resp.OrgUnitDTO;
|
||||||
import cn.axzo.orgmanax.api.unit.resp.UpdateUnitResp;
|
import cn.axzo.orgmanax.api.unit.resp.UpdateUnitResp;
|
||||||
import cn.axzo.orgmanax.server.unit.service.UnitService;
|
import cn.axzo.orgmanax.server.unit.service.UnitService;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -26,6 +27,7 @@ public class UnitController implements OrgUnitApi {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApiResult<CreateUnitResp> create(CreateUnitReq req) {
|
public ApiResult<CreateUnitResp> create(CreateUnitReq req) {
|
||||||
|
// return unitService.create(BeanUtil.toBean(req, CreateUnitReq.class));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,16 @@
|
|||||||
package cn.axzo.orgmanax.server.unit.foundation;
|
package cn.axzo.orgmanax.server.unit.foundation;
|
||||||
|
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.entity.OrganizationalUnit;
|
||||||
|
import cn.axzo.orgmanax.server.unit.foundation.dto.UnitCreator;
|
||||||
|
|
||||||
public interface UnitFoundationService {
|
public interface UnitFoundationService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建单位
|
||||||
|
* @param creator
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
OrganizationalUnit create(UnitCreator creator);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,205 @@
|
|||||||
|
package cn.axzo.orgmanax.server.unit.foundation.dto;
|
||||||
|
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.entity.OrganizationalUnit;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位创建者
|
||||||
|
* @author liuyang
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UnitCreator {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父单位id
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位logo url地址
|
||||||
|
*/
|
||||||
|
private String logoUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位介绍
|
||||||
|
*/
|
||||||
|
private String introduction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位类型 1:总包单位 2:建设单位 3:监理单位 4:劳务分包 5:专业分包 6.项目外班组 7.安心筑平台
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位性质:0:其他 1:团队 2:企业 3:班组
|
||||||
|
*/
|
||||||
|
private Integer nature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业执照号图片url地址
|
||||||
|
*/
|
||||||
|
private String usccPicUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 认证公函
|
||||||
|
*/
|
||||||
|
private String certificationLetterUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一社会信用码
|
||||||
|
*/
|
||||||
|
private String uniformSocialCreditCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人代表姓名
|
||||||
|
*/
|
||||||
|
private String legalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人手机号
|
||||||
|
*/
|
||||||
|
private String legalPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人代表身份证
|
||||||
|
*/
|
||||||
|
private String legalIdCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班组长身份id
|
||||||
|
*/
|
||||||
|
private Long identityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份类型 1.无身份 2.班组长
|
||||||
|
*/
|
||||||
|
private Integer identityType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位注册地址
|
||||||
|
*/
|
||||||
|
private String registeredAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存续状态
|
||||||
|
*/
|
||||||
|
private String survivalStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省市区区编码,以“/”隔开
|
||||||
|
*/
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省市区名字,以“/”隔开(四川省/成都市/武侯区)
|
||||||
|
*/
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业详细地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业POI地址
|
||||||
|
*/
|
||||||
|
private String addressPoi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经纬度,以“/”隔开经度,纬度(124.32421/142.424432)
|
||||||
|
*/
|
||||||
|
private String longLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 官网
|
||||||
|
*/
|
||||||
|
private String website;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0:初始化,10:审核中,20:审核拒绝,30:审核通过,40:未认证,50:已认证
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用:0禁用,1启用
|
||||||
|
*/
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源场景:0:其他,1:客户注册,2:平台录入,3:总包创建,4:网络抓取,5:班组创建
|
||||||
|
*/
|
||||||
|
private Integer sceneType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段
|
||||||
|
*/
|
||||||
|
private JSONObject extra;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业标签1正式企业 2测试企业
|
||||||
|
*/
|
||||||
|
private Integer entTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业期限(纯字符串不做解析)
|
||||||
|
*/
|
||||||
|
private String operatingPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经营范围(纯字符串不做解析)
|
||||||
|
*/
|
||||||
|
private String businessScope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业电话
|
||||||
|
*/
|
||||||
|
private String telephone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省编码
|
||||||
|
*/
|
||||||
|
private String provinceCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省份名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市编码
|
||||||
|
*/
|
||||||
|
private String cityCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市名称
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建实体
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public OrganizationalUnit toEntity() {
|
||||||
|
OrganizationalUnit organizationalUnit = BeanUtil.copyProperties(this, OrganizationalUnit.class);
|
||||||
|
return organizationalUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,14 @@
|
|||||||
package cn.axzo.orgmanax.server.unit.foundation.impl;
|
package cn.axzo.orgmanax.server.unit.foundation.impl;
|
||||||
|
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.entity.OrganizationalUnit;
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.repository.UnitQueryRepository;
|
||||||
|
import cn.axzo.orgmanax.infra.dao.unit.repository.UnitUpsertRepository;
|
||||||
import cn.axzo.orgmanax.server.unit.foundation.UnitFoundationService;
|
import cn.axzo.orgmanax.server.unit.foundation.UnitFoundationService;
|
||||||
|
import cn.axzo.orgmanax.server.unit.foundation.dto.UnitCreator;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.text.CharSequenceUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -9,4 +17,26 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class UnitFoundationServiceImpl implements UnitFoundationService {
|
public class UnitFoundationServiceImpl implements UnitFoundationService {
|
||||||
|
|
||||||
|
|
||||||
|
private final UnitUpsertRepository unitUpsertRepository;
|
||||||
|
private final UnitQueryRepository unitQueryRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrganizationalUnit create(UnitCreator creator) {
|
||||||
|
|
||||||
|
// 1. 重复校验
|
||||||
|
// 根据单位名称或信用代码查询
|
||||||
|
UnitQueryRepository.UnitResp unit = unitQueryRepository.one(UnitQueryRepository.OneReq.builder().name(creator.getName()).build());
|
||||||
|
if (unit != null) {
|
||||||
|
Assert.isFalse(CharSequenceUtil.equals(creator.getName(), unit.getName()), "创建失败, 单位名称重复");
|
||||||
|
Assert.isFalse(CharSequenceUtil.equals(creator.getName(), unit.getName()), "创建失败, 单位名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 创建单位实体
|
||||||
|
OrganizationalUnit organizationalUnit = BeanUtil.copyProperties(creator, OrganizationalUnit.class);
|
||||||
|
unitUpsertRepository.save(organizationalUnit);
|
||||||
|
|
||||||
|
return organizationalUnit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,14 @@
|
|||||||
package cn.axzo.orgmanax.server.unit.service;
|
package cn.axzo.orgmanax.server.unit.service;
|
||||||
|
|
||||||
|
import cn.axzo.orgmanax.server.unit.service.dto.CreateUnitReq;
|
||||||
|
import cn.axzo.orgmanax.server.unit.service.dto.CreateUnitResp;
|
||||||
|
|
||||||
public interface UnitService {
|
public interface UnitService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建单位
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
CreateUnitResp create(CreateUnitReq req);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,189 @@
|
|||||||
|
package cn.axzo.orgmanax.server.unit.service.dto;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CreateUnitReq {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父单位id
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位logo url地址
|
||||||
|
*/
|
||||||
|
private String logoUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位介绍
|
||||||
|
*/
|
||||||
|
private String introduction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位类型 1:总包单位 2:建设单位 3:监理单位 4:劳务分包 5:专业分包 6.项目外班组 7.安心筑平台
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位性质:0:其他 1:团队 2:企业 3:班组
|
||||||
|
*/
|
||||||
|
private Integer nature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业执照号图片url地址
|
||||||
|
*/
|
||||||
|
private String usccPicUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 认证公函
|
||||||
|
*/
|
||||||
|
private String certificationLetterUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一社会信用码
|
||||||
|
*/
|
||||||
|
private String uniformSocialCreditCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人代表姓名
|
||||||
|
*/
|
||||||
|
private String legalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人手机号
|
||||||
|
*/
|
||||||
|
private String legalPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人代表身份证
|
||||||
|
*/
|
||||||
|
private String legalIdCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班组长身份id
|
||||||
|
*/
|
||||||
|
private Long identityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份类型 1.无身份 2.班组长
|
||||||
|
*/
|
||||||
|
private Integer identityType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位注册地址
|
||||||
|
*/
|
||||||
|
private String registeredAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存续状态
|
||||||
|
*/
|
||||||
|
private String survivalStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省市区区编码,以“/”隔开
|
||||||
|
*/
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省市区名字,以“/”隔开(四川省/成都市/武侯区)
|
||||||
|
*/
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业详细地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业POI地址
|
||||||
|
*/
|
||||||
|
private String addressPoi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经纬度,以“/”隔开经度,纬度(124.32421/142.424432)
|
||||||
|
*/
|
||||||
|
private String longLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 官网
|
||||||
|
*/
|
||||||
|
private String website;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0:初始化,10:审核中,20:审核拒绝,30:审核通过,40:未认证,50:已认证
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用:0禁用,1启用
|
||||||
|
*/
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源场景:0:其他,1:客户注册,2:平台录入,3:总包创建,4:网络抓取,5:班组创建
|
||||||
|
*/
|
||||||
|
private Integer sceneType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段
|
||||||
|
*/
|
||||||
|
private JSONObject extra;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业标签1正式企业 2测试企业
|
||||||
|
*/
|
||||||
|
private Integer entTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业期限(纯字符串不做解析)
|
||||||
|
*/
|
||||||
|
private String operatingPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经营范围(纯字符串不做解析)
|
||||||
|
*/
|
||||||
|
private String businessScope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业电话
|
||||||
|
*/
|
||||||
|
private String telephone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省编码
|
||||||
|
*/
|
||||||
|
private String provinceCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省份名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市编码
|
||||||
|
*/
|
||||||
|
private String cityCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市名称
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package cn.axzo.orgmanax.server.unit.service.dto;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CreateUnitResp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,8 @@
|
|||||||
package cn.axzo.orgmanax.server.unit.service.impl;
|
package cn.axzo.orgmanax.server.unit.service.impl;
|
||||||
|
|
||||||
import cn.axzo.orgmanax.server.unit.service.UnitService;
|
import cn.axzo.orgmanax.server.unit.service.UnitService;
|
||||||
|
import cn.axzo.orgmanax.server.unit.service.dto.CreateUnitReq;
|
||||||
|
import cn.axzo.orgmanax.server.unit.service.dto.CreateUnitResp;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -9,4 +11,8 @@ import org.springframework.stereotype.Service;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
public class UnitServiceImpl implements UnitService {
|
public class UnitServiceImpl implements UnitService {
|
||||||
|
@Override
|
||||||
|
public CreateUnitResp create(CreateUnitReq req) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user