BatchService.java 644 B

12345678910111213141516171819202122232425
  1. package com.qmth.qrzk.batch.service;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.stereotype.Service;
  4. import org.springframework.transaction.annotation.Transactional;
  5. import com.qmth.qrzk.dao.repositories.BatchRepo;
  6. import com.qmth.qrzk.dao.repositories.PaperStateViewRepo;
  7. @Service
  8. public class BatchService {
  9. @Autowired private BatchRepo batchRepo;
  10. @Autowired private PaperStateViewRepo paperStateViewRepo;
  11. /**
  12. * 删除批次
  13. * @param batchId
  14. */
  15. @Transactional
  16. public void removeBatch(int batchId){
  17. paperStateViewRepo.deleteByBatchId(batchId);
  18. batchRepo.delete(batchId);
  19. }
  20. }