|
|
@ -8,13 +8,13 @@ import com.elink.esua.epdc.commons.tools.redis.RedisChannels; |
|
|
|
import com.elink.esua.epdc.commons.tools.redis.RedisKeys; |
|
|
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.dto.CompleteDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.DeptOption; |
|
|
|
import com.elink.esua.epdc.dto.EpidemicSentryPostDTO; |
|
|
|
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.*; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcAppPidemicCompleteInfoFromDTO; |
|
|
|
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.result.EpdcSentryPostInfoResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.suggestion.form.MySuggestionFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.suggestion.form.SuggestionMakeFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.suggestion.result.MySuggestionResultDTO; |
|
|
|
import com.elink.esua.epdc.feign.AdminFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.CustomFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.UserFeignClient; |
|
|
@ -25,6 +25,8 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 疫情管理实现 |
|
|
|
* @Author yinzuomei |
|
|
@ -187,4 +189,50 @@ public class CustomServiceImpl implements CustomService { |
|
|
|
} |
|
|
|
return epidemicSentryResult.getData(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<List<TypeNode>> getSuggestionTypeTree() { |
|
|
|
return customFeignClient.getSuggestionTypeTree(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result insertSuggestion(SuggestionMakeFormDTO formDTO, TokenDto userDetail) { |
|
|
|
this.collectUserInfo(formDTO, userDetail); |
|
|
|
return customFeignClient.insertSuggestion(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result updateSuggestion(SuggestionMakeFormDTO formDTO, TokenDto userDetail) { |
|
|
|
this.collectUserInfo(formDTO, userDetail); |
|
|
|
return customFeignClient.updateSuggestion(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
private void collectUserInfo(SuggestionMakeFormDTO formDTO, TokenDto userDetail) { |
|
|
|
formDTO.setUserId(userDetail.getUserId()); |
|
|
|
formDTO.setNickname(userDetail.getNickname()); |
|
|
|
formDTO.setFaceImg(userDetail.getFaceImg()); |
|
|
|
formDTO.setMobile(userDetail.getMobile()); |
|
|
|
formDTO.setDeptId(userDetail.getGridId()); |
|
|
|
if (null != formDTO.getDeptId()) { |
|
|
|
Result<ParentAndAllDeptDTO> pidInfoResult = adminFeignClient.getParentAndAllDept(formDTO.getDeptId()); |
|
|
|
if (pidInfoResult.success() && null != pidInfoResult.getData()) { |
|
|
|
formDTO.setParentDeptIds(pidInfoResult.getData().getParentDeptIds()); |
|
|
|
formDTO.setParentDeptNames(pidInfoResult.getData().getParentDeptNames()); |
|
|
|
formDTO.setAllDeptIds(pidInfoResult.getData().getAllDeptIds()); |
|
|
|
formDTO.setAllDeptNames(pidInfoResult.getData().getAllDeptNames()); |
|
|
|
formDTO.setDeptName(pidInfoResult.getData().getGrid()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<List<MySuggestionResultDTO>> getMySuggestion(MySuggestionFormDTO formDTO, TokenDto userDetail) { |
|
|
|
formDTO.setUserId(userDetail.getUserId()); |
|
|
|
return customFeignClient.getMySuggestion(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<MySuggestionResultDTO> getDetailSuggestion(String id) { |
|
|
|
return customFeignClient.getDetailSuggestion(id); |
|
|
|
} |
|
|
|
} |
|
|
|