Browse Source

新增查询条件

dev
HAHA 3 years ago
parent
commit
8e0144c808
  1. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java
  2. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java
  3. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java
  4. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java
  5. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml

6
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java

@ -1,7 +1,9 @@
package com.epmet.modules.partymember.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;
@ -89,8 +91,8 @@ public class IcPartyMemberPointController {
* @date 2022/5/17 17:19
*/
@PostMapping("getList")
public Result<List<PartyMemberPointListResultDTO>> getList(@RequestBody PartyMemberPointListFormDTO form) {
List<PartyMemberPointListResultDTO> dto = icPartyMemberPointService.getList(form);
public Result<List<PartyMemberPointListResultDTO>> getList(@RequestBody PartyMemberPointListFormDTO form, @LoginUser TokenDto tokenDto) {
List<PartyMemberPointListResultDTO> dto = icPartyMemberPointService.getList(form,tokenDto);
return new Result<List<PartyMemberPointListResultDTO>>().ok(dto);
}

6
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java

@ -23,7 +23,9 @@ public interface IcPartyMemberPointDao extends BaseDao<IcPartyMemberPointEntity>
@Param("mobile") String mobile,
@Param("name") String name,
@Param("orgId") String orgId,
@Param("year") String year);
@Param("year") String year,
@Param("customerId") String customerId);
List<PartyMemberPointListCountDTO> getListCount(@Param("year") String year);
List<PartyMemberPointListCountDTO> getListCount(@Param("year") String year,
@Param("customerId") String customerId);
}

3
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java

@ -2,6 +2,7 @@ package com.epmet.modules.partymember.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity;
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO;
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO;
@ -88,6 +89,6 @@ public interface IcPartyMemberPointService extends BaseService<IcPartyMemberPoin
* @author LZN
* @date 2022/5/17 17:19
*/
List<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form);
List<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form, TokenDto tokenDto);
}

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
@ -16,6 +17,7 @@ import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO;
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO;
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO;
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO;
import jdk.nashorn.internal.parser.Token;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -90,10 +92,10 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl<IcPartyMember
}
@Override
public List<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form) {
public List<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form, TokenDto tokenDto) {
List<PartyMemberPointListResultDTO> dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(),
form.getOrgId(), form.getYear());
List<PartyMemberPointListCountDTO> count = baseDao.getListCount(form.getYear());
form.getOrgId(), form.getYear(),tokenDto.getCustomerId());
List<PartyMemberPointListCountDTO> count = baseDao.getListCount(form.getYear(),tokenDto.getCustomerId());
// 处理统计的平均值
for (int i = 0; i < dto.size(); i++) {
// 基础积分分值平均值

2
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml

@ -25,6 +25,7 @@
AND c.DEL_FLAG = '0'
<where>
u.DEL_FLAG = '0'
AND u.CUSTOMER_ID = #{customerId}
<if test="name != null and name != ''">
AND u.NAME = #{name}
</if>
@ -61,6 +62,7 @@
AND a.DEL_FLAG = '0'
<where>
u.DEL_FLAG = '0'
AND u.CUSTOMER_ID = #{customerId}
<if test="year != null and year != ''">
AND a.year = #{year}
</if>

Loading…
Cancel
Save