|  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponseUtils; | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.common.webUtil.ResultCodeMsg; | 
|---|
|  |  |  | import com.dy.pipIrrBase.district.qo.DistrictQO; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoBa.BaClient; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoBa.BaDistrict; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.util.DistrictLevel; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voBa.VoDistrict; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Operation; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Content; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //return BaseResponseUtils.buildSuccess(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据区划代码查询指定级别行政区划 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/districts") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<List<VoDistrict>> getDistrictS(DistrictQO qo) { | 
|---|
|  |  |  | String aredCode = qo.getAredCode(); | 
|---|
|  |  |  | Integer level = qo.getLevel(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if((aredCode.trim().length() == 6 && level == 4) || (aredCode.trim().length() == 9 && level == 5)) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(sv.getDistrictS(qo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取开卡记录异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg("行政区划位数与级别不匹配"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|