diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java index 42f3447..e356877 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java @@ -626,7 +626,9 @@ public class StationServiceImpl extends BaseServiceImpl deptByStation = sysClient.getDeptByStation(request.getStationId(), AuthUtil.getTenantId()); - stationEntity.setRefDept(Optional.ofNullable(deptByStation).map(R::getData).map(Dept::getId).orElse(null)); + Long deptId = Optional.ofNullable(deptByStation).map(R::getData).map(Dept::getId).orElse(null); + stationEntity.setRefDept(deptId); + stationEntity.setCreateDept(deptId); } return buildResult.isSuccess(); }