Browse Source

【网格党建平面图】列表

master
HAHA 3 years ago
parent
commit
9a9b3d4004
  1. 21
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VolunteerPolyListFormDTO.java
  2. 31
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VolunteerPolyListResultDTO.java
  3. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVolunteerPolyController.java
  4. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVolunteerPolyDao.java
  5. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVolunteerPolyService.java
  6. 20
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java
  7. 11
      epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml

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

@ -0,0 +1,21 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VolunteerPolyListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -1097706840486437520L;
/**
* 志愿者代码
*/
private String code;
}

31
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VolunteerPolyListResultDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VolunteerPolyListResultDTO implements Serializable {
private static final long serialVersionUID = -882118974053517358L;
/**
* 主键
*/
private String id;
/**
* 名字
*/
private String name;
/**
* 手机号
*/
private String mobile;
}

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

@ -11,6 +11,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.form.VolunteerPolyListFormDTO;
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO;
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO;
import com.epmet.service.IcVolunteerPolyService;
@ -88,4 +89,18 @@ public class IcVolunteerPolyController {
return new Result<List<VolunteerPolyMapDataResultDTO>>().ok(dto);
}
/**
* 网格党建平面图列表
*
* @param form
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData>
* @author LZN
* @date 2022/5/19 14:49
*/
@PostMapping("list")
public Result<PageData> getList(@RequestBody VolunteerPolyListFormDTO form){
PageData data = icVolunteerPolyService.getList(form);
return new Result<PageData>().ok(data);
}
}

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

@ -1,6 +1,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.VolunteerPolyListResultDTO;
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO;
import com.epmet.entity.IcVolunteerPolyEntity;
import org.apache.ibatis.annotations.Mapper;
@ -23,4 +24,10 @@ public interface IcVolunteerPolyDao extends BaseDao<IcVolunteerPolyEntity> {
*/
List<VolunteerPolyMapDataResultDTO> getMapData(@Param("code") String code,
@Param("customerId") String customerId);
/**
* 网格党建平面图列表
* @param code
*/
List<VolunteerPolyListResultDTO> getList(@Param("code") String code);
}

11
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVolunteerPolyService.java

@ -3,6 +3,7 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.form.VolunteerPolyListFormDTO;
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO;
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO;
import com.epmet.entity.IcVolunteerPolyEntity;
@ -87,4 +88,14 @@ public interface IcVolunteerPolyService extends BaseService<IcVolunteerPolyEntit
* @date 2022/5/19 13:55
*/
List<VolunteerPolyMapDataResultDTO> getMapData(VolunteerPolyMapDataFormDTO form);
/**
* 网格党建平面图列表
*
* @param form
* @return com.epmet.commons.tools.page.PageData
* @author LZN
* @date 2022/5/19 14:49
*/
PageData getList(VolunteerPolyListFormDTO form);
}

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

@ -12,11 +12,15 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.IcVolunteerPolyDao;
import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.form.VolunteerPolyListFormDTO;
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO;
import com.epmet.dto.result.PartyUnitListbrieResultDTO;
import com.epmet.dto.result.VolunteerPolyListResultDTO;
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO;
import com.epmet.entity.IcVolunteerPolyEntity;
import com.epmet.service.IcVolunteerPolyService;
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;
@ -118,4 +122,20 @@ public class IcVolunteerPolyServiceImpl extends BaseServiceImpl<IcVolunteerPolyD
return dto;
}
/**
* 网格党建平面图列表
*
* @param form
* @return com.epmet.commons.tools.page.PageData
* @author LZN
* @date 2022/5/19 14:49
*/
@Override
public PageData getList(VolunteerPolyListFormDTO form) {
PageHelper.startPage(form.getPageNo(),form.getPageSize());
List<VolunteerPolyListResultDTO> result = baseDao.getList(form.getCode());
PageInfo<VolunteerPolyListResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal());
}
}

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

@ -42,6 +42,17 @@
</if>
</where>
</select>
<select id="getList" resultType="com.epmet.dto.result.VolunteerPolyListResultDTO">
SELECT
p.id,
p.NAME,
p.mobile
FROM
ic_volunteer_poly p
LEFT JOIN ic_volunteer_poly_category c ON p.ID_CARD = c.ID_CARD AND c.del_flag = '0'
WHERE
c.VOLUNTEER_CATEGORY = #{code}
</select>
</mapper>
Loading…
Cancel
Save