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 4faeb0c1c..69a85e656 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 @@ -65,6 +65,7 @@ import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.StringUtils; import com.fuint.common.util.TokenUtil; import com.fuint.system.config.service.SysConfigService; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; @@ -80,6 +81,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; @Service +@Slf4j public class OilOrderServiceImpl extends ServiceImpl implements OilOrderService { @Autowired private LJOrderService orderService; @@ -123,6 +125,8 @@ public class OilOrderServiceImpl extends ServiceImpl i private ActiveDiscountService activeDiscountService; @Resource private IntegralSettingsService integralSettingsService; + @Resource + private OilGunService oilGunService; @Override public IPage selectOilOrderList(Page page, OilOrder order) { @@ -1080,10 +1084,7 @@ public class OilOrderServiceImpl extends ServiceImpl i oilOrder.setOrderType("主订单"); oilOrder.setInvoicing("未开票"); oilOrder.setUserId(nowAccountInfo.getId()); - if (ObjectUtils.isNotEmpty(oilOrder.getOilTagSn())){ - String[] split = oilOrder.getOilTagSn().split("="); - oilOrder.setOilTagSn(split[1]); - } + oilOrder.setOilTagSn(oilOrder.getOilTagSn()); // 判断当前店铺是否存在此用户的会员信息,没有的话进行添加 LJStore store = storeService.selectStoreByStoreId(oilOrder.getStoreId()); UserBalance balance = userBalanceService.selectUserBalance(oilOrder.getUserId(), store.getChainStoreId()); @@ -1346,7 +1347,18 @@ public class OilOrderServiceImpl extends ServiceImpl i } String oils = oilOrder.getOils(); OilName oilName = oilNameService.getById(oils); - content = oilOrder.getOilGunNum()+"加油"+oilName.getOilName()+oilName.getOilType()+oilOrder.getOilNum()+"升,共计"+oilOrder.getPayAmount()+"元"; + //油枪名字 + OilGun oilGun = oilGunService.queryById(Integer.parseInt(oilOrder.getOilGunNum())); + String oilName11 = ""; + if (oilName.getOilName().contains("#")){ + String[] split = oilName.getOilName().split("#"); + oilName11 = split[0]; + content = oilGun.getGunName()+"加油"+oilName11+oilName.getOilType()+oilOrder.getOilNum()+"升,共计"+oilOrder.getPayAmount()+"元"; + }else { + content = oilGun.getGunName()+"加油"+oilName.getOilName()+oilName.getOilType()+oilOrder.getOilNum()+"升,共计"+oilOrder.getPayAmount()+"元"; + } + + log.info("码牌播报内容111:"+content); hashMap.put("content",content); tagUtils.voiceBroadcast(hashMap); //tagUtils @@ -1873,9 +1885,6 @@ return stringDoubleMap; saleDetailService.insertSaleDetail(saleDetail,isMember); } - - @Resource - OilGunService oilGunService; @Override public OilOrderVo getInfoByTime(Date time,Integer tankId) { List oilGuns = oilGunService.selectOilGunByTankId(tankId);