模式新增 换档时间、蜂鸣提醒时间、震动提醒时间

master
382696293@qq.com 2 years ago
parent 30dc075ba2
commit 12f4160395

@ -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<Long> lockCompanyTagArray = new ArrayList<Long>();
/**
* 使
*/
private String technologyInfo;
/**
*
*/
private String effectContent;
/**
* FR200-
*/
private String stepOneVideo;
/**
* FR200-
*/
private String stepTwoVideo;
/**
* FR200-
*/
private String stepThreeVideo;
/**
*
*/
private List<WxModeGear> modeGear = new ArrayList<>();
/**
*
*/
private List<WxModeGear> modeBuzzing = new ArrayList<>();
/**
*
*/
private List<WxModeGear> 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<WxModeGear> getModeGear() {
return modeGear;
}
public void setModeGear(List<WxModeGear> modeGear) {
this.modeGear = modeGear;
}
public List<WxModeGear> getModeBuzzing() {
return modeBuzzing;
}
public void setModeBuzzing(List<WxModeGear> modeBuzzing) {
this.modeBuzzing = modeBuzzing;
}
public List<WxModeGear> getModeVibrate() {
return modeVibrate;
}
public void setModeVibrate(List<WxModeGear> modeVibrate) {
this.modeVibrate = modeVibrate;
}
}

@ -87,6 +87,9 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
@Autowired
private WxModeServiceInfoMapper wxModeServiceInfoMapper;
@Autowired
private WxModeGearMapper wxModeGearMapper;
@Override
public List<WxInstrument> bindingInstrumentList() {
/* 绑定了的仪器 不受 "可见小程序标签/可见外部标签" 影响, 去除仪器隐藏的 */
@ -452,7 +455,7 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
wxModeTag.setModeId(wxMode.getId());
List<WxModeTag> 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<WxModeGear> 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)));

Loading…
Cancel
Save