|
@@ -4,10 +4,12 @@ import api.common.pojo.common.ResponseBodyVO;
|
|
|
import api.common.pojo.constants.DictConstants;
|
|
|
import api.common.pojo.constants.LogConstants;
|
|
|
import api.common.pojo.param.MinioParameter;
|
|
|
+import api.common.pojo.param.scene.SceneDeleteParam;
|
|
|
import api.common.pojo.param.scene.SceneImportParam;
|
|
|
import api.common.pojo.param.scene.SceneNaturalNewParam;
|
|
|
import api.common.pojo.param.scene.SceneNaturalParam;
|
|
|
import api.common.pojo.po.scene.SceneNaturalPO;
|
|
|
+import api.common.pojo.po.scene.ScenePackagePO;
|
|
|
import api.common.pojo.po.system.SceneImportPO;
|
|
|
import api.common.util.ObjectUtil;
|
|
|
import api.common.util.ParamUtil;
|
|
@@ -218,48 +220,6 @@ public class SceneNaturalService {
|
|
|
String[][] selfBehavior = params.getSelfBehavior();
|
|
|
String[][] targetBehavior = params.getTargetBehavior();
|
|
|
|
|
|
-
|
|
|
- ||(infrastructure!=null&&infrastructure.length>0)||(temporaryOperation!=null&&temporaryOperation.length>0)||(trafficCondition!=null&&trafficCondition.length>0)||
|
|
|
- (selfBehavior!=null&&selfBehavior.length>0)||(targetBehavior!=null&&targetBehavior.length>0)||(params.getIds()!=null&¶ms.getIds().length>0)){
|
|
|
- po.setXlk("1");
|
|
|
- }*/
|
|
|
-
|
|
|
- String[][] highSpeed=params.getHighSpeed() ;
|
|
|
- String[][] ramp=params.getRamp();
|
|
|
- String[][] tunnel=params.getTunnel();
|
|
|
- String[][] cutIn=params.getCutIn();
|
|
|
- String[][] cutOut=params.getCutOut();
|
|
|
- String[][] laneChange=params.getLaneChange();
|
|
|
- String[][] turnAround=params.getTurnAround();
|
|
|
-
|
|
|
- if((highSpeed!=null&&highSpeed.length>0)||(ramp!=null&&ramp.length>0)
|
|
|
- ||(tunnel!=null&&tunnel.length>0)||(cutIn!=null&&cutIn.length>0)||(cutOut!=null&&cutOut.length>0)||
|
|
|
- (laneChange!=null&&laneChange.length>0)||(turnAround!=null&&turnAround.length>0)){
|
|
|
- po.setBq("1");
|
|
|
- }
|
|
|
-
|
|
|
- if (highSpeed != null && highSpeed.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(highSpeed, poBq);
|
|
|
- }
|
|
|
- if (ramp != null && ramp.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(ramp, poBq);
|
|
|
- }
|
|
|
- if (tunnel != null && tunnel.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(tunnel, poBq);
|
|
|
- }
|
|
|
- if (cutIn != null && cutIn.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(cutIn, poBq);
|
|
|
- }
|
|
|
- if (cutOut != null && cutOut.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(cutOut, poBq);
|
|
|
- } if (turnAround != null && turnAround.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(turnAround, poBq);
|
|
|
- }
|
|
|
- if (laneChange != null && laneChange.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(laneChange, poBq);
|
|
|
- }*/
|
|
|
-
|
|
|
-
|
|
|
if (ObjectUtil.isNotNull(params.getIds())) {
|
|
|
po.setIds(params.getIds());
|
|
|
}
|
|
@@ -306,43 +266,16 @@ public class SceneNaturalService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
- if(listType!=null&&listType.size()>0){
|
|
|
- po.setAllIds(listType);
|
|
|
- }else{
|
|
|
- List<String> listA=new ArrayList<>();
|
|
|
- listA.add("没有权限");
|
|
|
- po.setAllIds(listA);
|
|
|
- }*/
|
|
|
-
|
|
|
- map.put("po",po);
|
|
|
- map.put("poBq",poBq);*/
|
|
|
-
|
|
|
-
|
|
|
List<SceneNaturalPO> list = new ArrayList<>();
|
|
|
-
|
|
|
- list = sceneNaturalMapper.querySceneNaturalList(po);
|
|
|
- }else if((po.getXlk().equals("0")&&po.getBq().equals("1"))) {
|
|
|
- list = sceneNaturalMapper.querySceneNaturalListByBq(map);
|
|
|
- }else{
|
|
|
- list = sceneNaturalMapper.querySceneNaturalListByBqAndXlk(map);
|
|
|
- }*/
|
|
|
|
|
|
|
|
|
String roleCode = AuthUtil.getCurrentUserRoleCode();
|
|
|
String userId = AuthUtil.getCurrentUserId();
|
|
|
if (DictConstants.ROLE_CODE_ADMIN.equals(roleCode) || DictConstants.ROLE_CODE_SYSADMIN.equals(roleCode)) {
|
|
|
-
|
|
|
- if((po.getXlk().equals("0")&&po.getBq().equals("0"))||(po.getXlk().equals("1")&&po.getBq().equals("0"))){
|
|
|
-*/
|
|
|
+
|
|
|
list = sceneNaturalMapper.querySceneNaturalList(po);
|
|
|
System.out.println(" //添加权限------" + list.size() + "------" + po);
|
|
|
-
|
|
|
- list = sceneNaturalMapper.querySceneNaturalListByBq(map);
|
|
|
- }else{
|
|
|
- list = sceneNaturalMapper.querySceneNaturalListByBqAndXlk(map);
|
|
|
- }
|
|
|
-*/
|
|
|
+
|
|
|
} else if (DictConstants.ROLE_CODE_SUBUESR.equals(roleCode)) {
|
|
|
|
|
|
userId = AuthUtil.getCreateUserId();
|
|
@@ -354,29 +287,16 @@ public class SceneNaturalService {
|
|
|
} else {
|
|
|
list = sceneNaturalMapper.querySceneNaturalListByQx(po);
|
|
|
}
|
|
|
-
|
|
|
- list = sceneNaturalMapper.querySceneNaturalListByBqAndQx(map);
|
|
|
- }else{
|
|
|
- list = sceneNaturalMapper.querySceneNaturalListByBqAndXlkAndQx(map);
|
|
|
- }
|
|
|
-*/
|
|
|
+
|
|
|
} else if (DictConstants.ROLE_CODE_UESR.equals(roleCode)) {
|
|
|
|
|
|
po.setUserId(userId);
|
|
|
-
|
|
|
-
|
|
|
if (po.getShare().equals("0")) {
|
|
|
list = sceneNaturalMapper.querySceneNaturalList(po);
|
|
|
} else {
|
|
|
list = sceneNaturalMapper.querySceneNaturalListByQx(po);
|
|
|
- }
|
|
|
- list = sceneNaturalMapper.querySceneNaturalListByBqAndQx(map);
|
|
|
- }else{
|
|
|
- list = sceneNaturalMapper.querySceneNaturalListByBqAndXlkAndQx(map);
|
|
|
- }*/
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
for (SceneNaturalPO vo : list) {
|
|
|
if (vo.getRoadType().equals("高速")) {
|
|
|
if (ObjectUtil.isNull(vo.getLabel())) {
|
|
@@ -433,21 +353,24 @@ public class SceneNaturalService {
|
|
|
|
|
|
@SneakyThrows
|
|
|
public void deleteSceneNatural(SceneNaturalPO params) {
|
|
|
-
|
|
|
|
|
|
String sceneName = params.getNaturalName();
|
|
|
|
|
|
List<String> sceneIdList = sceneNaturalMapper.selectIdByName(sceneName);
|
|
|
for (String sceneId : sceneIdList) {
|
|
|
|
|
|
-
|
|
|
+ SceneDeleteParam param = new SceneDeleteParam();
|
|
|
+ param.setModifyTime(TimeUtil.getNowForMysql());
|
|
|
+ param.setSceneZrId(sceneId);
|
|
|
+ param.setModifyUserId(AuthUtil.getCurrentUserId());
|
|
|
+ scenePackageSublistMapper.updateScenePackageSublistById(param);
|
|
|
|
|
|
scenePackageMapper.updateIsUnavailableByPackageId("1", sceneId);
|
|
|
}
|
|
|
|
|
|
systemScenePackageSublistMapper.deleteBySceneName(sceneName);
|
|
|
|
|
|
-
|
|
|
+ sceneNaturalMapper.deleteByName(sceneName, AuthUtil.getCreateUserId());
|
|
|
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
map.put("sceneId", params.getNaturalId());
|