Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 03bead4c
由
LN
编写于
2022-01-12 09:53:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加版本号显示
1 个父辈
d99c1f01
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
28 行增加
和
70 行删除
src/main/java/com/neotel/smfcore/core/system/rest/SettingsController.java
src/main/resources/config/application.yml
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_ja_JP.properties
src/main/resources/messages_zh_CN.properties
src/main/resources/messages_zh_TW.properties
src/main/java/com/neotel/smfcore/core/system/rest/SettingsController.java
查看文件 @
03bead4
...
@@ -25,6 +25,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -25,6 +25,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.aggregation.BooleanOperators
;
import
org.springframework.data.mongodb.core.aggregation.BooleanOperators
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
@@ -48,69 +49,11 @@ import java.util.*;
...
@@ -48,69 +49,11 @@ import java.util.*;
public
class
SettingsController
{
public
class
SettingsController
{
@Autowired
@Autowired
private
DataCache
dataCache
;
private
DataCache
dataCache
;
/**
// @Autowired
* 当前版本
// private SettingsMapper settingsMapper;
*/
//
@Value
(
"${app.version}"
)
// @ApiOperation("获取设置信息")
private
String
version
;
// @GetMapping()
// @PreAuthorize("@el.check('settings:list')")
// public SettingsDto getSettings() {
//
// Settings settings= dataCache.getSettings();
// SettingsDto dto=settingsMapper.toDto(settings);
// return dto;
// }
//
// @ApiOperation("修改设置信息")
// @PutMapping
// @PreAuthorize("@el.check('settings')")
// public ResponseEntity<Object> update(@Validated @RequestBody SettingsDto settingsDto) {
//
// if(settingsDto.getMaxHumidity()<=settingsDto.getMinHumidity()){
//
// throw new ValidateException("smfcore.humidityValueError","温度范围数据错误" );
//// throw new BadRequestException("温度范围数据错误");
// }
// if(settingsDto.getMaxHumidityShow()<=settingsDto.getMinHumidityShow()){
// throw new ValidateException("smfcore.humidityShowValueError","温度显示范围数据错误" );
//// throw new BadRequestException("温度显示范围数据错误");
// }
// if(settingsDto.getMaxTemperature()<=settingsDto.getMinTemperature()){
// throw new ValidateException("smfcore.temperatureValueError","湿度范围数据错误" );
//// throw new BadRequestException("湿度范围数据错误");
// }
// if(settingsDto.getMaxTemperatureShow()<=settingsDto.getMinTemperatureShow()){
// throw new ValidateException("smfcore.temperatureShowValueError","湿度显示范围数据错误" );
//// throw new BadRequestException("湿度显示范围数据错误");
// }
//
// if(settingsDto.getInNotifyApi()==null){
// settingsDto.setInNotifyApi("");
// }
// if(settingsDto.getOutNotifyApi()==null){
// settingsDto.setOutNotifyApi("");
// }
// if(settingsDto.getOrderFileDir()==null){
// settingsDto.setOrderFileDir("");
// }
// Settings settings=dataCache.getSettings();
// settings.setInNotifyApi(settingsDto.getInNotifyApi());
// settings.setOutNotifyApi(settingsDto.getOutNotifyApi());
// settings.setOrderFileDir(settingsDto.getOrderFileDir());
// settings.setMinHumidity(settingsDto.getMinHumidity());
// settings.setMaxHumidity(settingsDto.getMaxHumidity());
// settings.setMinTemperature(settingsDto.getMinTemperature());
// settings.setMaxTemperature(settingsDto.getMaxTemperature());
// settings.setMaxHumidityShow(settingsDto.getMaxHumidityShow());
// settings.setMinHumidityShow(settingsDto.getMinHumidityShow());
// settings.setMaxTemperatureShow(settingsDto.getMaxTemperatureShow());
// settings.setMinTemperatureShow(settingsDto.getMinTemperatureShow());
// dataCache.updateSettings(settings);
// return new ResponseEntity<>(HttpStatus.OK);
//
// }
@ApiOperation
(
"获取系统设置信息"
)
@ApiOperation
(
"获取系统设置信息"
)
@GetMapping
(
"/sysSettings"
)
@GetMapping
(
"/sysSettings"
)
...
@@ -266,4 +209,11 @@ public class SettingsController {
...
@@ -266,4 +209,11 @@ public class SettingsController {
log
.
error
(
"导出失败"
+
e
.
getMessage
(),
e
);
log
.
error
(
"导出失败"
+
e
.
getMessage
(),
e
);
}
}
}
}
@ApiOperation
(
"获取版本号"
)
@GetMapping
(
"/version"
)
public
String
version
()
{
log
.
info
(
"获取版本号:"
+
version
);
return
"V"
+
version
;
}
}
}
src/main/resources/config/application.yml
查看文件 @
03bead4
...
@@ -34,6 +34,4 @@ rsa:
...
@@ -34,6 +34,4 @@ rsa:
app
:
app
:
version
:
'
@project.version@'
build
:
time
:
'
@build.time@'
\ No newline at end of file
\ No newline at end of file
version
:
'
@project.version@'
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages.properties
查看文件 @
03bead4
...
@@ -166,3 +166,5 @@ smfcore.inventory=\u5E93\u5B58
...
@@ -166,3 +166,5 @@ smfcore.inventory=\u5E93\u5B58
smfcore.barcodes
=
\u6761\u
5F62
\u7801
smfcore.barcodes
=
\u6761\u
5F62
\u7801
smfcore.internet
=
\u7269\u8054\u
7F51
smfcore.internet
=
\u7269\u8054\u
7F51
smfcore.materialBox.qtyError
=
\u
8BF7
\u
8F93
\u5165\u
6B63
\u
786E
\u7684\u6570\u
91CF
smfcore.materialBox.qtyError
=
\u
8BF7
\u
8F93
\u5165\u
6B63
\u
786E
\u7684\u6570\u
91CF
smfcore.posOutput
=
\u
5E93
\u
4F4D
\u
51FA
\u
5E93
smfcore.posOutput.noFile
=
\u
8BF7
\u5148\u
4E0A
\u
4F20
\u
51FA
\u
5E93
\u6587\u
4EF6
src/main/resources/messages_en_US.properties
查看文件 @
03bead4
...
@@ -164,4 +164,6 @@ smfcore.report=Report
...
@@ -164,4 +164,6 @@ smfcore.report=Report
smfcore.inOutData
=
Records
smfcore.inOutData
=
Records
smfcore.inventory
=
Inventory
smfcore.inventory
=
Inventory
smfcore.barcodes
=
MA.ID
smfcore.barcodes
=
MA.ID
smfcore.internet
=
Connectivity
\ No newline at end of file
\ No newline at end of file
smfcore.internet
=
Connectivity
smfcore.posOutput
=
Position Checkout
smfcore.posOutput.noFile
=
Please upload the file first
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
03bead4
...
@@ -164,4 +164,6 @@ smfcore.report=\u30B9\u30C6\u30FC\u30C8\u30E1\u30F3\u30C8
...
@@ -164,4 +164,6 @@ smfcore.report=\u30B9\u30C6\u30FC\u30C8\u30E1\u30F3\u30C8
smfcore.inOutData
=
\u
8A18
\u9332
smfcore.inOutData
=
\u
8A18
\u9332
smfcore.inventory
=
\u
30A4
\u
30F3
\u
30D9
\u
30F3
\u
30C8
\u
30EA
\u
30FC
smfcore.inventory
=
\u
30A4
\u
30F3
\u
30D9
\u
30F3
\u
30C8
\u
30EA
\u
30FC
smfcore.barcodes
=
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
smfcore.barcodes
=
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
smfcore.internet
=
\u9023\u
7D50
\u6027
\ No newline at end of file
\ No newline at end of file
smfcore.internet
=
\u9023\u
7D50
\u6027
smfcore.posOutput
=
\u
30B9
\u
30C8
\u
30EC
\u
30FC
\u
30B8
\u
306E
\u
53D6
\u
308A
\u
51FA
\u3057
smfcore.posOutput.noFile
=
\u
307E
\u
305A
\u
306F
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u3092\u
30A2
\u
30C3
\u
30D7
\u
30ED
\u
30FC
\u
30C9
\u3057\u3066\u
304F
\u3060\u3055\u3044
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
03bead4
...
@@ -164,4 +164,6 @@ smfcore.report=\u62A5\u8868
...
@@ -164,4 +164,6 @@ smfcore.report=\u62A5\u8868
smfcore.inOutData
=
\u
51FA
\u5165\u
5E93
smfcore.inOutData
=
\u
51FA
\u5165\u
5E93
smfcore.inventory
=
\u
5E93
\u
5B58
smfcore.inventory
=
\u
5E93
\u
5B58
smfcore.barcodes
=
\u6761\u
5F62
\u7801
smfcore.barcodes
=
\u6761\u
5F62
\u7801
smfcore.internet
=
\u7269\u8054\u
7F51
\ No newline at end of file
\ No newline at end of file
smfcore.internet
=
\u7269\u8054\u
7F51
smfcore.posOutput
=
\u
5E93
\u
4F4D
\u
51FA
\u
5E93
smfcore.posOutput.noFile
=
\u
8BF7
\u5148\u
4E0A
\u
4F20
\u
51FA
\u
5E93
\u6587\u
4EF6
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
03bead4
...
@@ -164,4 +164,6 @@ smfcore.report=\u5831\u8868
...
@@ -164,4 +164,6 @@ smfcore.report=\u5831\u8868
smfcore.inOutData
=
\u
51FA
\u5165\u
5EAB
smfcore.inOutData
=
\u
51FA
\u5165\u
5EAB
smfcore.inventory
=
\u
5EAB
\u
5B58
smfcore.inventory
=
\u
5EAB
\u
5B58
smfcore.barcodes
=
\u
689D
\u
5F62
\u
78BC
smfcore.barcodes
=
\u
689D
\u
5F62
\u
78BC
smfcore.internet
=
\u7269\u
806F
\u
7DB2
\ No newline at end of file
\ No newline at end of file
smfcore.internet
=
\u7269\u
806F
\u
7DB2
smfcore.posOutput
=
\u
5EAB
\u
4F4D
\u
51FA
\u
5EAB
smfcore.posOutput.noFile
=
\u
8ACB
\u5148\u
4E0A
\u
50B3
\u
51FA
\u
5EAB
\u6587\u
4EF6
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论