Jelajahi Sumber

申诉审核获取字典信息添加审核处理方式

zhanghang 3 tahun lalu
induk
melakukan
4a6026a692

+ 6 - 0
doc/041.20220118_v2.2.0_通用版_申诉驳回/qc_init_v2.2.0_通用版_申诉驳回.sql

@@ -144,6 +144,12 @@ INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `
 INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '0', '待审核', '2', '0', '状态');
 INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '1', '驳回', '2', '0', '状态');
 INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '2', '通过', '2', '0', '状态');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '34', '申诉驳回', '32,33,35', '2', '0', '申诉驳回状态登字典数据总览');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '1', '修改', '2', '0', '审核处理方式');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '2', '删除', '2', '0', '审核处理方式');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '3', '新增已有', '2', '0', '审核处理方式');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '4', '新增缺失', '2', '0', '审核处理方式');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '5', '恢复', '2', '0', '审核处理方式');
 
 
 /**

+ 25 - 17
src/main/java/com/diagbot/facade/SysDictionaryFacade.java

@@ -11,9 +11,7 @@ import com.diagbot.util.ListUtil;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Component;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @Description:
@@ -72,29 +70,39 @@ public class SysDictionaryFacade extends SysDictionaryInfoServiceImpl {
     }
 
     /**
-     * 获取字典申诉审核操作类型及状态
+     * 获取字典申诉驳回具体信息
      * @return
      */
-    public  Map<String, String> getAppealOperationDictionary(){
-        Map<String, String> appealOperationMap = new HashMap<>();
-        if (getDictionaryWithKey() != null
-                && getDictionaryWithKey().containsKey("32")
-                ) {
-            appealOperationMap= getDictionaryWithKey().get("32");
+    public List<SysDictionaryInfoDTO> getAppealRejectDictionary(String groupType){
+        List<SysDictionaryInfoDTO> sysDictionaryInfoDTOS = new LinkedList<SysDictionaryInfoDTO>();
+        if (getDictionary() != null
+                && getDictionary().containsKey(Long.parseLong(groupType))
+        ) {
+            sysDictionaryInfoDTOS = getDictionary().get(Long.parseLong(groupType));
         }
-        return appealOperationMap;
+        return sysDictionaryInfoDTOS;
     }
+
     /**
-     * 获取字典申诉审核状态
+     * 获取字典申诉驳回总体信息
      * @return
      */
-    public Map<String, String> getAppealStatusDictionary(){
-        Map<String, String> appealStatusMap = new HashMap<>();
+    public Map<String,Map<String, String>> getAppealRejectionDictionary(){
+        Map<String, Map<String,String>> appealOperationMap = new HashMap<>();
+        Map<String, String> appealOperationMapKey = new HashMap<>();
         if (getDictionaryWithKey() != null
-                && getDictionaryWithKey().containsKey("33")
+                && getDictionaryWithKey().containsKey("34")
         ) {
-            appealStatusMap= getDictionaryWithKey().get("33");
+            appealOperationMapKey= getDictionaryWithKey().get("34");
+        }
+        String appealOperation = appealOperationMapKey.get("申诉驳回");
+        String[] split = appealOperation.split(",");
+        List<String> strings = Arrays.asList(split);
+        for (int i = 0; i < strings.size(); i++) {
+            List<SysDictionaryInfoDTO> appealStatusDictionary = getAppealRejectDictionary(strings.get(i));
+            Map<String, String> keyValue = EntityUtil.makeMapWithKeyValue(appealStatusDictionary, "name", "val");
+            appealOperationMap.put(appealStatusDictionary.get(0).getRemark(), keyValue);
         }
-        return appealStatusMap;
+        return appealOperationMap;
     }
 }

+ 2 - 8
src/main/java/com/diagbot/web/MedAppealExamineInfoController.java

@@ -123,14 +123,8 @@ public class MedAppealExamineInfoController {
             notes = "获取操作类型及状态")
     @PostMapping("/getAppealReviewDictionary")
     public RespDTO<Map<String,Map<String,String>>> getAppealReviewDictionary() {
-        Map<String, String> appealOperationDictionary = sysDictionaryFacade.getAppealOperationDictionary();
-        Map<String, String> appealStatusDictionary = sysDictionaryFacade.getAppealStatusDictionary();
-        Map<String, Map<String, String>> appealReviewMap = new HashMap<>();
-        if(appealOperationDictionary!=null && appealStatusDictionary!=null){
-            appealReviewMap.put("操作类型",appealOperationDictionary);
-            appealReviewMap.put("状态",appealStatusDictionary);
-        }
-        return RespDTO.onSuc(appealReviewMap);
+        Map<String, Map<String, String>> appealRejectionDictionary = sysDictionaryFacade.getAppealRejectionDictionary();
+        return RespDTO.onSuc(appealRejectionDictionary);
     }
 
     @ApiOperation(value = "获取待审核数量[by:zhanghang]",