lazhaoqian 3 лет назад
Родитель
Сommit
49a91c5747

+ 12 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/approvalFlow/service/impl/AuditPathsServiceImpl.java

@@ -493,6 +493,12 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
                         } else if ("F".equals(at.getIffinalItem())) {
                             fettle = 5L;
                         }
+                        // 查询财务状态
+                        TFee tFee = tFeeMapper.selectTFeeById(auditItems.getBillId());
+                        if (!"4".equals(tFee.getfBillstatus()) || !"5".equals(tFee.getfBillstatus())) {
+                            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                            return AjaxResult.error("审批通过失败: 数据已操作");
+                        }
                         //修改主订单费用信息
                         if (auditItems.getActId() >= 440 && auditItems.getActId() <= 450) {
                             tWarehouseBillsService.updateMessage(auditItems.getBillId());
@@ -826,6 +832,12 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
             }else if (auditItems.getActId() == 430){
                 fBillType = "KHDZRevoke";
             }
+            // 查询财务状态
+            TFee tFee = tFeeMapper.selectTFeeById(auditItems.getBillId());
+            if (!"4".equals(tFee.getfBillstatus()) || !"5".equals(tFee.getfBillstatus())) {
+                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                return AjaxResult.error("审批驳回失败: 数据已操作");
+            }
             // 财务模块
             AjaxResult ajaxResult = tFeeServiceImpl.tfeeFollow(auditItems.getBillId(), fettle);
             String code = ajaxResult.get("code").toString();