Quellcode durchsuchen

回访问卷代码提交

huangwenjie vor 7 Jahren
Ursprung
Commit
2a04174f0e

+ 1 - 0
common/common-entity/src/main/java/com/yihu/es/entity/QuestionnaireWinningESDO.java

@ -32,6 +32,7 @@ public class QuestionnaireWinningESDO {
	//兑奖地址
	private String address;
	//奖品有效期
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyyMMdd'T'HHmmss.SSS'Z'")
	private Date validity;
	//0为未删除,1为删除
	private Integer del;

+ 8 - 0
patient-co/patient-co-wlyy/doc/技术文档/es/回访问卷新增索引.txt

@ -31,6 +31,14 @@ POST http://172.19.103.68:9200/wlyy_questionnaire_winning/wlyy_questionnaire_win
                "type": "string",
                "index": "not_analyzed"
            },
            "address": {
                "type": "string",
                "index": "not_analyzed"
            },
            "validity": {
                "type": "string",
                "index": "not_analyzed"
            },
            "del": {
                "type": "string",
                "index": "not_analyzed"

+ 45 - 42
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/ImmuneService.java

@ -312,31 +312,33 @@ public class ImmuneService {
	                           String patientName,
	                           String patientID,
	                           String patientPhone) throws Exception{
		String url = jwUrl + "/third/guahao/imm/RegisterImmune";
		List<NameValuePair> params = new ArrayList<>();
		params.add(new BasicNameValuePair("BarCode", barCode));
		params.add(new BasicNameValuePair("OrgCode", orgCode));
		params.add(new BasicNameValuePair("SectionType", sectionType));
		params.add(new BasicNameValuePair("strStart", strStart));
		params.add(new BasicNameValuePair("SSID", ssid));
		params.add(new BasicNameValuePair("PatientName", patientName));
		params.add(new BasicNameValuePair("PatientID", patientID));
		params.add(new BasicNameValuePair("PatientPhone", patientPhone));
		
		String response = httpClientUtil.post(url, params, "UTF-8");
//		String url = jwUrl + "/third/guahao/imm/RegisterImmune";
//		List<NameValuePair> params = new ArrayList<>();
//		params.add(new BasicNameValuePair("BarCode", barCode));
//		params.add(new BasicNameValuePair("OrgCode", orgCode));
//		params.add(new BasicNameValuePair("SectionType", sectionType));
//		params.add(new BasicNameValuePair("strStart", strStart));
//		params.add(new BasicNameValuePair("SSID", ssid));
//		params.add(new BasicNameValuePair("PatientName", patientName));
//		params.add(new BasicNameValuePair("PatientID", patientID));
//		params.add(new BasicNameValuePair("PatientPhone", patientPhone));
//
//		String response = httpClientUtil.post(url, params, "UTF-8");
//
//		JSONObject data = JSONObject.parseObject(response);
//		int status = data.getInteger("status");
//		String ok = data.getString("data");
//		if(200 != status || !"OK".equals(ok)){
//			throw new Exception("免疫接种预约失败!");
//		}else{
//			return response;
//		}
		
		JSONObject data = JSONObject.parseObject(response);
		int status = data.getInteger("status");
		String xml = data.getString("data");
		if(200 != status || StringUtils.isBlank(xml)){
			throw new Exception("免疫接种预约失败!");
		}else{
			return response;
		}
		return "";
	}
	
	/**
	 *免疫接种确认预约
	 *免疫接种取消预约
	 * @param barCode
	 * @param orgCode
	 * @param sectionType
@ -355,27 +357,28 @@ public class ImmuneService {
	                             String patientName,
	                             String patientID,
	                             String patientPhone) throws Exception{
		String url = jwUrl + "/third/guahao/imm/UnResRegisterImmune";
		List<NameValuePair> params = new ArrayList<>();
		params.add(new BasicNameValuePair("BarCode", barCode));
		params.add(new BasicNameValuePair("OrgCode", orgCode));
		params.add(new BasicNameValuePair("SectionType", sectionType));
		params.add(new BasicNameValuePair("strStart", strStart));
		params.add(new BasicNameValuePair("SSID", ssid));
		params.add(new BasicNameValuePair("PatientName", patientName));
		params.add(new BasicNameValuePair("PatientID", patientID));
		params.add(new BasicNameValuePair("PatientPhone", patientPhone));
		
		String response = httpClientUtil.post(url, params, "UTF-8");
		
		JSONObject data = JSONObject.parseObject(response);
		int status = data.getInteger("status");
		String xml = data.getString("data");
		if(200 != status || StringUtils.isBlank(xml)){
			throw new Exception("取消免疫接种失败!");
		}else{
			return response;
		}
//		String url = jwUrl + "/third/guahao/imm/UnResRegisterImmune";
//		List<NameValuePair> params = new ArrayList<>();
//		params.add(new BasicNameValuePair("BarCode", barCode));
//		params.add(new BasicNameValuePair("OrgCode", orgCode));
//		params.add(new BasicNameValuePair("SectionType", sectionType));
//		params.add(new BasicNameValuePair("strStart", strStart));
//		params.add(new BasicNameValuePair("SSID", ssid));
//		params.add(new BasicNameValuePair("PatientName", patientName));
//		params.add(new BasicNameValuePair("PatientID", patientID));
//		params.add(new BasicNameValuePair("PatientPhone", patientPhone));
//
//		String response = httpClientUtil.post(url, params, "UTF-8");
//
//		JSONObject data = JSONObject.parseObject(response);
//		int status = data.getInteger("status");
//		String ok = data.getString("data");
//		if(200 != status || !"OK".equals(ok)){
//			throw new Exception("取消免疫接种失败!");
//		}else{
//			return response;
//		}
		return "";
	}
	
	/**