|
|
@@ -3,9 +3,11 @@ package com.xjrsoft.module.evaluate.controller;
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
+import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.evaluate.dto.AddEvaluateManageDto;
|
|
|
import com.xjrsoft.module.evaluate.dto.EvaluateManageChangeStatusDto;
|
|
|
import com.xjrsoft.module.evaluate.dto.EvaluateManagePageDto;
|
|
|
@@ -16,17 +18,11 @@ import com.xjrsoft.module.evaluate.service.IEvaluateManageService;
|
|
|
import com.xjrsoft.module.evaluate.service.IEvaluateTemplateService;
|
|
|
import com.xjrsoft.module.evaluate.vo.EvaluateManagePageVo;
|
|
|
import com.xjrsoft.module.evaluate.vo.EvaluateManageVo;
|
|
|
+import com.xjrsoft.module.system.entity.DictionaryDetail;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
@@ -60,14 +56,20 @@ public class EvaluateManageController {
|
|
|
@ApiOperation(value="根据id查询评价管理信息")
|
|
|
@SaCheckPermission("evaluatemanage:detail")
|
|
|
public RT<EvaluateManageVo> info(@RequestParam Long id){
|
|
|
- EvaluateManage evaluateManage = evaluateManageService.getByIdDeep(id);
|
|
|
- if (evaluateManage == null) {
|
|
|
+ MPJLambdaWrapper<EvaluateManage> evaluateManageMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
+ evaluateManageMPJLambdaWrapper
|
|
|
+ .selectAs(DictionaryDetail::getName, EvaluateManageVo::getCreateFrequencyCN)
|
|
|
+ .select(EvaluateManage.class, x -> VoToColumnUtil.fieldsToColumns(EvaluateManageVo.class).contains(x.getProperty()))
|
|
|
+ .eq(EvaluateManage::getId, id)
|
|
|
+ .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, EvaluateManage::getCreateFrequency)
|
|
|
+ .disableSubLogicDel();
|
|
|
+ EvaluateManageVo evaluateManageVo = evaluateManageService.selectJoinOne(EvaluateManageVo.class, evaluateManageMPJLambdaWrapper);
|
|
|
+ if (evaluateManageVo == null) {
|
|
|
return RT.error("找不到此数据!");
|
|
|
}
|
|
|
- EvaluateTemplate evaluateTemplate = evaluateTemplateService.getById(evaluateManage.getEvaluateTemplateId());
|
|
|
- EvaluateManageVo manageVo = BeanUtil.toBean(evaluateManage, EvaluateManageVo.class);
|
|
|
- manageVo.setEvaluateType(evaluateTemplate.getEvaluateType());
|
|
|
- return RT.ok(manageVo);
|
|
|
+ EvaluateTemplate evaluateTemplate = evaluateTemplateService.getById(evaluateManageVo.getEvaluateTemplateId());
|
|
|
+ evaluateManageVo.setEvaluateType(evaluateTemplate.getEvaluateType());
|
|
|
+ return RT.ok(evaluateManageVo);
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/change-status")
|