Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz人力资源
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz人力资源
提交
ea5a5240
提交
ea5a5240
编写于
8月 06, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jackwang 部署微服务接口
上级
0eabedb5
变更
19
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
341 行增加
和
47 行删除
+341
-47
config.xml
config.xml
+5
-5
Dockerfile
...urce-app/humanresource-app-pim/src/main/docker/Dockerfile
+1
-1
humanresource-app-pim.yaml
...source-app-pim/src/main/docker/humanresource-app-pim.yaml
+1
-17
HRDistribution.java
...manresource/core/humanresource/domain/HRDistribution.java
+112
-0
HREmployee.java
...b/humanresource/core/humanresource/domain/HREmployee.java
+2
-2
HRPost.java
...izlab/humanresource/core/humanresource/domain/HRPost.java
+15
-0
HRDistributionSearchContext.java
...ore/humanresource/filter/HRDistributionSearchContext.java
+42
-0
HREmployeeSearchContext.java
...ce/core/humanresource/filter/HREmployeeSearchContext.java
+1
-1
HRDistributionMapper.java
...ource/core/humanresource/mapper/HRDistributionMapper.java
+4
-0
IHRDistributionService.java
...ce/core/humanresource/service/IHRDistributionService.java
+4
-0
HRDistributionServiceImpl.java
...humanresource/service/impl/HRDistributionServiceImpl.java
+59
-0
HREmployeeServiceImpl.java
...ore/humanresource/service/impl/HREmployeeServiceImpl.java
+3
-0
HRPostServiceImpl.java
...ce/core/humanresource/service/impl/HRPostServiceImpl.java
+3
-0
h2_table.xml
humanresource-core/src/main/resources/liquibase/h2_table.xml
+29
-13
HRDistributionMapper.xml
...per/humanresource/hrdistribution/HRDistributionMapper.xml
+23
-3
HRPostMapper.xml
...in/resources/mapper/humanresource/hrpost/HRPostMapper.xml
+3
-3
Dockerfile
...r/humanresource-provider-hrapi/src/main/docker/Dockerfile
+1
-1
humanresource-provider-hrapi.yaml
...r-hrapi/src/main/docker/humanresource-provider-hrapi.yaml
+17
-1
HRPostDTO.java
...in/java/cn/ibizlab/humanresource/hrapi/dto/HRPostDTO.java
+16
-0
未找到文件。
config.xml
浏览文件 @
ea5a5240
...
@@ -37,11 +37,11 @@
...
@@ -37,11 +37,11 @@
git clone -b master $para2 ibizhumanresources/
git clone -b master $para2 ibizhumanresources/
export NODE_OPTIONS=--max-old-space-size=4096
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizhumanresources/
cd ibizhumanresources/
mvn clean package -P
pim
mvn clean package -P
hrapi
cd humanresource-
app/humanresource-app-pim
cd humanresource-
provider/humanresource-provider-hrapi
mvn -P
pim
docker:build
mvn -P
hrapi
docker:build
mvn -P
pim
docker:push
mvn -P
hrapi
docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-
app-pim.yaml iBizEE --with-registry-auth
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-
provider-hrapi.yaml iBizEE --with-registry-auth
</command>
</command>
</hudson.tasks.Shell>
</hudson.tasks.Shell>
</builders>
</builders>
...
...
humanresource-app/humanresource-app-pim/src/main/docker/Dockerfile
浏览文件 @
ea5a5240
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-app-pim.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-app-pim.jar
EXPOSE
10327
EXPOSE
8080
ADD
humanresource-app-pim.jar /humanresource-app-pim.jar
ADD
humanresource-app-pim.jar /humanresource-app-pim.jar
humanresource-app/humanresource-app-pim/src/main/docker/humanresource-app-pim.yaml
浏览文件 @
ea5a5240
...
@@ -3,25 +3,9 @@ services:
...
@@ -3,25 +3,9 @@ services:
humanresource-app-pim
:
humanresource-app-pim
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest
ports
:
ports
:
-
"
10327:10327
"
-
"
8080:8080
"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=10327
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
-
SPRING_REDIS_HOST=172.16.240.110
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
-
SPRING_DATASOURCE_PASSWORD=b1@@@772
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
-
CAS=https://passport.ibizlab.cn
-
NACOS=172.16.240.110:8848
-
SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
-
SEATA_ENABLED=true
deploy
:
deploy
:
resources
:
resources
:
limits
:
limits
:
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/domain/HRDistribution.java
浏览文件 @
ea5a5240
...
@@ -89,6 +89,66 @@ public class HRDistribution extends EntityMP implements Serializable {
...
@@ -89,6 +89,66 @@ public class HRDistribution extends EntityMP implements Serializable {
@JSONField
(
name
=
"createman"
)
@JSONField
(
name
=
"createman"
)
@JsonProperty
(
"createman"
)
@JsonProperty
(
"createman"
)
private
String
createman
;
private
String
createman
;
/**
* 员工标识
*/
@TableField
(
value
=
"hremployeeid"
)
@JSONField
(
name
=
"hremployeeid"
)
@JsonProperty
(
"hremployeeid"
)
private
String
hremployeeid
;
/**
* 员工姓名
*/
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"hremployeename"
)
@JsonProperty
(
"hremployeename"
)
private
String
hremployeename
;
/**
* 开始时间
*/
@TableField
(
value
=
"begintime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"begintime"
,
format
=
"yyyy-MM-dd"
)
@JsonProperty
(
"begintime"
)
private
Timestamp
begintime
;
/**
* 结束时间
*/
@TableField
(
value
=
"endtime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"endtime"
,
format
=
"yyyy-MM-dd"
)
@JsonProperty
(
"endtime"
)
private
Timestamp
endtime
;
/**
* 职位标识
*/
@TableField
(
value
=
"hrpostid"
)
@JSONField
(
name
=
"hrpostid"
)
@JsonProperty
(
"hrpostid"
)
private
String
hrpostid
;
/**
* 职位
*/
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"hrpostname"
)
@JsonProperty
(
"hrpostname"
)
private
String
hrpostname
;
/**
* 员工
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
.
HREmployee
hremployee
;
/**
* 职位
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
.
HRPost
hrpost
;
...
@@ -100,6 +160,58 @@ public class HRDistribution extends EntityMP implements Serializable {
...
@@ -100,6 +160,58 @@ public class HRDistribution extends EntityMP implements Serializable {
this
.
modify
(
"hrdistributionname"
,
hrdistributionname
);
this
.
modify
(
"hrdistributionname"
,
hrdistributionname
);
}
}
/**
* 设置 [员工标识]
*/
public
void
setHremployeeid
(
String
hremployeeid
){
this
.
hremployeeid
=
hremployeeid
;
this
.
modify
(
"hremployeeid"
,
hremployeeid
);
}
/**
* 设置 [开始时间]
*/
public
void
setBegintime
(
Timestamp
begintime
){
this
.
begintime
=
begintime
;
this
.
modify
(
"begintime"
,
begintime
);
}
/**
* 格式化日期 [开始时间]
*/
public
String
formatBegintime
(){
if
(
this
.
begintime
==
null
)
{
return
null
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
sdf
.
format
(
begintime
);
}
/**
* 设置 [结束时间]
*/
public
void
setEndtime
(
Timestamp
endtime
){
this
.
endtime
=
endtime
;
this
.
modify
(
"endtime"
,
endtime
);
}
/**
* 格式化日期 [结束时间]
*/
public
String
formatEndtime
(){
if
(
this
.
endtime
==
null
)
{
return
null
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
sdf
.
format
(
endtime
);
}
/**
* 设置 [职位标识]
*/
public
void
setHrpostid
(
String
hrpostid
){
this
.
hrpostid
=
hrpostid
;
this
.
modify
(
"hrpostid"
,
hrpostid
);
}
}
}
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/domain/HREmployee.java
浏览文件 @
ea5a5240
...
@@ -41,7 +41,7 @@ public class HREmployee extends EntityMP implements Serializable {
...
@@ -41,7 +41,7 @@ public class HREmployee extends EntityMP implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 员工
名称
* 员工
姓名
*/
*/
@TableField
(
value
=
"employeename"
)
@TableField
(
value
=
"employeename"
)
@JSONField
(
name
=
"employeename"
)
@JSONField
(
name
=
"employeename"
)
...
@@ -108,7 +108,7 @@ public class HREmployee extends EntityMP implements Serializable {
...
@@ -108,7 +108,7 @@ public class HREmployee extends EntityMP implements Serializable {
/**
/**
* 设置 [员工
名称
]
* 设置 [员工
姓名
]
*/
*/
public
void
setEmployeename
(
String
employeename
){
public
void
setEmployeename
(
String
employeename
){
this
.
employeename
=
employeename
;
this
.
employeename
=
employeename
;
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/domain/HRPost.java
浏览文件 @
ea5a5240
...
@@ -146,6 +146,13 @@ public class HRPost extends EntityMP implements Serializable {
...
@@ -146,6 +146,13 @@ public class HRPost extends EntityMP implements Serializable {
@JSONField
(
name
=
"entrytime"
,
format
=
"yyyy-MM-dd"
)
@JSONField
(
name
=
"entrytime"
,
format
=
"yyyy-MM-dd"
)
@JsonProperty
(
"entrytime"
)
@JsonProperty
(
"entrytime"
)
private
Timestamp
entrytime
;
private
Timestamp
entrytime
;
/**
* 编制人数
*/
@TableField
(
value
=
"postnum"
)
@JSONField
(
name
=
"postnum"
)
@JsonProperty
(
"postnum"
)
private
BigInteger
postnum
;
/**
/**
* 职务
* 职务
...
@@ -231,6 +238,14 @@ public class HRPost extends EntityMP implements Serializable {
...
@@ -231,6 +238,14 @@ public class HRPost extends EntityMP implements Serializable {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
sdf
.
format
(
entrytime
);
return
sdf
.
format
(
entrytime
);
}
}
/**
* 设置 [编制人数]
*/
public
void
setPostnum
(
BigInteger
postnum
){
this
.
postnum
=
postnum
;
this
.
modify
(
"postnum"
,
postnum
);
}
}
}
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/filter/HRDistributionSearchContext.java
浏览文件 @
ea5a5240
...
@@ -34,6 +34,48 @@ public class HRDistributionSearchContext extends QueryWrapperContext<HRDistribut
...
@@ -34,6 +34,48 @@ public class HRDistributionSearchContext extends QueryWrapperContext<HRDistribut
this
.
getSearchCond
().
like
(
"hrdistributionname"
,
n_hrdistributionname_like
);
this
.
getSearchCond
().
like
(
"hrdistributionname"
,
n_hrdistributionname_like
);
}
}
}
}
private
String
n_hremployeeid_eq
;
//[员工标识]
public
void
setN_hremployeeid_eq
(
String
n_hremployeeid_eq
)
{
this
.
n_hremployeeid_eq
=
n_hremployeeid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hremployeeid_eq
)){
this
.
getSearchCond
().
eq
(
"hremployeeid"
,
n_hremployeeid_eq
);
}
}
private
String
n_hremployeename_eq
;
//[员工姓名]
public
void
setN_hremployeename_eq
(
String
n_hremployeename_eq
)
{
this
.
n_hremployeename_eq
=
n_hremployeename_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hremployeename_eq
)){
this
.
getSearchCond
().
eq
(
"hremployeename"
,
n_hremployeename_eq
);
}
}
private
String
n_hremployeename_like
;
//[员工姓名]
public
void
setN_hremployeename_like
(
String
n_hremployeename_like
)
{
this
.
n_hremployeename_like
=
n_hremployeename_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hremployeename_like
)){
this
.
getSearchCond
().
like
(
"hremployeename"
,
n_hremployeename_like
);
}
}
private
String
n_hrpostid_eq
;
//[职位标识]
public
void
setN_hrpostid_eq
(
String
n_hrpostid_eq
)
{
this
.
n_hrpostid_eq
=
n_hrpostid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hrpostid_eq
)){
this
.
getSearchCond
().
eq
(
"hrpostid"
,
n_hrpostid_eq
);
}
}
private
String
n_hrpostname_eq
;
//[职位]
public
void
setN_hrpostname_eq
(
String
n_hrpostname_eq
)
{
this
.
n_hrpostname_eq
=
n_hrpostname_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hrpostname_eq
)){
this
.
getSearchCond
().
eq
(
"hrpostname"
,
n_hrpostname_eq
);
}
}
private
String
n_hrpostname_like
;
//[职位]
public
void
setN_hrpostname_like
(
String
n_hrpostname_like
)
{
this
.
n_hrpostname_like
=
n_hrpostname_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hrpostname_like
)){
this
.
getSearchCond
().
like
(
"hrpostname"
,
n_hrpostname_like
);
}
}
/**
/**
* 启用快速搜索
* 启用快速搜索
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/filter/HREmployeeSearchContext.java
浏览文件 @
ea5a5240
...
@@ -27,7 +27,7 @@ import cn.ibizlab.humanresource.core.humanresource.domain.HREmployee;
...
@@ -27,7 +27,7 @@ import cn.ibizlab.humanresource.core.humanresource.domain.HREmployee;
@Data
@Data
public
class
HREmployeeSearchContext
extends
QueryWrapperContext
<
HREmployee
>
{
public
class
HREmployeeSearchContext
extends
QueryWrapperContext
<
HREmployee
>
{
private
String
n_employeename_like
;
//[员工
名称
]
private
String
n_employeename_like
;
//[员工
姓名
]
public
void
setN_employeename_like
(
String
n_employeename_like
)
{
public
void
setN_employeename_like
(
String
n_employeename_like
)
{
this
.
n_employeename_like
=
n_employeename_like
;
this
.
n_employeename_like
=
n_employeename_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_employeename_like
)){
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_employeename_like
)){
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/mapper/HRDistributionMapper.java
浏览文件 @
ea5a5240
...
@@ -62,4 +62,8 @@ public interface HRDistributionMapper extends BaseMapper<HRDistribution>{
...
@@ -62,4 +62,8 @@ public interface HRDistributionMapper extends BaseMapper<HRDistribution>{
@Delete
(
"${sql}"
)
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
HRDistribution
>
selectByHremployeeid
(
@Param
(
"employeeid"
)
Serializable
employeeid
)
;
List
<
HRDistribution
>
selectByHrpostid
(
@Param
(
"hrpostid"
)
Serializable
hrpostid
)
;
}
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/IHRDistributionService.java
浏览文件 @
ea5a5240
...
@@ -37,6 +37,10 @@ public interface IHRDistributionService extends IService<HRDistribution>{
...
@@ -37,6 +37,10 @@ public interface IHRDistributionService extends IService<HRDistribution>{
boolean
save
(
HRDistribution
et
)
;
boolean
save
(
HRDistribution
et
)
;
void
saveBatch
(
List
<
HRDistribution
>
list
)
;
void
saveBatch
(
List
<
HRDistribution
>
list
)
;
Page
<
HRDistribution
>
searchDefault
(
HRDistributionSearchContext
context
)
;
Page
<
HRDistribution
>
searchDefault
(
HRDistributionSearchContext
context
)
;
List
<
HRDistribution
>
selectByHremployeeid
(
String
employeeid
)
;
void
removeByHremployeeid
(
String
employeeid
)
;
List
<
HRDistribution
>
selectByHrpostid
(
String
hrpostid
)
;
void
removeByHrpostid
(
String
hrpostid
)
;
/**
/**
*自定义查询SQL
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param sql select * from table where id =#{et.param}
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/impl/HRDistributionServiceImpl.java
浏览文件 @
ea5a5240
...
@@ -45,12 +45,19 @@ import org.springframework.util.StringUtils;
...
@@ -45,12 +45,19 @@ import org.springframework.util.StringUtils;
@Service
(
"HRDistributionServiceImpl"
)
@Service
(
"HRDistributionServiceImpl"
)
public
class
HRDistributionServiceImpl
extends
ServiceImpl
<
HRDistributionMapper
,
HRDistribution
>
implements
IHRDistributionService
{
public
class
HRDistributionServiceImpl
extends
ServiceImpl
<
HRDistributionMapper
,
HRDistribution
>
implements
IHRDistributionService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHREmployeeService
hremployeeService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRPostService
hrpostService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
HRDistribution
et
)
{
public
boolean
create
(
HRDistribution
et
)
{
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getHrdistributionid
()),
et
);
CachedBeanCopier
.
copy
(
get
(
et
.
getHrdistributionid
()),
et
);
...
@@ -59,12 +66,14 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
...
@@ -59,12 +66,14 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
@Override
@Override
public
void
createBatch
(
List
<
HRDistribution
>
list
)
{
public
void
createBatch
(
List
<
HRDistribution
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
this
.
saveBatch
(
list
,
batchSize
);
this
.
saveBatch
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
HRDistribution
et
)
{
public
boolean
update
(
HRDistribution
et
)
{
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"hrdistributionid"
,
et
.
getHrdistributionid
())))
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"hrdistributionid"
,
et
.
getHrdistributionid
())))
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getHrdistributionid
()),
et
);
CachedBeanCopier
.
copy
(
get
(
et
.
getHrdistributionid
()),
et
);
...
@@ -73,6 +82,7 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
...
@@ -73,6 +82,7 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
@Override
@Override
public
void
updateBatch
(
List
<
HRDistribution
>
list
)
{
public
void
updateBatch
(
List
<
HRDistribution
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
updateBatchById
(
list
,
batchSize
);
updateBatchById
(
list
,
batchSize
);
}
}
...
@@ -103,6 +113,7 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
...
@@ -103,6 +113,7 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
@Override
@Override
public
HRDistribution
getDraft
(
HRDistribution
et
)
{
public
HRDistribution
getDraft
(
HRDistribution
et
)
{
fillParentData
(
et
);
return
et
;
return
et
;
}
}
...
@@ -130,16 +141,38 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
...
@@ -130,16 +141,38 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
@Override
@Override
public
boolean
saveBatch
(
Collection
<
HRDistribution
>
list
)
{
public
boolean
saveBatch
(
Collection
<
HRDistribution
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
return
true
;
}
}
@Override
@Override
public
void
saveBatch
(
List
<
HRDistribution
>
list
)
{
public
void
saveBatch
(
List
<
HRDistribution
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
saveOrUpdateBatch
(
list
,
batchSize
);
}
}
@Override
public
List
<
HRDistribution
>
selectByHremployeeid
(
String
employeeid
)
{
return
baseMapper
.
selectByHremployeeid
(
employeeid
);
}
@Override
public
void
removeByHremployeeid
(
String
employeeid
)
{
this
.
remove
(
new
QueryWrapper
<
HRDistribution
>().
eq
(
"hremployeeid"
,
employeeid
));
}
@Override
public
List
<
HRDistribution
>
selectByHrpostid
(
String
hrpostid
)
{
return
baseMapper
.
selectByHrpostid
(
hrpostid
);
}
@Override
public
void
removeByHrpostid
(
String
hrpostid
)
{
this
.
remove
(
new
QueryWrapper
<
HRDistribution
>().
eq
(
"hrpostid"
,
hrpostid
));
}
/**
/**
* 查询集合 DEFAULT
* 查询集合 DEFAULT
...
@@ -152,6 +185,32 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
...
@@ -152,6 +185,32 @@ public class HRDistributionServiceImpl extends ServiceImpl<HRDistributionMapper,
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private
void
fillParentData
(
HRDistribution
et
){
//实体关系[DER1N_HRDISTRIBUTION_HREMPLOYEE_HREMPLOYEEID_327A4D]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getHremployeeid
())){
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
.
HREmployee
hremployee
=
et
.
getHremployee
();
if
(
ObjectUtils
.
isEmpty
(
hremployee
)){
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
.
HREmployee
majorEntity
=
hremployeeService
.
get
(
et
.
getHremployeeid
());
et
.
setHremployee
(
majorEntity
);
hremployee
=
majorEntity
;
}
et
.
setHremployeename
(
hremployee
.
getEmployeename
());
}
//实体关系[DER1N_HRDISTRIBUTION_HRPOST_HRPOSTID]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getHrpostid
())){
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
.
HRPost
hrpost
=
et
.
getHrpost
();
if
(
ObjectUtils
.
isEmpty
(
hrpost
)){
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
.
HRPost
majorEntity
=
hrpostService
.
get
(
et
.
getHrpostid
());
et
.
setHrpost
(
majorEntity
);
hrpost
=
majorEntity
;
}
et
.
setHrpostname
(
hrpost
.
getHrpostname
());
}
}
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/impl/HREmployeeServiceImpl.java
浏览文件 @
ea5a5240
...
@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
...
@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service
(
"HREmployeeServiceImpl"
)
@Service
(
"HREmployeeServiceImpl"
)
public
class
HREmployeeServiceImpl
extends
ServiceImpl
<
HREmployeeMapper
,
HREmployee
>
implements
IHREmployeeService
{
public
class
HREmployeeServiceImpl
extends
ServiceImpl
<
HREmployeeMapper
,
HREmployee
>
implements
IHREmployeeService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRDistributionService
hrdistributionService
;
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
base
.
service
.
IHROrganizationService
hrorganizationService
;
protected
cn
.
ibizlab
.
humanresource
.
core
.
base
.
service
.
IHROrganizationService
hrorganizationService
;
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/impl/HRPostServiceImpl.java
浏览文件 @
ea5a5240
...
@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
...
@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service
(
"HRPostServiceImpl"
)
@Service
(
"HRPostServiceImpl"
)
public
class
HRPostServiceImpl
extends
ServiceImpl
<
HRPostMapper
,
HRPost
>
implements
IHRPostService
{
public
class
HRPostServiceImpl
extends
ServiceImpl
<
HRPostMapper
,
HRPost
>
implements
IHRPostService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRDistributionService
hrdistributionService
;
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRDutyService
hrdutyService
;
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRDutyService
hrdutyService
;
...
...
humanresource-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
ea5a5240
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<!--输出实体[HRDISTRIBUTION]数据结构 -->
<!--输出实体[HRDISTRIBUTION]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hrdistribution-
2
-2"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hrdistribution-
11
-2"
>
<createTable
tableName=
"T_HRDISTRIBUTION"
>
<createTable
tableName=
"T_HRDISTRIBUTION"
>
<column
name=
"UPDATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
<column
name=
"UPDATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
</column>
...
@@ -39,6 +39,14 @@
...
@@ -39,6 +39,14 @@
</column>
</column>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
</column>
<column
name=
"HREMPLOYEEID"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"BEGINTIME"
remarks=
""
type=
"DATETIME"
>
</column>
<column
name=
"ENDTIME"
remarks=
""
type=
"DATETIME"
>
</column>
<column
name=
"HRPOSTID"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
</createTable>
</createTable>
</changeSet>
</changeSet>
...
@@ -64,7 +72,7 @@
...
@@ -64,7 +72,7 @@
<!--输出实体[HREMPLOYEE]数据结构 -->
<!--输出实体[HREMPLOYEE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hremployee-
5
-4"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hremployee-
7
-4"
>
<createTable
tableName=
"EMPLOYEE"
>
<createTable
tableName=
"EMPLOYEE"
>
<column
name=
"EMPLOYEENAME"
remarks=
""
type=
"VARCHAR(200)"
>
<column
name=
"EMPLOYEENAME"
remarks=
""
type=
"VARCHAR(200)"
>
</column>
</column>
...
@@ -180,7 +188,7 @@
...
@@ -180,7 +188,7 @@
<!--输出实体[HROMHIERARCHYCAT]数据结构 -->
<!--输出实体[HROMHIERARCHYCAT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hromhierarchycat-7
0
-9"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hromhierarchycat-7
6
-9"
>
<createTable
tableName=
"OMHIERARCHYCAT"
>
<createTable
tableName=
"OMHIERARCHYCAT"
>
<column
name=
"OMHIERARCHYCATID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"OMHIERARCHYCATID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_HROMHIERARCHYCAT_OMHIERARCH"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_HROMHIERARCHYCAT_OMHIERARCH"
/>
...
@@ -338,7 +346,7 @@
...
@@ -338,7 +346,7 @@
<!--输出实体[HRPOST]数据结构 -->
<!--输出实体[HRPOST]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hrpost-4
5
-15"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hrpost-4
7
-15"
>
<createTable
tableName=
"T_HRPOST"
>
<createTable
tableName=
"T_HRPOST"
>
<column
name=
"HRPOSTID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"HRPOSTID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_HRPOST_HRPOSTID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_HRPOST_HRPOSTID"
/>
...
@@ -365,6 +373,8 @@
...
@@ -365,6 +373,8 @@
</column>
</column>
<column
name=
"ENTRYTIME"
remarks=
""
type=
"DATETIME"
>
<column
name=
"ENTRYTIME"
remarks=
""
type=
"DATETIME"
>
</column>
</column>
<column
name=
"POSTNUM"
remarks=
""
type=
"BIGINT"
>
</column>
</createTable>
</createTable>
</changeSet>
</changeSet>
...
@@ -390,44 +400,50 @@
...
@@ -390,44 +400,50 @@
<!--输出实体[HRATTENDANCE]外键关系 -->
<!--输出实体[HRATTENDANCE]外键关系 -->
<!--输出实体[HRDISTRIBUTION]外键关系 -->
<!--输出实体[HRDISTRIBUTION]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrdistribution-11-17"
>
<addForeignKeyConstraint
baseColumnNames=
"HREMPLOYEEID"
baseTableName=
"T_HRDISTRIBUTION"
constraintName=
"DER1N_HRDISTRIBUTION_HREMPLOYE"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EMPLOYEEID"
referencedTableName=
"EMPLOYEE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrdistribution-11-18"
>
<addForeignKeyConstraint
baseColumnNames=
"HRPOSTID"
baseTableName=
"T_HRDISTRIBUTION"
constraintName=
"DER1N_HRDISTRIBUTION_HRPOST_HR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"HRPOSTID"
referencedTableName=
"T_HRPOST"
validate=
"true"
/>
</changeSet>
<!--输出实体[HRDUTY]外键关系 -->
<!--输出实体[HRDUTY]外键关系 -->
<!--输出实体[HREMPLOYEE]外键关系 -->
<!--输出实体[HREMPLOYEE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hremployee-
5-17
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hremployee-
7-19
"
>
<addForeignKeyConstraint
baseColumnNames=
"ORGANIZATIONID"
baseTableName=
"EMPLOYEE"
constraintName=
"DER1N_EMPLOYEE_ORGANIZATION_OR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORGANIZATIONID"
baseTableName=
"EMPLOYEE"
constraintName=
"DER1N_EMPLOYEE_ORGANIZATION_OR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[HRLEAVE]外键关系 -->
<!--输出实体[HRLEAVE]外键关系 -->
<!--输出实体[HRLEGAL]外键关系 -->
<!--输出实体[HRLEGAL]外键关系 -->
<!--输出实体[HROMHIERARCHYPURPOSE]外键关系 -->
<!--输出实体[HROMHIERARCHYPURPOSE]外键关系 -->
<!--输出实体[HROMHIERARCHY]外键关系 -->
<!--输出实体[HROMHIERARCHY]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hromhierarchy-76-
18
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hromhierarchy-76-
20
"
>
<addForeignKeyConstraint
baseColumnNames=
"HROMHIERARCHYCATID"
baseTableName=
"OMHIERARCHY"
constraintName=
"DER1N_HROMHIERARCHY_HROMHIERAR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OMHIERARCHYCATID"
referencedTableName=
"OMHIERARCHYCAT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"HROMHIERARCHYCATID"
baseTableName=
"OMHIERARCHY"
constraintName=
"DER1N_HROMHIERARCHY_HROMHIERAR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OMHIERARCHYCATID"
referencedTableName=
"OMHIERARCHYCAT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hromhierarchy-76-
19
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hromhierarchy-76-
21
"
>
<addForeignKeyConstraint
baseColumnNames=
"POMHIERARCHYID"
baseTableName=
"OMHIERARCHY"
constraintName=
"DER1N_OMHIERARCHY_OMHIERARCHY_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OMHIERARCHYID"
referencedTableName=
"OMHIERARCHY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"POMHIERARCHYID"
baseTableName=
"OMHIERARCHY"
constraintName=
"DER1N_OMHIERARCHY_OMHIERARCHY_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OMHIERARCHYID"
referencedTableName=
"OMHIERARCHY"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hromhierarchy-76-2
0
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hromhierarchy-76-2
2
"
>
<addForeignKeyConstraint
baseColumnNames=
"ORGANIZATIONID"
baseTableName=
"OMHIERARCHY"
constraintName=
"DER1N_OMHIERARCHY_ORGANIZATION"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORGANIZATIONID"
baseTableName=
"OMHIERARCHY"
constraintName=
"DER1N_OMHIERARCHY_ORGANIZATION"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[HROMHIERARCHYCAT]外键关系 -->
<!--输出实体[HROMHIERARCHYCAT]外键关系 -->
<!--输出实体[HROMHIERARCHYPURPOSEREF]外键关系 -->
<!--输出实体[HROMHIERARCHYPURPOSEREF]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hromhierarchypurposeref-6-2
1
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hromhierarchypurposeref-6-2
3
"
>
<addForeignKeyConstraint
baseColumnNames=
"OMHIERARCHYCATID"
baseTableName=
"OMHIERARCHYPURPOSEREF"
constraintName=
"DER1N_OMHIERARCHYPURPOSEREF_OM"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OMHIERARCHYCATID"
referencedTableName=
"OMHIERARCHYCAT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"OMHIERARCHYCATID"
baseTableName=
"OMHIERARCHYPURPOSEREF"
constraintName=
"DER1N_OMHIERARCHYPURPOSEREF_OM"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OMHIERARCHYCATID"
referencedTableName=
"OMHIERARCHYCAT"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[HROPERATIONUNIT]外键关系 -->
<!--输出实体[HROPERATIONUNIT]外键关系 -->
<!--输出实体[HRORGADDRESS]外键关系 -->
<!--输出实体[HRORGADDRESS]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrorgaddress-29-2
3
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrorgaddress-29-2
5
"
>
<addForeignKeyConstraint
baseColumnNames=
"HRORGANIZATIONID"
baseTableName=
"T_HRORGADDRESS"
constraintName=
"DER1N_HRORGADDRESS_HRORGANIZAT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"HRORGANIZATIONID"
baseTableName=
"T_HRORGADDRESS"
constraintName=
"DER1N_HRORGADDRESS_HRORGANIZAT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[HRORGCONTACT]外键关系 -->
<!--输出实体[HRORGCONTACT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrorgcontact-24-2
4
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrorgcontact-24-2
6
"
>
<addForeignKeyConstraint
baseColumnNames=
"HRORGANIZATIONID"
baseTableName=
"T_HRORGCONTACT"
constraintName=
"DER1N_HRORGCONTACT_HRORGANIZAT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"HRORGANIZATIONID"
baseTableName=
"T_HRORGCONTACT"
constraintName=
"DER1N_HRORGCONTACT_HRORGANIZAT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[HRORGANIZATION]外键关系 -->
<!--输出实体[HRORGANIZATION]外键关系 -->
<!--输出实体[HRPOST]外键关系 -->
<!--输出实体[HRPOST]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrpost-4
5-25
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrpost-4
7-27
"
>
<addForeignKeyConstraint
baseColumnNames=
"HRDUTYID"
baseTableName=
"T_HRPOST"
constraintName=
"DER1N_HRPOST_HRDUTY_HRDUTYID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"HRDUTYID"
referencedTableName=
"T_HRDUTY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"HRDUTYID"
baseTableName=
"T_HRPOST"
constraintName=
"DER1N_HRPOST_HRDUTY_HRDUTYID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"HRDUTYID"
referencedTableName=
"T_HRDUTY"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrpost-4
5-26
"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hrpost-4
7-28
"
>
<addForeignKeyConstraint
baseColumnNames=
"HRORGANIZATIONID"
baseTableName=
"T_HRPOST"
constraintName=
"DER1N_HRPOST_HRORGANIZATION_HR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"HRORGANIZATIONID"
baseTableName=
"T_HRPOST"
constraintName=
"DER1N_HRPOST_HRORGANIZATION_HR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[HRPOSTREL]外键关系 -->
<!--输出实体[HRPOSTREL]外键关系 -->
...
...
humanresource-core/src/main/resources/mapper/humanresource/hrdistribution/HRDistributionMapper.xml
浏览文件 @
ea5a5240
...
@@ -5,16 +5,36 @@
...
@@ -5,16 +5,36 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"HRDistributionResultMap"
databaseId=
"mysql"
>
<select
id=
"selectById"
resultMap=
"HRDistributionResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1
) t1 where hrdistributionid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`
BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`HREMPLOYEEID`, t11.`EMPLOYEENAME` AS `HREMPLOYEENAME`, t1.`HRPOSTID`, t21.`HRPOSTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 LEFT JOIN EMPLOYEE t11 ON t1.HREMPLOYEEID = t11.EMPLOYEEID LEFT JOIN T_HRPOST t21 ON t1.HRPOSTID = t21.HRPOSTID
) t1 where hrdistributionid=#{id}]]>
</select>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"HRDistributionResultMap"
type=
"cn.ibizlab.humanresource.core.humanresource.domain.HRDistribution"
autoMapping=
"true"
>
<resultMap
id=
"HRDistributionResultMap"
type=
"cn.ibizlab.humanresource.core.humanresource.domain.HRDistribution"
autoMapping=
"true"
>
<id
property=
"hrdistributionid"
column=
"hrdistributionid"
/>
<!--主键字段映射-->
<id
property=
"hrdistributionid"
column=
"hrdistributionid"
/>
<!--主键字段映射-->
<result
property=
"hremployeeid"
column=
"hremployeeid"
/>
<result
property=
"hrpostid"
column=
"hrpostid"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"hremployee"
javaType=
"cn.ibizlab.humanresource.core.humanresource.domain.HREmployee"
column=
"hremployeeid"
select=
"cn.ibizlab.humanresource.core.humanresource.mapper.HREmployeeMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"hrpost"
javaType=
"cn.ibizlab.humanresource.core.humanresource.domain.HRPost"
column=
"hrpostid"
select=
"cn.ibizlab.humanresource.core.humanresource.mapper.HRPostMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HRDISTRIBUTION_HREMPLOYEE_HREMPLOYEEID_327A4D] -->
<select
id=
"selectByHremployeeid"
resultMap=
"HRDistributionResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where hremployeeid=#{employeeid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HRDISTRIBUTION_HRPOST_HRPOSTID] -->
<select
id=
"selectByHrpostid"
resultMap=
"HRDistributionResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where hrpostid=#{hrpostid}
</select>
<!--数据集合[Default]-->
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.humanresource.core.humanresource.filter.HRDistributionSearchContext"
resultMap=
"HRDistributionResultMap"
>
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.humanresource.core.humanresource.filter.HRDistributionSearchContext"
resultMap=
"HRDistributionResultMap"
>
...
@@ -27,12 +47,12 @@
...
@@ -27,12 +47,12 @@
<!--数据查询[Default]-->
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1
<![CDATA[ SELECT t1.`
BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`HREMPLOYEEID`, t11.`EMPLOYEENAME` AS `HREMPLOYEENAME`, t1.`HRPOSTID`, t21.`HRPOSTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 LEFT JOIN EMPLOYEE t11 ON t1.HREMPLOYEEID = t11.EMPLOYEEID LEFT JOIN T_HRPOST t21 ON t1.HRPOSTID = t21.HRPOSTID
]]>
]]>
</sql>
</sql>
<!--数据查询[View]-->
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1
<![CDATA[ SELECT t1.`
BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRDISTRIBUTIONID`, t1.`HRDISTRIBUTIONNAME`, t1.`HREMPLOYEEID`, t11.`EMPLOYEENAME` AS `HREMPLOYEENAME`, t1.`HRPOSTID`, t21.`HRPOSTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRDISTRIBUTION` t1 LEFT JOIN EMPLOYEE t11 ON t1.HREMPLOYEEID = t11.EMPLOYEEID LEFT JOIN T_HRPOST t21 ON t1.HRPOSTID = t21.HRPOSTID
]]>
]]>
</sql>
</sql>
</mapper>
</mapper>
...
...
humanresource-core/src/main/resources/mapper/humanresource/hrpost/HRPostMapper.xml
浏览文件 @
ea5a5240
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"HRPostResultMap"
databaseId=
"mysql"
>
<select
id=
"selectById"
resultMap=
"HRPostResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID ) t1 where hrpostid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POST
NUM`, t1.`POST
TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID ) t1 where hrpostid=#{id}]]>
</select>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...
@@ -47,12 +47,12 @@
...
@@ -47,12 +47,12 @@
<!--数据查询[Default]-->
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID
<![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POST
NUM`, t1.`POST
TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID
]]>
]]>
</sql>
</sql>
<!--数据查询[View]-->
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POSTTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID
<![CDATA[ SELECT t1.`ACTIVEFLAG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTRYTIME`, t1.`HRDUTYID`, t11.`HRDUTYNAME`, t1.`HRORGANIZATIONID`, t21.`ORGANIZATIONNAME` AS `HRORGANIZATIONNAME`, t1.`HRPOSTID`, t1.`HRPOSTNAME`, t1.`POSTCODE`, t1.`POST
NUM`, t1.`POST
TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRPOST` t1 LEFT JOIN T_HRDUTY t11 ON t1.HRDUTYID = t11.HRDUTYID LEFT JOIN ORGANIZATION t21 ON t1.HRORGANIZATIONID = t21.ORGANIZATIONID
]]>
]]>
</sql>
</sql>
</mapper>
</mapper>
...
...
humanresource-provider/humanresource-provider-hrapi/src/main/docker/Dockerfile
浏览文件 @
ea5a5240
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-provider-hrapi.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-provider-hrapi.jar
EXPOSE
8081
EXPOSE
10317
ADD
humanresource-provider-hrapi.jar /humanresource-provider-hrapi.jar
ADD
humanresource-provider-hrapi.jar /humanresource-provider-hrapi.jar
humanresource-provider/humanresource-provider-hrapi/src/main/docker/humanresource-provider-hrapi.yaml
浏览文件 @
ea5a5240
...
@@ -3,9 +3,25 @@ services:
...
@@ -3,9 +3,25 @@ services:
humanresource-provider-hrapi
:
humanresource-provider-hrapi
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest
ports
:
ports
:
-
"
8081:8081
"
-
"
10317:10317
"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=10317
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
-
SPRING_REDIS_HOST=172.16.240.110
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
-
SPRING_DATASOURCE_PASSWORD=b1@@@772
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
-
CAS=https://passport.ibizlab.cn
-
NACOS=172.16.240.110:8848
-
SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
-
SEATA_ENABLED=true
deploy
:
deploy
:
resources
:
resources
:
limits
:
limits
:
...
...
humanresource-provider/humanresource-provider-hrapi/src/main/java/cn/ibizlab/humanresource/hrapi/dto/HRPostDTO.java
浏览文件 @
ea5a5240
...
@@ -139,6 +139,14 @@ public class HRPostDTO extends DTOBase implements Serializable {
...
@@ -139,6 +139,14 @@ public class HRPostDTO extends DTOBase implements Serializable {
@JsonProperty
(
"entrytime"
)
@JsonProperty
(
"entrytime"
)
private
Timestamp
entrytime
;
private
Timestamp
entrytime
;
/**
* 属性 [POSTNUM]
*
*/
@JSONField
(
name
=
"postnum"
)
@JsonProperty
(
"postnum"
)
private
BigInteger
postnum
;
/**
/**
* 设置 [HRPOSTNAME]
* 设置 [HRPOSTNAME]
...
@@ -196,6 +204,14 @@ public class HRPostDTO extends DTOBase implements Serializable {
...
@@ -196,6 +204,14 @@ public class HRPostDTO extends DTOBase implements Serializable {
this
.
modify
(
"entrytime"
,
entrytime
);
this
.
modify
(
"entrytime"
,
entrytime
);
}
}
/**
* 设置 [POSTNUM]
*/
public
void
setPostnum
(
BigInteger
postnum
){
this
.
postnum
=
postnum
;
this
.
modify
(
"postnum"
,
postnum
);
}
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录