Browse Source

修改【网格党建平面图】列表/地图 查询条件

dev
HAHA 3 years ago
parent
commit
12035263dc
  1. 8
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VolunteerPolyListFormDTO.java
  2. 10
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VolunteerPolyMapDataFormDTO.java
  3. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVolunteerPolyController.java
  4. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVolunteerPolyDao.java
  5. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java
  6. 21
      epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml

8
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VolunteerPolyListFormDTO.java

@ -19,5 +19,13 @@ public class VolunteerPolyListFormDTO extends PageFormDTO implements Serializabl
*/ */
private String code; private String code;
/**
* 用户id
*/
private String customerId; private String customerId;
/**
* 组织id
*/
private String agencyId;
} }

10
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VolunteerPolyMapDataFormDTO.java

@ -17,7 +17,15 @@ public class VolunteerPolyMapDataFormDTO implements Serializable {
/** /**
* 志愿者分类code * 志愿者分类code
*/ */
@NotBlank(message = "分类不能为空")
private String code; private String code;
/**
* 客户id
*/
private String customerId; private String customerId;
/**
* 组织id
*/
private String agencyId;
} }

1
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVolunteerPolyController.java

@ -87,7 +87,6 @@ public class IcVolunteerPolyController {
@PostMapping("/mapData") @PostMapping("/mapData")
public Result<List<VolunteerPolyMapDataResultDTO>> getMapData(@RequestBody VolunteerPolyMapDataFormDTO form, @LoginUser TokenDto tokenDto) { public Result<List<VolunteerPolyMapDataResultDTO>> getMapData(@RequestBody VolunteerPolyMapDataFormDTO form, @LoginUser TokenDto tokenDto) {
form.setCustomerId(tokenDto.getCustomerId()); form.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(form);
List<VolunteerPolyMapDataResultDTO> dto = icVolunteerPolyService.getMapData(form); List<VolunteerPolyMapDataResultDTO> dto = icVolunteerPolyService.getMapData(form);
return new Result<List<VolunteerPolyMapDataResultDTO>>().ok(dto); return new Result<List<VolunteerPolyMapDataResultDTO>>().ok(dto);
} }

6
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVolunteerPolyDao.java

@ -25,14 +25,16 @@ public interface IcVolunteerPolyDao extends BaseDao<IcVolunteerPolyEntity> {
* @param code * @param code
*/ */
List<VolunteerPolyMapDataResultDTO> getMapData(@Param("code") String code, List<VolunteerPolyMapDataResultDTO> getMapData(@Param("code") String code,
@Param("customerId") String customerId); @Param("customerId") String customerId,
@Param("agencyId") String agencyId);
/** /**
* 网格党建平面图列表 * 网格党建平面图列表
* @param code * @param code
*/ */
List<VolunteerPolyListResultDTO> getList(@Param("code") String code, List<VolunteerPolyListResultDTO> getList(@Param("code") String code,
@Param("customerId") String customerId); @Param("customerId") String customerId,
@Param("agencyId") String agencyId);
void deleteDataByCustomerId(@Param("customerId") String customerId); void deleteDataByCustomerId(@Param("customerId") String customerId);
void deleteCategoryByCustomerId(@Param("customerId") String customerId); void deleteCategoryByCustomerId(@Param("customerId") String customerId);

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java

@ -141,7 +141,7 @@ public class IcVolunteerPolyServiceImpl extends BaseServiceImpl<IcVolunteerPolyD
*/ */
@Override @Override
public List<VolunteerPolyMapDataResultDTO> getMapData(VolunteerPolyMapDataFormDTO form) { public List<VolunteerPolyMapDataResultDTO> getMapData(VolunteerPolyMapDataFormDTO form) {
List<VolunteerPolyMapDataResultDTO> dto = baseDao.getMapData(form.getCode(), form.getCustomerId()); List<VolunteerPolyMapDataResultDTO> dto = baseDao.getMapData(form.getCode(), form.getCustomerId(),form.getAgencyId());
// 获取gridName // 获取gridName
for (VolunteerPolyMapDataResultDTO item : dto) { for (VolunteerPolyMapDataResultDTO item : dto) {
if (StringUtils.isNotEmpty(item.getGridId())) { if (StringUtils.isNotEmpty(item.getGridId())) {
@ -172,7 +172,7 @@ public class IcVolunteerPolyServiceImpl extends BaseServiceImpl<IcVolunteerPolyD
@Override @Override
public PageData getList(VolunteerPolyListFormDTO form) { public PageData getList(VolunteerPolyListFormDTO form) {
PageHelper.startPage(form.getPageNo(), form.getPageSize()); PageHelper.startPage(form.getPageNo(), form.getPageSize());
List<VolunteerPolyListResultDTO> result = baseDao.getList(form.getCode(), form.getCustomerId()); List<VolunteerPolyListResultDTO> result = baseDao.getList(form.getCode(), form.getCustomerId(),form.getAgencyId());
PageInfo<VolunteerPolyListResultDTO> info = new PageInfo<>(result); PageInfo<VolunteerPolyListResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal()); return new PageData<>(result, info.getTotal());
} }

21
epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml

@ -44,6 +44,9 @@
<if test="code != null and code != ''"> <if test="code != null and code != ''">
AND c.VOLUNTEER_CATEGORY = #{code} AND c.VOLUNTEER_CATEGORY = #{code}
</if> </if>
<if test="agencyId != null and agencyId != ''">
AND p.AGENCY_ID = #{agencyId}
</if>
</where> </where>
</select> </select>
<select id="getList" resultType="com.epmet.dto.result.VolunteerPolyListResultDTO"> <select id="getList" resultType="com.epmet.dto.result.VolunteerPolyListResultDTO">
@ -56,10 +59,20 @@
p.ID_CARD p.ID_CARD
FROM FROM
ic_volunteer_poly p ic_volunteer_poly p
LEFT JOIN ic_volunteer_poly_category c ON p.ID_CARD = c.ID_CARD AND c.del_flag = '0' LEFT JOIN ic_volunteer_poly_category c ON p.ID_CARD = c.ID_CARD
WHERE AND c.del_flag = '0'
c.VOLUNTEER_CATEGORY = #{code} <where>
AND c.CUSTOMER_ID = #{customerId} p.del_flag = '0'
<if test="code != null and code != ''">
AND c.VOLUNTEER_CATEGORY = #{code}
</if>
<if test="customerId != null and customerId != ''">
AND c.CUSTOMER_ID = #{customerId}
</if>
<if test="agencyId != null and agencyId != ''">
AND p.AGENCY_ID = #{agencyId}
</if>
</where>
</select> </select>
<select id="getStatistics" resultType="com.epmet.dto.result.VolunteerPolyPieResultDTO"> <select id="getStatistics" resultType="com.epmet.dto.result.VolunteerPolyPieResultDTO">
SELECT SELECT

Loading…
Cancel
Save