|  | @@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  |  import thyyxxk.webserver.config.exception.ExceptionEnum;
 | 
	
		
			
				|  |  |  import thyyxxk.webserver.dao.his.inpatient.XiangMuLuRuDao;
 | 
	
		
			
				|  |  | +import thyyxxk.webserver.dao.his.medicalinsurance.SiSettleApplyDao;
 | 
	
		
			
				|  |  |  import thyyxxk.webserver.entity.ResultVo;
 | 
	
		
			
				|  |  |  import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 | 
	
		
			
				|  |  |  import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
 | 
	
	
		
			
				|  | @@ -45,15 +46,16 @@ public class XiangMuLuRuService {
 | 
	
		
			
				|  |  |      private final XiangMuLuRuDao dao;
 | 
	
		
			
				|  |  |      private final PublicServer publicServer;
 | 
	
		
			
				|  |  |      private final SiZyService siZyService;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      private final RedisLikeService redisLikeService;
 | 
	
		
			
				|  |  | +    private final SiSettleApplyDao siSettleApplyDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    public XiangMuLuRuService(XiangMuLuRuDao dao, PublicServer publicServer, SiZyService siZyService, RedisLikeService redisLikeService) {
 | 
	
		
			
				|  |  | +    public XiangMuLuRuService(XiangMuLuRuDao dao, PublicServer publicServer, SiZyService siZyService, RedisLikeService redisLikeService, SiSettleApplyDao siSettleApplyDao) {
 | 
	
		
			
				|  |  |          this.dao = dao;
 | 
	
		
			
				|  |  |          this.publicServer = publicServer;
 | 
	
		
			
				|  |  |          this.siZyService = siZyService;
 | 
	
		
			
				|  |  |          this.redisLikeService = redisLikeService;
 | 
	
		
			
				|  |  | +        this.siSettleApplyDao = siSettleApplyDao;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
	
		
			
				|  | @@ -869,5 +871,20 @@ public class XiangMuLuRuService {
 | 
	
		
			
				|  |  |          return ResultVoUtil.success(drugPageNoGy);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    public ResultVo<String> rejectNotGeneratedMedicationList(String patNo, Integer times) {
 | 
	
		
			
				|  |  | +        log.info("拒绝生成的药单 ==> 住院号:{},住院次数:{},操作人:{}", patNo, times, TokenUtil.getTokenUserId());
 | 
	
		
			
				|  |  | +        Date disdate;
 | 
	
		
			
				|  |  | +        disdate = siSettleApplyDao.selectActOrderDisDate("yz_act_order", patNo, times);
 | 
	
		
			
				|  |  | +        if (null == disdate) {
 | 
	
		
			
				|  |  | +            disdate = siSettleApplyDao.selectActOrderDisDate("yz_inact_order", patNo, times);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (null == disdate) {
 | 
	
		
			
				|  |  | +            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者没有出院医嘱,无法执行该操作!");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        dao.rejectNotGeneratedMedicationList(patNo, times);
 | 
	
		
			
				|  |  | +        return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 |