Browse Source

add 教务端乐团巡查日程管理

周箭河 4 years ago
parent
commit
b10a8346ad

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/InspectionItemPlan.java

@@ -124,6 +124,9 @@ public class InspectionItemPlan {
     @ApiModelProperty(value = "已提交的最后结果项")
     private Integer lastCheckItem = 0;
 
+    @ApiModelProperty(value = "打卡范围")
+    private Integer attendanceRange;
+
     public Long getId() {
         return id;
     }
@@ -291,4 +294,12 @@ public class InspectionItemPlan {
     public void setConclusionStatus(Integer conclusionStatus) {
         this.conclusionStatus = conclusionStatus;
     }
+
+    public Integer getAttendanceRange() {
+        return attendanceRange;
+    }
+
+    public void setAttendanceRange(Integer attendanceRange) {
+        this.attendanceRange = attendanceRange;
+    }
 }

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/InspectionItemPlanServiceImpl.java

@@ -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());