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
3d461acf
Commit
3d461acf
authored
Jul 20, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口
parent
592577b1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
191 additions
and
0 deletions
+191
-0
PointController.java
...join/amos/patrol/business/controller/PointController.java
+153
-0
EquipFeign.java
...va/com/yeejoin/amos/patrol/business/feign/EquipFeign.java
+5
-0
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+13
-0
IPointService.java
...oin/amos/patrol/business/service/intfc/IPointService.java
+10
-0
PointInputItemNewVo.java
.../yeejoin/amos/patrol/business/vo/PointInputItemNewVo.java
+10
-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 @
3d461acf
...
@@ -11,10 +11,13 @@ import java.util.Set;
...
@@ -11,10 +11,13 @@ import java.util.Set;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
import
com.yeejoin.amos.patrol.business.vo.PointInputItemNewVo
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -79,6 +82,156 @@ public class PointController extends AbstractBaseController {
...
@@ -79,6 +82,156 @@ public class PointController extends AbstractBaseController {
@Autowired
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
private
RemoteSecurityService
remoteSecurityService
;
@Autowired
private
EquipFeign
equipFeign
;
/**
*
* 新增接口
* **/
/**
* 查询巡检点的巡检项
*
* @param id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点的巡检项"
,
notes
=
"查询巡检点的巡检项"
)
@GetMapping
(
value
=
"/queryEquipPointInputItemNew"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryEquipPointInputItemNew
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
try
{
List
<
Map
<
String
,
Object
>>
pointInputItemList
=
iPointService
.
queryEquipPointInputItem
(
pointId
);
Page
<
Map
<
String
,
Object
>>
pag
=
new
PageImpl
<
Map
<
String
,
Object
>>(
pointInputItemList
);
return
CommonResponseUtil
.
success
(
pag
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"查询巡检点的巡检项失败"
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡查对象"
,
notes
=
"新增巡查对象"
)
@PostMapping
(
value
=
"/addPointXcdx"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addPointXcdx
(
@ApiParam
(
value
=
"新增巡查对象"
,
required
=
true
)
@RequestBody
PointInputItemNewVo
pointClassify
){
try
{
AgencyUserModel
user
=
getUserInfo
();
PointClassify
newPointClassify
=
new
PointClassify
();
newPointClassify
.
setEquipmentId
(
pointClassify
.
getEquipmentId
());
newPointClassify
.
setName
(
pointClassify
.
getName
());
newPointClassify
.
setInspectionSpecName
(
pointClassify
.
getInspectionName
());
newPointClassify
.
setCreatorId
(
user
.
getUserId
());
newPointClassify
.
setPointId
(
pointClassify
.
getPointId
());
newPointClassify
.
setOrderNo
(
pointClassify
.
getOrderNo
());
newPointClassify
.
setDataSourceCode
(
pointClassify
.
getDataSourceCode
());
newPointClassify
.
setDataSourceName
(
pointClassify
.
getDataSourceName
());
newPointClassify
.
setAddress
(
pointClassify
.
getAddress
());
newPointClassify
.
setBuildingId
(
pointClassify
.
getBuildingId
());
newPointClassify
.
setOriginalId
(
pointClassify
.
getOriginalId
());
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
)
{
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"新增巡查对象失败"
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡查对象"
,
notes
=
"新增巡查对象"
)
@PostMapping
(
value
=
"/addPointXcdxList"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addPointXcdxList
(
@ApiParam
(
value
=
"新增巡查对象"
,
required
=
true
)
@RequestBody
List
<
PointInputItemNewVo
>
pointClassifys
){
try
{
AgencyUserModel
user
=
getUserInfo
();
for
(
PointInputItemNewVo
pointClassify
:
pointClassifys
)
{
PointClassify
newPointClassify
=
new
PointClassify
();
newPointClassify
.
setEquipmentId
(
pointClassify
.
getEquipmentId
());
newPointClassify
.
setName
(
pointClassify
.
getName
());
newPointClassify
.
setInspectionSpecName
(
pointClassify
.
getInspectionName
());
newPointClassify
.
setCreatorId
(
user
.
getUserId
());
newPointClassify
.
setPointId
(
pointClassify
.
getPointId
());
newPointClassify
.
setOrderNo
(
pointClassify
.
getOrderNo
());
newPointClassify
.
setDataSourceCode
(
pointClassify
.
getDataSourceCode
());
newPointClassify
.
setDataSourceName
(
pointClassify
.
getDataSourceName
());
newPointClassify
.
setAddress
(
pointClassify
.
getAddress
());
newPointClassify
.
setBuildingId
(
pointClassify
.
getBuildingId
());
newPointClassify
.
setOriginalId
(
pointClassify
.
getOriginalId
());
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
)
{
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"新增巡查对象失败"
);
}
}
/**
* 获取当前登录人,单位下建筑树
*
* */
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取当前登录人,单位下建筑树"
,
notes
=
"获取当前登录人,单位下建筑树"
)
@GetMapping
(
value
=
"/gettreeWarehouse"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
gettreeWarehouse
()
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
CommonResponseUtil
.
success
(
equipFeign
.
gettreeWarehouse
(
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
()));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"查询巡检点失败"
);
}
}
/**
*
* 新增接口
* **/
/**
/**
* 增加巡检点
* 增加巡检点
*
*
...
...
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 @
3d461acf
...
@@ -37,5 +37,10 @@ public interface EquipFeign {
...
@@ -37,5 +37,10 @@ public interface EquipFeign {
*/
*/
@RequestMapping
(
value
=
"${equip.fegin.prefix}"
+
"/area/tree"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
@RequestMapping
(
value
=
"${equip.fegin.prefix}"
+
"/area/tree"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
LinkedHashMap
<
String
,
Object
>
getRegionTress
();
LinkedHashMap
<
String
,
Object
>
getRegionTress
();
@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
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
3d461acf
...
@@ -124,6 +124,18 @@ public class PointServiceImpl implements IPointService {
...
@@ -124,6 +124,18 @@ public class PointServiceImpl implements IPointService {
}
}
@Override
@Override
public
void
addPointClassifyByPointId
(
PointClassify
pointClassify
)
{
iPointClassifyDao
.
saveAndFlush
(
pointClassify
);
}
@Override
public
void
addPointClassifyByPointIdList
(
List
<
PointClassify
>
pointClassify
)
{
iPointClassifyDao
.
saveAll
(
pointClassify
);
}
@Override
public
void
addMovePoint
(
MovePointParam
param
)
{
public
void
addMovePoint
(
MovePointParam
param
)
{
Point
point
=
new
Point
();
Point
point
=
new
Point
();
BeanUtils
.
copyProperties
(
param
,
point
);
BeanUtils
.
copyProperties
(
param
,
point
);
...
@@ -1521,6 +1533,7 @@ public class PointServiceImpl implements IPointService {
...
@@ -1521,6 +1533,7 @@ public class PointServiceImpl implements IPointService {
if
(
e
.
get
(
"id"
)!=
null
&&
!
StringUtils
.
isBlank
(
e
.
get
(
"id"
).
toString
())){
if
(
e
.
get
(
"id"
)!=
null
&&
!
StringUtils
.
isBlank
(
e
.
get
(
"id"
).
toString
())){
List
<
PointInputItemVo
>
inputItems
=
inputItemMapper
.
queryCustomInputItemByPointId
(
e
.
get
(
"id"
).
toString
());
List
<
PointInputItemVo
>
inputItems
=
inputItemMapper
.
queryCustomInputItemByPointId
(
e
.
get
(
"id"
).
toString
());
e
.
put
(
"equipIputDetailData"
,
inputItems
);
e
.
put
(
"equipIputDetailData"
,
inputItems
);
e
.
put
(
"equipIputDetailDataNum"
,
inputItems
!=
null
?
inputItems
.
size
():
0
);
}
}
});
});
return
content
;
return
content
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPointService.java
View file @
3d461acf
...
@@ -35,6 +35,16 @@ public interface IPointService {
...
@@ -35,6 +35,16 @@ public interface IPointService {
* @param point
* @param point
*/
*/
Point
newAddPoint
(
NewPointParam
point
);
Point
newAddPoint
(
NewPointParam
point
);
/**
*添加巡查对象
* */
void
addPointClassifyByPointId
(
PointClassify
pointClassify
);
void
addPointClassifyByPointIdList
(
List
<
PointClassify
>
pointClassify
);
/**
/**
* 删除巡检点。返回成功删除点的ID
* 删除巡检点。返回成功删除点的ID
*
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/vo/PointInputItemNewVo.java
View file @
3d461acf
...
@@ -95,6 +95,16 @@ public class PointInputItemNewVo{
...
@@ -95,6 +95,16 @@ public class PointInputItemNewVo{
*/
*/
private
String
originalId
;
private
String
originalId
;
private
Long
pointId
;
public
Long
getPointId
()
{
return
pointId
;
}
public
void
setPointId
(
Long
pointId
)
{
this
.
pointId
=
pointId
;
}
private
List
<
PointInputItemVo
>
equipIputDetailData
=
new
ArrayList
<
PointInputItemVo
>();
private
List
<
PointInputItemVo
>
equipIputDetailData
=
new
ArrayList
<
PointInputItemVo
>();
public
List
<
PointInputItemVo
>
getEquipIputDetailData
()
{
public
List
<
PointInputItemVo
>
getEquipIputDetailData
()
{
...
...
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