Browse Source

Merge branch 'dev' of huangwenjie/patient-co-management into dev

chenweida 7 years ago
parent
commit
1b7841ae6b

+ 15 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java

@ -324,6 +324,21 @@ public class PrescriptionController extends BaseController{
			return Result.error(ex.getMessage());
		}
	}
	
	@RequestMapping(value = "getDataStatus",method = RequestMethod.POST)
	@ApiOperation("获取长处方相关数据状态接口")
	public Result affirmCARecipe(@ApiParam(name="type",value="数据类型:1:挂号数据;2:处方数据;3:结算数据",defaultValue = "")
	                             @RequestParam(value = "type",required = true) String type,
	                             @ApiParam(name="prescriptionCode",value="长处方单号",defaultValue = "")
	                             @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode){
		try {
			String re = prescriptionService.getDataStatus(type,prescriptionCode);
			return Result.success("查询成功!",re);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	/************************************ CA认证 ************************************************************/
	@RequestMapping(value = "RequestRealNameSoftCertAndSign",method = RequestMethod.POST)

+ 23 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/SignController.java

@ -101,6 +101,29 @@ public class SignController {
            }
        }
    }
    
    @RequestMapping(value = "getSickMedicalSimpleListInfo",method = RequestMethod.POST)
    @ApiOperation("查询老年人体检记录接口")
    public Result getSickMedicalSimpleListInfo (
            @ApiParam(name="TIME_START",value="修改的开始时间",defaultValue = "2017-6-6 00:00:00")
            @RequestParam(value="TIME_START",required = false) String TIME_START,
            @ApiParam(name="TIME_END",value="修改的开始时间",defaultValue = "2017-6-7 23:59:59")
            @RequestParam(value="TIME_END",required = false) String TIME_END){
        try {
            String response = signZYService.getSickMedicalSimpleListInfo(TIME_START,TIME_END);
            return Result.success("查询成功!",response);
        } catch (Exception ex) {
            ex.printStackTrace();
            if(ex instanceof ApiException)
            {
                ApiException apiEx = (ApiException) ex;
                return Result.error(apiEx.errorCode(),ex.getMessage());
            }
            else{
                return Result.error(ex.getMessage());
            }
        }
    }

+ 12 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/SignZYService.java

@ -160,4 +160,16 @@ public class SignZYService {
        String response = zysoftService.getSickFamilyDoctorSpecialistControlByIdcard(identity_card_no,hospitalMapping[0],hospitalMapping[1]);
        return response;
    }
    
    /**
     * 查询老年人体检记录接口
     * @param time_start
     * @param time_end
     * @return
     */
	public String getSickMedicalSimpleListInfo(String time_start, String time_end) throws Exception{
        String[] hospitalMapping = getHospitalMapping(null); //获取机构映射
        String response = zysoftService.getSickMedicalSimpleListInfo(time_start,time_end,hospitalMapping[0],hospitalMapping[1]);
        return response;
	}
}

+ 19 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZysoftService.java

@ -796,4 +796,23 @@ public class ZysoftService {
        return response;
    }
    /**
     * 查询老年人体检记录接口
     * @param time_start
     * @param time_end
     * @return
     */
	public String getSickMedicalSimpleListInfo(String time_start, String time_end, String hospital,String licence) throws Exception{
        Map<String,String> header = new HashMap<>();
        header.put("ORGCODE",hospital);
        header.put("LICENCE",licence);
        
        Map<String,String> params = new HashMap<>();
        params.put("TIME_START",time_start);
        params.put("TIME_END",time_end);
        
        String response = postSecond("getSickMedicalSimpleListInfo","查询老年人体检记录接口",params,header,false);
        
        return response;
	}
}

+ 33 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -1139,4 +1139,37 @@ public class PrescriptionService extends ZysoftBaseService{
        //添加日志
        return addZyPushLog(data,"cancelPrescription","接收订单退费消息",error,"POST",status,"1",errMsg);
    }
    
    /**
     * 获取长处方相关数据状态接口
     * @param type 数据类型:1:挂号数据;2:处方数据;3:结算数据
     * @param prescriptionCode 长处方CODE
     * @return
     */
    public String getDataStatus(String type, String prescriptionCode)  throws Exception{
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        String[] hospitalMapping = getHospitalMapping(prescription.getHospital()); //获取机构映射
        String hospital = hospitalMapping[0];
        String licence = hospitalMapping[1];
    
        Map<String,String> header = new HashMap<>();
        header.put("ORGCODE",hospital);
        header.put("LICENCE",licence);
        
        String id = "";
        
        if("1".equals(type)){
            id = prescription.getVisitNo();
        }else if("2".equals(type)){
            id = prescription.getRecipeNo();
        }else{}
    
        Map<String,String> params = new HashMap<>();
        params.put("type",type);
        params.put("id",id);
    
        String response = postSecond("getDataStatus","获取长处方相关数据状态接口",params,null,header,false,2,"2");
    
        return response;
    }
}