|
|
|
@ -2,10 +2,13 @@ package com.elink.esua.epdc.service.impl; |
|
|
|
|
|
|
|
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|
|
|
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.epdc.form.EpdcAppPidemicCompleteInfoFromDTO; |
|
|
|
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.result.EpdcSentryPostInfoResultDTO; |
|
|
|
import com.elink.esua.epdc.feign.AdminFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.CustomFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.UserFeignClient; |
|
|
|
@ -71,6 +74,7 @@ public class CustomServiceImpl implements CustomService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @param mobile 手机号 |
|
|
|
* @param smsCode 用户输入的验证码 |
|
|
|
@ -85,6 +89,46 @@ public class CustomServiceImpl implements CustomService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<EpdcSentryPostInfoResultDTO> getDeptInfoByMaCode(String code) { |
|
|
|
EpdcSentryPostInfoResultDTO epdcSentryPostInfoResultDTO = new EpdcSentryPostInfoResultDTO(); |
|
|
|
//代表是小程序段解析的字符串
|
|
|
|
if(code.indexOf(";")!=-1){ |
|
|
|
String[] macCode = code.split(";"); |
|
|
|
//拿取网格ID
|
|
|
|
String gridId = macCode[0].split("=")[1]; |
|
|
|
//拿取哨卡编码
|
|
|
|
String sentryPostCode = macCode[1].split("=")[1]; |
|
|
|
//拿取网格信息
|
|
|
|
CompleteDeptDTO completeDept = getCompleteDeptDTOByGridId(gridId); |
|
|
|
epdcSentryPostInfoResultDTO.setStreetName(completeDept.getStreet()); |
|
|
|
epdcSentryPostInfoResultDTO.setCommunityName(completeDept.getCommunity()); |
|
|
|
epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId().intValue()); |
|
|
|
epdcSentryPostInfoResultDTO.setGridName(completeDept.getGrid()); |
|
|
|
//拿取哨卡信息
|
|
|
|
Result<EpidemicSentryPostDTO> epidemicSentryResult = customFeignClient.getEpidemicSentryBySentryPostCode(sentryPostCode); |
|
|
|
EpidemicSentryPostDTO epidemicSentryPostDTO = epidemicSentryResult.getData(); |
|
|
|
if(epidemicSentryPostDTO==null){ |
|
|
|
return new Result().error("哨卡信息为空"); |
|
|
|
} |
|
|
|
epdcSentryPostInfoResultDTO.setSentryPostName(epidemicSentryPostDTO.getSentryPostName()); |
|
|
|
epdcSentryPostInfoResultDTO.setThirdSentryPostId(epidemicSentryPostDTO.getThirdSentryPostId()); |
|
|
|
}else{ |
|
|
|
//拿取网格信息
|
|
|
|
CompleteDeptDTO completeDept = getCompleteDeptDTOByGridId(code); |
|
|
|
epdcSentryPostInfoResultDTO.setStreetName(completeDept.getStreet()); |
|
|
|
epdcSentryPostInfoResultDTO.setCommunityName(completeDept.getCommunity()); |
|
|
|
epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId().intValue()); |
|
|
|
epdcSentryPostInfoResultDTO.setGridName(completeDept.getGrid()); |
|
|
|
} |
|
|
|
return new Result().ok(epdcSentryPostInfoResultDTO); |
|
|
|
} |
|
|
|
|
|
|
|
private CompleteDeptDTO getCompleteDeptDTOByGridId(String gridId){ |
|
|
|
Result<CompleteDeptDTO> adminResult = adminFeignClient.getCompleteDept(Long.parseLong(gridId)); |
|
|
|
return adminResult.getData(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) { |
|
|
|
|