Commit eb6935dd LN

取消任务BUG修改

1 个父辈 9cf9c5d5
...@@ -52,7 +52,7 @@ import java.util.*; ...@@ -52,7 +52,7 @@ import java.util.*;
* 感应料架 * 感应料架
* Created by sunke on 2021/7/12. * Created by sunke on 2021/7/12.
*/ */
@Api(tags = "感应料架") @Api(tags = "SHELF: 感应料架")
@RestController @RestController
@Slf4j @Slf4j
public class SensorShelfHandler extends BaseDeviceHandler { public class SensorShelfHandler extends BaseDeviceHandler {
......
...@@ -43,7 +43,7 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -43,7 +43,7 @@ import java.util.concurrent.ConcurrentHashMap;
//北京方仓 //北京方仓
@RestController @RestController
@Api(tags = "XLC方仓") @Api(tags = "BOX: XLC方仓")
@Slf4j @Slf4j
public class XLCBoxHandler extends BaseDeviceHandler { public class XLCBoxHandler extends BaseDeviceHandler {
public XLCBoxHandler(List<IOpAuthApi> apiList) { public XLCBoxHandler(List<IOpAuthApi> apiList) {
......
...@@ -54,11 +54,18 @@ public class MessageService { ...@@ -54,11 +54,18 @@ public class MessageService {
String filePath = System.getProperty("user.dir"); String filePath = System.getProperty("user.dir");
log.info("user.dir=" + filePath); log.info("user.dir=" + filePath);
// "\\WEB-INF\\classes\\META-INF\\resources"; // "\\WEB-INF\\classes\\META-INF\\resources";
// user.dir=C:\Program Files\Apache Software Foundation\Tomcat 9.0
// C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\smf-core\WEB-INF\classes\META-INF\resources
if(filePath.toLowerCase().contains("tomcat")){
return filePath+"\\webapps\\smf-core\\WEB-INF\\classes\\META-INF\\resources";
}else{
return filePath + "\\src\\main\\resources"; return filePath + "\\src\\main\\resources";
} }
}
public void autoImportCsvFile(){ public void autoImportCsvFile(){
String filePath = getResourcesPath(); // String filePath = getResourcesPath();
String filePath = "D:\\resources";
File file = new File(filePath ); //需要获取的文件的路径 File file = new File(filePath ); //需要获取的文件的路径
List<LanguageInfo> languageInfoList=dataCache.getLanguageList(); List<LanguageInfo> languageInfoList=dataCache.getLanguageList();
if (file.exists() && file.isDirectory()) { if (file.exists() && file.isDirectory()) {
...@@ -86,11 +93,11 @@ public class MessageService { ...@@ -86,11 +93,11 @@ public class MessageService {
} }
public void autoImportProperties() { public void autoImportProperties() {
// String fielPath = getResourcesPath(); // String filePath = getResourcesPath();
String fielPath = "D:\\resources"; String filePath = "D:\\resources";
File file = new File(fielPath); //需要获取的文件的路径 File file = new File(filePath); //需要获取的文件的路径
if (file.exists() && file.isDirectory()) { if (file.exists() && file.isDirectory()) {
String[] fileNameLists = file.list(); //存储文件名的String数组 String[] fileNameLists = file.list(); //存储文件名的String数组
File[] filePathLists = file.listFiles(); //存储文件路径的String数组 File[] filePathLists = file.listFiles(); //存储文件路径的String数组
...@@ -135,7 +142,7 @@ public class MessageService { ...@@ -135,7 +142,7 @@ public class MessageService {
} }
languageMsgs.add(msg); languageMsgs.add(msg);
} }
//只能修改不能新增 //只能新增不能修改
msgListUpload(".properties", languageMsgs,false); msgListUpload(".properties", languageMsgs,false);
// languageMsgManager.insertAll(languageMsgs); // languageMsgManager.insertAll(languageMsgs);
} }
......
...@@ -91,14 +91,13 @@ public class MessageUtils { ...@@ -91,14 +91,13 @@ public class MessageUtils {
private void initLanguageMsgList() { private void initLanguageMsgList() {
msgMap = messageService.loadMsgMap(); msgMap = messageService.loadMsgMap();
//自动导入CSV内容 //自动导入CSV内容,只新增不修改
messageService.autoImportCsvFile(); messageService.autoImportCsvFile();
//只新增不修改
messageService.autoImportProperties();
if (msgMap.size() > 0) { if (msgMap.size() > 0) {
return; return;
} }
messageService.autoImportProperties();
msgMap = messageService.loadMsgMap(); msgMap = messageService.loadMsgMap();
} }
......
...@@ -24,7 +24,7 @@ public class DataLogManagerImpl implements IDataLogManager { ...@@ -24,7 +24,7 @@ public class DataLogManagerImpl implements IDataLogManager {
@Override @Override
public DataLog get(String id) { public DataLog get(String id) {
return null; return dataLogDao.findOneById(id);
} }
@Override @Override
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!