From 59271cef2f6e75361080783bf9af3181a17db558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=87=E8=88=AA?= <653809315@qq.com> Date: Thu, 4 Jan 2024 16:51:13 +0800 Subject: [PATCH] =?UTF-8?q?police=E9=A1=B5=E9=9D=A2=E4=B8=8B=E6=8B=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/system/police/add.html | 14 +++++++++++++- .../service/impl/IdentifierStatusServiceImpl.java | 6 ++++++ .../resources/mapper/system/SysPoliceMapper.xml | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/police/add.html b/ruoyi-admin/src/main/resources/templates/system/police/add.html index dbb117d..d563c2f 100644 --- a/ruoyi-admin/src/main/resources/templates/system/police/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/police/add.html @@ -12,7 +12,7 @@
- +
@@ -72,6 +72,18 @@ //刷新父页面 parent.location.reload(); } + + fetch(ctx +'/system/radar/list') // 替换为你的后端接口地址 + .then(response => response.json()) + .then(data => { + const select = document.querySelector('select[name="station"]'); + data.forEach(station => { + const option = document.createElement('option'); + option.value = station.id; + option.textContent = station.name; + select.appendChild(option); + }); + }); \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IdentifierStatusServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IdentifierStatusServiceImpl.java index 001b297..4798f9a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IdentifierStatusServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IdentifierStatusServiceImpl.java @@ -1,7 +1,9 @@ package com.ruoyi.system.service.impl; import com.ruoyi.common.core.domain.entity.SysIdentifier; +import com.ruoyi.common.core.domain.entity.SysPolice; import com.ruoyi.system.mapper.SysIdentifierMapper; +import com.ruoyi.system.mapper.SysPoliceMapper; import com.ruoyi.system.service.ISysIdentifierService; import com.ruoyi.system.service.IdentifierStatusService; import org.slf4j.Logger; @@ -24,9 +26,13 @@ public class IdentifierStatusServiceImpl implements IdentifierStatusService @Autowired private SysIdentifierMapper identifierMapper; + + @Autowired + private SysPoliceMapper sysPoliceMapper; @Override public List selectIdentifierStatus() { List sysIdentifiers = identifierMapper.selectAllIdentifierList(); + List sysPolices = sysPoliceMapper.selectSysPoliceList(new SysPolice()); return sysIdentifiers; } } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysPoliceMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysPoliceMapper.xml index 6a04312..d0f0d51 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysPoliceMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysPoliceMapper.xml @@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"