|
@@ -2,11 +2,6 @@ package com.ozs.web.controller.plan;
|
|
|
|
|
|
import com.ozs.common.core.controller.BaseController;
|
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
-import com.ozs.common.core.domain.entity.SysDictData;
|
|
|
-import com.ozs.common.enums.PlanPurchaseMode;
|
|
|
-import com.ozs.common.enums.ProjectAttribute;
|
|
|
-import com.ozs.common.enums.ProjectStatus;
|
|
|
-import com.ozs.common.enums.ProjectTypes;
|
|
|
import com.ozs.system.service.ISysDictTypeService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -14,10 +9,6 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.LinkedHashMap;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
/**
|
|
|
* 年度计划信息中的枚举类信息
|
|
|
*
|
|
@@ -30,42 +21,15 @@ public class EnumsOfPlanController extends BaseController {
|
|
|
@Autowired
|
|
|
private ISysDictTypeService dictTypeService;
|
|
|
|
|
|
- @ApiOperation(value = "年度计划信息中的枚举类信息(下拉框)")
|
|
|
+ /**
|
|
|
+ * 获取年度计划信息中的枚举类信息(下拉框数据)
|
|
|
+ *
|
|
|
+ * @return 年度计划信息中的枚举类信息(下拉框数据)
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "年度计划信息中的枚举类信息(下拉框数据)")
|
|
|
@PostMapping("/getAboutEnums")
|
|
|
public AjaxResult getAboutEnums() {
|
|
|
- HashMap<String, HashMap<String, String>> hashMap = new HashMap<>();
|
|
|
- HashMap<String, String> projectTypesMap = new LinkedHashMap<>();
|
|
|
- HashMap<String, String> projectStatusMap = new LinkedHashMap<>();
|
|
|
- HashMap<String, String> planPurchaseModesMap = new LinkedHashMap<>();
|
|
|
- HashMap<String, String> projectAttributes = new LinkedHashMap<>();
|
|
|
- HashMap<String, String> purchaseServices = new LinkedHashMap<>();
|
|
|
- //项目类型
|
|
|
- for (ProjectTypes value : ProjectTypes.values()) {
|
|
|
- projectTypesMap.put(value.getInfo(), value.getCode());
|
|
|
- }
|
|
|
- //项目审核状态
|
|
|
- for (ProjectStatus value : ProjectStatus.values()) {
|
|
|
- projectStatusMap.put(value.getInfo(), value.getCode());
|
|
|
- }
|
|
|
- //采购方式
|
|
|
- for (PlanPurchaseMode value : PlanPurchaseMode.values()) {
|
|
|
- planPurchaseModesMap.put(value.getInfo(), value.getCode());
|
|
|
- }
|
|
|
- //项目属性
|
|
|
- for (ProjectAttribute value : ProjectAttribute.values()) {
|
|
|
- projectAttributes.put(value.getInfo(), value.getCode());
|
|
|
- }
|
|
|
- List<SysDictData> data = dictTypeService.selectDictDataByType("purchase_services");
|
|
|
- //采购服务站
|
|
|
- for (SysDictData dictData : data) {
|
|
|
- purchaseServices.put(dictData.getDictLabel(), dictData.getDictValue());
|
|
|
- }
|
|
|
- hashMap.put("ProjectTypes", projectTypesMap);
|
|
|
- hashMap.put("ProjectStatus", projectStatusMap);
|
|
|
- hashMap.put("PlanPurchaseModes", planPurchaseModesMap);
|
|
|
- hashMap.put("ProjectAttributes", projectAttributes);
|
|
|
- hashMap.put("purchaseServices", purchaseServices);
|
|
|
- return AjaxResult.success(hashMap);
|
|
|
+ return dictTypeService.getAboutEnums();
|
|
|
}
|
|
|
|
|
|
}
|