|
|
|
@ -2,12 +2,15 @@ package com.docus.server.collection.httpservices.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
import com.docus.server.collection.dto.TBasicDto;
|
|
|
|
import com.docus.server.collection.dto.TBasicDto;
|
|
|
|
import com.docus.server.collection.httpservices.HttpTBasicService;
|
|
|
|
import com.docus.server.collection.httpservices.HttpTBasicService;
|
|
|
|
|
|
|
|
import com.docus.server.collection.rpc.MzZyyRocCurrWebCommonRpc;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
@ -23,6 +26,8 @@ import java.util.Map;
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
|
public class HttpTBasicServiceImpl implements HttpTBasicService {
|
|
|
|
public class HttpTBasicServiceImpl implements HttpTBasicService {
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private MzZyyRocCurrWebCommonRpc mzZyyRocCurrWebCommonRpc;
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<TBasicDto> getTBasicDto(String url, Map<String,String> headers, Map<String,Object> params) {
|
|
|
|
public List<TBasicDto> getTBasicDto(String url, Map<String,String> headers, Map<String,Object> params) {
|
|
|
|
List<TBasicDto> tBasicDtos=null;
|
|
|
|
List<TBasicDto> tBasicDtos=null;
|
|
|
|
@ -130,10 +135,31 @@ public class HttpTBasicServiceImpl implements HttpTBasicService {
|
|
|
|
tBasicDto.setInpatientNo(inpatientNo);
|
|
|
|
tBasicDto.setInpatientNo(inpatientNo);
|
|
|
|
tBasicDto.setDutyNurse(dutyNurse);
|
|
|
|
tBasicDto.setDutyNurse(dutyNurse);
|
|
|
|
tBasicDto.setMotherInpatientNo(motherInpatientNo);
|
|
|
|
tBasicDto.setMotherInpatientNo(motherInpatientNo);
|
|
|
|
|
|
|
|
// 主管医生取另外的接口数据值
|
|
|
|
|
|
|
|
setAttending(tBasicDto);
|
|
|
|
tBasicDtos.add(tBasicDto);
|
|
|
|
tBasicDtos.add(tBasicDto);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return tBasicDtos;
|
|
|
|
return tBasicDtos;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 设置另外的主管医生为住院医师
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private void setAttending(TBasicDto tBasicDto) {
|
|
|
|
|
|
|
|
String jzh = tBasicDto.getJzh();
|
|
|
|
|
|
|
|
JSONObject patientRes = mzZyyRocCurrWebCommonRpc.getInPatient(jzh);
|
|
|
|
|
|
|
|
if (patientRes == null) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
boolean success = "200".equals(patientRes.getString("code"));
|
|
|
|
|
|
|
|
JSONObject patientData = patientRes.getJSONObject("data");
|
|
|
|
|
|
|
|
if (!success || patientData == null) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String houseDocCode = patientData.getString("houseDocCode");
|
|
|
|
|
|
|
|
String houseDocName = patientData.getString("houseDocName");
|
|
|
|
|
|
|
|
tBasicDto.setAttending(houseDocCode);
|
|
|
|
|
|
|
|
tBasicDto.setAttending(houseDocName);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|