|
@@ -6,9 +6,12 @@ import com.diagbot.entity.DictionaryInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.service.impl.DictionaryInfoServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
+import com.diagbot.util.EntityUtil;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @Description:
|
|
@@ -31,4 +34,32 @@ public class DictionaryFacade extends DictionaryInfoServiceImpl {
|
|
|
List<DictionaryInfoDTO> listRes = BeanUtil.listCopyTo(list, DictionaryInfoDTO.class);
|
|
|
return listRes;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 返回字典信息
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<Long, List<DictionaryInfoDTO>> getList() {
|
|
|
+ List<DictionaryInfo> list = this.list(new QueryWrapper<DictionaryInfo>()
|
|
|
+ .in("return_type", ListUtil.arrayToList(new Long[] { 0L, 2L }))
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .orderByAsc("group_type", "order_no"));
|
|
|
+ List<DictionaryInfoDTO> listRes = BeanUtil.listCopyTo(list, DictionaryInfoDTO.class);
|
|
|
+ return EntityUtil.makeEntityListMap(listRes, "groupType");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 返回字典信息
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<Long, List<DictionaryInfoDTO>> getListBack() {
|
|
|
+ List<DictionaryInfo> list = this.list(new QueryWrapper<DictionaryInfo>()
|
|
|
+ .in("return_type", ListUtil.arrayToList(new Long[] { 0L, 1L }))
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .orderByAsc("group_type", "order_no"));
|
|
|
+ List<DictionaryInfoDTO> listRes = BeanUtil.listCopyTo(list, DictionaryInfoDTO.class);
|
|
|
+ return EntityUtil.makeEntityListMap(listRes, "groupType");
|
|
|
+ }
|
|
|
}
|