|
@@ -0,0 +1,62 @@
|
|
|
+package com.energy.manage.service.controller.system;
|
|
|
+
|
|
|
+import com.energy.manage.common.reponse.ResultResp;
|
|
|
+import com.energy.manage.service.config.TemplateConfig;
|
|
|
+import com.energy.manage.service.config.annotations.UserLoginToken;
|
|
|
+import com.energy.manage.service.domain.dto.system.SystemPermissionListDto;
|
|
|
+import com.energy.manage.service.domain.vo.system.SystemPermissionVo;
|
|
|
+import com.energy.manage.service.service.system.SysRoleService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @menu: 后台模版管理
|
|
|
+ *
|
|
|
+ * @author sy
|
|
|
+ * @date 2021-10-18 13:32:05
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("sysTemplate")
|
|
|
+@CrossOrigin
|
|
|
+@Api(value = "SysTemplateController", tags = "系统模版管理")
|
|
|
+public class SysTemplateController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TemplateConfig templateConfig;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取系统模版
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @UserLoginToken
|
|
|
+ @ApiOperation(value = "获取模版")
|
|
|
+ @PostMapping(value = "getAllTemplate")
|
|
|
+ public ResultResp<Map<String,String>> getAllTemplate() {
|
|
|
+
|
|
|
+ Map<String,String> templateMap = new HashMap<>(4);
|
|
|
+ // 标准功率曲线
|
|
|
+ templateMap.put("bzPower",templateConfig.getBzPower());
|
|
|
+ // 合同功率曲线
|
|
|
+ templateMap.put("htPower",templateConfig.getHtPower());
|
|
|
+ // 风场
|
|
|
+ templateMap.put("field",templateConfig.getField());
|
|
|
+ // 风机
|
|
|
+ templateMap.put("draught",templateConfig.getDraught());
|
|
|
+
|
|
|
+ return ResultResp.SUCCESS(templateMap);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|