|  | @@ -276,13 +276,13 @@ public class ZyActpatientController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  | -     * 根据住院号查询在院记录
 | 
	
		
			
				|  |  | +     * 根据住院号查询在/出院记录
 | 
	
		
			
				|  |  |       *
 | 
	
		
			
				|  |  |       * @return
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      @UserLoginToken
 | 
	
		
			
				|  |  |      @RequestMapping(value = "/getByInpatientNo", method = {RequestMethod.GET})
 | 
	
		
			
				|  |  | -    public Map<String, Object> getByInpatientNo(@RequestParam("inpatientNo") String inpatientNo,@RequestParam("tableName") String tableName) {
 | 
	
		
			
				|  |  | +    public Map<String, Object> getByInpatientNo(@RequestParam("inpatientNo") String inpatientNo,@RequestParam("admissTimes") Integer admissTimes,@RequestParam("tableName") String tableName) {
 | 
	
		
			
				|  |  |          log.info("根据住院号查询在院记录");
 | 
	
		
			
				|  |  |          Map<String, Object> resultMap = new HashMap<>();
 | 
	
		
			
				|  |  |          try {
 | 
	
	
		
			
				|  | @@ -291,6 +291,11 @@ public class ZyActpatientController {
 | 
	
		
			
				|  |  |                  resultMap.put("message", "病人住院号不能为空");
 | 
	
		
			
				|  |  |                  return resultMap;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            if (admissTimes==null) {
 | 
	
		
			
				|  |  | +                resultMap.put("code", -1);
 | 
	
		
			
				|  |  | +                resultMap.put("message", "病人住院次数不能为空");
 | 
	
		
			
				|  |  | +                return resultMap;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              if (StringUtils.isBlank(tableName)) {
 | 
	
		
			
				|  |  |                  resultMap.put("code", -1);
 | 
	
		
			
				|  |  |                  resultMap.put("message", "病人在院状态不能为空");
 | 
	
	
		
			
				|  | @@ -298,7 +303,7 @@ public class ZyActpatientController {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              resultMap.put("code", 0);
 | 
	
		
			
				|  |  |              resultMap.put("message", "根据住院号查询在院记录成功");
 | 
	
		
			
				|  |  | -            ZyActpatient zyActpatient=zyActpatientService.queryByInpatientNo(tableName,inpatientNo);
 | 
	
		
			
				|  |  | +            ZyActpatient zyActpatient=zyActpatientService.queryByInpatientNo(tableName,inpatientNo,admissTimes);
 | 
	
		
			
				|  |  |              GenderEnum genderEnum= GenderEnum.getGenderByCode(Integer.valueOf(zyActpatient.getSex()));
 | 
	
		
			
				|  |  |              zyActpatient.setGender(genderEnum==null?GenderEnum.UNKNOWN.name:genderEnum.name);
 | 
	
		
			
				|  |  |              zyActpatient.setDeptName(zdUnitCodeService.queryDeptNameByIdInCache(zyActpatient.getDept()));
 |