Commit 1e855670 authored by tianbo's avatar tianbo

bugfix(tcm):气站注册更新appid字段

parent b9085301
......@@ -145,4 +145,9 @@ public class RegUnitInfoDto extends BaseDto {
@ApiModelProperty(value = "单位所在地是否为全国")
private String isNationwide;
/**
* 气站对接appId
*/
private String appId;
}
......@@ -208,4 +208,9 @@ public class RegUnitInfo extends BaseEntity {
* 单位是省内或省外。1省外
*/
private String isNationwide;
/**
* 气站对接appId
*/
private String appId;
}
......@@ -219,7 +219,8 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
model.getRegUnitIc().setUnitName(model.getName());
Bean.copyExistPropertis(model.getRegUnitIc(), regUnitIc);
regUnitIcService.saveOrUpdate(regUnitIc);
// 5.创建企业信息
// 5.创建企业信息:tz_base_enterprise_info
model.setAppId(regUnitInfo.getAppId());
this.createBaseEnterpriseInfo(model, EnterpriseEnums.QY_DW.getType());
if (!ObjectUtils.isEmpty(regUnitInfo.getAdminName())) {
regUnitInfo.setContactPerson(regUnitInfo.getAdminName());
......@@ -435,6 +436,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
}
baseEnterpriseInfo.setSyncDate(new Date());
baseEnterpriseInfo.setSyncState(0);
baseEnterpriseInfo.setAppId(regUnitInfo.getAppId());
LambdaQueryWrapper<TzBaseEnterpriseInfo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TzBaseEnterpriseInfo::getUseCode, regUnitInfo.getUnitCode());
tzBaseEnterpriseInfoService.saveOrUpdate(baseEnterpriseInfo, wrapper);
......@@ -928,6 +930,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
shadowUser.setUserName(appId);
shadowUser.setPassword(DEFAULT_PASSWORD);
Privilege.agencyUserClient.createLoginInfoAppId(shadowUser);
regUnitInfo.setAppId(appId);
}
regUnitInfo.setAdminUserId(adminUserId);
......
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