Browse Source

网格化事件信息新分页接口

master
HAHA 3 years ago
parent
commit
ab271f9a98
  1. 35
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/NewWghSjxxFormDTO.java
  2. 43
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java
  3. 19
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java
  4. 15
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java
  5. 13
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java
  6. 21
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java
  7. 26
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml

35
epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/NewWghSjxxFormDTO.java

@ -0,0 +1,35 @@
package com.epmet.opendata.dto.form;
import lombok.Data;
import java.io.Serializable;
@Data
public class NewWghSjxxFormDTO implements Serializable {
private static final long serialVersionUID = -4846956644682609996L;
/**
* 网格员名称
*/
private String wgymc;
/**
* 街道标签
*/
private String ssjdbq;
/**
* 社区标签
*/
private String sssqbq;
/**
* 核查意见
*/
private String hcyj;
private Integer page;
private Integer limit;
}

43
epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java

@ -0,0 +1,43 @@
package com.epmet.opendata.dto.result;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class NewWghSjxxResultDTO implements Serializable {
private static final long serialVersionUID = -4088593179578850358L;
/**
* 网格员标签
*/
private String wgymc;
/**
* 所属街道标签
*/
private String ssjdbq;
/**
* 所属社区标签
*/
private String sssqbq;
/**
* 核查意见
*/
private String hcyj;
/**
* 核查时间
*/
private Date hcsj;
/**
* 事件描述
*/
private String sjms;
}

19
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java

@ -1,7 +1,9 @@
package com.epmet.opendata.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -10,7 +12,10 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.opendata.dto.form.NewWghSjxxFormDTO;
import com.epmet.opendata.dto.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.NewWghSjxxResultDTO;
import com.epmet.opendata.dto.result.WghSjxxResultDTO;
import com.epmet.opendata.dto.wgh.WghSjxxDTO;
import com.epmet.opendata.excel.WghSjxxExcel;
import com.epmet.opendata.service.WghSjxxService;
@ -93,4 +98,18 @@ public class WghSjxxController {
return new Result();
}
/**
* 新的事件信息分页
*
* @param form
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result
* @author LZN
* @date 2022/7/5 15:48
*/
@PostMapping("todo/wghSjxxPage")
public Result getWghSjxxPage(@RequestBody NewWghSjxxFormDTO form, @LoginUser TokenDto tokenDto) {
PageData<NewWghSjxxResultDTO> dto = wghSjxxService.getWghSjxxPage(form);
return new Result<PageData<NewWghSjxxResultDTO>>().ok(dto);
}
}

15
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java

@ -2,8 +2,13 @@ package com.epmet.opendata.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.opendata.dto.form.NewWghSjxxFormDTO;
import com.epmet.opendata.dto.result.NewWghSjxxResultDTO;
import com.epmet.opendata.entity.WghSjxxEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 事件信息
@ -23,4 +28,14 @@ public interface WghSjxxDao extends BaseDao<WghSjxxEntity> {
* @date 2022/7/5 14:18
*/
int deleteAll();
/**
* 新的事件信息分页
*
* @param form
* @return java.util.List<com.epmet.opendata.dto.result.NewWghSjxxResultDTO>
* @author LZN
* @date 2022/7/5 15:49
*/
List<NewWghSjxxResultDTO> getWghSjxxPage(@Param("form") NewWghSjxxFormDTO form);
}

13
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java

@ -2,7 +2,10 @@ package com.epmet.opendata.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.opendata.dto.form.NewWghSjxxFormDTO;
import com.epmet.opendata.dto.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.NewWghSjxxResultDTO;
import com.epmet.opendata.dto.result.WghSjxxResultDTO;
import com.epmet.opendata.dto.wgh.WghSjxxDTO;
import com.epmet.opendata.entity.WghSjxxEntity;
@ -87,4 +90,14 @@ public interface WghSjxxService extends BaseService<WghSjxxEntity> {
* @date 2022/7/5 14:18
*/
void getWghSjxx(PreserVationFormDTO dto);
/**
* 新的事件信息分页
*
* @param form
* @return com.epmet.commons.tools.page.PageData<com.epmet.opendata.dto.result.NewWghSjxxResultDTO>
* @author LZN
* @date 2022/7/5 15:49
*/
PageData<NewWghSjxxResultDTO> getWghSjxxPage(NewWghSjxxFormDTO form);
}

21
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java

@ -13,13 +13,18 @@ import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.opendata.dao.WghSjxxDao;
import com.epmet.opendata.dto.constant.CaWghDataConstant;
import com.epmet.opendata.dto.form.NewWghSjxxFormDTO;
import com.epmet.opendata.dto.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.NewWghSjxxResultDTO;
import com.epmet.opendata.dto.result.WghSjxxResultDTO;
import com.epmet.opendata.dto.wgh.WghSjxxDTO;
import com.epmet.opendata.entity.WghSjxxEntity;
import com.epmet.opendata.entity.WghSjxxbEntity;
import com.epmet.opendata.redis.WghSjxxRedis;
import com.epmet.opendata.service.WghSjxxService;
import com.epmet.opendata.util.AesUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -130,6 +135,22 @@ public class WghSjxxServiceImpl extends BaseServiceImpl<WghSjxxDao, WghSjxxEntit
}
}
/**
* 新的事件信息分页
*
* @param form
* @return com.epmet.commons.tools.page.PageData<com.epmet.opendata.dto.result.NewWghSjxxResultDTO>
* @author LZN
* @date 2022/7/5 15:49
*/
@Override
public PageData<NewWghSjxxResultDTO> getWghSjxxPage(NewWghSjxxFormDTO form) {
PageHelper.startPage(form.getPage(), form.getLimit());
List<NewWghSjxxResultDTO> result = baseDao.getWghSjxxPage(form);
PageInfo<NewWghSjxxResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal());
}
private int listWgh(PreserVationFormDTO dto) throws Exception {
String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY);
JSONObject obj = new JSONObject();

26
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml

@ -70,6 +70,32 @@
<delete id="deleteAll">
delete from wgh_sjxx
</delete>
<select id="getWghSjxxPage" resultType="com.epmet.opendata.dto.result.NewWghSjxxResultDTO">
SELECT
wgymc,
ssjdbq,
sssqbq,
hcyj,
hcsj,
sjms
FROM
wgh_sjxx
<where>
1=1
<if test="form.wgymc != null and form.wgymc != ''">
AND wgymc like '%${form.wgymc}%'
</if>
<if test="form.ssjdbq != null and form.ssjdbq != ''">
AND ssjdbq like '%${form.ssjdbq}%'
</if>
<if test="form.sssqbq != null and form.sssqbq != ''">
AND sssqbq like '%${form.sssqbq}%'
</if>
<if test="form.hcyj != null and form.hcyj != ''">
AND hcyj like '%${form.hcyj}%'
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save