| 
					
				 | 
			
			
				@ -481,13 +481,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     *@param admNo 门诊唯一号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param realOrder 处方号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     *  @param status 处方状态 1审方失败,2审核完成,3结算完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public boolean updatePrescriptionByHisStatu(String admNo,String realOrder,String status)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //TODO 状态需要再判断 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql="UPDATE base.wlyy_prescription p SET p.`status`='',p.pay_status='' WHERE p.adm_no='"+admNo+"' AND p.real_order='"+realOrder+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public boolean updatePrescriptionByHisStatu(String admNo,String realOrder,String status)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //status 处方流程状态 ,11 药师审核失败 / 调整中,12  药师审核完成,已完成:100 已完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //pay_status`:处方结算状态,0为未结算,1为结算成功,默认为0', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if ("1".equals(status)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql = "UPDATE base.wlyy_prescription p SET p.`status`='11' 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 + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 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 + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        jdbcTemplate.execute(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 |