소스 검색

Merge remote-tracking branch 'origin/dev' into dev

大数据与最优化研究所 7 달 전
부모
커밋
1b72a9d572

+ 4 - 0
src/main/java/com/xjrsoft/module/evaluate/dto/EvaluateObjectListDto.java

@@ -5,6 +5,7 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 
 /**
@@ -43,4 +44,7 @@ public class EvaluateObjectListDto implements Serializable {
     @ApiModelProperty("结束时间")
     private Date endTime;
 
+    @ApiModelProperty("班级ids")
+    private String classIds;
+
 }

+ 16 - 6
src/main/java/com/xjrsoft/module/evaluate/service/impl/EvaluateObjectServiceImpl.java

@@ -374,9 +374,12 @@ public class EvaluateObjectServiceImpl extends MPJBaseServiceImpl<EvaluateObject
         else if (dto.getEvaluateType() != null && dto.getEvaluateType().equals(EvaluateTypeEnum.STU_SELF_EVALUATE.getCode())){//学生自评
             BaseStudentUserPageDto studentUserPageDto = new BaseStudentUserPageDto();
             studentUserPageDto.setGradeId(dto.getGradeId());
-            if(dto.getClassId() != null){
+            if(StrUtil.isNotEmpty(dto.getClassIds())){
+                String[] ids = dto.getClassIds().split(",");
                 List<Long> classIds = new ArrayList<>();
-                classIds.add(dto.getClassId());
+                for (String id : ids) {
+                    classIds.add(Long.parseLong(id));
+                }
                 studentUserPageDto.setClassIds(classIds);
             }
             List<BaseStudentUserPageVo> studentList = studentService.getStudentList(studentUserPageDto);
@@ -408,9 +411,12 @@ public class EvaluateObjectServiceImpl extends MPJBaseServiceImpl<EvaluateObject
         else if (dto.getEvaluateType() != null && dto.getEvaluateType().equals(EvaluateTypeEnum.CLASS_STU_EVALUATE.getCode())){//班级学生交叉互评
             BaseStudentUserPageDto studentUserPageDto = new BaseStudentUserPageDto();
             studentUserPageDto.setGradeId(dto.getGradeId());
-            if(dto.getClassId() != null){
+            if(StrUtil.isNotEmpty(dto.getClassIds())){
+                String[] ids = dto.getClassIds().split(",");
                 List<Long> classIds = new ArrayList<>();
-                classIds.add(dto.getClassId());
+                for (String id : ids) {
+                    classIds.add(Long.parseLong(id));
+                }
                 studentUserPageDto.setClassIds(classIds);
             }
             List<BaseStudentUserPageVo> studentList = studentService.getStudentList(studentUserPageDto);
@@ -450,12 +456,16 @@ public class EvaluateObjectServiceImpl extends MPJBaseServiceImpl<EvaluateObject
         else if (dto.getEvaluateType() != null && dto.getEvaluateType().equals(EvaluateTypeEnum.TEA_EVALUATE_STU.getCode())){//教师评价班级学生
             BaseStudentUserPageDto studentUserPageDto = new BaseStudentUserPageDto();
             studentUserPageDto.setGradeId(dto.getGradeId());
-            if(dto.getClassId() != null){
+            if(StrUtil.isNotEmpty(dto.getClassIds())){
+                String[] ids = dto.getClassIds().split(",");
                 List<Long> classIds = new ArrayList<>();
-                classIds.add(dto.getClassId());
+                for (String id : ids) {
+                    classIds.add(Long.parseLong(id));
+                }
                 studentUserPageDto.setClassIds(classIds);
             }
 
+
             List<BaseStudentUserPageVo> studentList = studentService.getStudentList(studentUserPageDto);
 
             for (BaseStudentUserPageVo student : studentList) {

+ 14 - 14
src/main/java/com/xjrsoft/module/job/EnrollmentStatisticsInfoTask.java

@@ -6,7 +6,7 @@ import com.xjrsoft.module.student.dto.EnrollmentStatisticsCalendarInfoDto;
 import com.xjrsoft.module.student.dto.EnrollmentStatisticsGraduationInfoDto;
 import com.xjrsoft.module.student.dto.EnrollmentStatisticsInfoDto;
 import com.xjrsoft.module.student.entity.EnrollmentStatisticsInfo;
-import com.xjrsoft.module.student.mapper.EnrollmentStatisticsInfoMapper;
+import com.xjrsoft.module.student.service.IEnrollmentStatisticsInfoService;
 import com.xjrsoft.module.student.service.IPbCseFeeobjupdateService;
 import com.xjrsoft.module.student.vo.EnrollmentStatisticsCalendarInfoVo;
 import com.xjrsoft.module.student.vo.EnrollmentStatisticsGraduationInfoVo;
@@ -39,15 +39,15 @@ public class EnrollmentStatisticsInfoTask {
     private IPbCseFeeobjupdateService pbCseFeeobjupdateService;
 
     @Autowired
-    private EnrollmentStatisticsInfoMapper enrollmentStatisticsInfoMapper;
+    private IEnrollmentStatisticsInfoService enrollmentStatisticsInfoService;
 
-    @Async
-    @Scheduled(cron = "00 0/20 * * * ?")
-    public void execute() {
-        doExecute();
-    }
+//    @Async
+//    @Scheduled(cron = "00 0/20 * * * ?")
+//    public void execute() {
+//        doExecute(pbCseFeeobjupdateService, enrollmentStatisticsInfoService);
+//    }
 
-    void doExecute() {
+    public void doExecute(IPbCseFeeobjupdateService pbCseFeeobjupdateService, IEnrollmentStatisticsInfoService enrollmentStatisticsInfoService) {
         LocalDate now = LocalDate.now();
         String dataDate = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
         EnrollmentStatisticsInfoDto dto = new EnrollmentStatisticsInfoDto();
@@ -55,7 +55,7 @@ public class EnrollmentStatisticsInfoTask {
         dto.setYear(now.getYear() + "");
         EnrollmentStatisticsInfoVo info = pbCseFeeobjupdateService.getEnrollmentStatisticsInfo(dto);
         if(info != null){
-            enrollmentStatisticsInfoMapper.deleteDataByDate(dataDate);
+            enrollmentStatisticsInfoService.deleteDataByDate(dataDate);
             EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
             infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
             infoData.setDeleteMark(DeleteMark.NODELETE.getCode());
@@ -64,7 +64,7 @@ public class EnrollmentStatisticsInfoTask {
             infoData.setDataJson(JsonUtil.toJsonString(info));
             infoData.setDataType(1);
             infoData.setDataDay(now);
-            enrollmentStatisticsInfoMapper.insert(infoData);
+            enrollmentStatisticsInfoService.save(infoData);
         }
 
         EnrollmentStatisticsGraduationInfoDto graduationInfoDto = new EnrollmentStatisticsGraduationInfoDto();
@@ -72,7 +72,7 @@ public class EnrollmentStatisticsInfoTask {
         EnrollmentStatisticsGraduationInfoVo graduationInfo = pbCseFeeobjupdateService.getEnrollmentStatisticsGraduationInfo(graduationInfoDto);
 
         if(graduationInfo != null){
-            enrollmentStatisticsInfoMapper.deleteGraduationDataByDate(dataDate);
+            enrollmentStatisticsInfoService.deleteGraduationDataByDate(dataDate);
 
             EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
             infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
@@ -82,7 +82,7 @@ public class EnrollmentStatisticsInfoTask {
             infoData.setDataJson(JsonUtil.toJsonString(graduationInfo));
             infoData.setDataType(2);
             infoData.setDataDay(now);
-            enrollmentStatisticsInfoMapper.insert(infoData);
+            enrollmentStatisticsInfoService.save(infoData);
         }
 
         LocalDate thisSaturday = now.with(TemporalAdjusters.nextOrSame(DayOfWeek.SATURDAY));
@@ -98,7 +98,7 @@ public class EnrollmentStatisticsInfoTask {
         EnrollmentStatisticsCalendarInfoVo calendarInfoVo = pbCseFeeobjupdateService.getEnrollmentStatisticsCalendarInfo(calendarInfoDto);
 
         if(calendarInfoVo != null){
-            enrollmentStatisticsInfoMapper.deleteCalendarDataByDate(lastSundayStr, thisSaturdayStr);
+            enrollmentStatisticsInfoService.deleteCalendarDataByDate(lastSundayStr, thisSaturdayStr);
 
             EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
             infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
@@ -110,7 +110,7 @@ public class EnrollmentStatisticsInfoTask {
             infoData.setDataStartDay(lastSunday);
             infoData.setDataEndDay(thisSaturday);
             infoData.setDataDay(now);
-            enrollmentStatisticsInfoMapper.insert(infoData);
+            enrollmentStatisticsInfoService.save(infoData);
         }
     }
 }

+ 4 - 2
src/main/java/com/xjrsoft/module/oa/service/impl/NewsServiceImpl.java

@@ -526,9 +526,11 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
     private Boolean addRelationByGuideShowRange(News xjrNews) {
         if (xjrNews.getGuideShowRange().contains("2")) {
             newsRelationMapper.insertAllTeaStaff(xjrNews.getId());
-        } else if (xjrNews.getGuideShowRange().contains("3")) {
+        }
+        if (xjrNews.getGuideShowRange().contains("3")) {
             newsRelationMapper.insertAllStudentStaff(xjrNews.getId());
-        } else if(xjrNews.getGuideShowRange().contains("4")){
+        }
+        if(xjrNews.getGuideShowRange().contains("4")){
             newsRelationMapper.insertAllParentsStaff(xjrNews.getId());
         }
         return true;

+ 13 - 0
src/main/java/com/xjrsoft/module/student/controller/PbCseFeeobjupdateController.java

@@ -17,8 +17,10 @@ import com.xjrsoft.common.utils.TreeUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.base.entity.BaseGrade;
 import com.xjrsoft.module.base.service.IBaseGradeService;
+import com.xjrsoft.module.job.EnrollmentStatisticsInfoTask;
 import com.xjrsoft.module.student.dto.*;
 import com.xjrsoft.module.student.entity.PbCseFeeobjupdate;
+import com.xjrsoft.module.student.service.IEnrollmentStatisticsInfoService;
 import com.xjrsoft.module.student.service.IPbCseFeeobjupdateService;
 import com.xjrsoft.module.student.vo.*;
 import io.swagger.annotations.Api;
@@ -51,6 +53,8 @@ public class PbCseFeeobjupdateController {
 
     private final IBaseGradeService baseGradeService;
 
+    private final IEnrollmentStatisticsInfoService enrollmentStatisticsInfoService;
+
     @GetMapping(value = "/grade-enrolltype-tree")
     @ApiOperation(value = "年级招生类型树")
     @XjrLog(value = "年级招生类型树")
@@ -185,4 +189,13 @@ public class PbCseFeeobjupdateController {
         EasyExcel.write(bot, PbCseFeeobjupdatePageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
         return RT.fileStream(bot.toByteArray(), "PbCseFeeobjupdate" + ExcelTypeEnum.XLSX.getValue());
     }
+
+    @GetMapping("/enrollment-statistics-start")
+    @ApiOperation(value = "触发招生统计")
+    @XjrLog(value = "触发招生统计")
+    public RT<Boolean> exportData() {
+        EnrollmentStatisticsInfoTask statisticsInfoTask = new EnrollmentStatisticsInfoTask();
+        statisticsInfoTask.doExecute(pbCseFeeobjupdateService, enrollmentStatisticsInfoService);
+        return RT.ok(true);
+    }
 }

+ 23 - 0
src/main/java/com/xjrsoft/module/student/service/IEnrollmentStatisticsInfoService.java

@@ -0,0 +1,23 @@
+package com.xjrsoft.module.student.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.entity.EnrollmentPlan;
+import com.xjrsoft.module.student.entity.EnrollmentStatisticsInfo;
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @title: 招生计划维护
+ * @Author phoenix
+ * @Date: 2024-06-13
+ * @Version 1.0
+ */
+
+public interface IEnrollmentStatisticsInfoService extends MPJBaseService<EnrollmentStatisticsInfo> {
+
+    Boolean deleteDataByDate(String dataDay);
+
+    Boolean deleteGraduationDataByDate(String dataDay);
+
+    Boolean deleteCalendarDataByDate(String dataStartDay, String dataEndDay);
+}

+ 33 - 0
src/main/java/com/xjrsoft/module/student/service/impl/EnrollmentStatisticsInfoServiceImpl.java

@@ -0,0 +1,33 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.entity.EnrollmentStatisticsInfo;
+import com.xjrsoft.module.student.mapper.EnrollmentStatisticsInfoMapper;
+import com.xjrsoft.module.student.service.IEnrollmentStatisticsInfoService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+ * @title: 招生计划维护
+ * @Author phoenix
+ * @Date: 2024-06-13
+ * @Version 1.0
+ */
+@Service
+@AllArgsConstructor
+public class EnrollmentStatisticsInfoServiceImpl extends MPJBaseServiceImpl<EnrollmentStatisticsInfoMapper, EnrollmentStatisticsInfo> implements IEnrollmentStatisticsInfoService {
+    @Override
+    public Boolean deleteDataByDate(String dataDay) {
+        return this.baseMapper.deleteDataByDate(dataDay);
+    }
+
+    @Override
+    public Boolean deleteGraduationDataByDate(String dataDay) {
+        return this.baseMapper.deleteGraduationDataByDate(dataDay);
+    }
+
+    @Override
+    public Boolean deleteCalendarDataByDate(String dataStartDay, String dataEndDay) {
+        return this.baseMapper.deleteCalendarDataByDate(dataStartDay, dataEndDay);
+    }
+}

+ 1 - 0
src/main/resources/application-dev.yml

@@ -116,6 +116,7 @@ xjrsoft:
       - /system/findUserByCode
       - /system/imgcaptcha-answer
       - /student/basestudentinfo/studentinfoByKeyWord
+      - /student/pbCseFeeobjupdate/enrollment-statistics-start
     approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>

+ 1 - 0
src/main/resources/application-pre.yml

@@ -98,6 +98,7 @@ xjrsoft:
       - /event/visit
       - /system/findUserByCode
       - /student/basestudentinfo/studentinfoByKeyWord
+      - /student/pbCseFeeobjupdate/enrollment-statistics-start
     approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>

+ 1 - 0
src/main/resources/application-prod.yml

@@ -95,6 +95,7 @@ xjrsoft:
       - /system/findUserByCode
       - /student/basestudentinfo/studentinfoByKeyWord
       - /system/xjrTipsMessage/infoByCode
+      - /student/pbCseFeeobjupdate/enrollment-statistics-start
     approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>

+ 6 - 4
src/main/resources/mapper/oa/NewsRelationMapper.xml

@@ -19,16 +19,18 @@
 
     <insert id="insertAllStudentStaff" parameterType="java.lang.Long">
         insert into xjr_oa_news_relation (id, news_id, user_id, create_date, read_mark)
-            (select
+            (SELECT
                  UUID(),
                  #{newsId},
                  t.id,
                  NOW(),
                  0
-             from xjr_user t
-                      left join xjr_user_role_relation t3 on t3.user_id = t.id
+             FROM xjr_user t
+                      LEFT JOIN xjr_user_role_relation t3 ON t3.user_id = t.id
                       LEFT JOIN xjr_role t4 ON t4.id = t3.role_id
-             where t.delete_mark = 0 and t4.id = 3)
+                      LEFT JOIN base_student_school_roll t5 ON t.id = t5.user_id
+             WHERE t.delete_mark = 0 AND t4.id = 3
+               AND t5.archives_status = 'FB2901')
     </insert>
     <insert id="insertAllStudentStaff" parameterType="java.lang.Long">
         insert into xjr_oa_news_relation (id, news_id, user_id, create_date, read_mark)

+ 6 - 1
src/main/resources/mapper/oa/OfficialDocumentReceivedHandleMapper.xml

@@ -10,7 +10,12 @@
         SELECT GROUP_CONCAT(c2.name) FROM official_document_received_handle c1
         INNER JOIN xjr_user c2 ON c1.receive_user_id = c2.id
         WHERE c1.delete_mark = 0 AND c1.official_document_received_id = t1.id and c1.is_transfer = 1
-        ),',', '>') AS receive_user_names,t1.is_handle,t4.name as handle_user_name,t1.handle_time,t5.is_transfer FROM official_document_received t1
+        ),',', '>') AS receive_user_names,t1.is_handle,t4.name as handle_user_name,t1.handle_time,
+        IFNULL((
+        SELECT is_transfer FROM official_document_received_handle WHERE official_document_received_id = t1.id
+        AND create_user_id = 14954825256773
+        ), 0) AS is_transfer
+        FROM official_document_received t1
         INNER JOIN xjr_workflow_form_relation t2 ON t1.id = CAST(t2.form_key_value AS SIGNED)
         LEFT JOIN xjr_user t3 ON t1.handle_duty_user_id = t3.id
         LEFT JOIN xjr_user t4 ON t1.handle_user_id = t4.id