diff --git a/fuintAdmin/src/api/integral/category.js b/fuintAdmin/src/api/integral/category.js index 14c469ec3..8ca089732 100644 --- a/fuintAdmin/src/api/integral/category.js +++ b/fuintAdmin/src/api/integral/category.js @@ -1,6 +1,6 @@ import request from "@/utils/request"; -// 查询油罐列表 +// 查询积分分类 export function getGiftCategoryApi(data) { return request({ url: 'business/integral/integralGiftCategory/queryByPage', diff --git a/fuintAdmin/src/api/integral/gift.js b/fuintAdmin/src/api/integral/gift.js index 14c469ec3..251cff955 100644 --- a/fuintAdmin/src/api/integral/gift.js +++ b/fuintAdmin/src/api/integral/gift.js @@ -1,25 +1,25 @@ import request from "@/utils/request"; // 查询油罐列表 -export function getGiftCategoryApi(data) { +export function getGiftApi(data) { return request({ - url: 'business/integral/integralGiftCategory/queryByPage', + url: 'business/integral/integralGift/queryByPage', method: 'get', params: data }) } // 新增有关信息 - export function insertGiftCategoryApi(data) { + export function insertGiftApi(data) { return request({ - url: 'business/integral/integralGiftCategory', + url: 'business/integral/integralGift', method: 'post', data: data }) } // 修改有关信息 - export function updateGiftCategoryApi(data) { + export function updateGiftApi(data) { return request({ - url: 'business/integral/integralGiftCategory', + url: 'business/integral/integralGift', method: 'put', data: data }) diff --git a/fuintAdmin/src/api/integral/giftForm.js b/fuintAdmin/src/api/integral/giftForm.js deleted file mode 100644 index 7715ab3d0..000000000 --- a/fuintAdmin/src/api/integral/giftForm.js +++ /dev/null @@ -1,8 +0,0 @@ -Vue.component('button-counter', { - data: function () { - return { - count: 0 - } - }, - template: '' -}) \ No newline at end of file diff --git a/fuintAdmin/src/views/integral/gift/index.vue b/fuintAdmin/src/views/integral/gift/index.vue index 0cc1c8e24..ddbe4594f 100644 --- a/fuintAdmin/src/views/integral/gift/index.vue +++ b/fuintAdmin/src/views/integral/gift/index.vue @@ -1,10 +1,10 @@ - + + + - - diff --git a/fuintAdmin/src/views/oilConfig/oilPurchase/list.vue b/fuintAdmin/src/views/oilConfig/oilPurchase/list.vue index fa9e5c31c..c4f5b0895 100644 --- a/fuintAdmin/src/views/oilConfig/oilPurchase/list.vue +++ b/fuintAdmin/src/views/oilConfig/oilPurchase/list.vue @@ -134,7 +134,6 @@ export default { data() { return { purchaseList: [], - suppliersList: [], // 弹出框标题 title:'', diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/controller/IntegralGiftController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/controller/IntegralGiftController.java index 5dab4cc8c..de71c07e2 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/controller/IntegralGiftController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/controller/IntegralGiftController.java @@ -19,7 +19,7 @@ import javax.annotation.Resource; * @since 2023-11-02 14:18:52 */ @RestController -@RequestMapping("integralGift") +@RequestMapping("business/integral/integralGift") public class IntegralGiftController extends BaseController { /** * 服务对象 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralGift.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralGift.java index e630ccd24..5ab37fdfd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralGift.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralGift.java @@ -1,5 +1,8 @@ package com.fuint.business.integral.entity; +import com.fuint.repository.model.base.BaseEntity; +import lombok.Data; + import java.util.Date; import java.io.Serializable; @@ -9,7 +12,8 @@ import java.io.Serializable; * @author makejava * @since 2023-11-02 14:18:52 */ -public class IntegralGift implements Serializable { +@Data +public class IntegralGift extends BaseEntity { private static final long serialVersionUID = -94300211865653814L; /** * 礼品ID @@ -115,263 +119,6 @@ public class IntegralGift implements Serializable { * 店铺ID */ private Integer storeId; - /** - * 创建时间 - */ - private Date createTime; - /** - * 更新时间 - */ - private Date updateTime; - /** - * 创建人 - */ - private Integer createBy; - /** - * 更新人 - */ - private Integer updateBy; - - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public Integer getCategoryId() { - return categoryId; - } - - public void setCategoryId(Integer categoryId) { - this.categoryId = categoryId; - } - - public String getCoverImage() { - return coverImage; - } - - public void setCoverImage(String coverImage) { - this.coverImage = coverImage; - } - - public String getGiftImages() { - return giftImages; - } - - public void setGiftImages(String giftImages) { - this.giftImages = giftImages; - } - - public String getGiftType() { - return giftType; - } - - public void setGiftType(String giftType) { - this.giftType = giftType; - } - - public Integer getCouponId() { - return couponId; - } - - public void setCouponId(Integer couponId) { - this.couponId = couponId; - } - - public Integer getVoucherId() { - return voucherId; - } - - public void setVoucherId(Integer voucherId) { - this.voucherId = voucherId; - } - - public Integer getGoodsId() { - return goodsId; - } - - public void setGoodsId(Integer goodsId) { - this.goodsId = goodsId; - } - - public Integer getGiftQuantity() { - return giftQuantity; - } - - public void setGiftQuantity(Integer giftQuantity) { - this.giftQuantity = giftQuantity; - } - - public Integer getTotalInventory() { - return totalInventory; - } - - public void setTotalInventory(Integer totalInventory) { - this.totalInventory = totalInventory; - } - - public Integer getRemainingInventory() { - return remainingInventory; - } - - public void setRemainingInventory(Integer remainingInventory) { - this.remainingInventory = remainingInventory; - } - - public Integer getMerchantCouponId() { - return merchantCouponId; - } - - public void setMerchantCouponId(Integer merchantCouponId) { - this.merchantCouponId = merchantCouponId; - } - - public String getExchangeMethod() { - return exchangeMethod; - } - - public void setExchangeMethod(String exchangeMethod) { - this.exchangeMethod = exchangeMethod; - } - - public Integer getExchangePoints() { - return exchangePoints; - } - - public void setExchangePoints(Integer exchangePoints) { - this.exchangePoints = exchangePoints; - } - - public Double getMoneyRatio() { - return moneyRatio; - } - - public void setMoneyRatio(Double moneyRatio) { - this.moneyRatio = moneyRatio; - } - - public Double getExchangeAmount() { - return exchangeAmount; - } - - public void setExchangeAmount(Double exchangeAmount) { - this.exchangeAmount = exchangeAmount; - } - - public Double getExchangeFuelAmount() { - return exchangeFuelAmount; - } - - public void setExchangeFuelAmount(Double exchangeFuelAmount) { - this.exchangeFuelAmount = exchangeFuelAmount; - } - - public String getDeliveryMethod() { - return deliveryMethod; - } - - public void setDeliveryMethod(String deliveryMethod) { - this.deliveryMethod = deliveryMethod; - } - - public Double getExpressShippingFee() { - return expressShippingFee; - } - - public void setExpressShippingFee(Double expressShippingFee) { - this.expressShippingFee = expressShippingFee; - } - - public Double getShippingFeeAmount() { - return shippingFeeAmount; - } - - public void setShippingFeeAmount(Double shippingFeeAmount) { - this.shippingFeeAmount = shippingFeeAmount; - } - - public Integer getExchangeTimes() { - return exchangeTimes; - } - - public void setExchangeTimes(Integer exchangeTimes) { - this.exchangeTimes = exchangeTimes; - } - - public Integer getSort() { - return sort; - } - - public void setSort(Integer sort) { - this.sort = sort; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getDetailedDescription() { - return detailedDescription; - } - - public void setDetailedDescription(String detailedDescription) { - this.detailedDescription = detailedDescription; - } - - public Integer getStoreId() { - return storeId; - } - - public void setStoreId(Integer storeId) { - this.storeId = storeId; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - public Integer getCreateBy() { - return createBy; - } - - public void setCreateBy(Integer createBy) { - this.createBy = createBy; - } - - public Integer getUpdateBy() { - return updateBy; - } - - public void setUpdateBy(Integer updateBy) { - this.updateBy = updateBy; - } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralGiftMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralGiftMapper.xml index 7809df371..c85909df4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralGiftMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralGiftMapper.xml @@ -2,7 +2,7 @@ - + @@ -33,6 +33,10 @@ + + + + @@ -50,98 +54,87 @@ @@ -247,7 +240,7 @@ insert into integral_gift(gift_name, category_id, cover_image, gift_images, gift_type, coupon_id, voucher_id, goods_id, gift_quantity, total_inventory, remaining_inventory, merchant_coupon_id, exchange_method, exchange_points, money_ratio, exchange_amount, exchange_fuel_amount, delivery_method, express_shipping_fee, shipping_fee_amount, exchange_times, sort, status, detailed_description, store_id, create_time, update_time, create_by, update_by) - values (#{giftName}, #{categoryId}, #{coverImage}, #{giftImages}, #{giftType}, #{couponId}, #{voucherId}, #{goodsId}, #{giftQuantity}, #{totalInventory}, #{remainingInventory}, #{merchantCouponId}, #{exchangeMethod}, #{exchangePoints}, #{moneyRatio}, #{exchangeAmount}, #{exchangeFuelAmount}, #{deliveryMethod}, #{expressShippingFee}, #{shippingFeeAmount}, #{exchangeTimes}, #{sort}, #{status}, #{detailedDescription}, #{storeId}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy}) + values (#{giftName}, #{categoryId}, #{coverImage}, #{giftImages}, #{giftType}, #{couponId}, #{voucherId}, #{goodsId}, #{giftQuantity}, #{totalInventory}, #{remainingInventory}, #{merchantCouponId}, #{exchangeMethod}, #{exchangePoints}, #{moneyRatio}, #{exchangeAmount}, #{exchangeFuelAmount}, #{deliveryMethod}, #{expressShippingFee}, #{shippingFeeAmount}, #{exchangeTimes}, #{sort}, #{status}, #{detailedDescription}, #{storeId}, #{createTime}, #{createTime}, #{createBy}, #{updateBy}) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java index a4d821bf0..a1ece0715 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java @@ -60,6 +60,9 @@ public class IntegralGiftServiceImpl implements IntegralGiftService { */ @Override public IntegralGift insert(IntegralGift integralGift) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + integralGift.setStoreId(nowAccountInfo.getStoreId()); + integralGift.setCreateBy(nowAccountInfo.getStaffId().toString()); this.integralGiftDao.insert(integralGift); return integralGift; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/vo/IntegralGiftVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/vo/IntegralGiftVO.java index 5126cdcc8..eb05d6430 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/vo/IntegralGiftVO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/vo/IntegralGiftVO.java @@ -5,6 +5,8 @@ import lombok.Data; @Data public class IntegralGiftVO extends IntegralGift { + // 分类名称 + private String categoryName; // 商品 // 优惠卷 } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNameController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNameController.java index 7def17533..241c39128 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNameController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNameController.java @@ -37,6 +37,12 @@ public class OilNameController extends BaseController { public ResponseObject selectAll (OilName oilName) { return getSuccessResult(oilNameService.oilNameListByType(oilName)); } + + @GetMapping("/{id}") + public ResponseObject oilNameInfo(@PathVariable Integer id){ + return getSuccessResult(oilNameService.selectOilNameById(id)); + } + // /** // * 分页查询所有数据 // */ @@ -113,5 +119,15 @@ public class OilNameController extends BaseController { } + /** + * 分组查询所有的油类名称 + */ + + @GetMapping("/queryOilName") + public ResponseObject getAllOilNameGroup() { + return getSuccessResult(oilNameService.getAllOilNameGroup()); + } + + } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNameMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNameMapper.java index 81e033ee8..d3034011c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNameMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNameMapper.java @@ -3,6 +3,7 @@ package com.fuint.business.petrolStationManagement.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fuint.business.petrolStationManagement.entity.OilName; import com.fuint.business.petrolStationManagement.entity.OilNumber; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -13,4 +14,7 @@ public interface OilNameMapper extends BaseMapper { public List getAllOilName(); + public List getAllOilNameGroup(); + + public OilName selectOilNameById(@Param("id") int id); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNameMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNameMapper.xml index a8f8b5f53..637f4baee 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNameMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNameMapper.xml @@ -18,7 +18,14 @@ FROM oil_name NA - + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNameService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNameService.java index 37562ea9e..7b8b6892b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNameService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNameService.java @@ -23,6 +23,14 @@ public interface OilNameService extends IService { public List getAllOilName(); + public List getAllOilNameGroup(); + + /** + * 根据id查询油号信息 + * @param id + * @return + */ + public OilName selectOilNameById(int id); // /** // * 根据条件分页查询员工信息 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNameServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNameServiceImpl.java index ecf03847a..b8d23f96d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNameServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNameServiceImpl.java @@ -33,6 +33,17 @@ public class OilNameServiceImpl extends ServiceImpl impl return baseMapper.getAllOilName(); } + @Override + public List getAllOilNameGroup() { + return baseMapper.getAllOilNameGroup(); + } + + @Override + public OilName selectOilNameById(int id) { + OilName oilName = baseMapper.selectOilNameById(id); + return oilName; + } + // @Override // public IPage selectOilNumberList(Page page, OilNumber oilNumber) { diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java index e3a9fcd1c..be6f3e9a7 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java @@ -75,6 +75,18 @@ public class LJUserController extends BaseController { return getSuccessResult(user); } + /** + * 根据手机号查询会员信息 + * @param map + * @return + */ + @PostMapping("/getMobile") + public ResponseObject userVoByMobile(@Validated @RequestBody Map map){ + String mobile = map.get("mobile"); + LJUserVo userVo = userService.queryUserByMobile(mobile); + return getSuccessResult(userVo); + } + /** * 批量删除会员信息 * @return diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/LJUserMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/LJUserMapper.java index 782233051..b7f748c1b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/LJUserMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/LJUserMapper.java @@ -19,5 +19,18 @@ public interface LJUserMapper extends BaseMapper { */ public IPage selectUserList(Page page, @Param("user") LJUserVo user); + /** + * 根据手机号查询用户信息 + * @param mobile + * @return + */ + public LJUserVo selectUserByMobile(@Param("mobile") String mobile); + + /** + * 统计信息 + * @param storeId + * @param sumValue + * @return + */ public Double selectSumByStore(@Param("storeId") int storeId,@Param("sumValue") String sumValue); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml index 2a8b1a64d..ae9b52a50 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml @@ -39,7 +39,16 @@ + + + \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java index e89729f1f..938fb6f54 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java @@ -40,6 +40,13 @@ public interface LJUserService extends IService { */ public LJUser selectUserByMobile(String mobile); + /** + * 根据手机号查询会员信息 + * @param mobile + * @return + */ + public LJUserVo queryUserByMobile(String mobile); + /** * 根据id删除会员信息 * @param id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java index 9d940019e..f250cd91e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java @@ -98,6 +98,17 @@ public class LJUserServiceImpl extends ServiceImpl impleme return baseMapper.selectOne(queryWrapper); } + /** + * 根据手机号查询会员信息 + * @param mobile + * @return + */ + @Override + public LJUserVo queryUserByMobile(String mobile) { + LJUserVo userVo = baseMapper.selectUserByMobile(mobile); + return userVo; + } + /** * 根据id删除会员信息 * @param id diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/coltroller/OilNumGunConfigController.java b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/coltroller/OilNumGunConfigController.java index ca971b155..8a719de2c 100644 --- a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/coltroller/OilNumGunConfigController.java +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/coltroller/OilNumGunConfigController.java @@ -1,18 +1,14 @@ package com.fuint.api.cashier.coltroller; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.fuint.api.cashier.entity.OilNumGunConfig; import com.fuint.api.cashier.service.OilNumGunConfigService; +import com.fuint.api.cashier.vo.OilNumGunConfigVo; 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.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; +import java.util.Map; /** * 油号油枪对应信息 controller层 @@ -29,18 +25,30 @@ public class OilNumGunConfigController extends BaseController { */ @GetMapping("/list") public ResponseObject list(){ - List list = configService.selectList(); + List list = configService.selectList(); return getSuccessResult(list); } /** * 根据油号查询油号油枪对应信息 - * @param oilNum + * @param map * @return */ - @GetMapping("/{oilNum}") - public ResponseObject getOilGun(@PathVariable String oilNum){ - List list = configService.selectListByOilNum(oilNum); + @PostMapping("/oilNum") + public ResponseObject getOilGun(@RequestBody Map map){ + String oilNum = map.get("oilNum"); + List list = configService.selectListByOilNum(oilNum); return getSuccessResult(list); } + + /** + * 根据id查询油号油枪配置信息 + * @param id + * @return + */ + @GetMapping("/{id}") + public ResponseObject oilNumGunInfo(@PathVariable Integer id){ + OilNumGunConfigVo oilNumGunConfigVo = configService.selectOilNumGunById(id); + return getSuccessResult(oilNumGunConfigVo); + } } diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/entity/OilNumGunConfig.java b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/entity/OilNumGunConfig.java index bfc697347..9e149daca 100644 --- a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/entity/OilNumGunConfig.java +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/entity/OilNumGunConfig.java @@ -26,14 +26,14 @@ public class OilNumGunConfig extends BaseEntity implements Serializable { @ApiModelProperty("自增ID") @TableId(value = "ID", type = IdType.AUTO) private Integer id; - /** - * 油号 - */ - private String oilNum; /** * 油枪号 */ private String oilGunNum; + /** + * 油号id + */ + private Integer numberId; } diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/mapper/OilNumGunConfigMapper.java b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/mapper/OilNumGunConfigMapper.java index a68bda6e8..5fca164e8 100644 --- a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/mapper/OilNumGunConfigMapper.java +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/mapper/OilNumGunConfigMapper.java @@ -2,6 +2,29 @@ package com.fuint.api.cashier.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fuint.api.cashier.entity.OilNumGunConfig; +import com.fuint.api.cashier.vo.OilNumGunConfigVo; +import org.apache.ibatis.annotations.Param; + +import java.util.List; public interface OilNumGunConfigMapper extends BaseMapper { + /** + * 查询油号油枪信息 + * @return + */ + public List selectOilNumGunList(); + + /** + * 根据油号查询油枪信息 + * @param numberId + * @return + */ + public List selectListByOilNum(@Param("numberId") String numberId); + + /** + * 根据id查询油号油枪配置信息 + * @param id + * @return + */ + public OilNumGunConfigVo selectOilNumGunById(@Param("id") int id); } diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/mapper/xml/OilNumGunConfigMapper.xml b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/mapper/xml/OilNumGunConfigMapper.xml new file mode 100644 index 000000000..00d3885aa --- /dev/null +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/mapper/xml/OilNumGunConfigMapper.xml @@ -0,0 +1,29 @@ + + + + + select ong.*,onm.oil_name,onm.oil_price from oil_num_gun_config ong + inner join oil_number onm on ong.number_id = onm.number_id + + + + + + + + \ No newline at end of file diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/service/OilNumGunConfigService.java b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/service/OilNumGunConfigService.java index 197aa989a..b112606e9 100644 --- a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/service/OilNumGunConfigService.java +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/service/OilNumGunConfigService.java @@ -2,6 +2,7 @@ package com.fuint.api.cashier.service; import com.baomidou.mybatisplus.extension.service.IService; import com.fuint.api.cashier.entity.OilNumGunConfig; +import com.fuint.api.cashier.vo.OilNumGunConfigVo; import java.util.List; @@ -13,12 +14,19 @@ public interface OilNumGunConfigService extends IService { * 查询所有油号油枪配置信息 * @return */ - public List selectList(); + public List selectList(); /** * 根据油号查询油枪信息 * @param oilNum * @return */ - public List selectListByOilNum(String oilNum); + public List selectListByOilNum(String oilNum); + + /** + * 根据id查询油号油枪配置信息 + * @param id + * @return + */ + public OilNumGunConfigVo selectOilNumGunById(int id); } diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/service/impl/OilNumGunConfigServiceImpl.java b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/service/impl/OilNumGunConfigServiceImpl.java index fb181dec5..10f9bf5ae 100644 --- a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/service/impl/OilNumGunConfigServiceImpl.java +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/service/impl/OilNumGunConfigServiceImpl.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fuint.api.cashier.entity.OilNumGunConfig; import com.fuint.api.cashier.mapper.OilNumGunConfigMapper; import com.fuint.api.cashier.service.OilNumGunConfigService; +import com.fuint.api.cashier.vo.OilNumGunConfigVo; import org.springframework.stereotype.Service; import java.util.List; @@ -16,20 +17,25 @@ import java.util.List; @Service public class OilNumGunConfigServiceImpl extends ServiceImpl implements OilNumGunConfigService { @Override - public List selectList() { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper(); - queryWrapper.groupBy(OilNumGunConfig::getOilNum); - List list = baseMapper.selectMaps(queryWrapper); + public List selectList() { + List list = baseMapper.selectOilNumGunList(); return list; } @Override - public List selectListByOilNum(String oilNum) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - if (!oilNum.equals("1")){ - queryWrapper.eq("oil_num",oilNum); + public List selectListByOilNum(String oilNum) { + List list = null; + if (oilNum.equals("全部")){ + list = baseMapper.selectOilNumGunList(); + }else { + list = baseMapper.selectListByOilNum(oilNum); } - List list = baseMapper.selectList(queryWrapper); return list; } + + @Override + public OilNumGunConfigVo selectOilNumGunById(int id) { + OilNumGunConfigVo oilNumGunConfigVo = baseMapper.selectOilNumGunById(id); + return oilNumGunConfigVo; + } } diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/vo/OilNumGunConfigVo.java b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/vo/OilNumGunConfigVo.java new file mode 100644 index 000000000..6fe39167e --- /dev/null +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/cashier/vo/OilNumGunConfigVo.java @@ -0,0 +1,12 @@ +package com.fuint.api.cashier.vo; + +import com.fuint.api.cashier.entity.OilNumGunConfig; +import lombok.Data; + +@Data +public class OilNumGunConfigVo extends OilNumGunConfig { +// 油品号 + private String oilName; +// 油品单价 + private Double oilPrice; +} diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/fuyou/entity/Message.java b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/fuyou/entity/Message.java new file mode 100644 index 000000000..e88533e03 --- /dev/null +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/fuyou/entity/Message.java @@ -0,0 +1,41 @@ +package com.fuint.api.fuyou.entity; + +import cn.hutool.http.HttpUtil; +import com.fuint.api.fuyou.util.Utils; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + +import java.net.URLDecoder; +import java.net.URLEncoder; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +public class Message { + public static String requestMsg(Map map) throws Exception { + Map reqs = new HashMap<>(); + reqs.putAll(map); + String sign = Utils.getSign(reqs); + reqs.put("sign", sign); + Document doc = DocumentHelper.createDocument(); + Element root = doc.addElement("xml"); + Iterator it = reqs.keySet().iterator(); + while (it.hasNext()) { + String key = it.next().toString(); + String value = reqs.get(key); + root.addElement(key).addText(value); + } + String reqBody = "" + doc.getRootElement().asXML(); + reqBody = URLEncoder.encode(reqBody, Const.charset); + return reqBody; + } + + public static String responseMsg(String reqBody,String url) throws Exception { + Map reqParam = new HashMap<>(); + reqParam.put("req",reqBody); + String resMsg = HttpUtil.post(url, reqParam); + String rspXml = URLDecoder.decode(resMsg, Const.charset); + return rspXml; + } +} diff --git a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java index 443b546a6..61c7b82ff 100644 --- a/fuintBackend/fuint-payment/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java +++ b/fuintBackend/fuint-payment/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java @@ -1,8 +1,10 @@ package com.fuint.api.fuyou.service.impl; +import cn.hutool.core.thread.ThreadUtil; import cn.hutool.http.HttpUtil; import com.fuint.api.fuyou.entity.Builder; 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 org.dom4j.Document; @@ -30,29 +32,38 @@ public class FyPayServiceImpl implements FyPayService { Map map = Builder.buildFuiou22(); map.put("auth_code",authCode); map.put("mchnt_order_no",orderNo); - Map reqs = new HashMap<>(); - reqs.putAll(map); - String sign = Utils.getSign(reqs); - reqs.put("sign", sign); - Document doc = DocumentHelper.createDocument(); - Element root = doc.addElement("xml"); - Iterator it = reqs.keySet().iterator(); - while (it.hasNext()) { - String key = it.next().toString(); - String value = reqs.get(key); - root.addElement(key).addText(value); - } - String reqBody = "" + doc.getRootElement().asXML(); - reqBody = URLEncoder.encode(reqBody, Const.charset); - Map reqParam = new HashMap<>(); - reqParam.put("req",reqBody); - String resMsg = HttpUtil.post(Const.fuiou_22_url, reqParam); - String rspXml = URLDecoder.decode(resMsg, Const.charset); +// 请求报文 + String reqBody = Message.requestMsg(map); +// 响应报文 + String rspXml = Message.responseMsg(reqBody,Const.fuiou_22_url); + //响应报文验签 Map resMap = Utils.xmlStr2Map(rspXml); String str = resMap.get("sign"); if (Utils.verifySign(resMap, str)){ + String resultCode = resMap.get("result_code"); + if (resultCode.equals("000000")){ + return resMap; + }else { + ThreadUtil.execAsync(() -> { + try { + long startTime = System.currentTimeMillis(); + long endTime = startTime + 5000; + while (System.currentTimeMillis() < endTime){ + Map queryOrder = this.queryOrder(map1); + String resultCode1 = queryOrder.get("result_code"); + if (resultCode1.equals("000000")){ +// 修改已支付 + }else { +// 支付失败 + } + } + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } return resMap; } return null; @@ -63,25 +74,12 @@ public class FyPayServiceImpl implements FyPayService { String orderNo = map1.get("orderNo"); Map map = Builder.buildFuiou30(); map.put("mchnt_order_no",orderNo); - Map reqs = new HashMap<>(); - reqs.putAll(map); - String sign = Utils.getSign(reqs); - reqs.put("sign", sign); - Document doc = DocumentHelper.createDocument(); - Element root = doc.addElement("xml"); - Iterator it = reqs.keySet().iterator(); - while (it.hasNext()) { - String key = it.next().toString(); - String value = reqs.get(key); - root.addElement(key).addText(value); - } - String reqBody = "" + doc.getRootElement().asXML(); - reqBody = URLEncoder.encode(reqBody, Const.charset); - Map reqParam = new HashMap<>(); - reqParam.put("req",reqBody); - String resMsg = HttpUtil.post(Const.fuiou_30_url, reqParam); - String rspXml = URLDecoder.decode(resMsg, Const.charset); +// 请求报文 + String reqBody = Message.requestMsg(map); +// 响应报文 + String rspXml = Message.responseMsg(reqBody,Const.fuiou_30_url); + //响应报文验签 Map resMap = Utils.xmlStr2Map(rspXml); String str = resMap.get("sign"); diff --git a/fuintCashierWeb/src/api/cashier/ljgoods.js b/fuintCashierWeb/src/api/cashier/ljgoods.js new file mode 100644 index 000000000..4d0d97194 --- /dev/null +++ b/fuintCashierWeb/src/api/cashier/ljgoods.js @@ -0,0 +1,70 @@ +import request from '@/utils/request' + +// 查询商品列表 +export function listLJGoods(query) { + return request({ + url: '/business/convenience/goods/list', + method: 'get', + params: query + }) +} + +// 查询商品详细 +export function getLJGoods(id) { + return request({ + url: '/business/convenience/goods/' + id, + method: 'get' + }) +} + +// 根据商品条码查询商品详细 +export function queryLJGoods(data) { + return request({ + url: '/business/convenience/goods/getGoods', + method: 'post', + data: data + }) +} + +// 生成13位二维码 +export function createGoodsNo() { + return request({ + url: '/business/convenience/goods/createGoodsNo', + method: 'get' + }) +} + +// 对接扫码枪 +export function scanCode(goodsNo) { + return request({ + url: '/business/convenience/goods/scanCode/'+goodsNo, + method: 'get', + // data: data + }) +} + +// 新增商品 +export function addLJGoods(data) { + return request({ + url: '/business/convenience/goods', + method: 'post', + data: data + }) +} + +// 修改商品 +export function updateLJGoods(data) { + return request({ + url: '/business/convenience/goods', + method: 'put', + data: data + }) +} + +// 删除商品 +export function delLJGoods(id) { + return request({ + url: '/business/convenience/goods/' + id, + method: 'delete' + }) +} diff --git a/fuintCashierWeb/src/api/cashier/oilnumgun.js b/fuintCashierWeb/src/api/cashier/oilnumgun.js index c2265b0b1..5371fa1fb 100644 --- a/fuintCashierWeb/src/api/cashier/oilnumgun.js +++ b/fuintCashierWeb/src/api/cashier/oilnumgun.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 查询字典类型列表 +// 查询油号油枪列表 export function listOilNumGun() { return request({ url: '/api/cashier/list', @@ -8,10 +8,38 @@ export function listOilNumGun() { }) } -// 查询字典类型列表 -export function getOilNumGun(oilNum) { +// 查询油号油枪列表 +export function getOilNumGun(data) { return request({ - url: '/api/cashier/' + oilNum, - method: 'get', + url: '/api/cashier/oilNum' , + method: 'post', + data: data + }) +} + +// 根据id查询油号油枪列表 +export function getOilNumGunById(id) { + return request({ + url: '/api/cashier/' +id , + method: 'get', + // data: data + }) +} + +// 根据id油品名称 +export function getOilNameById(id) { + return request({ + url: '/business/petrolStationManagement/oilName/' +id , + method: 'get', + // data: data + }) +} + +// 根据id油品名称 +export function getOilNameList() { + return request({ + url: '/business/petrolStationManagement/oilName/queryOilName' , + method: 'get', + // data: data }) } diff --git a/fuintCashierWeb/src/api/cashier/staff.js b/fuintCashierWeb/src/api/cashier/staff.js new file mode 100644 index 000000000..0b1b01c11 --- /dev/null +++ b/fuintCashierWeb/src/api/cashier/staff.js @@ -0,0 +1,61 @@ +import request from '@/utils/request' + +// 查询员工列表 +export function listStaff(query) { + return request({ + url: '/business/member/staff/list', + method: 'get', + params: query + }) +} + +// 查询所有员工 +export function queryStaffs() { + return request({ + url: '/business/member/staff/query', + method: 'get' + }) +} + +// 查询员工详细 +export function getStaff(id) { + return request({ + url: '/business/member/staff/' + id, + method: 'get' + }) +} + +// 根据手机号查询员工详情 +export function queryStaff(data) { + return request({ + url: '/business/member/staff/mobile', + method: 'post', + data: data + }) +} + +// 新增员工 +export function addStaff(data) { + return request({ + url: '/business/member/staff', + method: 'post', + data: data + }) +} + +// 修改员工 +export function updateStaff(data) { + return request({ + url: '/business/member/staff', + method: 'put', + data: data + }) +} + +// 删除员工 +export function delStaff(id) { + return request({ + url: '/business/member/staff/' + id, + method: 'delete' + }) +} diff --git a/fuintCashierWeb/src/api/cashier/user.js b/fuintCashierWeb/src/api/cashier/user.js new file mode 100644 index 000000000..8fde919f5 --- /dev/null +++ b/fuintCashierWeb/src/api/cashier/user.js @@ -0,0 +1,39 @@ +import request from '@/utils/request' + +// 查询会员列表 +export function listUser(query) { + return request({ + url: '/business/userManager/user/list', + method: 'get', + params: query + }) +} + +// 查询会员列表 +export function listStatistic(query) { + return request({ + url: '/business/userManager/user/statistic', + method: 'get', + params: query + }) +} + +// 根据手机号查询会员详细 +export function getUserMobile(data) { + return request({ + url: '/business/userManager/user/mobile' , + method: 'post', + data: data + }) +} + +// 根据手机号查询会员详细 +export function getUserVoMobile(data) { + return request({ + url: '/business/userManager/user/getMobile', + method: 'post', + data: data + }) +} + + diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 9e637523b..8c5926af7 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -49,13 +49,14 @@ +
- + @@ -67,12 +68,23 @@
-
+
-
-
92#
+ + -
{{index+1}}号枪
+ + + + + +
+
{{ getName(oilNameList,item.oilName) }}
+ +
{{item.oilGunNum}}号枪
@@ -92,12 +104,21 @@
解锁
+
非油商品
- +
+
商品
@@ -130,24 +151,30 @@
+ -
-
-
92#
-
加油员姓名
-
- -
+ :close-on-click-modal="false"> +
+
+
{{ item.name }}
+
{{ item.mobile }}
+ + + + + + +
取 消 - 确 定 + @@ -155,7 +182,7 @@ title="提示" :visible.sync="dialogVisiblej" width="30%" - :before-close="handleClose"> + :close-on-click-modal="false">
付款金额
¥300.00 @@ -167,6 +194,7 @@
赠送金额
- 取 消 - 确 定 收 款 + 取 消 + 确 定 收 款 + :close-on-click-modal="false">
- 会员登录 + + + + + + 查询 +
+ + + {{member.mobile ? member.mobile : "--"}} + {{member.name ? member.name : "--"}} + {{member.points ? member.points : "--"}} + + {{member.carNo ? member.carNo : "--"}} + {{member.remark ? member.remark : "--"}} + + + {{member.gradeId ? member.gradeId : "--"}} + + + + {{member.cardBalance ? member.cardBalance : "--"}}元 + + 取 消 确 定 @@ -205,7 +260,43 @@
- + + +
+ 已选油品 + {{ getName(oilNameList,form.oilName) }} +
+
+ 已选油枪 + {{ form.oilGunNum }}号枪 +
+
+ 油品单价 + {{ form.oilPrice }}元/L +
+
+ + + + + + +
+ + + {{ item.value }} + + + + 取 消 + 确 定 + +
@@ -213,16 +304,44 @@