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
a90ab0b5
Commit
a90ab0b5
authored
Dec 31, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交对于机场人员修改员工编号在培训计划项目中的同步修改
parent
bdefb497
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
21 deletions
+94
-21
AmosTrainingFeignClient.java
...boot/module/common/api/feign/AmosTrainingFeignClient.java
+19
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+75
-21
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/feign/AmosTrainingFeignClient.java
0 → 100644
View file @
a90ab0b5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
io.swagger.annotations.ApiOperation
;
@FeignClient
(
name
=
"${amosTraining.fegin.name:AMOS-TRAININGEXAM}"
,
path
=
"trainingexam"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
AmosTrainingFeignClient
{
@RequestMapping
(
value
=
"/update/operation/number"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改人员编号"
,
notes
=
"修改人员编号"
)
public
ResponseModel
<
Boolean
>
updOperationNumber
(
@RequestParam
String
newNumber
,
@RequestParam
String
oldNumber
)
;
}
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 @
a90ab0b5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.io.Serializable
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
javax.annotation.Resource
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -12,7 +41,25 @@ import com.google.common.collect.Maps;
...
@@ -12,7 +41,25 @@ import com.google.common.collect.Maps;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.CheckObjectDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESOrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentFormDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgPersonExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrzhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.dto.UserDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.UserUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
...
@@ -20,6 +67,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
...
@@ -20,6 +67,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import
com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UserRolesEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UserRolesEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UserUnitTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UserUnitTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.feign.AmosTrainingFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.mapper.DynamicFormInstanceMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.DynamicFormInstanceMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService
;
import
com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService
;
...
@@ -28,26 +76,6 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
...
@@ -28,26 +76,6 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
javax.annotation.Resource
;
import
java.io.Serializable
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* 机构/部门/人员表 服务实现类
* 机构/部门/人员表 服务实现类
...
@@ -90,6 +118,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -90,6 +118,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Autowired
@Autowired
DynamicFormInstanceMapper
dynamicFormInstanceMapper
;
DynamicFormInstanceMapper
dynamicFormInstanceMapper
;
@Autowired
AmosTrainingFeignClient
amosTrainingFeignClient
;
public
static
List
<
OrgMenuDto
>
buildTreeParallel
(
List
<
OrgUsr
>
list
)
{
public
static
List
<
OrgMenuDto
>
buildTreeParallel
(
List
<
OrgUsr
>
list
)
{
...
@@ -749,6 +781,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -749,6 +781,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
@Override
public
OrgPersonDto
updateByIdOrgPerson
(
OrgPersonDto
OrgPersonVo
,
Long
id
)
throws
Exception
{
public
OrgPersonDto
updateByIdOrgPerson
(
OrgPersonDto
OrgPersonVo
,
Long
id
)
throws
Exception
{
try
{
updatePersonNumber
(
id
,
OrgPersonVo
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"同步修改培训计划中的人员编号:---------------"
+
id
);
}
// 修改人员信息
// 修改人员信息
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
oriOrgUsr
=
getById
(
id
);
OrgUsr
oriOrgUsr
=
getById
(
id
);
...
@@ -782,6 +820,22 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -782,6 +820,22 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
}
return
OrgPersonVo
;
return
OrgPersonVo
;
}
}
void
updatePersonNumber
(
Long
id
,
OrgPersonDto
OrgPersonVo
){
String
oldNumber
=
null
;
String
newNumber
=
null
;
List
<
DynamicFormInstanceDto
>
list
=
alertFormValueServiceImpl
.
listByCalledId
(
id
);
for
(
DynamicFormInstanceDto
dynamicFormInstanceDto
:
list
)
{
if
(
dynamicFormInstanceDto
.
getFieldCode
().
equals
(
"personNumber"
))
{
oldNumber
=
dynamicFormInstanceDto
.
getFieldValue
();
}
}
for
(
DynamicFormInstance
dynamicForm
:
OrgPersonVo
.
getDynamicFormValue
())
{
if
(
dynamicForm
.
getFieldCode
().
equals
(
"personNumber"
))
{
newNumber
=
dynamicForm
.
getFieldValue
();
}
}
amosTrainingFeignClient
.
updOperationNumber
(
newNumber
,
oldNumber
);
}
@Override
@Override
public
OrgUsrFormDto
selectCompanyById
(
Long
id
)
throws
Exception
{
public
OrgUsrFormDto
selectCompanyById
(
Long
id
)
throws
Exception
{
...
...
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