Kaynağa Gözat

评价模板管理增加使用状态字段

dzx 1 ay önce
ebeveyn
işleme
a51755bb98

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

@@ -13,6 +13,7 @@ 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;
+import com.xjrsoft.module.evaluate.dto.MakeEvaluateItemDto;
 import com.xjrsoft.module.evaluate.dto.UpdateEvaluateManageDto;
 import com.xjrsoft.module.evaluate.entity.EvaluateManage;
 import com.xjrsoft.module.evaluate.entity.EvaluateTemplate;
@@ -20,6 +21,7 @@ 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.evaluate.vo.MakeEvaluateItemVo;
 import com.xjrsoft.module.system.entity.DictionaryDetail;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;

+ 5 - 0
src/main/java/com/xjrsoft/module/evaluate/vo/EvaluateTemplatePageVo.java

@@ -76,4 +76,9 @@ public class EvaluateTemplatePageVo {
     @ApiModelProperty("状态(0:禁用 1:启用)")
     private Integer status;
 
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("使用状态(0:未使用 1:使用中)")
+    @ApiModelProperty("使用状态(0:未使用 1:使用中)")
+    private Integer useStatus;
+
 }

+ 1 - 0
src/main/resources/mapper/evaluate/EvaluateTemplateMapper.xml

@@ -7,6 +7,7 @@
         SELECT t.id, t.name, t.sort_code,
         t2.name AS evaluate_type,
         t.dept_ids, t.total, t.remark, t.status
+        ,((SELECT COUNT(*) FROM evaluate_manage WHERE evaluate_template_id = t.id AND delete_mark = 0) > 0) AS use_status
         FROM evaluate_template t
         left join xjr_dictionary_detail t2 on t.evaluate_type = t2.code and t2.item_id = 1746831039385366530
         WHERE t.delete_mark = 0