Browse Source

Merge branch 'dev_move_out_of'

master
zhangyuan 3 years ago
parent
commit
24eeead6ad
  1. 9
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java
  2. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java
  3. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java
  4. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcMoveInRecordServiceImpl.java
  5. 3
      epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml

9
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java

@ -70,6 +70,13 @@ public class IcMoveInListFormDTO implements Serializable {
private Boolean isPage = true;
private String customerId;
private String moveInId;
/**
* 当前登录用户id
*/
private String staffId;
/**
* 当前登录用户所属组织id
*/
private String agencyId;
}

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

@ -65,6 +65,7 @@ public class IcMoveInRecordController {
@MaskResponse(fieldNames = {"mobile", "idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD})
public Result<PageData<IcMoveInListResultDTO>> list(@LoginUser TokenDto tokenDto, @RequestBody IcMoveInListFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<PageData<IcMoveInListResultDTO>>().ok(icMoveInRecordService.list(formDTO));
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java

@ -166,7 +166,7 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl<ChangeRelocatio
entity.setAgencyId(dto.getGridId());
entity.setAgencyName(dto.getGridName());
entity.setAge(IdCardNoValidatorUtils.getAge(result.getIdCard()).toString());
if("out".equals(dto.getType()) && StringUtils.isNotBlank(dto.getVillageName())
if("in".equals(dto.getType()) && StringUtils.isNotBlank(dto.getVillageName())
&& StringUtils.isNotBlank(dto.getBuildName()) && StringUtils.isNotBlank(dto.getUnitName())
&& StringUtils.isNotBlank(dto.getHomeName())){
entity.setAddress(dto.getVillageName() + dto.getBuildName() + dto.getUnitName() + dto.getHomeName());

5
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcMoveInRecordServiceImpl.java

@ -68,6 +68,11 @@ public class IcMoveInRecordServiceImpl extends BaseServiceImpl<IcMoveInRecordDao
@Override
public PageData<IcMoveInListResultDTO> list(IcMoveInListFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo) {
throw new EpmetException("获取工作人员信息失败");
}
formDTO.setAgencyId(staffInfo.getAgencyId());
//列表/导出查询
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
List<IcMoveInListResultDTO> list = baseDao.selectMoveInList(formDTO);

3
epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml

@ -69,6 +69,9 @@
<if test="moveInId != null and moveInId != '' ">
AND id = #{moveInId}
</if>
<if test="agencyId != null and agencyId != '' ">
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%'))
</if>
ORDER BY created_time DESC
</select>

Loading…
Cancel
Save