Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
8d0456b4
提交
8d0456b4
编写于
4月 21, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
47eeb636
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
49 行增加
和
66 行删除
+49
-66
app-range-editor.vue
app_web/src/components/app-range-editor/app-range-editor.vue
+11
-12
entity-service.ts
app_web/src/service/entity-service.ts
+6
-6
IBZDictItemResource.java
...ain/java/cn/ibizlab/dictapi/rest/IBZDictItemResource.java
+24
-40
IBZDictResource.java
...rc/main/java/cn/ibizlab/dictapi/rest/IBZDictResource.java
+1
-1
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+7
-7
未找到文件。
app_web/src/components/app-range-editor/app-range-editor.vue
浏览文件 @
8d0456b4
...
...
@@ -8,7 +8,7 @@
type=
"date"
:transfer=
"true"
:format=
"valFormat"
:placeholder=
"$t('
info
.placeholder')"
:placeholder=
"$t('
components.appRangeEditor
.placeholder')"
:value=
"activeData[item]"
:disabled=
"disabled"
@
on-change=
"(value,type)=>
{onValueChange(item,value)}">
...
...
@@ -18,34 +18,33 @@
v-else-if=
"editorType.startsWith('DATEPICKEREX')"
:transfer=
"true"
:format=
"valFormat"
:placeholder=
"$t('
info
.placeholder')"
:placeholder=
"$t('
components.appRangeEditor
.placeholder')"
:value=
"activeData[item]"
:disabled=
"disabled"
@
on-change=
"(value)=>
{onValueChange(item,value)}">
</time-picker>
<
i-input
<
InputNumber
:key=
"index"
v-else-if=
"Object.is(editorType, 'NUMBER')"
type=
"number"
:value=
"getValue(item)"
:value=
"activeData[item]"
:disabled=
"disabled"
:placeholder=
"$t('
info
.input')"
@
on-change=
"
setValue
"
>
</
i-input
>
:placeholder=
"$t('
components.appRangeEditor
.input')"
@
on-change=
"
(value)=>
{onValueChange(item,value)}
">
</
InputNumber
>
<app-span
:key=
"index"
v-else-if=
"Object.is(editorType, 'SPAN')"
:value=
"activeData[item]"
:disabled=
"disabled"
>
</app-span>
<
i
-input
<
el
-input
:key=
"index"
v-else
:value=
"getValue(item)"
:disabled=
"disabled"
:placeholder=
"$t('
info
.input')"
@
on-change=
"setValue
"
>
</
i
-input>
:placeholder=
"$t('
components.appRangeEditor
.input')"
@
input=
"(value)=>
{onValueChange(item,value)}
">
</
el
-input>
</
template
>
</div>
</template>
...
...
app_web/src/service/entity-service.ts
浏览文件 @
8d0456b4
...
...
@@ -116,7 +116,7 @@ export default class EntityService {
* @memberof EntityService
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 Select 未实现'
}}
;
return
this
.
SelectTemp
(
context
,
data
,
isloading
)
;
}
/**
...
...
@@ -198,7 +198,7 @@ export default class EntityService {
* @memberof EntityService
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 Update 未实现'
}}
;
return
this
.
UpdateTemp
(
context
,
data
,
isloading
)
;
}
/**
...
...
@@ -322,7 +322,7 @@ export default class EntityService {
* @memberof EntityService
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 GetDraft 未实现'
}}
;
return
this
.
GetDraftTemp
(
context
,
data
,
isloading
)
;
}
/**
...
...
@@ -335,7 +335,7 @@ export default class EntityService {
* @memberof EntityService
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 Remove 未实现'
}}
;
return
this
.
RemoveTemp
(
context
,
data
,
isloading
)
;
}
/**
...
...
@@ -374,7 +374,7 @@ export default class EntityService {
* @memberof EntityService
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 Get 未实现'
}}
;
return
this
.
GetTemp
(
context
,
data
,
isloading
)
;
}
/**
...
...
@@ -400,7 +400,7 @@ export default class EntityService {
* @memberof EntityService
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 Create 未实现'
}}
;
return
this
.
CreateTemp
(
context
,
data
,
isloading
)
;
}
/**
...
...
ibzdict-provider/ibzdict-provider-dictapi/src/main/java/cn/ibizlab/dictapi/rest/IBZDictItemResource.java
浏览文件 @
8d0456b4
...
...
@@ -57,50 +57,35 @@ public class IBZDictItemResource {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/ibzdictitems/{ibzdictitem_id}"
)
public
ResponseEntity
<
IBZDictItemDTO
>
getByIBZDict
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@PathVariable
(
"ibzdictitem_id"
)
String
ibzdictitem_id
)
{
IBZDictItem
domain
=
ibzdictitemService
.
get
(
ibzdictitem_id
);
IBZDictItemDTO
dto
=
IBZDictItemMapping
.
MAPPER
.
toDto
(
domain
);
IBZDictItemDTO
dto
=
ibzdictitemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZDictItem"
},
notes
=
"GetDraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/ibzdictitems/{ibzdictitemitemid}/getdraft"
)
@Transactional
public
ResponseEntity
<
IBZDictItemDTO
>
getDraftByIBZDict
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@PathVariable
(
"ibzdictitem_id"
)
String
ibzdictitem_id
,
@RequestBody
IBZDictItemDTO
ibzdictitemdto
)
{
//8
IBZDictItem
ibzdictitem
=
IBZDictItemMapping
.
MAPPER
.
toDomain
(
ibzdictitemdto
);
ibzdictitem
=
ibzdictitemService
.
getDraft
(
ibzdictitem
)
;
ibzdictitemdto
=
IBZDictItemMapping
.
MAPPER
.
toDto
(
ibzdictitem
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictitemdto
);
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/ibzdictitems/getdraft"
)
public
ResponseEntity
<
IBZDictItemDTO
>
getDraftByIBZDict
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
)
{
IBZDictItem
domain
=
new
IBZDictItem
();
domain
.
setDictid
(
ibzdict_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictitemMapping
.
toDto
(
ibzdictitemService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"Save"
,
tags
=
{
"IBZDictItem"
},
notes
=
"Save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/ibzdictitems/save"
)
public
ResponseEntity
<
Boolean
>
saveByIBZDict
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@RequestBody
IBZDictItemDTO
ibzdictitemdto
)
{
//6
IBZDictItem
domain
=
IBZDictItemMapping
.
MAPPER
.
toDomain
(
ibzdictitemdto
);
domain
.
setDictId
(
ibzdict_id
);
Boolean
b
=
ibzdictitemService
.
save
(
domain
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
b
);
IBZDictItem
domain
=
ibzdictitemMapping
.
toDomain
(
ibzdictitemdto
);
domain
.
setDictid
(
ibzdict_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictitemService
.
save
(
domain
));
}
@ApiOperation
(
value
=
"CheckKey"
,
tags
=
{
"IBZDictItem"
},
notes
=
"CheckKey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/ibzdictitems/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByIBZDict
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@RequestBody
IBZDictItemDTO
ibzdictitemdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictitemService
.
checkKey
(
ibzdictitemMapping
.
toDomain
(
ibzdictitemdto
)));
}
@ApiOperation
(
value
=
"Remove"
,
tags
=
{
"IBZDictItem"
},
notes
=
"Remove"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/ibzdictitems/{ibzdictitem_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByIBZDict
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@PathVariable
(
"ibzdictitem_id"
)
String
ibzdictitem_id
)
{
IBZDictItem
domain
=
new
IBZDictItem
();
domain
.
setItemid
(
ibzdictitem_id
);
Boolean
rst
=
ibzdictitemService
.
remove
(
domain
.
getItemid
());
if
(
rst
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
rst
);
}
else
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
rst
);
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictitemService
.
remove
(
ibzdictitem_id
));
}
@ApiOperation
(
value
=
"Create"
,
tags
=
{
"IBZDictItem"
},
notes
=
"Create"
)
...
...
@@ -108,10 +93,10 @@ public class IBZDictItemResource {
@Transactional
public
ResponseEntity
<
IBZDictItemDTO
>
createByIBZDict
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@RequestBody
IBZDictItemDTO
ibzdictitemdto
)
{
//4
IBZDictItem
domain
=
IBZDictItemMapping
.
MAPPER
.
toDomain
(
ibzdictitemdto
);
domain
.
setDict
I
d
(
ibzdict_id
);
IBZDictItem
domain
=
ibzdictitemMapping
.
toDomain
(
ibzdictitemdto
);
domain
.
setDict
i
d
(
ibzdict_id
);
ibzdictitemService
.
create
(
domain
);
IBZDictItemDTO
dto
=
IBZDictItemMapping
.
MAPPER
.
toDto
(
domain
);
IBZDictItemDTO
dto
=
ibzdictitemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
...
...
@@ -120,27 +105,26 @@ public class IBZDictItemResource {
@Transactional
public
ResponseEntity
<
IBZDictItemDTO
>
updateByIBZDict
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@PathVariable
(
"ibzdictitem_id"
)
String
ibzdictitem_id
,
@RequestBody
IBZDictItemDTO
ibzdictitemdto
)
{
//5
IBZDictItem
domain
=
IBZDictItemMapping
.
MAPPER
.
toDomain
(
ibzdictitemdto
);
domain
.
setDict
I
d
(
ibzdict_id
);
IBZDictItem
domain
=
ibzdictitemMapping
.
toDomain
(
ibzdictitemdto
);
domain
.
setDict
i
d
(
ibzdict_id
);
domain
.
setItemid
(
ibzdictitem_id
);
ibzdictitemService
.
update
(
domain
);
IBZDictItemDTO
dto
=
IBZDictItemMapping
.
MAPPER
.
toDto
(
domain
);
IBZDictItemDTO
dto
=
ibzdictitemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
//10
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"IBZDictItem"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/ibzdictitems/fetchdefault"
)
public
ResponseEntity
<
Page
<
IBZDictItemDTO
>>
fetchIBZDictItemDefault
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
IBZDictItemSearchContext
context
,
Pageable
pageable
,
ServletRequest
request
)
{
context
.
setPageable
(
pageable
);
List
<
IBZDictItemDTO
>
list
=
new
ArrayList
<
IBZDictItemDTO
>();
public
ResponseEntity
<
List
<
IBZDictItemDTO
>>
fetchIBZDictItemDefault
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
IBZDictItemSearchContext
context
)
{
context
.
setN_dictid_eq
(
ibzdict_id
);
Page
<
IBZDictItem
>
domains
=
ibzdictitemService
.
searchDefault
(
context
)
;
for
(
IBZDictItem
ibzdictitem
:
domains
.
getContent
()){
IBZDictItemDTO
dto
=
IBZDictItemMapping
.
MAPPER
.
toDto
(
ibzdictitem
);
list
.
add
(
dto
);
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
new
PageImpl
(
list
,
context
.
getPageable
(),
domains
.
getTotalElements
()));
List
<
IBZDictItemDTO
>
list
=
ibzdictitemMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
...
...
ibzdict-provider/ibzdict-provider-dictapi/src/main/java/cn/ibizlab/dictapi/rest/IBZDictResource.java
浏览文件 @
8d0456b4
...
...
@@ -79,7 +79,7 @@ public class IBZDictResource {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzdicts/getdraft"
)
@Transactional
public
ResponseEntity
<
IBZDictDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
new
IBZDictDTO
(
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictMapping
.
toDto
(
ibzdictService
.
getDraft
(
new
IBZDict
())
));
}
@ApiOperation
(
value
=
"Update"
,
tags
=
{
"IBZDict"
},
notes
=
"Update"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzdicts/{ibzdict_id}"
)
...
...
ibzdict-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
8d0456b4
...
...
@@ -70,14 +70,14 @@ public class SearchContextBase implements ISearchContext{
public
void
setSort
(
String
strSort
)
{
this
.
sort
=
strSort
;
if
(!
StringUtils
.
isEmpty
(
strSort
)){
String
arrSort
[]=
strSort
.
split
(
","
);
String
field
=
arrSort
[
0
];
String
order
=
arrSort
[
1
];
if
(
order
.
equalsIgnoreCase
(
"asc"
)){
this
.
pageSort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
f
ield
);
String
sortArr
[]=
strSort
.
split
(
","
);
String
sortField
=
sortArr
[
0
];
String
sortDirection
=
sortArr
[
1
];
if
(
sortDirection
.
equalsIgnoreCase
(
"asc"
)){
this
.
pageSort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
sortF
ield
);
}
else
if
(
order
.
equalsIgnoreCase
(
"desc"
)){
this
.
pageSort
=
Sort
.
by
(
Sort
.
Direction
.
DESC
,
f
ield
);
else
if
(
sortDirection
.
equalsIgnoreCase
(
"desc"
)){
this
.
pageSort
=
Sort
.
by
(
Sort
.
Direction
.
DESC
,
sortF
ield
);
}
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录