| | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "link", "未包含联系电话"); |
| | | // Assert.hasKeyAndValue(reqJson, "link", "未包含联系电话"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setLink(reqJson.getString("link")); |
| | | if (reqJson.containsKey("ownerId")) { |
| | | ownerDto.setOwnerId(reqJson.getString("ownerId")); |
| | | } |
| | | if(reqJson.containsKey("link")){ |
| | | ownerDto.setLink(reqJson.getString("link")); |
| | | } |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwnerMembers(ownerDto); |
| | | |
| | | if (ownerDtos == null || ownerDtos.size() < 1) { |
| | |
| | | communityDto.setState("1100"); |
| | | communityDto.setCommunityIds(communityIds.toArray(new String[communityIds.size()])); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | if(communityDtos == null || communityDtos.size()<1){ |
| | | if (communityDtos == null || communityDtos.size() < 1) { |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | return ; |
| | | return; |
| | | } |
| | | for (OwnerDto tmpOwnerDto : ownerDtos) { |
| | | for (CommunityDto tmpCommunityDto : communityDtos) { |
| | |
| | | private void addOwnerAppUser(OwnerDto ownerDto, OwnerAppUserDto ownerAppUserDto) { |
| | | |
| | | OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(ownerAppUserDto, OwnerAppUserPo.class); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId(ownerDto.getMemberId()); |
| | | ownerAppUserPo.setCommunityName(ownerDto.getCommunityName()); |
| | | ownerAppUserPo.setCommunityId(ownerDto.getCommunityId()); |
| | | ownerAppUserPo.setAppUserName(ownerDto.getName()); |
| | | ownerAppUserPo.setIdCard(ownerDto.getIdCard()); |
| | | ownerAppUserPo.setOwnerTypeCd(ownerDto.getOwnerTypeCd()); |
| | | int flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("添加用户业主关系失败"); |