Browse Source

修改在职党员报道,包联社区可以修改;

master
luyan 2 years ago
parent
commit
cc87a856f3
  1. 6
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java

6
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java

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

Loading…
Cancel
Save