Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz人力资源
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz人力资源
提交
84f61df7
提交
84f61df7
编写于
8月 12, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Miracle 部署微服务应用
上级
88df5b2e
变更
24
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
742 行增加
和
83 行删除
+742
-83
data-dictionary.json
app_PIM/public/assets/json/data-dictionary.json
+31
-0
codelist_en_US.ts
app_PIM/src/locale/lanres/codelist/codelist_en_US.ts
+5
-0
codelist_zh_CN.ts
app_PIM/src/locale/lanres/codelist/codelist_zh_CN.ts
+5
-0
hrtransfer-apply_en_US.ts
...anres/entities/hrtransfer-apply/hrtransfer-apply_en_US.ts
+3
-0
hrtransfer-apply_zh_CN.ts
...anres/entities/hrtransfer-apply/hrtransfer-apply_zh_CN.ts
+3
-0
codelist.ts
app_PIM/src/mock/codelist/codelist.ts
+29
-0
grid-001-grid-base.tsx
...c/widgets/hrarchives/grid-001-grid/grid-001-grid-base.tsx
+8
-0
grid-001-grid.html
...M/src/widgets/hrarchives/grid-001-grid/grid-001-grid.html
+3
-1
main-grid-base.tsx
app_PIM/src/widgets/hrarchives/main-grid/main-grid-base.tsx
+8
-0
main-grid.html
app_PIM/src/widgets/hrarchives/main-grid/main-grid.html
+3
-1
ef-001-form-base.tsx
...widgets/hrtransfer-apply/ef-001-form/ef-001-form-base.tsx
+3
-0
ef-001-form-model.ts
...widgets/hrtransfer-apply/ef-001-form/ef-001-form-model.ts
+5
-0
if-001-form-base.tsx
...widgets/hrtransfer-apply/if-001-form/if-001-form-base.tsx
+3
-0
if-001-form-model.ts
...widgets/hrtransfer-apply/if-001-form/if-001-form-model.ts
+5
-0
main-form-base.tsx
...src/widgets/hrtransfer-apply/main-form/main-form-base.tsx
+3
-0
main-form-model.ts
...src/widgets/hrtransfer-apply/main-form/main-form-model.ts
+5
-0
main-form.html
...PIM/src/widgets/hrtransfer-apply/main-form/main-form.html
+0
-10
HRArchivesBorrow.java
...nresource/core/humanresource/domain/HRArchivesBorrow.java
+106
-0
HRArchivesBorrowSearchContext.java
...e/humanresource/filter/HRArchivesBorrowSearchContext.java
+53
-0
HRArchivesBorrowMapper.java
...rce/core/humanresource/mapper/HRArchivesBorrowMapper.java
+65
-0
IHRArchivesBorrowService.java
.../core/humanresource/service/IHRArchivesBorrowService.java
+59
-0
HRArchivesBorrowServiceImpl.java
...manresource/service/impl/HRArchivesBorrowServiceImpl.java
+206
-0
h2_table.xml
humanresource-core/src/main/resources/liquibase/h2_table.xml
+92
-71
HRArchivesBorrowMapper.xml
...humanresource/hrarchivesborrow/HRArchivesBorrowMapper.xml
+39
-0
未找到文件。
app_PIM/public/assets/json/data-dictionary.json
浏览文件 @
84f61df7
...
...
@@ -174,6 +174,37 @@
}
]
},
{
"srfkey"
:
"CL_HR_0024"
,
"emptytext"
:
"未定义"
,
"codelisttype"
:
"static"
,
"items"
:
[
{
"id"
:
"BORROW"
,
"label"
:
"借阅中"
,
"text"
:
"借阅中"
,
"data"
:
""
,
"codename"
:
"Borrow"
,
"color"
:
"rgba(255, 0, 17, 1)"
,
"value"
:
"BORROW"
,
"disabled"
:
false
,
"default"
:
false
}
,
{
"id"
:
"HAVERETURN"
,
"label"
:
"已归还"
,
"text"
:
"已归还"
,
"data"
:
""
,
"codename"
:
"Havereturn"
,
"color"
:
"rgba(0, 89, 255, 1)"
,
"value"
:
"HAVERETURN"
,
"disabled"
:
false
,
"default"
:
false
}
]
},
{
"srfkey"
:
"CL_HR_0007"
,
"emptytext"
:
"未定义"
,
...
...
app_PIM/src/locale/lanres/codelist/codelist_en_US.ts
浏览文件 @
84f61df7
...
...
@@ -22,6 +22,11 @@ export default {
"FAX"
:
"传真"
,
"empty"
:
""
},
CL_HR_0024
:
{
"BORROW"
:
"借阅中"
,
"HAVERETURN"
:
"已归还"
,
"empty"
:
""
},
CL_HR_0007
:
{
"A"
:
"A"
,
"B"
:
"B"
,
...
...
app_PIM/src/locale/lanres/codelist/codelist_zh_CN.ts
浏览文件 @
84f61df7
...
...
@@ -22,6 +22,11 @@ export default {
"FAX"
:
"传真"
,
"empty"
:
""
,
},
CL_HR_0024
:
{
"BORROW"
:
"借阅中"
,
"HAVERETURN"
:
"已归还"
,
"empty"
:
""
,
},
CL_HR_0007
:
{
"A"
:
"A"
,
"B"
:
"B"
,
...
...
app_PIM/src/locale/lanres/entities/hrtransfer-apply/hrtransfer-apply_en_US.ts
浏览文件 @
84f61df7
...
...
@@ -114,6 +114,7 @@ export default {
wfstate
:
"工作流状态"
,
wfversion
:
"工作流版本"
,
wfstep
:
"工作流步骤"
,
createman
:
"建立人"
,
hrtransferapplyid
:
"调动申请标识"
,
},
uiactions
:
{
...
...
@@ -149,6 +150,7 @@ export default {
wfstate
:
"工作流状态"
,
wfversion
:
"工作流版本"
,
wfstep
:
"工作流步骤"
,
createman
:
"建立人"
,
hrtransferapplyid
:
"调动申请标识"
,
},
uiactions
:
{
...
...
@@ -184,6 +186,7 @@ export default {
wfstate
:
"工作流状态"
,
wfversion
:
"工作流版本"
,
wfstep
:
"工作流步骤"
,
createman
:
"建立人"
,
hrtransferapplyid
:
"调动申请标识"
,
},
uiactions
:
{
...
...
app_PIM/src/locale/lanres/entities/hrtransfer-apply/hrtransfer-apply_zh_CN.ts
浏览文件 @
84f61df7
...
...
@@ -113,6 +113,7 @@ export default {
wfstate
:
"工作流状态"
,
wfversion
:
"工作流版本"
,
wfstep
:
"工作流步骤"
,
createman
:
"建立人"
,
hrtransferapplyid
:
"调动申请标识"
,
},
uiactions
:
{
...
...
@@ -148,6 +149,7 @@ export default {
wfstate
:
"工作流状态"
,
wfversion
:
"工作流版本"
,
wfstep
:
"工作流步骤"
,
createman
:
"建立人"
,
hrtransferapplyid
:
"调动申请标识"
,
},
uiactions
:
{
...
...
@@ -183,6 +185,7 @@ export default {
wfstate
:
"工作流状态"
,
wfversion
:
"工作流版本"
,
wfstep
:
"工作流步骤"
,
createman
:
"建立人"
,
hrtransferapplyid
:
"调动申请标识"
,
},
uiactions
:
{
...
...
app_PIM/src/mock/codelist/codelist.ts
浏览文件 @
84f61df7
...
...
@@ -168,6 +168,35 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
},
]
},
{
srfkey
:
"CL_HR_0024"
,
emptytext
:
"未定义"
,
"codelisttype"
:
"static"
,
items
:
[
{
id
:
"BORROW"
,
label
:
"借阅中"
,
text
:
"借阅中"
,
"data"
:
""
,
"codename"
:
"Borrow"
,
"color"
:
"rgba(255, 0, 17, 1)"
,
value
:
"BORROW"
,
disabled
:
false
,
},
{
id
:
"HAVERETURN"
,
label
:
"已归还"
,
text
:
"已归还"
,
"data"
:
""
,
"codename"
:
"Havereturn"
,
"color"
:
"rgba(0, 89, 255, 1)"
,
value
:
"HAVERETURN"
,
disabled
:
false
,
},
]
},
{
srfkey
:
"CL_HR_0007"
,
emptytext
:
"未定义"
,
...
...
app_PIM/src/widgets/hrarchives/grid-001-grid/grid-001-grid-base.tsx
浏览文件 @
84f61df7
...
...
@@ -213,6 +213,14 @@ export class GRID_001GridBase extends GridControlBase {
textSeparator
:
'、'
,
valueSeparator
:
','
,
},
{
name
:
'borrowstate'
,
srfkey
:
'CL_HR_0024'
,
codelistType
:
'STATIC'
,
renderMode
:
'other'
,
textSeparator
:
'、'
,
valueSeparator
:
','
,
},
]);
}
...
...
app_PIM/src/widgets/hrarchives/grid-001-grid/grid-001-grid.html
浏览文件 @
84f61df7
...
...
@@ -93,7 +93,9 @@
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<span>
{{row.borrowstate}}
</span>
<template
>
<codelist
:value=
"row.borrowstate"
tag=
'CL_HR_0024'
codelistType=
'STATIC'
></codelist>
</template>
</template>
</el-table-column>
</template>
...
...
app_PIM/src/widgets/hrarchives/main-grid/main-grid-base.tsx
浏览文件 @
84f61df7
...
...
@@ -257,6 +257,14 @@ export class MainGridBase extends GridControlBase {
textSeparator
:
'、'
,
valueSeparator
:
','
,
},
{
name
:
'borrowstate'
,
srfkey
:
'CL_HR_0024'
,
codelistType
:
'STATIC'
,
renderMode
:
'other'
,
textSeparator
:
'、'
,
valueSeparator
:
','
,
},
]);
}
...
...
app_PIM/src/widgets/hrarchives/main-grid/main-grid.html
浏览文件 @
84f61df7
...
...
@@ -143,7 +143,9 @@
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<span>
{{row.borrowstate}}
</span>
<template
>
<codelist
:value=
"row.borrowstate"
tag=
'CL_HR_0024'
codelistType=
'STATIC'
></codelist>
</template>
</template>
</el-table-column>
</template>
...
...
app_PIM/src/widgets/hrtransfer-apply/ef-001-form/ef-001-form-base.tsx
浏览文件 @
84f61df7
...
...
@@ -100,6 +100,7 @@ export class EF_001EditFormBase extends EditFormControlBase {
wfstate
:
null
,
wfversion
:
null
,
wfstep
:
null
,
createman
:
null
,
hrtransferapplyid
:
null
,
hrtransferapply
:
null
,
};
...
...
@@ -185,6 +186,8 @@ export class EF_001EditFormBase extends EditFormControlBase {
wfstep
:
new
FormItemModel
({
caption
:
'工作流步骤'
,
detailType
:
'FORMITEM'
,
name
:
'wfstep'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
createman
:
new
FormItemModel
({
caption
:
'建立人'
,
detailType
:
'FORMITEM'
,
name
:
'createman'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
hrtransferapplyid
:
new
FormItemModel
({
caption
:
'调动申请标识'
,
detailType
:
'FORMITEM'
,
name
:
'hrtransferapplyid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
};
...
...
app_PIM/src/widgets/hrtransfer-apply/ef-001-form/ef-001-form-model.ts
浏览文件 @
84f61df7
...
...
@@ -145,6 +145,11 @@ export default class EF_001Model {
prop
:
'wfstep'
,
dataType
:
'SSCODELIST'
,
},
{
name
:
'createman'
,
prop
:
'createman'
,
dataType
:
'TEXT'
,
},
{
name
:
'hrtransferapplyid'
,
prop
:
'hrtransferapplyid'
,
...
...
app_PIM/src/widgets/hrtransfer-apply/if-001-form/if-001-form-base.tsx
浏览文件 @
84f61df7
...
...
@@ -100,6 +100,7 @@ export class IF_001EditFormBase extends EditFormControlBase {
wfstate
:
null
,
wfversion
:
null
,
wfstep
:
null
,
createman
:
null
,
hrtransferapplyid
:
null
,
hrtransferapply
:
null
,
};
...
...
@@ -185,6 +186,8 @@ export class IF_001EditFormBase extends EditFormControlBase {
wfstep
:
new
FormItemModel
({
caption
:
'工作流步骤'
,
detailType
:
'FORMITEM'
,
name
:
'wfstep'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
createman
:
new
FormItemModel
({
caption
:
'建立人'
,
detailType
:
'FORMITEM'
,
name
:
'createman'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
hrtransferapplyid
:
new
FormItemModel
({
caption
:
'调动申请标识'
,
detailType
:
'FORMITEM'
,
name
:
'hrtransferapplyid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
};
...
...
app_PIM/src/widgets/hrtransfer-apply/if-001-form/if-001-form-model.ts
浏览文件 @
84f61df7
...
...
@@ -145,6 +145,11 @@ export default class IF_001Model {
prop
:
'wfstep'
,
dataType
:
'SSCODELIST'
,
},
{
name
:
'createman'
,
prop
:
'createman'
,
dataType
:
'TEXT'
,
},
{
name
:
'hrtransferapplyid'
,
prop
:
'hrtransferapplyid'
,
...
...
app_PIM/src/widgets/hrtransfer-apply/main-form/main-form-base.tsx
浏览文件 @
84f61df7
...
...
@@ -100,6 +100,7 @@ export class MainEditFormBase extends EditFormControlBase {
wfstate
:
null
,
wfversion
:
null
,
wfstep
:
null
,
createman
:
null
,
hrtransferapplyid
:
null
,
hrtransferapply
:
null
,
};
...
...
@@ -185,6 +186,8 @@ export class MainEditFormBase extends EditFormControlBase {
wfstep
:
new
FormItemModel
({
caption
:
'工作流步骤'
,
detailType
:
'FORMITEM'
,
name
:
'wfstep'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
createman
:
new
FormItemModel
({
caption
:
'建立人'
,
detailType
:
'FORMITEM'
,
name
:
'createman'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
hrtransferapplyid
:
new
FormItemModel
({
caption
:
'调动申请标识'
,
detailType
:
'FORMITEM'
,
name
:
'hrtransferapplyid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
};
...
...
app_PIM/src/widgets/hrtransfer-apply/main-form/main-form-model.ts
浏览文件 @
84f61df7
...
...
@@ -145,6 +145,11 @@ export default class MainModel {
prop
:
'wfstep'
,
dataType
:
'SSCODELIST'
,
},
{
name
:
'createman'
,
prop
:
'createman'
,
dataType
:
'TEXT'
,
},
{
name
:
'hrtransferapplyid'
,
prop
:
'hrtransferapplyid'
,
...
...
app_PIM/src/widgets/hrtransfer-apply/main-form/main-form.html
浏览文件 @
84f61df7
...
...
@@ -136,16 +136,6 @@
<app-file-upload
:formState=
"formState"
:ignorefieldvaluechange=
"ignorefieldvaluechange"
@
formitemvaluechange=
"onFormItemValueChange($event)"
:data=
"JSON.stringify(this.data)"
name=
'attachment'
:value=
"data.attachment"
:disabled=
"detailsModel.attachment.disabled"
:uploadparams=
'{}'
:exportparams=
'{}'
style=
"overflow: auto;"
></app-file-upload>
</app-form-item>
</i-col>
<i-col
class=
"form-layout-container"
v-show=
"detailsModel.organizationid.visible"
:style=
"{}"
:sm=
"{ span: 24, offset: 0 }"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 6, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'organizationid'
:itemRules=
"this.rules.organizationid"
class=
''
:caption=
"$t('entities.hrtransferapply.main_form.details.organizationid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.organizationid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'organizationid'
:value=
"data.organizationid"
dataType=
"PICKUPDATA"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
>
</app-span>
</app-form-item>
</i-col>
</row>
...
...
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/domain/HRArchivesBorrow.java
0 → 100644
浏览文件 @
84f61df7
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_HRARCHIVESBORROW"
,
resultMap
=
"HRArchivesBorrowResultMap"
)
public
class
HRArchivesBorrow
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 建立人
*/
@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
(
isKeyField
=
true
)
@TableId
(
value
=
"hrarchivesborrowid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"hrarchivesborrowid"
)
@JsonProperty
(
"hrarchivesborrowid"
)
private
String
hrarchivesborrowid
;
/**
* 档案借阅名称
*/
@TableField
(
value
=
"hrarchivesborrowname"
)
@JSONField
(
name
=
"hrarchivesborrowname"
)
@JsonProperty
(
"hrarchivesborrowname"
)
private
String
hrarchivesborrowname
;
/**
* 更新时间
*/
@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
;
/**
* 更新人
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
UPDATEMAN
)
@TableField
(
value
=
"updateman"
)
@JSONField
(
name
=
"updateman"
)
@JsonProperty
(
"updateman"
)
private
String
updateman
;
/**
* 设置 [档案借阅名称]
*/
public
void
setHrarchivesborrowname
(
String
hrarchivesborrowname
){
this
.
hrarchivesborrowname
=
hrarchivesborrowname
;
this
.
modify
(
"hrarchivesborrowname"
,
hrarchivesborrowname
);
}
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/filter/HRArchivesBorrowSearchContext.java
0 → 100644
浏览文件 @
84f61df7
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.HRArchivesBorrow
;
/**
* 关系型数据实体[HRArchivesBorrow] 查询条件对象
*/
@Slf4j
@Data
public
class
HRArchivesBorrowSearchContext
extends
QueryWrapperContext
<
HRArchivesBorrow
>
{
private
String
n_hrarchivesborrowname_like
;
//[档案借阅名称]
public
void
setN_hrarchivesborrowname_like
(
String
n_hrarchivesborrowname_like
)
{
this
.
n_hrarchivesborrowname_like
=
n_hrarchivesborrowname_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_hrarchivesborrowname_like
)){
this
.
getSearchCond
().
like
(
"hrarchivesborrowname"
,
n_hrarchivesborrowname_like
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
this
.
getSearchCond
().
and
(
wrapper
->
wrapper
.
like
(
"hrarchivesborrowname"
,
query
)
);
}
}
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/mapper/HRArchivesBorrowMapper.java
0 → 100644
浏览文件 @
84f61df7
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.HRArchivesBorrow
;
import
cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesBorrowSearchContext
;
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
HRArchivesBorrowMapper
extends
BaseMapper
<
HRArchivesBorrow
>{
Page
<
HRArchivesBorrow
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
HRArchivesBorrowSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
HRArchivesBorrow
>
wrapper
)
;
@Override
HRArchivesBorrow
selectById
(
Serializable
id
);
@Override
int
insert
(
HRArchivesBorrow
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
HRArchivesBorrow
entity
);
@Override
int
update
(
@Param
(
Constants
.
ENTITY
)
HRArchivesBorrow
entity
,
@Param
(
"ew"
)
Wrapper
<
HRArchivesBorrow
>
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
);
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/IHRArchivesBorrowService.java
0 → 100644
浏览文件 @
84f61df7
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.HRArchivesBorrow
;
import
cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesBorrowSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[HRArchivesBorrow] 服务对象接口
*/
public
interface
IHRArchivesBorrowService
extends
IService
<
HRArchivesBorrow
>{
boolean
create
(
HRArchivesBorrow
et
)
;
void
createBatch
(
List
<
HRArchivesBorrow
>
list
)
;
boolean
update
(
HRArchivesBorrow
et
)
;
void
updateBatch
(
List
<
HRArchivesBorrow
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
HRArchivesBorrow
get
(
String
key
)
;
HRArchivesBorrow
getDraft
(
HRArchivesBorrow
et
)
;
boolean
checkKey
(
HRArchivesBorrow
et
)
;
boolean
save
(
HRArchivesBorrow
et
)
;
void
saveBatch
(
List
<
HRArchivesBorrow
>
list
)
;
Page
<
HRArchivesBorrow
>
searchDefault
(
HRArchivesBorrowSearchContext
context
)
;
/**
*自定义查询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
<
HRArchivesBorrow
>
getHrarchivesborrowByIds
(
List
<
String
>
ids
)
;
List
<
HRArchivesBorrow
>
getHrarchivesborrowByEntities
(
List
<
HRArchivesBorrow
>
entities
)
;
}
humanresource-core/src/main/java/cn/ibizlab/humanresource/core/humanresource/service/impl/HRArchivesBorrowServiceImpl.java
0 → 100644
浏览文件 @
84f61df7
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.HRArchivesBorrow
;
import
cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesBorrowSearchContext
;
import
cn.ibizlab.humanresource.core.humanresource.service.IHRArchivesBorrowService
;
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.HRArchivesBorrowMapper
;
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
(
"HRArchivesBorrowServiceImpl"
)
public
class
HRArchivesBorrowServiceImpl
extends
ServiceImpl
<
HRArchivesBorrowMapper
,
HRArchivesBorrow
>
implements
IHRArchivesBorrowService
{
protected
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
create
(
HRArchivesBorrow
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getHrarchivesborrowid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
HRArchivesBorrow
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
HRArchivesBorrow
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"hrarchivesborrowid"
,
et
.
getHrarchivesborrowid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getHrarchivesborrowid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
HRArchivesBorrow
>
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
HRArchivesBorrow
get
(
String
key
)
{
HRArchivesBorrow
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
HRArchivesBorrow
();
et
.
setHrarchivesborrowid
(
key
);
}
else
{
}
return
et
;
}
@Override
public
HRArchivesBorrow
getDraft
(
HRArchivesBorrow
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
HRArchivesBorrow
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getHrarchivesborrowid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getHrarchivesborrowid
())));
}
@Override
@Transactional
public
boolean
save
(
HRArchivesBorrow
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
public
boolean
saveOrUpdate
(
HRArchivesBorrow
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
boolean
saveBatch
(
Collection
<
HRArchivesBorrow
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
public
void
saveBatch
(
List
<
HRArchivesBorrow
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
/**
* 查询集合 DEFAULT
*/
@Override
public
Page
<
HRArchivesBorrow
>
searchDefault
(
HRArchivesBorrowSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
HRArchivesBorrow
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
HRArchivesBorrow
>(
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
<
HRArchivesBorrow
>
getHrarchivesborrowByIds
(
List
<
String
>
ids
)
{
return
this
.
listByIds
(
ids
);
}
@Override
public
List
<
HRArchivesBorrow
>
getHrarchivesborrowByEntities
(
List
<
HRArchivesBorrow
>
entities
)
{
List
ids
=
new
ArrayList
();
for
(
HRArchivesBorrow
entity
:
entities
){
Serializable
id
=
entity
.
getHrarchivesborrowid
();
if
(!
ObjectUtils
.
isEmpty
(
id
)){
ids
.
add
(
id
);
}
}
if
(
ids
.
size
()>
0
)
return
this
.
listByIds
(
ids
);
else
return
entities
;
}
}
humanresource-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
84f61df7
此差异已折叠。
点击以展开。
humanresource-core/src/main/resources/mapper/humanresource/hrarchivesborrow/HRArchivesBorrowMapper.xml
0 → 100644
浏览文件 @
84f61df7
<?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.HRArchivesBorrowMapper"
>
<!--该方法用于重写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}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"HRArchivesBorrowResultMap"
type=
"cn.ibizlab.humanresource.core.humanresource.domain.HRArchivesBorrow"
autoMapping=
"true"
>
<id
property=
"hrarchivesborrowid"
column=
"hrarchivesborrowid"
/>
<!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.humanresource.core.humanresource.filter.HRArchivesBorrowSearchContext"
resultMap=
"HRArchivesBorrowResultMap"
>
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.`HRARCHIVESBORROWID`, t1.`HRARCHIVESBORROWNAME`, 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
]]>
</sql>
</mapper>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录