| | |
| | | unitSelectTerm.setLabel(ctUnit.getUnitName()); |
| | | unitSelectTerm.setParentId(ctUnit.getParentId()); |
| | | unitSelectTerm.setCheckable(true); |
| | | if (UserBaseConsts.UNIT_TYPE_2 == ctUnit.getUnitType()){ |
| | | if (UserBaseConsts.UNIT_TYPE_102 == ctUnit.getUnitType()){ |
| | | szbmList.add(unitSelectTerm); |
| | | } |
| | | if (UserBaseConsts.UNIT_TYPE_1 == ctUnit.getUnitType()){ |
| | | if (UserBaseConsts.UNIT_TYPE_101 == ctUnit.getUnitType()){ |
| | | qzzzxList.add(unitSelectTerm); |
| | | } |
| | | } |
| | |
| | | unitSelectTerm.setLabel(ctUnit.getUnitName()); |
| | | unitSelectTerm.setParentId(ctUnit.getParentId()); |
| | | unitSelectTerm.setCheckable(true); |
| | | if (UserBaseConsts.UNIT_TYPE_2 == ctUnit.getUnitType()){ |
| | | if (UserBaseConsts.UNIT_TYPE_102 == ctUnit.getUnitType()){ |
| | | qzbmList.add(unitSelectTerm); |
| | | } |
| | | if (UserBaseConsts.UNIT_TYPE_1 == ctUnit.getUnitType()){ |
| | | if (UserBaseConsts.UNIT_TYPE_101 == ctUnit.getUnitType()){ |
| | | zjzzzxList.add(unitSelectTerm); |
| | | } |
| | | } |
| | |
| | | unitSelectTerm.setLabel(ctUnit.getUnitName()); |
| | | unitSelectTerm.setParentId(ctUnit.getParentId()); |
| | | unitSelectTerm.setCheckable(true); |
| | | if (UserBaseConsts.UNIT_TYPE_1 == ctUnit.getUnitType()){ |
| | | if (UserBaseConsts.UNIT_TYPE_101 == ctUnit.getUnitType()){ |
| | | szbmList.add(unitSelectTerm); |
| | | } |
| | | if (UserBaseConsts.UNIT_TYPE_2 == ctUnit.getUnitType()){ |
| | | if (UserBaseConsts.UNIT_TYPE_102 == ctUnit.getUnitType()){ |
| | | qzzzxList.add(unitSelectTerm); |
| | | } |
| | | } |
| | |
| | | unitSelectTerm.setLabel(ctUnit.getUnitName()); |
| | | unitSelectTerm.setParentId(ctUnit.getParentId()); |
| | | unitSelectTerm.setCheckable(true); |
| | | if (UserBaseConsts.UNIT_TYPE_2 == ctUnit.getUnitType()){ |
| | | if (UserBaseConsts.UNIT_TYPE_102 == ctUnit.getUnitType()){ |
| | | qzbmList.add(unitSelectTerm); |
| | | } |
| | | if (UserBaseConsts.UNIT_TYPE_3 == ctUnit.getUnitType()){ |
| | | if (UserBaseConsts.UNIT_TYPE_103 == ctUnit.getUnitType()){ |
| | | zjzzzxList.add(unitSelectTerm); |
| | | } |
| | | } |
| | |
| | | ctUnitQueryWrapper.eq("id", unitId).select("parent_id"); |
| | | CtUnit loginCtUnit = mapper.selectOne(ctUnitQueryWrapper); |
| | | ctUnitQueryWrapper.clear(); |
| | | ctUnitQueryWrapper.eq("id", loginCtUnit.getParentId()).eq("unit_type", UserBaseConsts.UNIT_TYPE_1); |
| | | ctUnitQueryWrapper.eq("id", loginCtUnit.getParentId()).eq("unit_type", UserBaseConsts.UNIT_TYPE_101); |
| | | CtUnit zzzxCtUnit = mapper.selectOne(ctUnitQueryWrapper); |
| | | CtUnitDTO ctUnitDTO = new CtUnitDTO(); |
| | | BeanUtils.copyProperties(zzzxCtUnit, ctUnitDTO); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取本级综治中心 |
| | | * @param unitId 当前单位编号 |
| | | * @return |
| | | */ |
| | | public CtUnitDTO getBjZzzx(String unitId){ |
| | | try{ |
| | | CtUnitDTO ctUnitDTO = new CtUnitDTO(); |
| | | // 查询自己是否是综治中心 |
| | | CtUnit loginCtUnit = mapper.selectById(unitId); |
| | | if (UserBaseConsts.UNIT_TYPE_101 == loginCtUnit.getUnitType()){ |
| | | BeanUtils.copyProperties(loginCtUnit, ctUnitDTO); |
| | | }else { |
| | | // 查询当前单位的上级综治中心 |
| | | QueryWrapper<CtUnit> ctUnitQueryWrapper = new QueryWrapper<>(); |
| | | ctUnitQueryWrapper.eq("id", loginCtUnit.getParentId()).eq("unit_type", UserBaseConsts.UNIT_TYPE_101); |
| | | CtUnit zzzxCtUnit = mapper.selectOne(ctUnitQueryWrapper); |
| | | BeanUtils.copyProperties(zzzxCtUnit, ctUnitDTO); |
| | | } |
| | | return ctUnitDTO; |
| | | }catch (Exception e){ |
| | | log.error("[CtUnitService.getParentZzzx]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CtUnitService.getParentZzzx", e); |
| | | } |
| | | } |
| | | |
| | | public CtUnit selectUnitByGridId(String gridUnitId){ |
| | | return mapper.selectUnitByGridId(gridUnitId); |
| | | } |