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
9be641f7
Commit
9be641f7
authored
Oct 27, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
dafe3293
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
24 deletions
+29
-24
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+4
-4
OrgDepartmentController.java
...module/common/biz/controller/OrgDepartmentController.java
+2
-2
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+2
-2
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+3
-3
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+18
-13
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/service/IOrgUsrService.java
View file @
9be641f7
...
@@ -91,7 +91,7 @@ public interface IOrgUsrService {
...
@@ -91,7 +91,7 @@ public interface IOrgUsrService {
* @param orgUsr
* @param orgUsr
* @param alertFromValuelist
* @param alertFromValuelist
*/
*/
void
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
;
OrgUsrDto
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
;
/**
/**
* 更新机构/部门/人员基本信息和动态表单数据
* 更新机构/部门/人员基本信息和动态表单数据
...
@@ -110,9 +110,9 @@ public interface IOrgUsrService {
...
@@ -110,9 +110,9 @@ public interface IOrgUsrService {
List
<
OrgUsr
>
selectCompanyDepartmentMsg
();
List
<
OrgUsr
>
selectCompanyDepartmentMsg
();
void
saveOrgUsr
(
OrgUsrDto
OrgUsrDto
)
throws
Exception
;
OrgUsrDto
saveOrgUsr
(
OrgUsrDto
OrgUsrDto
)
throws
Exception
;
void
saveOrgPerson
(
OrgPersonDto
OrgPersonDto
)
throws
Exception
;
OrgUsrDto
saveOrgPerson
(
OrgPersonDto
OrgPersonDto
)
throws
Exception
;
void
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrDto
,
Long
id
)
throws
Exception
;
...
@@ -134,7 +134,7 @@ public interface IOrgUsrService {
...
@@ -134,7 +134,7 @@ public interface IOrgUsrService {
void
savePersonList
(
List
<
OrgPersonDto
>
OrgPersonDto
)
throws
Exception
;
void
savePersonList
(
List
<
OrgPersonDto
>
OrgPersonDto
)
throws
Exception
;
void
saveOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
)
throws
Exception
;
OrgUsrDto
saveOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
)
throws
Exception
;
void
updateByIdOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgDepartmentController.java
View file @
9be641f7
...
@@ -52,8 +52,8 @@ public class OrgDepartmentController {
...
@@ -52,8 +52,8 @@ public class OrgDepartmentController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增部门信息"
,
notes
=
"新增部门信息"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增部门信息"
,
notes
=
"新增部门信息"
)
public
ResponseModel
<
Object
>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgDepartmentDto
OrgDepartmentVo
)
throws
Exception
{
public
ResponseModel
<
Object
>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgDepartmentDto
OrgDepartmentVo
)
throws
Exception
{
OrgDepartmentVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_DEPARTMENT
);
OrgDepartmentVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_DEPARTMENT
);
iOrgUsrService
.
saveOrgDepartment
(
OrgDepartmentVo
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
saveOrgDepartment
(
OrgDepartmentVo
)
);
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgPersonController.java
View file @
9be641f7
...
@@ -53,8 +53,8 @@ public class OrgPersonController {
...
@@ -53,8 +53,8 @@ public class OrgPersonController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增人员信息"
,
notes
=
"新增人员信息"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增人员信息"
,
notes
=
"新增人员信息"
)
public
ResponseModel
<?>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
OrgPersonVo
)
throws
Exception
{
public
ResponseModel
<?>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
OrgPersonVo
)
throws
Exception
{
OrgPersonVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
OrgPersonVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
iOrgUsrService
.
saveOrgPerson
(
OrgPersonVo
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
saveOrgPerson
(
OrgPersonVo
)
);
}
}
/**
/**
...
...
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 @
9be641f7
...
@@ -87,10 +87,10 @@ public class OrgUsrController extends BaseController {
...
@@ -87,10 +87,10 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增单位信息"
,
notes
=
"新增单位信息"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增单位信息"
,
notes
=
"新增单位信息"
)
public
ResponseModel
<
?
>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgUsrDto
OrgUsrVo
)
throws
Exception
{
public
ResponseModel
<
Object
>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgUsrDto
OrgUsrVo
)
throws
Exception
{
OrgUsrVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
OrgUsrVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
iOrgUsrService
.
saveOrgUsr
(
OrgUsrVo
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
saveOrgUsr
(
OrgUsrVo
)
);
}
}
/**
/**
...
...
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 @
9be641f7
...
@@ -492,33 +492,37 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -492,33 +492,37 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
}
@Override
@Override
public
void
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
public
OrgUsrDto
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
{
throws
Exception
{
orgUsr
.
setRecDate
(
new
Date
());
orgUsr
.
setRecDate
(
new
Date
());
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
orgUsr
.
setRecUserName
(
user
.
getRealName
());
orgUsr
.
setRecUserName
(
user
.
getRealName
());
orgUsr
.
setRecUserId
(
user
.
getUserId
());
orgUsr
.
setRecUserId
(
user
.
getUserId
());
OrgUsrDto
orgUsrDto
=
new
OrgUsrDto
();
BeanUtils
.
copyProperties
(
orgUsr
,
orgUsrDto
);
// 单位新增情况
// 单位新增情况
save
(
orgUsr
);
OrgUsrDto
model
=
createWithModel
(
orgUsrDto
);
// save(orgUsr);
// 填充主键
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
Dto
.
getBizOrgType
()))
{
alertFromValue
.
setGroupCode
(
OrgPersonEnum
.
公司
.
getCode
());
alertFromValue
.
setGroupCode
(
OrgPersonEnum
.
公司
.
getCode
());
}
else
if
(
OrgPersonEnum
.
部门
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
}
else
if
(
OrgPersonEnum
.
部门
.
getKey
().
equals
(
orgUsr
Dto
.
getBizOrgType
()))
{
alertFromValue
.
setGroupCode
(
OrgPersonEnum
.
部门
.
getCode
());
alertFromValue
.
setGroupCode
(
OrgPersonEnum
.
部门
.
getCode
());
}
}
alertFromValue
.
setInstanceId
(
orgUsr
.
getSequenceNbr
());
alertFromValue
.
setInstanceId
(
orgUsr
Dto
.
getSequenceNbr
());
});
});
// 保存动态表单数据
// 保存动态表单数据
alertFormValueServiceImpl
.
saveBatch
(
alertFromValuelist
);
alertFormValueServiceImpl
.
saveBatch
(
alertFromValuelist
);
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
orgUsr
.
getSequenceNbr
());
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
orgUsr
Dto
.
getSequenceNbr
());
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
Dto
.
getBizOrgType
()))
{
try
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
airportAddTopic
,
JSON
.
toJSONString
(
formDto
).
getBytes
(),
2
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
airportAddTopic
,
JSON
.
toJSONString
(
formDto
).
getBytes
(),
2
,
false
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
getMessage
();
e
.
getMessage
();
}
}
}
}
return
model
;
}
}
@Override
@Override
...
@@ -628,7 +632,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -628,7 +632,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
}
@Override
@Override
public
void
saveOrgUsr
(
OrgUsrDto
OrgUsrVo
)
throws
Exception
{
public
OrgUsrDto
saveOrgUsr
(
OrgUsrDto
OrgUsrVo
)
throws
Exception
{
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgUsrVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgUsrVo
,
orgUsr
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
...
@@ -640,16 +644,17 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -640,16 +644,17 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
else
{
}
else
{
orgUsr
.
setBizOrgCode
(
getOrgCodeStr
());
orgUsr
.
setBizOrgCode
(
getOrgCodeStr
());
}
}
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgUsrVo
.
getDynamicFormValue
());
OrgUsrDto
orgUsrDto
=
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgUsrVo
.
getDynamicFormValue
());
/**
/**
* 同步保存ES
* 同步保存ES
*/
*/
eSOrgUsrService
.
saveAlertCalledToES
(
orgUsr
);
eSOrgUsrService
.
saveAlertCalledToES
(
orgUsr
);
return
orgUsrDto
;
}
}
@Override
@Override
public
void
saveOrgPerson
(
OrgPersonDto
OrgPersonVo
)
throws
Exception
{
public
OrgUsrDto
saveOrgPerson
(
OrgPersonDto
OrgPersonVo
)
throws
Exception
{
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgPersonVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgPersonVo
,
orgUsr
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
...
@@ -662,7 +667,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -662,7 +667,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsr
.
setBizOrgCode
(
getOrgCodeStr
());
orgUsr
.
setBizOrgCode
(
getOrgCodeStr
());
}
}
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgPersonVo
.
getDynamicFormValue
());
return
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgPersonVo
.
getDynamicFormValue
());
}
}
public
void
saveOrgPersonExcel
(
OrgUsrExcelDto
OrgPersonVo
)
throws
Exception
{
public
void
saveOrgPersonExcel
(
OrgUsrExcelDto
OrgPersonVo
)
throws
Exception
{
...
@@ -881,7 +886,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -881,7 +886,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
}
@Override
@Override
public
void
saveOrgDepartment
(
OrgDepartmentDto
OrgDepartmentVo
)
throws
Exception
{
public
OrgUsrDto
saveOrgDepartment
(
OrgDepartmentDto
OrgDepartmentVo
)
throws
Exception
{
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_DEPARTMENT
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_DEPARTMENT
);
...
@@ -893,7 +898,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -893,7 +898,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
else
{
}
else
{
orgUsr
.
setBizOrgCode
(
getOrgCodeStr
());
orgUsr
.
setBizOrgCode
(
getOrgCodeStr
());
}
}
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgDepartmentVo
.
getDynamicFormValue
());
return
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgDepartmentVo
.
getDynamicFormValue
());
}
}
@Override
@Override
...
...
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