From b2ad4e4aa11206b53f36c5c65c9d29d756b160f6 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期六, 30 八月 2025 13:26:19 +0800
Subject: [PATCH] 站点功能优化

---
 rsf-admin/src/page/work/outBound/OutBoundList.jsx                                               |    1 -
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java    |    3 +++
 rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeviceSiteController.java    |    2 +-
 rsf-admin/src/page/basicInfo/deviceSite/DeviceSiteList.jsx                                      |    5 ++---
 rsf-admin/src/page/basicInfo/deviceSite/InitModal.jsx                                           |    2 --
 rsf-open-api/src/main/resources/application-dev.yml                                             |    6 ++++--
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeviceSiteServiceImpl.java |    4 ++--
 rsf-admin/src/page/work/components/StaSelect.jsx                                                |    4 ++--
 rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/TaskResouceType.java              |    1 -
 rsf-server/src/main/resources/application.yml                                                   |    2 +-
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeviceSite.java                  |   18 ++++++++++++++++++
 rsf-server/src/main/resources/application-dev.yml                                               |    6 ++++--
 12 files changed, 37 insertions(+), 17 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/deviceSite/DeviceSiteList.jsx b/rsf-admin/src/page/basicInfo/deviceSite/DeviceSiteList.jsx
index 3320133..3ba3c50 100644
--- a/rsf-admin/src/page/basicInfo/deviceSite/DeviceSiteList.jsx
+++ b/rsf-admin/src/page/basicInfo/deviceSite/DeviceSiteList.jsx
@@ -150,15 +150,14 @@
                     omit={['id', 'createTime', 'createBy', 'memo', 'label','name','target','statusBool','updateBy']}
                 >
                     <NumberField source="id" />
-                    <TextField source="site" label="table.field.deviceSite.site" />
+                    <TextField source="site$" label="table.field.deviceSite.site" />
                     <TextField source="name" label="table.field.deviceSite.name" />
                     <NumberField source="type$" label="table.field.deviceSite.type" />
-                    
                     <TextField source="target" label="table.field.deviceSite.target" />
                     <TextField source="label" label="table.field.deviceSite.label" />
                     <TextField source="device$" label="table.field.deviceSite.device" />
                     <TextField source="channel" label="table.field.deviceSite.channel" />
-                    <TextField source="deviceSite" label="table.field.deviceSite.deviceSite" />
+                    <TextField source="deviceSite$" label="table.field.deviceSite.deviceSite" />
                     <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
                         <TextField source="nickname" />
                     </ReferenceField>
diff --git a/rsf-admin/src/page/basicInfo/deviceSite/InitModal.jsx b/rsf-admin/src/page/basicInfo/deviceSite/InitModal.jsx
index 9d5545b..84b7a4f 100644
--- a/rsf-admin/src/page/basicInfo/deviceSite/InitModal.jsx
+++ b/rsf-admin/src/page/basicInfo/deviceSite/InitModal.jsx
@@ -135,7 +135,6 @@
                                 <SelectInput
                                     label="table.field.deviceSite.deviceSite"
                                     optionText="stationName"
-                                    optionValue="stationName"                                   
                                 />
                             </ReferenceInput>                                
                             </Grid>
@@ -147,7 +146,6 @@
                                 <SelectInput
                                     label="table.field.deviceSite.site"
                                     optionText="stationName"
-                                    optionValue="stationName"                                    
                                 />
                             </ReferenceInput> 
                                 
diff --git a/rsf-admin/src/page/work/components/StaSelect.jsx b/rsf-admin/src/page/work/components/StaSelect.jsx
index 73217b9..64fffb8 100644
--- a/rsf-admin/src/page/work/components/StaSelect.jsx
+++ b/rsf-admin/src/page/work/components/StaSelect.jsx
@@ -47,7 +47,7 @@
                     .map((item) => {
                         return {
                             id: item.site,
-                            name: item.site
+                            name: item.site$
                         }
                     }));
             } else {
@@ -68,7 +68,7 @@
             source={name}
             choices={list}
             isLoading={loading}
-            optionValue='id'
+            optionValue='name'
             optionText='name'
             {...parmas}
         />
diff --git a/rsf-admin/src/page/work/outBound/OutBoundList.jsx b/rsf-admin/src/page/work/outBound/OutBoundList.jsx
index 348571c..1831c4f 100644
--- a/rsf-admin/src/page/work/outBound/OutBoundList.jsx
+++ b/rsf-admin/src/page/work/outBound/OutBoundList.jsx
@@ -58,7 +58,6 @@
 import request from '@/utils/request';
 import LocItemInfoModal from "../components/locItemInfoModal";
 import { Delete } from '@mui/icons-material';
-import _, { set } from 'lodash';
 import StaSelect from "../components/StaSelect";
 import { redirect } from "react-router";
 import { number } from "prop-types";
diff --git a/rsf-open-api/src/main/resources/application-dev.yml b/rsf-open-api/src/main/resources/application-dev.yml
index f4fe06a..c11aeb2 100644
--- a/rsf-open-api/src/main/resources/application-dev.yml
+++ b/rsf-open-api/src/main/resources/application-dev.yml
@@ -14,8 +14,10 @@
 #    url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
 #    username: rsf
     username: root
-    url: jdbc:mysql://10.10.10.200:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-    password: xltys1995
+    url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+    password: 34821015
+#    url: jdbc:mysql://10.10.10.200:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+#    password: xltys1995
     type: com.alibaba.druid.pool.DruidDataSource
     druid:
       initial-size: 5
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeviceSiteController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeviceSiteController.java
index 3845f26..4770997 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeviceSiteController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeviceSiteController.java
@@ -42,7 +42,7 @@
 
 
     @PreAuthorize("hasAuthority('manager:deviceSite:list')")
-    @PostMapping("/x`selectStaList/list")
+    @PostMapping("/selectStaList/list")
     public R selectStaList(@RequestBody Map<String, Object> map) {
         List<String> longs = null;
         if (map.get("type") != null) {
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeviceSite.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeviceSite.java
index 4a318c6..d8faaa2 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeviceSite.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeviceSite.java
@@ -7,6 +7,7 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.vincent.rsf.server.manager.service.BasStationService;
 import com.vincent.rsf.server.manager.service.LocTypeService;
 import com.vincent.rsf.server.system.constant.DictTypeCode;
 import com.vincent.rsf.server.system.entity.DictData;
@@ -195,6 +196,23 @@
 //            null    // 澶囨敞
 //    );
 
+
+    public String getSite$() {
+        if (this.site == null) {return  null;}
+        BasStationService service = SpringUtils.getBean(BasStationService.class);
+        BasStation station = service.getById(this.site);
+        if (Objects.isNull(station)) {return  null;}
+        return station.getStationName();
+    }
+
+    public String getDeviceSite$() {
+        if (this.deviceSite == null) {return  null;}
+        BasStationService service = SpringUtils.getBean(BasStationService.class);
+        BasStation station = service.getById(this.deviceSite);
+        if (Objects.isNull(station)) {return  null;}
+        return station.getStationName();
+    }
+
     public String getType$(){
         if (null == this.type){ return null; }
         String[] split = this.type.split(",");
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/TaskResouceType.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/TaskResouceType.java
index 8898d8d..3e72343 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/TaskResouceType.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/TaskResouceType.java
@@ -16,7 +16,6 @@
 
     TASK_RESOUCE_CHECK_TYPE("5", "鐩樼偣鍑哄簱浠诲姟"),
 
-
     ;
     TaskResouceType(String val, String desc) {
         this.val = Short.parseShort(val);
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeviceSiteServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeviceSiteServiceImpl.java
index 467a9e9..c06c01a 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeviceSiteServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeviceSiteServiceImpl.java
@@ -57,12 +57,12 @@
         List<String> targets = Arrays.asList(StringUtils.split(param.getTarget(), ","));
         List<DeviceSite> deviceSites =  new ArrayList<>();
         for (String site : sites) {
-            BasStation basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>().eq(BasStation::getStationName, site));
+            BasStation basStation = basStationService.getById(site);
             if (null == basStation) {
                 throw new CoolException("鍒濆鍖栧け璐ワ細 绔欑偣鏈壘鍒帮紒锛�");
             }
             for (String deviceSite : dvSites) {
-                BasStation basStation2 = basStationService.getOne(new LambdaQueryWrapper<BasStation>().eq(BasStation::getStationName, deviceSite));
+                BasStation basStation2 = basStationService.getById(deviceSite);
                 if (null == basStation2) {
                     throw new CoolException("鍒濆鍖栧け璐ワ細 浣滀笟绔欑偣鏈壘鍒帮紒锛�");
                 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
index e5294ef..c2b3cbb 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
@@ -49,6 +49,8 @@
     private OutStockService outStockService;
     @Autowired
     private WaveService waveService;
+    @Autowired
+    private BasStationService basStationService;
 
 
     /**
@@ -72,6 +74,7 @@
         }
 
         String siteNo = map.getSiteNo();
+
         List<LocItem> items = map.getItems();
         Map<Long, List<LocItem>> listMap = items.stream().collect(Collectors.groupingBy(LocItem::getLocId));
         WkOrder order;
diff --git a/rsf-server/src/main/resources/application-dev.yml b/rsf-server/src/main/resources/application-dev.yml
index 2b5eb1d..72f5cf3 100644
--- a/rsf-server/src/main/resources/application-dev.yml
+++ b/rsf-server/src/main/resources/application-dev.yml
@@ -14,8 +14,10 @@
 #    url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
 #    username: rsf
     username: root
-    url: jdbc:mysql://10.10.10.200:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-    password: xltys1995
+#    url: jdbc:mysql://10.10.10.200:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+#    password: xltys1995
+    url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+    password: 34821015
     type: com.alibaba.druid.pool.DruidDataSource
     druid:
       initial-size: 5
diff --git a/rsf-server/src/main/resources/application.yml b/rsf-server/src/main/resources/application.yml
index ac31a5b..db51329 100644
--- a/rsf-server/src/main/resources/application.yml
+++ b/rsf-server/src/main/resources/application.yml
@@ -25,7 +25,7 @@
   #  global-config:
   #    field-strategy: 0
   configuration:
-#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
     map-underscore-to-camel-case: true
     cache-enabled: true
     call-setters-on-nulls: true

--
Gitblit v1.9.1