05b0c9870f7454c352484a3ce0eb732af72f171a.svn-base 943 B

123456789101112131415161718192021222324252627282930
  1. package cn.com.goldenwater.dcproj.utils;
  2. import cn.com.goldenwater.dcproj.model.AttAdBase;
  3. import cn.com.goldenwater.dcproj.model.BisInspAccunt;
  4. import cn.com.goldenwater.dcproj.service.AttAdBaseService;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.stereotype.Component;
  7. @Component
  8. public class BisInspAccuntVerify extends ExcelVerifyParameter<BisInspAccunt>{
  9. @Autowired
  10. AttAdBaseService attAdBaseService;
  11. @Override
  12. public void doverify() throws Exception {
  13. collection.VerifyItemList.forEach(a -> {
  14. BisInspAccunt obj = a.getObj();
  15. AttAdBase byAdcode = attAdBaseService.getByAdcode(obj.getAdCode());
  16. if(byAdcode == null) {
  17. a.setTrueOrFalse(false);
  18. a.setMsg("行政区划编码不存在");
  19. } else {
  20. obj.setAdName(byAdcode.getAdFullName());
  21. }
  22. });
  23. }
  24. }