模型转换
This commit is contained in:
parent
229743c1a6
commit
f7b6051fcc
@ -1,7 +1,7 @@
|
||||
package com.actionsoft.apps.coe.pal.modelconvert.util;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
|
||||
import com.actionsoft.apps.coe.pal.modelconvert.constant.ConvertType;
|
||||
import com.actionsoft.apps.coe.pal.modelconvert.constant.LinkerDefConstant;
|
||||
import com.actionsoft.apps.coe.pal.modelconvert.model.Position;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -40,15 +40,15 @@ public class ConvertUtil {
|
||||
} else if (positionModels.size() == 2) {
|
||||
if (positionModels.get(0).getX() == positionModels.get(1).getX()) {
|
||||
if ("from".equals(type)) {
|
||||
return (positionModels.get(0).getY() - positionModels.get(1).getY() > 0) ? Constant.ANGLE_DOWN : Constant.ANGLE_UP;
|
||||
return (positionModels.get(0).getY() - positionModels.get(1).getY() > 0) ? LinkerDefConstant.ANGLE_DOWN : LinkerDefConstant.ANGLE_UP;
|
||||
} else {
|
||||
return (positionModels.get(0).getY() - positionModels.get(1).getY() > 0) ? Constant.ANGLE_UP : Constant.ANGLE_DOWN;
|
||||
return (positionModels.get(0).getY() - positionModels.get(1).getY() > 0) ? LinkerDefConstant.ANGLE_UP : LinkerDefConstant.ANGLE_DOWN;
|
||||
}
|
||||
} else {
|
||||
if ("from".equals(type)) {
|
||||
return (positionModels.get(0).getX() - positionModels.get(1).getX() > 0) ? Constant.ANGLE_RIGHT : Constant.ANGLE_LEFT;
|
||||
return (positionModels.get(0).getX() - positionModels.get(1).getX() > 0) ? LinkerDefConstant.ANGLE_RIGHT : LinkerDefConstant.ANGLE_LEFT;
|
||||
} else {
|
||||
return (positionModels.get(0).getX() - positionModels.get(1).getX() > 0) ? Constant.ANGLE_LEFT : Constant.ANGLE_RIGHT;
|
||||
return (positionModels.get(0).getX() - positionModels.get(1).getX() > 0) ? LinkerDefConstant.ANGLE_LEFT : LinkerDefConstant.ANGLE_RIGHT;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user