浏览代码

预案演练代码提交

jingyuanchao 2 年之前
父节点
当前提交
bb153af3a2

+ 4 - 1
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillPlanDataVo.java

@@ -1,6 +1,7 @@
 package com.xunmei.common.core.domain.drill.vo;
 
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.xunmei.common.core.domain.drill.domain.CoreDrillPlanToExecOrg;
 import com.xunmei.common.core.domain.drill.domain.CoreDrillPlanToRole;
 import io.swagger.annotations.ApiModelProperty;
@@ -39,7 +40,7 @@ public class CoreDrillPlanDataVo {
     @ApiModelProperty(value = "培训机构类型")
     private Integer execOrgType;
 
-
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "计划创建机构")
     private Long createOrgId;
 
@@ -49,6 +50,7 @@ public class CoreDrillPlanDataVo {
     @ApiModelProperty(value = "计划创建机构path")
     private String createOrgPath;
 
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "计划所属机构")
     private Long belongOrgId;
 
@@ -64,6 +66,7 @@ public class CoreDrillPlanDataVo {
     @ApiModelProperty(value = "是否已下发", notes = "0:否,1:是")
     private Integer issue;
 
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "下发计划id")
     private Long parentId;
 

+ 6 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillPlanPageVo.java

@@ -18,6 +18,7 @@ public class CoreDrillPlanPageVo {
 
     @ApiModelProperty(value = "序号")
     private Integer no;
+
     @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "id")
     private Long id;
@@ -25,13 +26,17 @@ public class CoreDrillPlanPageVo {
     @ApiModelProperty(value = "计划名称")
     private String planName;
 
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "计划创建机构")
     private Long createOrgId;
 
     @ApiModelProperty(value = "计划创建机构名称")
     private String createOrgName;
+
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "计划所属机构id")
     private Long belongOrgId;
+
     @ApiModelProperty(value = "计划所属机构名称")
     private String belongOrgName;
 
@@ -58,6 +63,7 @@ public class CoreDrillPlanPageVo {
     @ApiModelProperty(value = "是否已下发", notes = "0:否,1:是")
     private Integer issue;
 
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "下发计划id", notes = "标准计划此字段为空")
     private Long parentId;
 

+ 2 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillTaskPageVo.java

@@ -21,6 +21,7 @@ public class CoreDrillTaskPageVo {
     @ApiModelProperty(value = "预案演练计划Id")
     private Long planId;
 
+    @JsonSerialize(using = com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
     @ApiModelProperty(value = "机构")
     private Long orgId;
 
@@ -40,6 +41,7 @@ public class CoreDrillTaskPageVo {
     @ApiModelProperty(value = "演练类型名称")
     private String typeText;
 
+    @JsonSerialize(using = com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
     @ApiModelProperty(value = "指挥人")
     private Long hostId;
 

+ 10 - 5
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysDictTypeServiceImpl.java

@@ -1,5 +1,6 @@
 package com.xunmei.system.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -60,15 +61,19 @@ public class SysDictTypeServiceImpl extends ServiceImpl<SysDictTypeMapper, SysDi
         } else {
             page = new Page<>();
         }
-        QueryWrapper<SysDictType> where = new QueryWrapper<>(dictType);
+        LambdaQueryWrapper<SysDictType> where = new LambdaQueryWrapper<>();
+        where.orderByDesc(SysDictType::getCreateTime);
         //模糊查询
         if (StringUtils.isNotNull(dictType.getDictName())) {
-            where.like("dict_name", dictType.getDictName());
-            dictType.setDictName(null);
+            where.like(SysDictType::getDictName, dictType.getDictName());
         }
-        Page<SysDictType> list = dictTypeMapper.selectPage(page, where);
+        //模糊查询
+        if (StringUtils.isNotNull(dictType.getDictType())) {
+            where.like(SysDictType::getDictType, dictType.getDictType());
+        }
+        Page<SysDictType> selectPage = dictTypeMapper.selectPage(page, where);
 
-        return TableDataInfo.build(page);
+        return TableDataInfo.build(selectPage);
     }
 
     /**