Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
9d792553
Commit
9d792553
authored
Jul 21, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增接口
parent
8dee8b08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
12 deletions
+28
-12
PointController.java
...join/amos/patrol/business/controller/PointController.java
+23
-12
EquipFeign.java
...va/com/yeejoin/amos/patrol/business/feign/EquipFeign.java
+5
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PointController.java
View file @
9d792553
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
controller
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.*
;
import
javax.servlet.http.HttpServletResponse
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.vo.PointInputItemNewVo
;
...
...
@@ -20,6 +14,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -58,7 +53,9 @@ import com.yeejoin.amos.patrol.core.async.AsyncTask;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.response.PointResponse
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.patrol.dao.entity.Point
;
import
com.yeejoin.amos.patrol.dao.entity.PointClassify
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
...
...
@@ -138,16 +135,30 @@ public class PointController extends AbstractBaseController {
newPointClassify
.
setInspectionSpecName
(
pointClassify
.
getInspectionName
());
newPointClassify
.
setCreatorId
(
user
.
getUserId
());
newPointClassify
.
setPointId
(
pointClassify
.
getPointId
());
newPointClassify
.
setOrderNo
(
pointClassify
.
getOrderNo
()
);
newPointClassify
.
setOrderNo
(
0
);
newPointClassify
.
setDataSourceCode
(
pointClassify
.
getDataSourceCode
());
newPointClassify
.
setDataSourceName
(
pointClassify
.
getDataSourceName
());
newPointClassify
.
setAddress
(
pointClassify
.
getAddress
());
newPointClassify
.
setBuildingId
(
pointClassify
.
getBuildingId
());
newPointClassify
.
setOriginalId
(
pointClassify
.
getOriginalId
());
FeignClientResult
responseModel
=
equipFeign
.
getBuildingTreeOne
(
pointClassify
.
getBuildingId
());
if
(
ObjectUtils
.
isEmpty
(
responseModel
.
getResult
())
||
responseModel
.
getStatus
()
!=
HttpStatus
.
OK
.
value
())
{
throw
new
RuntimeException
(
responseModel
.
getDevMessage
());
}
else
{
Map
<
String
,
Object
>
dat
=(
Map
<
String
,
Object
>)
responseModel
.
getResult
();
newPointClassify
.
setBuildingName
(
dat
.
get
(
"name"
).
toString
());
}
if
(
pointClassify
.
getOriginalId
()!=
null
){
newPointClassify
.
setOriginalId
(
pointClassify
.
getOriginalId
());
}
else
{
String
uuid
=
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
newPointClassify
.
setOriginalId
(
uuid
.
substring
(
0
,
16
));
}
newPointClassify
.
setCategoryCode
(
pointClassify
.
getCategoryCode
());
newPointClassify
.
setCategoryName
(
pointClassify
.
getCategoryName
());
newPointClassify
.
setCode
(
pointClassify
.
getCode
());
newPointClassify
.
setBuildingName
(
pointClassify
.
getBuildingName
());
iPointService
.
addPointClassifyByPointId
(
newPointClassify
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/feign/EquipFeign.java
View file @
9d792553
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
feign
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -42,5 +43,9 @@ public interface EquipFeign {
@RequestMapping
(
value
=
"${equip.fegin.prefix}"
+
"/warehouse-structure/gettree/0"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
LinkedHashMap
<
String
,
Object
>
gettreeWarehouse
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
true
)
String
bizOrgCode
);
@RequestMapping
(
value
=
"${equip.fegin.prefix}"
+
"/building/getOne"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
FeignClientResult
getBuildingTreeOne
(
@RequestParam
(
value
=
"instanceId"
,
required
=
true
)
String
instanceId
);
}
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