|
@@ -12,11 +12,13 @@ import android.widget.Toast;
|
12
|
12
|
import com.kuxuan.moneynote.R;
|
13
|
13
|
import com.kuxuan.moneynote.base.mvpbase.MVPFragmentActivity;
|
14
|
14
|
import com.kuxuan.moneynote.json.BillJson;
|
|
15
|
+import com.kuxuan.moneynote.json.BillJsonList;
|
15
|
16
|
import com.kuxuan.moneynote.utils.PickerUtil;
|
16
|
17
|
import com.kuxuan.moneynote.utils.TextSetUtil;
|
17
|
18
|
import com.umeng.analytics.MobclickAgent;
|
18
|
19
|
|
19
|
20
|
import java.util.Calendar;
|
|
21
|
+import java.util.List;
|
20
|
22
|
|
21
|
23
|
import butterknife.Bind;
|
22
|
24
|
import cn.addapp.pickers.picker.NumberPicker;
|
|
@@ -152,4 +154,23 @@ public class BillActivity extends MVPFragmentActivity<BillPresenter, BillModel>
|
152
|
154
|
TextSetUtil.setTextForMoey("0",mIncomeText);
|
153
|
155
|
TextSetUtil.setTextForMoey("0",mPayText);
|
154
|
156
|
}
|
|
157
|
+
|
|
158
|
+ @Override
|
|
159
|
+ public void setOffLineBillData(List<BillJsonList> billJsonLists) {
|
|
160
|
+
|
|
161
|
+ double income_Sum=0;
|
|
162
|
+ double pay_Sum=0;
|
|
163
|
+ double balance_Sum =0;
|
|
164
|
+
|
|
165
|
+ for(int i=0;i<billJsonLists.size();i++){
|
|
166
|
+ income_Sum = Double.parseDouble(billJsonLists.get(i).getIncome())+income_Sum;
|
|
167
|
+ pay_Sum = Double.parseDouble(billJsonLists.get(i).getPay())+pay_Sum;
|
|
168
|
+ }
|
|
169
|
+ balance_Sum = income_Sum - pay_Sum;
|
|
170
|
+
|
|
171
|
+ TextSetUtil.setTextForMoey(TextSetUtil.formatFloatNumber(balance_Sum),mBalanceText);
|
|
172
|
+ TextSetUtil.setTextForMoey(TextSetUtil.formatFloatNumber(income_Sum),mIncomeText);
|
|
173
|
+ TextSetUtil.setTextForMoey(TextSetUtil.formatFloatNumber(pay_Sum),mPayText);
|
|
174
|
+
|
|
175
|
+ }
|
155
|
176
|
}
|