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
73daa52a
Commit
73daa52a
authored
Jun 30, 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
c2e00b14
5b0f24e3
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
48 deletions
+54
-48
pom.xml
amos-boot-biz-common/pom.xml
+0
-1
OrgUsrMapper.xml
...module-jcs-api/src/main/resources/mapper/OrgUsrMapper.xml
+20
-18
pom.xml
amos-boot-module/amos-boot-module-api/pom.xml
+3
-2
OrgUsrServiceImpl.java
...s/boot/module/jcs/biz/service/impl/OrgUsrServiceImpl.java
+27
-23
pom.xml
amos-boot-module/amos-boot-module-biz/pom.xml
+3
-2
pom.xml
amos-boot-tzs-system/pom.xml
+0
-1
pom.xml
pom.xml
+1
-1
No files found.
amos-boot-biz-common/pom.xml
View file @
73daa52a
...
...
@@ -2,7 +2,6 @@
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
amos-boot-biz-common
</artifactId>
<name>
AMOS-BOOT-BIZ-COMMON
</name>
<packaging>
jar
</packaging>
<properties>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
73daa52a
...
...
@@ -29,20 +29,21 @@
cb_org_usr u LEFT JOIN
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
where u.parent_id = #{parentId}
AND u.biz_org_type = #{bizOrgType}
AND U.is_delete = 0
where
u.biz_org_type = #{bizOrgType}
AND u.is_delete = 0
<if
test=
"bizOrgName != null"
>
AND u.biz_org_name = #{bizOrgName}
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != '-1'"
>
AND u.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_code
)a where a.sequenceNbr is not null
<if
test=
"bizOrgName != null"
>
AND u.bizOrgName = #{bizOrgName}
</if>
<if
test=
"bizOrgCode != null"
>
AND u.bizOrgName = #{bizOrgCode}
</if>
<if
test=
"fieldsValue != null"
>
<foreach
collection=
"fieldsValue.keys"
item=
"item"
>
AND a.${item} = #{fieldsValue[${item}]}
</foreach>
</if>
...
...
@@ -63,20 +64,20 @@
cb_org_usr u LEFT JOIN
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
where u.parent_id = #{parentId}
AND u.biz_org_type = #{bizOrgType}
AND U.is_delete = 0
where
u.biz_org_type = #{bizOrgType}
AND u.is_delete = 0
<if
test=
"bizOrgName != null"
>
AND u.biz_org_name = #{bizOrgName}
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != '-1'"
>
AND u.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_code
)a where a.sequenceNbr is not null
<if
test=
"bizOrgName != null"
>
AND u.bizOrgName = #{bizOrgName}
</if>
<if
test=
"bizOrgCode != null"
>
AND u.bizOrgName = #{bizOrgCode}
</if>
<if
test=
"fieldsValue != null"
>
<foreach
collection=
"fieldsValue.keys"
item=
"item"
>
AND a.${item} = #{fieldsValue[${item}]}
</foreach>
</if>
...
...
@@ -114,6 +115,7 @@
SELECT
sequence_nbr,
biz_org_name,
biz_org_code,
biz_org_type,
parent_id
FROM
...
...
amos-boot-module/amos-boot-module-api/pom.xml
View file @
73daa52a
...
...
@@ -17,7 +17,7 @@
<modules>
<module>
amos-boot-module-tzs-api
</module>
<module>
amos-boot-module-jcs-api
</module>
<module>
amos-boot-module-demo-api
</module>
<module>
amos-boot-module-common-api
</module>
<!--
<module>amos-boot-module-demo-api</module>
<module>amos-boot-module-common-api</module>
-->
</modules>
</project>
\ No newline at end of file
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 @
73daa52a
...
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -24,7 +23,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto
;
...
...
@@ -34,20 +32,17 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import
com.yeejoin.amos.boot.module.jcs.api.enums.OrgPersonEnum
;
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.vo.*
;
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.OrgDepartmentFormVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo
;
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.OrgUsrFormVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrVo
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.lang.reflect.Method
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 机构/部门/人员表 服务实现类
...
...
@@ -249,6 +244,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
list
==
null
?
new
ArrayList
<
Map
<
String
,
Object
>>()
:
list
;
}
public
IPage
<
Map
<
String
,
Object
>>
pagePerson
(
String
pageNum
,
String
pageSize
,
Map
<
String
,
Object
>
req
)
{
IPage
<
Map
<
String
,
Object
>>
pageBean
=
null
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
...
...
@@ -261,7 +258,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if
(!
ObjectUtils
.
isEmpty
(
req
.
get
(
"bizOrgName"
)))
{
map
.
put
(
"bizOrgName"
,
req
.
get
(
"bizOrgName"
));
}
map
.
put
(
"parentId"
,
req
.
get
(
"parentId"
));
OrgUsr
parent
=
this
.
getById
(
Long
.
valueOf
(
req
.
get
(
"parentId"
).
toString
()));
map
.
put
(
"bizOrgCode"
,
parent
.
getBizOrgCode
());
req
.
remove
(
"bizOrgName"
);
req
.
remove
(
"pageSize"
);
req
.
remove
(
"pageNum"
);
...
...
@@ -318,7 +316,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsr
.
setRecUserName
(
oriOrgUsr
.
getRecUserName
());
orgUsr
.
setAmosOrgId
(
oriOrgUsr
.
getAmosOrgId
());
orgUsr
.
setAmosOrgCode
(
oriOrgUsr
.
getAmosOrgCode
());
if
(
oriOrgUsr
.
getParentId
()
!=
null
&&
!
"-1"
.
equals
(
oriOrgUsr
.
getParentId
())
)
{
if
(
oriOrgUsr
.
getParentId
()
!=
null
)
{
OrgUsr
parent
=
getById
(
oriOrgUsr
.
getParentId
());
if
(
parent
!=
null
&&
ObjectUtils
.
isEmpty
(
oriOrgUsr
.
getBizOrgCode
()))
{
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
...
...
@@ -339,6 +337,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
save
(
orgUsr
);
// 填充主键
alertFromValuelist
.
stream
().
forEach
(
alertFromValue
->
{
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
alertFromValue
.
setAlertTypeCode
(
OrgPersonEnum
.
公司
.
getCode
());
}
else
if
(
OrgPersonEnum
.
部门
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
alertFromValue
.
setAlertTypeCode
(
OrgPersonEnum
.
部门
.
getCode
());
}
alertFromValue
.
setAlertCalledId
(
orgUsr
.
getSequenceNbr
());
});
// 保存动态表单数据
...
...
@@ -362,6 +365,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
dis
.
setRecUserName
(
orgUsr
.
getRecUserName
());
dis
.
setAlertTypeCode
(
src
.
getAlertTypeCode
());
dis
.
setAlertFormId
(
src
.
getAlertFormId
());
dis
.
setSequenceNbr
(
src
.
getSequenceNbr
());
break
;
}
}
...
...
@@ -369,7 +373,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 保存动态表单数据
alertFormValueServiceImpl
.
updateBatchById
(
alertFromValuelist
);
List
<
AlertFromDto
>
form
=
alertFormServiceImpl
.
queryListByTypeCode
(
alertFromValuel
ist
.
get
(
0
).
getAlertTypeCode
());
List
<
AlertFromDto
>
form
=
alertFormServiceImpl
.
queryListByTypeCode
(
formL
ist
.
get
(
0
).
getAlertTypeCode
());
if
(
form
.
size
()
!=
alertFromValuelist
.
size
())
{
...
...
@@ -383,7 +387,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
break
;
}
}
if
(!
exist
)
{
if
(
ObjectUtils
.
isEmpty
(
dis
)
&&
!
exist
)
{
creatList
.
add
(
dis
);
}
}
...
...
@@ -431,7 +435,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgUsrVo
,
orgUsr
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
if
(
OrgUsrVo
.
getParentId
()
!=
null
&&
!
"-1"
.
equals
(
OrgUsrVo
.
getParentId
())
)
{
if
(
OrgUsrVo
.
getParentId
()
!=
null
)
{
OrgUsr
parent
=
getById
(
OrgUsrVo
.
getParentId
());
if
(
parent
!=
null
&&
ObjectUtils
.
isEmpty
(
OrgUsrVo
.
getBizOrgCode
()))
{
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
...
...
@@ -447,7 +451,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgPersonVo
,
orgUsr
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
if
(
OrgPersonVo
.
getParentId
()
!=
null
&&
!
"-1"
.
equals
(
OrgPersonVo
.
getParentId
())
)
{
if
(
OrgPersonVo
.
getParentId
()
!=
null
)
{
OrgUsr
parent
=
getById
(
OrgPersonVo
.
getParentId
());
if
(
parent
!=
null
&&
ObjectUtils
.
isEmpty
(
OrgPersonVo
.
getBizOrgCode
()))
{
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
...
...
@@ -471,7 +475,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
oriOrgUsr
=
getById
(
id
);
BeanUtils
.
copyProperties
(
OrgUsrVo
,
orgUsr
);
if
(
orgUsr
.
getParentId
()
!=
null
&&
!
"-1"
.
equals
(
orgUsr
.
getParentId
())
)
{
if
(
orgUsr
.
getParentId
()
!=
null
)
{
OrgUsr
parent
=
getById
(
orgUsr
.
getParentId
());
if
(
parent
!=
null
&&
ObjectUtils
.
isEmpty
(
OrgUsrVo
.
getBizOrgCode
()))
{
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
...
...
@@ -603,7 +607,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_DEPARTMENT
);
if
(
OrgDepartmentVo
.
getParentId
()
!=
null
&&
!
"-1"
.
equals
(
OrgDepartmentVo
.
getParentId
())
)
{
if
(
OrgDepartmentVo
.
getParentId
()
!=
null
)
{
OrgUsr
parent
=
getById
(
OrgDepartmentVo
.
getParentId
());
if
(
parent
!=
null
&&
ObjectUtils
.
isEmpty
(
OrgDepartmentVo
.
getBizOrgCode
()))
{
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
...
...
@@ -620,7 +624,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
oriOrgUsr
=
getById
(
id
);
BeanUtils
.
copyProperties
(
OrgDepartmentVo
,
orgUsr
);
if
(
orgUsr
.
getParentId
()
!=
null
&&
!
"-1"
.
equals
(
orgUsr
.
getParentId
())
)
{
if
(
orgUsr
.
getParentId
()
!=
null
)
{
OrgUsr
parent
=
getById
(
orgUsr
.
getParentId
());
if
(
parent
!=
null
&&
ObjectUtils
.
isEmpty
(
OrgDepartmentVo
.
getBizOrgCode
()))
{
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
...
...
amos-boot-module/amos-boot-module-biz/pom.xml
View file @
73daa52a
...
...
@@ -16,7 +16,7 @@
<modules>
<module>
amos-boot-module-tzs-biz
</module>
<module>
amos-boot-module-jcs-biz
</module>
<module>
amos-boot-module-demo-biz
</module>
<module>
amos-boot-module-common-biz
</module>
<
!--<
module>amos-boot-module-demo-biz</module>
<module>amos-boot-module-common-biz</module>
-->
</modules>
</project>
\ No newline at end of file
amos-boot-tzs-system/pom.xml
View file @
73daa52a
...
...
@@ -2,7 +2,6 @@
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
amos-boot-tzs-system
</artifactId>
<name>
SpecialEquipmentServiceStart
</name>
<packaging>
jar
</packaging>
<parent>
...
...
pom.xml
View file @
73daa52a
...
...
@@ -188,6 +188,6 @@
<module>
amos-boot-jcs-system
</module>
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-module
</module>
<
module>
amos-boot-demo-system
</module
>
<
!-- <module>amos-boot-demo-system</module> --
>
</modules>
</project>
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