|  |  | @ -482,7 +482,7 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         // *.发送初始化客户信息到mq,让监听者完成初始化操作
 | 
			
		
	
		
			
				
					|  |  |  |         InitCustomerMQMsg msgContent = new InitCustomerMQMsg(); | 
			
		
	
		
			
				
					|  |  |  |         /*InitCustomerMQMsg msgContent = new InitCustomerMQMsg(); | 
			
		
	
		
			
				
					|  |  |  |         msgContent.setCustomerId(formDTO.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         msgContent.setAgency(constructAgencyInfo4CustomerInit(paAgency)); | 
			
		
	
		
			
				
					|  |  |  |         msgContent.setStaff(constructStaffInfo4CustomerInit(paAgency.getId(), paUser)); | 
			
		
	
	
		
			
				
					|  |  | @ -493,50 +493,50 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn | 
			
		
	
		
			
				
					|  |  |  |         Result sendMsgResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(systemMsgFormDTO); | 
			
		
	
		
			
				
					|  |  |  |         if (! sendMsgResult.success()) { | 
			
		
	
		
			
				
					|  |  |  |             throw new RenException("发送(初始化客户信息)系统消息到message服务失败:{}", sendMsgResult.getInternalMsg()); | 
			
		
	
		
			
				
					|  |  |  |         }*/ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         //3.调用epmet-user服务,初始化客户对应的角色;调用access服务给角色分配权限信息
 | 
			
		
	
		
			
				
					|  |  |  |         Result initResult = epmetUserFeignClient.initGovStaffRolesForCustomer(formDTO.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         if (!initResult.success()) { | 
			
		
	
		
			
				
					|  |  |  |             throw new RenException("客户新增:调用user服务为客户初始化角色数据失败:".concat(initResult.toString())); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         ////3.调用epmet-user服务,初始化客户对应的角色;调用access服务给角色分配权限信息
 | 
			
		
	
		
			
				
					|  |  |  |         //Result initResult = epmetUserFeignClient.initGovStaffRolesForCustomer(formDTO.getCustomerId());
 | 
			
		
	
		
			
				
					|  |  |  |         //if (!initResult.success()) {
 | 
			
		
	
		
			
				
					|  |  |  |         //    throw new RenException("客户新增:调用user服务为客户初始化角色数据失败:".concat(initResult.toString()));
 | 
			
		
	
		
			
				
					|  |  |  |         //}
 | 
			
		
	
		
			
				
					|  |  |  |         //
 | 
			
		
	
		
			
				
					|  |  |  |         ////4.调用oper-customize服务,初始化客户定制化首页模板数据
 | 
			
		
	
		
			
				
					|  |  |  |         //CustomerHomeDTO initHomeForm = new CustomerHomeDTO();
 | 
			
		
	
		
			
				
					|  |  |  |         //initHomeForm.setCustomerId(formDTO.getCustomerId());
 | 
			
		
	
		
			
				
					|  |  |  |         //Result initHomeResult = operCustomizeFeignClient.init(initHomeForm);
 | 
			
		
	
		
			
				
					|  |  |  |         //if (!initHomeResult.success()) {
 | 
			
		
	
		
			
				
					|  |  |  |         //    throw new RenException("初始化客户首页数据失败:".concat(initHomeResult.getInternalMsg()));
 | 
			
		
	
		
			
				
					|  |  |  |         //}
 | 
			
		
	
		
			
				
					|  |  |  |         //
 | 
			
		
	
		
			
				
					|  |  |  |         ////5.调用gov-org服务,初始化客户根级组织信息、客户管理员信息
 | 
			
		
	
		
			
				
					|  |  |  |         //AddAgencyAndStaffFormDTO agencyAndStaff = new AddAgencyAndStaffFormDTO();
 | 
			
		
	
		
			
				
					|  |  |  |         ////客户组织信息
 | 
			
		
	
		
			
				
					|  |  |  |         //CustomerAgencyDTO agencyDTO = new CustomerAgencyDTO();
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyDTO.setId(paAgency.getId());
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyDTO.setCustomerId(formDTO.getCustomerId());
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyDTO.setOrganizationName(paAgency.getAgencyName());
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyDTO.setLevel(paAgency.getLevel());
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyDTO.setAreaCode(paAgency.getAreaCode());
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyDTO.setProvince(paAgency.getProvince());
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyDTO.setCity(paAgency.getCity());
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyDTO.setDistrict(paAgency.getDistrict());
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyAndStaff.setAgencyDTO(agencyDTO);
 | 
			
		
	
		
			
				
					|  |  |  |         //
 | 
			
		
	
		
			
				
					|  |  |  |         ////客户管理员信息
 | 
			
		
	
		
			
				
					|  |  |  |         //AdminStaffFromDTO staffSubmitFrom = new AdminStaffFromDTO();
 | 
			
		
	
		
			
				
					|  |  |  |         //staffSubmitFrom.setCustomerId(formDTO.getCustomerId());
 | 
			
		
	
		
			
				
					|  |  |  |         //staffSubmitFrom.setAgencyId(paAgency.getId());
 | 
			
		
	
		
			
				
					|  |  |  |         //staffSubmitFrom.setGender(Integer.parseInt(paUser.getGender()));
 | 
			
		
	
		
			
				
					|  |  |  |         //staffSubmitFrom.setMobile(paUser.getPhone());
 | 
			
		
	
		
			
				
					|  |  |  |         //staffSubmitFrom.setName(paUser.getRealName());
 | 
			
		
	
		
			
				
					|  |  |  |         //staffSubmitFrom.setWorkType(UserWorkType.FULL_TIME);
 | 
			
		
	
		
			
				
					|  |  |  |         //agencyAndStaff.setStaffDTO(staffSubmitFrom);
 | 
			
		
	
		
			
				
					|  |  |  |         //
 | 
			
		
	
		
			
				
					|  |  |  |         //Result agencyResult = govOrgOpenFeignClient.saveRootAgency(agencyAndStaff);
 | 
			
		
	
		
			
				
					|  |  |  |         //if (!agencyResult.success()) {
 | 
			
		
	
		
			
				
					|  |  |  |         //    throw new RenException(agencyResult.getCode(), agencyResult.getInternalMsg());
 | 
			
		
	
		
			
				
					|  |  |  |         //}
 | 
			
		
	
		
			
				
					|  |  |  |         //4.调用oper-customize服务,初始化客户定制化首页模板数据
 | 
			
		
	
		
			
				
					|  |  |  |         CustomerHomeDTO initHomeForm = new CustomerHomeDTO(); | 
			
		
	
		
			
				
					|  |  |  |         initHomeForm.setCustomerId(formDTO.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         Result initHomeResult = operCustomizeFeignClient.init(initHomeForm); | 
			
		
	
		
			
				
					|  |  |  |         if (!initHomeResult.success()) { | 
			
		
	
		
			
				
					|  |  |  |             throw new RenException("初始化客户首页数据失败:".concat(initHomeResult.getInternalMsg())); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         //5.调用gov-org服务,初始化客户根级组织信息、客户管理员信息
 | 
			
		
	
		
			
				
					|  |  |  |         AddAgencyAndStaffFormDTO agencyAndStaff = new AddAgencyAndStaffFormDTO(); | 
			
		
	
		
			
				
					|  |  |  |         //客户组织信息
 | 
			
		
	
		
			
				
					|  |  |  |         CustomerAgencyDTO agencyDTO = new CustomerAgencyDTO(); | 
			
		
	
		
			
				
					|  |  |  |         agencyDTO.setId(paAgency.getId()); | 
			
		
	
		
			
				
					|  |  |  |         agencyDTO.setCustomerId(formDTO.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         agencyDTO.setOrganizationName(paAgency.getAgencyName()); | 
			
		
	
		
			
				
					|  |  |  |         agencyDTO.setLevel(paAgency.getLevel()); | 
			
		
	
		
			
				
					|  |  |  |         agencyDTO.setAreaCode(paAgency.getAreaCode()); | 
			
		
	
		
			
				
					|  |  |  |         agencyDTO.setProvince(paAgency.getProvince()); | 
			
		
	
		
			
				
					|  |  |  |         agencyDTO.setCity(paAgency.getCity()); | 
			
		
	
		
			
				
					|  |  |  |         agencyDTO.setDistrict(paAgency.getDistrict()); | 
			
		
	
		
			
				
					|  |  |  |         agencyAndStaff.setAgencyDTO(agencyDTO); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         //客户管理员信息
 | 
			
		
	
		
			
				
					|  |  |  |         AdminStaffFromDTO staffSubmitFrom = new AdminStaffFromDTO(); | 
			
		
	
		
			
				
					|  |  |  |         staffSubmitFrom.setCustomerId(formDTO.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         staffSubmitFrom.setAgencyId(paAgency.getId()); | 
			
		
	
		
			
				
					|  |  |  |         staffSubmitFrom.setGender(Integer.parseInt(paUser.getGender())); | 
			
		
	
		
			
				
					|  |  |  |         staffSubmitFrom.setMobile(paUser.getPhone()); | 
			
		
	
		
			
				
					|  |  |  |         staffSubmitFrom.setName(paUser.getRealName()); | 
			
		
	
		
			
				
					|  |  |  |         staffSubmitFrom.setWorkType(UserWorkType.FULL_TIME); | 
			
		
	
		
			
				
					|  |  |  |         agencyAndStaff.setStaffDTO(staffSubmitFrom); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         Result agencyResult = govOrgOpenFeignClient.saveRootAgency(agencyAndStaff); | 
			
		
	
		
			
				
					|  |  |  |         if (!agencyResult.success()) { | 
			
		
	
		
			
				
					|  |  |  |             throw new RenException(agencyResult.getCode(), agencyResult.getInternalMsg()); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         //6.更新第三方数据库中客户数据状态为已初始化
 | 
			
		
	
		
			
				
					|  |  |  |         String customerUrl = "https://epmet-cloud.elinkservice.cn/api/third/pacustomer/updatecustomer/" + formDTO.getCustomerId(); | 
			
		
	
	
		
			
				
					|  |  | 
 |