Commit 2aabbf60 authored by suhuiguang's avatar suhuiguang

1.字典增加字段落code 和 name

2.数据脚本整理
parent 2638fced
...@@ -33,6 +33,9 @@ public class BaseUnitLicenceDto extends BaseDto { ...@@ -33,6 +33,9 @@ public class BaseUnitLicenceDto extends BaseDto {
@ApiModelProperty(value = "证书类型") @ApiModelProperty(value = "证书类型")
private String certType; private String certType;
@ApiModelProperty(value = "证书类型code")
private String certTypeCode;
@ApiModelProperty(value = "证书编号") @ApiModelProperty(value = "证书编号")
private String certNo; private String certNo;
...@@ -45,9 +48,18 @@ public class BaseUnitLicenceDto extends BaseDto { ...@@ -45,9 +48,18 @@ public class BaseUnitLicenceDto extends BaseDto {
@ApiModelProperty(value = "变更日期") @ApiModelProperty(value = "变更日期")
private Date changeDate; private Date changeDate;
@ApiModelProperty(value = "许可评审方式") @ApiModelProperty(value = "许可方式/许可状态")
private String applyType; private String applyType;
@ApiModelProperty(value = "许可方式/许可状态code")
private String applyTypeCode;
@ApiModelProperty(value = "许可评审方式")
private String appraisalType;
@ApiModelProperty(value = "许可评审方式code")
private String appraisalTypeCode;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
...@@ -66,7 +78,16 @@ public class BaseUnitLicenceDto extends BaseDto { ...@@ -66,7 +78,16 @@ public class BaseUnitLicenceDto extends BaseDto {
@ApiModelProperty(value = "许可参数/充装介质名称") @ApiModelProperty(value = "许可参数/充装介质名称")
private String parameter; private String parameter;
@ApiModelProperty(value = "许可参数/充装介质code")
private String parameterCode;
@ApiModelProperty(value = "固定检验地址") @ApiModelProperty(value = "固定检验地址")
private String itemAddress; private String itemAddress;
@ApiModelProperty(value = "发证机关")
private String approvedOrgan;
@ApiModelProperty(value = "发证机关code")
private String approvedOrganCode;
} }
...@@ -46,6 +46,13 @@ public class BaseUnitLicence extends BaseEntity { ...@@ -46,6 +46,13 @@ public class BaseUnitLicence extends BaseEntity {
@TableField("cert_type") @TableField("cert_type")
private String certType; private String certType;
/**
* 证书类型code
*/
@TableField("cert_type_code")
private String certTypeCode;
/** /**
* 证书编号 * 证书编号
*/ */
...@@ -112,10 +119,27 @@ public class BaseUnitLicence extends BaseEntity { ...@@ -112,10 +119,27 @@ public class BaseUnitLicence extends BaseEntity {
@TableField("parameter") @TableField("parameter")
private String parameter; private String parameter;
/**
* 许可参数/充装介质code
*/
@TableField("parameterCode")
private String parameterCode;
/** /**
* 固定检验地址 * 固定检验地址
*/ */
@TableField("item_address") @TableField("item_address")
private String itemAddress; private String itemAddress;
/**
* 发证机关
*/
private String approvedOrgan;
/**
* 发证机关code
*/
private String approvedOrganCode;
} }
...@@ -33,10 +33,16 @@ public class RegUnitIcDto extends BaseDto { ...@@ -33,10 +33,16 @@ public class RegUnitIcDto extends BaseDto {
@ApiModelProperty(value = "登记机关") @ApiModelProperty(value = "登记机关")
private String registeredOrgan; private String registeredOrgan;
@ApiModelProperty(value = "登记机关编码")
private String registeredOrganCode;
@ApiModelProperty(value = "核准时间") @ApiModelProperty(value = "核准时间")
private Date approvedDate; private Date approvedDate;
@ApiModelProperty(value = "经状态:在业、吊销、注销、迁入、迁出、停业、清算") @ApiModelProperty(value = "经状态:在业、吊销、注销、迁入、迁出、停业、清算")
private String businessState; private String businessState;
@ApiModelProperty(value = "经营状态code")
private String businessStateCode;
} }
...@@ -112,6 +112,10 @@ public class RegUnitInfoDto extends BaseDto { ...@@ -112,6 +112,10 @@ public class RegUnitInfoDto extends BaseDto {
@ApiModelProperty(value = "行政许可") @ApiModelProperty(value = "行政许可")
private List<BaseUnitLicenceDto> unitLicences; private List<BaseUnitLicenceDto> unitLicences;
@ApiModelProperty(value = "机场单位id") @ApiModelProperty(value = "平台公司id,平台创建公司后更新")
private Long orgUserId; private String amosCompanySeq;
@ApiModelProperty(value = "平台用户id,平台创建用户后更新")
private String adminUserId;
} }
...@@ -42,21 +42,34 @@ public class RegUnitIc extends BaseEntity { ...@@ -42,21 +42,34 @@ public class RegUnitIc extends BaseEntity {
private String industryName; private String industryName;
/** /**
* 登记机关 * 登记机关名称
*/ */
@TableField("registered_organ") @TableField("registered_organ")
private String registeredOrgan; private String registeredOrgan;
/** /**
* 登记机关code
*/
@TableField("registered_organ_code")
private String registeredOrganCode;
/**
* 核准时间 * 核准时间
*/ */
@TableField("approved_date") @TableField("approved_date")
private Date approvedDate; private Date approvedDate;
/** /**
* 经验状态:在业、吊销、注销、迁入、迁出、停业、清算 * 经营状态名称:在业、吊销、注销、迁入、迁出、停业、清算
*/ */
@TableField("business_state") @TableField("business_state")
private String businessState; private String businessState;
/**
* 经营状态code
*/
@TableField("business_state_code")
private String businessStateCode;
} }
...@@ -183,7 +183,15 @@ public class RegUnitInfo extends BaseEntity { ...@@ -183,7 +183,15 @@ public class RegUnitInfo extends BaseEntity {
@TableField("state") @TableField("state")
private String state; private String state;
@TableField("org_user_id") /**
private Long orgUserId; * 平台公司id,平台创建公司后更新
*/
@TableField("amos_company_seq")
private String amosCompanySeq;
/**
* 平台用户id,平台创建用户后更新
*/
private String adminUserId;
} }
...@@ -43,4 +43,11 @@ public interface IRegUnitInfoService { ...@@ -43,4 +43,11 @@ public interface IRegUnitInfoService {
* @return 组织架构中单位级别为:省级、地市级、区县级的单位 * @return 组织架构中单位级别为:省级、地市级、区县级的单位
*/ */
Collection<CompanyModel> getManagementUnitTree(); Collection<CompanyModel> getManagementUnitTree();
/**
* 单位注销
* @param unitCode 单位唯一标识
* @return 是否成功
*/
Boolean unitLogOut(String unitCode);
} }
...@@ -22,6 +22,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest; ...@@ -22,6 +22,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.ws.rs.DELETE;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -150,4 +151,12 @@ public class RegUnitInfoController extends BaseController { ...@@ -150,4 +151,12 @@ public class RegUnitInfoController extends BaseController {
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{unitCode}/logOut")
@ApiOperation(httpMethod = "DELETE", value = "企业注销", notes = "企业注销")
public ResponseModel unitLogOut(@PathVariable String unitCode){
return ResponseHelper.buildResponse(iRegUnitInfoService.unitLogOut(unitCode));
}
} }
...@@ -28,6 +28,7 @@ import com.yeejoin.amos.feign.privilege.Privilege; ...@@ -28,6 +28,7 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel; import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel; import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -66,14 +67,14 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -66,14 +67,14 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
TzBaseEnterpriseInfoServiceImpl tzBaseEnterpriseInfoService; TzBaseEnterpriseInfoServiceImpl tzBaseEnterpriseInfoService;
/** /**
* 使用单位的类型,数据来源:cb_data_dictionary code = 1051 * 使用单位的类型,数据来源:cb_data_dictionary code = 1232
*/ */
private static String USE_UNIT_TYPE_CODE = "1051"; private static String USE_UNIT_TYPE_CODE = "1232";
/** /**
* 单位类型,数据来源:cb_data_dictionary type = UNIT_TYPE * 单位类型,数据来源:cb_data_dictionary type = UNIT_TYPE
*/ */
private static String DICT_TYPE_UNIT_TYPE = "UNIT_TYPE"; private static String DICT_TYPE_UNIT_TYPE = "UNIT_TYPE_NEW";
@Override @Override
...@@ -105,7 +106,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -105,7 +106,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
if (UnitReviewStateEnum.NO_NEED_REVIEW.getCode().equals(model.getState())) { if (UnitReviewStateEnum.NO_NEED_REVIEW.getCode().equals(model.getState())) {
// 4.1 自动创建:调用平台进行创建单位、用户信息 // 4.1 自动创建:调用平台进行创建单位、用户信息
this.createCompanyAndUser(regUnitInfo); this.createCompanyAndUser(regUnitInfo);
// 4.2 todo 同步用户信息 需要吴江提交表相关代码 // 4.2 创建企业信息
this.createBaseEnterpriseInfo(model); this.createBaseEnterpriseInfo(model);
} }
this.save(regUnitInfo); this.save(regUnitInfo);
...@@ -127,12 +128,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -127,12 +128,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
baseEnterpriseInfo.setCity(regUnitInfo.getCity()); baseEnterpriseInfo.setCity(regUnitInfo.getCity());
baseEnterpriseInfo.setDistrict(regUnitInfo.getDistrict()); baseEnterpriseInfo.setDistrict(regUnitInfo.getDistrict());
baseEnterpriseInfo.setStreet(regUnitInfo.getStree()); baseEnterpriseInfo.setStreet(regUnitInfo.getStree());
baseEnterpriseInfo.setCommunity(regUnitInfo.getCommunity()) ; baseEnterpriseInfo.setCommunity(regUnitInfo.getCommunity());
baseEnterpriseInfo.setAddress(regUnitInfo.getAddress()) ; baseEnterpriseInfo.setAddress(regUnitInfo.getAddress());
baseEnterpriseInfo.setLegalPerson(regUnitInfo.getLegalPerson()) ; baseEnterpriseInfo.setLegalPerson(regUnitInfo.getLegalPerson());
baseEnterpriseInfo.setLegalPhone(regUnitInfo.getLegalPersonTel()) ; baseEnterpriseInfo.setLegalPhone(regUnitInfo.getLegalPersonTel());
baseEnterpriseInfo.setUseContact(regUnitInfo.getContactPerson()) ; baseEnterpriseInfo.setUseContact(regUnitInfo.getContactPerson());
baseEnterpriseInfo.setContactPhone(regUnitInfo.getContactPersonTel()) ; baseEnterpriseInfo.setContactPhone(regUnitInfo.getContactPersonTel());
baseEnterpriseInfo.setLongitude(regUnitInfo.getLongitude()); baseEnterpriseInfo.setLongitude(regUnitInfo.getLongitude());
baseEnterpriseInfo.setLatitude(regUnitInfo.getLatitude()); baseEnterpriseInfo.setLatitude(regUnitInfo.getLatitude());
baseEnterpriseInfo.setGoverningBody(regUnitInfo.getManagementUnit()); baseEnterpriseInfo.setGoverningBody(regUnitInfo.getManagementUnit());
...@@ -177,17 +178,46 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -177,17 +178,46 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
public Collection<CompanyModel> getManagementUnitTree() { public Collection<CompanyModel> getManagementUnitTree() {
// 组织架构中单位级别为:省级、地市级、区县级的单位 // 组织架构中单位级别为:省级、地市级、区县级的单位
Collection<CompanyModel> companyModels = Privilege.companyClient.companyTreeWithoutAuth().getResult(); Collection<CompanyModel> companyModels = Privilege.companyClient.companyTreeWithoutAuth().getResult();
return companyModels.stream().filter(c-> "headquarter".equals(c.getLevel()) || "prefecture-level".equals(c.getLevel()) || "county".equals(c.getLevel())).peek(n->{ return companyModels.stream().filter(c -> "headquarter".equals(c.getLevel()) || "prefecture-level".equals(c.getLevel()) || "county".equals(c.getLevel())).peek(n -> {
this.dealChildCompany(n.getChildren()); this.dealChildCompany(n.getChildren());
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
private void dealChildCompany(Collection children){ @Override
children.stream().filter(n->{ @Transactional(rollbackFor = Exception.class)
CompanyModel c = JSONObject.parseObject(JSON.toJSONString(n),CompanyModel.class); public Boolean unitLogOut(String unitCode) {
RegUnitInfo regUnitInfo = this.getOne(new LambdaQueryWrapper<RegUnitInfo>().eq(RegUnitInfo::getUnitCode, unitCode));
if(regUnitInfo == null){
return Boolean.FALSE;
}
tzsAuthServiceImpl.setRequestContext();
String companyId = regUnitInfo.getAmosCompanySeq();
// 1.删除已经创建的 企业信息
if (StringUtils.isNotEmpty(companyId)) {
CompanyModel companyModel = Privilege.companyClient.seleteOne(Long.parseLong(companyId)).getResult();
if (companyModel != null) {
Privilege.companyClient.deleteCompany(companyId);
}
}
// 2.删除管理员账号
Privilege.agencyUserClient.multDeleteUser(regUnitInfo.getAdminUserId());
// 3.企业注册表删除
this.remove(new LambdaQueryWrapper<RegUnitInfo>().eq(RegUnitInfo::getUnitCode, unitCode));
// 4.工商信息表删除
regUnitIcService.remove(new LambdaQueryWrapper<RegUnitIc>().eq(RegUnitIc::getUnitCode, unitCode));
// 5.许可信息删除
baseUnitLicenceService.remove(new LambdaQueryWrapper<BaseUnitLicence>().eq(BaseUnitLicence::getUnitCode, unitCode));
// 6.企业数据信息 删除
tzBaseEnterpriseInfoService.remove(new LambdaQueryWrapper<TzBaseEnterpriseInfo>().eq(TzBaseEnterpriseInfo::getUseCode, unitCode));
return Boolean.TRUE;
}
private void dealChildCompany(Collection children) {
children.stream().filter(n -> {
CompanyModel c = JSONObject.parseObject(JSON.toJSONString(n), CompanyModel.class);
return "headquarter".equals(c.getLevel()) || "prefecture-level".equals(c.getLevel()) || "county".equals(c.getLevel()); return "headquarter".equals(c.getLevel()) || "prefecture-level".equals(c.getLevel()) || "county".equals(c.getLevel());
}).peek(n->{ }).peek(n -> {
CompanyModel c = JSONObject.parseObject(JSON.toJSONString(n),CompanyModel.class); CompanyModel c = JSONObject.parseObject(JSON.toJSONString(n), CompanyModel.class);
dealChildCompany(c.getChildren() != null ? new ArrayList() : c.getChildren()); dealChildCompany(c.getChildren() != null ? new ArrayList() : c.getChildren());
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
...@@ -229,7 +259,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -229,7 +259,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
String unitTypeCode = regUnitInfo.getUnitTypeCode(); String unitTypeCode = regUnitInfo.getUnitTypeCode();
// 根据unitTypeCode 获取应用和角色 数据字典配置 // 根据unitTypeCode 获取应用和角色 数据字典配置
DataDictionary unitType = iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getCode, unitTypeCode)); DataDictionary unitType = iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getCode, unitTypeCode));
String appCode = unitType.getTypeDesc() != null ? unitType.getTypeDesc(): ""; String appCode = unitType.getTypeDesc() != null ? unitType.getTypeDesc() : "";
String[] appCodes = appCode.split(","); String[] appCodes = appCode.split(",");
Set<String> appCodesSet = new HashSet<>(); Set<String> appCodesSet = new HashSet<>();
Collections.addAll(appCodesSet, appCodes); Collections.addAll(appCodesSet, appCodes);
...@@ -268,6 +298,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -268,6 +298,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
org.setAmosOrgId(companyInfo.getSequenceNbr() + ""); org.setAmosOrgId(companyInfo.getSequenceNbr() + "");
org.setAmosOrgCode(companyInfo.getOrgCode()); org.setAmosOrgCode(companyInfo.getOrgCode());
iOrgUsrService.save(org); iOrgUsrService.save(org);
regUnitInfo.setOrgUserId(org.getSequenceNbr()); regUnitInfo.setAdminUserId(userResult.getResult().getUserId());
regUnitInfo.setAmosCompanySeq(companyInfo.getSequenceNbr().toString());
} }
} }
\ No newline at end of file
...@@ -7,4 +7,5 @@ ...@@ -7,4 +7,5 @@
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"> http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<include file="tzs-1.0.0.0.xml" relativeToChangelogFile="true"/> <include file="tzs-1.0.0.0.xml" relativeToChangelogFile="true"/>
<include file="tzs-1.0.0.1.xml" relativeToChangelogFile="true"/>
</databaseChangeLog> </databaseChangeLog>
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet author="suhuiguang" id="1660201816131-01">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="tz_flc_reg_unit_ic"/>
</not>
</preConditions>
<comment>create table tz_flc_reg_unit_ic 注册单位工商信息表</comment>
<sql>
CREATE TABLE `tz_flc_reg_unit_ic` (
`sequence_nbr` bigint NOT NULL COMMENT '自增主键',
`unit_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单位名称',
`unit_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件code',
`industry_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '所属行业',
`registered_organ_code` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '登记机关编码',
`registered_organ` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '登记机关',
`approved_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '核准时间',
`business_state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '经验状态:在业、吊销、注销、迁入、迁出、停业、清算',
`business_state_code` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '经验状态code',
`rec_user_id` bigint DEFAULT NULL COMMENT '更新人id',
`rec_user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人名称',
`rec_date` datetime DEFAULT NULL COMMENT '更新时间',
`is_delete` bit(1) DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
PRIMARY KEY (`sequence_nbr`) USING BTREE,
UNIQUE KEY `uk_unit_code` (`unit_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='注册单位工商信息表';
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1660201816131-02">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="tz_flc_reg_unit_info"/>
</not>
</preConditions>
<comment>create table tz_flc_reg_unit_info 单位注册信息表</comment>
<sql>
CREATE TABLE `tz_flc_reg_unit_info` (
`sequence_nbr` bigint NOT NULL COMMENT '自增主键',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单位名称',
`unit_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '单位编码',
`unit_code_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证件类型',
`unit_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单位类型',
`unit_type_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单位类型code',
`management_unit` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管辖机构',
`management_unit_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管辖单位id',
`region_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '区域编码',
`country` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '国家',
`province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '省',
`city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '市',
`district` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '县区',
`stree` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '街道',
`community` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '小区',
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '详细地址',
`longitude` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '经度',
`latitude` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '纬度',
`industry_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '所属行业',
`legal_person` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单位法人',
`legal_person_tel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '法人电话',
`contact_person` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单位联系人',
`contact_person_tel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '联系人电话',
`admin_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管理员姓名',
`admin_login_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管理员用户名',
`admin_login_pwd` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管理员密码',
`admin_tel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管理员手机号',
`admin_id_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管理元身份证号',
`state` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '审核状态:1-无需审核;2-待审核;3-已审核',
`admin_user_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '平台用户id',
`amos_company_seq` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '平台公司id',
`rec_user_id` bigint DEFAULT NULL COMMENT '更新人id',
`rec_user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人名称',
`rec_date` datetime DEFAULT NULL COMMENT '更新时间',
`is_delete` bit(1) DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
PRIMARY KEY (`sequence_nbr`) USING BTREE,
UNIQUE KEY `uk_unit_code` (`unit_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='单位注册信息表';
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1660201816131-03">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="tz_base_unit_licence"/>
</not>
</preConditions>
<comment>create table tz_base_unit_licence 单位许可信息表</comment>
<sql>
CREATE TABLE `tz_base_unit_licence` (
`sequence_nbr` bigint NOT NULL COMMENT '自增主键',
`unit_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单位编码',
`unit_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单位名称',
`lic_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可地址',
`cert_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证书类型',
`cert_type_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证书类型code',
`cert_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证书编号',
`expiry_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '有效期至',
`issue_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '发证日期',
`approved_organ` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '发证机关',
`approved_organ_code` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '发证机关code',
`change_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '变更日期',
`apply_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可方式/许可状态code',
`apply_type_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可方式/许可状态code',
`appraisal_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可评审方式',
`appraisal_type_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可评审方式code',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
`item_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可项目/检验类型/设备品种编码',
`item_code_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可项目/检验类型/设备品种',
`sub_item_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可子项目/检验项目/充装介质类别code',
`sub_item_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可子项目/检验项目/充装介质类别',
`parameter` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '许可参数/充装介质名称',
`parameter_code` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '参数code',
`item_address` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '固定检验地址',
`rec_user_id` bigint DEFAULT NULL COMMENT '更新人id',
`rec_user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人名称',
`rec_date` datetime DEFAULT NULL COMMENT '更新时间',
`is_delete` bit(1) DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='单位许可信息表';
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1660201816131-04">
<comment>单位注册使用到的字典</comment>
<sql>
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1201', '1201', '生产单位', 'zslx', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1202', '1202', '重装单位', 'zslx', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1210', '1210', '在业', 'jyzt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1211', '1211', '吊销', 'jyzt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1212', '1212', '注销', 'jyzt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1213', '1213', '迁入', 'jyzt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1214', '1214', '迁出', 'jyzt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1215', '1215', '停业', 'jyzt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1216', '1216', '清算', 'jyzt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1217', '1217', '首次', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1218', '1218', '换证', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1219', '1219', '增项', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1220', '1220', '省级', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1221', '1221', '换证及增项', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1222', '1222', '换证及升级', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1223', '1223', '变更', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1224', '1224', '注销', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1225', '1225', '撤销', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1226', '1226', '换证及增项', 'xkfszt', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1227', '1227', '鉴定评审', 'xkpsfs', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1228', '1228', '免鉴定评审', 'xkpsfs', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1229', '1229', '设计制造单位', 'UNIT_TYPE_NEW', 'studio_normalapp_3663181,studio_normalapp_3654033,studio_normalapp_3404492,studio_normalapp_3404491', NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1230', '1230', '安装改造维修单位', 'UNIT_TYPE_NEW', 'studio_normalapp_3663181,studio_normalapp_3654033,studio_normalapp_3404492,studio_normalapp_3404491', NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1231', '1231', '气瓶充装单位', 'UNIT_TYPE_NEW', 'studio_normalapp_3663181,studio_normalapp_3654033,studio_normalapp_3404492,studio_normalapp_3404491', NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1232', '1232', '使用单位', 'UNIT_TYPE_NEW', 'studio_normalapp_3663181,studio_normalapp_3654033,studio_normalapp_3404492,studio_normalapp_3404491', NULL, NULL, NULL, NULL, b'0', '1');
</sql>
</changeSet>
</databaseChangeLog>
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