Browse Source

巡查日志列表

master
zhangyuan 3 years ago
parent
commit
9124c19d18
  1. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEnterpriseController.java
  2. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEnterpriseService.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseChangeRecordServiceImpl.java
  4. 34
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseServiceImpl.java

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEnterpriseController.java

@ -22,6 +22,7 @@ import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcEnterpriseChangeRecordDTO;
import com.epmet.dto.form.EnterpriseFormDTO;
import com.epmet.dto.form.EnterprisePageFormDTO;
import com.epmet.dto.form.EnterprisePatrolFormDTO;
@ -100,6 +101,20 @@ public class IcEnterpriseController implements ResultDataResolver {
return new Result<PageData<EnterpriseDetailDTO>>().ok(icEnterpriseService.list(formDTO));
}
/**
* 操作日志基础表
*
* @param params
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.IcEnterpriseChangeRecordDTO>>
* @author zhy
* @date 2022/8/16 16:52
*/
@RequestMapping("page")
public Result<PageData<EnterpriseDetailDTO>> page(@RequestParam Map<String, Object> params){
PageData<EnterpriseDetailDTO> page = icEnterpriseService.page(params);
return new Result<PageData<EnterpriseDetailDTO>>().ok(page);
}
/**
* 企事业单位列表导出
* @param tokenDto

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEnterpriseService.java

@ -2,6 +2,7 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcEnterpriseChangeRecordDTO;
import com.epmet.dto.form.EnterpriseFormDTO;
import com.epmet.dto.form.EnterprisePageFormDTO;
import com.epmet.dto.form.EnterprisePatrolFormDTO;
@ -10,6 +11,7 @@ import com.epmet.dto.result.EnterprisePatrolResultDTO;
import com.epmet.entity.IcEnterpriseEntity;
import java.nio.file.Path;
import java.util.Map;
/**
* 企事业单位表
@ -68,4 +70,14 @@ public interface IcEnterpriseService extends BaseService<IcEnterpriseEntity> {
PageData<EnterpriseDetailDTO> list(EnterprisePageFormDTO formDTO);
void execAsyncExcelImport(Path fileSavePath, String taskId, String customerId, String userId);
/**
* 默认分页
*
* @param params
* @return PageData<IcEnterpriseChangeRecordDTO>
* @author generator
* @date 2022-08-16
*/
PageData<EnterpriseDetailDTO> page(Map<String, Object> params);
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseChangeRecordServiceImpl.java

@ -50,9 +50,11 @@ public class IcEnterpriseChangeRecordServiceImpl extends BaseServiceImpl<IcEnter
private QueryWrapper<IcEnterpriseChangeRecordEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
String originId = (String)params.get("originId");
QueryWrapper<IcEnterpriseChangeRecordEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(originId), "ORIGIN_ID", originId);
return wrapper;
}

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

@ -2,8 +2,11 @@ package com.epmet.service.impl;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
@ -23,6 +26,7 @@ import com.epmet.commons.tools.utils.FileUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.*;
import com.epmet.dto.IcEnterpriseChangeRecordDTO;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.form.EnterpriseFormDTO;
import com.epmet.dto.form.EnterprisePageFormDTO;
@ -413,6 +417,36 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
}
@Override
public PageData<EnterpriseDetailDTO> page(Map<String, Object> params) {
IPage<IcEnterpriseEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, EnterpriseDetailDTO.class);
}
private QueryWrapper<IcEnterpriseEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
String placeOrgName = (String)params.get("placeOrgName");
String mobile = (String)params.get("mobile");
String gridId = (String)params.get("gridId");
String placeType = (String)params.get("placeType");
String scale = (String)params.get("scale");
String result = (String)params.get("result");
QueryWrapper<IcEnterpriseEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(placeOrgName), "PLACE_ORG_NAME", placeOrgName);
wrapper.eq(StringUtils.isNotBlank(mobile), "MOBILE", mobile);
wrapper.eq(StringUtils.isNotBlank(gridId), "GRID_ID", gridId);
wrapper.eq(StringUtils.isNotBlank(placeType), "PLACE_TYPE", placeType);
wrapper.eq(StringUtils.isNotBlank(scale), "SCALE", scale);
wrapper.eq(StringUtils.isNotBlank(result), "LATEST_RESULT", result);
return wrapper;
}
private CustomerStaffInfoCacheResult queryCurrentStaff(String customerId, String userId) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId);
if (null == staffInfo) {

Loading…
Cancel
Save