| 123456789101112131415161718192021222324252627282930 |
- package cn.com.goldenwater.dcproj.utils;
- import cn.com.goldenwater.dcproj.model.AttAdBase;
- import cn.com.goldenwater.dcproj.model.BisInspAccunt;
- import cn.com.goldenwater.dcproj.service.AttAdBaseService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Component;
- @Component
- public class BisInspAccuntVerify extends ExcelVerifyParameter<BisInspAccunt>{
- @Autowired
- AttAdBaseService attAdBaseService;
- @Override
- public void doverify() throws Exception {
- collection.VerifyItemList.forEach(a -> {
- BisInspAccunt obj = a.getObj();
- AttAdBase byAdcode = attAdBaseService.getByAdcode(obj.getAdCode());
- if(byAdcode == null) {
- a.setTrueOrFalse(false);
- a.setMsg("行政区划编码不存在");
- } else {
- obj.setAdName(byAdcode.getAdFullName());
- }
- });
- }
- }
|