Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz人力资源
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz人力资源
提交
3a76cde6
提交
3a76cde6
编写于
8月 12, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
JunZai 发布系统代码
上级
84f61df7
变更
18
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
925 行增加
和
98 行删除
+925
-98
default.less
app_PIM/src/styles/default.less
+10
-0
config.xml
config.xml
+0
-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
HRArchivesBorrow.java
...nresource/core/humanresource/domain/HRArchivesBorrow.java
+161
-0
HRArchivesMove.java
...manresource/core/humanresource/domain/HRArchivesMove.java
+129
-0
HRArchivesBorrowSearchContext.java
...e/humanresource/filter/HRArchivesBorrowSearchContext.java
+14
-0
HRArchivesMoveSearchContext.java
...ore/humanresource/filter/HRArchivesMoveSearchContext.java
+60
-0
HRArchivesBorrowMapper.java
...rce/core/humanresource/mapper/HRArchivesBorrowMapper.java
+2
-0
HRArchivesMoveMapper.java
...ource/core/humanresource/mapper/HRArchivesMoveMapper.java
+67
-0
IHRArchivesBorrowService.java
.../core/humanresource/service/IHRArchivesBorrowService.java
+2
-0
IHRArchivesMoveService.java
...ce/core/humanresource/service/IHRArchivesMoveService.java
+61
-0
HRArchivesBorrowServiceImpl.java
...manresource/service/impl/HRArchivesBorrowServiceImpl.java
+13
-0
HRArchivesMoveServiceImpl.java
...humanresource/service/impl/HRArchivesMoveServiceImpl.java
+219
-0
HRArchivesServiceImpl.java
...ore/humanresource/service/impl/HRArchivesServiceImpl.java
+6
-0
h2_table.xml
humanresource-core/src/main/resources/liquibase/h2_table.xml
+117
-72
HRArchivesBorrowMapper.xml
...humanresource/hrarchivesborrow/HRArchivesBorrowMapper.xml
+13
-3
HRArchivesMoveMapper.xml
...per/humanresource/hrarchivesmove/HRArchivesMoveMapper.xml
+49
-0
未找到文件。
app_PIM/src/styles/default.less
浏览文件 @
3a76cde6
...
...
@@ -1331,6 +1331,16 @@ div::-webkit-scrollbar-thumb {
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
.app-search-form {
display: flex;
flex-direction: column-reverse;
.search-button {
width: 100%;
}
.form-content {
width: 100%;
}
}
}
}
}
...
...
config.xml
浏览文件 @
3a76cde6
...
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibizhumanresources/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizhumanresources/
mvn clean package -Ppim
cd humanresource-app/humanresource-app-pim
mvn -Ppim docker:build
mvn -Ppim docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-app-pim.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
humanresource-app/humanresource-app-pim/src/main/docker/Dockerfile
浏览文件 @
3a76cde6
...
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
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
humanresource-app/humanresource-app-pim/src/main/docker/humanresource-app-pim.yaml
浏览文件 @
3a76cde6
...
...
@@ -3,25 +3,9 @@ services:
humanresource-app-pim
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest
ports
:
-
"
10327:10327
"
-
"
8080:8080
"
networks
:
-
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
:
resources
:
limits
:
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/domain/HRArchivesBorrow.java
浏览文件 @
3a76cde6
...
...
@@ -89,6 +89,73 @@ public class HRArchivesBorrow extends EntityMP implements Serializable {
@JSONField
(
name
=
"updateman"
)
@JsonProperty
(
"updateman"
)
private
String
updateman
;
/**
* 档案信息标识
*/
@TableField
(
value
=
"hrarchivesid"
)
@JSONField
(
name
=
"hrarchivesid"
)
@JsonProperty
(
"hrarchivesid"
)
private
String
hrarchivesid
;
/**
* 借阅状态
*/
@TableField
(
value
=
"borrowstate"
)
@JSONField
(
name
=
"borrowstate"
)
@JsonProperty
(
"borrowstate"
)
private
String
borrowstate
;
/**
* 借阅人
*/
@TableField
(
value
=
"borrowman"
)
@JSONField
(
name
=
"borrowman"
)
@JsonProperty
(
"borrowman"
)
private
String
borrowman
;
/**
* 借阅时间
*/
@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
=
"checkman"
)
@JSONField
(
name
=
"checkman"
)
@JsonProperty
(
"checkman"
)
private
String
checkman
;
/**
* 审批时间
*/
@TableField
(
value
=
"checktime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"checktime"
,
format
=
"yyyy-MM-dd"
)
@JsonProperty
(
"checktime"
)
private
Timestamp
checktime
;
/**
* 借阅原因
*/
@TableField
(
value
=
"borrowreason"
)
@JSONField
(
name
=
"borrowreason"
)
@JsonProperty
(
"borrowreason"
)
private
String
borrowreason
;
/**
* 员工档案
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
.
HRArchives
hrarchives
;
...
...
@@ -100,6 +167,100 @@ public class HRArchivesBorrow extends EntityMP implements Serializable {
this
.
modify
(
"hrarchivesborrowname"
,
hrarchivesborrowname
);
}
/**
* 设置 [档案信息标识]
*/
public
void
setHrarchivesid
(
String
hrarchivesid
){
this
.
hrarchivesid
=
hrarchivesid
;
this
.
modify
(
"hrarchivesid"
,
hrarchivesid
);
}
/**
* 设置 [借阅状态]
*/
public
void
setBorrowstate
(
String
borrowstate
){
this
.
borrowstate
=
borrowstate
;
this
.
modify
(
"borrowstate"
,
borrowstate
);
}
/**
* 设置 [借阅人]
*/
public
void
setBorrowman
(
String
borrowman
){
this
.
borrowman
=
borrowman
;
this
.
modify
(
"borrowman"
,
borrowman
);
}
/**
* 设置 [借阅时间]
*/
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
setCheckman
(
String
checkman
){
this
.
checkman
=
checkman
;
this
.
modify
(
"checkman"
,
checkman
);
}
/**
* 设置 [审批时间]
*/
public
void
setChecktime
(
Timestamp
checktime
){
this
.
checktime
=
checktime
;
this
.
modify
(
"checktime"
,
checktime
);
}
/**
* 格式化日期 [审批时间]
*/
public
String
formatChecktime
(){
if
(
this
.
checktime
==
null
)
{
return
null
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
sdf
.
format
(
checktime
);
}
/**
* 设置 [借阅原因]
*/
public
void
setBorrowreason
(
String
borrowreason
){
this
.
borrowreason
=
borrowreason
;
this
.
modify
(
"borrowreason"
,
borrowreason
);
}
}
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/domain/HRArchivesMove.java
0 → 100644
浏览文件 @
3a76cde6
package
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.humanresource.util.domain.EntityBase
;
import
cn.ibizlab.humanresource.util.annotation.DEField
;
import
cn.ibizlab.humanresource.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.humanresource.util.enums.DEFieldDefaultValueType
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.humanresource.util.annotation.Audit
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.humanresource.util.domain.EntityMP
;
/**
* 实体[档案调档]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"T_HRARCHIVESMOVE"
,
resultMap
=
"HRArchivesMoveResultMap"
)
public
class
HRArchivesMove
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 档案调档标识
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"hrarchivesmoveid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"hrarchivesmoveid"
)
@JsonProperty
(
"hrarchivesmoveid"
)
private
String
hrarchivesmoveid
;
/**
* 档案调档名称
*/
@TableField
(
value
=
"hrarchivesmovename"
)
@JSONField
(
name
=
"hrarchivesmovename"
)
@JsonProperty
(
"hrarchivesmovename"
)
private
String
hrarchivesmovename
;
/**
* 更新人
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
UPDATEMAN
)
@TableField
(
value
=
"updateman"
)
@JSONField
(
name
=
"updateman"
)
@JsonProperty
(
"updateman"
)
private
String
updateman
;
/**
* 建立人
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
CREATEMAN
)
@TableField
(
value
=
"createman"
,
fill
=
FieldFill
.
INSERT
)
@JSONField
(
name
=
"createman"
)
@JsonProperty
(
"createman"
)
private
String
createman
;
/**
* 建立时间
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
CREATEDATE
)
@TableField
(
value
=
"createdate"
,
fill
=
FieldFill
.
INSERT
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"createdate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"createdate"
)
private
Timestamp
createdate
;
/**
* 更新时间
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
UPDATEDATE
)
@TableField
(
value
=
"updatedate"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"updatedate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"updatedate"
)
private
Timestamp
updatedate
;
/**
* 档案信息标识
*/
@TableField
(
value
=
"hrarchivesid"
)
@JSONField
(
name
=
"hrarchivesid"
)
@JsonProperty
(
"hrarchivesid"
)
private
String
hrarchivesid
;
/**
* 员工档案
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
domain
.
HRArchives
hrarchives
;
/**
* 设置 [档案调档名称]
*/
public
void
setHrarchivesmovename
(
String
hrarchivesmovename
){
this
.
hrarchivesmovename
=
hrarchivesmovename
;
this
.
modify
(
"hrarchivesmovename"
,
hrarchivesmovename
);
}
/**
* 设置 [档案信息标识]
*/
public
void
setHrarchivesid
(
String
hrarchivesid
){
this
.
hrarchivesid
=
hrarchivesid
;
this
.
modify
(
"hrarchivesid"
,
hrarchivesid
);
}
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/filter/HRArchivesBorrowSearchContext.java
浏览文件 @
3a76cde6
...
...
@@ -34,6 +34,20 @@ public class HRArchivesBorrowSearchContext extends QueryWrapperContext<HRArchive
this
.
getSearchCond
().
like
(
"hrarchivesborrowname"
,
n_hrarchivesborrowname_like
);
}
}
private
String
n_hrarchivesid_eq
;
//[档案信息标识]
public
void
setN_hrarchivesid_eq
(
String
n_hrarchivesid_eq
)
{
this
.
n_hrarchivesid_eq
=
n_hrarchivesid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hrarchivesid_eq
)){
this
.
getSearchCond
().
eq
(
"hrarchivesid"
,
n_hrarchivesid_eq
);
}
}
private
String
n_borrowstate_eq
;
//[借阅状态]
public
void
setN_borrowstate_eq
(
String
n_borrowstate_eq
)
{
this
.
n_borrowstate_eq
=
n_borrowstate_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_borrowstate_eq
)){
this
.
getSearchCond
().
eq
(
"borrowstate"
,
n_borrowstate_eq
);
}
}
/**
* 启用快速搜索
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/filter/HRArchivesMoveSearchContext.java
0 → 100644
浏览文件 @
3a76cde6
package
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
filter
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
lombok.*
;
import
lombok.extern.slf4j.Slf4j
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
cn.ibizlab.humanresource.util.filter.QueryWrapperContext
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.ibizlab.humanresource.core.humanresource.domain.HRArchivesMove
;
/**
* 关系型数据实体[HRArchivesMove] 查询条件对象
*/
@Slf4j
@Data
public
class
HRArchivesMoveSearchContext
extends
QueryWrapperContext
<
HRArchivesMove
>
{
private
String
n_hrarchivesmovename_like
;
//[档案调档名称]
public
void
setN_hrarchivesmovename_like
(
String
n_hrarchivesmovename_like
)
{
this
.
n_hrarchivesmovename_like
=
n_hrarchivesmovename_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hrarchivesmovename_like
)){
this
.
getSearchCond
().
like
(
"hrarchivesmovename"
,
n_hrarchivesmovename_like
);
}
}
private
String
n_hrarchivesid_eq
;
//[档案信息标识]
public
void
setN_hrarchivesid_eq
(
String
n_hrarchivesid_eq
)
{
this
.
n_hrarchivesid_eq
=
n_hrarchivesid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hrarchivesid_eq
)){
this
.
getSearchCond
().
eq
(
"hrarchivesid"
,
n_hrarchivesid_eq
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
this
.
getSearchCond
().
and
(
wrapper
->
wrapper
.
like
(
"hrarchivesmovename"
,
query
)
);
}
}
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/mapper/HRArchivesBorrowMapper.java
浏览文件 @
3a76cde6
...
...
@@ -62,4 +62,6 @@ public interface HRArchivesBorrowMapper extends BaseMapper<HRArchivesBorrow>{
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
HRArchivesBorrow
>
selectByHrarchivesid
(
@Param
(
"hrarchivesid"
)
Serializable
hrarchivesid
)
;
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/mapper/HRArchivesMoveMapper.java
0 → 100644
浏览文件 @
3a76cde6
package
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.*
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
java.util.HashMap
;
import
org.apache.ibatis.annotations.Select
;
import
cn.ibizlab.humanresource.core.humanresource.domain.HRArchivesMove
;
import
cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesMoveSearchContext
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
HRArchivesMoveMapper
extends
BaseMapper
<
HRArchivesMove
>{
Page
<
HRArchivesMove
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
HRArchivesMoveSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
HRArchivesMove
>
wrapper
)
;
@Override
HRArchivesMove
selectById
(
Serializable
id
);
@Override
int
insert
(
HRArchivesMove
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
HRArchivesMove
entity
);
@Override
int
update
(
@Param
(
Constants
.
ENTITY
)
HRArchivesMove
entity
,
@Param
(
"ew"
)
Wrapper
<
HRArchivesMove
>
updateWrapper
);
@Override
int
deleteById
(
Serializable
id
);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select
(
"${sql}"
)
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update
(
"${sql}"
)
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert
(
"${sql}"
)
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
HRArchivesMove
>
selectByHrarchivesid
(
@Param
(
"hrarchivesid"
)
Serializable
hrarchivesid
)
;
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/IHRArchivesBorrowService.java
浏览文件 @
3a76cde6
...
...
@@ -37,6 +37,8 @@ public interface IHRArchivesBorrowService extends IService<HRArchivesBorrow>{
boolean
save
(
HRArchivesBorrow
et
)
;
void
saveBatch
(
List
<
HRArchivesBorrow
>
list
)
;
Page
<
HRArchivesBorrow
>
searchDefault
(
HRArchivesBorrowSearchContext
context
)
;
List
<
HRArchivesBorrow
>
selectByHrarchivesid
(
String
hrarchivesid
)
;
void
removeByHrarchivesid
(
String
hrarchivesid
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/IHRArchivesMoveService.java
0 → 100644
浏览文件 @
3a76cde6
package
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
java.util.Collection
;
import
java.math.BigInteger
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
import
cn.ibizlab.humanresource.core.humanresource.domain.HRArchivesMove
;
import
cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesMoveSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[HRArchivesMove] 服务对象接口
*/
public
interface
IHRArchivesMoveService
extends
IService
<
HRArchivesMove
>{
boolean
create
(
HRArchivesMove
et
)
;
void
createBatch
(
List
<
HRArchivesMove
>
list
)
;
boolean
update
(
HRArchivesMove
et
)
;
void
updateBatch
(
List
<
HRArchivesMove
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
HRArchivesMove
get
(
String
key
)
;
HRArchivesMove
getDraft
(
HRArchivesMove
et
)
;
boolean
checkKey
(
HRArchivesMove
et
)
;
boolean
save
(
HRArchivesMove
et
)
;
void
saveBatch
(
List
<
HRArchivesMove
>
list
)
;
Page
<
HRArchivesMove
>
searchDefault
(
HRArchivesMoveSearchContext
context
)
;
List
<
HRArchivesMove
>
selectByHrarchivesid
(
String
hrarchivesid
)
;
void
removeByHrarchivesid
(
String
hrarchivesid
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List
<
JSONObject
>
select
(
String
sql
,
Map
param
);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean
execute
(
String
sql
,
Map
param
);
List
<
HRArchivesMove
>
getHrarchivesmoveByIds
(
List
<
String
>
ids
)
;
List
<
HRArchivesMove
>
getHrarchivesmoveByEntities
(
List
<
HRArchivesMove
>
entities
)
;
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/impl/HRArchivesBorrowServiceImpl.java
浏览文件 @
3a76cde6
...
...
@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service
(
"HRArchivesBorrowServiceImpl"
)
public
class
HRArchivesBorrowServiceImpl
extends
ServiceImpl
<
HRArchivesBorrowMapper
,
HRArchivesBorrow
>
implements
IHRArchivesBorrowService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRArchivesService
hrarchivesService
;
protected
int
batchSize
=
500
;
...
...
@@ -140,6 +143,16 @@ public class HRArchivesBorrowServiceImpl extends ServiceImpl<HRArchivesBorrowMap
}
@Override
public
List
<
HRArchivesBorrow
>
selectByHrarchivesid
(
String
hrarchivesid
)
{
return
baseMapper
.
selectByHrarchivesid
(
hrarchivesid
);
}
@Override
public
void
removeByHrarchivesid
(
String
hrarchivesid
)
{
this
.
remove
(
new
QueryWrapper
<
HRArchivesBorrow
>().
eq
(
"hrarchivesid"
,
hrarchivesid
));
}
/**
* 查询集合 DEFAULT
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/impl/HRArchivesMoveServiceImpl.java
0 → 100644
浏览文件 @
3a76cde6
package
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
impl
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Map
;
import
java.util.HashSet
;
import
java.util.HashMap
;
import
java.util.Collection
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.math.BigInteger
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.humanresource.core.humanresource.domain.HRArchivesMove
;
import
cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesMoveSearchContext
;
import
cn.ibizlab.humanresource.core.humanresource.service.IHRArchivesMoveService
;
import
cn.ibizlab.humanresource.util.helper.CachedBeanCopier
;
import
cn.ibizlab.humanresource.util.helper.DEFieldCacheMap
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.humanresource.core.humanresource.mapper.HRArchivesMoveMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.StringUtils
;
/**
* 实体[档案调档] 服务对象接口实现
*/
@Slf4j
@Service
(
"HRArchivesMoveServiceImpl"
)
public
class
HRArchivesMoveServiceImpl
extends
ServiceImpl
<
HRArchivesMoveMapper
,
HRArchivesMove
>
implements
IHRArchivesMoveService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRArchivesService
hrarchivesService
;
protected
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
create
(
HRArchivesMove
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getHrarchivesmoveid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
HRArchivesMove
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
HRArchivesMove
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"hrarchivesmoveid"
,
et
.
getHrarchivesmoveid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getHrarchivesmoveid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
HRArchivesMove
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Transactional
public
HRArchivesMove
get
(
String
key
)
{
HRArchivesMove
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
HRArchivesMove
();
et
.
setHrarchivesmoveid
(
key
);
}
else
{
}
return
et
;
}
@Override
public
HRArchivesMove
getDraft
(
HRArchivesMove
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
HRArchivesMove
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getHrarchivesmoveid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getHrarchivesmoveid
())));
}
@Override
@Transactional
public
boolean
save
(
HRArchivesMove
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
public
boolean
saveOrUpdate
(
HRArchivesMove
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
boolean
saveBatch
(
Collection
<
HRArchivesMove
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
public
void
saveBatch
(
List
<
HRArchivesMove
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
public
List
<
HRArchivesMove
>
selectByHrarchivesid
(
String
hrarchivesid
)
{
return
baseMapper
.
selectByHrarchivesid
(
hrarchivesid
);
}
@Override
public
void
removeByHrarchivesid
(
String
hrarchivesid
)
{
this
.
remove
(
new
QueryWrapper
<
HRArchivesMove
>().
eq
(
"hrarchivesid"
,
hrarchivesid
));
}
/**
* 查询集合 DEFAULT
*/
@Override
public
Page
<
HRArchivesMove
>
searchDefault
(
HRArchivesMoveSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
HRArchivesMove
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
HRArchivesMove
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
@Override
public
List
<
JSONObject
>
select
(
String
sql
,
Map
param
){
return
this
.
baseMapper
.
selectBySQL
(
sql
,
param
);
}
@Override
@Transactional
public
boolean
execute
(
String
sql
,
Map
param
){
if
(
sql
==
null
||
sql
.
isEmpty
())
{
return
false
;
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"insert"
))
{
return
this
.
baseMapper
.
insertBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"update"
))
{
return
this
.
baseMapper
.
updateBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"delete"
))
{
return
this
.
baseMapper
.
deleteBySQL
(
sql
,
param
);
}
log
.
warn
(
"暂未支持的SQL语法"
);
return
true
;
}
@Override
public
List
<
HRArchivesMove
>
getHrarchivesmoveByIds
(
List
<
String
>
ids
)
{
return
this
.
listByIds
(
ids
);
}
@Override
public
List
<
HRArchivesMove
>
getHrarchivesmoveByEntities
(
List
<
HRArchivesMove
>
entities
)
{
List
ids
=
new
ArrayList
();
for
(
HRArchivesMove
entity
:
entities
){
Serializable
id
=
entity
.
getHrarchivesmoveid
();
if
(!
ObjectUtils
.
isEmpty
(
id
)){
ids
.
add
(
id
);
}
}
if
(
ids
.
size
()>
0
)
return
this
.
listByIds
(
ids
);
else
return
entities
;
}
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/impl/HRArchivesServiceImpl.java
浏览文件 @
3a76cde6
...
...
@@ -45,6 +45,12 @@ import org.springframework.util.StringUtils;
@Service
(
"HRArchivesServiceImpl"
)
public
class
HRArchivesServiceImpl
extends
ServiceImpl
<
HRArchivesMapper
,
HRArchives
>
implements
IHRArchivesService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRArchivesBorrowService
hrarchivesborrowService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHRArchivesMoveService
hrarchivesmoveService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
humanresource
.
core
.
humanresource
.
service
.
IHREmployeeService
hremployeeService
;
...
...
humanresource-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
3a76cde6
此差异已折叠。
点击以展开。
humanresource-core/src/main/resources/mapper/humanresource/hrarchivesborrow/HRArchivesBorrowMapper.xml
浏览文件 @
3a76cde6
...
...
@@ -5,16 +5,26 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"HRArchivesBorrowResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`HRARCHIVESBORROWID`, t1.`HRARCHIVESBORROWNAME
`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESBORROW` t1 ) t1 where hrarchivesborrowid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`
BEGINTIME`, t1.`BORROWMAN`, t1.`BORROWREASON`, t1.`BORROWSTATE`, t1.`CHECKMAN`, t1.`CHECKTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRARCHIVESBORROWID`, t1.`HRARCHIVESBORROWNAME`, t1.`HRARCHIVESID
`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESBORROW` t1 ) t1 where hrarchivesborrowid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"HRArchivesBorrowResultMap"
type=
"cn.ibizlab.humanresource.core.humanresource.domain.HRArchivesBorrow"
autoMapping=
"true"
>
<id
property=
"hrarchivesborrowid"
column=
"hrarchivesborrowid"
/>
<!--主键字段映射-->
<result
property=
"hrarchivesid"
column=
"hrarchivesid"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"hrarchives"
javaType=
"cn.ibizlab.humanresource.core.humanresource.domain.HRArchives"
column=
"hrarchivesid"
select=
"cn.ibizlab.humanresource.core.humanresource.mapper.HRArchivesMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HRARCHIVESBORROW_HRARCHIVES_HRARCHIVESID] -->
<select
id=
"selectByHrarchivesid"
resultMap=
"HRArchivesBorrowResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where hrarchivesid=#{hrarchivesid}
</select>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesBorrowSearchContext"
resultMap=
"HRArchivesBorrowResultMap"
>
...
...
@@ -27,12 +37,12 @@
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`HRARCHIVESBORROWID`, t1.`HRARCHIVESBORROWNAME
`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESBORROW` t1
<![CDATA[ SELECT t1.`
BEGINTIME`, t1.`BORROWMAN`, t1.`BORROWREASON`, t1.`BORROWSTATE`, t1.`CHECKMAN`, t1.`CHECKTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRARCHIVESBORROWID`, t1.`HRARCHIVESBORROWNAME`, t1.`HRARCHIVESID
`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESBORROW` t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`HRARCHIVESBORROWID`, t1.`HRARCHIVESBORROWNAME
`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESBORROW` t1
<![CDATA[ SELECT t1.`
BEGINTIME`, t1.`BORROWMAN`, t1.`BORROWREASON`, t1.`BORROWSTATE`, t1.`CHECKMAN`, t1.`CHECKTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENDTIME`, t1.`HRARCHIVESBORROWID`, t1.`HRARCHIVESBORROWNAME`, t1.`HRARCHIVESID
`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESBORROW` t1
]]>
</sql>
</mapper>
...
...
humanresource-core/src/main/resources/mapper/humanresource/hrarchivesmove/HRArchivesMoveMapper.xml
0 → 100644
浏览文件 @
3a76cde6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.humanresource.core.humanresource.mapper.HRArchivesMoveMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"HRArchivesMoveResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRARCHIVESID`, t1.`HRARCHIVESMOVEID`, t1.`HRARCHIVESMOVENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESMOVE` t1 ) t1 where hrarchivesmoveid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"HRArchivesMoveResultMap"
type=
"cn.ibizlab.humanresource.core.humanresource.domain.HRArchivesMove"
autoMapping=
"true"
>
<id
property=
"hrarchivesmoveid"
column=
"hrarchivesmoveid"
/>
<!--主键字段映射-->
<result
property=
"hrarchivesid"
column=
"hrarchivesid"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"hrarchives"
javaType=
"cn.ibizlab.humanresource.core.humanresource.domain.HRArchives"
column=
"hrarchivesid"
select=
"cn.ibizlab.humanresource.core.humanresource.mapper.HRArchivesMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HRARCHIVESMOVE_HRARCHIVES_HRARCHIVESID] -->
<select
id=
"selectByHrarchivesid"
resultMap=
"HRArchivesMoveResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where hrarchivesid=#{hrarchivesid}
</select>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesMoveSearchContext"
resultMap=
"HRArchivesMoveResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRARCHIVESID`, t1.`HRARCHIVESMOVEID`, t1.`HRARCHIVESMOVENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESMOVE` t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRARCHIVESID`, t1.`HRARCHIVESMOVEID`, t1.`HRARCHIVESMOVENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRARCHIVESMOVE` t1
]]>
</sql>
</mapper>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录