Browse Source

修复:agency,grid,dept的del_flag改为1的时候,指标库的相关维度表不更新del_flag的问题

dev_shibei_match
wxz 4 years ago
parent
commit
9846a04006
  1. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java
  2. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java
  3. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java

@ -17,6 +17,7 @@
package com.epmet.service.evaluationindex.screen.impl; package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
@ -141,6 +142,13 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ
exists.setAllParentNames(e.getAllParentName()); exists.setAllParentNames(e.getAllParentName());
exists.setParentAreaCode(e.getParentAreaCode()); exists.setParentAreaCode(e.getParentAreaCode());
updateAgency(exists); updateAgency(exists);
// 已删除数据的处理
if ("1".equals(e.getDelFlag())) {
LambdaQueryWrapper<ScreenCustomerAgencyEntity> w = new LambdaQueryWrapper<>();
w.eq(ScreenCustomerAgencyEntity::getAgencyId, e.getId());
screenCustomerAgencyDao.delete(w);
}
} }
} }
} }

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java

@ -17,6 +17,7 @@
package com.epmet.service.evaluationindex.screen.impl; package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
@ -90,6 +91,13 @@ public class ScreenCustomerDeptServiceImpl extends BaseServiceImpl<ScreenCustome
e.setCustomerId(dept.getCustomerId()); e.setCustomerId(dept.getCustomerId());
e.setAreaCode(dept.getAreaCode()); e.setAreaCode(dept.getAreaCode());
screenCustomerDeptDao.updateById(e); screenCustomerDeptDao.updateById(e);
// 已删除数据的处理
if ("1".equals(dept.getDelFlag())) {
LambdaQueryWrapper<ScreenCustomerDeptEntity> w = new LambdaQueryWrapper<>();
w.eq(ScreenCustomerDeptEntity::getDeptId, dept.getId());
screenCustomerDeptDao.delete(w);
}
} }
} }
} }

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java

@ -18,6 +18,7 @@
package com.epmet.service.evaluationindex.screen.impl; package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
@ -94,6 +95,12 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl<ScreenCustome
screenGrid.setGridName(grid.getGridName()); screenGrid.setGridName(grid.getGridName());
screenGrid.setAreaCode(grid.getAreaCode()); screenGrid.setAreaCode(grid.getAreaCode());
screenCustomerGridDao.updateById(screenGrid); screenCustomerGridDao.updateById(screenGrid);
if ("1".equals(grid.getDelFlag())) {
LambdaQueryWrapper<ScreenCustomerGridEntity> w = new LambdaQueryWrapper<>();
w.eq(ScreenCustomerGridEntity::getGridId, grid.getId());
screenCustomerGridDao.delete(w);
}
} }
} }
} }

Loading…
Cancel
Save