【DAOP-1.0】数据需求
【功能点】测试问题处理
Showing
2 changed files
with
33 additions
and
2 deletions
| ... | @@ -18,7 +18,7 @@ import java.util.Map; | ... | @@ -18,7 +18,7 @@ import java.util.Map; | 
| 18 | public interface PersonelFeign { | 18 | public interface PersonelFeign { | 
| 19 | 19 | ||
| 20 | @PostMapping(value = "/tenant/auth", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 20 | @PostMapping(value = "/tenant/auth", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 
| 21 | CommonRes<Boolean> authTenant(@RequestBody TenantRQVO vo); | 21 | CommonRes<TenantRQVO> authTenant(@RequestBody TenantRQVO vo); | 
| 22 | 22 | ||
| 23 | @PutMapping(value = "/tenant/update", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 23 | @PutMapping(value = "/tenant/update", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 
| 24 | CommonRes<Boolean> updateTenant(@RequestBody TenantRQVO vo); | 24 | CommonRes<Boolean> updateTenant(@RequestBody TenantRQVO vo); | ... | ... | 
| ... | @@ -7,7 +7,9 @@ import com.csbr.cloud.common.enums.SystemError; | ... | @@ -7,7 +7,9 @@ import com.csbr.cloud.common.enums.SystemError; | 
| 7 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; | 7 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; | 
| 8 | import com.csbr.qingcloud.portal.domain.vo.*; | 8 | import com.csbr.qingcloud.portal.domain.vo.*; | 
| 9 | import com.csbr.qingcloud.portal.feign.PersonelFeign; | 9 | import com.csbr.qingcloud.portal.feign.PersonelFeign; | 
| 10 | import com.csbr.qingcloud.portal.mybatis.entity.MfDemand; | ||
| 10 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseChangeApprove; | 11 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseChangeApprove; | 
| 12 | import com.csbr.qingcloud.portal.mybatis.service.MfDemandService; | ||
| 11 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseChangeApproveService; | 13 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseChangeApproveService; | 
| 12 | import com.csbr.qingcloud.portal.service.EnterpriseChangeApproveService; | 14 | import com.csbr.qingcloud.portal.service.EnterpriseChangeApproveService; | 
| 13 | import com.csbr.qingcloud.portal.util.ObjectUtil; | 15 | import com.csbr.qingcloud.portal.util.ObjectUtil; | 
| ... | @@ -71,6 +73,9 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -71,6 +73,9 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | 
| 71 | @Resource | 73 | @Resource | 
| 72 | private MfEnterpriseChangeApproveService mfEnterpriseChangeApproveService; | 74 | private MfEnterpriseChangeApproveService mfEnterpriseChangeApproveService; | 
| 73 | 75 | ||
| 76 | @Resource | ||
| 77 | private MfDemandService mfDemandService; | ||
| 78 | |||
| 74 | /** | 79 | /** | 
| 75 | * 企业信息分页查询 | 80 | * 企业信息分页查询 | 
| 76 | * @author xcq | 81 | * @author xcq | 
| ... | @@ -353,9 +358,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -353,9 +358,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | 
| 353 | //删除原帐号并新增正式会员 | 358 | //删除原帐号并新增正式会员 | 
| 354 | TenantRQVO vo = csbrBeanUtil.convert(entity,TenantRQVO.class); | 359 | TenantRQVO vo = csbrBeanUtil.convert(entity,TenantRQVO.class); | 
| 355 | vo.setTenantType(null); | 360 | vo.setTenantType(null); | 
| 361 | vo.setGuid(CommonUtil.newGuid()); | ||
| 356 | vo.setPersonIncharge(entity.getJuridicalPerson()); | 362 | vo.setPersonIncharge(entity.getJuridicalPerson()); | 
| 357 | vo.setBizState("Y"); | 363 | vo.setBizState("Y"); | 
| 358 | personelFeign.authTenant(vo); | 364 | vo = personelFeign.authTenant(vo).getData(); | 
| 365 | |||
| 366 | //将此账号提交的数据需求迁移到新的企业 | ||
| 367 | moveDemand(entity,vo); | ||
| 359 | } | 368 | } | 
| 360 | // 同步更新审批状态 | 369 | // 同步更新审批状态 | 
| 361 | LambdaUpdateWrapper<MfEnterprise> updateWrapper = mfEnterpriseService.csbrUpdateWrapper(MfEnterprise.class); | 370 | LambdaUpdateWrapper<MfEnterprise> updateWrapper = mfEnterpriseService.csbrUpdateWrapper(MfEnterprise.class); | 
| ... | @@ -367,6 +376,28 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -367,6 +376,28 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | 
| 367 | } | 376 | } | 
| 368 | } | 377 | } | 
| 369 | 378 | ||
| 379 | /** 将此账号提交的数据需求迁移到新的企业 */ | ||
| 380 | private void moveDemand(MfEnterprise entity,TenantRQVO vo){ | ||
| 381 | LambdaQueryWrapper<MfDemand> queryWrapper = new LambdaQueryWrapper<>(); | ||
| 382 | queryWrapper.eq(MfDemand::getCreateUserId, entity.getCreateUserId()); | ||
| 383 | mfDemandService.csbrExcludeShardingLambdaQueryWrapper(queryWrapper); | ||
| 384 | List<MfDemand> list = mfDemandService.list(queryWrapper); | ||
| 385 | if(CollectionUtils.isEmpty(list)){ | ||
| 386 | return; | ||
| 387 | } | ||
| 388 | |||
| 389 | List<MfDemand> newList = new ArrayList<>(); | ||
| 390 | for(MfDemand item : list){ | ||
| 391 | MfDemand newItem = csbrBeanUtil.convert(item,MfDemand.class,true); | ||
| 392 | newItem.setGuid(CommonUtil.newGuid()); | ||
| 393 | newItem.setTenantGuid(vo.getGuid()); | ||
| 394 | newItem.setShardingFlag(vo.getShardingFlag()); | ||
| 395 | newList.add(newItem); | ||
| 396 | } | ||
| 397 | mfDemandService.saveBatch(newList); | ||
| 398 | mfDemandService.removeByIds(list); | ||
| 399 | } | ||
| 400 | |||
| 370 | @Override | 401 | @Override | 
| 371 | public Boolean check(EnterpriseRQVO vo) { | 402 | public Boolean check(EnterpriseRQVO vo) { | 
| 372 | return true; | 403 | return true; | ... | ... | 
- 
Please register or sign in to post a comment
