diff --git a/God-Vue-master/god-system/src/main/java/com/god/systemDocking/controller/GyyqSystemDockingController.java b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/controller/GyyqSystemDockingController.java new file mode 100644 index 00000000..1e77f2b4 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/controller/GyyqSystemDockingController.java @@ -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 list = gyyqSystemDockingService.selectGyyqSystemDockingList(gyyqSystemDocking); + return getDataTable(list); + } + @GetMapping(value = "/list1/{id}") + public TableDataInfo list1(@PathVariable("id") String id) + { + startPage(); + List 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 list = gyyqSystemDockingService.selectGyyqSystemDockingList(gyyqSystemDocking); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/systemDocking/domain/GyyqSystemDocking.java b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/domain/GyyqSystemDocking.java new file mode 100644 index 00000000..325ed795 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/domain/GyyqSystemDocking.java @@ -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(); + } +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/systemDocking/mapper/GyyqSystemDockingMapper.java b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/mapper/GyyqSystemDockingMapper.java new file mode 100644 index 00000000..16cc60bb --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/mapper/GyyqSystemDockingMapper.java @@ -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 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); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/systemDocking/service/IGyyqSystemDockingService.java b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/service/IGyyqSystemDockingService.java new file mode 100644 index 00000000..c6e5ed61 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/service/IGyyqSystemDockingService.java @@ -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 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); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/systemDocking/service/impl/GyyqSystemDockingServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/service/impl/GyyqSystemDockingServiceImpl.java new file mode 100644 index 00000000..f9bc6398 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/systemDocking/service/impl/GyyqSystemDockingServiceImpl.java @@ -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 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); + } +} diff --git a/God-Vue-master/god-system/src/main/resources/mapper/systemDocking/GyyqSystemDockingMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/systemDocking/GyyqSystemDockingMapper.xml new file mode 100644 index 00000000..c3bd3ff7 --- /dev/null +++ b/God-Vue-master/god-system/src/main/resources/mapper/systemDocking/GyyqSystemDockingMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + select id, + sys_name, + ip, + num, + address, + token, + account_number, + password, + interfa, + call_method, + data_type, + date_time + from gyyq_system_docking + + + + + + + + insert into gyyq_system_docking + + id + , + sys_name + , + ip + , + num + , + address + , + token + , + account_number + , + password + , + interfa + , + call_method + , + data_type + , + date_time + , + + + #{id} + , + #{sysName} + , + #{ip} + , + #{num} + , + #{address} + , + #{token} + , + #{accountNumber} + , + #{password} + , + #{interfa} + , + #{callMethod} + , + #{dataType} + , + #{dateTime} + , + + + + + update gyyq_system_docking + + sys_name + = + #{sysName}, + ip + = + #{ip}, + num + = + #{num}, + address + = + #{address}, + token + = + #{token}, + account_number + = + #{accountNumber}, + password + = + #{password}, + interfa + = + #{interfa}, + call_method + = + #{callMethod}, + data_type + = + #{dataType}, + date_time + = + #{dateTime}, + + where id = #{id} + + + + delete + from gyyq_system_docking + where id = #{id} + + + + delete from gyyq_system_docking where id in + + #{id} + + + \ No newline at end of file diff --git a/god-ui/src/api/systemDocking/gyyqSystemDocking.js b/god-ui/src/api/systemDocking/gyyqSystemDocking.js new file mode 100644 index 00000000..f886b829 --- /dev/null +++ b/god-ui/src/api/systemDocking/gyyqSystemDocking.js @@ -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' + }) +} diff --git a/god-ui/src/views/systemDocking/gyyqSystemDocking/index.vue b/god-ui/src/views/systemDocking/gyyqSystemDocking/index.vue new file mode 100644 index 00000000..6d313435 --- /dev/null +++ b/god-ui/src/views/systemDocking/gyyqSystemDocking/index.vue @@ -0,0 +1,401 @@ + + +