Kaynağa Gözat

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

huangwenjie 7 yıl önce
ebeveyn
işleme
91c53d6294

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

@ -251,7 +251,7 @@ public class GuahaoController {
	 */
	@RequestMapping(value = "/imm/GetChildrenInfo",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:获取儿童信息")
	@ApiOperation("计免:获取免疫接种儿童信息")
	public Result GetChildrenInfo(@ApiParam(name="barCode",value="条形编码",defaultValue = "0052248552")
								@RequestParam String barCode)
	{
@ -265,4 +265,161 @@ public class GuahaoController {
			return Result.error(ex.getMessage());
		}
	}
	
	@RequestMapping(value = "/imm/GetOrgImmuneList",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:获取免疫接种机构列表")
	public Result GetOrgImmuneList(@ApiParam(name="Condition",value="",defaultValue = "")
	                              @RequestParam String Condition)
	{
		try {
			
			String data = guahaoService.GetOrgImmuneList(Condition);
			
			return Result.success("获取免疫接种机构列表!",data);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	
	@RequestMapping(value = "/imm/GetOrgNumberList",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:获取免疫接种号源")
	public Result GetOrgNumberList(@ApiParam(name="orgId",value="机构编码",defaultValue = "")
	                               @RequestParam String orgId,
	                               @ApiParam(name="ScheduleId",value="排班ID",defaultValue = "")
	                               @RequestParam String ScheduleId)
	{
		try {
			
			String data = guahaoService.GetOrgNumberList(orgId,ScheduleId);
			
			return Result.success("获取免疫接种号源!",data);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	
	@RequestMapping(value = "/imm/GetOrgScheduleList",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:获取免疫接种排班信息")
	public Result GetOrgScheduleList(@ApiParam(name="OrgCode",value="机构编码",defaultValue = "")
	                               @RequestParam String OrgCode,
	                               @ApiParam(name="strStart",value="开始日期",defaultValue = "")
	                               @RequestParam String strStart,
	                               @ApiParam(name="strEnd",value="结束日期",defaultValue = "")
	                               @RequestParam String strEnd)
	{
		try {
			
			String data = guahaoService.GetOrgScheduleList(OrgCode,strStart,strEnd);
			
			return Result.success("获取免疫接种排班信息!",data);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	
	@RequestMapping(value = "/imm/GetOrgScheduleAndNumberList",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:获取免疫接种排班信息和号源信息")
	public Result GetOrgScheduleAndNumberList(@ApiParam(name="OrgCode",value="条形编码",defaultValue = "")
	                                          @RequestParam String OrgCode)
	{
		try {
			
			String data = guahaoService.GetOrgScheduleAndNumberList(OrgCode);
			
			return Result.success("获取免疫接种排班信息和号源信息!",data);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	
	@RequestMapping(value = "/imm/GetResImmuneListWithBarCode",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:根据条形码获取预约记录")
	public Result GetResImmuneListWithBarCode(@ApiParam(name="BarCode",value="条形编码",defaultValue = "")
	                                 @RequestParam String BarCode)
	{
		try {
			
			String data = guahaoService.GetResImmuneListWithBarCode(BarCode);
			
			return Result.success("根据条形码获取预约记录!",data);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	
	@RequestMapping(value = "/imm/RegisterImmune",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:免疫接种确认预约")
	public Result RegisterImmune(@ApiParam(name="BarCode",value="条形编码",defaultValue = "")
	                             @RequestParam String BarCode,
	                             @ApiParam(name="OrgCode",value="机构编码",defaultValue = "")
	                             @RequestParam String OrgCode,
	                             @ApiParam(name="SectionType",value="坐诊类型",defaultValue = "")
	                             @RequestParam String SectionType,
	                             @ApiParam(name="strStart",value="日期:第一次坐诊开始日期",defaultValue = "")
	                             @RequestParam String strStart,
	                             @ApiParam(name="SSID",value="市民社保卡号",defaultValue = "")
	                             @RequestParam String SSID,
	                             @ApiParam(name="PatientName",value="儿童姓名",defaultValue = "")
	                             @RequestParam String PatientName,
	                             @ApiParam(name="PatientID",value="儿童身份证号",defaultValue = "")
	                             @RequestParam String PatientID,
	                             @ApiParam(name="PatientPhone",value="市民手机号",defaultValue = "")
	                             @RequestParam String PatientPhone)
	{
		try {
			
			String data = guahaoService.RegisterImmune(BarCode,OrgCode,SectionType,strStart,SSID,PatientName,PatientID,PatientPhone);
			
			return Result.success("免疫接种确认预约成功!",data);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	
	@RequestMapping(value = "/imm/UnResRegisterImmune",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:免疫接种取消预约")
	public Result UnResRegisterImmune(@ApiParam(name="BarCode",value="条形编码",defaultValue = "")
	                             @RequestParam String BarCode,
	                             @ApiParam(name="OrgCode",value="机构编码",defaultValue = "")
	                             @RequestParam String OrgCode,
	                             @ApiParam(name="SectionType",value="坐诊类型",defaultValue = "")
	                             @RequestParam String SectionType,
	                             @ApiParam(name="strStart",value="日期:第一次坐诊开始日期",defaultValue = "")
	                             @RequestParam String strStart,
	                             @ApiParam(name="SSID",value="市民社保卡号",defaultValue = "")
	                             @RequestParam String SSID,
	                             @ApiParam(name="PatientName",value="儿童姓名",defaultValue = "")
	                             @RequestParam String PatientName,
	                             @ApiParam(name="PatientID",value="儿童身份证号",defaultValue = "")
	                             @RequestParam String PatientID,
	                             @ApiParam(name="PatientPhone",value="市民手机号",defaultValue = "")
	                             @RequestParam String PatientPhone)
	{
		try {
			
			String data = guahaoService.UnResRegisterImmune(BarCode,OrgCode,SectionType,strStart,SSID,PatientName,PatientID,PatientPhone);
			
			return Result.success("免疫接种取消预约成功!",data);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	
	/**
	 * =============================计免预约挂号相关接口======================================END
	 */
}

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

@ -1254,7 +1254,7 @@ public class GuahaoService {
    }
    
    /**
     * 获取儿童信息
     * 获取免疫接种儿童信息
     * @param credential 条形编码
     * @return
     */
@ -1262,7 +1262,7 @@ public class GuahaoService {
        String result = "";
        Map<String,String> params = new HashMap<>();
        params.put("BarCode", credential);
        result = immPostSecond("GetChildrenInfo","计免预约-获取儿童信息",params);
        result = immPostSecond("GetChildrenInfo","计免预约-获取儿童信息成功",params);
    
        com.alibaba.fastjson.JSONObject data = com.alibaba.fastjson.JSONObject.parseObject(result);
        
@ -1272,5 +1272,156 @@ public class GuahaoService {
        
        return result;
    }
    
    /**
     * 获取免疫接种机构列表
     * @param condition
     * @return
     */
    public String GetOrgImmuneList(String condition)throws Exception  {
        String result = "";
        Map<String,String> params = new HashMap<>();
        params.put("Condition", condition);
        return immPostSecond("GetOrgImmuneList","计免预约-获取免疫接种机构列表",params);
    }
    
    /**
     * 获取免疫接种号源
     * @param orgId 机构编码
     * @param scheduleId 排班ID
     * @return
     */
    public String GetOrgNumberList(String orgId, String scheduleId) throws Exception  {
        String result = "";
        Map<String,String> params = new HashMap<>();
        params.put("orgId", orgId);
        params.put("ScheduleId", scheduleId);
        return immPostSecond("GetOrgNumberList","计免预约-获取免疫接种号源",params);
    }
    
    /**
     * 获取免疫接种排班信息
     * @param orgCode 机构编码
     * @param strStart 开始时间
     * @param strEnd 结束时间
     * @return
     * @throws Exception
     */
    public String GetOrgScheduleList(String orgCode, String strStart, String strEnd) throws Exception {
        String result = "";
        Map<String,String> params = new HashMap<>();
        params.put("OrgCode", orgCode);
        params.put("strStart", strStart);
        params.put("strEnd", strEnd);
        return immPostSecond("GetOrgScheduleList","计免预约-获取免疫接种排班信息",params);
    }
    
    /**
     * 根据条形编码获取预约记录
     * @param barCode
     * @return
     * @throws Exception
     */
    public String GetResImmuneListWithBarCode(String barCode) throws Exception{
        String result = "";
        Map<String,String> params = new HashMap<>();
        params.put("BarCode", barCode);
        return immPostSecond("GetResImmuneListWithBarCode","计免预约-根据条形编码获取预约记录",params);
    }
    
    /**
     * 获取免疫接种排班信息和号源信息
     * @param orgCode
     * @return
     * @throws Exception
     */
    public String GetOrgScheduleAndNumberList(String orgCode)throws Exception {
        String result = "";
        Map<String,String> params = new HashMap<>();
        params.put("OrgCode", orgCode);
        return immPostSecond("GetOrgScheduleAndNumberList","计免预约-获取免疫接种排班信息和号源信息",params);
    }
    
    /**
     *免疫接种确认预约
     * @param barCode
     * @param orgCode
     * @param sectionType
     * @param strStart
     * @param ssid
     * @param patientName
     * @param patientID
     * @param patientPhone
     * @return
     */
    public String RegisterImmune(String barCode,
                                 String orgCode,
                                 String sectionType,
                                 String strStart,
                                 String ssid,
                                 String patientName,
                                 String patientID,
                                 String patientPhone)throws Exception {
        String result = "";
        Map<String,String> params = new HashMap<>();
        params.put("BarCode", barCode);
        params.put("OrgCode", orgCode);
        params.put("SectionType", sectionType);
        params.put("strStart", strStart);
        params.put("SSID", ssid);
        params.put("PatientName", patientName);
        params.put("PatientID", patientID);
        params.put("PatientPhone", patientPhone);
        result = immPostSecond("RegisterImmune","计免预约-免疫接种确认预约",params);
    
        com.alibaba.fastjson.JSONObject data = com.alibaba.fastjson.JSONObject.parseObject(result);
    
        if(data.containsKey("OK")){
            result = data.getString("OK");
        }
    
        return result;
    }
    
    /**
     * 免疫接种取消预约
     * @param barCode
     * @param orgCode
     * @param sectionType
     * @param strStart
     * @param ssid
     * @param patientName
     * @param patientID
     * @param patientPhone
     * @return
     * @throws Exception
     */
    public String UnResRegisterImmune(String barCode,
                                      String orgCode,
                                      String sectionType,
                                      String strStart,
                                      String ssid,
                                      String patientName,
                                      String patientID,
                                      String patientPhone) throws Exception {
        String result = "";
        Map<String,String> params = new HashMap<>();
        params.put("BarCode", barCode);
        params.put("OrgCode", orgCode);
        params.put("SectionType", sectionType);
        params.put("strStart", strStart);
        params.put("SSID", ssid);
        params.put("PatientName", patientName);
        params.put("PatientID", patientID);
        params.put("PatientPhone", patientPhone);
        result = immPostSecond("UnResRegisterImmune","计免预约-免疫接种确认预约",params);
    
        com.alibaba.fastjson.JSONObject data = com.alibaba.fastjson.JSONObject.parseObject(result);
    
        if(data.containsKey("OK")){
            result = data.getString("OK");
        }
    
        return result;
    }
}