Commit 03bead4c LN

增加版本号显示

1 个父辈 d99c1f01
......@@ -25,6 +25,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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.query.Query;
import org.springframework.http.HttpStatus;
......@@ -48,69 +49,11 @@ import java.util.*;
public class SettingsController {
@Autowired
private DataCache dataCache;
// @Autowired
// private SettingsMapper settingsMapper;
//
// @ApiOperation("获取设置信息")
// @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);
//
// }
/**
* 当前版本
*/
@Value("${app.version}")
private String version;
@ApiOperation("获取系统设置信息")
@GetMapping("/sysSettings")
......@@ -266,4 +209,11 @@ public class SettingsController {
log.error("导出失败" + e.getMessage(), e);
}
}
@ApiOperation("获取版本号")
@GetMapping("/version")
public String version() {
log.info("获取版本号:"+version);
return "V"+version;
}
}
......@@ -34,6 +34,4 @@ rsa:
app:
version: '@project.version@'
build:
time: '@build.time@'
\ No newline at end of file
version: '@project.version@'
\ No newline at end of file
......@@ -166,3 +166,5 @@ smfcore.inventory=\u5E93\u5B58
smfcore.barcodes=\u6761\u5F62\u7801
smfcore.internet=\u7269\u8054\u7F51
smfcore.materialBox.qtyError=\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u6570\u91CF
smfcore.posOutput=\u5E93\u4F4D\u51FA\u5E93
smfcore.posOutput.noFile=\u8BF7\u5148\u4E0A\u4F20\u51FA\u5E93\u6587\u4EF6
......@@ -164,4 +164,6 @@ smfcore.report=Report
smfcore.inOutData=Records
smfcore.inventory=Inventory
smfcore.barcodes=MA.ID
smfcore.internet=Connectivity
\ 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
......@@ -164,4 +164,6 @@ smfcore.report=\u30B9\u30C6\u30FC\u30C8\u30E1\u30F3\u30C8
smfcore.inOutData=\u8A18\u9332
smfcore.inventory=\u30A4\u30F3\u30D9\u30F3\u30C8\u30EA\u30FC
smfcore.barcodes=\u30D0\u30FC\u30B3\u30FC\u30C9
smfcore.internet=\u9023\u7D50\u6027
\ No newline at end of file
smfcore.internet=\u9023\u7D50\u6027
smfcore.posOutput=\u30B9\u30C8\u30EC\u30FC\u30B8\u306E\u53D6\u308A\u51FA\u3057
smfcore.posOutput.noFile=\u307E\u305A\u306F\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044
\ No newline at end of file
......@@ -164,4 +164,6 @@ smfcore.report=\u62A5\u8868
smfcore.inOutData=\u51FA\u5165\u5E93
smfcore.inventory=\u5E93\u5B58
smfcore.barcodes=\u6761\u5F62\u7801
smfcore.internet=\u7269\u8054\u7F51
\ No newline at end of file
smfcore.internet=\u7269\u8054\u7F51
smfcore.posOutput=\u5E93\u4F4D\u51FA\u5E93
smfcore.posOutput.noFile=\u8BF7\u5148\u4E0A\u4F20\u51FA\u5E93\u6587\u4EF6
\ No newline at end of file
......@@ -164,4 +164,6 @@ smfcore.report=\u5831\u8868
smfcore.inOutData=\u51FA\u5165\u5EAB
smfcore.inventory=\u5EAB\u5B58
smfcore.barcodes=\u689D\u5F62\u78BC
smfcore.internet=\u7269\u806F\u7DB2
\ No newline at end of file
smfcore.internet=\u7269\u806F\u7DB2
smfcore.posOutput=\u5EAB\u4F4D\u51FA\u5EAB
smfcore.posOutput.noFile=\u8ACB\u5148\u4E0A\u50B3\u51FA\u5EAB\u6587\u4EF6
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!