From bc1a6bb5bb2803ed6a5669a976bf2b47f3dacfca Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 14 Jan 2026 11:27:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/service/impl/FwPoliceStationServiceImpl.java | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/service/impl/FwPoliceStationServiceImpl.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/service/impl/FwPoliceStationServiceImpl.java
index 4ab5ffd..c9aae7c 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/service/impl/FwPoliceStationServiceImpl.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/service/impl/FwPoliceStationServiceImpl.java
@@ -17,6 +17,7 @@
package org.sxkj.fw.area.service.impl;
import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.utils.StringUtil;
import org.sxkj.common.utils.HeaderUtils;
import org.sxkj.fw.area.entity.FwPoliceStationEntity;
import org.sxkj.fw.area.vo.FwPoliceStationVO;
@@ -42,6 +43,11 @@
@Override
public IPage<FwPoliceStationVO> selectFwPoliceStationPage(IPage<FwPoliceStationVO> page, FwPoliceStationVO fwPoliceStation) {
return page.setRecords(baseMapper.selectFwPoliceStationPage(page, fwPoliceStation));
+ }
+
+ @Override
+ public List<FwPoliceStationVO> selectFwPoliceStationList() {
+ return baseMapper.selectFwPoliceStationList();
}
@@ -78,19 +84,37 @@
private void fillCreateFields(FwPoliceStationEntity fwPoliceStation) {
Long userId = AuthUtil.getUserId();
- Long deptId = Long.valueOf(AuthUtil.getDeptId());
- String areaCode = HeaderUtils.getAreaCode();
+ String deptIdStr = AuthUtil.getDeptId();
+ Long deptId = null;
+ if (StringUtil.isNotBlank(deptIdStr)) {
+ try {
+ deptId = Long.valueOf(deptIdStr);
+ } catch (NumberFormatException ignored) {
+ deptId = null;
+ }
+ }
+// String areaCode = HeaderUtils.getAreaCode();
+// if (StringUtil.isBlank(areaCode)) {
+// areaCode = fwPoliceStation.getAreaCode();
+// }
Date now = new Date();
fwPoliceStation.setCreateUser(userId);
fwPoliceStation.setUpdateUser(userId);
- fwPoliceStation.setCreateDept(deptId);
- fwPoliceStation.setAreaCode(areaCode);
+ if (deptId != null) {
+ fwPoliceStation.setCreateDept(deptId);
+ }
+// if (StringUtil.isNotBlank(areaCode)) {
+// fwPoliceStation.setAreaCode(areaCode);
+// }
fwPoliceStation.setCreateTime(now);
fwPoliceStation.setUpdateTime(now);
}
private void fillUpdateFields(FwPoliceStationEntity fwPoliceStation) {
- fwPoliceStation.setUpdateUser(AuthUtil.getUserId());
+ Long userId = AuthUtil.getUserId();
+ if (userId != null) {
+ fwPoliceStation.setUpdateUser(userId);
+ }
fwPoliceStation.setUpdateTime(new Date());
}
--
Gitblit v1.9.3