|  | @@ -358,6 +358,7 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
 | 
	
		
			
				|  |  |       * @return 结果
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | +    @Transactional
 | 
	
		
			
				|  |  |      public AjaxResult approvalRejected(AuditItems auditItems) {
 | 
	
		
			
				|  |  |          long fettle = 0L;
 | 
	
		
			
				|  |  |          if (auditItems.getActId() >= 110 && auditItems.getActId() <= 140) {
 | 
	
	
		
			
				|  | @@ -438,4 +439,52 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
 | 
	
		
			
				|  |  |          return AjaxResult.success();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     *   审批撤销
 | 
	
		
			
				|  |  | +     * @param auditItems 审核人、单据信息
 | 
	
		
			
				|  |  | +     * @return
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    @Transactional
 | 
	
		
			
				|  |  | +    public AjaxResult revoke(AuditItems auditItems) {
 | 
	
		
			
				|  |  | +        long fettle = 0L;
 | 
	
		
			
				|  |  | +        if (auditItems.getActId() >= 110 && auditItems.getActId() <= 140) {
 | 
	
		
			
				|  |  | +            fettle = 2L;
 | 
	
		
			
				|  |  | +            // 仓库模块
 | 
	
		
			
				|  |  | +            AjaxResult ajaxResult = tWarehouseBillsService.warehouseFollow(auditItems.getBillId(), fettle);
 | 
	
		
			
				|  |  | +            String code = (String) ajaxResult.get("code");
 | 
	
		
			
				|  |  | +            if ("500".equals(code)) {
 | 
	
		
			
				|  |  | +                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            return ajaxResult;
 | 
	
		
			
				|  |  | +        } else if (auditItems.getActId() >= 210 && auditItems.getActId() <= 230) {
 | 
	
		
			
				|  |  | +            fettle = 2L;
 | 
	
		
			
				|  |  | +            // 财务模块
 | 
	
		
			
				|  |  | +            AjaxResult ajaxResult = tFeeServiceImpl.tfeeFollow(auditItems.getBillId(), fettle);
 | 
	
		
			
				|  |  | +            String code = (String) ajaxResult.get("code");
 | 
	
		
			
				|  |  | +            if ("500".equals(code)) {
 | 
	
		
			
				|  |  | +                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            return ajaxResult;
 | 
	
		
			
				|  |  | +        } else if (auditItems.getActId() >= 310 && auditItems.getActId() <= 320) {
 | 
	
		
			
				|  |  | +            fettle = 2L;
 | 
	
		
			
				|  |  | +            // 协议模块
 | 
	
		
			
				|  |  | +            AjaxResult ajaxResult = tWarehouseAgreementService.agreementFollow(auditItems.getBillId(), fettle);
 | 
	
		
			
				|  |  | +            String code = (String) ajaxResult.get("code");
 | 
	
		
			
				|  |  | +            if ("500".equals(code)) {
 | 
	
		
			
				|  |  | +                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            return ajaxResult;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        AuditItems item = new AuditItems();
 | 
	
		
			
				|  |  | +        item.setBillId(auditItems.getId());
 | 
	
		
			
				|  |  | +        item.setActId(auditItems.getActId());
 | 
	
		
			
				|  |  | +        int deleteNum = auditItemsMapper.deletePurchaseApproval(item);
 | 
	
		
			
				|  |  | +        if (deleteNum == 0) {
 | 
	
		
			
				|  |  | +            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 | 
	
		
			
				|  |  | +            return AjaxResult.error("审批撤销失败: 更新审批状态失败");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return AjaxResult.success();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 |