Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
| | |
| | | @ApiOperation("根据部门id及分类id获取导办用户") |
| | | @GetMapping("/selectListByDepartmentId") |
| | | @Authorization |
| | | public ResultData selectListByDepartmentId(@RequestParam("departmentId") String departmentId, @RequestParam("classifyId") String classifyId){ |
| | | public ResultData selectListByDepartmentId(@RequestParam("departmentId") String departmentId, |
| | | @RequestParam("classifyId") String classifyId){ |
| | | return ResultData.success(IUserService.selectListByDepartmentId(departmentId,classifyId)); |
| | | } |
| | | |
| | |
| | | package com.dg.core.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.OrganizationChartEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过父级id查询对应机构下的全部部门id |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "通过父级id查询对应机构下的全部部门",response = OrganizationChartEntity.class) |
| | | @GetMapping("/getdepartment") |
| | | public TableDataInfo getIds(@RequestParam(value = "department",required = false) String departmentId) |
| | | { |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | List<OrganizationChartEntity> lists = iOrganizationChartService.selectConfigList(departmentId,""); |
| | | if(lists.size()<1) |
| | | { |
| | | lists.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | | } |
| | | ids=disposestreetId(lists); |
| | | if(ids.size()<1) |
| | | { |
| | | return null; |
| | | } |
| | | // ids.add(streetId); |
| | | ids.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | | return getDataTable(ids); |
| | | } |
| | | |
| | | |
| | | //递归取id |
| | | private List<OrganizationChartEntity> disposestreetId(List<OrganizationChartEntity> lists) |
| | | { |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | for (OrganizationChartEntity sysStreet:lists) |
| | | { |
| | | ids.add(sysStreet); |
| | | if(sysStreet.getChild()!=null && sysStreet.getChild().size()>0) |
| | | { |
| | | ids.addAll(disposestreetId(sysStreet.getChild())); |
| | | } |
| | | else |
| | | { |
| | | ids.add(sysStreet); |
| | | } |
| | | } |
| | | return ids; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | private String contactNumber; |
| | | |
| | | /** |
| | | * areaList |
| | | */ |
| | | @ApiModelProperty("areaList") |
| | | private String areaList; |
| | | |
| | | /** |
| | | * 机构等级 |
| | | */ |
| | | @ApiModelProperty("部门应用") |
| | |
| | | <id property="contactNumber" column="contact_number" /> |
| | | <id property="departmentalApplication" column="departmental_application" /> |
| | | <id property="updateUserId" column="update_user_id" /> |
| | | <id property="areaList" column="area_list" /> |
| | | |
| | | |
| | | </resultMap> |
| | |
| | | city, |
| | | district, |
| | | village, |
| | | (select name from area_code_2022 where city=area_code_2022.code) as cityName, |
| | | (select name from area_code_2022 where district=area_code_2022.code) as districtName, |
| | | (select name from area_code_2022 where village=area_code_2022.code) as villageName, |
| | | detailed_address, |
| | | grade, |
| | | resume,contact_number |
| | | resume,contact_number,area_list |
| | | FROM |
| | | automessage_organization_chart |
| | | </sql> |
| | |
| | | <if test="village != null and village != '' ">village,</if> |
| | | <if test="detailedAddress != null and detailedAddress != '' ">detailed_address,</if> |
| | | <if test="grade != null and grade != '' ">grade,</if> |
| | | <if test="areaList != null and areaList != '' ">area_list,</if> |
| | | update_time, |
| | | create_time |
| | | )values( |
| | |
| | | <if test="village != null and village != '' ">#{village},</if> |
| | | <if test="detailedAddress != null and detailedAddress != '' ">#{detailedAddress},</if> |
| | | <if test="grade != null and grade != '' ">#{grade},</if> |
| | | <if test="areaList != null and areaList != '' ">#{areaList},</if> |
| | | sysdate(), |
| | | sysdate() |
| | | ) |
| | |
| | | <if test="grade != null and grade != '' ">grade=#{grade},</if> |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if> |
| | | <if test="updateUserId != null">update_user_id=#{updateUserId},</if> |
| | | <if test="areaList != null and areaList != '' ">area_list=#{areaList},</if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id= #{id} |