|
|
@@ -37,7 +37,7 @@ func CalcAppreciationValue(session *xorm.Session) (err error, value float64) { |
|
|
|
} |
|
|
|
sum, _ := decimal.NewFromString(appreciationBase.Sum) //总资产 |
|
|
|
flowSum, _ := decimal.NewFromString(appreciationBase.FlowSum) //流通资产 |
|
|
|
value, _ = sum.Div(flowSum).Float64() |
|
|
|
value, _ = sum.Div(flowSum).RoundFloor(4).Float64() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
@@ -49,7 +49,7 @@ func DealTransferIn(session *xorm.Session, amount float64) (err error, value flo |
|
|
|
return |
|
|
|
} |
|
|
|
nowValueF := decimal.NewFromFloat(nowValue) |
|
|
|
value, _ = amountValue.Div(nowValueF).RoundFloor(4).Float64() |
|
|
|
value, _ = amountValue.Div(nowValueF).Float64() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|