|
@@ -6,6 +6,7 @@ import com.ym.mec.biz.dal.entity.Inspection;
|
|
|
import com.ym.mec.biz.dal.entity.InspectionItem;
|
|
|
import com.ym.mec.biz.dal.entity.School;
|
|
|
import com.ym.mec.biz.dal.page.InspectionItemPlanQueryInfo;
|
|
|
+import com.ym.mec.biz.service.SysConfigService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.page.PageInfo;
|
|
@@ -34,6 +35,8 @@ public class InspectionItemPlanServiceImpl extends BaseServiceImpl<Long, Inspect
|
|
|
private MusicGroupDao musicGroupDao;
|
|
|
@Autowired
|
|
|
private InspectionItemPlanConclusionDao inspectionItemPlanConclusionDao;
|
|
|
+ @Autowired
|
|
|
+ private SysConfigDao sysConfigDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, InspectionItemPlan> getDAO() {
|
|
@@ -45,9 +48,11 @@ public class InspectionItemPlanServiceImpl extends BaseServiceImpl<Long, Inspect
|
|
|
public PageInfo<InspectionItemPlan> getPageList(InspectionItemPlanQueryInfo queryInfo) {
|
|
|
PageInfo<InspectionItemPlan> pageInfo = this.queryPage(queryInfo);
|
|
|
if (pageInfo.getTotal() > 0) {
|
|
|
+ Integer attendanceRange = Integer.valueOf(sysConfigDao.findConfigValue(SysConfigService.ATTENDANCE_RANGE));
|
|
|
List<Long> planIds = pageInfo.getRows().stream().map(InspectionItemPlan::getId).collect(Collectors.toList());
|
|
|
List<CheckItemDto> lastCheckItems = inspectionItemPlanConclusionDao.getLastCheckItem(planIds);
|
|
|
for (InspectionItemPlan row : pageInfo.getRows()) {
|
|
|
+ row.setAttendanceRange(attendanceRange);
|
|
|
for (CheckItemDto lastCheckItem : lastCheckItems) {
|
|
|
if (!lastCheckItem.getPlanId().equals(row.getId())) continue;
|
|
|
row.setLastCheckItem(lastCheckItem.getCheckItem());
|