| | |
| | | package com.dy.pipIrrBase.district; |
| | | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.mybatis.envm.Deleted; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | |
| | | BaDistrict po = DistrictVoMapper.INSTANCT.convert(vo); |
| | | int count; |
| | | try { |
| | | BaDistrict supperPo = this.sv.selectById(po.supperId) ; |
| | | if(supperPo == null){ |
| | | return BaseResponseUtils.buildFail("出错,未得到上级行政区") ; |
| | | }else{ |
| | | po.level = DistrictLevel.get((byte)(supperPo.level.code + 1)) ; |
| | | } |
| | | po.deleted = Deleted.NO ; |
| | | count = this.sv.save(po); |
| | | } catch (Exception e) { |
| | | log.error("保存行政区异常", e); |