|
|
@@ -233,9 +233,19 @@ public class ContractPositionContentAdapter extends RecyclerView.Adapter<Contrac
|
|
|
Profit = "--";
|
|
|
} else {
|
|
|
if (data.getBuyorsell().equals("1")) {//卖方向
|
|
|
- Profit = NumberUtils.roundNum(differencePrice * Double.parseDouble(data.getCurpositionqty()) * goodsInfo.getAgreeunit() * -1, 2);
|
|
|
+ Profit = NumberUtils.roundNum(
|
|
|
+ (quoteDayData.getPrice() * Double.parseDouble(data.getCurpositionqty())
|
|
|
+ * goodsInfo.getAgreeunit() - Double.parseDouble(data.getCurholderamount())) * -1,
|
|
|
+ 2
|
|
|
+ );
|
|
|
+// Profit = NumberUtils.roundNum(differencePrice * Double.parseDouble(data.getCurpositionqty()) * goodsInfo.getAgreeunit() * -1, 2);
|
|
|
} else {
|
|
|
- Profit = NumberUtils.roundNum(differencePrice * Double.parseDouble(data.getCurpositionqty()) * goodsInfo.getAgreeunit(), 2);
|
|
|
+ Profit = NumberUtils.roundNum(
|
|
|
+ (quoteDayData.getPrice() * Double.parseDouble(data.getCurpositionqty())
|
|
|
+ * goodsInfo.getAgreeunit() - Double.parseDouble(data.getCurholderamount())),
|
|
|
+ 2
|
|
|
+ );
|
|
|
+// Profit = NumberUtils.roundNum(differencePrice * Double.parseDouble(data.getCurpositionqty()) * goodsInfo.getAgreeunit(), 2);
|
|
|
}
|
|
|
}
|
|
|
}
|