Sfoglia il codice sorgente

1、评价管理调整
2、我的申请报错解决

dzx 1 anno fa
parent
commit
9567d0bd10

+ 12 - 0
src/main/java/com/xjrsoft/module/evaluate/controller/EvaluateManageController.java

@@ -18,8 +18,10 @@ import com.xjrsoft.module.evaluate.dto.EvaluateManagePageDto;
 import com.xjrsoft.module.evaluate.dto.UpdateEvaluateManageDto;
 import com.xjrsoft.module.evaluate.entity.EvaluateManage;
 import com.xjrsoft.module.evaluate.entity.EvaluateTemplate;
+import com.xjrsoft.module.evaluate.service.IEvaluateItemService;
 import com.xjrsoft.module.evaluate.service.IEvaluateManageService;
 import com.xjrsoft.module.evaluate.service.IEvaluateTemplateService;
+import com.xjrsoft.module.evaluate.vo.EvaluateManageBodyVo;
 import com.xjrsoft.module.evaluate.vo.EvaluateManagePageVo;
 import com.xjrsoft.module.evaluate.vo.EvaluateManageVo;
 import com.xjrsoft.module.system.entity.DictionaryDetail;
@@ -54,6 +56,7 @@ public class EvaluateManageController {
 
     private final IEvaluateManageService evaluateManageService;
     private final IEvaluateTemplateService templateService;
+    private final IEvaluateItemService evaluateItemService;
 
 
     @GetMapping(value = "/page")
@@ -168,4 +171,13 @@ public class EvaluateManageController {
         return RT.ok(evaluateManageService.delete(ids));
     }
 
+    @GetMapping(value = "/evaluate-item")
+    @ApiOperation(value="评价模板维护评价项页面")
+    @SaCheckPermission("evaluateitem:detail")
+    public RT<EvaluateManageBodyVo> list(@Valid EvaluateManageChangeStatusDto dto){
+        EvaluateManageBodyVo evaluateManageItem = evaluateItemService.getEvaluateManageItem(dto);
+
+        return RT.ok(evaluateManageItem);
+    }
+
 }

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

@@ -4,8 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.time.LocalDate;
-import java.util.List;
 
 
 /**

+ 0 - 2
src/main/java/com/xjrsoft/module/evaluate/dto/MobileResultPageDto.java

@@ -5,8 +5,6 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springframework.format.annotation.DateTimeFormat;
 
-import java.time.LocalDate;
-
 
 /**
 * @title: 评价结果分页查询入参

+ 0 - 1
src/main/java/com/xjrsoft/module/evaluate/dto/TeaEvaluateClassDto.java

@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.List;
 
 
 /**

+ 5 - 0
src/main/java/com/xjrsoft/module/evaluate/service/IEvaluateItemService.java

@@ -2,8 +2,10 @@ package com.xjrsoft.module.evaluate.service;
 
 import com.github.yulichang.base.MPJBaseService;
 import com.xjrsoft.module.evaluate.dto.AddEvaluateItemDto;
+import com.xjrsoft.module.evaluate.dto.EvaluateManageChangeStatusDto;
 import com.xjrsoft.module.evaluate.dto.MakeEvaluateItemDto;
 import com.xjrsoft.module.evaluate.entity.EvaluateItem;
+import com.xjrsoft.module.evaluate.vo.EvaluateManageBodyVo;
 import com.xjrsoft.module.evaluate.vo.MakeEvaluateItemVo;
 
 import java.util.List;
@@ -32,4 +34,7 @@ public interface IEvaluateItemService extends MPJBaseService<EvaluateItem> {
     Boolean addEvaluateItem(List<AddEvaluateItemDto> dto);
 
 
+    EvaluateManageBodyVo getEvaluateManageItem(EvaluateManageChangeStatusDto dto);
+
+
 }

+ 70 - 0
src/main/java/com/xjrsoft/module/evaluate/service/impl/EvaluateItemServiceImpl.java

@@ -9,15 +9,23 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.base.entity.BaseSemester;
+import com.xjrsoft.module.base.mapper.BaseSemesterMapper;
 import com.xjrsoft.module.evaluate.dto.AddEvaluateItemDto;
+import com.xjrsoft.module.evaluate.dto.EvaluateManageChangeStatusDto;
 import com.xjrsoft.module.evaluate.dto.MakeEvaluateItemDto;
 import com.xjrsoft.module.evaluate.entity.EvaluateItem;
+import com.xjrsoft.module.evaluate.entity.EvaluateManage;
 import com.xjrsoft.module.evaluate.entity.EvaluateTemplate;
 import com.xjrsoft.module.evaluate.mapper.EvaluateItemMapper;
+import com.xjrsoft.module.evaluate.mapper.EvaluateManageMapper;
 import com.xjrsoft.module.evaluate.mapper.EvaluateTemplateMapper;
 import com.xjrsoft.module.evaluate.service.IEvaluateItemService;
+import com.xjrsoft.module.evaluate.service.IEvaluateManageService;
 import com.xjrsoft.module.evaluate.vo.EvaluateItemGroupByTopicVo;
 import com.xjrsoft.module.evaluate.vo.EvaluateItemVo;
+import com.xjrsoft.module.evaluate.vo.EvaluateManageBodyVo;
+import com.xjrsoft.module.evaluate.vo.EvaluateManageItemVo;
 import com.xjrsoft.module.evaluate.vo.MakeEvaluateItemVo;
 import com.xjrsoft.module.organization.entity.Department;
 import com.xjrsoft.module.organization.mapper.DepartmentMapper;
@@ -48,6 +56,13 @@ public class EvaluateItemServiceImpl extends MPJBaseServiceImpl<EvaluateItemMapp
     private EvaluateTemplateMapper evaluateTemplateMapper;
 
     private DepartmentMapper departmentMapper;
+
+    private EvaluateManageMapper manageMapper;
+    
+    private BaseSemesterMapper semesterMapper;
+    
+    private IEvaluateManageService manageService;
+
     @Override
     public MakeEvaluateItemVo getMakeEvaluateItem(MakeEvaluateItemDto dto){
         //获取模板基本信息
@@ -153,4 +168,59 @@ public class EvaluateItemServiceImpl extends MPJBaseServiceImpl<EvaluateItemMapp
         }
         return this.saveBatch(evaluateItemList);
     }
+
+    
+    @Override
+    public EvaluateManageBodyVo getEvaluateManageItem(EvaluateManageChangeStatusDto dto) {
+        EvaluateManageBodyVo result = new EvaluateManageBodyVo();
+        EvaluateManage manage = manageMapper.selectById(dto.getId());
+        EvaluateTemplate template = evaluateTemplateMapper.selectById(manage.getEvaluateTemplateId());
+        BaseSemester baseSemester = semesterMapper.selectById(manage.getBaseSemesterId());
+
+        result.setName(manage.getName());
+        result.setYear(manage.getYear());
+        result.setMonth(manage.getMonth());
+        result.setSemesterName(baseSemester.getName());
+        result.setStartTime(manage.getStartTime());
+        result.setEndTime(manage.getEndTime());
+        result.setTemplateName(template.getName());
+        result.setTotal(template.getTotal());
+        result.setRemark(template.getRemark());
+        List<String> deptIdList = new ArrayList<>();
+        if(deptIdList != null && deptIdList.size() > 0 && !deptIdList.get(0).equals("0")){
+            String deptIdStr = String.join(",", deptIdList);
+            LambdaQueryWrapper<Department> departmentLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            departmentLambdaQueryWrapper
+                    .in(Department::getId, deptIdList);
+            List<Department> departmentList = departmentMapper.selectList(departmentLambdaQueryWrapper);
+            StringBuilder deptStr = new StringBuilder();
+
+            for (int i = 0; i < departmentList.size(); i++) {
+                deptStr.append(departmentList.get(i).getName());
+                if(i < departmentList.size() - 1){
+                    deptStr.append(",");
+                }
+            }
+            result.setDeptIds("[" + deptIdStr +"]");
+            result.setDeptIdsCN(deptStr.toString());
+        }
+        
+        //查询题目
+        List<EvaluateManageItemVo> itemList = manageService.getItemList(dto.getId());
+        List<EvaluateItemVo> evaluateItemVos = BeanUtil.copyToList(itemList, EvaluateItemVo.class);
+        Map<String, List<EvaluateItemVo>> groupedEvaluateItemVo = evaluateItemVos.stream()
+                .collect(Collectors.groupingBy(EvaluateItemVo::getTopic, LinkedHashMap::new, Collectors.toList()));
+
+        List<EvaluateItemGroupByTopicVo> evaluateItemGroupByTopicVoList = new ArrayList<>();
+        groupedEvaluateItemVo.forEach((topic, group) -> {
+            evaluateItemGroupByTopicVoList.add(new EvaluateItemGroupByTopicVo(){{
+                setTopic(topic);
+                setEvaluateItemVoList(group);
+            }});
+        });
+
+        result.setEvaluateItemGroupByTopicVoList(evaluateItemGroupByTopicVoList);
+
+        return result;
+    }
 }

+ 0 - 1
src/main/java/com/xjrsoft/module/evaluate/service/impl/EvaluateManageServiceImpl.java

@@ -13,7 +13,6 @@ import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.enums.EvaluateTypeEnum;
 import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.common.utils.VoToColumnUtil;
-import com.xjrsoft.module.courseTable.entity.CourseTable;
 import com.xjrsoft.module.evaluate.dto.DrillEvaluateClassListDto;
 import com.xjrsoft.module.evaluate.dto.EvaluateManagePageDto;
 import com.xjrsoft.module.evaluate.dto.EvaluateManageScoreDto;

+ 77 - 0
src/main/java/com/xjrsoft/module/evaluate/vo/EvaluateManageBodyVo.java

@@ -0,0 +1,77 @@
+package com.xjrsoft.module.evaluate.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 评价项表单出参
+* @Author szs
+* @Date: 2024-01-15
+* @Version 1.0
+*/
+@Data
+public class EvaluateManageBodyVo {
+
+    /**
+     * 评价模板主键编号
+     */
+    @ApiModelProperty("评价计划主键编号")
+    private Long id;
+    /**
+     * 模板名称
+     */
+    @ApiModelProperty("计划名称")
+    private String name;
+    /**
+     * 评价类型
+     */
+    @ApiModelProperty("模板名称")
+    private String templateName;
+    /**
+     * 使用部门ids
+     */
+    @ApiModelProperty("使用部门ids")
+    private String deptIds;
+    /**
+     * 使用部门ids
+     */
+    @ApiModelProperty("使用部门ids")
+    private String deptIdsCN;
+    /**
+     * 评价总分
+     */
+    @ApiModelProperty("评价总分")
+    private Integer total;
+    /**
+     * 说明
+     */
+    @ApiModelProperty("说明")
+    private String remark;
+
+    @ApiModelProperty("学期名称")
+    private String semesterName;
+
+    @ApiModelProperty("开始时间")
+    private Date startTime;
+    /**
+     * 结束时间
+     */
+    @ApiModelProperty("结束时间")
+    private Date endTime;
+
+    @ApiModelProperty("年份")
+    private Integer year;
+
+    @ApiModelProperty("月份")
+    private Integer month;
+
+    /**
+     * 评价项表单根据标题名称分组出参集合
+     */
+    @ApiModelProperty("评价项表单根据标题名称分组出参集合")
+    private List<EvaluateItemGroupByTopicVo> evaluateItemGroupByTopicVoList;
+
+}

+ 6 - 0
src/main/java/com/xjrsoft/module/evaluate/vo/EvaluateManageVo.java

@@ -92,4 +92,10 @@ public class EvaluateManageVo {
     @ApiModelProperty("evaluateExecuter子表")
     private List<EvaluateExecuterVo> evaluateExecuterList;
 
+    @ApiModelProperty("年份")
+    private Integer year;
+
+    @ApiModelProperty("月份")
+    private Integer month;
+
 }

+ 1 - 1
src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

@@ -3602,7 +3602,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                     new QueryWrapper<WorkflowFormRelation>().lambda()
                             .in(WorkflowFormRelation::getProcessId, processIds)
             );
-            Map<String, String> stateMap = relations.stream().collect(Collectors.toMap(WorkflowFormRelation::getProcessId, WorkflowFormRelation::getCurrentState));
+            Map<String, String> stateMap = relations.stream().filter(x -> x.getCurrentState() != null).collect(Collectors.toMap(WorkflowFormRelation::getProcessId, WorkflowFormRelation::getCurrentState));
 
 
             for (HistoricProcessInstance historicProcessInstance : historicProcessInstances) {