Browse Source

Merge remote-tracking branch 'origin/房屋tree_yzm' into dev

master
yinzuomei 3 years ago
parent
commit
ad45016631
  1. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPublicServiceOrgServiceImpl.java

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPublicServiceOrgServiceImpl.java

@ -89,11 +89,11 @@ public class IcPublicServiceOrgServiceImpl extends BaseServiceImpl<IcPublicServi
checkUnqiueName(formDTO.getName(),formDTO.getAgencyId(),formDTO.getId()); checkUnqiueName(formDTO.getName(),formDTO.getAgencyId(),formDTO.getId());
IcPublicServiceOrgEntity entity=ConvertUtils.sourceToTarget(formDTO,IcPublicServiceOrgEntity.class); IcPublicServiceOrgEntity entity=ConvertUtils.sourceToTarget(formDTO,IcPublicServiceOrgEntity.class);
baseDao.updateById(entity); baseDao.updateById(entity);
//先删除
LambdaQueryWrapper<IcPublicServiceOrgServiceMatterEntity> deleteWrapper=new LambdaQueryWrapper<>();
deleteWrapper.eq(IcPublicServiceOrgServiceMatterEntity::getOrgId,formDTO.getId());
icPublicServiceOrgServiceMatterDao.delete(deleteWrapper);
if(CollectionUtils.isNotEmpty(formDTO.getServiceMatterList())){ if(CollectionUtils.isNotEmpty(formDTO.getServiceMatterList())){
//先删除
LambdaQueryWrapper<IcPublicServiceOrgServiceMatterEntity> deleteWrapper=new LambdaQueryWrapper<>();
deleteWrapper.eq(IcPublicServiceOrgServiceMatterEntity::getOrgId,formDTO.getId());
icPublicServiceOrgServiceMatterDao.delete(deleteWrapper);
formDTO.getServiceMatterList().forEach(dto->{ formDTO.getServiceMatterList().forEach(dto->{
IcPublicServiceOrgServiceMatterEntity serviceOrgServiceMatterEntity=ConvertUtils.sourceToTarget(dto,IcPublicServiceOrgServiceMatterEntity.class); IcPublicServiceOrgServiceMatterEntity serviceOrgServiceMatterEntity=ConvertUtils.sourceToTarget(dto,IcPublicServiceOrgServiceMatterEntity.class);
serviceOrgServiceMatterEntity.setOrgId(entity.getId()); serviceOrgServiceMatterEntity.setOrgId(entity.getId());

Loading…
Cancel
Save