public int AddResidentIdentityRelationShip(ResidentIdentityRelationShipAddViewModel residentIdentityRelationShipAddViewModel)
        {
            var tempAddViewMiddle = residentIdentityRelationShipAddViewModel.residentIdentityRelationShipAddMiddles;
            var aAddInsertModel   = _IMapper.Map <List <ResidentIdentityRelationShipAddMiddle>, List <ResidentRelationShip> >(tempAddViewMiddle);

            _residentIdentityRelationShipRepository.AddResidentIdentityRelationShip(aAddInsertModel);
            return(_residentIdentityRelationShipRepository.SaveChanges());
        }
        public ActionResult <ResidentIdentityRelationShipAddResViewModel> IdentityRelationShip_Manage_OpinionInfo_Add(ResidentIdentityRelationShipAddViewModel residentIdentityRelationShipAddViewModel)
        {
            int ResidentIdentityRelationShip_add_Count;

            //查询人员是否已存在

            //添加人员信息
            ResidentIdentityRelationShip_add_Count = _residentIdentityRelationShipService.AddResidentIdentityRelationShip(residentIdentityRelationShipAddViewModel);
            var opinionInfoAddResModel = _inhabitantFactory.GetResidentIdentityRelationShipAddResViewModel();

            if (ResidentIdentityRelationShip_add_Count > 0)
            {
                opinionInfoAddResModel.baseViewModel.IsSuccess = true;
                opinionInfoAddResModel.AddCount = ResidentIdentityRelationShip_add_Count;
                opinionInfoAddResModel.baseViewModel.Message      = "添加成功";
                opinionInfoAddResModel.baseViewModel.ResponseCode = 200;
                _ILogger.Information("增添  居民和身份  关系信息成功");
                return(Ok(opinionInfoAddResModel));
            }
            else
            {
                opinionInfoAddResModel.baseViewModel.IsSuccess = false;
                opinionInfoAddResModel.AddCount = 0;
                opinionInfoAddResModel.baseViewModel.Message      = "添加失败";
                opinionInfoAddResModel.baseViewModel.ResponseCode = 400;
                _ILogger.Information("增添  居民和身份  关系信息失败");
                return(BadRequest(opinionInfoAddResModel));
            }
        }