|
@@ -2,9 +2,11 @@ package com.xjrsoft.module.databoard.controller;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.github.yulichang.toolkit.MPJWrappers;
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import com.xjrsoft.common.annotation.XjrLog;
|
|
|
+import com.xjrsoft.common.enums.DeleteMark;
|
|
|
import com.xjrsoft.common.enums.GenderDictionaryEnum;
|
|
|
import com.xjrsoft.common.enums.StudyStatusEnum;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
@@ -39,15 +41,18 @@ import com.xjrsoft.module.student.vo.StudentReportRecordItemVo;
|
|
|
import com.xjrsoft.module.system.entity.DictionaryDetail;
|
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
+import com.xjrsoft.module.teacher.service.IBaseTeacherService;
|
|
|
import com.xjrsoft.module.teacher.service.ITeacherbaseManagerService;
|
|
|
import com.xjrsoft.module.teacher.vo.XjrUserPageVo;
|
|
|
import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.camunda.bpm.engine.history.HistoricProcessInstance;
|
|
|
+import org.camunda.bpm.engine.history.JobState;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -85,6 +90,7 @@ import java.util.stream.Collectors;
|
|
|
public class DatadetailController {
|
|
|
|
|
|
private final ITeacherbaseManagerService teacherService;
|
|
|
+ private final IBaseTeacherService baseTeacherService;
|
|
|
private final IBaseStudentService studentService;
|
|
|
private final IWfSubscriptionService subscriptionService;
|
|
|
private final BaseSemesterMapper baseSemesterMapper;
|
|
@@ -502,7 +508,7 @@ public class DatadetailController {
|
|
|
" MAX(id) AS max_id\n" +
|
|
|
" FROM base_teacher_change_record a\n" +
|
|
|
" where a.delete_mark = 0\n" +
|
|
|
- " and a.create_date between '" +dto.getStartTime() + "' and '" + dto.getEndTime()+ "'\n" +
|
|
|
+ " and a.create_date between '" + dto.getStartTime() + "' and '" + dto.getEndTime()+ "'\n" +
|
|
|
" GROUP BY user_id) t2 on t2.max_id = t.id\n" +
|
|
|
" left join base_teacher t1 on t1.user_id = t.user_id\n" +
|
|
|
"where t.delete_mark = 0\n" +
|
|
@@ -512,6 +518,10 @@ public class DatadetailController {
|
|
|
Map<String, Map<String, Object>> statics = new LinkedHashMap<>();
|
|
|
for (Map<String, Object> oneRecord : list){
|
|
|
String jobState = oneRecord.get("new_job_state").toString();
|
|
|
+ if(jobState.equals("在职")){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
String employType = oneRecord.get("employ_type").toString();
|
|
|
if(!employType.equals("FB1601") && !employType.equals("FB1605")){
|
|
|
continue;
|
|
@@ -539,6 +549,31 @@ public class DatadetailController {
|
|
|
statics.put(jobState, oneMap);
|
|
|
}
|
|
|
}
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+
|
|
|
+ LambdaQueryWrapper<BaseTeacher> baseTeacherLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ baseTeacherLambdaQueryWrapper
|
|
|
+ .ge(BaseTeacher::getJoinTime, formatter.format(dto.getStartTime()))
|
|
|
+ .le(BaseTeacher::getJoinTime, formatter.format(dto.getEndTime()))
|
|
|
+ .eq(BaseTeacher::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
+ ;
|
|
|
+ List<BaseTeacher> baseTeacherList = baseTeacherService.list(baseTeacherLambdaQueryWrapper);
|
|
|
+ if(CollectionUtils.isNotEmpty(baseTeacherList)){
|
|
|
+ for (BaseTeacher baseTeacher : baseTeacherList){
|
|
|
+ Map<String, Object> oneMap = new LinkedHashMap<>();
|
|
|
+ oneMap.put("item", "入职人数");
|
|
|
+ oneMap.put("count", 0);
|
|
|
+ oneMap.put("count1", 0);
|
|
|
+ if("FB1601".equals(baseTeacher.getEmployType())){
|
|
|
+ oneMap.put("count", (int)oneMap.get("count") + 1);
|
|
|
+ }
|
|
|
+ if("FB1605".equals(baseTeacher.getEmployType())){
|
|
|
+ oneMap.put("count1", (int)oneMap.get("count1") + 1);
|
|
|
+ }
|
|
|
+ statics.put("入职人数", oneMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
teacherChangeStatisticsDetailVo.setTeacherChangeItemVoList(new ArrayList<>(statics.values()));
|
|
|
return RT.ok(teacherChangeStatisticsDetailVo);
|
|
|
}
|