StockSqlService.java 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package platform.modules.api.service;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.stereotype.Service;
  4. import org.springframework.transaction.annotation.Transactional;
  5. import platform.modules.company.dao.StockLandDao;
  6. import platform.modules.company.entity.StockLand;
  7. import java.util.List;
  8. /**
  9. * @author wangjiang
  10. * @since 2020/01/17 2:19 PM
  11. * 做一些sql 插入的测试
  12. */
  13. @Service
  14. public class StockSqlService {
  15. @Autowired
  16. private StockLandDao stockLandDao;
  17. /**
  18. * 添加自动化审批简易流程
  19. * @param applyNoList
  20. ` */
  21. @Transactional(rollbackFor = Exception.class)
  22. public void insertAutoEasyProcessDataToStockLand(List<String> applyNoList) {
  23. stockLandDao.updateEasyProcessData(applyNoList);
  24. for (String applyNo: applyNoList) {
  25. StockLand qo = new StockLand();
  26. qo.setApply_no(applyNo);
  27. StockLand stockLand = stockLandDao.selectOne(qo);
  28. stockLandDao.insertAutoEasyProcessDataToStockLand(stockLand.getId().toString());
  29. }
  30. }
  31. }