969a30cd81923fcb91e66bcb26e1d2aa92225b52.svn-base 859 B

123456789101112131415161718192021222324252627
  1. package cn.com.goldenwater.dcproj.utils;
  2. import cn.com.goldenwater.dcproj.dao.AttAdXBaseDao;
  3. import cn.com.goldenwater.dcproj.dto.BisInspPblmImportDto;
  4. import cn.com.goldenwater.dcproj.model.AttAdXBase;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.stereotype.Component;
  7. @Component
  8. public class AdCodeVerify extends ExcelVerifyParameter<BisInspPblmImportDto>{
  9. @Autowired
  10. AttAdXBaseDao attAdXBaseDao;
  11. @Override
  12. public void doverify() throws Exception {
  13. collection.VerifyItemList.forEach(a -> {
  14. BisInspPblmImportDto obj = a.getObj();
  15. AttAdXBase byCode = attAdXBaseDao.getByCode(obj.getObjAdCode());
  16. if(byCode == null) {
  17. a.setTrueOrFalse(false);
  18. a.setMsg("行政区划代码不存在");
  19. }
  20. });
  21. }
  22. }