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
8f5c2103
Commit
8f5c2103
authored
Jul 25, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
b3493783
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
14 deletions
+29
-14
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+18
-9
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+9
-0
PointController.java
...join/amos/patrol/business/controller/PointController.java
+2
-5
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
8f5c2103
...
...
@@ -14,13 +14,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -823,8 +817,12 @@ public class OrgUsrController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查当前登录人的所属单位"
,
notes
=
"查当前登录人的所属单位"
)
public
ResponseModel
<
String
>
getParentId
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
personIdentity
.
getCompanyId
());
ResponseModel
<
Object
>
companyByUserId
=
this
.
getCompanyByUserId
(
Long
.
valueOf
(
reginParams
.
getUserModel
().
getUserId
()));
Object
result
=
companyByUserId
.
getResult
();
String
s
=
JSONObject
.
toJSONString
(
result
);
OrgUsr
orgUsr
=
JSONObject
.
parseObject
(
s
,
OrgUsr
.
class
);
// String companyId = ((Map<String, Object>) result).get("sequenceNbr").toString();
String
companyId
=
String
.
valueOf
(
orgUsr
.
getSequenceNbr
());
//判断登陆人是否已经是顶级节点单位
if
(
orgUsr
.
getParentId
()
!=
null
)
{
...
...
@@ -967,4 +965,14 @@ public class OrgUsrController extends BaseController {
public
ResponseModel
<
Object
>
getCompanyInfo
(
@RequestParam
String
companyId
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getByIduser
(
companyId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询当前登陆人所属单位的下级部门"
,
notes
=
"查询当前登陆人所属单位的下级部门"
)
@PostMapping
(
value
=
"/getDetByCompanyId"
)
public
ResponseModel
<
Object
>
getDetByCompanyId
()
throws
Exception
{
ResponseModel
<
String
>
parentId
=
this
.
getParentId
();
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getDetByCompanyId
(
parentId
.
getResult
()));
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
8f5c2103
...
...
@@ -3253,4 +3253,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
baseMapper
.
selectList
(
wrapper
);
}
public
List
<
OrgUsr
>
getDetByCompanyId
(
String
companyId
){
QueryWrapper
<
OrgUsr
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"is_delete"
,
false
);
wrapper
.
eq
(
"parent_id"
,
companyId
);
wrapper
.
eq
(
"biz_org_type"
,
"DEPARTMENT"
);
return
baseMapper
.
selectList
(
wrapper
);
}
}
\ No newline at end of file
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 @
8f5c2103
...
...
@@ -143,6 +143,7 @@ public class PointController extends AbstractBaseController {
List
<
RoutePoint
>
routePointList
=
iRoutePointDao
.
queryByPointId
(
pointClassify
.
getPointId
());
AgencyUserModel
user
=
getUserInfo
();
PointClassify
newPointClassify
=
new
PointClassify
();
List
<
PointInputItemVo
>
customInputList
=
pointClassify
.
getEquipIputDetailData
();
//巡检项
if
(
pointClassify
.
getId
()==
null
){
newPointClassify
.
setEquipmentId
(
pointClassify
.
getEquipmentId
());
...
...
@@ -179,12 +180,10 @@ public class PointController extends AbstractBaseController {
newPointClassify
.
setCategoryCode
(
pointClassify
.
getCategoryCode
());
newPointClassify
.
setCategoryName
(
pointClassify
.
getCategoryName
());
newPointClassify
.
setCode
(
pointClassify
.
getCode
());
iPointService
.
addPointClassifyByPointId
(
newPointClassify
);
}
else
{
newPointClassify
.
setId
(
pointClassify
.
getId
());
List
<
PointInputItemVo
>
oldInputItemList
=
iPointService
.
queryOldPointInputItem
(
pointClassify
.
getPointId
());
// 新的巡检项的补集,即需要删除的项
List
<
PointInputItemVo
>
newInputItemList
=
new
ArrayList
<>();
List
<
PointInputItemVo
>
classList
=
pointClassify
.
getEquipIputDetailData
();
...
...
@@ -209,9 +208,7 @@ public class PointController extends AbstractBaseController {
}
}
iPointService
.
addPointClassifyByPointId
(
newPointClassify
);
List
<
PointInputItemVo
>
customInputList
=
pointClassify
.
getEquipIputDetailData
();
//巡检项
for
(
PointInputItemVo
pItemVo
:
customInputList
)
{
PointInputItem
pointInputItem
=
new
PointInputItem
();
...
...
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