|
|
@ -1,6 +1,8 @@ |
|
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dao.IcResiCollectDao; |
|
|
@ -37,11 +39,8 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl<IcResiCollectDao, |
|
|
|
IcResiCollectEntity insert=ConvertUtils.sourceToTarget(formDTO,IcResiCollectEntity.class); |
|
|
|
if("internal".equals(formDTO.getOrigin())){ |
|
|
|
//查询楼栋个信息
|
|
|
|
// IcNeighborHoodDTO neighborHoodDTO=query
|
|
|
|
Result<IcNeighborHoodDTO> res= govOrgOpenFeignClient.getIcNeighbordhoodById(formDTO.getVillageId()); |
|
|
|
if(!res.success()||null==res.getData()){ |
|
|
|
// todo
|
|
|
|
} |
|
|
|
IcNeighborHoodDTO neighborHoodDTO=queryIcNeighborHood(formDTO.getVillageId()); |
|
|
|
|
|
|
|
} |
|
|
|
List<IcResiMemberEntity> memberList=ConvertUtils.sourceToTarget(formDTO.getMemberList(),IcResiMemberEntity.class); |
|
|
|
|
|
|
@ -49,8 +48,16 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl<IcResiCollectDao, |
|
|
|
//查询成员表
|
|
|
|
|
|
|
|
} |
|
|
|
IcResiCollectEntity entity = ConvertUtils.sourceToTarget(dto, IcResiCollectEntity.class); |
|
|
|
insert(entity); |
|
|
|
// IcResiCollectEntity entity = ConvertUtils.sourceToTarget(dto, IcResiCollectEntity.class);
|
|
|
|
// insert(entity);
|
|
|
|
} |
|
|
|
|
|
|
|
private IcNeighborHoodDTO queryIcNeighborHood(String villageId) { |
|
|
|
Result<IcNeighborHoodDTO> res = govOrgOpenFeignClient.getIcNeighbordhoodById(villageId); |
|
|
|
if (!res.success() || null == res.getData()) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "小区信息查询异常", "小区信息查询异常"); |
|
|
|
} |
|
|
|
return res.getData(); |
|
|
|
} |
|
|
|
|
|
|
|
} |