liuxiaoxu
1 month ago
9 changed files with 0 additions and 963 deletions
@ -1,170 +0,0 @@ |
|||
package com.ruoyi.rfMsg.controller; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
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.rfMsg.domain.VnaRawData; |
|||
import com.ruoyi.rfMsg.service.IVnaRawDataService; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.LinkedHashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* rf测试历史结果Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-06-28 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/rfMsg/vnaRawData") |
|||
public class VnaRawDataController extends BaseController |
|||
{ |
|||
private String prefix = "rfMsg/vnaRawData"; |
|||
|
|||
@Autowired |
|||
private IVnaRawDataService vnaRawDataService; |
|||
|
|||
@RequiresPermissions("rfMsg:vnaRawData:view") |
|||
@GetMapping() |
|||
public String vnaRawData() |
|||
{ |
|||
return prefix + "/vnaRawData"; |
|||
} |
|||
|
|||
/** |
|||
* 查询rf测试历史结果列表 |
|||
*/ |
|||
@RequiresPermissions("rfMsg:vnaRawData:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(VnaRawData vnaRawData) |
|||
{ |
|||
startPage(); |
|||
List<VnaRawData> list = vnaRawDataService.selectVnaRawDataList(vnaRawData); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
@PostMapping("/getDataById/{id}") |
|||
@ResponseBody |
|||
public List getDataById(@PathVariable("id") Long id) |
|||
{ |
|||
startPage(); |
|||
VnaRawData vnaRawData = vnaRawDataService.selectVnaRawDataById(id); |
|||
String frequency = vnaRawData.getFrequency(); |
|||
System.out.println(frequency); |
|||
Map mapObj = JSONObject.parseObject(frequency,Map.class); |
|||
List listKey = new ArrayList(); |
|||
List listValue = new ArrayList(); |
|||
List listValueList = new ArrayList(); |
|||
// System.out.println("这个是用JSONObject的parseObject方法并执行返回类型来解析JSON字符串!!!");
|
|||
// for (Object map: mapObj.entrySet()){
|
|||
// System.out.println(((Map.Entry)map).getKey()+":"+((Map.Entry)map).getValue());
|
|||
// listKey.add(((Map.Entry)map).getKey());
|
|||
// listValue.add(((Map.Entry)map).getValue());
|
|||
// }
|
|||
// LinkedHashMap<String, String> map = JSONUtil.toBean(frequency, new TypeReference<LinkedHashMap<String, String>>() {}, true);
|
|||
// for (Map.Entry<String, String> entry : map.entrySet()) {
|
|||
// System.out.println(entry.getKey() + ": " + entry.getValue());
|
|||
// listKey.add((entry.getKey()));
|
|||
// listValue.add((entry.getValue()));
|
|||
// }
|
|||
try { |
|||
ObjectMapper objectMapper = new ObjectMapper(); |
|||
com.fasterxml.jackson.core.type.TypeReference<LinkedHashMap<String, Double>> typeRef = new com.fasterxml.jackson.core.type.TypeReference<LinkedHashMap<String, Double>>() {}; |
|||
LinkedHashMap<String, Double> map = objectMapper.readValue(frequency, typeRef); |
|||
for (Map.Entry<String, Double> entry : map.entrySet()) { |
|||
System.out.println(entry.getKey() + ": " + entry.getValue()); |
|||
listKey.add((entry.getKey())); |
|||
listValue.add((entry.getValue())); |
|||
} |
|||
} catch (Exception e) { |
|||
System.out.println("序列化出错"); |
|||
} |
|||
listValueList.add(listKey); |
|||
listValueList.add(listValue); |
|||
System.out.println(listValueList); |
|||
return listValueList; |
|||
} |
|||
|
|||
/** |
|||
* 导出rf测试历史结果列表 |
|||
*/ |
|||
@RequiresPermissions("rfMsg:vnaRawData:export") |
|||
@Log(title = "rf测试历史结果", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(VnaRawData vnaRawData) |
|||
{ |
|||
List<VnaRawData> list = vnaRawDataService.selectVnaRawDataList(vnaRawData); |
|||
ExcelUtil<VnaRawData> util = new ExcelUtil<VnaRawData>(VnaRawData.class); |
|||
return util.exportExcel(list, "rf测试历史结果数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增rf测试历史结果 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存rf测试历史结果 |
|||
*/ |
|||
@RequiresPermissions("rfMsg:vnaRawData:add") |
|||
@Log(title = "rf测试历史结果", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(VnaRawData vnaRawData) |
|||
{ |
|||
return toAjax(vnaRawDataService.insertVnaRawData(vnaRawData)); |
|||
} |
|||
|
|||
/** |
|||
* 修改rf测试历史结果 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") Long id, ModelMap mmap) |
|||
{ |
|||
VnaRawData vnaRawData = vnaRawDataService.selectVnaRawDataById(id); |
|||
mmap.put("vnaRawData", vnaRawData); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存rf测试历史结果 |
|||
*/ |
|||
@RequiresPermissions("rfMsg:vnaRawData:edit") |
|||
@Log(title = "rf测试历史结果", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(VnaRawData vnaRawData) |
|||
{ |
|||
return toAjax(vnaRawDataService.updateVnaRawData(vnaRawData)); |
|||
} |
|||
|
|||
/** |
|||
* 删除rf测试历史结果 |
|||
*/ |
|||
@RequiresPermissions("rfMsg:vnaRawData:remove") |
|||
@Log(title = "rf测试历史结果", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(vnaRawDataService.deleteVnaRawDataByIds(ids)); |
|||
} |
|||
} |
@ -1,133 +0,0 @@ |
|||
package com.ruoyi.rfMsg.domain; |
|||
|
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* rf测试历史结果对象 vna_raw_data |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-06-28 |
|||
*/ |
|||
public class VnaRawData extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 时间 */ |
|||
@Excel(name = "时间") |
|||
private String date; |
|||
|
|||
/** 序列号(设备) */ |
|||
@Excel(name = "序列号", readConverterExp = "设=备") |
|||
private String serialNumber; |
|||
|
|||
/** 操作人 */ |
|||
@Excel(name = "操作人") |
|||
private String operator; |
|||
|
|||
/** 是否通过,0为NG,1为PASS */ |
|||
@Excel(name = "是否通过,0为NG,1为PASS") |
|||
private Integer status; |
|||
|
|||
/** 端口号,例:PORT1 */ |
|||
@Excel(name = "端口号,例:PORT1") |
|||
private String port; |
|||
|
|||
/** 频率 */ |
|||
private String frequency; |
|||
|
|||
/** 数值,必须对应频率 */ |
|||
private String value; |
|||
|
|||
public void setId(Long id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setDate(String date) |
|||
{ |
|||
this.date = date; |
|||
} |
|||
|
|||
public String getDate() |
|||
{ |
|||
return date; |
|||
} |
|||
public void setSerialNumber(String serialNumber) |
|||
{ |
|||
this.serialNumber = serialNumber; |
|||
} |
|||
|
|||
public String getSerialNumber() |
|||
{ |
|||
return serialNumber; |
|||
} |
|||
public void setOperator(String operator) |
|||
{ |
|||
this.operator = operator; |
|||
} |
|||
|
|||
public String getOperator() |
|||
{ |
|||
return operator; |
|||
} |
|||
public void setStatus(Integer status) |
|||
{ |
|||
this.status = status; |
|||
} |
|||
|
|||
public Integer getStatus() |
|||
{ |
|||
return status; |
|||
} |
|||
public void setPort(String port) |
|||
{ |
|||
this.port = port; |
|||
} |
|||
|
|||
public String getPort() |
|||
{ |
|||
return port; |
|||
} |
|||
public void setFrequency(String frequency) |
|||
{ |
|||
this.frequency = frequency; |
|||
} |
|||
|
|||
public String getFrequency() |
|||
{ |
|||
return frequency; |
|||
} |
|||
public void setValue(String value) |
|||
{ |
|||
this.value = value; |
|||
} |
|||
|
|||
public String getValue() |
|||
{ |
|||
return value; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("date", getDate()) |
|||
.append("serialNumber", getSerialNumber()) |
|||
.append("operator", getOperator()) |
|||
.append("status", getStatus()) |
|||
.append("port", getPort()) |
|||
.append("frequency", getFrequency()) |
|||
.append("value", getValue()) |
|||
.toString(); |
|||
} |
|||
} |
@ -1,62 +0,0 @@ |
|||
package com.ruoyi.rfMsg.mapper; |
|||
|
|||
import com.ruoyi.rfMsg.domain.VnaRawData; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* rf测试历史结果Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-06-28 |
|||
*/ |
|||
public interface VnaRawDataMapper |
|||
{ |
|||
/** |
|||
* 查询rf测试历史结果 |
|||
* |
|||
* @param id rf测试历史结果ID |
|||
* @return rf测试历史结果 |
|||
*/ |
|||
public VnaRawData selectVnaRawDataById(Long id); |
|||
|
|||
/** |
|||
* 查询rf测试历史结果列表 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return rf测试历史结果集合 |
|||
*/ |
|||
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData); |
|||
|
|||
/** |
|||
* 新增rf测试历史结果 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertVnaRawData(VnaRawData vnaRawData); |
|||
|
|||
/** |
|||
* 修改rf测试历史结果 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateVnaRawData(VnaRawData vnaRawData); |
|||
|
|||
/** |
|||
* 删除rf测试历史结果 |
|||
* |
|||
* @param id rf测试历史结果ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteVnaRawDataById(Long id); |
|||
|
|||
/** |
|||
* 批量删除rf测试历史结果 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteVnaRawDataByIds(String[] ids); |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.ruoyi.rfMsg.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.rfMsg.domain.VnaRawData; |
|||
|
|||
/** |
|||
* rf测试历史结果Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-06-28 |
|||
*/ |
|||
public interface IVnaRawDataService |
|||
{ |
|||
/** |
|||
* 查询rf测试历史结果 |
|||
* |
|||
* @param id rf测试历史结果ID |
|||
* @return rf测试历史结果 |
|||
*/ |
|||
public VnaRawData selectVnaRawDataById(Long id); |
|||
|
|||
/** |
|||
* 查询rf测试历史结果列表 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return rf测试历史结果集合 |
|||
*/ |
|||
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData); |
|||
|
|||
/** |
|||
* 新增rf测试历史结果 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertVnaRawData(VnaRawData vnaRawData); |
|||
|
|||
/** |
|||
* 修改rf测试历史结果 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateVnaRawData(VnaRawData vnaRawData); |
|||
|
|||
/** |
|||
* 批量删除rf测试历史结果 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteVnaRawDataByIds(String ids); |
|||
|
|||
/** |
|||
* 删除rf测试历史结果信息 |
|||
* |
|||
* @param id rf测试历史结果ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteVnaRawDataById(Long id); |
|||
} |
@ -1,94 +0,0 @@ |
|||
package com.ruoyi.rfMsg.service.impl; |
|||
|
|||
import java.util.List; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.rfMsg.mapper.VnaRawDataMapper; |
|||
import com.ruoyi.rfMsg.domain.VnaRawData; |
|||
import com.ruoyi.rfMsg.service.IVnaRawDataService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* rf测试历史结果Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-06-28 |
|||
*/ |
|||
@Service |
|||
public class VnaRawDataServiceImpl implements IVnaRawDataService |
|||
{ |
|||
@Autowired |
|||
private VnaRawDataMapper vnaRawDataMapper; |
|||
|
|||
/** |
|||
* 查询rf测试历史结果 |
|||
* |
|||
* @param id rf测试历史结果ID |
|||
* @return rf测试历史结果 |
|||
*/ |
|||
@Override |
|||
public VnaRawData selectVnaRawDataById(Long id) |
|||
{ |
|||
return vnaRawDataMapper.selectVnaRawDataById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询rf测试历史结果列表 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return rf测试历史结果 |
|||
*/ |
|||
@Override |
|||
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData) |
|||
{ |
|||
return vnaRawDataMapper.selectVnaRawDataList(vnaRawData); |
|||
} |
|||
|
|||
/** |
|||
* 新增rf测试历史结果 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertVnaRawData(VnaRawData vnaRawData) |
|||
{ |
|||
return vnaRawDataMapper.insertVnaRawData(vnaRawData); |
|||
} |
|||
|
|||
/** |
|||
* 修改rf测试历史结果 |
|||
* |
|||
* @param vnaRawData rf测试历史结果 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateVnaRawData(VnaRawData vnaRawData) |
|||
{ |
|||
return vnaRawDataMapper.updateVnaRawData(vnaRawData); |
|||
} |
|||
|
|||
/** |
|||
* 删除rf测试历史结果对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteVnaRawDataByIds(String ids) |
|||
{ |
|||
return vnaRawDataMapper.deleteVnaRawDataByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除rf测试历史结果信息 |
|||
* |
|||
* @param id rf测试历史结果ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteVnaRawDataById(Long id) |
|||
{ |
|||
return vnaRawDataMapper.deleteVnaRawDataById(id); |
|||
} |
|||
} |
@ -1,85 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.rfMsg.mapper.VnaRawDataMapper"> |
|||
|
|||
<resultMap type="VnaRawData" id="VnaRawDataResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="date" column="Date" /> |
|||
<result property="serialNumber" column="Serial_Number" /> |
|||
<result property="operator" column="Operator" /> |
|||
<result property="status" column="Status" /> |
|||
<result property="port" column="Port" /> |
|||
<result property="frequency" column="Frequency" /> |
|||
<result property="value" column="Value" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectVnaRawDataVo"> |
|||
select id, Date, Serial_Number, Operator, Status, Port, Frequency, Value from vna_raw_data |
|||
</sql> |
|||
|
|||
<select id="selectVnaRawDataList" parameterType="VnaRawData" resultMap="VnaRawDataResult"> |
|||
<include refid="selectVnaRawDataVo"/> |
|||
<where> |
|||
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and Date between #{params.beginDate} and #{params.endDate}</if> |
|||
<if test="serialNumber != null and serialNumber != ''"> and Serial_Number like concat('%', #{serialNumber}, '%')</if> |
|||
<if test="operator != null and operator != ''"> and Operator like concat('%', #{operator}, '%')</if> |
|||
<if test="status != null "> and Status = #{status}</if> |
|||
<if test="port != null and port != ''"> and Port = #{port}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectVnaRawDataById" parameterType="Long" resultMap="VnaRawDataResult"> |
|||
<include refid="selectVnaRawDataVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertVnaRawData" parameterType="VnaRawData" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into vna_raw_data |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="date != null and date != ''">Date,</if> |
|||
<if test="serialNumber != null and serialNumber != ''">Serial_Number,</if> |
|||
<if test="operator != null">Operator,</if> |
|||
<if test="status != null">Status,</if> |
|||
<if test="port != null and port != ''">Port,</if> |
|||
<if test="frequency != null">Frequency,</if> |
|||
<if test="value != null">Value,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="date != null and date != ''">#{date},</if> |
|||
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if> |
|||
<if test="operator != null">#{operator},</if> |
|||
<if test="status != null">#{status},</if> |
|||
<if test="port != null and port != ''">#{port},</if> |
|||
<if test="frequency != null">#{frequency},</if> |
|||
<if test="value != null">#{value},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateVnaRawData" parameterType="VnaRawData"> |
|||
update vna_raw_data |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="date != null and date != ''">Date = #{date},</if> |
|||
<if test="serialNumber != null and serialNumber != ''">Serial_Number = #{serialNumber},</if> |
|||
<if test="operator != null">Operator = #{operator},</if> |
|||
<if test="status != null">Status = #{status},</if> |
|||
<if test="port != null and port != ''">Port = #{port},</if> |
|||
<if test="frequency != null">Frequency = #{frequency},</if> |
|||
<if test="value != null">Value = #{value},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteVnaRawDataById" parameterType="Long"> |
|||
delete from vna_raw_data where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteVnaRawDataByIds" parameterType="String"> |
|||
delete from vna_raw_data where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
</mapper> |
@ -1,69 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增rf测试历史结果')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-vnaRawData-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="date" class="form-control" placeholder="yyyy-MM-dd" type="text" required> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">序列号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="serialNumber" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">操作人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="operator" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">是否通过,0为NG,1为PASS:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('vna_raw_data_status')}"> |
|||
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required> |
|||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">端口号,例:PORT1:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="port" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "rfMsg/vnaRawData" |
|||
$("#form-vnaRawData-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-vnaRawData-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='date']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,70 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改rf测试历史结果')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-vnaRawData-edit" th:object="${vnaRawData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="date" th:value="${#dates.format(vnaRawData.date, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">序列号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="serialNumber" th:field="*{serialNumber}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">操作人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="operator" th:field="*{operator}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">是否通过,0为NG,1为PASS:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('vna_raw_data_status')}"> |
|||
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}" required> |
|||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">端口号,例:PORT1:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="port" th:field="*{port}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "rfMsg/vnaRawData"; |
|||
$("#form-vnaRawData-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-vnaRawData-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='date']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,219 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('rf测试历史结果列表')" /> |
|||
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.2/dist/echarts.min.js"></script> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li class="select-time"> |
|||
<label>时间:</label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginDate]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endDate]"/> |
|||
</li> |
|||
<li> |
|||
<label>序列号:</label> |
|||
<input type="text" name="serialNumber"/> |
|||
</li> |
|||
<li> |
|||
<label>操作人:</label> |
|||
<input type="text" name="operator"/> |
|||
</li> |
|||
<li> |
|||
<label>是否通过,0为NG,1为PASS:</label> |
|||
<select name="status" th:with="type=${@dict.getType('vna_raw_data_status')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>端口号,例:PORT1:</label> |
|||
<input type="text" name="port"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="rfMsg:vnaRawData:add">--> |
|||
<!-- <i class="fa fa-plus"></i> 添加--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="rfMsg:vnaRawData:edit">--> |
|||
<!-- <i class="fa fa-edit"></i> 修改--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="rfMsg:vnaRawData:remove">--> |
|||
<!-- <i class="fa fa-remove"></i> 删除--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="rfMsg:vnaRawData:export">--> |
|||
<!-- <i class="fa fa-download"></i> 导出--> |
|||
<!-- </a>--> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('rfMsg:vnaRawData:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('rfMsg:vnaRawData:remove')}]]; |
|||
var statusDatas = [[${@dict.getType('vna_raw_data_status')}]]; |
|||
var prefix = ctx + "rfMsg/vnaRawData"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "rf测试历史结果", |
|||
detailView: true, |
|||
columns: [ |
|||
// { |
|||
// checkbox: true |
|||
// }, |
|||
{ |
|||
field: 'id', |
|||
title: 'id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'date', |
|||
title: '时间' |
|||
}, |
|||
{ |
|||
field: 'serialNumber', |
|||
title: '序列号' |
|||
}, |
|||
{ |
|||
field: 'operator', |
|||
title: '操作人' |
|||
}, |
|||
{ |
|||
field: 'status', |
|||
title: '是否通过,0为NG,1为PASS', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(statusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'port', |
|||
title: '端口号,例:PORT1' |
|||
}], |
|||
// { |
|||
// title: '操作', |
|||
// align: 'center', |
|||
// formatter: function(value, row, index) { |
|||
// var actions = []; |
|||
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|||
// return actions.join(''); |
|||
// } |
|||
// } |
|||
onExpandRow: function (index, row, $detail) { |
|||
initSubTable(index, row, $detail); |
|||
}, |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
|
|||
function initSubTable(index, row, $detail) { |
|||
var parentid = row.id; |
|||
var cur_table = $detail.html('<table id="table_' + parentid + '">' + |
|||
'<tbody id="tbody_' + parentid +'"></tbody>' + |
|||
'</table>').find('table'); |
|||
getData(parentid) |
|||
$(cur_table).bootstrapTable({ |
|||
// data: confirm_income_list_sun, |
|||
pageSize: 10, |
|||
detailView: false, //是否显示父子表 |
|||
singleSelect: true, |
|||
contentType: "application/x-www-form-urlencoded" |
|||
}); |
|||
} |
|||
|
|||
function getData(id) { |
|||
$.ajax({ |
|||
url: prefix + '/getDataById/'+id, |
|||
type: 'post', |
|||
success: function (res) { |
|||
// console.log(id) |
|||
// console.log(res) |
|||
// console.log(res[0]) |
|||
// console.log(res[1]) |
|||
var listKey = res[0] |
|||
var listValue = res[1] |
|||
var tableThead = ""; |
|||
// for (var i = 0; i < listKey.length; i++) { |
|||
// tableThead = tableThead + "<th>" + listKey[i] |
|||
// + "</th>"; |
|||
// } |
|||
//将动态生成的table添加的事先隐藏的div中. |
|||
// $("#thead_"+id).html(tableThead); |
|||
var tableTbody = "<tr>"; |
|||
for (var i = 0; i < listKey.length; i++) { |
|||
tableTbody += "<td>" + listKey[i] + "</td>"; |
|||
} |
|||
tableTbody += "</tr><tr>"; |
|||
for (var i = 0; i < listValue.length; i++) { |
|||
tableTbody += "<td>" + listValue[i] + "</td>"; |
|||
} |
|||
tableTbody += "</tr>"; |
|||
// for (var j = 0; j < listValue.length; j++) { |
|||
// tableTbody = tableTbody + "<tr><td>" + listValue[j] |
|||
// + "</td></tr>"; |
|||
// } |
|||
//将动态生成的table添加的事先隐藏的div中. |
|||
var chartsInfo =""; |
|||
chartsInfo+="<tr><td colspan='"+listValue.length+"'>" + |
|||
"<div id='charts"+id+"' style='height: 55vh;width: 90vw'></div>" + |
|||
"" + |
|||
"</td></tr>" |
|||
tableTbody+=chartsInfo |
|||
$("#tbody_"+id).html(tableTbody); |
|||
initEcharts(listKey,listValue,id) |
|||
} |
|||
}) |
|||
} |
|||
|
|||
|
|||
function initEcharts(listKey ,listValue,id){ |
|||
var chartDom = document.getElementById('charts'+id); |
|||
var myChart = echarts.init(chartDom); |
|||
var option; |
|||
|
|||
option = { |
|||
xAxis: { |
|||
type: 'category', |
|||
data: listKey |
|||
}, |
|||
yAxis: { |
|||
type: 'value' |
|||
}, |
|||
series: [ |
|||
{ |
|||
data: listValue, |
|||
type: 'line', |
|||
smooth: true |
|||
} |
|||
] |
|||
}; |
|||
|
|||
option && myChart.setOption(option); |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue