|
|
@ -458,7 +458,13 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao |
|
|
|
idCards.forEach(idCard -> { |
|
|
|
YtHscyResDTO sampleResult = YtHsResUtils.hscy(idCard.getIdCard(), NumConstant.ONE, NumConstant.ONE); |
|
|
|
YtHsjcResDTO natInfoResult = YtHsResUtils.hsjc(idCard.getIdCard(), NumConstant.ONE, NumConstant.ONE); |
|
|
|
if ((CollectionUtils.isEmpty(sampleResult.getData()) && CollectionUtils.isNotEmpty(natInfoResult.getData())) || (CollectionUtils.isNotEmpty(sampleResult.getData()) && CollectionUtils.isNotEmpty(natInfoResult.getData()))) { |
|
|
|
Boolean aBoolean = CollectionUtils.isEmpty(sampleResult.getData()) && CollectionUtils.isNotEmpty(natInfoResult.getData()); |
|
|
|
Boolean bBoolean = CollectionUtils.isNotEmpty(sampleResult.getData()) && CollectionUtils.isNotEmpty(natInfoResult.getData()); |
|
|
|
/** |
|
|
|
* 1.采样结果 和 检测结果 都不为空,以检测结果为准 |
|
|
|
* 2.采样结果为空,检测结果不为空 |
|
|
|
*/ |
|
|
|
if (aBoolean || bBoolean) { |
|
|
|
natInfoResult.getData().forEach(natInfo -> { |
|
|
|
IcNatEntity e = new IcNatEntity(); |
|
|
|
e.setCustomerId(customerId); |
|
|
@ -484,6 +490,32 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao |
|
|
|
entities.add(e); |
|
|
|
}); |
|
|
|
} |
|
|
|
if (CollectionUtils.isNotEmpty(sampleResult.getData()) && CollectionUtils.isEmpty(natInfoResult.getData())){ |
|
|
|
/*sampleResult.getData().forEach(sampleInfo -> { |
|
|
|
IcNatEntity e = new IcNatEntity(); |
|
|
|
e.setCustomerId(customerId); |
|
|
|
e.setIsResiUser(StringUtils.isBlank(idCard.getUserId()) ? NumConstant.ZERO_STR : NumConstant.ONE_STR); |
|
|
|
e.setUserId(idCard.getUserId()); |
|
|
|
e.setUserType("sync"); |
|
|
|
e.setName(StringUtils.isNotBlank(sampleInfo.getName()) ? sampleInfo.getName() : ""); |
|
|
|
e.setMobile(StringUtils.isNotBlank(sampleInfo.getTelephone()) ? sampleInfo.getTelephone() : ""); |
|
|
|
e.setIdCard(StringUtils.isNotBlank(sampleInfo.getCard_no()) ? sampleInfo.getCard_no() : ""); |
|
|
|
e.setNatTime(DateUtils.parseDate(sampleInfo.getTest_time(), DateUtils.DATE_TIME_PATTERN)); |
|
|
|
e.setSampleTime(DateUtils.parseDate(sampleInfo.getSample_time(), DateUtils.DATE_TIME_PATTERN)); |
|
|
|
String resultPcr = sampleInfo.getSample_result_pcr(); |
|
|
|
//检测结果 转换 我们 0:阴性 1:阳性, 他们 :1:阳性,2:阴性
|
|
|
|
e.setNatResult(NumConstant.ZERO_STR); |
|
|
|
if (NumConstant.ONE_STR.equals(resultPcr)){ |
|
|
|
e.setNatResult(NumConstant.ONE_STR); |
|
|
|
} |
|
|
|
e.setNatAddress(sampleInfo.getSampling_org_pcr()); |
|
|
|
e.setAgencyId(idCard.getAgencyId()); |
|
|
|
e.setPids(idCard.getPids()); |
|
|
|
e.setAttachmentType(""); |
|
|
|
e.setAttachmentUrl(""); |
|
|
|
entities.add(e); |
|
|
|
});*/ |
|
|
|
} |
|
|
|
}); |
|
|
|
if (CollectionUtils.isNotEmpty(entities)) { |
|
|
|
List<NatUserInfoResultDTO> existNatInfos = icNatDao.getExistNatInfo(entities); |
|
|
|