| | |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComActVillageDAO; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerMngDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVillageDO; |
| | | import com.panzhihua.service_community.service.ComMngVillageService; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author: llming |
| | |
| | | this.saveBatch(comMngVillageDOS); |
| | | return R.ok("共计导入实有房屋数量:" + comMngVillageDOS.size()); |
| | | } |
| | | |
| | | @Override |
| | | public R editVillage(Long villageId, ComMngVillageVO comMngVillageVO) { |
| | | ComMngVillageDO comMngVillageDO = this.baseMapper.selectById(villageId); |
| | | if (comMngVillageDO == null) { |
| | | return R.fail("id有误!"); |
| | | } |
| | | BeanUtils.copyProperties(comMngVillageVO, comMngVillageDO); |
| | | ComActDO comActDO = comActDAO.selectById(comMngVillageDO.getCommunityId()); |
| | | if (comActDO == null || comActDO.getStreetId() == null) { |
| | | return R.fail("社区没有绑定街道,请绑定后操作!"); |
| | | } |
| | | comMngVillageDO.setStreetId(comActDO.getStreetId()); |
| | | int update = this.baseMapper.update(comMngVillageDO, new LambdaQueryWrapper<ComMngVillageDO>() |
| | | .eq(ComMngVillageDO::getVillageId, villageId)); |
| | | if(update>0){ |
| | | return R.ok(comMngVillageVO); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | } |