| | |
| | | // 接收村编号(主键) |
| | | Long villageId = po.getVillageId(); |
| | | |
| | | /** |
| | | * 获取5级行政区划信息 |
| | | */ |
| | | Map map_districts = Optional.ofNullable(divideSv.getDistrictsByVillageId(villageId)).orElse(new HashMap()); |
| | | if(map_districts.size() <= 0) { |
| | | return BaseResponseUtils.buildFail("区划信息有误"); |
| | | } |
| | | |
| | | PrDivide prDivide = DtoToDividePojo.INSTANCT.po2vo(po); |
| | | |
| | | Long countryId = Long.parseLong(map_districts.get("countryId").toString()); |
| | | Long townId = Long.parseLong(map_districts.get("townId").toString()); |
| | | prDivide.setCountyid(countryId); |
| | | prDivide.setTownid(townId); |
| | | if (villageId!=null){ |
| | | /** |
| | | * 获取5级行政区划信息 |
| | | */ |
| | | Map map_districts = Optional.ofNullable(divideSv.getDistrictsByVillageId(villageId)).orElse(new HashMap()); |
| | | if(map_districts.size() <= 0) { |
| | | return BaseResponseUtils.buildFail("区划信息有误"); |
| | | } |
| | | Long countryId = Long.parseLong(map_districts.get("countryId").toString()); |
| | | Long townId = Long.parseLong(map_districts.get("townId").toString()); |
| | | prDivide.setCountyid(countryId); |
| | | prDivide.setTownid(townId); |
| | | } |
| | | |
| | | Date operateTime = new Date(); |
| | | prDivide.setOperatedt(operateTime); |
| | |
| | | // 接收村编号(主键) |
| | | Long villageId = po.getVillageid(); |
| | | |
| | | /** |
| | | * 获取5级行政区划信息 |
| | | */ |
| | | Map map_districts = Optional.ofNullable(divideSv.getDistrictsByVillageId(villageId)).orElse(new HashMap()); |
| | | if(map_districts.size() <= 0) { |
| | | return BaseResponseUtils.buildFail("区划信息有误"); |
| | | if (villageId!=null){ |
| | | /** |
| | | * 获取5级行政区划信息 |
| | | */ |
| | | Map map_districts = Optional.ofNullable(divideSv.getDistrictsByVillageId(villageId)).orElse(new HashMap()); |
| | | if(map_districts.size() <= 0) { |
| | | return BaseResponseUtils.buildFail("区划信息有误"); |
| | | } |
| | | Long countryId = Long.parseLong(map_districts.get("countryId").toString()); |
| | | Long townId = Long.parseLong(map_districts.get("townId").toString()); |
| | | po.setCountyid(countryId); |
| | | po.setTownid(townId); |
| | | } |
| | | |
| | | Long countryId = Long.parseLong(map_districts.get("countryId").toString()); |
| | | Long townId = Long.parseLong(map_districts.get("townId").toString()); |
| | | |
| | | po.setCountyid(countryId); |
| | | po.setTownid(townId); |
| | | |
| | | Date operateTime = new Date(); |
| | | po.setOperatedt(operateTime); |