| | |
| | | import com.panzhihua.common.model.dtos.community.ComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComOpsHouseDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseUndercarriageVO; |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngStructAreaDO; |
| | | import com.panzhihua.service_community.service.ComActService; |
| | | import com.panzhihua.service_community.service.ComMngStructAreaService; |
| | | import com.panzhihua.service_community.service.ComOpsHouseService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | public class HouseApi { |
| | | @Resource |
| | | private ComOpsHouseService comOpsHouseService; |
| | | @Resource |
| | | private ComMngStructAreaService comMngStructAreaService; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping("addOpsHouse") |
| | | public R addOpsHouse(@RequestBody ComOpsHouseDTO comOpsHouseDTO){ |
| | | Long houseCommunityId = comOpsHouseDTO.getHouseCommunityId(); |
| | | if(houseCommunityId!=null) { |
| | | R<ComMngStructAreaDO> r = comMngStructAreaService.detailArea(houseCommunityId); |
| | | if(R.isOk(r)&&r.getData()!=null) { |
| | | ComMngStructAreaDO comMngStructAreaDO = r.getData(); |
| | | comOpsHouseDTO.setHouseCommunityName(comMngStructAreaDO.getAreaName()); |
| | | } |
| | | |
| | | } |
| | | return comOpsHouseService.addHouse(comOpsHouseDTO); |
| | | } |
| | | |