Browse Source

Merge remote-tracking branch 'origin/dev_5big_coverage' into dev_5big_coverage

master
wangxianzhang 3 years ago
parent
commit
969fb71743
  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
  9. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EnterpriseDetailDTO.java
  10. 19
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseServiceImpl.java
  11. 6
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.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>

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EnterpriseDetailDTO.java

@ -99,6 +99,10 @@ public class EnterpriseDetailDTO implements Serializable {
*/
private String latestResult;
/**
* 最新巡查结果0:合格 1:不合格
*/
private String latestResultName;
/**
* 最新检查时间
*/

19
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseServiceImpl.java

@ -166,23 +166,28 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
*/
@Override
public EnterpriseDetailDTO queryEnterpriseDetail(String customerId, String enterpriseId) {
IcEnterpriseEntity enterpriseEntity=baseDao.selectById(enterpriseId);
if(null==enterpriseEntity){
IcEnterpriseEntity enterpriseEntity = baseDao.selectById(enterpriseId);
if (null == enterpriseEntity) {
return null;
}
EnterpriseDetailDTO resultDto=ConvertUtils.sourceToTarget(enterpriseEntity,EnterpriseDetailDTO.class);
EnterpriseDetailDTO resultDto = ConvertUtils.sourceToTarget(enterpriseEntity, EnterpriseDetailDTO.class);
resultDto.setEnterpriseId(enterpriseId);
GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(resultDto.getGridId());
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(resultDto.getGridId());
if (null != gridInfoCache) {
resultDto.setGridName(gridInfoCache.getGridName());
resultDto.setAgencyName(gridInfoCache.getAgencyName());
}
String placeTypeName=coverageCategoryDictDao.selectCategoryName(customerId, CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode(),resultDto.getPlaceType());
String placeTypeName = coverageCategoryDictDao.selectCategoryName(customerId, CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode(), resultDto.getPlaceType());
resultDto.setPlaceTypeName(placeTypeName);
//规模名称
Result<Map<String, String>> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
resultDto.setScaleName(dictMap.containsKey(resultDto.getScale())?dictMap.get(resultDto.getScale()):StrConstant.EPMETY_STR);
resultDto.setScaleName(dictMap.containsKey(resultDto.getScale()) ? dictMap.get(resultDto.getScale()) : StrConstant.EPMETY_STR);
if (StringUtils.isNotBlank(enterpriseEntity.getLatestResult()) && "0".equals(enterpriseEntity.getLatestResult())) {
resultDto.setLatestResultName("合格");
} else if (StringUtils.isNotBlank(enterpriseEntity.getLatestResult()) && "1".equals(enterpriseEntity.getLatestResult())) {
resultDto.setLatestResultName("不合格");
}
return resultDto;
}

6
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml

@ -52,6 +52,12 @@
ie.MOBILE,
ie.SOURCE_TYPE,
ie.LATEST_RESULT,
(
case when ie.LATEST_RESULT ='0'then '合格'
when ie.LATEST_RESULT='1' then '不合格'
else ''
end
)as latestResultName,
ie.LATEST_PATROL_TIME
FROM
ic_enterprise ie

Loading…
Cancel
Save