|
@ -35,8 +35,8 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl<IcResiCollectDao, |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void save(IcResiCollectFormDTO formDTO) { |
|
|
public void save(IcResiCollectFormDTO formDTO) { |
|
|
IcResiCollectEntity origin=baseDao.selectByAddress(formDTO.getAddress()); |
|
|
IcResiCollectEntity origin = baseDao.selectByAddress(formDTO.getAddress()); |
|
|
if(null==origin){ |
|
|
if (null == origin) { |
|
|
//插入主表、成员表
|
|
|
//插入主表、成员表
|
|
|
IcResiCollectEntity insert = ConvertUtils.sourceToTarget(formDTO, IcResiCollectEntity.class); |
|
|
IcResiCollectEntity insert = ConvertUtils.sourceToTarget(formDTO, IcResiCollectEntity.class); |
|
|
if ("internal".equals(formDTO.getOrigin())) { |
|
|
if ("internal".equals(formDTO.getOrigin())) { |
|
@ -52,14 +52,18 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl<IcResiCollectDao, |
|
|
mem.setIcResiCollectId(insert.getId()); |
|
|
mem.setIcResiCollectId(insert.getId()); |
|
|
icResiMemberDao.insert(mem); |
|
|
icResiMemberDao.insert(mem); |
|
|
}); |
|
|
}); |
|
|
}else{ |
|
|
} else { |
|
|
|
|
|
//更新主表
|
|
|
|
|
|
baseDao.updateRec(origin.getId(),formDTO.getHouseType(),formDTO.getHouseHolderName(),formDTO.getTotalResi()); |
|
|
//查询成员表
|
|
|
//查询成员表
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// IcResiCollectEntity entity = ConvertUtils.sourceToTarget(dto, IcResiCollectEntity.class);
|
|
|
// IcResiCollectEntity entity = ConvertUtils.sourceToTarget(dto, IcResiCollectEntity.class);
|
|
|
// insert(entity);
|
|
|
// insert(entity);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IcNeighborHoodDTO queryIcNeighborHood(String villageId) { |
|
|
private IcNeighborHoodDTO queryIcNeighborHood(String villageId) { |
|
|
Result<IcNeighborHoodDTO> res = govOrgOpenFeignClient.getIcNeighbordhoodById(villageId); |
|
|
Result<IcNeighborHoodDTO> res = govOrgOpenFeignClient.getIcNeighbordhoodById(villageId); |
|
|
if (!res.success() || null == res.getData()) { |
|
|
if (!res.success() || null == res.getData()) { |
|
|