Explorar o código

1107需要变更

wanghongzhi hai 1 ano
pai
achega
5c952845a1

+ 5 - 1
easydo-chengfa/src/main/java/easydo/technology/controller/PurchaseApplyController.java

@@ -333,7 +333,11 @@ public class PurchaseApplyController {
         Purchase purchase = new Purchase();
         purchase.setId(model.getId());
         purchase = jdbcClient.getJdbcModelById(purchase, connection);
-        if (ChengfaEnum.PURCHASE_STEP_PURCHASE_APPLY.getValue().equals(purchase.getStep())) {
+        if (ChengfaEnum.PURCHASE_STEP_PURCHASE_APPLY.getValue().equals(purchase.getStep())
+                &&
+                (ChengfaEnum.PURCHASE_STATUS_APPROVE.getValue().equals(purchase.getStatus())
+                        || ChengfaEnum.PURCHASE_STATUS_DONE.getValue().equals(purchase.getStatus()))
+        ) {
             throw new BizException("此采购申请已经发起采购申请审批,请勿操作");
         }
 

+ 0 - 16
easydo-chengfa/src/main/java/easydo/technology/service/KafkaClient.java

@@ -148,22 +148,6 @@ public class KafkaClient {
             }
 
         }
-        if (NULL_STATUS.equals(status)) {
-            sql = "select id from " + tableName + " where process_task_id = " + taskId;
-            ResultSet resultSet = statement.executeQuery(sql);
-            while (resultSet.next()) {
-                String id = resultSet.getString(1);
-                BusApprove busApprove = new BusApprove();
-                busApprove.setBusId(id);
-                busApprove.setBusType(tableName);
-                busApprove.setApproveStatus(ChengfaEnum.BUS_APPROVE_APPROVE_STATUS_DONE.getValue());
-                busApprove.setApproveResult(ChengfaEnum.BUS_APPROVE_APPROVE_RESULT_Y.getValue());
-                List<BusApprove> approveList = jdbcClient.getJdbcList(busApprove, connection);
-                for (BusApprove approveDone : approveList) {
-                    jdbcClient.jdbcRemoveById(approveDone, connection);
-                }
-            }
-        }
     }
 
     public void saveOAPurchaseInfo(String id, Connection connection) throws Exception {