【DAOP-1.0】企业认证
【功能点】测试问题处理
Showing
3 changed files
with
99 additions
and
7 deletions
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import csbr.cloud.entity.domain.base.vo.CsbrBaseVO; | ||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import lombok.Data; | ||
| 6 | import lombok.EqualsAndHashCode; | ||
| 7 | import lombok.experimental.Accessors; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * 企业证照表 视图对象类 | ||
| 11 | * | ||
| 12 | * @author xiaocq | ||
| 13 | * @date 2023-12-19 | ||
| 14 | */ | ||
| 15 | @Data | ||
| 16 | @Accessors(chain = true) | ||
| 17 | @EqualsAndHashCode(callSuper = true) | ||
| 18 | @Schema(name = "企业证照表") | ||
| 19 | public class TenantLicRQVO extends CsbrBaseVO { | ||
| 20 | /** | ||
| 21 | * 企业唯一标识 | ||
| 22 | */ | ||
| 23 | @Schema(description = "企业唯一标识") | ||
| 24 | private String tenantGuid; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * 证照类型 | ||
| 28 | */ | ||
| 29 | @Schema(description = "证照类型") | ||
| 30 | private String licenseType; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * 图片内容 | ||
| 34 | */ | ||
| 35 | @Schema(description = "图片内容") | ||
| 36 | private String pictContentJson; | ||
| 37 | |||
| 38 | |||
| 39 | /********非库表存储属性*****/ | ||
| 40 | |||
| 41 | |||
| 42 | |||
| 43 | /********字典类*****/ | ||
| 44 | |||
| 45 | /********实体类、用户单选、组织机构单选*****/ | ||
| 46 | |||
| 47 | /********范围查询*****/ | ||
| 48 | |||
| 49 | /********自定义扩展*****/ | ||
| 50 | |||
| 51 | /********子对象*****/ | ||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | |||
| 56 | } | 
| ... | @@ -167,6 +167,9 @@ public class TenantRQVO extends CsbrBaseVO { | ... | @@ -167,6 +167,9 @@ public class TenantRQVO extends CsbrBaseVO { | 
| 167 | 167 | ||
| 168 | /********子对象*****/ | 168 | /********子对象*****/ | 
| 169 | 169 | ||
| 170 | @Schema(description = "企业证照列表") | ||
| 171 | private List<TenantLicRQVO> tenantLicList; | ||
| 172 | |||
| 170 | @Schema(hidden = true,description = "分库标识") | 173 | @Schema(hidden = true,description = "分库标识") | 
| 171 | private String shardingFlag; | 174 | private String shardingFlag; | 
| 172 | } | 175 | } | ... | ... | 
| 1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; | 
| 2 | 2 | ||
| 3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; | 
| 4 | import com.alibaba.fastjson.JSONArray; | ||
| 5 | import com.alibaba.fastjson.JSONObject; | ||
| 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 6 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
| 5 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 7 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 
| 6 | import com.csbr.cloud.common.enums.SystemError; | 8 | import com.csbr.cloud.common.enums.SystemError; | 
| ... | @@ -30,9 +32,7 @@ import com.csbr.qingcloud.portal.service.EnterpriseService; | ... | @@ -30,9 +32,7 @@ import com.csbr.qingcloud.portal.service.EnterpriseService; | 
| 30 | import com.csbr.qingcloud.portal.util.ChangeInfoUtil; | 32 | import com.csbr.qingcloud.portal.util.ChangeInfoUtil; | 
| 31 | import com.csbr.qingcloud.portal.util.DateUtil; | 33 | import com.csbr.qingcloud.portal.util.DateUtil; | 
| 32 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 34 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 
| 33 | import csbr.cloud.entity.domain.user.UserInfo; | ||
| 34 | import csbr.cloud.entity.enums.ApprovalStateEnum; | 35 | import csbr.cloud.entity.enums.ApprovalStateEnum; | 
| 35 | import csbr.cloud.entity.utils.UserContextHolder; | ||
| 36 | import io.seata.spring.annotation.GlobalTransactional; | 36 | import io.seata.spring.annotation.GlobalTransactional; | 
| 37 | import jakarta.annotation.Resource; | 37 | import jakarta.annotation.Resource; | 
| 38 | import lombok.extern.slf4j.Slf4j; | 38 | import lombok.extern.slf4j.Slf4j; | 
| ... | @@ -41,9 +41,7 @@ import org.apache.commons.lang3.StringUtils; | ... | @@ -41,9 +41,7 @@ import org.apache.commons.lang3.StringUtils; | 
| 41 | import org.springframework.stereotype.Service; | 41 | import org.springframework.stereotype.Service; | 
| 42 | import org.springframework.transaction.annotation.Transactional; | 42 | import org.springframework.transaction.annotation.Transactional; | 
| 43 | import java.util.ArrayList; | 43 | import java.util.ArrayList; | 
| 44 | import java.util.Date; | ||
| 45 | import java.util.List; | 44 | import java.util.List; | 
| 46 | import java.util.Map; | ||
| 47 | 45 | ||
| 48 | /** | 46 | /** | 
| 49 | * @program: D:/git/ms-data-circulation-portal-service | 47 | * @program: D:/git/ms-data-circulation-portal-service | 
| ... | @@ -82,9 +80,6 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -82,9 +80,6 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | 
| 82 | private MfDemandService mfDemandService; | 80 | private MfDemandService mfDemandService; | 
| 83 | 81 | ||
| 84 | @Resource | 82 | @Resource | 
| 85 | private UserFeign userFeign; | ||
| 86 | |||
| 87 | @Resource | ||
| 88 | private ConfigureFeign configureFeign; | 83 | private ConfigureFeign configureFeign; | 
| 89 | 84 | ||
| 90 | /** | 85 | /** | 
| ... | @@ -332,6 +327,17 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -332,6 +327,17 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | 
| 332 | vo.setBizGuid(dto.getBizGuid()); | 327 | vo.setBizGuid(dto.getBizGuid()); | 
| 333 | vo.setPersonIncharge(entity.getJuridicalPerson()); | 328 | vo.setPersonIncharge(entity.getJuridicalPerson()); | 
| 334 | vo.setBizState("Y"); | 329 | vo.setBizState("Y"); | 
| 330 | vo.setRegistrationDate(DateUtil.getDateToLocal(entity.getRegistrationDate())); | ||
| 331 | vo.setProvince(entity.getProvince()); | ||
| 332 | vo.setCity(entity.getCity()); | ||
| 333 | vo.setDistrict(entity.getDistrict()); | ||
| 334 | vo.setCompanyAddress(String.format("%s/%s/%s",vo.getProvince(),vo.getCity(),vo.getDistrict())); | ||
| 335 | if(CollectionUtils.isEmpty(ChangeInfoUtil.areaList)){ | ||
| 336 | ChangeInfoUtil.areaList = configureFeign.getBoroughCodeName().getData(); | ||
| 337 | } | ||
| 338 | vo.setVenue(ChangeInfoUtil.getVenue(vo.getProvince(),vo.getCity(),vo.getDistrict())); | ||
| 339 | vo.setTenantLicList(getTenantLicList(entity.getBusinessLicenseJson())); | ||
| 340 | |||
| 335 | personelFeign.authTenant(vo).getData(); | 341 | personelFeign.authTenant(vo).getData(); | 
| 336 | } | 342 | } | 
| 337 | else{ | 343 | else{ | 
| ... | @@ -341,6 +347,33 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -341,6 +347,33 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | 
| 341 | 347 | ||
| 342 | } | 348 | } | 
| 343 | 349 | ||
| 350 | private List<TenantLicRQVO> getTenantLicList(String json) { | ||
| 351 | if(StringUtils.isBlank(json)){ | ||
| 352 | return null; | ||
| 353 | } | ||
| 354 | JSONArray array = JSON.parseArray(json); | ||
| 355 | if(array.size() == 0){ | ||
| 356 | return null; | ||
| 357 | } | ||
| 358 | List<TenantLicRQVO> list = new ArrayList<>(); | ||
| 359 | for(int i = 0; i < array.size(); i++){ | ||
| 360 | JSONObject obj = array.getJSONObject(i); | ||
| 361 | TenantLicRQVO item = new TenantLicRQVO(); | ||
| 362 | item.setLicenseType("1"); | ||
| 363 | |||
| 364 | //格式转换 | ||
| 365 | JSONObject itemOjb = new JSONObject(); | ||
| 366 | JSONArray itemArray = new JSONArray(); | ||
| 367 | itemOjb.put("name",obj.get("name")); | ||
| 368 | itemOjb.put("path",obj.get("url")); | ||
| 369 | itemArray.add(itemOjb); | ||
| 370 | item.setPictContentJson(JSON.toJSONString(itemArray)); | ||
| 371 | |||
| 372 | list.add(item); | ||
| 373 | } | ||
| 374 | return list; | ||
| 375 | } | ||
| 376 | |||
| 344 | /** 将此账号提交的数据需求迁移到新的企业 */ | 377 | /** 将此账号提交的数据需求迁移到新的企业 */ | 
| 345 | @Override | 378 | @Override | 
| 346 | @Transactional(rollbackFor = Exception.class) | 379 | @Transactional(rollbackFor = Exception.class) | ... | ... | 
- 
Please register or sign in to post a comment
