|
@@ -574,6 +574,9 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
String now = sdf.format(new Date());
|
|
|
long nowDate = Long.valueOf(now);
|
|
|
|
|
|
+ //当前月份第一天
|
|
|
+ long monthFirstDay = Long.valueOf(DateUtils.getFirstDayByMonth());
|
|
|
+
|
|
|
//账户余额
|
|
|
JSONObject balance = materialStareMapper.getKuaiShouAccountBalance(accountId);
|
|
|
resultMap.put("balance",Check.isNull(balance) ? "0" : balance.getString("balance"));
|
|
@@ -586,6 +589,11 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
resultMap.put("totalCost",Check.isNull(totalCost) ? "0" : totalCost.getString("todayCost"));
|
|
|
//0-开 1-关
|
|
|
resultMap.put("state", Check.isNull(totalCost) ? "1" : totalCost.getString("accountStatus"));
|
|
|
+
|
|
|
+ //月消耗
|
|
|
+ JSONObject monthCost = materialStareMapper.getKuaiShouAccountCostMonth(accountId, monthFirstDay,nowDate);
|
|
|
+ resultMap.put("monthCost",Check.isNull(monthCost) ? "0" : monthCost.getString("cost"));
|
|
|
+
|
|
|
return Result.successMsg("账户查询成功",resultMap);
|
|
|
}
|
|
|
|