From c9c66c61dd046aa3b59146143b0a1eea0597696e Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Sat, 11 Nov 2023 13:54:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=93=B6=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fuyou/service/impl/FyPayServiceImpl.java | 17 +- .../controller/CashierOrderController.java | 39 +++ .../order/controller/LJOrderController.java | 16 ++ .../order/controller/OilOrderController.java | 12 + .../business/order/entity/CashierOrder.java | 94 +++++--- .../order/mapper/CashierOrderMapper.java | 17 ++ .../order/mapper/xml/CashierOrderMapper.xml | 27 +++ .../order/mapper/xml/OilOrderMapper.xml | 1 + .../order/service/CashierOrderService.java | 40 +++ .../order/service/LJOrderService.java | 7 + .../order/service/OilOrderService.java | 8 + .../service/impl/CashierOrderServiceImpl.java | 44 ++++ .../service/impl/LJOrderServiceImpl.java | 6 + .../service/impl/OilOrderServiceImpl.java | 28 +++ .../fuint/business/order/vo/OilOrderVo.java | 25 ++ .../src/api/cashier/cashierorder.js | 10 + fuintCashierWeb/src/api/cashier/goodsorder.js | 11 +- fuintCashierWeb/src/api/cashier/oilorder.js | 9 + .../src/api/cashier/user/certifiedmember.js | 61 ----- .../src/api/cashier/user/chainstoreconfig.js | 19 -- .../src/api/cashier/user/fixinglevel.js | 53 ---- .../src/api/cashier/user/usergrade.js | 53 ---- .../cashier/orderComponents/order_Cashier.vue | 227 ++++++++++++------ 23 files changed, 528 insertions(+), 296 deletions(-) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/CashierOrderController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/CashierOrderMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/CashierOrderMapper.xml create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/CashierOrderService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/CashierOrderServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/order/vo/OilOrderVo.java create mode 100644 fuintCashierWeb/src/api/cashier/cashierorder.js delete mode 100644 fuintCashierWeb/src/api/cashier/user/certifiedmember.js delete mode 100644 fuintCashierWeb/src/api/cashier/user/chainstoreconfig.js delete mode 100644 fuintCashierWeb/src/api/cashier/user/fixinglevel.js delete mode 100644 fuintCashierWeb/src/api/cashier/user/usergrade.js diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java index b99f2dbfa..10f250c96 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java @@ -7,15 +7,16 @@ import com.fuint.api.fuyou.entity.Const; import com.fuint.api.fuyou.entity.Message; import com.fuint.api.fuyou.service.FyPayService; import com.fuint.api.fuyou.util.Utils; +import com.fuint.business.order.entity.CashierOrder; import com.fuint.business.order.entity.LJOrder; import com.fuint.business.order.entity.OilOrder; +import com.fuint.business.order.service.CashierOrderService; import com.fuint.business.order.service.LJOrderService; import com.fuint.business.order.service.OilOrderService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.text.SimpleDateFormat; import java.util.*; @Service @@ -25,6 +26,8 @@ public class FyPayServiceImpl implements FyPayService { private LJOrderService goodsOrderService; @Autowired private OilOrderService oilOrderService; + @Autowired + private CashierOrderService cashierOrderService; /** * 条码支付 @@ -112,9 +115,8 @@ public class FyPayServiceImpl implements FyPayService { if (Utils.verifySign(reqMap, str)){ OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(orderNo); LJOrder goodsOrder = goodsOrderService.selectGoodsOrder(orderNo); + CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo); Date date = new Date(); -// SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss"); -// dateFormat.format(date); if (reqMap.get("trans_stat").equals("SUCCESS")){ if (!ObjectUtil.isEmpty(oilOrder)){ oilOrder.setOrderStatus("paid"); @@ -123,6 +125,9 @@ public class FyPayServiceImpl implements FyPayService { if (!ObjectUtil.isEmpty(goodsOrder)){ goodsOrder.setStatus("paid"); } + if (!ObjectUtil.isEmpty(cashierOrder)){ + cashierOrder.setStatus("paid"); + } resMap.put("msg","success"); }else if (reqMap.get("trans_stat").equals("USERPAYING")){ resMap.put("msg","unpaid"); @@ -133,6 +138,9 @@ public class FyPayServiceImpl implements FyPayService { if (!ObjectUtil.isEmpty(goodsOrder)){ goodsOrder.setStatus("payFail"); } + if (!ObjectUtil.isEmpty(cashierOrder)){ + cashierOrder.setStatus("payFail"); + } } if (!ObjectUtil.isEmpty(oilOrder)){ oilOrderService.updateOilOrder(oilOrder); @@ -140,6 +148,9 @@ public class FyPayServiceImpl implements FyPayService { if (!ObjectUtil.isEmpty(goodsOrder)){ goodsOrderService.updateGoodOrder(goodsOrder); } + if (!ObjectUtil.isEmpty(cashierOrder)){ + cashierOrderService.updateCashierOrder(cashierOrder); + } } }catch (Exception e){ log.error(e.getMessage()); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/CashierOrderController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/CashierOrderController.java new file mode 100644 index 000000000..16e019dd7 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/CashierOrderController.java @@ -0,0 +1,39 @@ +package com.fuint.business.order.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.order.entity.CashierOrder; +import com.fuint.business.order.service.CashierOrderService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * 收银员订单信息 controller层 + */ +@RestController +@RequestMapping("/business/cashierOrder") +public class CashierOrderController extends BaseController { + @Autowired + private CashierOrderService cashierOrderService; + + /** + * 根据条件分页查询收银员订单信息 + * @param order + * @param pageNo + * @param pageSize + * @return + */ + @GetMapping("/list") + public ResponseObject list(CashierOrder order, + @RequestParam(value = "page",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){ + Page page =new Page(pageNo,pageSize); + IPage list = cashierOrderService.selectCashierOrderList(page,order); + return getSuccessResult(list); + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/LJOrderController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/LJOrderController.java index 061dfcf80..1dc5cf0cf 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/LJOrderController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/LJOrderController.java @@ -48,4 +48,20 @@ public class LJOrderController extends BaseController { LJOrder ljOrder = orderService.selectGoodsOrder(orderNo); return getSuccessResult(ljOrder); } + + /** + * 根据订单号查询订单信息 + * @param map + * @return + */ + @PostMapping("/id") + public ResponseObject goodsOrderInfo(@Validated @RequestBody Map map){ + String id = map.get("id"); + LJOrder ljOrder = null; + if (id != null && !id.equals("")){ + Integer orderId = Integer.valueOf(id); + ljOrder = orderService.selectGoodsOrderById(orderId); + } + return getSuccessResult(ljOrder); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java index e82553e32..8c57884cd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java @@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; import java.util.Map; @RestController @@ -57,4 +58,15 @@ public class OilOrderController extends BaseController { OilOrder order = orderService.selectOilOrderByOrderNo(orderNo); return getSuccessResult(order); } + /** + * 根据订单号模糊查询订单信息 + * @param map + * @return + */ + @PostMapping("/orderNos") + public ResponseObject oilOrders(@Validated @RequestBody Map map){ + String orderNo = map.get("orderNo"); + List list = orderService.selectOilOrder(orderNo); + return getSuccessResult(list); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/CashierOrder.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/CashierOrder.java index 2b6bd9e1c..e84e7fedd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/CashierOrder.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/CashierOrder.java @@ -1,43 +1,71 @@ package com.fuint.business.order.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fuint.framework.entity.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; +import java.io.Serializable; +/** + * 收银台订单表(CashierOrder)实体类 + */ @Data -public class CashierOrder { -// 油品id - private Integer oilId; -// 商品id - private Integer goodId; -// 订单号 - private String orderNo; -// 油品实付金额 - private Double oilPayAmount; -// 商品实付金额 - private Double goodsPayAmount; -// 油品订单金额 - private Double oilOrderAmount; -// 商品订单金额 - private Double goodsOrderAmount; -// 油品优惠金额 - private Double oilDiscountAmount; -// 商品优惠金额 - private Double goodsDiscountAmount; -// 付款用户 +@TableName("cashier_order") +@ApiModel(value = "CashierOrder对象", description = "收银台订单表") +public class CashierOrder extends BaseEntity implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 主键 + */ + @ApiModelProperty("自增ID") + @TableId(value = "ID", type = IdType.AUTO) + private Integer id; + /** + * 员工id + */ + private Integer staffId; + /** + * 店铺id + */ + private Integer storeId; + /** + * 油品订单id + */ + private Integer oilOrderId; + /** + * 商品订单id + */ + private Integer goodsOrderId; + /** + * 付款用户 + */ private String payUser; -// 付款类型 - private String payType; -// 支付时间 + /** + * 订单号 + */ + private String orderNo; + /** + * 订单金额 + */ + private Double amount; + /** + * 实付金额 + */ + private Double payAmount; + /** + * 订单状态:已支付、未支付、支付失败 + */ + private String status; + /** + * 支付时间 + */ private Date payTime; -// 油品金额 - private Double orderAmount; -// 油号 - private String oils; -// 油枪号 - private Integer oilGunNum; -// 油品数量 - private Double oilNum; -// 油品单价 - private Double oilPrice; + } + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/CashierOrderMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/CashierOrderMapper.java new file mode 100644 index 000000000..fcb702522 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/CashierOrderMapper.java @@ -0,0 +1,17 @@ +package com.fuint.business.order.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.order.entity.CashierOrder; +import org.apache.ibatis.annotations.Param; + +public interface CashierOrderMapper extends BaseMapper { + /** + * 根据条件分页查询订单信息 + * @param page + * @param order + * @return + */ + public IPage selectCashierOrderList(Page page, @Param("order") CashierOrder order); +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/CashierOrderMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/CashierOrderMapper.xml new file mode 100644 index 000000000..c30fbc536 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/CashierOrderMapper.xml @@ -0,0 +1,27 @@ + + + + + select * from cashier_order + + + + + \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml index 9519913e3..a7e054451 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml @@ -35,4 +35,5 @@ + \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/CashierOrderService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/CashierOrderService.java new file mode 100644 index 000000000..70c37d066 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/CashierOrderService.java @@ -0,0 +1,40 @@ +package com.fuint.business.order.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.order.entity.CashierOrder; + +/** + * 收银员订单信息 业务层 + */ +public interface CashierOrderService extends IService { + /** + * 根据条件分页查询订单信息 + * @param page + * @param order + * @return + */ + public IPage selectCashierOrderList(Page page, CashierOrder order); + + /** + * 根据订单号查询商品订单信息 + * @param orderNo + * @return + */ + public CashierOrder selectCashierOrder(String orderNo); + + /** + * 添加商品订单信息 + * @param order + * @return + */ + public int insertCashierOrder(CashierOrder order); + + /** + * 修改商品订单信息 + * @param order + * @return + */ + public int updateCashierOrder(CashierOrder order); +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/LJOrderService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/LJOrderService.java index 75a06b4a6..26f04aca4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/LJOrderService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/LJOrderService.java @@ -24,6 +24,13 @@ public interface LJOrderService extends IService { */ public LJOrder selectGoodsOrder(String orderNo); + /** + * 根据订单号查询商品订单信息 + * @param id + * @return + */ + public LJOrder selectGoodsOrderById(Integer id); + /** * 添加商品订单信息 * @param order diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java index aaa4e91ff..e306481e0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.fuint.business.order.entity.OilOrder; +import java.util.List; import java.util.Map; /** @@ -26,6 +27,13 @@ public interface OilOrderService extends IService { */ public OilOrder selectOilOrderByOrderNo(String orderNo); + /** + * 根据订单号模糊查询商品订单信息 + * @param orderNo + * @return + */ + public List selectOilOrder(String orderNo); + /** * 添加油品订单信息 * @param map diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/CashierOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/CashierOrderServiceImpl.java new file mode 100644 index 000000000..f54a5c7ec --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/CashierOrderServiceImpl.java @@ -0,0 +1,44 @@ +package com.fuint.business.order.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.order.entity.CashierOrder; +import com.fuint.business.order.mapper.CashierOrderMapper; +import com.fuint.business.order.service.CashierOrderService; +import com.fuint.common.dto.AccountInfo; +import com.fuint.common.util.TokenUtil; +import org.springframework.stereotype.Service; + +@Service +public class CashierOrderServiceImpl extends ServiceImpl implements CashierOrderService { + @Override + public IPage selectCashierOrderList(Page page, CashierOrder order) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + Integer storeId = nowAccountInfo.getStoreId(); + order.setStoreId(storeId); + IPage cashierOrderIPage = baseMapper.selectCashierOrderList(page, order); + return cashierOrderIPage; + } + + @Override + public CashierOrder selectCashierOrder(String orderNo) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("order_no",orderNo); + CashierOrder cashierOrder = baseMapper.selectOne(queryWrapper); + return cashierOrder; + } + + @Override + public int insertCashierOrder(CashierOrder order) { + int row = baseMapper.insert(order); + return row; + } + + @Override + public int updateCashierOrder(CashierOrder order) { + int row = baseMapper.updateById(order); + return row; + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/LJOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/LJOrderServiceImpl.java index 8eab34999..ec8ba2200 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/LJOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/LJOrderServiceImpl.java @@ -30,6 +30,12 @@ public class LJOrderServiceImpl extends ServiceImpl impl return ljOrder; } + @Override + public LJOrder selectGoodsOrderById(Integer id) { + LJOrder ljOrder = baseMapper.selectById(id); + return ljOrder; + } + @Override public int insertGoodOrder(LJOrder order) { int row = baseMapper.insert(order); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index 2498477d2..f16fb39f7 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -10,10 +10,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fuint.api.fuyou.entity.MerchantConfig; import com.fuint.api.fuyou.service.FyPayService; import com.fuint.api.fuyou.service.MerchantConfigService; +import com.fuint.business.order.entity.CashierOrder; import com.fuint.business.order.entity.LJOrder; import com.fuint.business.order.entity.OilOrder; import com.fuint.business.order.entity.OrderGoods; import com.fuint.business.order.mapper.OilOrderMapper; +import com.fuint.business.order.service.CashierOrderService; import com.fuint.business.order.service.LJOrderService; import com.fuint.business.order.service.OilOrderService; import com.fuint.business.order.service.OrderGoodsService; @@ -39,6 +41,8 @@ public class OilOrderServiceImpl extends ServiceImpl i private MerchantConfigService merchantConfigService; @Autowired private UserBalanceService userBalanceService; + @Autowired + private CashierOrderService cashierOrderService; @Override public IPage selectOilOrderList(Page page, OilOrder order) { @@ -57,6 +61,14 @@ public class OilOrderServiceImpl extends ServiceImpl i return order; } + @Override + public List selectOilOrder(String orderNo) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.like("order_no",orderNo+"%"); + List list = baseMapper.selectList(queryWrapper); + return list; + } + @Override public Map insertOilOrder(Map map) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); @@ -131,6 +143,19 @@ public class OilOrderServiceImpl extends ServiceImpl i String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6); String orderNo = timestamp+randomString; +// 添加收银台订单信息 + CashierOrder cashierOrder = new CashierOrder(); + cashierOrder.setStaffId(staffId); + cashierOrder.setStoreId(storeId); + cashierOrder.setPayUser(payUser); + cashierOrder.setAmount(oilAmount+goodsAmount); + cashierOrder.setPayAmount(oilActualPay+goodsActualPay); + cashierOrder.setStatus(payStatus); + if (payType.equals("CASH")){ + cashierOrder.setPayTime(new Date()); + } + cashierOrder.setOrderNo(orderNo); + OilOrder oilOrder1 = null; LJOrder ljOrder1 = null; // 添加油品订单信息 @@ -244,10 +269,13 @@ public class OilOrderServiceImpl extends ServiceImpl i LJOrder goodsOrder1 = orderService.selectGoodsOrder(orderNo); if (!ObjectUtil.isEmpty(oilOrder2)){ orders.put("oilOrder",oilOrder2); + cashierOrder.setOilOrderId(oilOrder2.getId()); } if (!ObjectUtil.isEmpty(goodsOrder1)){ orders.put("goodsOrder",goodsOrder1); + cashierOrder.setGoodsOrderId(goodsOrder1.getId()); } + cashierOrderService.insertCashierOrder(cashierOrder); return orders; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/vo/OilOrderVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/vo/OilOrderVo.java new file mode 100644 index 000000000..bfdb0a7f6 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/vo/OilOrderVo.java @@ -0,0 +1,25 @@ +package com.fuint.business.order.vo; + +import lombok.Data; + +@Data +public class OilOrderVo { +// 油品id + private Integer id; +// 油品订单金额 + private Double orderAmount; +// 油号 + private String oils; +// 油枪 + private Integer oilGunNum; +// 加油数量 + private Double oilNum; +// 油品单价 + private Double oilPrice; +// 员工id + private Integer staffId; +// 员工姓名 + private String name; +// 员工账号 + private String mobile; +} diff --git a/fuintCashierWeb/src/api/cashier/cashierorder.js b/fuintCashierWeb/src/api/cashier/cashierorder.js new file mode 100644 index 000000000..7cd2ebdd9 --- /dev/null +++ b/fuintCashierWeb/src/api/cashier/cashierorder.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询油品订单列表 +export function listCashierOrder(query) { + return request({ + url: '/business/cashierOrder/list', + method: 'get', + params: query + }) +} diff --git a/fuintCashierWeb/src/api/cashier/goodsorder.js b/fuintCashierWeb/src/api/cashier/goodsorder.js index e357c7160..a0d29c48b 100644 --- a/fuintCashierWeb/src/api/cashier/goodsorder.js +++ b/fuintCashierWeb/src/api/cashier/goodsorder.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 查询商品列表 +// 查询商品订单列表 export function listOrder(query) { return request({ url: '/business/order/list', @@ -16,3 +16,12 @@ export function getOrderGoods(orderId) { method: 'get', }) } + +// 根据订单id查询商品订单信息 +export function getGoodsOrder(data) { + return request({ + url: '/business/order/id', + method: 'post', + data: data, + }) +} diff --git a/fuintCashierWeb/src/api/cashier/oilorder.js b/fuintCashierWeb/src/api/cashier/oilorder.js index fb540eb33..9656e19c0 100644 --- a/fuintCashierWeb/src/api/cashier/oilorder.js +++ b/fuintCashierWeb/src/api/cashier/oilorder.js @@ -35,3 +35,12 @@ export function goodsOrder(data) { data: data }) } + +// 根据订单号查询油品订单信息 +export function oilOrders(data) { + return request({ + url: '/business/oilOrder/orderNos', + method: 'post', + data: data + }) +} diff --git a/fuintCashierWeb/src/api/cashier/user/certifiedmember.js b/fuintCashierWeb/src/api/cashier/user/certifiedmember.js deleted file mode 100644 index f3b2c4ebb..000000000 --- a/fuintCashierWeb/src/api/cashier/user/certifiedmember.js +++ /dev/null @@ -1,61 +0,0 @@ -import request from '@/utils/request' - -// 查询固定等级列表 -export function listCertifiedMember(query) { - return request({ - url: '/business/userManager/certifiedMember/list', - method: 'get', - params: query - }) -} - -// 查询固定等级详细 -export function getCertifiedMember(id) { - return request({ - url: '/business/userManager/certifiedMember/' + id, - method: 'get' - }) -} - -// 根据会员id查询固定等级详细 -export function getCertifiedMemberByUserId(userId) { - return request({ - url: '/business/userManager/certifiedMember/userId/' + userId, - method: 'get' - }) -} - -// 新增固定等级 -export function addCertifiedMember(data) { - return request({ - url: '/business/userManager/certifiedMember', - method: 'post', - data: data - }) -} - -// 批量新增固定等级 -export function addCertifiedMembers(data) { - return request({ - url: '/business/userManager/certifiedMember/members', - method: 'post', - data: data - }) -} - -// 修改固定等级 -export function updateCertifiedMember(data) { - return request({ - url: '/business/userManager/certifiedMember', - method: 'put', - data: data - }) -} - -// 删除固定等级 -export function delCertifiedMember(id) { - return request({ - url: '/business/userManager/certifiedMember/' + id, - method: 'delete' - }) -} diff --git a/fuintCashierWeb/src/api/cashier/user/chainstoreconfig.js b/fuintCashierWeb/src/api/cashier/user/chainstoreconfig.js deleted file mode 100644 index a02c0bac4..000000000 --- a/fuintCashierWeb/src/api/cashier/user/chainstoreconfig.js +++ /dev/null @@ -1,19 +0,0 @@ -import request from '@/utils/request' - -// 查询会员详细 -export function getChainStoreConfig() { - return request({ - url: '/business/userManager/chainStoreConfig', - method: 'get' - }) -} - -// 修改会员 -export function updateChainStoreConfig(data) { - return request({ - url: '/business/userManager/chainStoreConfig', - method: 'put', - data: data - }) -} - diff --git a/fuintCashierWeb/src/api/cashier/user/fixinglevel.js b/fuintCashierWeb/src/api/cashier/user/fixinglevel.js deleted file mode 100644 index 19c710bdc..000000000 --- a/fuintCashierWeb/src/api/cashier/user/fixinglevel.js +++ /dev/null @@ -1,53 +0,0 @@ -import request from '@/utils/request' - -// 查询固定等级列表 -export function listFixingLevel(query) { - return request({ - url: '/business/userManager/fixingLevel/list', - method: 'get', - params: query - }) -} - -// 查询固定等级详细 -export function getFixingLevel(id) { - return request({ - url: '/business/userManager/fixingLevel/' + id, - method: 'get' - }) -} - -// 根据固定等级名称查询固定等级信息 -export function queryFixingLevel(data) { - return request({ - url: '/business/userManager/fixingLevel/getName', - method: 'post', - data: data - }) -} - -// 新增固定等级 -export function addFixingLevel(data) { - return request({ - url: '/business/userManager/fixingLevel', - method: 'post', - data: data - }) -} - -// 修改固定等级 -export function updateFixingLevel(data) { - return request({ - url: '/business/userManager/fixingLevel', - method: 'put', - data: data - }) -} - -// 删除固定等级 -export function delFixingLevel(id) { - return request({ - url: '/business/userManager/fixingLevel/' + id, - method: 'delete' - }) -} diff --git a/fuintCashierWeb/src/api/cashier/user/usergrade.js b/fuintCashierWeb/src/api/cashier/user/usergrade.js deleted file mode 100644 index 7eeae693a..000000000 --- a/fuintCashierWeb/src/api/cashier/user/usergrade.js +++ /dev/null @@ -1,53 +0,0 @@ -import request from '@/utils/request' - -// 查询会员等级列表 -export function listUserGrade(query) { - return request({ - url: '/business/userManager/userGrade/list', - method: 'get', - params: query - }) -} - -// 查询会员等级详细 -export function getUserGrade(id) { - return request({ - url: '/business/userManager/userGrade/' + id, - method: 'get' - }) -} - -// 根据会员等级名称查询会员等级信息 -export function queryUserGrade(data) { - return request({ - url: '/business/userManager/userGrade/getName', - method: 'post', - data: data - }) -} - -// 新增会员等级 -export function addUserGrade(data) { - return request({ - url: '/business/userManager/userGrade', - method: 'post', - data: data - }) -} - -// 修改会员等级 -export function updateUserGrade(data) { - return request({ - url: '/business/userManager/userGrade', - method: 'put', - data: data - }) -} - -// 删除会员等级 -export function delUserGrade(id) { - return request({ - url: '/business/userManager/userGrade/' + id, - method: 'delete' - }) -} diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue index dc38e7987..51735a99c 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue @@ -2,18 +2,51 @@ @@ -262,5 +344,4 @@ width: 20%; } -