Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
aee6b69d3e
@ -12,6 +12,8 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@ -32,11 +34,26 @@ public class ClientController extends BaseController {
|
||||
@Autowired
|
||||
private IFtOrderDaoService orderDaoService;
|
||||
|
||||
/**
|
||||
* 获取用餐时间信息
|
||||
* 日期:2020年12月11日
|
||||
* 作者:陈智兴
|
||||
* type:订餐类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getDinnerTimeSetting")
|
||||
public AjaxResult getDinnerTimeSetting() {
|
||||
return AjaxResult.success(iFtConfigDaoService.getDinnerTimeSetting());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工当天订单信息
|
||||
* 日期:2020年12月11日
|
||||
* 作者:陈智兴
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getOrderOfToday/{staffId}")
|
||||
public AjaxResult getOrderOfToday(@PathVariable("staffId") Long staffId) {
|
||||
return AjaxResult.success(orderDaoService.getOrderOfToday(staffId));
|
||||
@ -56,21 +73,15 @@ public class ClientController extends BaseController {
|
||||
* 推送订单信息
|
||||
* 日期:2020年12月11日
|
||||
* 作者:陈智兴
|
||||
* @param JSONArray
|
||||
* staffId: 员工id
|
||||
* type:订餐类型
|
||||
*
|
||||
* @param JSONObject staffId: 员工id
|
||||
* orderType:订餐类型
|
||||
* demandDate: 订餐用餐日期
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/PostOrder")
|
||||
public AjaxResult postOrder(JSONArray params) {
|
||||
// for(int i : params.size()) {
|
||||
//
|
||||
// }
|
||||
// Long staffId = params.getLong("staffId");
|
||||
// Integer type = params.getInteger("type");
|
||||
// Date demandDate = params.getDate("demandDate");
|
||||
// orderDaoService.postOrder();
|
||||
public AjaxResult postOrder(@RequestBody JSONObject params) {
|
||||
orderDaoService.insertOrder(params.getLong("staffId"), params.getInteger("orderType"), params.getDate("demandDate"));
|
||||
|
||||
return AjaxResult.success("调用提交订单成功");
|
||||
}
|
||||
@ -81,19 +92,20 @@ public class ClientController extends BaseController {
|
||||
return AjaxResult.success(staffDemandDaoService.getConfiguration(staffId));
|
||||
}
|
||||
|
||||
// 获取配置信息
|
||||
// 推送配置信息
|
||||
@PostMapping("/postConfiguration/{staffId}")
|
||||
public AjaxResult postConfiguration(@PathVariable("staffId") Long staffId) {
|
||||
|
||||
return AjaxResult.success("推送个人配置");
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置订餐模式
|
||||
* 日期:2020年12月10日
|
||||
* 作者: 陈智兴
|
||||
* 修改:首次创建
|
||||
* @param {
|
||||
* tel: 手机号码;
|
||||
*
|
||||
* @param { tel: 手机号码;
|
||||
* password: 密码
|
||||
* }
|
||||
* @return 返回员工信息
|
||||
@ -133,8 +145,18 @@ public class ClientController extends BaseController {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送停餐信息
|
||||
* 日期:2020年12月11日
|
||||
* 作者:陈智兴
|
||||
*
|
||||
* @param staffId: 员工id
|
||||
* type:订餐类型
|
||||
* demandDate: 订餐用餐日期
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/postStopOrder")
|
||||
public AjaxResult postStopOrder() {
|
||||
public AjaxResult postStopOrder(@RequestBody JSONObject params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -148,8 +170,8 @@ public class ClientController extends BaseController {
|
||||
* 日期:2020年12月11日
|
||||
* 作者: 陈智兴
|
||||
* 修改:首次创建
|
||||
* @param {
|
||||
* config_id: id;
|
||||
*
|
||||
* @param { config_id: id;
|
||||
* demandMode: true:自动模式;false:手动模式
|
||||
* }
|
||||
* @return
|
||||
|
@ -40,7 +40,7 @@ public class FtOrderDaoController extends BaseController {
|
||||
public TableDataInfo list(FtOrderDao ftOrderDao) {
|
||||
startPage();
|
||||
LambdaQueryWrapper<FtOrderDao> lqw = Wrappers.lambdaQuery(ftOrderDao);
|
||||
if (StringUtils.isNotBlank(ftOrderDao.getOrderType())) {
|
||||
if (StringUtils.isNotBlank(ftOrderDao.getOrderType().toString())) {
|
||||
lqw.eq(FtOrderDao::getOrderType, ftOrderDao.getOrderType());
|
||||
}
|
||||
if (ftOrderDao.getTotalPrice() != null) {
|
||||
|
@ -41,7 +41,7 @@ public class FtOrderDao implements Serializable {
|
||||
* 订单类型
|
||||
*/
|
||||
@Excel(name = "订单类型")
|
||||
private String orderType;
|
||||
private Integer orderType;
|
||||
|
||||
/**
|
||||
* 员工 id
|
||||
@ -134,4 +134,7 @@ public class FtOrderDao implements Serializable {
|
||||
* 核销设备 id
|
||||
*/
|
||||
private Long deviceId;
|
||||
|
||||
// 订用餐日期
|
||||
private Date orderDate;
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.fantang.domain.FtOrderDao;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单管理Service接口
|
||||
*
|
||||
@ -13,4 +15,6 @@ import com.ruoyi.system.fantang.domain.FtOrderDao;
|
||||
public interface IFtOrderDaoService extends IService<FtOrderDao> {
|
||||
|
||||
AjaxResult getOrderOfToday(Long staffId);
|
||||
|
||||
Integer insertOrder(Long staffId, Integer orderType, Date demandDate);
|
||||
}
|
||||
|
@ -34,4 +34,13 @@ public class FtOrderDaoServiceImpl extends ServiceImpl<FtOrderDaoMapper, FtOrder
|
||||
wrapper.between("order_date", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()));
|
||||
return AjaxResult.success(this.baseMapper.selectList(wrapper));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer insertOrder(Long staffId, Integer orderType, Date demandDate) {
|
||||
FtOrderDao dao = new FtOrderDao();
|
||||
dao.setStaffId(staffId);
|
||||
dao.setOrderType(orderType);
|
||||
dao.setOrderDate(demandDate);
|
||||
return this.baseMapper.insert(dao);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user