Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz商业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz商业套件
iBiz商业中心
提交
62899171
提交
62899171
编写于
10月 19, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
cc575977
变更
13
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
308 行增加
和
22 行删除
+308
-22
Ir_sequenceExService.java
...central/core/extensions/service/Ir_sequenceExService.java
+73
-3
Ir_sequence_date_rangeExService.java
...e/extensions/service/Ir_sequence_date_rangeExService.java
+35
-0
Ir_sequence.java
...zlab/businesscentral/core/odoo_ir/domain/Ir_sequence.java
+4
-4
Ir_sequence_date_rangeSearchContext.java
...e/odoo_ir/filter/Ir_sequence_date_rangeSearchContext.java
+18
-0
IIr_sequenceService.java
...nesscentral/core/odoo_ir/service/IIr_sequenceService.java
+8
-1
IIr_sequence_date_rangeService.java
.../core/odoo_ir/service/IIr_sequence_date_rangeService.java
+1
-0
Ir_sequenceServiceImpl.java
...ral/core/odoo_ir/service/impl/Ir_sequenceServiceImpl.java
+50
-1
Ir_sequence_date_rangeServiceImpl.java
...oo_ir/service/impl/Ir_sequence_date_rangeServiceImpl.java
+7
-0
Ir_sequenceMapper.xml
...esources/mapper/odoo_ir/ir_sequence/Ir_sequenceMapper.xml
+1
-1
iBizBusinessCentral.json
...core/src/main/resources/sysmodel/iBizBusinessCentral.json
+3
-3
Ir_sequenceDTO.java
...a/cn/ibizlab/businesscentral/core/dto/Ir_sequenceDTO.java
+4
-4
Ir_sequenceResource.java
...bizlab/businesscentral/core/rest/Ir_sequenceResource.java
+82
-5
Ir_sequence_date_rangeResource.java
...nesscentral/core/rest/Ir_sequence_date_rangeResource.java
+22
-0
未找到文件。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions/service/Ir_sequenceExService.java
浏览文件 @
62899171
...
@@ -22,14 +22,84 @@ public class Ir_sequenceExService extends Ir_sequenceServiceImpl {
...
@@ -22,14 +22,84 @@ public class Ir_sequenceExService extends Ir_sequenceServiceImpl {
}
}
/**
/**
* 自定义行为[
Next_by_cod
e]用户扩展
* 自定义行为[
Alter_sequenc
e]用户扩展
* @param et
* @param et
* @return
* @return
*/
*/
@Override
@Override
@Transactional
@Transactional
public
Ir_sequence
next_by_code
(
Ir_sequence
et
)
{
public
Ir_sequence
alter_sequence
(
Ir_sequence
et
)
{
return
super
.
next_by_code
(
et
);
return
super
.
alter_sequence
(
et
);
}
/**
* 自定义行为[Create_sequence]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Ir_sequence
create_sequence
(
Ir_sequence
et
)
{
return
super
.
create_sequence
(
et
);
}
/**
* 自定义行为[Drop_sequence]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Ir_sequence
drop_sequence
(
Ir_sequence
et
)
{
return
super
.
drop_sequence
(
et
);
}
/**
* 自定义行为[Get_next]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Ir_sequence
get_next
(
Ir_sequence
et
)
{
return
super
.
get_next
(
et
);
}
/**
* 自定义行为[Get_next_by_code]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Ir_sequence
get_next_by_code
(
Ir_sequence
et
)
{
return
super
.
get_next_by_code
(
et
);
}
/**
* 自定义行为[Predict_nextval]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Ir_sequence
predict_nextval
(
Ir_sequence
et
)
{
return
super
.
predict_nextval
(
et
);
}
/**
* 自定义行为[Select_nextval]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Ir_sequence
select_nextval
(
Ir_sequence
et
)
{
return
super
.
select_nextval
(
et
);
}
/**
* 自定义行为[Update_nogap]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Ir_sequence
update_nogap
(
Ir_sequence
et
)
{
return
super
.
update_nogap
(
et
);
}
}
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions/service/Ir_sequence_date_rangeExService.java
0 → 100644
浏览文件 @
62899171
package
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
;
import
cn.ibizlab.businesscentral.core.odoo_ir.service.impl.Ir_sequence_date_rangeServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_sequence_date_range
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[序列日期范围] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"Ir_sequence_date_rangeExService"
)
public
class
Ir_sequence_date_rangeExService
extends
Ir_sequence_date_rangeServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[Create_sequence]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Ir_sequence_date_range
create_sequence
(
Ir_sequence_date_range
et
)
{
return
super
.
create_sequence
(
et
);
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/domain/Ir_sequence.java
浏览文件 @
62899171
...
@@ -180,12 +180,12 @@ public class Ir_sequence extends EntityMP implements Serializable {
...
@@ -180,12 +180,12 @@ public class Ir_sequence extends EntityMP implements Serializable {
@JsonProperty
(
"write_date"
)
@JsonProperty
(
"write_date"
)
private
Timestamp
writeDate
;
private
Timestamp
writeDate
;
/**
/**
* next_c
ode_value
* next_c
har
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"next_c
ode_value
"
)
@JSONField
(
name
=
"next_c
har
"
)
@JsonProperty
(
"next_c
ode_value
"
)
@JsonProperty
(
"next_c
har
"
)
private
String
nextC
odeValue
;
private
String
nextC
har
;
/**
/**
* 公司
* 公司
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/filter/Ir_sequence_date_rangeSearchContext.java
浏览文件 @
62899171
...
@@ -68,6 +68,24 @@ public class Ir_sequence_date_rangeSearchContext extends QueryWrapperContext<Ir_
...
@@ -68,6 +68,24 @@ public class Ir_sequence_date_rangeSearchContext extends QueryWrapperContext<Ir_
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_write_uid_eq
)){
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_write_uid_eq
)){
this
.
getSearchCond
().
eq
(
"write_uid"
,
n_write_uid_eq
);
this
.
getSearchCond
().
eq
(
"write_uid"
,
n_write_uid_eq
);
}
}
}
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
@JSONField
(
format
=
"yyyy-MM-dd"
)
private
Timestamp
n_date_from_ltandeq
;
//[起始日期]
public
void
setN_date_from_ltandeq
(
Timestamp
n_date_from_ltandeq
)
{
this
.
n_date_from_ltandeq
=
n_date_from_ltandeq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_date_from_ltandeq
)){
this
.
getSearchCond
().
le
(
"date_from"
,
n_date_from_ltandeq
);
}
}
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
@JSONField
(
format
=
"yyyy-MM-dd"
)
private
Timestamp
n_date_to_gtandeq
;
//[结束日期]
public
void
setN_date_to_gtandeq
(
Timestamp
n_date_to_gtandeq
)
{
this
.
n_date_to_gtandeq
=
n_date_to_gtandeq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_date_to_gtandeq
)){
this
.
getSearchCond
().
ge
(
"date_to"
,
n_date_to_gtandeq
);
}
}
}
private
Long
n_sequence_id_eq
;
//[ID]
private
Long
n_sequence_id_eq
;
//[ID]
public
void
setN_sequence_id_eq
(
Long
n_sequence_id_eq
)
{
public
void
setN_sequence_id_eq
(
Long
n_sequence_id_eq
)
{
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/service/IIr_sequenceService.java
浏览文件 @
62899171
...
@@ -34,10 +34,17 @@ public interface IIr_sequenceService extends IService<Ir_sequence>{
...
@@ -34,10 +34,17 @@ public interface IIr_sequenceService extends IService<Ir_sequence>{
void
removeBatch
(
Collection
<
Long
>
idList
)
;
void
removeBatch
(
Collection
<
Long
>
idList
)
;
Ir_sequence
get
(
Long
key
)
;
Ir_sequence
get
(
Long
key
)
;
Ir_sequence
getDraft
(
Ir_sequence
et
)
;
Ir_sequence
getDraft
(
Ir_sequence
et
)
;
Ir_sequence
alter_sequence
(
Ir_sequence
et
)
;
boolean
checkKey
(
Ir_sequence
et
)
;
boolean
checkKey
(
Ir_sequence
et
)
;
Ir_sequence
next_by_code
(
Ir_sequence
et
)
;
Ir_sequence
create_sequence
(
Ir_sequence
et
)
;
Ir_sequence
drop_sequence
(
Ir_sequence
et
)
;
Ir_sequence
get_next
(
Ir_sequence
et
)
;
Ir_sequence
get_next_by_code
(
Ir_sequence
et
)
;
Ir_sequence
predict_nextval
(
Ir_sequence
et
)
;
boolean
save
(
Ir_sequence
et
)
;
boolean
save
(
Ir_sequence
et
)
;
void
saveBatch
(
List
<
Ir_sequence
>
list
)
;
void
saveBatch
(
List
<
Ir_sequence
>
list
)
;
Ir_sequence
select_nextval
(
Ir_sequence
et
)
;
Ir_sequence
update_nogap
(
Ir_sequence
et
)
;
Page
<
Ir_sequence
>
searchDefault
(
Ir_sequenceSearchContext
context
)
;
Page
<
Ir_sequence
>
searchDefault
(
Ir_sequenceSearchContext
context
)
;
List
<
Ir_sequence
>
selectByCompanyId
(
Long
id
)
;
List
<
Ir_sequence
>
selectByCompanyId
(
Long
id
)
;
void
removeByCompanyId
(
Long
id
)
;
void
removeByCompanyId
(
Long
id
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/service/IIr_sequence_date_rangeService.java
浏览文件 @
62899171
...
@@ -35,6 +35,7 @@ public interface IIr_sequence_date_rangeService extends IService<Ir_sequence_dat
...
@@ -35,6 +35,7 @@ public interface IIr_sequence_date_rangeService extends IService<Ir_sequence_dat
Ir_sequence_date_range
get
(
Long
key
)
;
Ir_sequence_date_range
get
(
Long
key
)
;
Ir_sequence_date_range
getDraft
(
Ir_sequence_date_range
et
)
;
Ir_sequence_date_range
getDraft
(
Ir_sequence_date_range
et
)
;
boolean
checkKey
(
Ir_sequence_date_range
et
)
;
boolean
checkKey
(
Ir_sequence_date_range
et
)
;
Ir_sequence_date_range
create_sequence
(
Ir_sequence_date_range
et
)
;
boolean
save
(
Ir_sequence_date_range
et
)
;
boolean
save
(
Ir_sequence_date_range
et
)
;
void
saveBatch
(
List
<
Ir_sequence_date_range
>
list
)
;
void
saveBatch
(
List
<
Ir_sequence_date_range
>
list
)
;
Page
<
Ir_sequence_date_range
>
searchDefault
(
Ir_sequence_date_rangeSearchContext
context
)
;
Page
<
Ir_sequence_date_range
>
searchDefault
(
Ir_sequence_date_rangeSearchContext
context
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/service/impl/Ir_sequenceServiceImpl.java
浏览文件 @
62899171
...
@@ -126,13 +126,48 @@ public class Ir_sequenceServiceImpl extends ServiceImpl<Ir_sequenceMapper, Ir_se
...
@@ -126,13 +126,48 @@ public class Ir_sequenceServiceImpl extends ServiceImpl<Ir_sequenceMapper, Ir_se
return
et
;
return
et
;
}
}
@Override
@Transactional
public
Ir_sequence
alter_sequence
(
Ir_sequence
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
public
boolean
checkKey
(
Ir_sequence
et
)
{
public
boolean
checkKey
(
Ir_sequence
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
}
@Override
@Override
@Transactional
@Transactional
public
Ir_sequence
next_by_code
(
Ir_sequence
et
)
{
public
Ir_sequence
create_sequence
(
Ir_sequence
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Ir_sequence
drop_sequence
(
Ir_sequence
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Ir_sequence
get_next
(
Ir_sequence
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Ir_sequence
get_next_by_code
(
Ir_sequence
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Ir_sequence
predict_nextval
(
Ir_sequence
et
)
{
//自定义代码
//自定义代码
return
et
;
return
et
;
}
}
...
@@ -170,6 +205,20 @@ public class Ir_sequenceServiceImpl extends ServiceImpl<Ir_sequenceMapper, Ir_se
...
@@ -170,6 +205,20 @@ public class Ir_sequenceServiceImpl extends ServiceImpl<Ir_sequenceMapper, Ir_se
saveOrUpdateBatch
(
list
,
batchSize
);
saveOrUpdateBatch
(
list
,
batchSize
);
}
}
@Override
@Transactional
public
Ir_sequence
select_nextval
(
Ir_sequence
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Ir_sequence
update_nogap
(
Ir_sequence
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
public
List
<
Ir_sequence
>
selectByCompanyId
(
Long
id
)
{
public
List
<
Ir_sequence
>
selectByCompanyId
(
Long
id
)
{
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/service/impl/Ir_sequence_date_rangeServiceImpl.java
浏览文件 @
62899171
...
@@ -127,6 +127,13 @@ public class Ir_sequence_date_rangeServiceImpl extends ServiceImpl<Ir_sequence_d
...
@@ -127,6 +127,13 @@ public class Ir_sequence_date_rangeServiceImpl extends ServiceImpl<Ir_sequence_d
public
boolean
checkKey
(
Ir_sequence_date_range
et
)
{
public
boolean
checkKey
(
Ir_sequence_date_range
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
}
@Override
@Transactional
public
Ir_sequence_date_range
create_sequence
(
Ir_sequence_date_range
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
Ir_sequence_date_range
et
)
{
public
boolean
save
(
Ir_sequence_date_range
et
)
{
...
...
businesscentral-core/src/main/resources/mapper/odoo_ir/ir_sequence/Ir_sequenceMapper.xml
浏览文件 @
62899171
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<result
property=
"companyId"
column=
"company_id"
/>
<result
property=
"companyId"
column=
"company_id"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"writeDate"
column=
"write_date"
/>
<result
property=
"writeDate"
column=
"write_date"
/>
<result
property=
"nextC
odeValue"
column=
"next_code_value
"
/>
<result
property=
"nextC
har"
column=
"next_char
"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
...
...
businesscentral-core/src/main/resources/sysmodel/iBizBusinessCentral.json
浏览文件 @
62899171
...
@@ -71525,9 +71525,9 @@
...
@@ -71525,9 +71525,9 @@
"major_field":0
"major_field":0
},
},
{
{
"fieldname":"NEXT_C
ODE_VALUE
" ,
"fieldname":"NEXT_C
HAR
" ,
"codename":"Next_c
ode_value
",
"codename":"Next_c
har
",
"field_logic_name":"next_c
ode_value
",
"field_logic_name":"next_c
har
",
"entity_name":"Ir_sequence",
"entity_name":"Ir_sequence",
"field_type":"TEXT",
"field_type":"TEXT",
"nullable":1,
"nullable":1,
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/dto/Ir_sequenceDTO.java
浏览文件 @
62899171
...
@@ -188,13 +188,13 @@ public class Ir_sequenceDTO extends DTOBase implements Serializable {
...
@@ -188,13 +188,13 @@ public class Ir_sequenceDTO extends DTOBase implements Serializable {
private
Timestamp
writeDate
;
private
Timestamp
writeDate
;
/**
/**
* 属性 [NEXT_C
ODE_VALUE
]
* 属性 [NEXT_C
HAR
]
*
*
*/
*/
@JSONField
(
name
=
"next_c
ode_value
"
)
@JSONField
(
name
=
"next_c
har
"
)
@JsonProperty
(
"next_c
ode_value
"
)
@JsonProperty
(
"next_c
har
"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
nextC
odeValue
;
private
String
nextC
har
;
/**
/**
...
...
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Ir_sequenceResource.java
浏览文件 @
62899171
...
@@ -114,19 +114,74 @@ public class Ir_sequenceResource {
...
@@ -114,19 +114,74 @@ public class Ir_sequenceResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequenceMapping
.
toDto
(
ir_sequenceService
.
getDraft
(
new
Ir_sequence
())));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequenceMapping
.
toDto
(
ir_sequenceService
.
getDraft
(
new
Ir_sequence
())));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Alter_sequence-all')"
)
@ApiOperation
(
value
=
"修改序列"
,
tags
=
{
"序列"
},
notes
=
"修改序列"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/alter_sequence"
)
public
ResponseEntity
<
Ir_sequenceDTO
>
alter_sequence
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
domain
.
setId
(
ir_sequence_id
);
domain
=
ir_sequenceService
.
alter_sequence
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
}
@ApiOperation
(
value
=
"检查序列"
,
tags
=
{
"序列"
},
notes
=
"检查序列"
)
@ApiOperation
(
value
=
"检查序列"
,
tags
=
{
"序列"
},
notes
=
"检查序列"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequenceService
.
checkKey
(
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequenceService
.
checkKey
(
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
)));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Next_by_code-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Create_sequence-all')"
)
@ApiOperation
(
value
=
"next_by_code"
,
tags
=
{
"序列"
},
notes
=
"next_by_code"
)
@ApiOperation
(
value
=
"创建序列"
,
tags
=
{
"序列"
},
notes
=
"创建序列"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/next_by_code"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/create_sequence"
)
public
ResponseEntity
<
Ir_sequenceDTO
>
next_by_code
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
public
ResponseEntity
<
Ir_sequenceDTO
>
create_sequence
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
domain
.
setId
(
ir_sequence_id
);
domain
=
ir_sequenceService
.
create_sequence
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Drop_sequence-all')"
)
@ApiOperation
(
value
=
"删除序列"
,
tags
=
{
"序列"
},
notes
=
"删除序列"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/drop_sequence"
)
public
ResponseEntity
<
Ir_sequenceDTO
>
drop_sequence
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
domain
.
setId
(
ir_sequence_id
);
domain
.
setId
(
ir_sequence_id
);
domain
=
ir_sequenceService
.
next_by_code
(
domain
);
domain
=
ir_sequenceService
.
drop_sequence
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Get_next-all')"
)
@ApiOperation
(
value
=
"get_next"
,
tags
=
{
"序列"
},
notes
=
"get_next"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ir_sequences/{ir_sequence_id}/get_next"
)
public
ResponseEntity
<
Ir_sequenceDTO
>
get_next
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
domain
.
setId
(
ir_sequence_id
);
domain
=
ir_sequenceService
.
get_next
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Get_next_by_code-all')"
)
@ApiOperation
(
value
=
"get_next_by_code"
,
tags
=
{
"序列"
},
notes
=
"get_next_by_code"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ir_sequences/{ir_sequence_id}/get_next_by_code"
)
public
ResponseEntity
<
Ir_sequenceDTO
>
get_next_by_code
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
domain
.
setId
(
ir_sequence_id
);
domain
=
ir_sequenceService
.
get_next_by_code
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Predict_nextval-all')"
)
@ApiOperation
(
value
=
"预言nextval"
,
tags
=
{
"序列"
},
notes
=
"预言nextval"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/predict_nextval"
)
public
ResponseEntity
<
Ir_sequenceDTO
>
predict_nextval
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
domain
.
setId
(
ir_sequence_id
);
domain
=
ir_sequenceService
.
predict_nextval
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
}
}
...
@@ -146,6 +201,28 @@ public class Ir_sequenceResource {
...
@@ -146,6 +201,28 @@ public class Ir_sequenceResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Select_nextval-all')"
)
@ApiOperation
(
value
=
"获取nextval"
,
tags
=
{
"序列"
},
notes
=
"获取nextval"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/select_nextval"
)
public
ResponseEntity
<
Ir_sequenceDTO
>
select_nextval
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
domain
.
setId
(
ir_sequence_id
);
domain
=
ir_sequenceService
.
select_nextval
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Update_nogap-all')"
)
@ApiOperation
(
value
=
"update_nogap"
,
tags
=
{
"序列"
},
notes
=
"update_nogap"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ir_sequences/{ir_sequence_id}/update_nogap"
)
public
ResponseEntity
<
Ir_sequenceDTO
>
update_nogap
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@RequestBody
Ir_sequenceDTO
ir_sequencedto
)
{
Ir_sequence
domain
=
ir_sequenceMapping
.
toDomain
(
ir_sequencedto
);
domain
.
setId
(
ir_sequence_id
);
domain
=
ir_sequenceService
.
update_nogap
(
domain
);
ir_sequencedto
=
ir_sequenceMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequencedto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-searchDefault-all')"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"序列"
}
,
notes
=
"获取数据集"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"序列"
}
,
notes
=
"获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ir_sequences/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ir_sequences/fetchdefault"
)
...
...
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Ir_sequence_date_rangeResource.java
浏览文件 @
62899171
...
@@ -120,6 +120,17 @@ public class Ir_sequence_date_rangeResource {
...
@@ -120,6 +120,17 @@ public class Ir_sequence_date_rangeResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequence_date_rangeService
.
checkKey
(
ir_sequence_date_rangeMapping
.
toDomain
(
ir_sequence_date_rangedto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequence_date_rangeService
.
checkKey
(
ir_sequence_date_rangeMapping
.
toDomain
(
ir_sequence_date_rangedto
)));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Create_sequence-all')"
)
@ApiOperation
(
value
=
"创建序列"
,
tags
=
{
"序列日期范围"
},
notes
=
"创建序列"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequence_date_ranges/{ir_sequence_date_range_id}/create_sequence"
)
public
ResponseEntity
<
Ir_sequence_date_rangeDTO
>
create_sequence
(
@PathVariable
(
"ir_sequence_date_range_id"
)
Long
ir_sequence_date_range_id
,
@RequestBody
Ir_sequence_date_rangeDTO
ir_sequence_date_rangedto
)
{
Ir_sequence_date_range
domain
=
ir_sequence_date_rangeMapping
.
toDomain
(
ir_sequence_date_rangedto
);
domain
.
setId
(
ir_sequence_date_range_id
);
domain
=
ir_sequence_date_rangeService
.
create_sequence
(
domain
);
ir_sequence_date_rangedto
=
ir_sequence_date_rangeMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequence_date_rangedto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Save-all')"
)
@ApiOperation
(
value
=
"保存序列日期范围"
,
tags
=
{
"序列日期范围"
},
notes
=
"保存序列日期范围"
)
@ApiOperation
(
value
=
"保存序列日期范围"
,
tags
=
{
"序列日期范围"
},
notes
=
"保存序列日期范围"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequence_date_ranges/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequence_date_ranges/save"
)
...
@@ -243,6 +254,17 @@ public class Ir_sequence_date_rangeResource {
...
@@ -243,6 +254,17 @@ public class Ir_sequence_date_rangeResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequence_date_rangeService
.
checkKey
(
ir_sequence_date_rangeMapping
.
toDomain
(
ir_sequence_date_rangedto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequence_date_rangeService
.
checkKey
(
ir_sequence_date_rangeMapping
.
toDomain
(
ir_sequence_date_rangedto
)));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Create_sequence-all')"
)
@ApiOperation
(
value
=
"根据序列序列日期范围"
,
tags
=
{
"序列日期范围"
},
notes
=
"根据序列序列日期范围"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/ir_sequence_date_ranges/{ir_sequence_date_range_id}/create_sequence"
)
public
ResponseEntity
<
Ir_sequence_date_rangeDTO
>
create_sequenceByIr_sequence
(
@PathVariable
(
"ir_sequence_id"
)
Long
ir_sequence_id
,
@PathVariable
(
"ir_sequence_date_range_id"
)
Long
ir_sequence_date_range_id
,
@RequestBody
Ir_sequence_date_rangeDTO
ir_sequence_date_rangedto
)
{
Ir_sequence_date_range
domain
=
ir_sequence_date_rangeMapping
.
toDomain
(
ir_sequence_date_rangedto
);
domain
.
setSequenceId
(
ir_sequence_id
);
domain
=
ir_sequence_date_rangeService
.
create_sequence
(
domain
)
;
ir_sequence_date_rangedto
=
ir_sequence_date_rangeMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ir_sequence_date_rangedto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Save-all')"
)
@ApiOperation
(
value
=
"根据序列保存序列日期范围"
,
tags
=
{
"序列日期范围"
},
notes
=
"根据序列保存序列日期范围"
)
@ApiOperation
(
value
=
"根据序列保存序列日期范围"
,
tags
=
{
"序列日期范围"
},
notes
=
"根据序列保存序列日期范围"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/ir_sequence_date_ranges/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ir_sequences/{ir_sequence_id}/ir_sequence_date_ranges/save"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录