bug:修复员工余额订餐时更新余额信息
This commit is contained in:
parent
7a253f1628
commit
3e035fe70a
@ -466,12 +466,14 @@ public class ClientController extends BaseController {
|
||||
// 更新员工账户补贴余额
|
||||
BigDecimal nowBalance = balance.subtract(totalPrice);
|
||||
staffInfoDao.setBalance(nowBalance);
|
||||
staffInfoDaoService.updateById(staffInfoDao);
|
||||
|
||||
orderDaoService.save(orderDao);
|
||||
|
||||
// 添加补贴流水记录
|
||||
FtStaffSubsidyDao staffSubsidyDao = new FtStaffSubsidyDao();
|
||||
staffSubsidyDao.setStaffId(orderDao.getStaffId());
|
||||
staffSubsidyDao.setSubsidyType("餐费补贴");
|
||||
staffSubsidyDao.setIncomeType(2);
|
||||
staffSubsidyDao.setPrice(totalPrice);
|
||||
staffSubsidyDao.setConsumAt(today);
|
||||
@ -495,6 +497,9 @@ public class ClientController extends BaseController {
|
||||
|
||||
// 当前订单信息
|
||||
FtOrderDao orderDao = orderDaoService.getById(orderId);
|
||||
if (orderDao == null) {
|
||||
AjaxResult.error("无效订单");
|
||||
}
|
||||
// 更新订单信息
|
||||
orderDao.setPayFlag(2);
|
||||
orderDaoService.save(orderDao);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.system.fantang.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
@ -68,12 +69,13 @@ public class FtSettleDaoController extends BaseController {
|
||||
|
||||
// 根据病人 id ,上次结算日期,选择日期查询病人非营养餐记录
|
||||
QueryWrapper<FtReportMealsDao> reportMealsWrapper = new QueryWrapper<>();
|
||||
reportMealsWrapper.eq("patient_id", patientId);
|
||||
reportMealsWrapper.eq("dining_flag",1);
|
||||
reportMealsWrapper.between("dining_at", sdf.format(lastBillingDate), sdf.format(selectBillingDate));
|
||||
reportMealsWrapper
|
||||
.eq("patient_id", patientId)
|
||||
.eq("dining_flag",1)
|
||||
.between("dining_at", sdf.format(lastBillingDate), DateUtil.endOfDay(selectBillingDate));
|
||||
List<FtReportMealsDao> reportMealsList = iFtReportMealsDaoService.list(reportMealsWrapper);
|
||||
|
||||
ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
|
||||
ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumTotalPrice(patientId, DateUtil.beginOfDay(lastBillingDate), DateUtil.endOfDay(selectBillingDate));
|
||||
|
||||
Map<String, Object> data = new HashMap<>(2);
|
||||
data.put("reportMealsList", reportMealsList);
|
||||
|
@ -306,7 +306,7 @@ import {
|
||||
showAllMealsWithNoPay,
|
||||
showMealsWithSelect
|
||||
} from "../../../api/fantang/settle";
|
||||
import {getLastSettlementDate, listAll, listMealsWithInSettle, listNoPay, listPayoff} from "@/api/fantang/meals";
|
||||
import {getLastSettlementDate, listAll, listMealsWithInSettle, listNoPay, listPayoff} from "../../../api/fantang/meals";
|
||||
import {getUserProfile} from "@/api/system/user";
|
||||
import {listDepart} from "@/api/fantang/depart";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user