Browse Source

组织下的人下拉框

master
yinzuomei 3 years ago
parent
commit
e4072e7279
  1. 18
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffSelectResDTO.java
  2. 13
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
  3. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java
  4. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  5. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  6. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  7. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  8. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml

18
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffSelectResDTO.java

@ -0,0 +1,18 @@
package com.epmet.dataaggre.dto.epmetuser.result;
import lombok.Data;
import java.io.Serializable;
/**
* 工作人员下拉框
*/
@Data
public class StaffSelectResDTO implements Serializable {
private String label;
private String value;
private String name;
private String mobile;
}

13
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java

@ -21,6 +21,7 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.beans.GridMemberDataAnalysisExcelExportBean;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.form.*;
@ -179,6 +180,18 @@ public class GovOrgController {
return new Result<OrgStaffListResultDTO>().ok(govOrgService.staffList(formDTO));
}
/**
* 组织下的工作人员 下拉框
*
* @param tokenDto
* @param agencyId
* @return
*/
@PostMapping("staff-select-list/{agencyId}")
public Result<List<StaffSelectResDTO>> staffSelectList(@LoginUser TokenDto tokenDto, @PathVariable("agencyId") String agencyId) {
return new Result<List<StaffSelectResDTO>>().ok(govOrgService.staffSelectList(tokenDto.getCustomerId(), agencyId));
}
/**
* @Param formDTO
* @Description 获取当前组织下的组织添加的工作人员 组织/部门/网格下人员列表

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java

@ -20,6 +20,7 @@ package com.epmet.dataaggre.dao.epmetuser;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ListStaffResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.entity.epmetuser.CustomerStaffEntity;
import org.apache.ibatis.annotations.Mapper;
@ -71,4 +72,11 @@ public interface CustomerStaffDao extends BaseDao<CustomerStaffEntity> {
* @author sun
*/
CustomerStaffDTO selectByStaffId(@Param("staffId") String staffId);
/**
* 根据staffId查询姓名手机号
* @param staffIds
* @return
*/
List<StaffSelectResDTO> staffSelectList(@Param("staffIds") List<String> staffIds);
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java

@ -192,4 +192,11 @@ public interface EpmetUserService {
* @author sun
*/
List<GridDateIdResultDTO> getGridDateRoutineWorkList(GridLivelyFormDTO formDTO);
/**
* 根据staffId查询姓名手机号
* @param staffIds
* @return
*/
List<StaffSelectResDTO> staffSelectList(List<String> staffIds);
}

14
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -827,5 +827,19 @@ public class EpmetUserServiceImpl implements EpmetUserService {
return staffPatrolRecordDao.gridDateRoutineWorkList(formDTO);
}
/**
* 根据staffId查询姓名手机号
*
* @param staffIds
* @return
*/
@Override
public List<StaffSelectResDTO> staffSelectList(List<String> staffIds) {
if(CollectionUtils.isEmpty(staffIds)){
return new ArrayList<>();
}
return customerStaffDao.staffSelectList(staffIds);
}
}

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -2,6 +2,7 @@ package com.epmet.dataaggre.service.govorg;
import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerDepartmentDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
@ -195,4 +196,12 @@ public interface GovOrgService {
* @return
*/
BuildingInfoCache queryBuildingInfo(String buildingId);
/**
* 组织下的工作人员下拉框
* @param customerId
* @param agencyId
* @return
*/
List<StaffSelectResDTO> staffSelectList(String customerId, String agencyId);
}

18
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -31,6 +31,7 @@ import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.govorg.*;
import com.epmet.dataaggre.dto.epmetuser.result.ListStaffResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffRoleListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
import com.epmet.dataaggre.dto.govorg.*;
import com.epmet.dataaggre.dto.govorg.form.*;
import com.epmet.dataaggre.dto.govorg.result.*;
@ -1053,5 +1054,22 @@ public class GovOrgServiceImpl implements GovOrgService {
return infoCache;
}
/**
* 组织下的工作人员下拉框
*
* @param customerId
* @param agencyId
* @return
*/
@Override
public List<StaffSelectResDTO> staffSelectList(String customerId, String agencyId) {
List<String> staffIds = customerStaffAgencyDao.selectStaffList(agencyId, "agency");
if (org.springframework.util.CollectionUtils.isEmpty(staffIds)) {
return new ArrayList<>();
}
List<StaffSelectResDTO> resultDTOList = epmetUserService.staffSelectList(staffIds);
return resultDTOList;
}
}

14
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml

@ -138,4 +138,18 @@
AND USER_ID = #{staffId}
</select>
<select id="staffSelectList" parameterType="map" resultType="com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO">
SELECT
cs.USER_ID as `value`,
cs.REAL_NAME as label,
cs.MOBILE as mobile,
cs.REAL_NAME as name
FROM
customer_staff cs
WHERE
cs.del_flag = '0'
<foreach item="staffId" collection="staffIds" open="and (" separator="or" close=")">
cs.user_id = #{staffId}
</foreach>
</select>
</mapper>
Loading…
Cancel
Save