From 69dbe233cfbbfd28a816054664416e77092b2e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 6 Jun 2024 17:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF=E4=BB=98bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CardFuelDieselController.java | 8 ++++---- .../order/service/impl/OilOrderServiceImpl.java | 12 ++++++++++++ .../business/tag/service/impl/OilTagServiceImpl.java | 5 +++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java index cfdfcf3a9..31b7390a6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java @@ -154,7 +154,7 @@ public class CardFuelDieselController extends BaseController { //描述 activeApplet.setDiscountActiveDescribe("本充值活动,充值满"+ cardFuelDiesel.getRechargeBalance()+"元可以参加,所参与油品类型为:"+activeApplet.getOilName()+",锁价单价为:"+ - cardFuelDiesel.getLockupPrice()+"元/L,总升数为:"+cardFuelDiesel.getIncomeLitres()+"L,活动时间为:不限时间!"); + cardFuelDiesel.getLockPrice()+"元/L,活动时间为:不限时间!"); }else { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); startFormat = simpleDateFormat.format(cardFuelDiesel.getStartTime()); @@ -163,7 +163,7 @@ public class CardFuelDieselController extends BaseController { //描述 activeApplet.setDiscountActiveDescribe("本充值活动,充值满"+ cardFuelDiesel.getRechargeBalance()+"元可以参加,所参与油品类型为:"+activeApplet.getOilName()+",锁价单价为:"+ - cardFuelDiesel.getLockupPrice()+"元/L,总升数为:"+cardFuelDiesel.getIncomeLitres()+"L,活动时间为:"+startFormat+"-"+endFormat); + cardFuelDiesel.getLockPrice()+"元/L,活动时间为:"+startFormat+"-"+endFormat); } @@ -216,7 +216,7 @@ public class CardFuelDieselController extends BaseController { //描述 activeApplet.setDiscountActiveDescribe("本充值活动,充值满"+ cardFuelDiesel.getRechargeBalance()+"元可以参加,所参与油品类型为:"+activeApplet.getOilName()+",锁价单价为:"+ - cardFuelDiesel.getLockupPrice()+"元/L,总升数为:"+cardFuelDiesel.getIncomeLitres()+"L,活动时间为:不限时间!"); + cardFuelDiesel.getLockPrice()+"元/L,活动时间为:不限时间!"); }else { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); startFormat = simpleDateFormat.format(cardFuelDiesel.getStartTime()); @@ -225,7 +225,7 @@ public class CardFuelDieselController extends BaseController { //描述 activeApplet.setDiscountActiveDescribe("本充值活动,充值满"+ cardFuelDiesel.getRechargeBalance()+"元可以参加,所参与油品类型为:"+activeApplet.getOilName()+",锁价单价为:"+ - cardFuelDiesel.getLockupPrice()+"元/L,总升数为:"+cardFuelDiesel.getIncomeLitres()+"L,活动时间为:"+startFormat+"-"+endFormat); + cardFuelDiesel.getLockPrice()+"元/L,活动时间为:"+startFormat+"-"+endFormat); } activeApplet.setPoints(cardFuelDiesel.getPoints()); 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 627cd4e15..d7b3e6953 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 @@ -56,7 +56,9 @@ import com.fuint.business.printer.service.PrinterService; import com.fuint.business.storeInformation.entity.LJStore; import com.fuint.business.storeInformation.service.ILJStoreService; import com.fuint.business.tag.entity.OilTag; +import com.fuint.business.tag.entity.TagCode; import com.fuint.business.tag.service.OilTagService; +import com.fuint.business.tag.service.TagCodeService; import com.fuint.business.tag.util.TagUtils; import com.fuint.business.userManager.entity.ChainStoreConfig; import com.fuint.business.userManager.entity.LJUser; @@ -1727,9 +1729,12 @@ public class OilOrderServiceImpl extends ServiceImpl i @Resource private PrinterService printerService; + @Resource + private TagCodeService tagCodeService; @Override public int updateOrderStatus(String orderNo, String status) throws Exception { int row = 0; + String staffId =""; OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo); Integer userId = oilOrder.getUserId(); LJUser user = null; @@ -1747,6 +1752,13 @@ public class OilOrderServiceImpl extends ServiceImpl i LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(OilTag::getTagCodeSn, oilTagSn); OilTag oilTag = oilTagService.getOne(queryWrapper); + Integer tagCodeId = oilTag.getTagCodeId(); + TagCode tagCode = tagCodeService.getById(tagCodeId); + String[] staffIds = tagCode.getCollection().split("staffId"); + if (staffIds.length > 1){ + staffId = staffIds[1]; + oilOrder.setStaffId(Integer.parseInt(staffId)); + } if (ObjectUtils.isNotEmpty(oilTag)) { hashMap.put("devName", oilTag.getSnCode()); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/OilTagServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/OilTagServiceImpl.java index 8fbdc2811..1f800fbf6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/OilTagServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/OilTagServiceImpl.java @@ -12,6 +12,7 @@ import com.fuint.business.tag.service.TagCodeService; import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.TokenUtil; import com.fuint.module.backendApi.controller.BackendFileController; +import com.fuint.system.dept.service.ISysDeptService; import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mock.web.MockMultipartFile; @@ -35,6 +36,9 @@ public class OilTagServiceImpl extends ServiceImpl impleme @Resource private TagCodeService tagCodeService; + @Resource + private ISysDeptService iSysDeptService; + @Override public boolean add(OilTag oilTag) throws Exception { @@ -44,6 +48,7 @@ public class OilTagServiceImpl extends ServiceImpl impleme oilTag.setTerminalNumber(number+""); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); oilTag.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString())); + oilTag.setDeptIds(iSysDeptService.selectDeptById(nowAccountInfo.getDeptId()).getAncestors() + ","+nowAccountInfo.getDeptId()); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(TagCode::getTagCodeSn, oilTag.getTagCodeSn());