|
@@ -44,6 +44,7 @@ public class FormulaMileage implements FormulaStrategy {
|
|
public static final String DX = "dx";
|
|
public static final String DX = "dx";
|
|
public static final String DY = "dy";
|
|
public static final String DY = "dy";
|
|
public static final String DS = "ds";
|
|
public static final String DS = "ds";
|
|
|
|
+ public static final String F_DEV="WP['G10pcfw']";
|
|
public static final List<String> KEYS = new ArrayList<>(Arrays.asList(ZH, PW, SJX, SJY, SCX, SCY, DX, DY, DS));
|
|
public static final List<String> KEYS = new ArrayList<>(Arrays.asList(ZH, PW, SJX, SJY, SCX, SCY, DX, DY, DS));
|
|
private List<String> relyList;
|
|
private List<String> relyList;
|
|
|
|
|
|
@@ -97,17 +98,18 @@ public class FormulaMileage implements FormulaStrategy {
|
|
Map<String, String[]> coordinateMap = mileageClient.mileage2Coordinate(zhpw, Func.toLong(tec.getContractId()));
|
|
Map<String, String[]> coordinateMap = mileageClient.mileage2Coordinate(zhpw, Func.toLong(tec.getContractId()));
|
|
/*G10缓存对象*/
|
|
/*G10缓存对象*/
|
|
if (coordinateMap.size() > 0) {
|
|
if (coordinateMap.size() > 0) {
|
|
|
|
+ String dev= Optional.ofNullable(Expression.parse(F_DEV).calculate(tec.getConstantMap())).map(Object::toString).orElse(cur.getFormula().getDev());
|
|
|
|
+ if (StringUtils.isEmpty(dev)) {
|
|
|
|
+ dev = Mileage.DEV;
|
|
|
|
+ }
|
|
|
|
+ String finalDev = dev;
|
|
mileageList.forEach(m -> {
|
|
mileageList.forEach(m -> {
|
|
String[] coordinate = coordinateMap.get(m.getZhPw());
|
|
String[] coordinate = coordinateMap.get(m.getZhPw());
|
|
if (coordinate != null) {
|
|
if (coordinate != null) {
|
|
m.setSjx(coordinate[0]);
|
|
m.setSjx(coordinate[0]);
|
|
m.setSjy(coordinate[1]);
|
|
m.setSjy(coordinate[1]);
|
|
if (m.isEmptyDev()) {
|
|
if (m.isEmptyDev()) {
|
|
- String dev = cur.getFormula().getDev();
|
|
|
|
- if (StringUtils.isEmpty(dev)) {
|
|
|
|
- dev = Mileage.DEV;
|
|
|
|
- }
|
|
|
|
- Map<String, Object> xyz = FormulaUtils.triangleSquare(dev);
|
|
|
|
|
|
+ Map<String, Object> xyz = FormulaUtils.triangleSquare(finalDev);
|
|
m.setDx(xyz.get("X").toString());
|
|
m.setDx(xyz.get("X").toString());
|
|
m.setDy(xyz.get("Y").toString());
|
|
m.setDy(xyz.get("Y").toString());
|
|
m.setDs(xyz.get("Z").toString());
|
|
m.setDs(xyz.get("Z").toString());
|