|
|
@ -8,9 +8,7 @@ import com.elink.esua.epdc.dto.UserTagInfo; |
|
|
|
import com.elink.esua.epdc.feign.AdminFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.AppVolunteerRankFeignClient; |
|
|
|
import com.elink.esua.epdc.service.AppVolunteerRankService; |
|
|
|
import com.elink.esua.epdc.volunteer.AppVolunteerApplyDTO; |
|
|
|
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; |
|
|
|
import com.elink.esua.epdc.volunteer.VolunteerOrgDTO; |
|
|
|
import com.elink.esua.epdc.volunteer.*; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -57,9 +55,6 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService { |
|
|
|
//获取所有上级机构名称和ID拼接
|
|
|
|
Result<ParentAndAllDeptDTO> dtoResult = adminFeignClient.getParentAndAllDept(userDetail.getGridId()); |
|
|
|
ParentAndAllDeptDTO deptDTO = dtoResult.getData(); |
|
|
|
log.info("userDetail:"+userDetail); |
|
|
|
log.info("formDto:"+formDto); |
|
|
|
log.info("deptDTO:"+deptDTO); |
|
|
|
// 父所有部门
|
|
|
|
formDto.setParentDeptIds(deptDTO.getParentDeptIds()); |
|
|
|
formDto.setParentDeptNames(deptDTO.getParentDeptNames()); |
|
|
@ -98,4 +93,51 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService { |
|
|
|
return appVolunteerRankFeignClient.getVolunteerDetail(formDto); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result applyActivity(TokenDto userDetail, AppVactApplyDTO formDto) { |
|
|
|
if (null == userDetail) { |
|
|
|
return new Result().error("获取用户信息失败"); |
|
|
|
} |
|
|
|
//获取所有上级机构名称和ID拼接
|
|
|
|
Result<ParentAndAllDeptDTO> dtoResult = adminFeignClient.getParentAndAllDept(userDetail.getGridId()); |
|
|
|
ParentAndAllDeptDTO deptDTO = dtoResult.getData(); |
|
|
|
// 父所有部门
|
|
|
|
formDto.setParentDeptIds(deptDTO.getParentDeptIds()); |
|
|
|
formDto.setParentDeptNames(deptDTO.getParentDeptNames()); |
|
|
|
// 所有部门
|
|
|
|
formDto.setAllDeptIds(deptDTO.getAllDeptIds()); |
|
|
|
formDto.setAllDeptNames(deptDTO.getAllDeptNames()); |
|
|
|
// 网格
|
|
|
|
formDto.setDeptName(deptDTO.getGrid()); |
|
|
|
formDto.setDeptId(deptDTO.getGridId().toString()); |
|
|
|
|
|
|
|
formDto.setUserId(userDetail.getUserId()); |
|
|
|
formDto.setFaceImg(userDetail.getFaceImg()); |
|
|
|
//判断党员标识
|
|
|
|
if (!CollectionUtils.isEmpty(userDetail.getUserTagInfos())) { |
|
|
|
Boolean flag = false; |
|
|
|
for (UserTagInfo ut : userDetail.getUserTagInfos()) { |
|
|
|
if ("partymember".equals(ut.getTagCode())) { |
|
|
|
flag = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
formDto.setPartyFlag(flag == true ? "1" : "0"); |
|
|
|
} else { |
|
|
|
formDto.setPartyFlag("0"); |
|
|
|
} |
|
|
|
return appVolunteerRankFeignClient.applyActivity(formDto); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result getActivityList(TokenDto userDetail, AppPageParamsDTO dto) { |
|
|
|
dto.setUserId(userDetail.getUserId()); |
|
|
|
return appVolunteerRankFeignClient.getActivityList(dto); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result getActivityDetail(String vactId) { |
|
|
|
return appVolunteerRankFeignClient.getActivityDetail(vactId); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|