|
@@ -116,28 +116,29 @@ public class StandardsRegulationsService {
|
|
|
|
|
|
//添加权限
|
|
//添加权限
|
|
String roleCode = AuthUtil.getCurrentUserRoleCode();
|
|
String roleCode = AuthUtil.getCurrentUserRoleCode();
|
|
- log.info("标准法规------" +roleCode);
|
|
|
|
|
|
+ log.info("标准法规------" + roleCode);
|
|
String userId = AuthUtil.getCurrentUserId();
|
|
String userId = AuthUtil.getCurrentUserId();
|
|
if (DictConstants.ROLE_CODE_ADMIN.equals(roleCode) || DictConstants.ROLE_CODE_SYSADMIN.equals(roleCode)) { //管理员账户
|
|
if (DictConstants.ROLE_CODE_ADMIN.equals(roleCode) || DictConstants.ROLE_CODE_SYSADMIN.equals(roleCode)) { //管理员账户
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsList(params);
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsList(params);
|
|
- log.info("标准法规---list---" +list.size()+"----------"+params);
|
|
|
|
|
|
+ log.info("标准法规---list---" + list.size() + "----------" + params);
|
|
} else if (DictConstants.ROLE_CODE_SUBUESR.equals(roleCode)) {
|
|
} else if (DictConstants.ROLE_CODE_SUBUESR.equals(roleCode)) {
|
|
//查询父账户
|
|
//查询父账户
|
|
userId = AuthUtil.getCreateUserId();
|
|
userId = AuthUtil.getCreateUserId();
|
|
params.setUserId(userId);
|
|
params.setUserId(userId);
|
|
- if(params.getShare().equals("0")){
|
|
|
|
|
|
+ if (params.getShare().equals("0")) {
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsList(params);
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsList(params);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsListByQx(params);
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsListByQx(params);
|
|
}
|
|
}
|
|
} else if (DictConstants.ROLE_CODE_UESR.equals(roleCode)) {
|
|
} else if (DictConstants.ROLE_CODE_UESR.equals(roleCode)) {
|
|
//查询普通账户
|
|
//查询普通账户
|
|
params.setUserId(userId);
|
|
params.setUserId(userId);
|
|
- if(params.getShare().equals("0")){
|
|
|
|
|
|
+ if (params.getShare().equals("0")) {
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsList(params);
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsList(params);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsListByQx(params);
|
|
list = standardsRegulationsMapper.queryStandardsRegulationsListByQx(params);
|
|
- } }
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
/* if(params.getLabel()!=null&¶ms.getLabel().size()>0){
|
|
/* if(params.getLabel()!=null&¶ms.getLabel().size()>0){
|
|
if(params.getRegulationType()!=null&¶ms.getRegulationType().size()>0){
|
|
if(params.getRegulationType()!=null&¶ms.getRegulationType().size()>0){
|
|
List<String> regulationType= params.getRegulationType();
|
|
List<String> regulationType= params.getRegulationType();
|
|
@@ -219,15 +220,16 @@ public class StandardsRegulationsService {
|
|
if (filePath.contains("/Scenarios")) {
|
|
if (filePath.contains("/Scenarios")) {
|
|
MI.setObjectName(filePath);
|
|
MI.setObjectName(filePath);
|
|
List<String> listScene = fileDownService.listDeepOne(MI).getInfo();
|
|
List<String> listScene = fileDownService.listDeepOne(MI).getInfo();
|
|
|
|
+ log.info("importMinio() 共需要上传 " + listScene.size() + " 个标准法规场景");
|
|
for (String scenePath : listScene) {
|
|
for (String scenePath : listScene) {
|
|
try {
|
|
try {
|
|
MI.setObjectName(scenePath);
|
|
MI.setObjectName(scenePath);
|
|
- List<String> listAderss = fileDownService.list(MI).getInfo();
|
|
|
|
|
|
+ List<String> addressList = fileDownService.list(MI).getInfo();
|
|
StandardsRegulationsPO standardsRegulationsPO = new StandardsRegulationsPO();
|
|
StandardsRegulationsPO standardsRegulationsPO = new StandardsRegulationsPO();
|
|
String isupdate = null;
|
|
String isupdate = null;
|
|
- for (String adress : listAderss) {
|
|
|
|
- if (adress.contains(".json")) {
|
|
|
|
- MI.setObjectName(adress);
|
|
|
|
|
|
+ for (String address : addressList) {
|
|
|
|
+ if (address.contains(".json")) {
|
|
|
|
+ MI.setObjectName(address);
|
|
Response download = fileDownService.download(MI);
|
|
Response download = fileDownService.download(MI);
|
|
// -------------------------------- label.json --------------------------------
|
|
// -------------------------------- label.json --------------------------------
|
|
String json = download.body().toString();
|
|
String json = download.body().toString();
|
|
@@ -241,7 +243,9 @@ public class StandardsRegulationsService {
|
|
String xodr = root.path("xodr").asText();
|
|
String xodr = root.path("xodr").asText();
|
|
if (StringUtil.isEmpty(sceneName) || (StringUtil.isEmpty(regulationType) && StringUtil.isEmpty(standardType))) {
|
|
if (StringUtil.isEmpty(sceneName) || (StringUtil.isEmpty(regulationType) && StringUtil.isEmpty(standardType))) {
|
|
sceneImportPO.setStatus(DictConstants.SCENE_IMPORT_STATUS_2);
|
|
sceneImportPO.setStatus(DictConstants.SCENE_IMPORT_STATUS_2);
|
|
- sceneImportPO.setErrorMessage("文件 " + adress + " 内容不符合标准格式(场景名称不为空且法规类型和标准类型不同时为空)。");
|
|
|
|
|
|
+ String em = "文件 " + address + " 内容不符合标准格式(场景名称不为空且法规类型和标准类型不同时为空)。";
|
|
|
|
+ log.error(em);
|
|
|
|
+ sceneImportPO.setErrorMessage(em);
|
|
return sceneImportPO;
|
|
return sceneImportPO;
|
|
}
|
|
}
|
|
String osgbAdress = OsgbPath + "/" + osgb;
|
|
String osgbAdress = OsgbPath + "/" + osgb;
|
|
@@ -267,16 +271,16 @@ public class StandardsRegulationsService {
|
|
standardsRegulationsPO.setXodrAddress(xodrAdress);
|
|
standardsRegulationsPO.setXodrAddress(xodrAdress);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (adress.contains(".json")) {
|
|
|
|
- standardsRegulationsPO.setJsonAddress(adress);
|
|
|
|
- } else if (adress.contains(".xml") || adress.contains(".xosc")) {
|
|
|
|
- standardsRegulationsPO.setXmlAddress(adress);
|
|
|
|
- } else if (adress.contains(".xodr")) {
|
|
|
|
- standardsRegulationsPO.setXodrAddress(adress);
|
|
|
|
- } else if (adress.contains(".osgb")) {
|
|
|
|
- standardsRegulationsPO.setOsgbAddress(adress);
|
|
|
|
- } else if (adress.contains(".mp4")) {
|
|
|
|
- standardsRegulationsPO.setVideoAddress(adress);
|
|
|
|
|
|
+ if (address.contains(".json")) {
|
|
|
|
+ standardsRegulationsPO.setJsonAddress(address);
|
|
|
|
+ } else if (address.contains(".xml") || address.contains(".xosc")) {
|
|
|
|
+ standardsRegulationsPO.setXmlAddress(address);
|
|
|
|
+ } else if (address.contains(".xodr")) {
|
|
|
|
+ standardsRegulationsPO.setXodrAddress(address);
|
|
|
|
+ } else if (address.contains(".osgb")) {
|
|
|
|
+ standardsRegulationsPO.setOsgbAddress(address);
|
|
|
|
+ } else if (address.contains(".mp4")) {
|
|
|
|
+ standardsRegulationsPO.setVideoAddress(address);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (isupdate.equals("0")) {
|
|
if (isupdate.equals("0")) {
|