Browse Source

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

大数据与最优化研究所 11 months ago
parent
commit
03b52da560

+ 1 - 1
src/main/java/com/xjrsoft/module/assessment/service/impl/AssessmentTemplatePlanServiceImpl.java

@@ -820,7 +820,7 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
             weChatSendMessageDto.setUserId(user.getOpenId());
 
             weChatSendMessageDto.setTemplateId(templateId);
-            weChatSendMessageDto.setUrl(StrUtil.format("{}/pages/student/canteen/evaluate?id={}", commonPropertiesConfig.getDomainApp(), templatePlan.getId()));
+            weChatSendMessageDto.setUrl(StrUtil.format("{}/pages/student/canteen/index", commonPropertiesConfig.getDomainApp()));
             weChatSendMessageDto.setMsgId(IdUtil.getSnowflakeNextIdStr());
 
             JSONObject paramJson = new JSONObject();

+ 5 - 5
src/main/java/com/xjrsoft/module/databoard/controller/DataboardController.java

@@ -429,9 +429,9 @@ public class DataboardController {
         }
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         RepairStatisticsVo result = new RepairStatisticsVo();
-        String sql = "SELECT t1.* FROM wf_repair_declaration t1" +
+        String sql = "SELECT t1.is_artificial,t2.current_state FROM wf_repair_declaration t1" +
                 " INNER JOIN xjr_workflow_form_relation t2 ON t1.id = t2.form_key_value" +
-                " WHERE t2.current_state = 'COMPLETED'";
+                " WHERE 1 = 1 ";
         if(startTime != null && endTime != null){
             sql += " and t1.application_time between '" + startTime.format(formatter) + "' and '" + endTime.format(formatter) + "'";
         }
@@ -442,13 +442,13 @@ public class DataboardController {
         int personCount = 0;
 
         for (Map<String, Object> objectMap : list) {
-            Object statusObj = objectMap.get("maintenance_feedback");
-            if(statusObj != null && !statusObj.toString().isEmpty()){
+            Object statusObj = objectMap.get("current_state");
+            if(HistoricProcessInstance.STATE_COMPLETED.equals(statusObj.toString())){
                 completeCount ++;
             }else{
                 uncompleteCount ++;
             }
-            if(objectMap.get("status") != null && "是".equals(objectMap.get("status").toString())){
+            if(objectMap.get("is_artificial") != null && "是".equals(objectMap.get("is_artificial").toString())){
                 personCount ++;
             }
 

+ 0 - 11
src/main/java/com/xjrsoft/module/schedule/util/DataUtil.java

@@ -678,18 +678,7 @@ public class DataUtil {
             if(!teacher_serial_nos.isEmpty()){
                 teacher_serial_no = teacher_serial_nos.toString().replace("[", "").replace("]", "");
             }
-            String onlyKey = scheduleDate + classId + timeNumber;
             String keyInfo = teacherId + "_" + classId + "_" + scheduleDate + "_" + courseClassId + "_" + siteId + "_" + timeNumber;
-            if(oldDataMap.get(onlyKey) != null){
-                String updSql = "update course_table set teacher_serial_no = '" + teacher_serial_no + "'" +
-                        ", teacher_id = '" + teacherId
-                        + "', teacher_name = '" + teacherName + "', modify_date = now()" +
-                        " ,course_id = " + courseClassId + ", course_name = '" + courseClassName
-                        + "',key_info = '" + keyInfo + "'" +
-                        " where schedule_date = '" + scheduleDate + "' and class_id = " + classId + " and time_number = " + timeNumber + ";";
-                updateSqlList.add(updSql);
-                continue;
-            }
 
             Entity entity = Entity.create(tableName);
             entity.set("id", IdUtil.getSnowflakeNextId());

+ 18 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseStudentAssessmentInspectionController.java

@@ -6,6 +6,7 @@ import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.excel.support.ExcelTypeEnum;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xjrsoft.common.enums.EnabledMark;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
@@ -13,9 +14,12 @@ import com.xjrsoft.module.student.dto.AddBaseStudentAssessmentInspectionDto;
 import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto;
 import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
 import com.xjrsoft.module.student.dto.CalssQuantitativeAssessmentPageDto;
+import com.xjrsoft.module.student.dto.CancelStudentDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentAssessmentInspectionDto;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation;
 import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
+import com.xjrsoft.module.student.service.IBaseStudentAssessmentStudentRelationService;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobileVo;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
@@ -39,6 +43,8 @@ import java.io.IOException;
 import java.util.Date;
 import java.util.List;
 
+import static com.alibaba.fastjson.JSONPatch.OperationType.remove;
+
 /**
  * @title: 学生班级巡查考核
  * @Author dzx
@@ -53,6 +59,8 @@ public class BaseStudentAssessmentInspectionController {
 
     private final IBaseStudentAssessmentInspectionService inspectionService;
 
+    private final IBaseStudentAssessmentStudentRelationService studentRelationService;
+
     @GetMapping(value = "/page")
     @ApiOperation(value = "学生班级巡查考核列表(分页)")
     @SaCheckPermission("basestudentassessmentinspection:detail")
@@ -140,4 +148,14 @@ public class BaseStudentAssessmentInspectionController {
         String fileName = "recordExport" + ExcelTypeEnum.XLSX.getValue();
         return RT.fileStream(bytes, fileName);
     }
+
+
+    @PostMapping("/cancel-student")
+    @ApiOperation(value = "作废学生")
+    public RT<Boolean>  cancelStudent(@RequestBody CancelStudentDto dto){
+        BaseStudentAssessmentStudentRelation relation = studentRelationService.getById(dto.getId());
+        relation.setEnabledMark(EnabledMark.DISABLED.getCode());
+        boolean update = studentRelationService.updateById(relation);
+        return RT.ok(update);
+    }
 }

+ 2 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentAssessmentInspectionMobilePageDto.java

@@ -29,4 +29,6 @@ public class BaseStudentAssessmentInspectionMobilePageDto extends PageInput {
 
     @ApiModelProperty("考核日期-结束")
     private String endDate;
+
+
 }

+ 4 - 1
src/main/java/com/xjrsoft/module/student/dto/CalssQuantitativeAssessmentPageDto.java

@@ -61,7 +61,7 @@ public class CalssQuantitativeAssessmentPageDto extends PageInput {
     /**
      * 学期ID(base_semester)每一种统计数据需要关联学期
      */
-    @ApiModelProperty(value = "学期ID(base_semester)")
+    @ApiModelProperty(value = "考核类别id")
     private Long baseStudentAssessmentCategoryId;
 
     @ApiModelProperty("年份")
@@ -69,4 +69,7 @@ public class CalssQuantitativeAssessmentPageDto extends PageInput {
 
     @ApiModelProperty("月份")
     private Integer month;
+
+    @ApiModelProperty(value = "考核类别code")
+    private String categoryCode;
 }

+ 21 - 0
src/main/java/com/xjrsoft/module/student/dto/CancelStudentDto.java

@@ -0,0 +1,21 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+* @title: 班级考核删除学生
+* @Author dzx
+* @Date: 2024年12月26日
+* @Version 1.0
+*/
+@Data
+public class CancelStudentDto implements Serializable {
+
+    @ApiModelProperty("主键")
+    private Long id;
+
+}

+ 4 - 1
src/main/java/com/xjrsoft/module/student/dto/QuantitativeAssessmentSingleScoreDto.java

@@ -17,7 +17,7 @@ public class QuantitativeAssessmentSingleScoreDto implements Serializable {
     /**
      * 学期ID(base_semester)每一种统计数据需要关联学期
      */
-    @ApiModelProperty("学期ID(base_semester)")
+    @ApiModelProperty("考核类别id")
     private Long baseStudentAssessmentCategoryId;
     /**
      * 学期ID(base_semester)每一种统计数据需要关联学期
@@ -34,4 +34,7 @@ public class QuantitativeAssessmentSingleScoreDto implements Serializable {
      */
     @ApiModelProperty("结束时间")
     private LocalDateTime endTime;
+
+    @ApiModelProperty(value = "考核类别code")
+    private String categoryCode;
 }

+ 14 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseStudentAssessmentStudentRelation.java

@@ -1,6 +1,9 @@
 package com.xjrsoft.module.student.entity;
 
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -82,4 +85,15 @@ public class BaseStudentAssessmentStudentRelation implements Serializable {
 
     @ApiModelProperty("被扣分数")
     private Double score;
+
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+     * 有效标志
+     */
+    @ApiModelProperty("有效标志")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
 }

+ 119 - 49
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

@@ -146,11 +146,6 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
     @Override
     public BaseStudentAssessmentInspectionVo getInfo(Long id) {
         BaseStudentAssessmentInspectionVo result = assessmentInspectionMapper.getInfo(id);
-        // 处理加减分
-        if (result.getScoreType() != null && result.getScoreType().equals(ScoreTypeEnum.ScoreMinus.getCode())) {
-            result.setScore(result.getScore() * -1);
-        }
-
         // 获取班级信息
         List<BaseStudentAssessmentClassListVo> baseStudentAssessmentClassListVos = assessmentClassRelationMapper.selectJoinList(BaseStudentAssessmentClassListVo.class,
                 MPJWrappers.<BaseStudentAssessmentClassRelation>lambdaJoin()
@@ -176,7 +171,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
 
     @Override
     public Page<BaseStudentAssessmentInspectionMobilePageVo> getMobilePage(Page<BaseStudentAssessmentInspectionMobilePageDto> page, BaseStudentAssessmentInspectionMobilePageDto dto) {
-        if (dto.getClassIds() == null || dto.getClassIds().size() == 0) {
+        if (dto.getClassIds() == null || dto.getClassIds().isEmpty()) {
             // 获取当前用户所管班级
             List<Long> classIds = baseClassMapper.selectList(
                     Wrappers.<BaseClass>query().lambda()
@@ -185,17 +180,10 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
             ).stream().map(BaseClass::getId).collect(Collectors.toList());
             dto.setClassIds(classIds);
         }
-        if (dto.getClassIds() == null || dto.getClassIds().size() == 0) {
+        if (dto.getClassIds() == null || dto.getClassIds().isEmpty()) {
             return null;
         }
-        Page<BaseStudentAssessmentInspectionMobilePageVo> result = assessmentInspectionMapper.getMobilePage(page, dto);
-        // 处理加减分
-        result.getRecords().forEach((node) -> {
-            if (node.getScoreType().equals(ScoreTypeEnum.ScoreMinus.getCode())) {
-                node.setScore(node.getScore() * -1);
-            }
-        });
-        return result;
+        return assessmentInspectionMapper.getMobilePage(page, dto);
     }
 
     @Override
@@ -206,12 +194,17 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
             result.setScore(result.getScore() * -1);
         }
 
+        MPJLambdaWrapper<BaseStudentAssessmentStudentRelation> baseStudentAssessmentStudentRelationWrapper = new MPJLambdaWrapper<>();
+        baseStudentAssessmentStudentRelationWrapper
+                .select(BaseStudentAssessmentStudentRelation::getId)
+                .selectAs(XjrUser::getName,BaseStudentAssessmentStudentRelation::getName)
+                .selectAs(XjrUser::getCredentialNumber,BaseStudentAssessmentStudentRelation::getStudentId)
+                .eq(BaseStudentAssessmentStudentRelation::getBaseStudentAssessmentInspectionId, result.getBaseStudentAssessmentInspectionId())
+                .eq(BaseStudentAssessmentStudentRelation::getClassId, result.getClassId())
+                .leftJoin(XjrUser.class, XjrUser::getId, BaseStudentAssessmentStudentRelation::getUserId)
+        ;
         // 获取学生信息
-        List<BaseStudentAssessmentStudentRelation> baseStudentAssessmentStudentRelations = assessmentStudentRelationMapper.selectList(
-                Wrappers.<BaseStudentAssessmentStudentRelation>query().lambda()
-                        .eq(BaseStudentAssessmentStudentRelation::getBaseStudentAssessmentInspectionId, result.getBaseStudentAssessmentInspectionId())
-                        .eq(BaseStudentAssessmentStudentRelation::getClassId, result.getClassId())
-        );
+        List<BaseStudentAssessmentStudentRelation> baseStudentAssessmentStudentRelations = assessmentStudentRelationMapper.selectList(baseStudentAssessmentStudentRelationWrapper);
         result.setStudentList(baseStudentAssessmentStudentRelations);
         result.setStudentCount(baseStudentAssessmentStudentRelations.size());
 
@@ -505,21 +498,25 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
 
         if(!classIdList.isEmpty()){
             //学生个人行为
-            dto.setBaseStudentAssessmentCategoryId(1782327704603373570L);
+            dto.setCategoryCode("student_behavior");
             Map<Long , QuantitativeAssessmentSingleScoreVo> individualBehaviorMap = getQuantitativeAssessmentSingleScoreMap(dto);
 
             //常规管理
-            dto.setBaseStudentAssessmentCategoryId(1782329720935329794L);
+            dto.setCategoryCode("convention_manage");
             Map<Long , QuantitativeAssessmentSingleScoreVo> conventionalManagementMap = getQuantitativeAssessmentSingleScoreMap(dto);
 
             //获奖及荣誉奖彰
-            dto.setBaseStudentAssessmentCategoryId(1787316203484131329L);
+            dto.setCategoryCode("awards_and_honors");
             Map<Long , QuantitativeAssessmentSingleScoreVo> awardsAndHonorableMap = getQuantitativeAssessmentSingleScoreMap(dto);
 
             //准军事化考核
-            dto.setBaseStudentAssessmentCategoryId(1868835208799236098L);
+            dto.setCategoryCode("militarize_manage");
             Map<Long , QuantitativeAssessmentSingleScoreVo> paramilitaryMap = getQuantitativeAssessmentSingleScoreMap(dto);
 
+            //班级文化建设
+            dto.setCategoryCode("classe_culture");
+            Map<Long , QuantitativeAssessmentSingleScoreVo> classCultureMap = getQuantitativeAssessmentSingleScoreMap(dto);
+
             //查询任课教师查询班级的数据
             TeaEvaluateClassDto evaluateClassDto = new TeaEvaluateClassDto();
             evaluateClassDto.setEvaluateType(EvaluateTypeEnum.TEACHER_EVALUATE_CLASS.getCode());
@@ -535,58 +532,82 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
             List<TeaEvaluateClassListVo> teaEvaluateClassList = evaluateResultMapper.getTeaEvaluateClassList(evaluateClassDto);
             Map<Long, List<TeaEvaluateClassListVo>> classEvaluateMap = teaEvaluateClassList.stream().collect(Collectors.groupingBy(TeaEvaluateClassListVo::getEvaluatedObjectId));
             String jskhFormula = quotaFormulaRuleService.getFormulaByQuota("teacher_assessment");
+            String gfjyFormula = quotaFormulaRuleService.getFormulaByQuota("militarize_manage");
+            String xsgrFormula = quotaFormulaRuleService.getFormulaByQuota("student_behavior");
+            String cgglFormula = quotaFormulaRuleService.getFormulaByQuota("convention_manage");
+            String huojiangFormula = quotaFormulaRuleService.getFormulaByQuota("awards_and_honors");
+            String classCultureFormula = quotaFormulaRuleService.getFormulaByQuota("classe_culture");
 
             //将结果写进对应的班级里
             for(CalssQuantitativeAssessmentPageVo c: resultPage.getRecords()){
                 Long classId = Long.parseLong(c.getClassId());
+                //学生个人行为
                 if(individualBehaviorMap.get(classId) != null){
-                    c.setStuPersonalBehaviorSubScore(individualBehaviorMap.get(classId).getSumScore()==null?"":individualBehaviorMap.get(classId).getSumScore().toString());
-                    double v = (100 + individualBehaviorMap.get(classId).getSumScore()) / 100 * 25;
-                    c.setStuPersonalBehaviorScore(v + "");
+                    Double sumScore = individualBehaviorMap.get(classId).getSumScore();
+                    c.setStuPersonalBehaviorSubScore(sumScore==null?"":sumScore.toString());
+                    String replacedExpression = xsgrFormula.replace("xsgrKouFen", Double.toString(sumScore));
+                    ScriptEngineManager manager = new ScriptEngineManager();
+                    ScriptEngine engine = manager.getEngineByName("JavaScript");
+                    try {
+                        double result = ((Number) engine.eval(replacedExpression)).doubleValue();
+                        c.setStuPersonalBehaviorScore(BigDecimal.valueOf(result).setScale(2, RoundingMode.HALF_UP).doubleValue() + "");
+                    } catch (ScriptException e) {
+                        Log.error(e.getMessage(), e);
+                    }
                 }
-
+                //常规管理
                 if(conventionalManagementMap.get(classId) != null){
                     Double sumScore = conventionalManagementMap.get(classId).getSumScore();
                     if(sumScore != null){
                         String scoreStr = sumScore.toString();
-//                    boolean isInteger = sumScore == Math.floor(sumScore);
-//                    if(isInteger){
-//                        scoreStr = sumScore.intValue() + "";
-//                    }
                         c.setClassConventionalManageSubScore(scoreStr);
 
-                        double v = (100 + sumScore) / 100 * 25;
-                        c.setClassConventionalManageScore(v + "");
+                        String replacedExpression = cgglFormula.replace("cgglKouFen", Double.toString(sumScore));
+                        ScriptEngineManager manager = new ScriptEngineManager();
+                        ScriptEngine engine = manager.getEngineByName("JavaScript");
+                        try {
+                            double result = ((Number) engine.eval(replacedExpression)).doubleValue();
+                            c.setClassConventionalManageScore(BigDecimal.valueOf(result).setScale(2, RoundingMode.HALF_UP).doubleValue() + "");
+                        } catch (ScriptException e) {
+                            Log.error(e.getMessage(), e);
+                        }
                     }
                 }
-
+                //获奖和荣誉
                 if(awardsAndHonorableMap.get(classId) != null){
                     Double sumScore = awardsAndHonorableMap.get(classId).getSumScore();
                     if(sumScore != null){
                         c.setHonorSumScore(sumScore.toString());
-                        if(sumScore < 10){
-                            c.setHonorScore(sumScore.toString());
-                        }else {
-                            c.setHonorScore("10");
+
+                        String replacedExpression = huojiangFormula.replace("HuoJiang", Double.toString(sumScore));
+                        ScriptEngineManager manager = new ScriptEngineManager();
+                        ScriptEngine engine = manager.getEngineByName("JavaScript");
+                        try {
+                            double result = ((Number) engine.eval(replacedExpression)).doubleValue();
+                            c.setHonorScore(BigDecimal.valueOf(result).setScale(2, RoundingMode.HALF_UP).doubleValue() + "");
+                        } catch (ScriptException e) {
+                            Log.error(e.getMessage(), e);
                         }
                     }
                 }
-
+                //军事化
                 if(paramilitaryMap.get(classId) != null){
                     Double sumScore = awardsAndHonorableMap.get(classId).getSumScore();
                     if(sumScore != null){
-                        c.setMilitaryManageScore(sumScore.toString());
-                        if(sumScore < 10){
-                            c.setHonorScore(sumScore.toString());
-                        }else {
-                            c.setHonorScore("10");
+                        c.setMilitaryManageComprehensiveIndex(sumScore.toString());
+                        //此项得分
+                        String replacedExpression = gfjyFormula.replace("gfjyKouFen", Double.toString(sumScore));
+                        ScriptEngineManager manager = new ScriptEngineManager();
+                        ScriptEngine engine = manager.getEngineByName("JavaScript");
+                        try {
+                            double result = ((Number) engine.eval(replacedExpression)).doubleValue();
+                            c.setMilitaryManageComprehensiveIndex(BigDecimal.valueOf(result).setScale(2, RoundingMode.HALF_UP).doubleValue() + "");
+                        } catch (ScriptException e) {
+                            Log.error(e.getMessage(), e);
                         }
-
-                        double v = (100 + sumScore) / 100 * 25;
-                        c.setMilitaryManageComprehensiveIndex(v + "");
                     }
                 }
-
+                //任课教师考核
                 if(classEvaluateMap.containsKey(classId)){
                     Map<Long, List<TeaEvaluateClassListVo>> evaluateCategoryMap = classEvaluateMap.get(classId).stream().collect(Collectors.groupingBy(TeaEvaluateClassListVo::getId));
                     int size = evaluateCategoryMap.size();
@@ -611,6 +632,24 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                         Log.error(e.getMessage(), e);
                     }
                 }
+                //班级文化建设
+                if(classCultureMap.containsKey(classId)){
+                    Double sumScore = classCultureMap.get(classId).getSumScore();
+                    if(sumScore != null){
+                        c.setClassCultureScore(sumScore.toString());
+
+                        String replacedExpression = classCultureFormula.replace("bjwhKouFen", Double.toString(sumScore));
+
+                        ScriptEngineManager manager = new ScriptEngineManager();
+                        ScriptEngine engine = manager.getEngineByName("JavaScript");
+                        try {
+                            double result = ((Number) engine.eval(replacedExpression)).doubleValue();
+                            c.setClassCultureIndex(BigDecimal.valueOf(result).setScale(2, RoundingMode.HALF_UP).doubleValue() + "");
+                        } catch (ScriptException e) {
+                            Log.error(e.getMessage(), e);
+                        }
+                    }
+                }
             }
         }
 
@@ -621,6 +660,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
         List<QuantitativeAssessmentSingleScoreVo> individualBehaviorList = assessmentInspectionMapper.getAssessmentInspectionByClassIdList(new QuantitativeAssessmentSingleScoreDto(){{
             setClassIdList(dto.getClassIdList());
             setBaseStudentAssessmentCategoryId(dto.getBaseStudentAssessmentCategoryId());
+            setCategoryCode(dto.getCategoryCode());
             if(dto.getBaseSemesterId() != null){
                 setBaseSemesterId(dto.getBaseSemesterId());
             }
@@ -876,6 +916,18 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
             cell.setCellValue(pageVo.getTeacherAssessScore());
             cell.setCellStyle(cellStyle);
 
+
+            columnNumber ++;
+            cell = dataRow.createCell(columnNumber);
+            cell.setCellValue(pageVo.getClassCultureScore());
+            cell.setCellStyle(cellStyle);
+
+            columnNumber ++;
+            cell = dataRow.createCell(columnNumber);
+            cell.setCellValue(pageVo.getClassCultureIndex());
+            cell.setCellStyle(cellStyle);
+
+
             columnNumber ++;
             cell = dataRow.createCell(columnNumber);
             cell.setCellValue(pageVo.getAssessSumScore());
@@ -979,6 +1031,14 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
         sheet.addMergedRegion(new CellRangeAddress(0, 0, columnNumber, columnNumber + 1));
         columnNumber ++;
 
+        columnNumber ++;
+        cell = row.createCell(columnNumber);
+        cell.setCellValue("班级文化建设");
+        cell.setCellStyle(cellStyle);
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, columnNumber, columnNumber + 1));
+        columnNumber ++;
+
+
         columnNumber ++;
         cell = row.createCell(columnNumber);
         cell.setCellValue("月份总得分");
@@ -1054,5 +1114,15 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
         cell = row.createCell(columnNumber);
         cell.setCellValue("此项得分");
         cell.setCellStyle(cellStyle);
+
+
+        cell = row.createCell(columnNumber);
+        cell.setCellValue("扣分");
+        cell.setCellStyle(cellStyle);
+        columnNumber ++;
+
+        cell = row.createCell(columnNumber);
+        cell.setCellValue("此项得分");
+        cell.setCellStyle(cellStyle);
     }
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentInspectionMobilePageVo.java

@@ -43,4 +43,10 @@ public class BaseStudentAssessmentInspectionMobilePageVo {
 
     @ApiModelProperty("分数类型名称")
     private String scoreTypeCn;
+
+    @ApiModelProperty("类型")
+    private  String assessmentType;
+
+    @ApiModelProperty("考核项目")
+    private  String assessmentItemName;
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentInspectionMobileVo.java

@@ -110,4 +110,10 @@ public class BaseStudentAssessmentInspectionMobileVo {
      */
     @ApiModelProperty("附件列表")
     private List<File> fileInfos;
+
+    @ApiModelProperty("类型")
+    private  String assessmentType;
+
+    @ApiModelProperty("考核项目")
+    private  String assessmentItemName;
 }

+ 13 - 12
src/main/java/com/xjrsoft/module/student/vo/CalssQuantitativeAssessmentPageVo.java

@@ -81,8 +81,8 @@ public class CalssQuantitativeAssessmentPageVo {
     @ColumnWidth(10)
     private String honorScore;
 
-    @ApiModelProperty("准军事化管理效果综合指数")
-    @ExcelProperty(value = "准军事化管理效果综合指数")
+    @ApiModelProperty("准军事化管理效果综合扣分")
+    @ExcelProperty(value = "准军事化管理效果综合扣分")
     @ColumnWidth(10)
     private String militaryManageComprehensiveIndex;
 
@@ -101,6 +101,17 @@ public class CalssQuantitativeAssessmentPageVo {
     @ColumnWidth(10)
     private String teacherAssessScore;
 
+    @ApiModelProperty("班风学风考核")
+    @ExcelProperty(value = "班风学风考核")
+    @ColumnWidth(10)
+    private String classCultureScore;
+
+    @ApiModelProperty("班风学风考核指数")
+    @ExcelProperty(value = "班风学风考核指数")
+    @ColumnWidth(10)
+    private String classCultureIndex;
+
+
     @ApiModelProperty("考核总得分")
     @ExcelProperty(value = "考核总得分")
     @ColumnWidth(10)
@@ -111,14 +122,4 @@ public class CalssQuantitativeAssessmentPageVo {
     @ColumnWidth(10)
     private String assessMoney;
 
-
-    @ApiModelProperty("班风学风考核")
-    @ExcelProperty(value = "班风学风考核")
-    @ColumnWidth(10)
-    private String classStyleScore;
-
-    @ApiModelProperty("班风学风考核指数")
-    @ExcelProperty(value = "班风学风考核指数")
-    @ColumnWidth(10)
-    private String classStyleIndex;
 }

+ 33 - 23
src/main/resources/mapper/student/BaseStudentAssessmentInspectionMapper.xml

@@ -59,23 +59,28 @@
         left join xjr_user t5 on t.assessment_user_id=t5.id
         left join xjr_dictionary_detail t6 on t6.code=t.score_type
         left join xjr_user t7 on t.create_user_id=t7.id
-        where t.id=#{id} and t.delete_mark=0 and t1.delete_mark=0  and t2.delete_mark=0;
+        where t.id = #{id} and t.delete_mark = 0 and t1.delete_mark = 0 and t2.delete_mark = 0
     </select>
 
     <select id="getMobilePage" parameterType="com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo">
-        select t.id,t1.assessment_date,t2.name as assessment_category_name,t3.name as assessment_project_name,t5.name as
-        assessment_class_name,t1.reason,t1.score,t1.score_type,t4.name as score_type_cn,
+        SELECT t.id,t1.assessment_date,t2.name AS assessment_category_name,t3.name AS assessment_project_name,t5.name AS
+        assessment_class_name,t1.reason,t1.score,t1.score_type,t4.name AS score_type_cn,
         (
-            SELECT count(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id =
-            t1.id and class_id=t.class_id
-        ) as student_count
-        from base_student_assessment_class_relation t
-        left join base_student_assessment_inspection t1 on t1.id=t.base_student_assessment_inspection_id
-        left join base_student_assessment_category t2 on (t2.id = t1.base_student_assessment_category_id)
-        left join base_student_assessment_project t3 on (t3.id = t1.base_student_assessment_project_id)
-        left join xjr_dictionary_detail t4 on t4.code=t1.score_type
-        left join base_class t5 on t5.id=t.class_id
-        where t1.delete_mark = 0 and t.class_id in
+        SELECT COUNT(*) FROM base_student_assessment_student_relation WHERE
+        base_student_assessment_inspection_id = t1.id AND class_id = t.class_id AND delete_mark = 0 and enabled_mark = 1
+        ) AS student_count,t1.assessment_type,
+        (
+        SELECT COUNT(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id =
+        t1.id AND class_id = t.class_id AND delete_mark = 0 and enabled_mark = 1
+        ) AS student_count,t1.assessment_type,t6.name AS assessment_item_name
+        FROM base_student_assessment_class_relation t
+        LEFT JOIN base_student_assessment_inspection t1 ON t1.id=t.base_student_assessment_inspection_id
+        LEFT JOIN base_student_assessment_category t2 ON (t2.id = t1.base_student_assessment_category_id)
+        LEFT JOIN base_student_assessment_project t3 ON (t3.id = t1.base_student_assessment_project_id)
+        LEFT JOIN base_student_assessment_item t6 ON (t6.id = t1.base_student_assessment_item_id)
+        LEFT JOIN xjr_dictionary_detail t4 ON t4.code=t1.score_type
+        LEFT JOIN base_class t5 ON t5.id=t.class_id
+        WHERE t1.delete_mark = 0 and t.class_id in
         <foreach item="classId" index="index" collection="dto.classIds" open="(" close=")" separator=",">
             #{classId}
         </foreach>
@@ -95,16 +100,17 @@
 
     <select id="getMobileInfo" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobileVo">
         select t.id,t.class_id,t.base_student_assessment_inspection_id,t1.score,t5.name as assessment_class_name,t2.name as assessment_category_name,t3.name as assessment_project_name,t1.assessment_date,t1.reason,
-        t6.name as assessment_user_name,t7.name as create_user_name,t1.create_date,t1.file_id,t1.score_type,t4.name as score_type_cn
+        t6.name as assessment_user_name,t7.name as create_user_name,t1.create_date,t1.file_id,t1.score_type,t4.name as score_type_cn,t1.assessment_type,t8.name as assessment_item_name
         from base_student_assessment_class_relation t
         left join base_student_assessment_inspection t1 on t1.id=t.base_student_assessment_inspection_id
         left join base_student_assessment_category t2 on (t2.id = t1.base_student_assessment_category_id)
         left join base_student_assessment_project t3 on (t3.id = t1.base_student_assessment_project_id)
+        left join base_student_assessment_item t8 on (t8.id = t1.base_student_assessment_item_id)
         left join xjr_dictionary_detail t4 on t4.code=t1.score_type
         left join base_class t5 on t5.id=t.class_id
         left join xjr_user t6 on t1.assessment_user_id=t6.id
         left join xjr_user t7 on t1.create_user_id=t7.id
-        where t.id=#{id};
+        where t.id = #{id};
     </select>
 
     <select id="getStudentIndividualBehaviorExcelVoList" parameterType="com.xjrsoft.module.student.dto.QuantitativeAssessmentExcelDto" resultType="com.xjrsoft.module.student.vo.QuantitativeAssessmentSubTableExcelVo">
@@ -114,7 +120,7 @@
         sum(if(t1.score_type = 'score_add', t1.score, -1 * t1.score)) as finalScore
         from base_student_assessment_student_relation t
         left join base_student_assessment_inspection t1 on t1.id = t.base_student_assessment_inspection_id
-        where t1.delete_mark = 0
+        where t1.delete_mark = 0 and t.delete_mark = 0 and t.enabled_mark = 1
         <if test="dto.yearAndMonth != null and dto.yearAndMonth != ''">
             and date_format(t1.assessment_date, '%Y-%m') = #{dto.yearAndMonth}
         </if>
@@ -142,7 +148,7 @@
         left join xjr_user t4 on t4.id = t3.teacher_id
         left join base_student_assessment_base_score t5 on t5.base_semester_id = t1.base_semester_id
         left join total_score t6 on t6.studentUserId = t.user_id
-        where t1.delete_mark = 0
+        where t1.delete_mark = 0 and t.delete_mark = 0 and t.enabled_mark = 1
         <if test="dto.yearAndMonth != null and dto.yearAndMonth != ''">
             and date_format(t1.assessment_date, '%Y-%m') = #{dto.yearAndMonth}
         </if>
@@ -155,7 +161,7 @@
         from base_student_assessment_student_relation t
         left join base_student_assessment_inspection t1
         on t1.id = t.base_student_assessment_inspection_id
-        where t1.delete_mark = 0
+        where t1.delete_mark = 0 and t.delete_mark = 0 and t.enabled_mark = 1
         and t1.base_student_assessment_category_id = #{dto.baseStudentAssessmentCategoryId}
         <if test="dto.classIdList != null and !dto.classIdList.isEmpty()">
             and t1.class_ids in
@@ -197,7 +203,7 @@
         left join xjr_user t4 on t4.id = t3.teacher_id
         left join base_student_assessment_base_score t5 on t5.base_semester_id = t1.base_semester_id
         left join total_score t6 on t6.studentUserId = t.user_id
-        where t1.delete_mark = 0
+        where t1.delete_mark = 0 and t.delete_mark = 0 and t.enabled_mark = 1
         and t1.base_student_assessment_category_id = #{dto.baseStudentAssessmentCategoryId}
         <if test="dto.classIdList != null and !dto.classIdList.isEmpty()">
             and t1.class_ids in
@@ -225,6 +231,7 @@
         t.class_ids as class_id,
         SUM(t.score * (LENGTH(personal_student_user_ids) - LENGTH(REPLACE(personal_student_user_ids, ',', '')) + 1)) AS sumScore
         from base_student_assessment_inspection t
+        inner join base_student_assessment_category t1 on t1.id = t.base_student_assessment_category_id
         where t.delete_mark = 0
         <if test="dto.classIdList != null and !dto.classIdList.isEmpty()">
             and t.class_ids in
@@ -235,6 +242,9 @@
         <if test="dto.baseStudentAssessmentCategoryId != null and dto.baseStudentAssessmentCategoryId > 0">
             and t.base_student_assessment_category_id = #{dto.baseStudentAssessmentCategoryId}
         </if>
+        <if test="dto.categoryCode != null and dto.categoryCode != ''">
+            and t1.code = #{dto.categoryCode}
+        </if>
         <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">
             and t.base_semester_id &gt; #{dto.baseSemesterId}
         </if>
@@ -254,7 +264,7 @@
         from base_student_assessment_class_relation t
                  left join base_student_assessment_inspection t1 on t1.id = t.base_student_assessment_inspection_id
                  left join base_student_assessment_category t2 on t2.id = t1.base_student_assessment_category_id
-        where t1.base_student_assessment_category_id = 1754411705233838080
+        where t2.code = 'convention_manage'
           and t.class_id in
         <foreach item="classId" index="index" collection="dto.classIdList" open="(" close=")" separator=",">
             #{classId}
@@ -275,7 +285,7 @@
         from base_student_assessment_student_relation t
                 left join base_student_assessment_inspection t1 on t1.id = t.base_student_assessment_inspection_id
                 left join base_student_assessment_category t2 on t2.id = t1.base_student_assessment_category_id
-        where t1.base_student_assessment_category_id = 1754412347985760256
+        where t2.code = 'awards_and_honors' and t.enabled_mark = 1
         and t.class_id in
         <foreach item="classId" index="index" collection="dto.classIdList" open="(" close=")" separator=",">
             #{classId}
@@ -296,7 +306,7 @@
         from base_student_assessment_student_relation t
         left join base_student_assessment_inspection t1 on t1.id = t.base_student_assessment_inspection_id
         left join base_student_assessment_category t2 on t2.id = t1.base_student_assessment_category_id
-        where t1.base_student_assessment_category_id = 1754412347985760256
+        where t2.code = 'militarize_manage' and t.delete_mark = 0 and t.enabled_mark = 1
         and t.class_id in
         <foreach item="classId" index="index" collection="dto.classIdList" open="(" close=")" separator=",">
             #{classId}
@@ -312,7 +322,7 @@
     <select id="getStudentListByInspectionId"
             resultType="com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation">
         SELECT t1.id,t1.user_id,t1.class_id,t3.student_id,t2.name,t6.name AS nation,t4.name AS class_name,
-               t5.name AS major_name,t7.name as gender,t1.score
+               t5.name AS major_name,t7.name as gender,t1.score,t1.enabled_mark
         FROM base_student_assessment_student_relation t1
         INNER JOIN xjr_user t2 ON t1.user_id = t2.id
         INNER JOIN base_student t3 ON t2.id = t3.user_id