Browse Source

病区逻辑调整

chengyao 3 years ago
parent
commit
ed73e743dd

+ 30 - 0
common/src/main/java/com/lantone/common/annotation/Log.java

@@ -0,0 +1,30 @@
+package com.lantone.common.annotation;
+import com.lantone.common.enums.BusinessType;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @Description:自定义操作日志记录注解
+ * @Author: cy
+ * @time: 2021/8/30 13:36
+ */
+@Target({ ElementType.PARAMETER, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Log {
+    /**
+     * 模块
+     */
+    public String title() default "";
+
+    /**
+     * 功能
+     */
+    public BusinessType businessType() default BusinessType.OTHER;
+    /**
+     * 是否保存请求的参数
+     */
+    public boolean isSaveRequestData() default true;
+}

+ 59 - 0
common/src/main/java/com/lantone/common/enums/BusinessType.java

@@ -0,0 +1,59 @@
+package com.lantone.common.enums;
+
+/**
+ * 业务操作类型
+ * 
+ * @author ruoyi
+ */
+public enum BusinessType
+{
+    /**
+     * 其它
+     */
+    OTHER,
+
+    /**
+     * 新增
+     */
+    INSERT,
+
+    /**
+     * 修改
+     */
+    UPDATE,
+
+    /**
+     * 删除
+     */
+    DELETE,
+
+    /**
+     * 授权
+     */
+    GRANT,
+
+    /**
+     * 导出
+     */
+    EXPORT,
+
+    /**
+     * 导入
+     */
+    IMPORT,
+
+    /**
+     * 强退
+     */
+    FORCE,
+
+    /**
+     * 生成代码
+     */
+    GENCODE,
+    
+    /**
+     * 清空
+     */
+    CLEAN,
+}

+ 1 - 1
dblayer-mbg/src/main/resources/mapper/RegionMapper.xml

@@ -24,7 +24,6 @@
         and t1.id = t2.region_id
         where
         t1.is_deleted = 'N'
-        order by t1.order_no,t1.gmt_create desc;
         <if test='hospitalId != null and hospitalId != ""'>
             AND t1.hospital_id = #{hospitalId}
         </if>
@@ -34,5 +33,6 @@
         <if test='status != null and status != ""'>
             and t2.status like CONCAT('%',#{status},'%')
         </if>
+        order by t1.order_no,t1.gmt_create desc
     </select>
 </mapper>