From 12f4160395ed49fb2e15ba571f2ed525400bf8e2 Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Mon, 18 Mar 2024 14:39:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E6=8D=A2=E6=A1=A3=E6=97=B6=E9=97=B4=E3=80=81=E8=9C=82=E9=B8=A3?= =?UTF-8?q?=E6=8F=90=E9=86=92=E6=97=B6=E9=97=B4=E3=80=81=E9=9C=87=E5=8A=A8?= =?UTF-8?q?=E6=8F=90=E9=86=92=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/domain/ret/WxModeRet.java | 105 ++++++++++++++++++ .../service/impl/WxInstrumentServiceImpl.java | 15 ++- 2 files changed, 119 insertions(+), 1 deletion(-) diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/ret/WxModeRet.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/ret/WxModeRet.java index ed1c58e..cf60df8 100644 --- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/ret/WxModeRet.java +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/ret/WxModeRet.java @@ -3,6 +3,7 @@ package com.flossom.common.core.domain.ret; import com.fasterxml.jackson.annotation.JsonFormat; import com.flossom.common.core.annotation.Excel; import com.flossom.common.core.domain.entity.WxModeCombineInfo; +import com.flossom.common.core.domain.entity.WxModeGear; import com.flossom.common.core.domain.entity.WxModeOpenSource; import com.flossom.common.core.domain.entity.WxModeServiceInfo; @@ -140,6 +141,46 @@ public class WxModeRet { private List lockCompanyTagArray = new ArrayList(); + /** + * 使用技术 + */ + private String technologyInfo; + + /** + * 模式功效 + */ + private String effectContent; + + /** + * FR200-水分测试 的步骤视频 + */ + private String stepOneVideo; + + /** + * FR200-水分测试 的步骤视频 + */ + private String stepTwoVideo; + + /** + * FR200-水分测试 的步骤视频 + */ + private String stepThreeVideo; + + /** + * 换挡时间 + */ + private List modeGear = new ArrayList<>(); + + /** + * 蜂鸣提醒时间 + */ + private List modeBuzzing = new ArrayList<>(); + + /** + * 震动提醒时间 + */ + private List modeVibrate = new ArrayList<>(); + public void setId(Long id) { this.id = id; @@ -340,4 +381,68 @@ public class WxModeRet { public void setModeTimeStr(String modeTimeStr) { this.modeTimeStr = modeTimeStr; } + + public String getTechnologyInfo() { + return technologyInfo; + } + + public void setTechnologyInfo(String technologyInfo) { + this.technologyInfo = technologyInfo; + } + + public String getEffectContent() { + return effectContent; + } + + public void setEffectContent(String effectContent) { + this.effectContent = effectContent; + } + + public String getStepOneVideo() { + return stepOneVideo; + } + + public void setStepOneVideo(String stepOneVideo) { + this.stepOneVideo = stepOneVideo; + } + + public String getStepTwoVideo() { + return stepTwoVideo; + } + + public void setStepTwoVideo(String stepTwoVideo) { + this.stepTwoVideo = stepTwoVideo; + } + + public String getStepThreeVideo() { + return stepThreeVideo; + } + + public void setStepThreeVideo(String stepThreeVideo) { + this.stepThreeVideo = stepThreeVideo; + } + + public List getModeGear() { + return modeGear; + } + + public void setModeGear(List modeGear) { + this.modeGear = modeGear; + } + + public List getModeBuzzing() { + return modeBuzzing; + } + + public void setModeBuzzing(List modeBuzzing) { + this.modeBuzzing = modeBuzzing; + } + + public List getModeVibrate() { + return modeVibrate; + } + + public void setModeVibrate(List modeVibrate) { + this.modeVibrate = modeVibrate; + } } diff --git a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxInstrumentServiceImpl.java b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxInstrumentServiceImpl.java index bba1b41..506a0e6 100644 --- a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxInstrumentServiceImpl.java +++ b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxInstrumentServiceImpl.java @@ -87,6 +87,9 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService { @Autowired private WxModeServiceInfoMapper wxModeServiceInfoMapper; + @Autowired + private WxModeGearMapper wxModeGearMapper; + @Override public List bindingInstrumentList() { /* 绑定了的仪器 不受 "可见小程序标签/可见外部标签" 影响, 去除仪器隐藏的 */ @@ -452,7 +455,7 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService { wxModeTag.setModeId(wxMode.getId()); List wxModeTagList = wxModeTagMapper.selectWxModeTagList(wxModeTag); BeanUtils.copyProperties(wxMode, wxModeRet); - if(wxMode.getInstrumentType() == 2) { + if (wxMode.getInstrumentType() == 2) { // IOT仪器才可以设置模式时长 wxModeRet.setModeTime(LocalTime.of(0, wxMode.getModeTime())); } @@ -506,6 +509,16 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService { } wxModeRet.setServiceData(wxModeServiceInfoList); + // 查询换挡时间,蜂鸣时间,震动时间配置 + WxModeGear gearQuery = new WxModeGear(); + gearQuery.setModeId(wxModeRet.getId()); + List wxModeGearList = wxModeGearMapper.selectWxModeGearList(gearQuery); + if (wxModeGearList != null && wxModeGearList.size() > 0) { + wxModeRet.setModeGear(wxModeGearList.stream().filter(wxModeGear -> wxModeGear.getType() == 1).collect(Collectors.toList())); + wxModeRet.setModeBuzzing(wxModeGearList.stream().filter(wxModeGear -> wxModeGear.getType() == 2).collect(Collectors.toList())); + wxModeRet.setModeVibrate(wxModeGearList.stream().filter(wxModeGear -> wxModeGear.getType() == 3).collect(Collectors.toList())); + } + // 将 localTime 转为 分秒 格式 if (wxModeRet.getModeTime() != null) { wxModeRet.setModeTimeStr(DateUtils.formatMS(wxModeRet.getModeTime().getLong(ChronoField.SECOND_OF_DAY)));