Ver código fonte

计划免疫接口修改

huangwenjie 7 anos atrás
pai
commit
2fdd2f7d5d

+ 2 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/WlyyPatientDeviceService.java

@ -164,7 +164,7 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
        }
        
        if(StringUtils.isNotBlank(userName)){
            sql = sql + "AND p.name like '%"+doctorName+"%' ";
            sql = sql + "AND p.name like '%"+userName+"%' ";
        }
        
        if(StringUtils.isNotBlank(deviceSn)){
@ -204,7 +204,7 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
        }
    
        if(StringUtils.isNotBlank(doctorName)){
            sql = sql + "AND s.doctor_name like '%"+doctorName+"%' ";
            sql = sql + "AND s.doctor_name like '%"+userName+"%' ";
        }
    
        if(StringUtils.isNotBlank(userName)){

+ 1 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/GuahaoController.java

@ -325,7 +325,7 @@ public class GuahaoController {
	@RequestMapping(value = "/imm/GetOrgScheduleAndNumberList",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:获取免疫接种排班信息和号源信息")
	public Result GetOrgScheduleAndNumberList(@ApiParam(name="OrgCode",value="条形编码",defaultValue = "")
	public Result GetOrgScheduleAndNumberList(@ApiParam(name="OrgCode",value="机构编码",defaultValue = "")
	                                          @RequestParam String OrgCode)
	{
		try {

+ 13 - 8
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/guahao/GuahaoService.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.service.service.guahao;
import cn.com.zoe.crypto.jna.CryptoKey;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
@ -1179,10 +1180,11 @@ public class GuahaoService {
        String re = "";
    
        ZysoftApi api = ZysoftApi.getSingleton();
        CryptoKey key = api.buildCryptoKey();
        if(!params.containsKey("Credential")&&!params.containsKey("Key")) {
            //strCredential和strKey设置
            params.put("Credential", api.getCryptoCredential());
            params.put("Key", api.getCryptoKey());
            params.put("Credential", api.encodeParam(key,"<root><org code=\"jtqy\" /><visitor type=\"0\" code=\"jtqy\" key=\"jtqy\" /></root>"));
            params.put("Key", key.getKey());
        }
        
        String msgBody = net.sf.json.JSONObject.fromObject(params).toString();
@ -1194,14 +1196,14 @@ public class GuahaoService {
        
        int times = 0;
        try {
            re = api.post("imm/"+apistr, params, null,false);
            re = api.post("jhmy/"+apistr, params, null,false);
    
            //---结果验证,并保存日志 ---START
            if (StringUtils.isEmpty(re)) {
                // 请求失败
                //保存http日志
                logService.saveHttpLog(isSuccess,apistr,content,method,apistr,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
                throw new Exception(error);
                logService.saveHttpLog(isSuccess,apistr,content,method,apistr,net.sf.json.JSONObject.fromObject(params).toString(),re,"接口返回的结果为空");
                throw new Exception("接口返回的结果为空");
            } else if (StringUtils.startsWith(re, "System-Error")) {
                // 调用失败
                //保存http日志
@ -1308,9 +1310,12 @@ public class GuahaoService {
        String condition = "<root><zone>350203</zone><zone>350206</zone><zone>350205</zone><zone>350211</zone><zone>350212</zone><zone>350213</zone></root>";
        String[] values = SOAPUtil.getCredential(condition, true);
//        System.out.println(condition);
        params.put("Condition", values[0]);
        params.put("Credential", values[1]);
        params.put("Key", values[2]);
    
        ZysoftApi api =  ZysoftApi.getSingleton();
        CryptoKey key = api.buildCryptoKey();
        params.put("Condition", api.encodeParam(key,condition));
        params.put("Credential", api.encodeParam(key,"<root><org code=\"jtqy\" /><visitor type=\"0\" code=\"jtqy\" key=\"jtqy\" /></root>"));
        params.put("Key", key.getKey());
        return immPostSecond("GetOrgImmuneList","计免预约-获取免疫接种机构列表",params);
    }