Browse Source

修改:【公共服务图层】新增,导入,列表,修改:增加片区民警+网格员信息参数

master
wxz 3 years ago
parent
commit
b3ec180bc4
  1. 15
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPublicServiceAddEditFormDTO.java
  2. 18
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcPublicServiceListResultDTO.java
  3. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingShanScreenPublicServicePlaceListByCateRstDTO.java
  4. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingShanScreenStatsByCategoryRstDTO.java
  5. 35
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPublicServiceController.java
  6. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPublicServiceDao.java
  7. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPublicServiceEntity.java
  8. 35
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPublicServiceExcel.java
  9. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPublicServiceService.java
  10. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPublicServiceServiceImpl.java
  11. 7
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPublicServiceDao.xml

15
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPublicServiceAddEditFormDTO.java

@ -76,4 +76,19 @@ public class IcPublicServiceAddEditFormDTO implements Serializable {
private String customerId;
private String userId;
/**
* 片区sir名字[灵山]
*/
private String policeName;
/**
* 片区sir电话[灵山]
*/
private String policePhone;
/**
* 网格员id[灵山]
*/
private String griderId;
}

18
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcPublicServiceListResultDTO.java

@ -75,4 +75,22 @@ public class IcPublicServiceListResultDTO implements Serializable {
*/
private String mobile;
/**
* 片区sir名字[灵山]
*/
private String policeName;
/**
* 片区sir电话[灵山]
*/
private String policePhone;
/**
* 网格员id[灵山]
*/
private String griderId;
private String griderName;
private String griderPhone;
}

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/ListByCategory.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingShanScreenPublicServicePlaceListByCateRstDTO.java

@ -3,7 +3,7 @@ package com.epmet.dto.result.lingshan;
import lombok.Data;
@Data
public class ListByCategory {
public class LingShanScreenPublicServicePlaceListByCateRstDTO {
/**
* 资源名称

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/StatsByCategoryRstDTO.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingShanScreenStatsByCategoryRstDTO.java

@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class StatsByCategoryRstDTO {
public class LingShanScreenStatsByCategoryRstDTO {
/**
* 分类

35
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPublicServiceController.java

@ -11,11 +11,13 @@ import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
@ -30,13 +32,15 @@ import com.epmet.dto.form.IcPublicServiceListFormDTO;
import com.epmet.dto.form.IcSuperiorResourceAddEditFormDTO;
import com.epmet.dto.result.IcPublicServiceListResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.lingshan.StatsByCategoryRstDTO;
import com.epmet.dto.result.lingshan.LingShanScreenPublicServicePlaceListByCateRstDTO;
import com.epmet.dto.result.lingshan.LingShanScreenStatsByCategoryRstDTO;
import com.epmet.excel.IcPublicServiceExcel;
import com.epmet.service.IcPublicServiceService;
import com.epmet.utils.ImportTaskUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.springframework.beans.factory.annotation.Autowired;
@ -228,7 +232,7 @@ public class IcPublicServiceController implements ResultDataResolver {
}
/**
* @Description: 分类统计
* @Description: 灵山大屏分类统计
* @param orgType:
* @param orgId:
* @Return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.lingshan.StatsByCategoryRstDTO>>
@ -236,14 +240,29 @@ public class IcPublicServiceController implements ResultDataResolver {
* @Date: 2023/5/30 9:20 AM
*/
@GetMapping("lingshan/screen/statsByCategory")
public Result<List<StatsByCategoryRstDTO>> lingshanScreenStatsByCategory(@RequestParam("orgType") String orgType,
@RequestParam("orgId") String orgId) {
public Result<List<LingShanScreenStatsByCategoryRstDTO>> lingshanScreenStatsByCategory(@RequestParam("orgType") String orgType,
@RequestParam("orgId") String orgId) {
List<StatsByCategoryRstDTO> l = icPublicServiceService.lingshanScreenStatsByCategory(orgType, orgId);
return new Result<List<StatsByCategoryRstDTO>>().ok(l);
List<LingShanScreenStatsByCategoryRstDTO> l = icPublicServiceService.lingshanScreenStatsByCategory(orgType, orgId);
return new Result<List<LingShanScreenStatsByCategoryRstDTO>>().ok(l);
}
// @GetMapping("lingshan/screen/listByCategory")
// public Result<>
/**
* @Description: 灵山大屏查询组织下某个类别的场所列表带坐标打点
* @param orgType:
* @param orgId:
* @param category:
* @Return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.lingshan.LingShanScreenPublicServicePlaceListByCateRstDTO>>
* @Author: wangxianzhang
* @Date: 2023/5/30 1:50 PM
*/
@GetMapping("lingshan/screen/listByCategory")
public Result<List<LingShanScreenPublicServicePlaceListByCateRstDTO>> lingshanScreenListByCategory(@RequestParam("orgType") String orgType,
@RequestParam("orgId") String orgId,
@RequestParam("category") String category) {
List<LingShanScreenPublicServicePlaceListByCateRstDTO> rl = icPublicServiceService.lingshanScreenListByCategory(orgId, orgType, category);
return new Result<List<LingShanScreenPublicServicePlaceListByCateRstDTO>>().ok(rl);
}
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPublicServiceDao.java

@ -3,7 +3,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.IcPublicServiceListFormDTO;
import com.epmet.dto.result.IcPublicServiceListResultDTO;
import com.epmet.dto.result.lingshan.StatsByCategoryRstDTO;
import com.epmet.dto.result.lingshan.LingShanScreenStatsByCategoryRstDTO;
import com.epmet.entity.IcPublicServiceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -35,5 +35,5 @@ public interface IcPublicServiceDao extends BaseDao<IcPublicServiceEntity> {
* @Author: wangxianzhang
* @Date: 2023/5/30 9:44 AM
*/
List<StatsByCategoryRstDTO> lingshanScreenStatsByCategory(@Param("orgIdPath") String orgIdPath, @Param("customerId") String customerId);
List<LingShanScreenStatsByCategoryRstDTO> lingshanScreenStatsByCategory(@Param("orgIdPath") String orgIdPath, @Param("customerId") String customerId);
}

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPublicServiceEntity.java

@ -83,6 +83,21 @@ public class IcPublicServiceEntity extends BaseEpmetEntity {
*/
private String mobile;
/**
* 片区sir名字[灵山]
*/
private String policeName;
/**
* 片区sir电话[灵山]
*/
private String policePhone;
/**
* 网格员id[灵山]
*/
private String griderId;
/**
* 用于聚合统计
*

35
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPublicServiceExcel.java

@ -1,5 +1,6 @@
package com.epmet.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
@ -46,6 +47,40 @@ public class IcPublicServiceExcel {
@ColumnWidth(20)
private String mobile;
/**
* 片区sir名字[灵山]
*/
@ExcelProperty(value = "片区民警")
@ColumnWidth(20)
private String policeName;
/**
* 片区sir电话[灵山]
*/
@ExcelProperty(value = "片区民警电话")
@ColumnWidth(20)
private String policePhone;
/**
* 网格员电话[灵山]excel中不体现
*/
@ExcelIgnore
private String griderId;
/**
* 网格员[灵山]
*/
@ExcelProperty(value = "网格员")
@ColumnWidth(20)
private String griderName;
/**
* 网格员电话[灵山]
*/
@ExcelProperty(value = "网格员电话")
@ColumnWidth(20)
private String griderPhone;
@Data
public static class RowRemarkMessage {

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPublicServiceService.java

@ -6,7 +6,8 @@ import com.epmet.dto.IcPublicServiceDTO;
import com.epmet.dto.form.IcPublicServiceAddEditFormDTO;
import com.epmet.dto.form.IcPublicServiceListFormDTO;
import com.epmet.dto.result.IcPublicServiceListResultDTO;
import com.epmet.dto.result.lingshan.StatsByCategoryRstDTO;
import com.epmet.dto.result.lingshan.LingShanScreenPublicServicePlaceListByCateRstDTO;
import com.epmet.dto.result.lingshan.LingShanScreenStatsByCategoryRstDTO;
import com.epmet.entity.IcPublicServiceEntity;
import java.nio.file.Path;
@ -73,5 +74,7 @@ public interface IcPublicServiceService extends BaseService<IcPublicServiceEntit
void importExcel(Path fileSavePath, String taskId);
List<StatsByCategoryRstDTO> lingshanScreenStatsByCategory(String orgType, String orgId);
List<LingShanScreenStatsByCategoryRstDTO> lingshanScreenStatsByCategory(String orgType, String orgId);
List<LingShanScreenPublicServicePlaceListByCateRstDTO> lingshanScreenListByCategory(String orgId, String orgType, String category);
}

27
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPublicServiceServiceImpl.java

@ -26,9 +26,9 @@ import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.result.IcCoverageCategoryDictListResultDTO;
import com.epmet.dto.result.IcPublicServiceListResultDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.lingshan.StatsByCategoryRstDTO;
import com.epmet.dto.result.lingshan.LingShanScreenPublicServicePlaceListByCateRstDTO;
import com.epmet.dto.result.lingshan.LingShanScreenStatsByCategoryRstDTO;
import com.epmet.entity.IcPublicServiceEntity;
import com.epmet.entity.IcSuperiorResourceEntity;
import com.epmet.excel.IcPublicServiceExcel;
import com.epmet.excel.handler.IcPublicServiceExcelImportListener;
import com.epmet.feign.EpmetAdminOpenFeignClient;
@ -100,6 +100,18 @@ public class IcPublicServiceServiceImpl extends BaseServiceImpl<IcPublicServiceD
//列表/导出查询
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
List<IcPublicServiceListResultDTO> list = baseDao.selectPublicServiceList(formDTO);
// 网格员信息填充
list.stream().forEach(e -> {
if (org.apache.commons.lang.StringUtils.isNotBlank(e.getGriderId())) {
CustomerStaffInfoCacheResult griderInfo = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), e.getGriderId());
if (griderInfo != null) {
e.setGriderName(griderInfo.getRealName());
e.setGriderPhone(griderInfo.getMobile());
}
}
});
PageInfo<IcPublicServiceListResultDTO> pageInfo = new PageInfo<>(list);
//封装类别数据
@ -312,7 +324,7 @@ public class IcPublicServiceServiceImpl extends BaseServiceImpl<IcPublicServiceD
}
@Override
public List<StatsByCategoryRstDTO> lingshanScreenStatsByCategory(String orgType, String orgId) {
public List<LingShanScreenStatsByCategoryRstDTO> lingshanScreenStatsByCategory(String orgType, String orgId) {
// 先拿pids
String orgIdPath;
if (StringUtils.isAnyBlank(orgType, orgId)) {
@ -329,4 +341,13 @@ public class IcPublicServiceServiceImpl extends BaseServiceImpl<IcPublicServiceD
// 查询
return baseDao.lingshanScreenStatsByCategory(orgIdPath, EpmetRequestHolder.getLoginUserCustomerId());
}
@Override
public List<LingShanScreenPublicServicePlaceListByCateRstDTO> lingshanScreenListByCategory(String orgId, String orgType, String category) {
return null;
}
}

7
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPublicServiceDao.xml

@ -82,7 +82,10 @@
longitude longitude,
latitude latitude,
PRINCIPAL AS principal,
MOBILE AS mobile
MOBILE AS mobile,
POLICE_NAME,
POLICE_PHONE,
GRIDER_ID
FROM
ic_public_service
WHERE
@ -107,7 +110,7 @@
<!--灵山大屏:各类别服务的数量统计-->
<select id="lingshanScreenStatsByCategory"
resultType="com.epmet.dto.result.lingshan.StatsByCategoryRstDTO">
resultType="com.epmet.dto.result.lingshan.LingShanScreenStatsByCategoryRstDTO">
select d.CATEGORY_KEY category, d.CATEGORY_NAME name, count(*) total
from ic_coverage_category_dict d
left join ic_public_service ps

Loading…
Cancel
Save