|
@@ -16,6 +16,7 @@ import com.xunmei.common.core.domain.R;
|
|
|
import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingTask;
|
|
import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingTask;
|
|
|
import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingTaskToUser;
|
|
import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingTaskToUser;
|
|
|
import com.xunmei.common.core.domain.edu.vo.CoreEduTrainingTaskDetailVo;
|
|
import com.xunmei.common.core.domain.edu.vo.CoreEduTrainingTaskDetailVo;
|
|
|
|
|
+import com.xunmei.common.core.exception.ServiceException;
|
|
|
import com.xunmei.common.core.exception.SystemException;
|
|
import com.xunmei.common.core.exception.SystemException;
|
|
|
import com.xunmei.common.core.utils.DateUtils;
|
|
import com.xunmei.common.core.utils.DateUtils;
|
|
|
import com.xunmei.common.core.web.domain.AjaxResult;
|
|
import com.xunmei.common.core.web.domain.AjaxResult;
|
|
@@ -47,6 +48,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
|
|
+import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -803,7 +805,8 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
}
|
|
}
|
|
|
return vos;
|
|
return vos;
|
|
|
}
|
|
}
|
|
|
- public List<ResumptionPdf> getResult(Map<Long, List<AppResumptionDataInfoVo>> bef){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public List<ResumptionPdf> getResult(Map<Long, List<AppResumptionDataInfoVo>> bef) {
|
|
|
List<ResumptionPdf> befs = new ArrayList<>();
|
|
List<ResumptionPdf> befs = new ArrayList<>();
|
|
|
for (Long l :
|
|
for (Long l :
|
|
|
bef.keySet()) {
|
|
bef.keySet()) {
|
|
@@ -812,16 +815,41 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
int result = 0;
|
|
int result = 0;
|
|
|
for (AppResumptionDataInfoVo vo :
|
|
for (AppResumptionDataInfoVo vo :
|
|
|
bef.get(l)) {
|
|
bef.get(l)) {
|
|
|
- pointName=vo.getPointName();
|
|
|
|
|
|
|
+ pointName = vo.getPointName();
|
|
|
result += vo.getResValue();
|
|
result += vo.getResValue();
|
|
|
submitName.append(vo.getSubmitName());
|
|
submitName.append(vo.getSubmitName());
|
|
|
}
|
|
}
|
|
|
- ResumptionPdf tem= new ResumptionPdf();
|
|
|
|
|
|
|
+ ResumptionPdf tem = new ResumptionPdf();
|
|
|
tem.setPointName(pointName);
|
|
tem.setPointName(pointName);
|
|
|
tem.setSubmitName(String.valueOf(submitName));
|
|
tem.setSubmitName(String.valueOf(submitName));
|
|
|
- tem.setResValue(result>0?1:0);
|
|
|
|
|
|
|
+ tem.setResValue(result > 0 ? 1 : 0);
|
|
|
befs.add(tem);
|
|
befs.add(tem);
|
|
|
}
|
|
}
|
|
|
return befs;
|
|
return befs;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 更新计划及父计划的任务是否有已完成标志。
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param planId
|
|
|
|
|
+ * @param state
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Async
|
|
|
|
|
+ public void updatePlanCompletedState(Long planId, Integer state) {
|
|
|
|
|
+ if (ObjectUtil.notEqual(state, 1) && ObjectUtil.notEqual(state, 0) && ObjectUtil.isNotNull(state)) {
|
|
|
|
|
+ throw new ServiceException("state参数值无效");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ LambdaUpdateWrapper<AppPlan> wrapper = new LambdaUpdateWrapper();
|
|
|
|
|
+ wrapper.eq(AppPlan::getId, planId)
|
|
|
|
|
+ .eq(AppPlan::getTaskHasCompleted, state)
|
|
|
|
|
+ .set(AppPlan::getTaskHasCompleted, state);
|
|
|
|
|
+ if (ObjectUtil.isNull(state)) {
|
|
|
|
|
+ wrapper.isNull(AppPlan::getTaskHasCompleted);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ wrapper.eq(AppPlan::getTaskHasCompleted, state);
|
|
|
|
|
+ }
|
|
|
|
|
+ baseMapper.update(null, wrapper);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|