Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
fill-system
Commits
af74f424
Commit
af74f424
authored
Dec 24, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改同步业务逻辑
parent
eaaf96bf
Pipeline
#2870
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
7 deletions
+56
-7
common-lib/src/main/java/com/mortals/xhx/common/pdu/device/DeviceReq.java
...ain/java/com/mortals/xhx/common/pdu/device/DeviceReq.java
+4
-0
fill-manager/pom.xml
fill-manager/pom.xml
+1
-1
fill-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceCallbackController.java
...a/com/mortals/xhx/busiz/web/DeviceCallbackController.java
+50
-4
fill-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+1
-2
No files found.
common-lib/src/main/java/com/mortals/xhx/common/pdu/device/DeviceReq.java
View file @
af74f424
...
@@ -4,6 +4,7 @@ import lombok.Data;
...
@@ -4,6 +4,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
...
@@ -135,4 +136,7 @@ public class DeviceReq implements Serializable {
...
@@ -135,4 +136,7 @@ public class DeviceReq implements Serializable {
*/
*/
private
String
deviceVersion
;
private
String
deviceVersion
;
private
List
<
Long
>
siteIdList
;
}
}
fill-manager/pom.xml
View file @
af74f424
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</activation>
</activation>
<properties>
<properties>
<profiles.active>
develop
</profiles.active>
<profiles.active>
develop
</profiles.active>
<profiles.nacos.server-addr>
1
92.168.0.252
:8848
</profiles.nacos.server-addr>
<profiles.nacos.server-addr>
1
27.0.0.1
:8848
</profiles.nacos.server-addr>
</properties>
</properties>
</profile>
</profile>
<profile>
<profile>
...
...
fill-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceCallbackController.java
View file @
af74f424
...
@@ -11,15 +11,21 @@ import com.mortals.xhx.common.pdu.device.DeviceReq;
...
@@ -11,15 +11,21 @@ import com.mortals.xhx.common.pdu.device.DeviceReq;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
import
com.mortals.xhx.module.device.model.DeviceQuery
;
import
com.mortals.xhx.module.device.model.DeviceQuery
;
import
com.mortals.xhx.module.device.service.DeviceService
;
import
com.mortals.xhx.module.device.service.DeviceService
;
import
com.mortals.xhx.module.matter.model.MatterDatumEntity
;
import
com.mortals.xhx.module.matter.model.MatterDatumQuery
;
import
com.mortals.xhx.module.matter.model.MatterEntity
;
import
com.mortals.xhx.module.matter.model.MatterQuery
;
import
com.mortals.xhx.module.matter.service.MatterDatumService
;
import
com.mortals.xhx.module.matter.service.MatterService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.*;
...
@@ -30,6 +36,46 @@ public class DeviceCallbackController {
...
@@ -30,6 +36,46 @@ public class DeviceCallbackController {
@Autowired
@Autowired
private
DeviceService
deviceService
;
private
DeviceService
deviceService
;
@Autowired
private
MatterService
matterService
;
@Autowired
private
MatterDatumService
matterDatumService
;
@GetMapping
(
"copy"
)
@UnAuth
public
void
copy
()
{
List
<
MatterEntity
>
matterEntityList
=
matterService
.
find
(
new
MatterQuery
().
siteId
(
1L
));
List
<
Long
>
siteIdList
=
Arrays
.
asList
(
6L
,
7L
);
for
(
Long
copySiteId
:
siteIdList
)
{
for
(
MatterEntity
matterEntity
:
matterEntityList
)
{
MatterDatumEntity
matterDatumEntity
=
matterDatumService
.
selectOne
(
new
MatterDatumQuery
().
matterId
(
matterEntity
.
getId
()));
matterEntity
.
setId
(
null
);
matterEntity
.
setSiteId
(
copySiteId
);
matterService
.
save
(
matterEntity
);
matterDatumEntity
.
setMatterId
(
matterEntity
.
getId
());
matterDatumEntity
.
setId
(
null
);
matterDatumEntity
.
setSiteId
(
copySiteId
);
matterDatumService
.
save
(
matterDatumEntity
);
}
}
}
@PostMapping
(
"callback"
)
@PostMapping
(
"callback"
)
@UnAuth
@UnAuth
...
...
fill-manager/src/test/java/com/mortals/httpclient/system.http
View file @
af74f424
...
@@ -75,8 +75,7 @@ Content-Type: application/json
...
@@ -75,8 +75,7 @@ Content-Type: application/json
###站点树
###站点树
GET {{baseUrl}}/site/siteTree
GET {{baseUrl}}//api/device/copy
Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{}
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment