|
@ -3075,6 +3075,87 @@ public class DsyyEntranceService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 检验报告列表接口
|
|
|
*
|
|
|
* @param
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONArray selectTestReportDetail(String idcard,String cardNo,String startTime,String endTime,String reportId,int page,int size) throws Exception {
|
|
|
String url = "http://10.95.8.41:51225";
|
|
|
JSONObject data = new JSONObject();
|
|
|
JSONArray orders = new JSONArray();
|
|
|
JSONArray condition = new JSONArray();
|
|
|
data.put("serverCode","JHIDS-USD-hlwcxjysju017-018");
|
|
|
data.put("sysCode","HLW");
|
|
|
data.put("pageSize",size);
|
|
|
data.put("pageNo",page);
|
|
|
data.put("orders",orders);
|
|
|
|
|
|
if (StringUtils.isNoneBlank(idcard)){
|
|
|
JSONObject item = new JSONObject();
|
|
|
item.put("column","idcard");
|
|
|
item.put("type","eq");
|
|
|
item.put("value",idcard);
|
|
|
condition.add(item);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(cardNo)){
|
|
|
JSONObject item = new JSONObject();
|
|
|
item.put("column","cardNo");
|
|
|
item.put("type","eq");
|
|
|
item.put("value",cardNo);
|
|
|
condition.add(item);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(startTime)){
|
|
|
JSONObject item = new JSONObject();
|
|
|
item.put("column","startTime");
|
|
|
item.put("type","ge");
|
|
|
item.put("value",startTime);
|
|
|
condition.add(item);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(endTime)){
|
|
|
JSONObject item = new JSONObject();
|
|
|
item.put("column","endTime");
|
|
|
item.put("type","le");
|
|
|
item.put("value",endTime);
|
|
|
condition.add(item);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(reportId)){
|
|
|
JSONObject item = new JSONObject();
|
|
|
item.put("column","reportId");
|
|
|
item.put("type","eq");
|
|
|
item.put("value",reportId);
|
|
|
condition.add(item);
|
|
|
}
|
|
|
data.put("condition",condition);
|
|
|
String xml = data.toJSONString();
|
|
|
logger.info("xml"+xml);
|
|
|
String response = httpClientUtil.postHeadBodyText2(url,xml);
|
|
|
logger.info("response===="+response);
|
|
|
JSONArray jsonArray =new JSONArray();
|
|
|
Object json = JSON.parse(response);
|
|
|
if (json instanceof JSONObject) {
|
|
|
JSONObject jsonObject = (JSONObject) json;
|
|
|
if (jsonObject.getString("code").equalsIgnoreCase("401")){
|
|
|
throw new Exception(jsonObject.getString("message"));
|
|
|
}
|
|
|
} else if (json instanceof JSONArray) {
|
|
|
JSONArray array = (JSONArray) json;
|
|
|
array = JSONArray.parseArray(response);
|
|
|
jsonArray = array;
|
|
|
|
|
|
}
|
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
|
httpLogDO.setCode("JHIDS-USD-hlwcxjysju017-018");
|
|
|
httpLogDO.setName("检验报告数据");
|
|
|
httpLogDO.setRequest(xml);
|
|
|
httpLogDO.setResponse(response);
|
|
|
httpLogDO.setStatus("1");
|
|
|
wlyyHttpLogDao.save(httpLogDO);
|
|
|
return jsonArray;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
@ -3089,7 +3170,7 @@ public class DsyyEntranceService {
|
|
|
JSONObject data = new JSONObject();
|
|
|
JSONArray orders = new JSONArray();
|
|
|
JSONArray condition = new JSONArray();
|
|
|
data.put("serverCode","JHIDS-USD-hlwcxjysju017-018");
|
|
|
data.put("serverCode","JHIDS-USD-HLWJYJK19-017");
|
|
|
data.put("sysCode","HLW");
|
|
|
data.put("pageSize",size);
|
|
|
data.put("pageNo",page);
|