| 
					
				 | 
			
			
				@@ -262,9 +262,10 @@ public class SiZyService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         preSetlmt.setAcctUsedFlag(YesOrNo.NO.getCodeStr()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         preSetlmt.setMidSetlFlag(YesOrNo.NO.getCodeStr()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         preSetlmt.setMdtrtareaAdmvs(SiUtil.getInstitutionArea(preSetlmt.getInsuplcAdmdvs())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        preSetlmt.setDscgTime(dao.selectActOrderDisDate(p.getInpatientNo(), p.getAdmissTimes())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.HOSPITALIZATION_PRE_SETTLEMENT, preSetlmt.getInsuplcAdmdvs()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String ref = JSONObject.toJSONString(preSetlmt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String ref = JSONObject.toJSONStringWithDateFormat(preSetlmt, "yyyy-MM-dd"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         input.getJSONObject("input").put("data", JSONObject.parseObject(ref)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         JSONObject result = exec.executeTrade(input, SiFunction.HOSPITALIZATION_PRE_SETTLEMENT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         log.info("预结算:\n参数:{},\n结果:{}", input, result); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -468,10 +469,18 @@ public class SiZyService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (infcode == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (p.getStopHere()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return ResultVoUtil.success("出院办理成功。"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             p.setDismissDate(dscginfo.getEndtime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return inpatientSettlement(p); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String errMsg = result.getString(ERROR_MESSAGE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (null != errMsg && errMsg.contains("该人员已经是出院状态")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            p.setDismissDate(dscginfo.getEndtime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return inpatientSettlement(p); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, errMsg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResultVo<String> revokeDischarge(ZyPatientInfo p) { 
			 |