| | |
| | | oldSpouseList.add(oldSpouse); |
| | | } |
| | | |
| | | //统一封装返回 |
| | | HashMap<String, Object> resultMap = new HashMap<>(); |
| | | resultMap.put("myInfo",myself); |
| | | resultMap.put("spouseInfo",spouse); |
| | | resultMap.put("marryInfo",myMarryInfo); |
| | | resultMap.put("oldSpouseInfo",oldSpouseList); |
| | | // //统一封装返回 |
| | | // HashMap<String, Object> resultMap = new HashMap<>(); |
| | | // resultMap.put("myInfo",myself); |
| | | // resultMap.put("spouseInfo",spouse); |
| | | // resultMap.put("marryInfo",myMarryInfo); |
| | | // resultMap.put("oldSpouseInfo",oldSpouseList); |
| | | |
| | | return AjaxResult.success(resultMap); |
| | | //转成DTO返回 |
| | | MarryInfoDto marryInfoDto = MarryInfoToDto(myMarryInfo, oldSpouseList, myself, spouse); |
| | | return AjaxResult.success(marryInfoDto); |
| | | } |
| | | |
| | | private MarryInfoDto MarryInfoToDto(ZMarry myMarryInfo,List<MarryUser> oldSpouseList,MarryUser myself,MarryUser spouse){ |
| | | MarryInfoDto marryInfoDto = new MarryInfoDto(); |
| | | marryInfoDto.setId(myself.getId()); |
| | | marryInfoDto.setName(myself.getName()); |
| | | marryInfoDto.setBirthday(myself.getBirthday()); |
| | | marryInfoDto.setAddress(myself.getAddress()); |
| | | marryInfoDto.setWorkAddress(myself.getWorkAddress()); |
| | | marryInfoDto.setMarryStatus(myself.getMarryStatus()); |
| | | marryInfoDto.setSex(myself.getSex()); |
| | | marryInfoDto.setNation(myself.getNation()); |
| | | marryInfoDto.setPhone(myself.getPhone()); |
| | | |
| | | marryInfoDto.setSpouseId(spouse.getId()); |
| | | marryInfoDto.setSpouseName(spouse.getName()); |
| | | marryInfoDto.setSpouseBirthday(spouse.getBirthday()); |
| | | marryInfoDto.setSpouseAddress(spouse.getAddress()); |
| | | marryInfoDto.setSpouseWorkAddress(spouse.getWorkAddress()); |
| | | marryInfoDto.setSpouseMarryStatus(spouse.getMarryStatus()); |
| | | marryInfoDto.setSpouseSex(spouse.getSex()); |
| | | marryInfoDto.setSpouseNation(spouse.getNation()); |
| | | marryInfoDto.setSpousePhone(spouse.getPhone()); |
| | | |
| | | marryInfoDto.setMarryId(myMarryInfo.getId()); |
| | | marryInfoDto.setBearStatus(myMarryInfo.getBearStatus()); |
| | | marryInfoDto.setHandbookStatus(myMarryInfo.getHandbookStatus()); |
| | | marryInfoDto.setHandbookTime(myMarryInfo.getHandbookTime()); |
| | | marryInfoDto.setOneBorn(myMarryInfo.getOneBorn()); |
| | | marryInfoDto.setOneBornTime(myMarryInfo.getOneBornTime()); |
| | | marryInfoDto.setContent(myMarryInfo.getContent()); |
| | | marryInfoDto.setRemark(myMarryInfo.getRemark()); |
| | | marryInfoDto.setMarryTime(myMarryInfo.getMarryTime()); |
| | | |
| | | marryInfoDto.setOldSpouseList(oldSpouseList); |
| | | return marryInfoDto; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Transactional |
| | | public AjaxResult addInfo(MarryInfoDto marryInfoDto){ |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |