diff --git a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
index 5c9d5519..e6aa0d04 100644
--- a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
+++ b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
@@ -4,10 +4,13 @@ import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
+
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonView;
+import com.ruoyi.common.annotation.Excel;
+
import io.swagger.annotations.ApiModelProperty;
/**
@@ -29,6 +32,7 @@ public class BaseEntity implements Serializable
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonView(JsonViewProfile.Base.class)
+ @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新者 */
diff --git a/smart-switch-service/src/main/java/com/ruoyi/common/constants/DictTypeConstants.java b/smart-switch-service/src/main/java/com/ruoyi/common/constants/DictTypeConstants.java
index a11e4c96..01ddf35e 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/common/constants/DictTypeConstants.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/common/constants/DictTypeConstants.java
@@ -27,4 +27,8 @@ public class DictTypeConstants {
public static final String VIP_LEVEL_STATUS = "vip_level_status";
// 会员等级限制类型
public static final String VIP_LEVEL_LIMIT_TYPE = "vip_level_limit_type";
+ // 交易订单状态
+ public static final String TRANSACTION_BILL_STATUS = "sm_transaction_bill_status";
+ // 充值商户是否显示手机号状态
+ public static final String RECHARGE_MCH_SHOW_MOBILE_STATUS = "recharge_mch_show_mobile_status";
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/dashboard/index/domain/vo/MchRevenueVO.java b/smart-switch-service/src/main/java/com/ruoyi/dashboard/index/domain/vo/MchRevenueVO.java
index 88146736..eddcad8c 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/dashboard/index/domain/vo/MchRevenueVO.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/dashboard/index/domain/vo/MchRevenueVO.java
@@ -35,4 +35,10 @@ public class MchRevenueVO {
@ApiModelProperty("使用中设备数")
private Integer usingDeviceCount;
+
+ @ApiModelProperty("待结算金额")
+ private BigDecimal waitBonusAmount;
+
+ @ApiModelProperty("待结算订单数")
+ private Integer waitBonusOrderCount;
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/dashboard/index/service/DashboardService.java b/smart-switch-service/src/main/java/com/ruoyi/dashboard/index/service/DashboardService.java
index eac05cc4..2135899e 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/dashboard/index/service/DashboardService.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/dashboard/index/service/DashboardService.java
@@ -409,6 +409,16 @@ public class DashboardService {
int usingDeviceCount = deviceService.selectCount(deviceQuery);
vo.setUsingDeviceCount(usingDeviceCount);
+ // 待结算分成
+ BonusQuery waitBonusQuery = new BonusQuery();
+ waitBonusQuery.setArrivalId(mchId);
+ waitBonusQuery.setStatus(BonusStatus.WAIT_DIVIDE.getStatus());
+ BigDecimal waitBonusAmount = bonusService.selectSumOfWaitAmount(waitBonusQuery);
+ vo.setWaitBonusAmount(waitBonusAmount);
+ // 待结算分成的订单数
+ int waitBonusOrderCount = bonusService.selectBillCount(waitBonusQuery);
+ vo.setWaitBonusOrderCount(waitBonusOrderCount);
+
return vo;
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/mapper/BonusMapper.java b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/mapper/BonusMapper.java
index 25e6955f..c343613b 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/mapper/BonusMapper.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/mapper/BonusMapper.java
@@ -173,4 +173,14 @@ public interface BonusMapper
* 预支付
*/
int prePay(@Param("list") List extends Bonus> bonusList);
+
+ /**
+ * 查询待分成金额
+ */
+ BigDecimal selectSumOfWaitAmount(@Param("query") BonusQuery query);
+
+ /**
+ * 查询订单数量(去重)
+ */
+ int selectBillCount(@Param("query") BonusQuery query);
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/mapper/BonusMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/mapper/BonusMapper.xml
index cfc99fb2..4f14346f 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/mapper/BonusMapper.xml
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/mapper/BonusMapper.xml
@@ -539,4 +539,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
+
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/BonusService.java b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/BonusService.java
index 3f1c66a6..9f25f1c0 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/BonusService.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/BonusService.java
@@ -158,4 +158,15 @@ public interface BonusService
* 查询总金额
*/
BigDecimal selectSumOfAmount(BonusQuery bonusQuery);
+
+ /**
+ * 查询待分成金额
+ */
+ BigDecimal selectSumOfWaitAmount(BonusQuery query);
+
+ /**
+ * 查询订单数量(去重)
+ */
+ int selectBillCount(BonusQuery query);
+
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusServiceImpl.java
index c7aa6b4c..898c6929 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusServiceImpl.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusServiceImpl.java
@@ -370,4 +370,14 @@ public class BonusServiceImpl implements BonusService
public BigDecimal selectSumOfAmount(BonusQuery query) {
return bonusMapper.selectSumOfAmount(query);
}
+
+ @Override
+ public BigDecimal selectSumOfWaitAmount(BonusQuery query) {
+ return bonusMapper.selectSumOfWaitAmount(query);
+ }
+
+ @Override
+ public int selectBillCount(BonusQuery query) {
+ return bonusMapper.selectBillCount(query);
+ }
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersion.java b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersion.java
new file mode 100644
index 00000000..a779e581
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersion.java
@@ -0,0 +1,41 @@
+package com.ruoyi.ss.hardVersion.domain;
+
+import java.util.List;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 硬件版本对象 ss_hard_version
+ *
+ * @author ruoyi
+ * @date 2025-03-11
+ */
+@Data
+public class HardVersion extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ private Long id;
+
+ @Excel(name = "版本代码")
+ @ApiModelProperty("版本代码")
+ @NotBlank(message = "版本代码不能为空")
+ @Size(max = 64, message = "版本代码长度不能超过64个字符")
+ private String code;
+
+ @Excel(name = "适用型号列表")
+ @ApiModelProperty("适用型号列表")
+ private List modelIds;
+
+ @Excel(name = "文件链接")
+ @ApiModelProperty("文件链接")
+ private String fileUrl;
+
+}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersionQuery.java b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersionQuery.java
new file mode 100644
index 00000000..56599d38
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersionQuery.java
@@ -0,0 +1,12 @@
+package com.ruoyi.ss.hardVersion.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class HardVersionQuery extends HardVersionVO {
+
+ @ApiModelProperty("适用型号ID")
+ private Long modelId;
+
+}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersionVO.java b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersionVO.java
new file mode 100644
index 00000000..fdc5b077
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/domain/HardVersionVO.java
@@ -0,0 +1,16 @@
+package com.ruoyi.ss.hardVersion.domain;
+
+import java.util.List;
+
+import com.ruoyi.ss.model.domain.SmModelVO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class HardVersionVO extends HardVersion{
+
+ @ApiModelProperty("型号列表")
+ private List modelList;
+
+}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/mapper/HardVersionMapper.java b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/mapper/HardVersionMapper.java
new file mode 100644
index 00000000..268d9397
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/mapper/HardVersionMapper.java
@@ -0,0 +1,74 @@
+package com.ruoyi.ss.hardVersion.mapper;
+
+import java.util.List;
+import com.ruoyi.ss.hardVersion.domain.HardVersion;
+import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
+import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 硬件版本Mapper接口
+ *
+ * @author ruoyi
+ * @date 2025-03-11
+ */
+public interface HardVersionMapper
+{
+ /**
+ * 查询硬件版本
+ *
+ * @param id 硬件版本主键
+ * @return 硬件版本
+ */
+ HardVersionVO selectHardVersionById(Long id);
+
+ /**
+ * 查询硬件版本列表
+ *
+ * @param query 硬件版本
+ * @return 硬件版本集合
+ */
+ List selectHardVersionList(@Param("query")HardVersionQuery query);
+
+ /**
+ * 新增硬件版本
+ *
+ * @param hardVersion 硬件版本
+ * @return 结果
+ */
+ int insertHardVersion(HardVersion hardVersion);
+
+ /**
+ * 批量新增硬件版本
+ */
+ int batchInsert(@Param("list") List extends HardVersion> list);
+
+ /**
+ * 批量修改硬件版本
+ */
+ int batchUpdate(@Param("list") List extends HardVersion> list);
+
+ /**
+ * 修改硬件版本
+ *
+ * @param hardVersion 硬件版本
+ * @return 结果
+ */
+ public int updateHardVersion(@Param("data") HardVersion hardVersion);
+
+ /**
+ * 删除硬件版本
+ *
+ * @param id 硬件版本主键
+ * @return 结果
+ */
+ int deleteHardVersionById(Long id);
+
+ /**
+ * 批量删除硬件版本
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteHardVersionByIds(Long[] ids);
+}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/mapper/HardVersionMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/mapper/HardVersionMapper.xml
new file mode 100644
index 00000000..8a23cde0
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/mapper/HardVersionMapper.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+ select
+ shv.id,
+ shv.code,
+ shv.model_ids,
+ shv.file_url,
+ shv.remark,
+ shv.create_time
+ from ss_hard_version shv
+
+
+
+ and shv.id = #{query.id}
+ and shv.code like concat('%', #{query.code}, '%')
+ and shv.remark like concat('%', #{query.remark}, '%')
+ and find_in_set(#{query.modelId}, shv.model_ids)
+ ${query.params.dataScope}
+
+
+
+
+
+
+
+ insert into ss_hard_version
+
+ code,
+ model_ids,
+ file_url,
+ remark,
+ create_time,
+
+
+ #{code},
+ #{modelIds, typeHandler=com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler},
+ #{fileUrl},
+ #{remark},
+ #{createTime},
+
+
+
+
+ update ss_hard_version
+
+
+
+ where id = #{data.id}
+
+
+
+ code = #{data.code},
+ model_ids = #{data.modelIds, typeHandler=com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler},
+ file_url = #{data.fileUrl},
+ remark = #{data.remark},
+ create_time = #{data.createTime},
+
+
+
+ delete from ss_hard_version where id = #{id}
+
+
+
+ delete from ss_hard_version where id in
+
+ #{id}
+
+
+
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/HardVersionAssembler.java b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/HardVersionAssembler.java
new file mode 100644
index 00000000..4bdfe935
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/HardVersionAssembler.java
@@ -0,0 +1,16 @@
+package com.ruoyi.ss.hardVersion.service;
+
+import java.util.List;
+
+import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
+
+public interface HardVersionAssembler {
+
+ /**
+ * 组装型号列表
+ *
+ * @param list 硬件版本列表
+ */
+ void assembleModelList(List list);
+
+}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/HardVersionService.java b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/HardVersionService.java
new file mode 100644
index 00000000..93798491
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/HardVersionService.java
@@ -0,0 +1,72 @@
+package com.ruoyi.ss.hardVersion.service;
+
+import java.util.List;
+
+import com.ruoyi.ss.hardVersion.domain.HardVersion;
+import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
+import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
+
+/**
+ * 硬件版本Service接口
+ *
+ * @author ruoyi
+ * @date 2025-03-11
+ */
+public interface HardVersionService
+{
+ /**
+ * 查询硬件版本
+ *
+ * @param id 硬件版本主键
+ * @return 硬件版本
+ */
+ public HardVersionVO selectHardVersionById(Long id);
+
+ /**
+ * 查询硬件版本列表
+ *
+ * @param hardVersion 硬件版本
+ * @return 硬件版本集合
+ */
+ public List selectHardVersionList(HardVersionQuery hardVersion);
+
+ /**
+ * 新增硬件版本
+ *
+ * @param hardVersion 硬件版本
+ * @return 结果
+ */
+ public int insertHardVersion(HardVersion hardVersion);
+
+ /**
+ * 修改硬件版本
+ *
+ * @param hardVersion 硬件版本
+ * @return 结果
+ */
+ public int updateHardVersion(HardVersion hardVersion);
+
+ /**
+ * 批量删除硬件版本
+ *
+ * @param ids 需要删除的硬件版本主键集合
+ * @return 结果
+ */
+ public int deleteHardVersionByIds(Long[] ids);
+
+ /**
+ * 删除硬件版本信息
+ *
+ * @param id 硬件版本主键
+ * @return 结果
+ */
+ public int deleteHardVersionById(Long id);
+
+ /**
+ * 查询一个
+ *
+ * @param query 查询条件
+ * @return 硬件版本
+ */
+ public HardVersionVO selectOne(HardVersionQuery query);
+}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/impl/HardVersionAssemblerImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/impl/HardVersionAssemblerImpl.java
new file mode 100644
index 00000000..21bb787a
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/impl/HardVersionAssemblerImpl.java
@@ -0,0 +1,40 @@
+package com.ruoyi.ss.hardVersion.service.impl;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ruoyi.common.utils.collection.CollectionUtils;
+import com.ruoyi.ss.hardVersion.domain.HardVersion;
+import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
+import com.ruoyi.ss.hardVersion.service.HardVersionAssembler;
+import com.ruoyi.ss.model.domain.SmModelVO;
+import com.ruoyi.ss.model.service.ModelService;
+
+@Service
+public class HardVersionAssemblerImpl implements HardVersionAssembler {
+
+ @Autowired
+ private ModelService modelService;
+
+ @Override
+ public void assembleModelList(List list) {
+ if (CollectionUtils.isEmptyElement(list)) {
+ return;
+ }
+
+ List modelIds = list.stream().map(HardVersion::getModelIds).flatMap(Collection::stream).distinct().collect(Collectors.toList());
+ List modelList = modelService.selectSmModelListByIds(modelIds);
+
+ for (HardVersionVO hardVersion : list) {
+ List versionModelList = modelList.stream()
+ .filter(model -> hardVersion.getModelIds().contains(model.getModelId()))
+ .collect(Collectors.toList());
+ hardVersion.setModelList(versionModelList);
+ }
+ }
+
+}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/impl/HardVersionServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/impl/HardVersionServiceImpl.java
new file mode 100644
index 00000000..fd427da6
--- /dev/null
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/hardVersion/service/impl/HardVersionServiceImpl.java
@@ -0,0 +1,115 @@
+package com.ruoyi.ss.hardVersion.service.impl;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.collection.CollectionUtils;
+import com.ruoyi.ss.hardVersion.domain.HardVersion;
+import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
+import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
+import com.ruoyi.ss.hardVersion.mapper.HardVersionMapper;
+import com.ruoyi.ss.hardVersion.service.HardVersionService;
+
+/**
+ * 硬件版本Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-03-11
+ */
+@Service
+public class HardVersionServiceImpl implements HardVersionService
+{
+ @Autowired
+ private HardVersionMapper hardVersionMapper;
+
+ /**
+ * 查询硬件版本
+ *
+ * @param id 硬件版本主键
+ * @return 硬件版本
+ */
+ @Override
+ public HardVersionVO selectHardVersionById(Long id)
+ {
+ return hardVersionMapper.selectHardVersionById(id);
+ }
+
+ /**
+ * 查询硬件版本列表
+ *
+ * @param hardVersion 硬件版本
+ * @return 硬件版本
+ */
+ @Override
+ public List selectHardVersionList(HardVersionQuery hardVersion)
+ {
+ return hardVersionMapper.selectHardVersionList(hardVersion);
+ }
+
+ /**
+ * 新增硬件版本
+ *
+ * @param hardVersion 硬件版本
+ * @return 结果
+ */
+ @Override
+ public int insertHardVersion(HardVersion hardVersion)
+ {
+ hardVersion.setCreateTime(DateUtils.getNowDate());
+ return hardVersionMapper.insertHardVersion(hardVersion);
+ }
+
+ /**
+ * 修改硬件版本
+ *
+ * @param hardVersion 硬件版本
+ * @return 结果
+ */
+ @Override
+ public int updateHardVersion(HardVersion hardVersion)
+ {
+ return hardVersionMapper.updateHardVersion(hardVersion);
+ }
+
+ /**
+ * 批量删除硬件版本
+ *
+ * @param ids 需要删除的硬件版本主键
+ * @return 结果
+ */
+ @Override
+ public int deleteHardVersionByIds(Long[] ids)
+ {
+ return hardVersionMapper.deleteHardVersionByIds(ids);
+ }
+
+ /**
+ * 删除硬件版本信息
+ *
+ * @param id 硬件版本主键
+ * @return 结果
+ */
+ @Override
+ public int deleteHardVersionById(Long id)
+ {
+ return hardVersionMapper.deleteHardVersionById(id);
+ }
+
+ /**
+ * 查询一个
+ *
+ * @param query 查询条件
+ * @return 硬件版本
+ */
+ @Override
+ public HardVersionVO selectOne(HardVersionQuery query) {
+ List list = selectHardVersionList(query);
+ if (CollectionUtils.isEmpty(list)) {
+ return null;
+ }
+ return list.get(0);
+ }
+}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/model/mapper/SmModelMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/model/mapper/SmModelMapper.xml
index 4e5afcf7..d0bbecd5 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/model/mapper/SmModelMapper.xml
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/model/mapper/SmModelMapper.xml
@@ -39,6 +39,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and sm.product_id = #{productId}
and sm.deleted = false
and sm.deleted = #{deleted}
+
+ and sm.model_id in
+
+ #{item}
+
+
and (
sm.model_name like concat('%', #{keyword}, '%')
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/model/service/ModelService.java b/smart-switch-service/src/main/java/com/ruoyi/ss/model/service/ModelService.java
index 43a8aafa..65581033 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/model/service/ModelService.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/model/service/ModelService.java
@@ -90,4 +90,9 @@ public interface ModelService
* 查询单个型号
*/
SmModelVO selectOne(SmModelQuery query);
+
+ /**
+ * 根据ids查询型号列表
+ */
+ List selectSmModelListByIds(List ids);
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/model/service/impl/ModelServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/model/service/impl/ModelServiceImpl.java
index 76cca453..8a2bb226 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/model/service/impl/ModelServiceImpl.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/model/service/impl/ModelServiceImpl.java
@@ -1,5 +1,13 @@
package com.ruoyi.ss.model.service.impl;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
import com.github.pagehelper.PageHelper;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ServiceUtil;
@@ -15,13 +23,6 @@ import com.ruoyi.ss.model.domain.SmModelVO;
import com.ruoyi.ss.model.mapper.SmModelMapper;
import com.ruoyi.ss.model.service.ModelService;
import com.ruoyi.ss.model.service.ModelValidator;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
/**
* 型号列表Service业务层处理
@@ -165,6 +166,16 @@ public class ModelServiceImpl implements ModelService
return list.get(0);
}
+ @Override
+ public List selectSmModelListByIds(List ids) {
+ if (CollectionUtils.isEmptyElement(ids)) {
+ return Collections.emptyList();
+ }
+ SmModelQuery query = new SmModelQuery();
+ query.setModelIds(ids);
+ return modelMapper.selectSmModelList(query);
+ }
+
/**
* 逻辑删除前校验
*/
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/TransactionBill.java b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/TransactionBill.java
index 5d553ce4..a9b739c8 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/TransactionBill.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/TransactionBill.java
@@ -38,12 +38,12 @@ public class TransactionBill extends BaseEntity
private Long billId;
/** 订单编号 */
+ @Excel(name = "订单编号", sort = 5)
@ApiModelProperty("订单编号")
@JsonView(JsonViewProfile.Base.class)
private String billNo;
/** 用户 */
- @Excel(name = "用户")
@ApiModelProperty("用户id")
private Long userId;
@@ -53,24 +53,23 @@ public class TransactionBill extends BaseEntity
private String type;
/** 设备 */
- @Excel(name = "设备")
@ApiModelProperty("设备id")
@JsonView(JsonViewProfile.Base.class)
private Long deviceId;
- @ApiModelProperty("设备编号")
- @NotNull(message = "设备编号不允许为空", groups = {ValidGroup.Recharge.class})
+ @Excel(name = "设备SN", sort = 20)
+ @ApiModelProperty("设备SN")
+ @NotNull(message = "设备SN不允许为空", groups = {ValidGroup.Recharge.class})
@JsonView(JsonViewProfile.App.class)
private String deviceNo;
/** 商户(到账用户) */
- @Excel(name = "商户(到账用户)")
@ApiModelProperty("商户(到账用户)id")
@JsonView(JsonViewProfile.App.class)
private Long mchId;
/** 交易金额 */
- @Excel(name = "交易金额")
+ @Excel(name = "交易金额", sort = 11)
@ApiModelProperty("交易金额")
@NotNull(message = "交易金额不允许为空", groups = {ValidGroup.Recharge.class})
@Min(value = 0, message = "交易金额不允许小于0", groups = {ValidGroup.Recharge.class})
@@ -79,19 +78,18 @@ public class TransactionBill extends BaseEntity
private BigDecimal money;
/** 实际到账金额 */
- @Excel(name = "商户实际到账金额")
@ApiModelProperty("商户实际到账金额")
@JsonView(JsonViewProfile.AppMch.class)
private BigDecimal arrivalAmount;
/** 手续费 */
- @Excel(name = "手续费")
@ApiModelProperty("手续费")
@Min(value = 0, message = "手续费不允许小于0", groups = { ValidGroup.Withdraw.class})
@JsonView(JsonViewProfile.AppMch.class)
private BigDecimal serviceCharge;
@ApiModelProperty("订单状态:1未支付,2支付成功,3已退款,4已取消")
+ @Excel(name = "订单状态", dictType = DictTypeConstants.TRANSACTION_BILL_STATUS, sort = 10)
@JsonView(JsonViewProfile.App.class)
private String status;
@@ -106,6 +104,7 @@ public class TransactionBill extends BaseEntity
@ApiModelProperty("支付成功的时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonView(JsonViewProfile.App.class)
+ @Excel(name = "支付时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 15)
private Date payTime;
@ApiModelProperty("支付过期时间")
@@ -135,61 +134,64 @@ public class TransactionBill extends BaseEntity
@JsonView(JsonViewProfile.App.class)
private Long suitId;
+ @Excel(name = "套餐时长/电量(秒/度)", sort = 80)
@ApiModelProperty("套餐时长(秒)")
@NotNull(message = "套餐时长不允许为空", groups = {ValidGroup.Recharge.class})
@JsonView(JsonViewProfile.App.class)
private Integer suitTime;
+ @Excel(name = "套餐时长单位", dictType = DictTypeConstants.TIME_UNIT, sort = 90)
@ApiModelProperty("套餐时长单位")
@NotBlank(message = "套餐时长单位不允许为空", groups = {ValidGroup.Recharge.class})
@DictValid(type = DictTypeConstants.TIME_UNIT, message = "非法的套餐时长单位", groups = {ValidGroup.Recharge.class})
@JsonView(JsonViewProfile.App.class)
private String suitTimeUnit;
+ @Excel(name = "套餐开始使用时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 100)
@ApiModelProperty("套餐开始使用时间")
@JsonView(JsonViewProfile.App.class)
private LocalDateTime suitStartTime;
+ @Excel(name = "套餐结束使用时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 110)
@ApiModelProperty("套餐结束使用时间")
@JsonView(JsonViewProfile.App.class)
private LocalDateTime suitEndTime;
+ @Excel(name = "套餐到期时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 120)
@ApiModelProperty("套餐到期时间")
@JsonView(JsonViewProfile.App.class)
private LocalDateTime suitExpireTime;
- @Excel(name = "套餐开始使用的电量")
+ @Excel(name = "套餐开始使用的电量(度)", sort = 130)
@ApiModelProperty("套餐开始使用的电量")
@JsonView(JsonViewProfile.App.class)
private BigDecimal suitStartEle;
- @Excel(name = "套餐结束使用的电量")
+ @Excel(name = "套餐结束使用的电量(度)", sort = 140)
@ApiModelProperty("套餐结束使用的电量")
@JsonView(JsonViewProfile.App.class)
private BigDecimal suitEndEle;
- @Excel(name = "套餐收费模式")
+ @Excel(name = "套餐收费模式", dictType = DictTypeConstants.SUIT_FEE_MODE, sort = 150)
@ApiModelProperty("套餐收费模式")
@JsonView(JsonViewProfile.App.class)
private String suitFeeMode;
- @Excel(name = "套餐收费类型")
+ @Excel(name = "套餐收费类型", dictType = DictTypeConstants.SUIT_FEE_TYPE, sort = 160)
@ApiModelProperty("套餐收费类型")
@JsonView(JsonViewProfile.App.class)
private String suitFeeType;
- @Excel(name = "套餐档位金额列表")
@ApiModelProperty("套餐档位金额列表")
@JsonView(JsonViewProfile.App.class)
private List suitGearAmount;
- @Excel(name = "套餐时段档位列表")
@ApiModelProperty("套餐时段档位列表")
@JsonView(JsonViewProfile.App.class)
private List suitGearTime;
- @Excel(name = "套餐金额/押金", readConverterExp = "元=")
- @ApiModelProperty("套餐金额/押金")
+ @Excel(name = "套餐价格", sort = 170)
+ @ApiModelProperty("套餐价格")
@JsonView(JsonViewProfile.App.class)
private BigDecimal suitPrice;
@@ -197,18 +199,22 @@ public class TransactionBill extends BaseEntity
@JsonView(JsonViewProfile.App.class)
private Long storeId;
+ @Excel(name = "店铺名称", sort = 180)
@ApiModelProperty("店铺名称")
@JsonView(JsonViewProfile.App.class)
private String storeName;
+ @Excel(name = "店铺地址", sort = 190)
@ApiModelProperty("店铺地址")
@JsonView(JsonViewProfile.App.class)
private String storeAddress;
+ @Excel(name = "设备名称", sort = 21)
@ApiModelProperty("设备名称")
@JsonView(JsonViewProfile.App.class)
private String deviceName;
+ @Excel(name = "套餐名称", sort = 70)
@ApiModelProperty("套餐名称")
@JsonView(JsonViewProfile.App.class)
private String suitName;
@@ -217,20 +223,18 @@ public class TransactionBill extends BaseEntity
@JsonView(JsonViewProfile.App.class)
private String deviceMac;
- @Excel(name = "设备MAC2")
@ApiModelProperty("设备MAC2")
@JsonView(JsonViewProfile.App.class)
private String deviceMac2;
- @Excel(name = "设备产品ID")
@ApiModelProperty("设备产品ID")
private String deviceProductId;
- @Excel(name = "设备服务费模式", readConverterExp = "1=-直营模式,2-代理模式")
@ApiModelProperty("设备服务费模式")
private String deviceServiceMode;
- @ApiModelProperty("总计退款金额")
+ @Excel(name = "退款金额", sort = 12)
+ @ApiModelProperty("退款金额")
@JsonView(JsonViewProfile.App.class)
private BigDecimal refundAmount;
@@ -253,120 +257,106 @@ public class TransactionBill extends BaseEntity
@ApiModelProperty("提现审核时的二维码")
private String offlineImage;
- @Excel(name = "押金支付成功的支付订单ID")
@ApiModelProperty("押金支付成功的支付订单ID")
private Long depositPayId;
- @Excel(name = "支付成功的支付订单ID")
@ApiModelProperty("支付成功的支付订单ID")
private Long payId;
- @Excel(name = "订单是否开启低功率自动关闭")
+ @Excel(name = "低功率自动关闭", readConverterExp = "true=开启,false=关闭", sort = 200)
@ApiModelProperty("订单是否开启低功率自动关闭")
private Boolean suitEnableLowPowerClose;
- @Excel(name = "订单低功率自动关闭值", readConverterExp = "瓦=")
- @ApiModelProperty("订单低功率自动关闭值")
+ @Excel(name = "自动关闭阈值(瓦)", sort = 210)
+ @ApiModelProperty("自动关闭阈值")
private BigDecimal suitLowPower;
- @Excel(name = "版本号")
@ApiModelProperty("版本号")
private Integer version;
- @Excel(name = "设备关闭状态(1-已关闭,2-未关闭)")
@ApiModelProperty("设备关闭状态(1-已关闭,2-未关闭)")
private String closeStatus;
- @Excel(name = "设备关闭状态描述")
@ApiModelProperty("设备关闭状态描述")
private String closeResult;
- @Excel(name = "代理商ID")
@ApiModelProperty("代理商ID")
private Long agentId;
- @Excel(name = "代理商手机号")
@ApiModelProperty("代理商手机号")
private String agentMobile;
- @Excel(name = "套餐是否开启语音播报")
- @ApiModelProperty("套餐是否开启语音播报")
+ @Excel(name = "语音播报", readConverterExp = "true=开启,false=关闭", sort = 220)
+ @ApiModelProperty("语音播报")
@JsonView(JsonViewProfile.App.class)
private Boolean suitEnabledVoid;
- @Excel(name = "套餐语音播报阈值", readConverterExp = "分=钟")
- @ApiModelProperty("套餐语音播报阈值")
+ @Excel(name = "语音播报阈值(分钟)", sort = 230)
+ @ApiModelProperty("语音播报阈值")
@JsonView(JsonViewProfile.App.class)
private BigDecimal suitVoidMinute;
- @Excel(name = "套餐语音播报设置结果", readConverterExp = "1=-成功,2-失败")
@ApiModelProperty("套餐语音播报设置结果")
private String suitVoidResult;
- @Excel(name = "套餐语音播报设置结果描述")
@ApiModelProperty("套餐语音播报设置结果描述")
private String suitVoidMsg;
- @Excel(name = "套餐押金", readConverterExp = "元=")
+ @Excel(name = "套餐押金(元)", sort = 71)
@ApiModelProperty("套餐押金")
@JsonView(JsonViewProfile.App.class)
private BigDecimal suitDeposit;
- @Excel(name = "设备开启状态描述")
@ApiModelProperty("设备开启状态描述")
private String openMsg;
- @Excel(name = "用户手机号")
+ @Excel(name = "用户手机号", sort = 240)
@ApiModelProperty("用户手机号")
@JsonView(JsonViewProfile.App.class)
private String userMobile;
- @Excel(name = "商户是否展示用户手机号")
- @ApiModelProperty("商户是否展示用户手机号")
+ @Excel(name = "展示用户手机号", readConverterExp = "true=展示,false=不展示", sort = 250)
+ @ApiModelProperty("展示用户手机号")
private Boolean mchShowMobile;
- @Excel(name = "商户展示手机号价格")
- @ApiModelProperty("商户展示手机号价格")
+ @Excel(name = "手机号价格", sort = 260)
+ @ApiModelProperty("手机号价格")
private BigDecimal mchShowMobilePrice;
- @Excel(name = "商户展示手机号缴费状态", readConverterExp = "1=-待缴费,2-已缴费")
- @ApiModelProperty("商户展示手机号缴费状态")
+ @Excel(name = "展示手机号缴费状态", dictType = DictTypeConstants.RECHARGE_MCH_SHOW_MOBILE_STATUS, sort = 270)
+ @ApiModelProperty("展示手机号缴费状态")
private String mchShowMobileStatus;
- @Excel(name = "渠道类型", dictType = DictTypeConstants.RECHARGE_CHANNEL_TYPE)
@ApiModelProperty("渠道类型")
private String channelType;
- @Excel(name = "使用vip的ID")
@ApiModelProperty("使用vip的ID")
@JsonView(JsonViewProfile.App.class)
private Long vipId;
- @Excel(name = "会员折扣")
+ @Excel(name = "会员折扣", sort = 56)
@ApiModelProperty("会员折扣")
@JsonView(JsonViewProfile.App.class)
private BigDecimal vipDiscount;
- @Excel(name = "会员名称")
+ @Excel(name = "会员名称", sort = 55)
@ApiModelProperty("会员名称")
@JsonView(JsonViewProfile.App.class)
private String vipName;
- @Excel(name = "优惠金额")
+ @Excel(name = "优惠金额", sort = 13)
@ApiModelProperty("优惠金额")
@JsonView(JsonViewProfile.App.class)
private BigDecimal discountAmount;
- @Excel(name = "优惠金额退款")
+ @Excel(name = "优惠金额退款", sort = 14)
@ApiModelProperty("优惠金额退款")
@JsonView(JsonViewProfile.App.class)
private BigDecimal discountRefundAmount;
- @Excel(name = "提现账户")
@ApiModelProperty("提现账户")
private AccountVO withdrawAccount;
- @Excel(name = "是否已经处理过结束流程")
@ApiModelProperty("是否已经处理过结束流程")
private Boolean finished;
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/vo/TransactionBillVO.java b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/vo/TransactionBillVO.java
index c7335a37..f7a072eb 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/vo/TransactionBillVO.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/domain/vo/TransactionBillVO.java
@@ -6,6 +6,7 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonView;
+import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Sensitive;
import com.ruoyi.common.core.domain.JsonViewProfile;
import com.ruoyi.common.enums.DesensitizedType;
@@ -26,21 +27,24 @@ import lombok.Data;
@ApiModel
@Data
public class TransactionBillVO extends TransactionBill implements IotDevice {
+ @Excel(name = "用户", sort = 22)
@ApiModelProperty("用户名称")
@JsonView(JsonViewProfile.App.class)
@Sensitive(desensitizedType = DesensitizedType.USERNAME)
private String userName;
- @ApiModelProperty("商户(到账用户)名称")
+ @Excel(name = "商户", sort = 23)
+ @ApiModelProperty("商户")
@JsonView(JsonViewProfile.App.class)
@Sensitive(desensitizedType = DesensitizedType.COMMON)
private String mchName;
- @ApiModelProperty("支付渠道名称")
+ @Excel(name = "支付渠道", sort = 24)
+ @ApiModelProperty("支付渠道")
@JsonView(JsonViewProfile.App.class)
private String channelName;
- @ApiModelProperty("商户手机号")
+ @ApiModelProperty("商户手机")
@JsonView(JsonViewProfile.App.class)
private String mchMobile;
diff --git a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppHardVersionController.java b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppHardVersionController.java
new file mode 100644
index 00000000..6579e86e
--- /dev/null
+++ b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppHardVersionController.java
@@ -0,0 +1,32 @@
+package com.ruoyi.web.controller.app;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.github.pagehelper.PageHelper;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
+import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
+import com.ruoyi.ss.hardVersion.service.HardVersionService;
+
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@RequestMapping("/app/hardVersion")
+public class AppHardVersionController extends BaseController {
+
+ @Autowired
+ private HardVersionService hardVersionService;
+
+ @ApiOperation("获取最新一个硬件版本")
+ @GetMapping("/lastOne")
+ public AjaxResult getLastOne(HardVersionQuery query) {
+ PageHelper.orderBy("create_time desc");
+ HardVersionVO hardVersion = hardVersionService.selectOne(query);
+ return success(hardVersion);
+ }
+
+}
\ No newline at end of file
diff --git a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppTransactionBillController.java b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppTransactionBillController.java
index bcd64543..0af97304 100644
--- a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppTransactionBillController.java
+++ b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppTransactionBillController.java
@@ -7,6 +7,8 @@ import java.util.Collections;
import java.util.List;
import java.util.Objects;
+import javax.servlet.http.HttpServletResponse;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
@@ -31,6 +33,7 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.OperatorType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ServiceUtil;
+import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.dashboard.index.domain.vo.BillCountVo;
import com.ruoyi.ss.device.service.DeviceService;
import com.ruoyi.ss.device.service.DeviceValidator;
@@ -154,6 +157,22 @@ public class AppTransactionBillController extends BaseController
return getDataTable(list);
}
+
+ /**
+ * 导出订单列表
+ */
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, TransactionBillQuery query) {
+ startPage();
+ query.setIncomeUserId(getUserId());
+ query.setType(TransactionBillType.RECHARGE.getType());
+ List list = transactionBillService.selectSmTransactionBillList(query);
+ transactionAssembler.assembleChannelName(list);
+ transactionAssembler.handleMchUserMobile(list);
+ ExcelUtil util = new ExcelUtil(TransactionBillVO.class);
+ util.exportExcel(response, list, "充值订单数据");
+ }
+
@ApiOperation("获取订单详情")
@GetMapping("/{billId}")
@JsonView(JsonViewProfile.AppUser.class)
diff --git a/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/HardVersionController.java b/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/HardVersionController.java
new file mode 100644
index 00000000..8f2e9072
--- /dev/null
+++ b/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/HardVersionController.java
@@ -0,0 +1,115 @@
+package com.ruoyi.web.controller.ss;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.ss.hardVersion.domain.HardVersion;
+import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
+import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
+import com.ruoyi.ss.hardVersion.service.HardVersionAssembler;
+import com.ruoyi.ss.hardVersion.service.HardVersionService;
+
+/**
+ * 硬件版本Controller
+ *
+ * @author ruoyi
+ * @date 2025-03-11
+ */
+@RestController
+@RequestMapping("/ss/hardVersion")
+public class HardVersionController extends BaseController
+{
+ @Autowired
+ private HardVersionService hardVersionService;
+
+ @Autowired
+ private HardVersionAssembler hardVersionAssembler;
+
+ /**
+ * 查询硬件版本列表
+ */
+ @PreAuthorize("@ss.hasPermi('ss:hardVersion:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(HardVersionQuery query)
+ {
+ startPage();
+ startOrderBy();
+ List list = hardVersionService.selectHardVersionList(query);
+ hardVersionAssembler.assembleModelList(list);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出硬件版本列表
+ */
+ @PreAuthorize("@ss.hasPermi('ss:hardVersion:export')")
+ @Log(title = "硬件版本", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, HardVersionQuery query)
+ {
+ List list = hardVersionService.selectHardVersionList(query);
+ ExcelUtil util = new ExcelUtil(HardVersionVO.class);
+ util.exportExcel(response, list, "硬件版本数据");
+ }
+
+ /**
+ * 获取硬件版本详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('ss:hardVersion:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(hardVersionService.selectHardVersionById(id));
+ }
+
+ /**
+ * 新增硬件版本
+ */
+ @PreAuthorize("@ss.hasPermi('ss:hardVersion:add')")
+ @Log(title = "硬件版本", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody HardVersion hardVersion)
+ {
+ return toAjax(hardVersionService.insertHardVersion(hardVersion));
+ }
+
+ /**
+ * 修改硬件版本
+ */
+ @PreAuthorize("@ss.hasPermi('ss:hardVersion:edit')")
+ @Log(title = "硬件版本", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody HardVersion hardVersion)
+ {
+ return toAjax(hardVersionService.updateHardVersion(hardVersion));
+ }
+
+ /**
+ * 删除硬件版本
+ */
+ @PreAuthorize("@ss.hasPermi('ss:hardVersion:remove')")
+ @Log(title = "硬件版本", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(hardVersionService.deleteHardVersionByIds(ids));
+ }
+}
diff --git a/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/SmModelController.java b/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/SmModelController.java
index e1c0e202..cced489b 100644
--- a/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/SmModelController.java
+++ b/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/SmModelController.java
@@ -2,31 +2,33 @@ package com.ruoyi.web.controller.ss;
import java.util.Arrays;
import java.util.List;
+
import javax.servlet.http.HttpServletResponse;
-import com.ruoyi.common.core.domain.ValidGroup;
-import com.ruoyi.ss.model.domain.SmModelBO;
-import com.ruoyi.ss.model.domain.SmModelQuery;
-import com.ruoyi.ss.model.domain.SmModelVO;
-import com.ruoyi.ss.model.service.ModelValidator;
-import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.ss.model.service.ModelService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.domain.ValidGroup;
import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.ss.model.domain.SmModelBO;
+import com.ruoyi.ss.model.domain.SmModelQuery;
+import com.ruoyi.ss.model.domain.SmModelVO;
+import com.ruoyi.ss.model.service.ModelService;
+import com.ruoyi.ss.model.service.ModelValidator;
/**
* 型号列表Controller
@@ -55,6 +57,16 @@ public class SmModelController extends BaseController
return getDataTable(smModelService.selectSmModelList(smModel));
}
+ /**
+ * 查询型号列表列表
+ */
+ @PreAuthorize("@ss.hasPermi('system:model:list')")
+ @GetMapping("/listByIds/{ids}")
+ public AjaxResult listByIds(@PathVariable List ids)
+ {
+ return success(smModelService.selectSmModelListByIds(ids));
+ }
+
/**
* 导出型号列表列表
*/