| 
					
				 | 
			
			
				@ -557,12 +557,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public boolean updatePrescriptionByHisStatu(String admNo,String realOrder,String status)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //status 处方流程状态 ,11 药师审核失败 / 调整中,12  药师审核完成,已完成:100 已完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //status 处方流程状态 ,13  开方失败/调整中,20 诊断完成/开方成功/待支付,已完成:100 已完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //pay_status`:处方结算状态,0为未结算,1为结算成功,默认为0', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String outPatientSql=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if ("1".equals(status)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql = "UPDATE base.wlyy_prescription p SET p.`status`='11' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql = "UPDATE base.wlyy_prescription p SET p.`status`='13' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if ("2".equals(status)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql = "UPDATE base.wlyy_prescription p SET p.`status`='12' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql = "UPDATE base.wlyy_prescription p SET p.`status`='20' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //变更门诊状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            outPatientSql="UPDATE base.wlyy_outpatient p SET p.`status`='2' WHERE p.adm_no='" + admNo + "'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jdbcTemplate.execute(outPatientSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if ("3".equals(status)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql = "UPDATE base.wlyy_prescription p SET p.`status`='100',p.pay_status='1' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 |