工业园区数据平台对接中心
This commit is contained in:
parent
f50785e059
commit
03a7808c68
@ -0,0 +1,105 @@
|
||||
package com.god.systemDocking.controller;
|
||||
|
||||
import com.god.common.annotation.Log;
|
||||
import com.god.common.core.controller.BaseController;
|
||||
import com.god.common.core.domain.AjaxResult;
|
||||
import com.god.common.core.page.TableDataInfo;
|
||||
import com.god.common.enums.BusinessType;
|
||||
import com.god.common.utils.poi.ExcelUtil;
|
||||
import com.god.systemDocking.domain.GyyqSystemDocking;
|
||||
import com.god.systemDocking.service.IGyyqSystemDockingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水电数据平台Controller
|
||||
*
|
||||
* @author Lxz
|
||||
* @date 2023-11-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/systemDocking/gyyqSystemDocking")
|
||||
public class GyyqSystemDockingController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IGyyqSystemDockingService gyyqSystemDockingService;
|
||||
|
||||
/**
|
||||
* 查询水电数据平台列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('systemDocking:gyyqSystemDocking:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(GyyqSystemDocking gyyqSystemDocking)
|
||||
{
|
||||
startPage();
|
||||
List<GyyqSystemDocking> list = gyyqSystemDockingService.selectGyyqSystemDockingList(gyyqSystemDocking);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@GetMapping(value = "/list1/{id}")
|
||||
public TableDataInfo list1(@PathVariable("id") String id)
|
||||
{
|
||||
startPage();
|
||||
List<GyyqSystemDocking> list = Collections.singletonList(gyyqSystemDockingService.selectGyyqSystemDockingById(id));
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出水电数据平台列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('systemDocking:gyyqSystemDocking:export')")
|
||||
@Log(title = "水电数据平台", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GyyqSystemDocking gyyqSystemDocking)
|
||||
{
|
||||
List<GyyqSystemDocking> list = gyyqSystemDockingService.selectGyyqSystemDockingList(gyyqSystemDocking);
|
||||
ExcelUtil<GyyqSystemDocking> util = new ExcelUtil<GyyqSystemDocking>(GyyqSystemDocking.class);
|
||||
util.exportExcel(response, list, "水电数据平台数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取水电数据平台详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('systemDocking:gyyqSystemDocking:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(gyyqSystemDockingService.selectGyyqSystemDockingById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水电数据平台
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('systemDocking:gyyqSystemDocking:add')")
|
||||
@Log(title = "水电数据平台", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody GyyqSystemDocking gyyqSystemDocking)
|
||||
{
|
||||
return toAjax(gyyqSystemDockingService.insertGyyqSystemDocking(gyyqSystemDocking));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水电数据平台
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('systemDocking:gyyqSystemDocking:edit')")
|
||||
@Log(title = "水电数据平台", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody GyyqSystemDocking gyyqSystemDocking)
|
||||
{
|
||||
return toAjax(gyyqSystemDockingService.updateGyyqSystemDocking(gyyqSystemDocking));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水电数据平台
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('systemDocking:gyyqSystemDocking:remove')")
|
||||
@Log(title = "水电数据平台", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(gyyqSystemDockingService.deleteGyyqSystemDockingByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
package com.god.systemDocking.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.god.common.annotation.Excel;
|
||||
import com.god.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 水电数据平台对象 gyyq_system_docking
|
||||
*
|
||||
* @author Lxz
|
||||
* @date 2023-11-10
|
||||
*/
|
||||
public class GyyqSystemDocking extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 系统名称 */
|
||||
@Excel(name = "系统名称")
|
||||
private String sysName;
|
||||
|
||||
/** ip */
|
||||
@Excel(name = "ip")
|
||||
private String ip;
|
||||
|
||||
/** 端口 */
|
||||
@Excel(name = "端口")
|
||||
private String num;
|
||||
|
||||
/** 接口地址 */
|
||||
@Excel(name = "接口地址")
|
||||
private String address;
|
||||
|
||||
/** token */
|
||||
@Excel(name = "token")
|
||||
private String token;
|
||||
|
||||
/** 账号 */
|
||||
@Excel(name = "账号")
|
||||
private String accountNumber;
|
||||
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String password;
|
||||
|
||||
/** 接口地址 */
|
||||
@Excel(name = "接口地址")
|
||||
private String interfa;
|
||||
|
||||
/** 调用方式 */
|
||||
@Excel(name = "调用方式")
|
||||
private String callMethod;
|
||||
|
||||
/** 数据格式 */
|
||||
@Excel(name = "数据格式")
|
||||
private String dataType;
|
||||
|
||||
/** 同步时间 */
|
||||
@Excel(name = "同步时间")
|
||||
private String dateTime;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSysName(String sysName)
|
||||
{
|
||||
this.sysName = sysName;
|
||||
}
|
||||
|
||||
public String getSysName()
|
||||
{
|
||||
return sysName;
|
||||
}
|
||||
public void setIp(String ip)
|
||||
{
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getIp()
|
||||
{
|
||||
return ip;
|
||||
}
|
||||
public void setNum(String num)
|
||||
{
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getNum()
|
||||
{
|
||||
return num;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setToken(String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
public void setAccountNumber(String accountNumber)
|
||||
{
|
||||
this.accountNumber = accountNumber;
|
||||
}
|
||||
|
||||
public String getAccountNumber()
|
||||
{
|
||||
return accountNumber;
|
||||
}
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
public void setInterfa(String interfa)
|
||||
{
|
||||
this.interfa = interfa;
|
||||
}
|
||||
|
||||
public String getInterfa()
|
||||
{
|
||||
return interfa;
|
||||
}
|
||||
public void setCallMethod(String callMethod)
|
||||
{
|
||||
this.callMethod = callMethod;
|
||||
}
|
||||
|
||||
public String getCallMethod()
|
||||
{
|
||||
return callMethod;
|
||||
}
|
||||
public void setDataType(String dataType)
|
||||
{
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getDataType()
|
||||
{
|
||||
return dataType;
|
||||
}
|
||||
public void setDateTime(String dateTime)
|
||||
{
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
public String getDateTime()
|
||||
{
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sysName", getSysName())
|
||||
.append("ip", getIp())
|
||||
.append("num", getNum())
|
||||
.append("address", getAddress())
|
||||
.append("token", getToken())
|
||||
.append("accountNumber", getAccountNumber())
|
||||
.append("password", getPassword())
|
||||
.append("interfa", getInterfa())
|
||||
.append("callMethod", getCallMethod())
|
||||
.append("dataType", getDataType())
|
||||
.append("dateTime", getDateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.god.systemDocking.mapper;
|
||||
|
||||
import com.god.systemDocking.domain.GyyqSystemDocking;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水电数据平台Mapper接口
|
||||
*
|
||||
* @author Lxz
|
||||
* @date 2023-11-10
|
||||
*/
|
||||
public interface GyyqSystemDockingMapper
|
||||
{
|
||||
/**
|
||||
* 查询水电数据平台
|
||||
*
|
||||
* @param id 水电数据平台主键
|
||||
* @return 水电数据平台
|
||||
*/
|
||||
public GyyqSystemDocking selectGyyqSystemDockingById(String id);
|
||||
|
||||
/**
|
||||
* 查询水电数据平台列表
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 水电数据平台集合
|
||||
*/
|
||||
public List<GyyqSystemDocking> selectGyyqSystemDockingList(GyyqSystemDocking gyyqSystemDocking);
|
||||
|
||||
/**
|
||||
* 新增水电数据平台
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGyyqSystemDocking(GyyqSystemDocking gyyqSystemDocking);
|
||||
|
||||
/**
|
||||
* 修改水电数据平台
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGyyqSystemDocking(GyyqSystemDocking gyyqSystemDocking);
|
||||
|
||||
/**
|
||||
* 删除水电数据平台
|
||||
*
|
||||
* @param id 水电数据平台主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGyyqSystemDockingById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除水电数据平台
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGyyqSystemDockingByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.god.systemDocking.service;
|
||||
|
||||
import com.god.systemDocking.domain.GyyqSystemDocking;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水电数据平台Service接口
|
||||
*
|
||||
* @author Lxz
|
||||
* @date 2023-11-10
|
||||
*/
|
||||
public interface IGyyqSystemDockingService
|
||||
{
|
||||
/**
|
||||
* 查询水电数据平台
|
||||
*
|
||||
* @param id 水电数据平台主键
|
||||
* @return 水电数据平台
|
||||
*/
|
||||
public GyyqSystemDocking selectGyyqSystemDockingById(String id);
|
||||
|
||||
/**
|
||||
* 查询水电数据平台列表
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 水电数据平台集合
|
||||
*/
|
||||
public List<GyyqSystemDocking> selectGyyqSystemDockingList(GyyqSystemDocking gyyqSystemDocking);
|
||||
|
||||
/**
|
||||
* 新增水电数据平台
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGyyqSystemDocking(GyyqSystemDocking gyyqSystemDocking);
|
||||
|
||||
/**
|
||||
* 修改水电数据平台
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGyyqSystemDocking(GyyqSystemDocking gyyqSystemDocking);
|
||||
|
||||
/**
|
||||
* 批量删除水电数据平台
|
||||
*
|
||||
* @param ids 需要删除的水电数据平台主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGyyqSystemDockingByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除水电数据平台信息
|
||||
*
|
||||
* @param id 水电数据平台主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGyyqSystemDockingById(String id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.god.systemDocking.service.impl;
|
||||
|
||||
import com.god.common.utils.uuid.IdUtils;
|
||||
import com.god.systemDocking.domain.GyyqSystemDocking;
|
||||
import com.god.systemDocking.mapper.GyyqSystemDockingMapper;
|
||||
import com.god.systemDocking.service.IGyyqSystemDockingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水电数据平台Service业务层处理
|
||||
*
|
||||
* @author Lxz
|
||||
* @date 2023-11-10
|
||||
*/
|
||||
@Service
|
||||
public class GyyqSystemDockingServiceImpl implements IGyyqSystemDockingService
|
||||
{
|
||||
@Autowired
|
||||
private GyyqSystemDockingMapper gyyqSystemDockingMapper;
|
||||
|
||||
/**
|
||||
* 查询水电数据平台
|
||||
*
|
||||
* @param id 水电数据平台主键
|
||||
* @return 水电数据平台
|
||||
*/
|
||||
@Override
|
||||
public GyyqSystemDocking selectGyyqSystemDockingById(String id)
|
||||
{
|
||||
return gyyqSystemDockingMapper.selectGyyqSystemDockingById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询水电数据平台列表
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 水电数据平台
|
||||
*/
|
||||
@Override
|
||||
public List<GyyqSystemDocking> selectGyyqSystemDockingList(GyyqSystemDocking gyyqSystemDocking)
|
||||
{
|
||||
return gyyqSystemDockingMapper.selectGyyqSystemDockingList(gyyqSystemDocking);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水电数据平台
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGyyqSystemDocking(GyyqSystemDocking gyyqSystemDocking)
|
||||
{
|
||||
gyyqSystemDocking.setId(IdUtils.fastUUID());
|
||||
return gyyqSystemDockingMapper.insertGyyqSystemDocking(gyyqSystemDocking);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水电数据平台
|
||||
*
|
||||
* @param gyyqSystemDocking 水电数据平台
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGyyqSystemDocking(GyyqSystemDocking gyyqSystemDocking)
|
||||
{
|
||||
return gyyqSystemDockingMapper.updateGyyqSystemDocking(gyyqSystemDocking);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除水电数据平台
|
||||
*
|
||||
* @param ids 需要删除的水电数据平台主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGyyqSystemDockingByIds(String[] ids)
|
||||
{
|
||||
return gyyqSystemDockingMapper.deleteGyyqSystemDockingByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水电数据平台信息
|
||||
*
|
||||
* @param id 水电数据平台主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGyyqSystemDockingById(String id)
|
||||
{
|
||||
return gyyqSystemDockingMapper.deleteGyyqSystemDockingById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,181 @@
|
||||
<?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.god.systemDocking.mapper.GyyqSystemDockingMapper">
|
||||
|
||||
<resultMap type="GyyqSystemDocking" id="GyyqSystemDockingResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="sysName" column="sys_name"/>
|
||||
<result property="ip" column="ip"/>
|
||||
<result property="num" column="num"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="token" column="token"/>
|
||||
<result property="accountNumber" column="account_number"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="interfa" column="interfa"/>
|
||||
<result property="callMethod" column="call_method"/>
|
||||
<result property="dataType" column="data_type"/>
|
||||
<result property="dateTime" column="date_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGyyqSystemDockingVo">
|
||||
select id,
|
||||
sys_name,
|
||||
ip,
|
||||
num,
|
||||
address,
|
||||
token,
|
||||
account_number,
|
||||
password,
|
||||
interfa,
|
||||
call_method,
|
||||
data_type,
|
||||
date_time
|
||||
from gyyq_system_docking
|
||||
</sql>
|
||||
|
||||
<select id="selectGyyqSystemDockingList" parameterType="GyyqSystemDocking" resultMap="GyyqSystemDockingResult">
|
||||
<include refid="selectGyyqSystemDockingVo"/>
|
||||
<where>
|
||||
<if test="sysName != null and sysName != ''"> and sys_name like concat('%',
|
||||
#{sysName},
|
||||
'%'
|
||||
)</if>
|
||||
<if test="ip != null and ip != ''"> and ip =
|
||||
#{ip}</if>
|
||||
<if test="num != null and num != ''"> and num =
|
||||
#{num}</if>
|
||||
<if test="address != null and address != ''"> and address =
|
||||
#{address}</if>
|
||||
<if test="token != null and token != ''"> and token =
|
||||
#{token}</if>
|
||||
<if test="accountNumber != null and accountNumber != ''"> and account_number =
|
||||
#{accountNumber}</if>
|
||||
<if test="password != null and password != ''"> and password =
|
||||
#{password}</if>
|
||||
<if test="interfa != null and interfa != ''"> and interfa =
|
||||
#{interfa}</if>
|
||||
<if test="callMethod != null and callMethod != ''"> and call_method =
|
||||
#{callMethod}</if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type =
|
||||
#{dataType}</if>
|
||||
<if test="dateTime != null and dateTime != ''"> and date_time =
|
||||
#{dateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGyyqSystemDockingById" parameterType="String" resultMap="GyyqSystemDockingResult">
|
||||
<include refid="selectGyyqSystemDockingVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGyyqSystemDocking" parameterType="GyyqSystemDocking">
|
||||
insert into gyyq_system_docking
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id
|
||||
,</if>
|
||||
<if test="sysName != null">sys_name
|
||||
,</if>
|
||||
<if test="ip != null">ip
|
||||
,</if>
|
||||
<if test="num != null">num
|
||||
,</if>
|
||||
<if test="address != null">address
|
||||
,</if>
|
||||
<if test="token != null">token
|
||||
,</if>
|
||||
<if test="accountNumber != null">account_number
|
||||
,</if>
|
||||
<if test="password != null">password
|
||||
,</if>
|
||||
<if test="interfa != null">interfa
|
||||
,</if>
|
||||
<if test="callMethod != null">call_method
|
||||
,</if>
|
||||
<if test="dataType != null">data_type
|
||||
,</if>
|
||||
<if test="dateTime != null">date_time
|
||||
,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id}
|
||||
,</if>
|
||||
<if test="sysName != null">#{sysName}
|
||||
,</if>
|
||||
<if test="ip != null">#{ip}
|
||||
,</if>
|
||||
<if test="num != null">#{num}
|
||||
,</if>
|
||||
<if test="address != null">#{address}
|
||||
,</if>
|
||||
<if test="token != null">#{token}
|
||||
,</if>
|
||||
<if test="accountNumber != null">#{accountNumber}
|
||||
,</if>
|
||||
<if test="password != null">#{password}
|
||||
,</if>
|
||||
<if test="interfa != null">#{interfa}
|
||||
,</if>
|
||||
<if test="callMethod != null">#{callMethod}
|
||||
,</if>
|
||||
<if test="dataType != null">#{dataType}
|
||||
,</if>
|
||||
<if test="dateTime != null">#{dateTime}
|
||||
,</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGyyqSystemDocking" parameterType="GyyqSystemDocking">
|
||||
update gyyq_system_docking
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sysName != null">sys_name
|
||||
=
|
||||
#{sysName},</if>
|
||||
<if test="ip != null">ip
|
||||
=
|
||||
#{ip},</if>
|
||||
<if test="num != null">num
|
||||
=
|
||||
#{num},</if>
|
||||
<if test="address != null">address
|
||||
=
|
||||
#{address},</if>
|
||||
<if test="token != null">token
|
||||
=
|
||||
#{token},</if>
|
||||
<if test="accountNumber != null">account_number
|
||||
=
|
||||
#{accountNumber},</if>
|
||||
<if test="password != null">password
|
||||
=
|
||||
#{password},</if>
|
||||
<if test="interfa != null">interfa
|
||||
=
|
||||
#{interfa},</if>
|
||||
<if test="callMethod != null">call_method
|
||||
=
|
||||
#{callMethod},</if>
|
||||
<if test="dataType != null">data_type
|
||||
=
|
||||
#{dataType},</if>
|
||||
<if test="dateTime != null">date_time
|
||||
=
|
||||
#{dateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGyyqSystemDockingById" parameterType="String">
|
||||
delete
|
||||
from gyyq_system_docking
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGyyqSystemDockingByIds" parameterType="String">
|
||||
delete from gyyq_system_docking where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
51
god-ui/src/api/systemDocking/gyyqSystemDocking.js
Normal file
51
god-ui/src/api/systemDocking/gyyqSystemDocking.js
Normal file
@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询水电数据平台列表
|
||||
export function listGyyqSystemDocking(query) {
|
||||
return request({
|
||||
url: '/systemDocking/gyyqSystemDocking/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询水电数据平台详细
|
||||
export function getGyyqSystemDocking(id) {
|
||||
return request({
|
||||
url: '/systemDocking/gyyqSystemDocking/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function list1(id) {
|
||||
return request({
|
||||
url: '/systemDocking/gyyqSystemDocking/list1/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增水电数据平台
|
||||
export function addGyyqSystemDocking(data) {
|
||||
return request({
|
||||
url: '/systemDocking/gyyqSystemDocking',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改水电数据平台
|
||||
export function updateGyyqSystemDocking(data) {
|
||||
return request({
|
||||
url: '/systemDocking/gyyqSystemDocking',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除水电数据平台
|
||||
export function delGyyqSystemDocking(id) {
|
||||
return request({
|
||||
url: '/systemDocking/gyyqSystemDocking/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
401
god-ui/src/views/systemDocking/gyyqSystemDocking/index.vue
Normal file
401
god-ui/src/views/systemDocking/gyyqSystemDocking/index.vue
Normal file
@ -0,0 +1,401 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="系统名称" prop="sysName">
|
||||
<el-input
|
||||
v-model="queryParams.sysName"
|
||||
placeholder="请输入系统名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="ip" prop="ip">
|
||||
<el-input
|
||||
v-model="queryParams.ip"
|
||||
placeholder="请输入ip"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="端口" prop="num">
|
||||
<el-input
|
||||
v-model="queryParams.num"
|
||||
placeholder="请输入端口"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口地址" prop="address">
|
||||
<el-input
|
||||
v-model="queryParams.address"
|
||||
placeholder="请输入接口地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['systemDocking:gyyqSystemDocking:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['systemDocking:gyyqSystemDocking:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['systemDocking:gyyqSystemDocking:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['systemDocking:gyyqSystemDocking:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="gyyqSystemDockingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="系统名称" align="center" prop="sysName"/>
|
||||
<el-table-column label="ip" align="center" prop="ip"/>
|
||||
<el-table-column label="端口" align="center" prop="num"/>
|
||||
<el-table-column label="接口地址" align="center" prop="address"/>
|
||||
<el-table-column label="token" align="center" prop="token" show-overflow-tooltip="true"/>
|
||||
<el-table-column label="账号" align="center" prop="accountNumber"/>
|
||||
<el-table-column label="密码" align="center" prop="password"/>
|
||||
<!-- <el-table-column label="接口地址" align="center" prop="interfa"/>-->
|
||||
<!-- <el-table-column label="调用方式" align="center" prop="callMethod"/>-->
|
||||
<!-- <el-table-column label="数据格式" align="center" prop="dataType"/>-->
|
||||
<!-- <el-table-column label="同步时间" align="center" prop="dateTime">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.dateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate1(scope.row)"
|
||||
>测试
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['systemDocking:gyyqSystemDocking:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['systemDocking:gyyqSystemDocking:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改水电数据平台对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="系统名称" prop="sysName">
|
||||
<el-input v-model="form.sysName" placeholder="请输入系统名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="ip" prop="ip">
|
||||
<el-input v-model="form.ip" placeholder="请输入ip"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="端口" prop="num">
|
||||
<el-input v-model="form.num" placeholder="请输入端口"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口地址" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入接口地址"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="token" prop="token">
|
||||
<el-input v-model="form.token" placeholder="请输入token"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号" prop="accountNumber">
|
||||
<el-input v-model="form.accountNumber" placeholder="请输入账号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-input v-model="form.password" placeholder="请输入密码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口地址" prop="interfa">
|
||||
<el-input v-model="form.interfa" placeholder="请输入接口地址"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="调用方式" prop="callMethod">
|
||||
<el-input v-model="form.callMethod" placeholder="请输入调用方式"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据格式" prop="callMethod">
|
||||
<el-input v-model="form.dataType" placeholder="请输入数据格式"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="同步时间" prop="dateTime">
|
||||
<!-- <el-input v-model="form.dateTime" placeholder="请输入同步时间"/>-->
|
||||
<el-date-picker clearable
|
||||
v-model="form.dateTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="open1" width="1000px" append-to-body>
|
||||
<el-table v-loading="loading" :data="gyyqSystemDockingList1">
|
||||
<el-table-column label="ip" align="center" prop="ip"/>
|
||||
<el-table-column label="端口" align="center" prop="num"/>
|
||||
<el-table-column label="接口地址" align="center" prop="address"/>
|
||||
<el-table-column label="调用方式" align="center" prop="callMethod"/>
|
||||
<el-table-column label="数据格式" align="center" prop="dataType"/>
|
||||
<el-table-column label="同步时间" align="center" prop="dateTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.dateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate2()"
|
||||
>调用
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listGyyqSystemDocking,
|
||||
getGyyqSystemDocking,
|
||||
delGyyqSystemDocking,
|
||||
addGyyqSystemDocking,
|
||||
updateGyyqSystemDocking, list1
|
||||
} from '@/api/systemDocking/gyyqSystemDocking'
|
||||
|
||||
export default {
|
||||
name: 'GyyqSystemDocking',
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 水电数据平台表格数据
|
||||
gyyqSystemDockingList: [],
|
||||
gyyqSystemDockingList1: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false, title1: '',
|
||||
// 是否显示弹出层
|
||||
open1: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sysName: null,
|
||||
ip: null,
|
||||
num: null,
|
||||
address: null,
|
||||
token: null,
|
||||
accountNumber: null,
|
||||
password: null,
|
||||
interfa: null,
|
||||
callMethod: null,
|
||||
dataType: null,
|
||||
dateTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询水电数据平台列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listGyyqSystemDocking(this.queryParams).then(response => {
|
||||
this.gyyqSystemDockingList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
sysName: null,
|
||||
ip: null,
|
||||
num: null,
|
||||
address: null,
|
||||
token: null,
|
||||
accountNumber: null,
|
||||
password: null,
|
||||
interfa: null,
|
||||
callMethod: null,
|
||||
dataType: null,
|
||||
dateTime: null
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '添加水电数据平台'
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const id = row.id || this.ids
|
||||
getGyyqSystemDocking(id).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = '修改水电数据平台'
|
||||
})
|
||||
},
|
||||
handleUpdate1(row) {
|
||||
this.reset()
|
||||
const id = row.id || this.ids
|
||||
console.log(id)
|
||||
list1(id).then(response => {
|
||||
this.gyyqSystemDockingList1 = response.rows
|
||||
console.log(response.rows)
|
||||
this.open1 = true
|
||||
this.title1 = '接口详情'
|
||||
})
|
||||
},
|
||||
handleUpdate2() {
|
||||
this.$modal.msgSuccess('调用成功')
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateGyyqSystemDocking(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addGyyqSystemDocking(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除水电数据平台编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delGyyqSystemDocking(ids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('systemDocking/gyyqSystemDocking/export', {
|
||||
...this.queryParams
|
||||
}, `gyyqSystemDocking_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user