送餐员报餐 APP 后端接口,todo:批量更新报餐记录,通知营养科更新营养配餐信息
This commit is contained in:
parent
f27e2de7c1
commit
595adb7ae3
@ -1,10 +1,9 @@
|
|||||||
package com.ruoyi.system.fantang.controller;
|
package com.ruoyi.system.fantang.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtOrderDao;
|
||||||
import com.ruoyi.system.fantang.service.*;
|
import com.ruoyi.system.fantang.service.*;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -12,6 +11,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
@ -36,6 +36,9 @@ public class ClientController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IFtWeekMenuDaoService weekMenuDaoService;
|
private IFtWeekMenuDaoService weekMenuDaoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFtReportMealsDaoService reportMealsDaoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用餐时间信息
|
* 获取用餐时间信息
|
||||||
* 日期:2020年12月11日
|
* 日期:2020年12月11日
|
||||||
@ -65,7 +68,7 @@ public class ClientController extends BaseController {
|
|||||||
* 获取员工某一天的订单信息
|
* 获取员工某一天的订单信息
|
||||||
* 日期:2020年12月11日
|
* 日期:2020年12月11日
|
||||||
* 作者:陈智兴
|
* 作者:陈智兴
|
||||||
*
|
* <p>
|
||||||
* return
|
* return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getOrderOfDay")
|
@GetMapping("/getOrderOfDay")
|
||||||
@ -89,7 +92,7 @@ public class ClientController extends BaseController {
|
|||||||
* 获取员工停餐信息
|
* 获取员工停餐信息
|
||||||
* 日期:2020年12月21日
|
* 日期:2020年12月21日
|
||||||
* 作者:陈智兴
|
* 作者:陈智兴
|
||||||
*
|
* <p>
|
||||||
* param JSONObject staffId: 员工id
|
* param JSONObject staffId: 员工id
|
||||||
* return
|
* return
|
||||||
*/
|
*/
|
||||||
@ -103,25 +106,25 @@ public class ClientController extends BaseController {
|
|||||||
* 推送订单信息
|
* 推送订单信息
|
||||||
* 日期:2020年12月11日
|
* 日期:2020年12月11日
|
||||||
* 作者:陈智兴
|
* 作者:陈智兴
|
||||||
*
|
* <p>
|
||||||
* param JSONObject staffId: 员工id
|
* param JSONObject staffId: 员工id
|
||||||
* orderType:订餐类型
|
* orderType:订餐类型
|
||||||
* demandDate: 订餐用餐日期
|
* demandDate: 订餐用餐日期
|
||||||
* return
|
* return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/PostOrder")
|
@PostMapping("/PostOrder")
|
||||||
public AjaxResult postOrder(@RequestBody JSONObject params) {
|
public AjaxResult postOrder(@RequestBody JSONObject params) {
|
||||||
return AjaxResult.success(orderDaoService.insertOrder(params.getLong("staffId"), params.getInteger("orderType"), params.getDate("demandDate")));
|
return AjaxResult.success(orderDaoService.insertOrder(params.getLong("staffId"), params.getInteger("orderType"), params.getDate("demandDate")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送停餐信息
|
* 推送停餐信息
|
||||||
* 日期:2020年12月21日
|
* 日期:2020年12月21日
|
||||||
* 作者:陈智兴
|
* 作者:陈智兴
|
||||||
*
|
* <p>
|
||||||
* param staffId: 员工id
|
* param staffId: 员工id
|
||||||
* type:订餐类型
|
* type:订餐类型
|
||||||
* demandDate: 订餐用餐日期
|
* demandDate: 订餐用餐日期
|
||||||
* return -1: 已报停餐信息, 1: 停餐成功
|
* return -1: 已报停餐信息, 1: 停餐成功
|
||||||
*/
|
*/
|
||||||
@PostMapping("/postStopOrder")
|
@PostMapping("/postStopOrder")
|
||||||
@ -133,10 +136,10 @@ public class ClientController extends BaseController {
|
|||||||
* 员工取消订餐信息
|
* 员工取消订餐信息
|
||||||
* 日期:2020年12月21日
|
* 日期:2020年12月21日
|
||||||
* 作者:陈智兴
|
* 作者:陈智兴
|
||||||
*
|
* <p>
|
||||||
* param staffId: 员工id
|
* param staffId: 员工id
|
||||||
* type:订餐类型
|
* type:订餐类型
|
||||||
* demandDate: 订餐用餐日期
|
* demandDate: 订餐用餐日期
|
||||||
* return -1: 已报停餐信息, 1: 停餐成功
|
* return -1: 已报停餐信息, 1: 停餐成功
|
||||||
*/
|
*/
|
||||||
@PostMapping("/postCancelOrder")
|
@PostMapping("/postCancelOrder")
|
||||||
@ -148,10 +151,10 @@ public class ClientController extends BaseController {
|
|||||||
* 推送取消停餐信息
|
* 推送取消停餐信息
|
||||||
* 日期:2020年12月21日
|
* 日期:2020年12月21日
|
||||||
* 作者:陈智兴
|
* 作者:陈智兴
|
||||||
*
|
* <p>
|
||||||
* param staffId: 员工id
|
* param staffId: 员工id
|
||||||
* type:订餐类型
|
* type:订餐类型
|
||||||
* demandDate: 订餐用餐日期
|
* demandDate: 订餐用餐日期
|
||||||
* return -1: 已报停餐信息, 1: 停餐成功
|
* return -1: 已报停餐信息, 1: 停餐成功
|
||||||
*/
|
*/
|
||||||
@PostMapping("/postCancelStopOrder")
|
@PostMapping("/postCancelStopOrder")
|
||||||
@ -170,10 +173,10 @@ public class ClientController extends BaseController {
|
|||||||
* 日期:2020年12月10日
|
* 日期:2020年12月10日
|
||||||
* 作者: 陈智兴
|
* 作者: 陈智兴
|
||||||
* 修改:首次创建
|
* 修改:首次创建
|
||||||
*
|
* <p>
|
||||||
* param { tel: 手机号码;
|
* param { tel: 手机号码;
|
||||||
* password: 密码
|
* password: 密码
|
||||||
* }
|
* }
|
||||||
* return 返回员工信息
|
* return 返回员工信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/login")
|
@GetMapping("/login")
|
||||||
@ -252,7 +255,7 @@ public class ClientController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/getMenuOfDay")
|
@PostMapping("/getMenuOfDay")
|
||||||
public AjaxResult getMenuOfDay(@RequestBody JSONObject params) {
|
public AjaxResult getMenuOfDay(@RequestBody JSONObject params) {
|
||||||
String[] weekDays = { "周日", "周一", "周二", "周三", "周四", "周五", "周六" };
|
String[] weekDays = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
cal.setTime(params.getDate("date"));
|
cal.setTime(params.getDate("date"));
|
||||||
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
|
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
|
||||||
@ -265,4 +268,36 @@ public class ClientController extends BaseController {
|
|||||||
public AjaxResult statisGetOrderOfDate(@RequestParam Date date) {
|
public AjaxResult statisGetOrderOfDate(@RequestParam Date date) {
|
||||||
return orderDaoService.statisGetOrderOfDate(date);
|
return orderDaoService.statisGetOrderOfDate(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定日期的订单明细
|
||||||
|
* 类型,日期
|
||||||
|
* 类型 = 0 ,所有
|
||||||
|
* type = 1,2,3:早,午,晚
|
||||||
|
*/
|
||||||
|
@PostMapping("/getOrderDetailedByDate")
|
||||||
|
public AjaxResult getOrderDetailedByDate(@RequestBody JSONObject params) {
|
||||||
|
|
||||||
|
String createAt = params.getString("createAt");
|
||||||
|
Integer orderType = params.getInteger("orderType");
|
||||||
|
String start = createAt + " 00:00:00";
|
||||||
|
String end = createAt + " 23:59:59";
|
||||||
|
|
||||||
|
// QueryWrapper<FtOrderDao> wrapper = new QueryWrapper<>();
|
||||||
|
// if (orderType != 0) {
|
||||||
|
// wrapper.eq("order_type", orderType);
|
||||||
|
// }
|
||||||
|
// wrapper.between("create_at", start, end);
|
||||||
|
// orderDaoService.list(wrapper);
|
||||||
|
|
||||||
|
List<FtOrderDao> orderList;
|
||||||
|
|
||||||
|
if (orderType != 0) {
|
||||||
|
orderList = orderDaoService.listDetailedByDate(orderType, start, end);
|
||||||
|
}else {
|
||||||
|
orderList = orderDaoService.listAllDetailedByDate(start, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.success(orderList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,20 +2,23 @@ package com.ruoyi.system.fantang.controller;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtFoodDemandDao;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
||||||
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
|
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
|
||||||
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
import com.ruoyi.system.fantang.service.*;
|
||||||
import com.ruoyi.system.fantang.service.IFtPatientDaoService;
|
|
||||||
import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService;
|
|
||||||
import com.ruoyi.system.fantang.vo.FtDepartVo;
|
import com.ruoyi.system.fantang.vo.FtDepartVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@ -31,6 +34,18 @@ public class ClientPatientController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IFtDepartDaoService iFtDepartDaoService;
|
private IFtDepartDaoService iFtDepartDaoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFtReportMealsDaoService iFtReportMealsDaoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFtFoodDemandDaoService iFtFoodDemandDaoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFtNutritionFoodDaoService iFftNutritionFoodDaoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFtFoodDaoService iftFoodDaoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据病人获取今日报餐信息
|
* 根据病人获取今日报餐信息
|
||||||
*/
|
*/
|
||||||
@ -92,10 +107,10 @@ public class ClientPatientController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 更改默认报餐部门
|
* 更改默认报餐部门
|
||||||
*/
|
*/
|
||||||
@PostMapping("/updateDepart")
|
@PutMapping("/updateDepart")
|
||||||
public AjaxResult updateDepart(@RequestBody Map<String, Object> data) {
|
public AjaxResult updateDepart(@RequestBody JSONObject params) {
|
||||||
Long staffId = Long.parseLong(data.get("staffId").toString());
|
Long staffId = params.getLong("staffId");
|
||||||
String departId = data.get("departId").toString();
|
String departId = params.getString("departId");
|
||||||
|
|
||||||
UpdateWrapper<FtStaffInfoDao> wrapper = new UpdateWrapper<>();
|
UpdateWrapper<FtStaffInfoDao> wrapper = new UpdateWrapper<>();
|
||||||
wrapper.eq("staff_id", staffId);
|
wrapper.eq("staff_id", staffId);
|
||||||
@ -104,4 +119,47 @@ public class ClientPatientController extends BaseController {
|
|||||||
|
|
||||||
return AjaxResult.success(iFtStaffInfoDaoService.update(staffInfoDao, wrapper));
|
return AjaxResult.success(iFtStaffInfoDaoService.update(staffInfoDao, wrapper));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新报餐记录
|
||||||
|
*/
|
||||||
|
@PutMapping("/batchUpdateReportMeals")
|
||||||
|
public AjaxResult batchUpdateReportMeals(@RequestBody List<FtReportMealsDao> reportMealsDaoList) {
|
||||||
|
return AjaxResult.success(iFtReportMealsDaoService.updateBatchById(reportMealsDaoList));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新指定病患的报餐记录
|
||||||
|
*/
|
||||||
|
@PutMapping("/updateReportMeals")
|
||||||
|
public AjaxResult updateReportMeals(@RequestBody FtReportMealsDao ftReportMealsDao) {
|
||||||
|
return AjaxResult.success(iFtReportMealsDaoService.updateById(ftReportMealsDao));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新指定病患默认报餐数据
|
||||||
|
*/
|
||||||
|
@PutMapping("/updateFoodDemand")
|
||||||
|
public AjaxResult updateFoodDemand(@RequestBody FtFoodDemandDao ftFoodDemandDao) {
|
||||||
|
return AjaxResult.success(iFtFoodDemandDaoService.updateById(ftFoodDemandDao));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取营养配餐配置信息
|
||||||
|
*/
|
||||||
|
@GetMapping("getNutritionFood")
|
||||||
|
public AjaxResult getNutritionFood() {
|
||||||
|
return AjaxResult.success(iFftNutritionFoodDaoService.list());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取菜品价格
|
||||||
|
*/
|
||||||
|
@GetMapping("/getFoodPrice/{foodId}")
|
||||||
|
public AjaxResult getFoodPrice(@PathVariable("foodId") Long foodId) {
|
||||||
|
QueryWrapper<FtFoodDao> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("type", 1);
|
||||||
|
wrapper.eq("food_id", foodId);
|
||||||
|
return AjaxResult.success(iftFoodDaoService.getOne(wrapper).getPrice());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,12 @@ public class FtOrderDao implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long staffId;
|
private Long staffId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工姓名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清单
|
* 清单
|
||||||
*/
|
*/
|
||||||
@ -147,4 +153,7 @@ public class FtOrderDao implements Serializable {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String departName;
|
private String departName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long departId;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import org.apache.ibatis.annotations.Insert;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,5 +23,10 @@ public interface FtOrderDaoMapper extends BaseMapper<FtOrderDao> {
|
|||||||
" LEFT JOIN ft_staff_info b on a.staff_id = b.staff_id\n" +
|
" LEFT JOIN ft_staff_info b on a.staff_id = b.staff_id\n" +
|
||||||
" LEFT JOIN ft_depart c on b.depart_id = c.depart_id where a.order_date BETWEEN #{start} and #{end}\n" +
|
" LEFT JOIN ft_depart c on b.depart_id = c.depart_id where a.order_date BETWEEN #{start} and #{end}\n" +
|
||||||
" GROUP BY a.order_type, c.depart_name")
|
" GROUP BY a.order_type, c.depart_name")
|
||||||
List<FtOrderDao> statisGetOrderOfDate(@Param("start")String start,@Param("end") String end);
|
List<FtOrderDao> statisGetOrderOfDate(@Param("start") String start, @Param("end") String end);
|
||||||
|
|
||||||
|
|
||||||
|
List<FtOrderDao> listDetailedByDate(@Param("orderType") Integer orderType, @Param("start") String start, @Param("end") String end);
|
||||||
|
|
||||||
|
List<FtOrderDao> listAllDetailedByDate(String start, String end);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||||||
import com.ruoyi.system.fantang.domain.FtOrderDao;
|
import com.ruoyi.system.fantang.domain.FtOrderDao;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单管理Service接口
|
* 订单管理Service接口
|
||||||
@ -31,4 +32,8 @@ public interface IFtOrderDaoService extends IService<FtOrderDao> {
|
|||||||
AjaxResult cancelStopOrder(Long orderId);
|
AjaxResult cancelStopOrder(Long orderId);
|
||||||
|
|
||||||
AjaxResult statisGetOrderOfDate(Date date);
|
AjaxResult statisGetOrderOfDate(Date date);
|
||||||
|
|
||||||
|
List<FtOrderDao> listDetailedByDate(Integer orderType, String start, String end);
|
||||||
|
|
||||||
|
List<FtOrderDao> listAllDetailedByDate(String start, String end);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ public class FtOrderDaoServiceImpl extends ServiceImpl<FtOrderDaoMapper, FtOrder
|
|||||||
public AjaxResult stopOrder(Long staffId, Integer orderType, Date demandDate) {
|
public AjaxResult stopOrder(Long staffId, Integer orderType, Date demandDate) {
|
||||||
// 先删除当天的订餐记录,再添加停餐记录
|
// 先删除当天的订餐记录,再添加停餐记录
|
||||||
QueryWrapper<FtOrderDao> wrapper = new QueryWrapper<>();
|
QueryWrapper<FtOrderDao> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("staff_id", staffId);
|
wrapper.eq("staff_id", staffId);
|
||||||
wrapper.eq("order_type", orderType);
|
wrapper.eq("order_type", orderType);
|
||||||
wrapper.between("order_date", DateUtil.beginOfDay(demandDate), DateUtil.endOfDay(demandDate));
|
wrapper.between("order_date", DateUtil.beginOfDay(demandDate), DateUtil.endOfDay(demandDate));
|
||||||
this.baseMapper.delete(wrapper);
|
this.baseMapper.delete(wrapper);
|
||||||
@ -129,4 +129,14 @@ public class FtOrderDaoServiceImpl extends ServiceImpl<FtOrderDaoMapper, FtOrder
|
|||||||
public AjaxResult statisGetOrderOfDate(Date date) {
|
public AjaxResult statisGetOrderOfDate(Date date) {
|
||||||
return AjaxResult.success(this.baseMapper.statisGetOrderOfDate(DateUtil.beginOfDay(date).toString(), DateUtil.endOfDay(date).toString()));
|
return AjaxResult.success(this.baseMapper.statisGetOrderOfDate(DateUtil.beginOfDay(date).toString(), DateUtil.endOfDay(date).toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FtOrderDao> listDetailedByDate(Integer orderType, String start, String end) {
|
||||||
|
return this.baseMapper.listDetailedByDate(orderType, start, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FtOrderDao> listAllDetailedByDate(String start, String end) {
|
||||||
|
return this.baseMapper.listAllDetailedByDate(start, end);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,29 +1,56 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtOrderDaoMapper">
|
<mapper namespace="com.ruoyi.system.fantang.mapper.FtOrderDaoMapper">
|
||||||
|
|
||||||
<resultMap type="FtOrderDao" id="FtOrderDaoResult">
|
<resultMap type="FtOrderDao" id="FtOrderDaoResult">
|
||||||
<result property="orderId" column="order_id" />
|
<result property="orderId" column="order_id"/>
|
||||||
<result property="orderType" column="order_type" />
|
<result property="orderType" column="order_type"/>
|
||||||
<result property="workerId" column="worker_id" />
|
<result property="workerId" column="worker_id"/>
|
||||||
<result property="orderList" column="order_list" />
|
<result property="orderList" column="order_list"/>
|
||||||
<result property="totalPrice" column="total_price" />
|
<result property="totalPrice" column="total_price"/>
|
||||||
<result property="discount" column="discount" />
|
<result property="discount" column="discount"/>
|
||||||
<result property="receipts" column="receipts" />
|
<result property="receipts" column="receipts"/>
|
||||||
<result property="createAt" column="create_at" />
|
<result property="createAt" column="create_at"/>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="orderSrc" column="order_src" />
|
<result property="orderSrc" column="order_src"/>
|
||||||
<result property="currentPrice" column="current_price" />
|
<result property="currentPrice" column="current_price"/>
|
||||||
<result property="payType" column="pay_type" />
|
<result property="payType" column="pay_type"/>
|
||||||
<result property="payFlag" column="pay_flag" />
|
<result property="payFlag" column="pay_flag"/>
|
||||||
<result property="expiredFlag" column="expired_flag" />
|
<result property="expiredFlag" column="expired_flag"/>
|
||||||
<result property="writeOffFlag" column="write_off_flag" />
|
<result property="writeOffFlag" column="write_off_flag"/>
|
||||||
<result property="writeOffAt" column="write_off_at" />
|
<result property="writeOffAt" column="write_off_at"/>
|
||||||
<result property="isExpired" column="is_expired" />
|
<result property="isExpired" column="is_expired"/>
|
||||||
<result property="deviceId" column="device_id" />
|
<result property="deviceId" column="device_id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="listDetailedByDate" resultType="com.ruoyi.system.fantang.domain.FtOrderDao">
|
||||||
|
SELECT a.*,
|
||||||
|
b.staff_id,
|
||||||
|
b.`name`,
|
||||||
|
b.depart_id,
|
||||||
|
c.depart_name
|
||||||
|
FROM ft_order a
|
||||||
|
LEFT JOIN ft_staff_info b ON a.staff_id = b.staff_id
|
||||||
|
LEFT JOIN ft_depart c ON b.depart_id = c.depart_id
|
||||||
|
WHERE a.order_type = #{orderType}
|
||||||
|
AND a.create_at BETWEEN #{start}
|
||||||
|
AND #{end}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="listAllDetailedByDate" resultType="com.ruoyi.system.fantang.domain.FtOrderDao">
|
||||||
|
SELECT a.*,
|
||||||
|
b.staff_id,
|
||||||
|
b.`name`,
|
||||||
|
b.depart_id,
|
||||||
|
c.depart_name
|
||||||
|
FROM ft_order a
|
||||||
|
LEFT JOIN ft_staff_info b ON a.staff_id = b.staff_id
|
||||||
|
LEFT JOIN ft_depart c ON b.depart_id = c.depart_id
|
||||||
|
AND a.create_at BETWEEN #{start}
|
||||||
|
AND #{end}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user