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
b37f882d
Commit
b37f882d
authored
Jun 07, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
334f8fd1
fb022ee2
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
10 deletions
+75
-10
MaintenanceCompanyMapper.java
...ot/module/common/api/mapper/MaintenanceCompanyMapper.java
+2
-0
IMaintenanceCompanyService.java
...module/common/api/service/IMaintenanceCompanyService.java
+2
-0
MaintenanceCompanyMapper.xml
...pi/src/main/resources/mapper/MaintenanceCompanyMapper.xml
+8
-0
MaintenanceCompanyController.java
...e/common/biz/controller/MaintenanceCompanyController.java
+22
-9
MaintenanceCompanyServiceImpl.java
...ommon/biz/service/impl/MaintenanceCompanyServiceImpl.java
+22
-0
CheckController.java
...amos/maintenance/business/controller/CheckController.java
+10
-0
JCSFeignClient.java
...ejoin/amos/maintenance/business/feign/JCSFeignClient.java
+7
-0
dbTemplate_check.xml
...tenance/src/main/resources/db/mapper/dbTemplate_check.xml
+2
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/MaintenanceCompanyMapper.java
View file @
b37f882d
...
...
@@ -33,4 +33,6 @@ public interface MaintenanceCompanyMapper extends BaseMapper<MaintenanceCompany>
List
<
MaintenanceCompany
>
findByCodeAndType
(
String
code
,
String
type
);
List
<
MaintenanceCompany
>
findByInstanceIdAndType
(
Long
instanceId
,
String
type
);
int
amosIdExist
(
String
amosId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IMaintenanceCompanyService.java
View file @
b37f882d
...
...
@@ -170,4 +170,6 @@ public interface IMaintenanceCompanyService {
List
<
MaintenanceCompany
>
findPersonByAmosOrgId
(
String
code
,
String
userId
);
MaintenanceCompany
getOne
(
Long
parentId
);
Object
amosIdExist
(
String
amosId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/MaintenanceCompanyMapper.xml
View file @
b37f882d
...
...
@@ -55,6 +55,14 @@ WHERE
</if>
</where>
</select>
<select
id=
"amosIdExist"
resultType=
"int"
>
select count(amos_org_id) from cb_maintenance_company where is_delete = 0 and amos_org_id = #{amosId}
</select>
<select
id=
"findByCodeAndType"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany"
>
SELECT
m.sequence_nbr,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/MaintenanceCompanyController.java
View file @
b37f882d
...
...
@@ -7,15 +7,7 @@ import javax.servlet.http.HttpServletRequest;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -90,6 +82,20 @@ public class MaintenanceCompanyController extends BaseController {
}
/**
* 判断关联账户是否已关联
*
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAmosId/{amosId}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断关联账户是否已关联"
,
notes
=
"判断关联账户是否已关联"
)
public
ResponseModel
<
Object
>
getAmosId
(
@PathVariable
String
amosId
)
{
return
ResponseHelper
.
buildResponse
(
maintenanceCompanyService
.
amosIdExist
(
amosId
));
}
/**
* 检查员工编号是否已经存在,用于手动输入的员工编号校验
*
* @return
...
...
@@ -342,4 +348,11 @@ public class MaintenanceCompanyController extends BaseController {
return
ResponseHelper
.
buildResponse
(
maintenanceCompanyServiceImpl
.
getAmosOrgIdsByIds
(
list
));
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getIdByAmosOrgId"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据orgId查主键Id"
,
notes
=
"根据orgId查主键Id"
)
public
ResponseModel
<
String
>
getIdByAmosOrgId
(
@RequestParam
(
value
=
"amosOrgId"
,
required
=
true
)
String
amosOrgId
)
{
return
ResponseHelper
.
buildResponse
(
maintenanceCompanyServiceImpl
.
getIdByAmosOrgId
(
amosOrgId
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/MaintenanceCompanyServiceImpl.java
View file @
b37f882d
...
...
@@ -391,6 +391,14 @@ public class MaintenanceCompanyServiceImpl
return
pegaIPage
;
}
public
Object
amosIdExist
(
String
amosId
)
{
int
num
=
maintenanceCompanyMapper
.
amosIdExist
(
amosId
);
if
(
num
>
0
)
{
return
false
;
}
return
true
;
}
@Override
public
IPage
<
Map
<
String
,
Object
>>
getPageMaintenanceList
(
Map
<
String
,
Object
>
paramsMap
)
{
if
(!
paramsMap
.
containsKey
(
"current"
)
&&
!
paramsMap
.
containsKey
(
"size"
))
{
...
...
@@ -848,4 +856,17 @@ public class MaintenanceCompanyServiceImpl
List
<
String
>
collect
=
maintenanceCompanyMapper
.
selectList
(
queryWrapper
).
stream
().
map
(
MaintenanceCompany:
:
getAmosId
).
collect
(
Collectors
.
toList
());
return
collect
;
}
public
String
getIdByAmosOrgId
(
String
amosOrgId
)
{
QueryWrapper
<
MaintenanceCompany
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
select
(
MaintenanceCompany:
:
getSequenceNbr
)
.
eq
(
MaintenanceCompany:
:
getAmosId
,
amosOrgId
)
.
groupBy
(
MaintenanceCompany:
:
getSequenceNbr
)
.
eq
(
MaintenanceCompany:
:
getIsDelete
,
false
);
MaintenanceCompany
maintenanceCompany
=
maintenanceCompanyMapper
.
selectOne
(
queryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
maintenanceCompany
))
{
return
null
;
}
return
String
.
valueOf
(
maintenanceCompany
.
getSequenceNbr
());
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CheckController.java
View file @
b37f882d
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.maintenance.business.controller;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dto.CheckDto
;
import
com.yeejoin.amos.maintenance.business.feign.JCSFeignClient
;
import
com.yeejoin.amos.maintenance.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckRecordParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckStatisticalParam
;
...
...
@@ -71,6 +72,9 @@ public class CheckController extends AbstractBaseController {
@Value
(
"${amosRefresh.patrol.topic}"
)
private
String
patrolTopic
;
@Autowired
JCSFeignClient
jcsFeignClient
;
/**
* 巡检计划查询
*
...
...
@@ -501,6 +505,12 @@ public class CheckController extends AbstractBaseController {
Map
<
String
,
Object
>
authMap
=
Bean
.
BeantoMap
(
reginParams
.
getPersonIdentity
());
params
.
putAll
(
authMap
);
params
.
put
(
"userId"
,
userId
);
if
(
StringUtil
.
isNotEmpty
(
userId
))
{
ResponseModel
<
String
>
idByAmosOrgId
=
jcsFeignClient
.
getIdByAmosOrgId
(
userId
);
if
(
StringUtil
.
isNotEmpty
(
idByAmosOrgId
.
getResult
()))
{
params
.
put
(
"userId"
,
idByAmosOrgId
.
getResult
());
}
}
params
.
put
(
"timeType"
,
timeType
);
params
.
put
(
"result"
,
result
);
if
(
StringUtils
.
isNotBlank
(
orderRule
))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/feign/JCSFeignClient.java
View file @
b37f882d
...
...
@@ -30,4 +30,11 @@ public interface JCSFeignClient {
*/
@RequestMapping
(
value
=
"jcs/common/maintenance-company/get/amosOrgIdsByIds"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
<
List
<
String
>>
getAmosOrgIdsByIds
(
@RequestParam
(
value
=
"list"
)
List
<
String
>
list
);
/**
* 根据orgId查主键Id
* @return
*/
@RequestMapping
(
value
=
"jcs/common/maintenance-company/getIdByAmosOrgId"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
<
String
>
getIdByAmosOrgId
(
@RequestParam
(
value
=
"amosOrgId"
)
String
amosOrgId
);
}
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
b37f882d
...
...
@@ -1907,11 +1907,12 @@
pp.id pointId,
pp.equipment_id equipmentId,
pp.equipment_name equipmentName,
pp.name equipmentDetailName,
pp.belong_system_id systemId,
pp.belong_system_name systemName,
pp.address address,
pp.original_id equipId,
CONCAT_WS('',pp.building_name,pp.address) buildingName,
CONCAT_WS('
-
',pp.building_name,pp.address) buildingName,
pc.org_code AS orgCode
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
...
...
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