|
@ -201,8 +201,10 @@ public class ReportPartyServiceImpl extends BaseServiceImpl<ReportPartyDao, Repo |
|
|
@Override |
|
|
@Override |
|
|
public void saveOrUpdate(ReportPartyDTO dto) { |
|
|
public void saveOrUpdate(ReportPartyDTO dto) { |
|
|
ReportPartyEntity entity = ConvertUtils.sourceToTarget(dto, ReportPartyEntity.class); |
|
|
ReportPartyEntity entity = ConvertUtils.sourceToTarget(dto, ReportPartyEntity.class); |
|
|
if (StringUtils.isNotEmpty(entity.getId())) { |
|
|
ReportPartyEntity result = baseDao.getByIdCardAndName(dto.getIdCard(), dto.getName()); |
|
|
baseDao.updateById(entity); |
|
|
if (null != result && !dto.getCouplingCommunity().equals(result.getCouplingCommunity())) { |
|
|
|
|
|
result.setCouplingCommunity(String.join(",", dto.getCouplingCommunity())); |
|
|
|
|
|
baseDao.updateById(result); |
|
|
} else { |
|
|
} else { |
|
|
if (dto.getAllDeptIds().length == 0) { |
|
|
if (dto.getAllDeptIds().length == 0) { |
|
|
setDeptId(dto); |
|
|
setDeptId(dto); |
|
|