Browse Source

通知方法变动

master
sunyuchao 3 years ago
parent
commit
5c39e4c29a
  1. 1
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java
  2. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java
  3. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java

1
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java

@ -92,6 +92,7 @@ public class AddIcNatFormDTO implements Serializable {
//token中信息
private String customerId;
private String staffId;
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java

@ -75,6 +75,7 @@ public class IcNatController implements ResultDataResolver {
public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddIcNatFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddIcNatFormDTO.Nat.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
icNucleinService.add(formDTO);
return new Result();
}
@ -122,6 +123,7 @@ public class IcNatController implements ResultDataResolver {
@PostMapping("edit")
public Result edit(@LoginUser TokenDto tokenDto, @RequestBody AddIcNatFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
icNucleinService.edit(formDTO);
return new Result();
}

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java

@ -105,7 +105,7 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
dto.setChannel(formDTO.getChannel());
dto.setOrigin("2");
dto.setContent(formDTO.getContent());
dto.setOrgName(agencyInfo.getOrganizationName());
dto.setStaffId(formDTO.getStaffId());
icNoticeService.sendNotice(dto);
}
@ -186,12 +186,6 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
//3.新增通知表信息
if (CollectionUtils.isNotEmpty(formDTO.getChannel())) {
IcNatEntity icNatEntity = baseDao.selectById(formDTO.getIcNatId());
//1.获取所填居民所属组织缓存信息
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(icNatEntity.getAgencyId());
if (null == agencyInfo) {
throw new RenException(String.format("获取组织缓存信息失败%s", icNatEntity.getAgencyId()));
}
SendNoticeFormDTO dto = new SendNoticeFormDTO();
List<SendNoticeFormDTO.UserListBean> userList = new ArrayList<>();
userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class));
@ -200,7 +194,7 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
dto.setChannel(formDTO.getChannel());
dto.setOrigin("2");
dto.setContent(formDTO.getContent());
dto.setOrgName(agencyInfo.getOrganizationName());
dto.setStaffId(formDTO.getStaffId());
icNoticeService.sendNotice(dto);
}
}

Loading…
Cancel
Save