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
f634d3b5
Commit
f634d3b5
authored
Jun 25, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
c07e0c75
8dd06002
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
162 additions
and
196 deletions
+162
-196
IOrgUsrService.java
...join/amos/boot/module/jcs/api/service/IOrgUsrService.java
+26
-3
OrgDepartmentFormVo.java
...join/amos/boot/module/jcs/api/vo/OrgDepartmentFormVo.java
+4
-0
OrgPersonFormVo.java
.../yeejoin/amos/boot/module/jcs/api/vo/OrgPersonFormVo.java
+4
-0
OrgUsrMapper.xml
...module-jcs-api/src/main/resources/mapper/OrgUsrMapper.xml
+13
-7
OrgDepartmentController.java
...ot/module/jcs/biz/controller/OrgDepartmentController.java
+7
-49
OrgPersonController.java
...s/boot/module/jcs/biz/controller/OrgPersonController.java
+11
-67
OrgUsrController.java
...amos/boot/module/jcs/biz/controller/OrgUsrController.java
+7
-53
AlertCalledAction.java
...os/boot/module/jcs/biz/rule/action/AlertCalledAction.java
+24
-8
OrgUsrServiceImpl.java
...s/boot/module/jcs/biz/service/impl/OrgUsrServiceImpl.java
+66
-9
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IOrgUsrService.java
View file @
f634d3b5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrVo
;
...
@@ -68,16 +70,37 @@ public interface IOrgUsrService {
...
@@ -68,16 +70,37 @@ public interface IOrgUsrService {
/**
/**
* 获取动态表单数据
* 获取动态表单数据
* @param
queryWrapper
* @param
id
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
List
<
FormValue
>
getFormValue
(
QueryWrapper
queryWrapper
)
throws
Exception
;
List
<
FormValue
>
getFormValue
(
Long
id
)
throws
Exception
;
/**
/**
* 保存 机构/部门/人员基本信息
* 保存 机构/部门/人员基本信息
* @param
* @param
* @throws Exception
* @throws Exception
*/
*/
void
saveOrgUsr
(
OrgUsr
oriOrgUsr
,
Long
id
)
throws
Exception
;;
void
saveOrgUsr
(
OrgUsr
oriOrgUsr
,
Long
id
)
throws
Exception
;
/**
* 新增机构/部门/人员基本信息和动态表单数据
* @param orgUsr
* @param alertFromValuelist
*/
void
saveOrgUsrAlertFormValue
(
OrgUsr
orgUsr
,
List
<
AlertFormValue
>
alertFromValuelist
)
throws
Exception
;
/**
* 更新机构/部门/人员基本信息和动态表单数据
* @param alertFromValuelist
* @throws Exception
*/
void
updateAlertFormValue
(
OrgUsr
orgUsr
,
Long
alertCalledId
,
List
<
AlertFormValue
>
alertFromValuelist
)
throws
Exception
;
/**
*
* @param id
* @throws Exception
*/
Map
<
String
,
Object
>
selectForShowById
(
OrgUsr
orgUsr
,
Long
id
)
throws
Exception
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/OrgDepartmentFormVo.java
View file @
f634d3b5
...
@@ -53,4 +53,8 @@ public class OrgDepartmentFormVo {
...
@@ -53,4 +53,8 @@ public class OrgDepartmentFormVo {
public
OrgDepartmentFormVo
()
{
public
OrgDepartmentFormVo
()
{
}
}
public
OrgDepartmentFormVo
(
List
<
FormValue
>
dynamicFormAlert
)
{
this
.
dynamicFormAlert
=
dynamicFormAlert
;
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/OrgPersonFormVo.java
View file @
f634d3b5
...
@@ -55,4 +55,8 @@ public class OrgPersonFormVo extends BaseEntity{
...
@@ -55,4 +55,8 @@ public class OrgPersonFormVo extends BaseEntity{
public
OrgPersonFormVo
()
{
public
OrgPersonFormVo
()
{
}
}
public
OrgPersonFormVo
(
List
<
FormValue
>
dynamicFormAlert
)
{
this
.
dynamicFormAlert
=
dynamicFormAlert
;
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
f634d3b5
...
@@ -17,20 +17,26 @@
...
@@ -17,20 +17,26 @@
<select
id=
"selectPersonList"
resultType=
"Map"
>
<select
id=
"selectPersonList"
resultType=
"Map"
>
SELECT
select * from (
SELECT
DISTINCT
DISTINCT
u.
sequence_nbr sequenceNbr,
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
u.biz_org_code bizOrgCode,
<if
test=
"fields != null"
>
<if
test=
"fields != null"
>
<foreach
collection=
"fields"
item=
"item"
separator=
","
>
MAX(case
v
.field_code when #{item} then v.field_value end) ${item}
</foreach>
<foreach
collection=
"fields"
item=
"item"
separator=
","
>
MAX(case
f
.field_code when #{item} then v.field_value end) ${item}
</foreach>
</if>
</if>
FROM
FROM
cb_org_usr u
,
cb_org_usr u
LEFT JOIN
jc_alert_form_value v
jc_alert_form_value v
on u.sequence_nbr = v.alert_called_id
LEFT JOIN jc_alert_form f ON f.sequence_nbr = v.alert_form_id
LEFT JOIN jc_alert_form f ON f.sequence_nbr = v.alert_form_id
where u.sequence_nbr = v.alert_called_id
where u.parent_id = #{parentId}
and v.alert_type_code = #{alertTypeCode}
AND u.biz_org_type = #{bizOrgType}
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_code
)a where a.sequenceNbr is not null
LIMIT #{pageNum}, #{pageSize}
LIMIT #{pageNum}, #{pageSize}
</select>
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrgDepartmentController.java
View file @
f634d3b5
...
@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto;
...
@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentFormVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentFormVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrFormVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -41,7 +42,6 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
...
@@ -41,7 +42,6 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrDownloadTemplateVO
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrDownloadTemplateVO
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrFormVo
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl
;
...
@@ -73,16 +73,8 @@ public class OrgDepartmentController {
...
@@ -73,16 +73,8 @@ public class OrgDepartmentController {
public
ResponseModel
<
Object
>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgDepartmentVo
OrgDepartmentVo
)
{
public
ResponseModel
<
Object
>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgDepartmentVo
OrgDepartmentVo
)
{
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
// 单位新增情况
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_DEPARTMENT
);
iOrgUsrService
.
save
(
orgUsr
);
iOrgUsrService
.
saveOrgUsrAlertFormValue
(
orgUsr
,
OrgDepartmentVo
.
getAlertFormValue
());
// 动态表单
List
<
AlertFormValue
>
alertFromValuelist
=
OrgDepartmentVo
.
getAlertFormValue
();
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
// 保存动态表单数据
iAlertFromValueService
.
saveBatch
(
alertFromValuelist
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
@@ -109,34 +101,15 @@ public class OrgDepartmentController {
...
@@ -109,34 +101,15 @@ public class OrgDepartmentController {
*/
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新
单位数据"
,
notes
=
"更新单位
数据"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新
部门数据"
,
notes
=
"更新部门
数据"
)
public
ResponseModel
<
Object
>
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgDepartmentVo
OrgDepartmentVo
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<
Object
>
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgDepartmentVo
OrgDepartmentVo
,
@PathVariable
Long
id
)
throws
Exception
{
// 修改部门信息
// 修改部门信息
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
oriOrgUsr
=
iOrgUsrService
.
getById
(
id
);
OrgUsr
oriOrgUsr
=
iOrgUsrService
.
getById
(
id
);
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
iOrgUsrService
.
saveOrgUsr
(
oriOrgUsr
,
id
);
iOrgUsrService
.
saveOrgUsr
(
oriOrgUsr
,
id
);
// 动态表单
List
<
AlertFormValue
>
alertFromValuelist
=
OrgDepartmentVo
.
getAlertFormValue
();
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
List
<
AlertFromValueDto
>
formList
=
iAlertFromValueService
.
queryByCalledId
(
orgUsr
.
getSequenceNbr
());
for
(
AlertFormValue
dis
:
alertFromValuelist
)
{
for
(
AlertFromValueDto
src
:
formList
)
{
if
(
dis
.
getAlertFormId
()
==
src
.
getAlertFormId
())
{
dis
.
setSequenceNbr
(
src
.
getSequenceNbr
());
dis
.
setRecDate
(
new
Date
());
dis
.
setRecUserId
(
oriOrgUsr
.
getRecUserId
());
dis
.
setRecUserName
(
oriOrgUsr
.
getRecUserName
());
break
;
}
}
}
// 保存动态表单数据
// 保存动态表单数据
i
AlertFromValueService
.
updateBatchById
(
alertFromValuelist
);
i
OrgUsrService
.
updateAlertFormValue
(
oriOrgUsr
,
orgUsr
.
getSequenceNbr
(),
OrgDepartmentVo
.
getAlertFormValue
()
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
@@ -151,26 +124,11 @@ public class OrgDepartmentController {
...
@@ -151,26 +124,11 @@ public class OrgDepartmentController {
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取部门详情"
,
notes
=
"获取部门详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取部门详情"
,
notes
=
"获取部门详情"
)
public
ResponseModel
<
OrgDepartmentFormVo
>
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<
OrgDepartmentFormVo
>
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 动态表单数据
// 动态表单数据
List
<
AlertFormValueVo
>
list
=
iAlertFromValueService
.
listByCalledId
(
id
);
List
<
FormValue
>
formValue
=
iOrgUsrService
.
getFormValue
(
id
);
List
<
FormValue
>
formValue
=
new
ArrayList
();
OrgDepartmentFormVo
orgDepartmentFormVo
=
new
OrgDepartmentFormVo
(
formValue
);
for
(
AlertFormValueVo
alertFormValue
:
list
)
{
if
(
alertFormValue
.
getFieldValueCode
()
==
null
)
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getIsBlock
());
formValue
.
add
(
value
);
}
else
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValueCode
(),
alertFormValue
.
getIsBlock
());
formValue
.
add
(
value
);
}
}
OrgDepartmentFormVo
orgDepartmentFormVo
=
new
OrgDepartmentFormVo
();
BeanUtils
.
copyProperties
(
orgUsr
,
orgDepartmentFormVo
);
BeanUtils
.
copyProperties
(
orgUsr
,
orgDepartmentFormVo
);
orgDepartmentFormVo
.
setDynamicFormAlert
(
formValue
);
return
ResponseHelper
.
buildResponse
(
orgDepartmentFormVo
);
return
ResponseHelper
.
buildResponse
(
orgDepartmentFormVo
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrgPersonController.java
View file @
f634d3b5
...
@@ -13,12 +13,14 @@ import java.util.Map;
...
@@ -13,12 +13,14 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentFormVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
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.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
@@ -32,11 +34,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -32,11 +34,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.utils.ExcelUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.ExcelUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgPersonFormVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgPersonFormVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgPersonVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgPersonVo
;
...
@@ -73,16 +71,7 @@ public class OrgPersonController {
...
@@ -73,16 +71,7 @@ public class OrgPersonController {
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
);
// 单位新增情况
iOrgUsrService
.
saveOrgUsrAlertFormValue
(
orgUsr
,
OrgPersonVo
.
getAlertFormValue
());
iOrgUsrService
.
save
(
orgUsr
);
// 动态表单
List
<
AlertFormValue
>
alertFromValuelist
=
OrgPersonVo
.
getAlertFormValue
();
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
// 保存动态表单数据
iAlertFromValueService
.
saveBatch
(
alertFromValuelist
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
@@ -117,29 +106,8 @@ public class OrgPersonController {
...
@@ -117,29 +106,8 @@ public class OrgPersonController {
OrgUsr
oriOrgUsr
=
iOrgUsrService
.
getById
(
id
);
OrgUsr
oriOrgUsr
=
iOrgUsrService
.
getById
(
id
);
BeanUtils
.
copyProperties
(
OrgPersonVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgPersonVo
,
orgUsr
);
iOrgUsrService
.
saveOrgUsr
(
oriOrgUsr
,
id
);
iOrgUsrService
.
saveOrgUsr
(
oriOrgUsr
,
id
);
// 动态表单
List
<
AlertFormValue
>
alertFromValuelist
=
OrgPersonVo
.
getAlertFormValue
();
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
List
<
AlertFromValueDto
>
formList
=
iAlertFromValueService
.
queryByCalledId
(
orgUsr
.
getSequenceNbr
());
for
(
AlertFormValue
dis
:
alertFromValuelist
)
{
for
(
AlertFromValueDto
src
:
formList
)
{
if
(
dis
.
getAlertFormId
()
==
src
.
getAlertFormId
())
{
dis
.
setSequenceNbr
(
src
.
getSequenceNbr
());
dis
.
setRecDate
(
new
Date
());
dis
.
setRecUserId
(
oriOrgUsr
.
getRecUserId
());
dis
.
setRecUserName
(
oriOrgUsr
.
getRecUserName
());
dis
.
setAlertTypeCode
(
src
.
getAlertTypeCode
());
break
;
}
}
}
// 保存动态表单数据
// 保存动态表单数据
i
AlertFromValueService
.
updateBatchById
(
alertFromValuelist
);
i
OrgUsrService
.
updateAlertFormValue
(
oriOrgUsr
,
orgUsr
.
getSequenceNbr
(),
OrgPersonVo
.
getAlertFormValue
()
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
@@ -152,28 +120,13 @@ public class OrgPersonController {
...
@@ -152,28 +120,13 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员详情"
,
notes
=
"获取人员详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员详情"
,
notes
=
"获取人员详情"
)
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 动态表单数据
// 动态表单数据
List
<
AlertFormValueVo
>
list
=
iAlertFromValueService
.
listByCalledId
(
id
);
List
<
FormValue
>
formValue
=
iOrgUsrService
.
getFormValue
(
id
);
List
<
FormValue
>
formValue
=
new
ArrayList
();
OrgPersonFormVo
orgPersonFormVo
=
new
OrgPersonFormVo
(
formValue
);
for
(
AlertFormValueVo
alertFormValue
:
list
)
{
BeanUtils
.
copyProperties
(
orgUsr
,
orgPersonFormVo
);
if
(
alertFormValue
.
getFieldValueCode
()
==
null
)
{
return
ResponseHelper
.
buildResponse
(
orgPersonFormVo
);
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getIsBlock
());
formValue
.
add
(
value
);
}
else
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValueCode
(),
alertFormValue
.
getIsBlock
());
formValue
.
add
(
value
);
}
}
OrgPersonFormVo
orgUsrFormVo
=
new
OrgPersonFormVo
();
BeanUtils
.
copyProperties
(
orgUsr
,
orgUsrFormVo
);
orgUsrFormVo
.
setDynamicFormAlert
(
formValue
);
return
ResponseHelper
.
buildResponse
(
orgUsrFormVo
);
}
}
...
@@ -186,18 +139,9 @@ public class OrgPersonController {
...
@@ -186,18 +139,9 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/show/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/show/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员详情"
,
notes
=
"获取人员详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员详情"
,
notes
=
"获取人员详情"
)
public
ResponseModel
selectForShowById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
ResponseModel
selectForShowById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
Map
<
String
,
Object
>
result
=
iOrgUsrService
.
selectForShowById
(
orgUsr
,
id
);
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 动态表单数据
List
<
AlertFormValueVo
>
list
=
iAlertFromValueService
.
listByCalledId
(
id
);
List
<
FormValue
>
formValue
=
new
ArrayList
();
Map
<
String
,
Object
>
result
=
Bean
.
BeantoMap
(
orgUsr
);
for
(
AlertFormValueVo
alertFormValue
:
list
)
{
result
.
put
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldValue
());
}
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrgUsrController.java
View file @
f634d3b5
...
@@ -76,16 +76,8 @@ public class OrgUsrController extends BaseController {
...
@@ -76,16 +76,8 @@ public class OrgUsrController extends BaseController {
public
ResponseModel
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgUsrVo
OrgUsrVo
)
{
public
ResponseModel
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgUsrVo
OrgUsrVo
)
{
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgUsrVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgUsrVo
,
orgUsr
);
// 单位新增情况
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
iOrgUsrService
.
save
(
orgUsr
);
iOrgUsrService
.
saveOrgUsrAlertFormValue
(
orgUsr
,
OrgUsrVo
.
getAlertFormValue
());
// 动态表单
List
<
AlertFormValue
>
alertFromValuelist
=
OrgUsrVo
.
getAlertFormValue
();
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
// 保存动态表单数据
iAlertFromValueService
.
saveBatch
(
alertFromValuelist
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
@@ -119,26 +111,8 @@ public class OrgUsrController extends BaseController {
...
@@ -119,26 +111,8 @@ public class OrgUsrController extends BaseController {
OrgUsr
oriOrgUsr
=
iOrgUsrService
.
getById
(
id
);
OrgUsr
oriOrgUsr
=
iOrgUsrService
.
getById
(
id
);
BeanUtils
.
copyProperties
(
OrgUsrVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgUsrVo
,
orgUsr
);
iOrgUsrService
.
saveOrgUsr
(
oriOrgUsr
,
id
);
iOrgUsrService
.
saveOrgUsr
(
oriOrgUsr
,
id
);
// 动态表单
List
<
AlertFormValue
>
alertFromValuelist
=
OrgUsrVo
.
getAlertFormValue
();
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
List
<
AlertFromValueDto
>
formList
=
iAlertFromValueService
.
queryByCalledId
(
orgUsr
.
getSequenceNbr
());
for
(
AlertFormValue
dis
:
alertFromValuelist
)
{
for
(
AlertFromValueDto
src
:
formList
)
{
if
(
dis
.
getAlertFormId
()
==
src
.
getAlertFormId
())
{
dis
.
setSequenceNbr
(
src
.
getSequenceNbr
());
dis
.
setRecDate
(
new
Date
());
dis
.
setRecUserId
(
oriOrgUsr
.
getRecUserId
());
dis
.
setRecUserName
(
oriOrgUsr
.
getRecUserName
());
break
;
}
}
}
// 保存动态表单数据
// 保存动态表单数据
i
AlertFromValueService
.
updateBatchById
(
alertFromValuelist
);
i
OrgUsrService
.
updateAlertFormValue
(
oriOrgUsr
,
orgUsr
.
getSequenceNbr
(),
OrgUsrVo
.
getAlertFormValue
()
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
@@ -154,22 +128,8 @@ public class OrgUsrController extends BaseController {
...
@@ -154,22 +128,8 @@ public class OrgUsrController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单位详情"
,
notes
=
"获取单位详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单位详情"
,
notes
=
"获取单位详情"
)
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
QueryWrapper
queryWrapper
=
new
QueryWrapper
<
OrgUsr
>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 动态表单数据
// 动态表单数据
List
<
AlertFormValueVo
>
list
=
iAlertFromValueService
.
listByCalledId
(
id
);
List
<
FormValue
>
formValue
=
iOrgUsrService
.
getFormValue
(
id
);
List
<
FormValue
>
formValue
=
new
ArrayList
();
for
(
AlertFormValueVo
alertFormValue
:
list
)
{
if
(
alertFormValue
.
getFieldValueCode
()
==
null
)
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getIsBlock
());
formValue
.
add
(
value
);
}
else
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValueCode
(),
alertFormValue
.
getIsBlock
());
formValue
.
add
(
value
);
}
}
OrgUsrFormVo
orgUsrFormVo
=
new
OrgUsrFormVo
();
OrgUsrFormVo
orgUsrFormVo
=
new
OrgUsrFormVo
();
orgUsrFormVo
.
setDynamicFormAlert
(
formValue
);
orgUsrFormVo
.
setDynamicFormAlert
(
formValue
);
BeanUtils
.
copyProperties
(
orgUsr
,
orgUsrFormVo
);
BeanUtils
.
copyProperties
(
orgUsr
,
orgUsrFormVo
);
...
@@ -283,17 +243,11 @@ public class OrgUsrController extends BaseController {
...
@@ -283,17 +243,11 @@ public class OrgUsrController extends BaseController {
}
}
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
iOrgUsrService
.
save
(
orgUsr
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_DEPARTMENT
);
// 动态表单
iOrgUsrService
.
saveOrgUsrAlertFormValue
(
orgUsr
,
OrgDepartmentVo
.
getAlertFormValue
());
List
<
AlertFormValue
>
alertFromValuelist
=
OrgDepartmentVo
.
getAlertFormValue
();
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
// 保存动态表单数据
iAlertFromValueService
.
saveBatch
(
alertFromValuelist
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
/**
/**
* 根据id获取单位人员列表
* 根据id获取单位人员列表
*
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/rule/action/AlertCalledAction.java
View file @
f634d3b5
...
@@ -2,10 +2,10 @@ package com.yeejoin.amos.boot.module.jcs.biz.rule.action;
...
@@ -2,10 +2,10 @@ package com.yeejoin.amos.boot.module.jcs.biz.rule.action;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
javax.annotation.PostConstruct
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -84,19 +84,35 @@ public class AlertCalledAction {
...
@@ -84,19 +84,35 @@ public class AlertCalledAction {
List
<
Long
>
seqs
=
StringUtil
.
String2LongList
(
sendIds
);
List
<
Long
>
seqs
=
StringUtil
.
String2LongList
(
sendIds
);
if
(
ValidationUtil
.
isEmpty
(
seqs
))
if
(
ValidationUtil
.
isEmpty
(
seqs
))
{
{
//构建短信参数
//构建短信参数
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<
String
,
String
>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<
String
,
String
>();
smsParams
.
put
(
"smsCode"
,
smsCode
);
Map
<
String
,
String
>
objectMap
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
),
HashMap
.
class
);
Map
<
String
,
String
>
objectMap
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
),
HashMap
.
class
);
smsParams
.
putAll
(
objectMap
);
smsParams
.
putAll
(
objectMap
);
//查询人员手机号
//发送短信
Set
<
String
>
mobiles
=
new
HashSet
<>();
List
<
OrgUsrDto
>
orgUsrDtos
=
orgUsrService
.
queryBatchSeq
(
seqs
);
List
<
OrgUsrDto
>
orgUsrDtos
=
orgUsrService
.
queryBatchSeq
(
seqs
);
for
(
OrgUsrDto
orgUsrDto
:
orgUsrDtos
)
for
(
OrgUsrDto
orgUsrDto
:
orgUsrDtos
)
{
// mobiles.add(e);
}
//发送短信
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
}
}
public
void
sendAlertCalleCmd
(
String
smsCode
,
Set
<
String
>
mobiles
,
HashMap
<
String
,
String
>
smsParams
)
{
if
(!
ValidationUtil
.
isEmpty
(
mobiles
))
{
//构建短信参数
smsParams
.
put
(
"smsCode"
,
smsCode
);
for
(
String
mobile
:
mobiles
)
{
{
// smsParams.put("mobile", orgUsrDto.g
e);
smsParams
.
put
(
"mobile"
,
mobil
e
);
//发送短信
Systemctl
.
smsClient
.
sendCommonSms
(
smsParams
);
Systemctl
.
smsClient
.
sendCommonSms
(
smsParams
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/OrgUsrServiceImpl.java
View file @
f634d3b5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -12,14 +13,15 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
...
@@ -12,14 +13,15 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
...
@@ -44,6 +46,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
...
@@ -44,6 +46,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
AlertFormValueServiceImpl
alertFormValueServiceImpl
;
AlertFormValueServiceImpl
alertFormValueServiceImpl
;
@Autowired
@Autowired
AlertFormServiceImpl
alertFormServiceImpl
;
AlertFormServiceImpl
alertFormServiceImpl
;
@Autowired
AlertFormValueServiceImpl
iAlertFromValueService
;
@Override
@Override
public
String
selectUpUnitByParam
(
String
biz_org_code
)
{
public
String
selectUpUnitByParam
(
String
biz_org_code
)
{
...
@@ -290,21 +294,27 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
...
@@ -290,21 +294,27 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
map
.
put
(
"pageNum"
,
(
pageBean
.
getCurrent
()
-
1
)
*
pageBean
.
getSize
());
map
.
put
(
"pageNum"
,
(
pageBean
.
getCurrent
()
-
1
)
*
pageBean
.
getSize
());
map
.
put
(
"pageSize"
,
pageBean
.
getSize
());
map
.
put
(
"pageSize"
,
pageBean
.
getSize
());
map
.
put
(
"fields"
,
alertFormServiceImpl
.
queryListByFormId
(
"246"
));
map
.
put
(
"fields"
,
alertFormServiceImpl
.
queryListByFormId
(
"246"
));
map
.
put
(
"alertTypeCode"
,
"246"
);
pageBean
.
setRecords
(
this
.
baseMapper
.
selectPersonList
(
map
));
pageBean
.
setRecords
(
this
.
baseMapper
.
selectPersonList
(
map
));
map
.
put
(
"bizOrgType"
,
"PERSON"
);
List
<
Map
<
String
,
Object
>>
list
=
this
.
baseMapper
.
selectPersonList
(
map
);
pageBean
.
setRecords
(
list
);
return
pageBean
;
return
pageBean
;
}
}
@Override
@Override
public
List
<
FormValue
>
getFormValue
(
QueryWrapper
queryWrapper
)
throws
Exception
{
public
List
<
FormValue
>
getFormValue
(
Long
id
)
throws
Exception
{
List
<
AlertFormValue
>
list
=
alertFormValueServiceImpl
.
list
(
queryWrapper
);
// 动态表单数据
List
<
AlertFormValueVo
>
list
=
iAlertFromValueService
.
listByCalledId
(
id
);
List
<
FormValue
>
formValue
=
new
ArrayList
();
List
<
FormValue
>
formValue
=
new
ArrayList
();
for
(
AlertFormValue
alertFormValue
:
list
)
{
for
(
AlertFormValueVo
alertFormValue
:
list
)
{
if
(
alertFormValue
.
getFieldValueCode
()
==
null
){
if
(
alertFormValue
.
getFieldValueCode
()
==
null
)
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
"text"
,
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getIsBlock
());
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getIsBlock
());
formValue
.
add
(
value
);
formValue
.
add
(
value
);
}
else
{
}
else
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
"text"
,
alertFormValue
.
getFieldValueCode
(),
alertFormValue
.
getIsBlock
());
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValueCode
(),
alertFormValue
.
getIsBlock
());
formValue
.
add
(
value
);
formValue
.
add
(
value
);
}
}
}
}
...
@@ -322,4 +332,51 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
...
@@ -322,4 +332,51 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
updateById
(
orgUsr
);
updateById
(
orgUsr
);
}
}
@Override
public
void
saveOrgUsrAlertFormValue
(
OrgUsr
orgUsr
,
List
<
AlertFormValue
>
alertFromValuelist
)
{
// 单位新增情况
save
(
orgUsr
);
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
// 保存动态表单数据
alertFormValueServiceImpl
.
saveBatch
(
alertFromValuelist
);
}
@Override
public
void
updateAlertFormValue
(
OrgUsr
orgUsr
,
Long
alertCalledId
,
List
<
AlertFormValue
>
alertFromValuelist
)
throws
Exception
{
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
List
<
AlertFromValueDto
>
formList
=
alertFormValueServiceImpl
.
queryByCalledId
(
alertCalledId
);
for
(
AlertFormValue
dis
:
alertFromValuelist
)
{
for
(
AlertFromValueDto
src
:
formList
)
{
if
(
dis
.
getAlertFormId
()
==
src
.
getAlertFormId
())
{
dis
.
setSequenceNbr
(
src
.
getSequenceNbr
());
dis
.
setRecDate
(
new
Date
());
dis
.
setRecUserId
(
orgUsr
.
getRecUserId
());
dis
.
setRecUserName
(
orgUsr
.
getRecUserName
());
break
;
}
}
}
// 保存动态表单数据
alertFormValueServiceImpl
.
updateBatchById
(
alertFromValuelist
);
}
@Override
public
Map
<
String
,
Object
>
selectForShowById
(
OrgUsr
orgUsr
,
Long
id
)
throws
Exception
{
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 动态表单数据
List
<
AlertFormValueVo
>
list
=
iAlertFromValueService
.
listByCalledId
(
id
);
List
<
FormValue
>
formValue
=
new
ArrayList
();
Map
<
String
,
Object
>
result
=
Bean
.
BeantoMap
(
orgUsr
);
for
(
AlertFormValueVo
alertFormValue
:
list
)
{
result
.
put
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldValue
());
}
return
result
;
}
}
}
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