Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz商业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz商业套件
iBiz商业中心
提交
99ff30d6
提交
99ff30d6
编写于
10月 16, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
73bec36b
变更
10
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
387 行增加
和
0 行删除
+387
-0
Purchase_orderExService.java
...tral/core/extensions/service/Purchase_orderExService.java
+65
-0
Purchase_requisitionExService.java
...ore/extensions/service/Purchase_requisitionExService.java
+75
-0
purchase_orderFallback.java
...ral/core/odoo_purchase/client/purchase_orderFallback.java
+16
-0
purchase_orderFeignClient.java
.../core/odoo_purchase/client/purchase_orderFeignClient.java
+16
-0
IPurchase_orderService.java
...al/core/odoo_purchase/service/IPurchase_orderService.java
+4
-0
IPurchase_requisitionService.java
...e/odoo_purchase/service/IPurchase_requisitionService.java
+5
-0
Purchase_orderServiceImpl.java
...odoo_purchase/service/impl/Purchase_orderServiceImpl.java
+28
-0
Purchase_requisitionServiceImpl.java
...urchase/service/impl/Purchase_requisitionServiceImpl.java
+35
-0
Purchase_orderResource.java
...lab/businesscentral/core/rest/Purchase_orderResource.java
+88
-0
Purchase_requisitionResource.java
...sinesscentral/core/rest/Purchase_requisitionResource.java
+55
-0
未找到文件。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions/service/Purchase_orderExService.java
0 → 100644
浏览文件 @
99ff30d6
package
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.service.impl.Purchase_orderServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[采购订单] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"Purchase_orderExService"
)
public
class
Purchase_orderExService
extends
Purchase_orderServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[Action_view_invoice]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_order
action_view_invoice
(
Purchase_order
et
)
{
return
super
.
action_view_invoice
(
et
);
}
/**
* 自定义行为[Action_view_picking]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_order
action_view_picking
(
Purchase_order
et
)
{
return
super
.
action_view_picking
(
et
);
}
/**
* 自定义行为[Button_confirm]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_order
button_confirm
(
Purchase_order
et
)
{
return
super
.
button_confirm
(
et
);
}
/**
* 自定义行为[Button_unlock]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_order
button_unlock
(
Purchase_order
et
)
{
return
super
.
button_unlock
(
et
);
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions/service/Purchase_requisitionExService.java
0 → 100644
浏览文件 @
99ff30d6
package
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.service.impl.Purchase_requisitionServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_requisition
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[采购申请] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"Purchase_requisitionExService"
)
public
class
Purchase_requisitionExService
extends
Purchase_requisitionServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[Action_cancel]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_requisition
action_cancel
(
Purchase_requisition
et
)
{
return
super
.
action_cancel
(
et
);
}
/**
* 自定义行为[Action_done]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_requisition
action_done
(
Purchase_requisition
et
)
{
return
super
.
action_done
(
et
);
}
/**
* 自定义行为[Action_draft]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_requisition
action_draft
(
Purchase_requisition
et
)
{
return
super
.
action_draft
(
et
);
}
/**
* 自定义行为[Action_in_progress]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_requisition
action_in_progress
(
Purchase_requisition
et
)
{
return
super
.
action_in_progress
(
et
);
}
/**
* 自定义行为[Action_open]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_requisition
action_open
(
Purchase_requisition
et
)
{
return
super
.
action_open
(
et
);
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/client/purchase_orderFallback.java
浏览文件 @
99ff30d6
...
@@ -64,6 +64,22 @@ public class purchase_orderFallback implements purchase_orderFeignClient{
...
@@ -64,6 +64,22 @@ public class purchase_orderFallback implements purchase_orderFeignClient{
public
Purchase_order
action_view_invoice
(
Long
id
,
Purchase_order
purchase_order
){
return
null
;
}
public
Purchase_order
action_view_picking
(
Long
id
,
Purchase_order
purchase_order
){
return
null
;
}
public
Purchase_order
button_confirm
(
Long
id
,
Purchase_order
purchase_order
){
return
null
;
}
public
Purchase_order
button_unlock
(
Long
id
,
Purchase_order
purchase_order
){
return
null
;
}
public
Boolean
checkKey
(
Purchase_order
purchase_order
){
public
Boolean
checkKey
(
Purchase_order
purchase_order
){
return
false
;
return
false
;
}
}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/client/purchase_orderFeignClient.java
浏览文件 @
99ff30d6
...
@@ -60,6 +60,22 @@ public interface purchase_orderFeignClient {
...
@@ -60,6 +60,22 @@ public interface purchase_orderFeignClient {
Purchase_order
getDraft
();
Purchase_order
getDraft
();
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{id}/action_view_invoice"
)
Purchase_order
action_view_invoice
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{id}/action_view_picking"
)
Purchase_order
action_view_picking
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{id}/button_confirm"
)
Purchase_order
button_confirm
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{id}/button_unlock"
)
Purchase_order
button_unlock
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/checkkey"
)
Boolean
checkKey
(
@RequestBody
Purchase_order
purchase_order
);
Boolean
checkKey
(
@RequestBody
Purchase_order
purchase_order
);
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/IPurchase_orderService.java
浏览文件 @
99ff30d6
...
@@ -34,6 +34,10 @@ public interface IPurchase_orderService extends IService<Purchase_order>{
...
@@ -34,6 +34,10 @@ public interface IPurchase_orderService extends IService<Purchase_order>{
void
removeBatch
(
Collection
<
Long
>
idList
)
;
void
removeBatch
(
Collection
<
Long
>
idList
)
;
Purchase_order
get
(
Long
key
)
;
Purchase_order
get
(
Long
key
)
;
Purchase_order
getDraft
(
Purchase_order
et
)
;
Purchase_order
getDraft
(
Purchase_order
et
)
;
Purchase_order
action_view_invoice
(
Purchase_order
et
)
;
Purchase_order
action_view_picking
(
Purchase_order
et
)
;
Purchase_order
button_confirm
(
Purchase_order
et
)
;
Purchase_order
button_unlock
(
Purchase_order
et
)
;
boolean
checkKey
(
Purchase_order
et
)
;
boolean
checkKey
(
Purchase_order
et
)
;
boolean
save
(
Purchase_order
et
)
;
boolean
save
(
Purchase_order
et
)
;
void
saveBatch
(
List
<
Purchase_order
>
list
)
;
void
saveBatch
(
List
<
Purchase_order
>
list
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/IPurchase_requisitionService.java
浏览文件 @
99ff30d6
...
@@ -34,6 +34,11 @@ public interface IPurchase_requisitionService extends IService<Purchase_requisit
...
@@ -34,6 +34,11 @@ public interface IPurchase_requisitionService extends IService<Purchase_requisit
void
removeBatch
(
Collection
<
Long
>
idList
)
;
void
removeBatch
(
Collection
<
Long
>
idList
)
;
Purchase_requisition
get
(
Long
key
)
;
Purchase_requisition
get
(
Long
key
)
;
Purchase_requisition
getDraft
(
Purchase_requisition
et
)
;
Purchase_requisition
getDraft
(
Purchase_requisition
et
)
;
Purchase_requisition
action_cancel
(
Purchase_requisition
et
)
;
Purchase_requisition
action_done
(
Purchase_requisition
et
)
;
Purchase_requisition
action_draft
(
Purchase_requisition
et
)
;
Purchase_requisition
action_in_progress
(
Purchase_requisition
et
)
;
Purchase_requisition
action_open
(
Purchase_requisition
et
)
;
boolean
checkKey
(
Purchase_requisition
et
)
;
boolean
checkKey
(
Purchase_requisition
et
)
;
boolean
save
(
Purchase_requisition
et
)
;
boolean
save
(
Purchase_requisition
et
)
;
void
saveBatch
(
List
<
Purchase_requisition
>
list
)
;
void
saveBatch
(
List
<
Purchase_requisition
>
list
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/impl/Purchase_orderServiceImpl.java
浏览文件 @
99ff30d6
...
@@ -153,6 +153,34 @@ public class Purchase_orderServiceImpl extends ServiceImpl<Purchase_orderMapper,
...
@@ -153,6 +153,34 @@ public class Purchase_orderServiceImpl extends ServiceImpl<Purchase_orderMapper,
return
et
;
return
et
;
}
}
@Override
@Transactional
public
Purchase_order
action_view_invoice
(
Purchase_order
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Purchase_order
action_view_picking
(
Purchase_order
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Purchase_order
button_confirm
(
Purchase_order
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Purchase_order
button_unlock
(
Purchase_order
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
public
boolean
checkKey
(
Purchase_order
et
)
{
public
boolean
checkKey
(
Purchase_order
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/impl/Purchase_requisitionServiceImpl.java
浏览文件 @
99ff30d6
...
@@ -132,6 +132,41 @@ public class Purchase_requisitionServiceImpl extends ServiceImpl<Purchase_requis
...
@@ -132,6 +132,41 @@ public class Purchase_requisitionServiceImpl extends ServiceImpl<Purchase_requis
return
et
;
return
et
;
}
}
@Override
@Transactional
public
Purchase_requisition
action_cancel
(
Purchase_requisition
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Purchase_requisition
action_done
(
Purchase_requisition
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Purchase_requisition
action_draft
(
Purchase_requisition
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Purchase_requisition
action_in_progress
(
Purchase_requisition
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
Purchase_requisition
action_open
(
Purchase_requisition
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
public
boolean
checkKey
(
Purchase_requisition
et
)
{
public
boolean
checkKey
(
Purchase_requisition
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
...
...
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Purchase_orderResource.java
浏览文件 @
99ff30d6
...
@@ -115,6 +115,50 @@ public class Purchase_orderResource {
...
@@ -115,6 +115,50 @@ public class Purchase_orderResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderMapping
.
toDto
(
purchase_orderService
.
getDraft
(
new
Purchase_order
())));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderMapping
.
toDto
(
purchase_orderService
.
getDraft
(
new
Purchase_order
())));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Action_view_invoice-all')"
)
@ApiOperation
(
value
=
"创建账单"
,
tags
=
{
"采购订单"
},
notes
=
"创建账单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{purchase_order_id}/action_view_invoice"
)
public
ResponseEntity
<
Purchase_orderDTO
>
action_view_invoice
(
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setId
(
purchase_order_id
);
domain
=
purchase_orderService
.
action_view_invoice
(
domain
);
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Action_view_picking-all')"
)
@ApiOperation
(
value
=
"接收产品"
,
tags
=
{
"采购订单"
},
notes
=
"接收产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{purchase_order_id}/action_view_picking"
)
public
ResponseEntity
<
Purchase_orderDTO
>
action_view_picking
(
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setId
(
purchase_order_id
);
domain
=
purchase_orderService
.
action_view_picking
(
domain
);
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_confirm-all')"
)
@ApiOperation
(
value
=
"确认订单"
,
tags
=
{
"采购订单"
},
notes
=
"确认订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{purchase_order_id}/button_confirm"
)
public
ResponseEntity
<
Purchase_orderDTO
>
button_confirm
(
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setId
(
purchase_order_id
);
domain
=
purchase_orderService
.
button_confirm
(
domain
);
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_unlock-all')"
)
@ApiOperation
(
value
=
"解锁"
,
tags
=
{
"采购订单"
},
notes
=
"解锁"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{purchase_order_id}/button_unlock"
)
public
ResponseEntity
<
Purchase_orderDTO
>
button_unlock
(
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setId
(
purchase_order_id
);
domain
=
purchase_orderService
.
button_unlock
(
domain
);
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@ApiOperation
(
value
=
"检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"检查采购订单"
)
@ApiOperation
(
value
=
"检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"检查采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
...
@@ -261,6 +305,50 @@ public class Purchase_orderResource {
...
@@ -261,6 +305,50 @@ public class Purchase_orderResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderMapping
.
toDto
(
purchase_orderService
.
getDraft
(
domain
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderMapping
.
toDto
(
purchase_orderService
.
getDraft
(
domain
)));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Action_view_invoice-all')"
)
@ApiOperation
(
value
=
"根据采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/action_view_invoice"
)
public
ResponseEntity
<
Purchase_orderDTO
>
action_view_invoiceByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setRequisitionId
(
purchase_requisition_id
);
domain
=
purchase_orderService
.
action_view_invoice
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Action_view_picking-all')"
)
@ApiOperation
(
value
=
"根据采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/action_view_picking"
)
public
ResponseEntity
<
Purchase_orderDTO
>
action_view_pickingByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setRequisitionId
(
purchase_requisition_id
);
domain
=
purchase_orderService
.
action_view_picking
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_confirm-all')"
)
@ApiOperation
(
value
=
"根据采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/button_confirm"
)
public
ResponseEntity
<
Purchase_orderDTO
>
button_confirmByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setRequisitionId
(
purchase_requisition_id
);
domain
=
purchase_orderService
.
button_confirm
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_unlock-all')"
)
@ApiOperation
(
value
=
"根据采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/button_unlock"
)
public
ResponseEntity
<
Purchase_orderDTO
>
button_unlockByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setRequisitionId
(
purchase_requisition_id
);
domain
=
purchase_orderService
.
button_unlock
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@ApiOperation
(
value
=
"根据采购申请检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请检查采购订单"
)
@ApiOperation
(
value
=
"根据采购申请检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请检查采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
public
ResponseEntity
<
Boolean
>
checkKeyByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
...
...
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Purchase_requisitionResource.java
浏览文件 @
99ff30d6
...
@@ -114,6 +114,61 @@ public class Purchase_requisitionResource {
...
@@ -114,6 +114,61 @@ public class Purchase_requisitionResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_requisitionMapping
.
toDto
(
purchase_requisitionService
.
getDraft
(
new
Purchase_requisition
())));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_requisitionMapping
.
toDto
(
purchase_requisitionService
.
getDraft
(
new
Purchase_requisition
())));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition-Action_cancel-all')"
)
@ApiOperation
(
value
=
"取消"
,
tags
=
{
"采购申请"
},
notes
=
"取消"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/action_cancel"
)
public
ResponseEntity
<
Purchase_requisitionDTO
>
action_cancel
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_requisitionDTO
purchase_requisitiondto
)
{
Purchase_requisition
domain
=
purchase_requisitionMapping
.
toDomain
(
purchase_requisitiondto
);
domain
.
setId
(
purchase_requisition_id
);
domain
=
purchase_requisitionService
.
action_cancel
(
domain
);
purchase_requisitiondto
=
purchase_requisitionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_requisitiondto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition-Action_done-all')"
)
@ApiOperation
(
value
=
"关闭"
,
tags
=
{
"采购申请"
},
notes
=
"关闭"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/action_done"
)
public
ResponseEntity
<
Purchase_requisitionDTO
>
action_done
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_requisitionDTO
purchase_requisitiondto
)
{
Purchase_requisition
domain
=
purchase_requisitionMapping
.
toDomain
(
purchase_requisitiondto
);
domain
.
setId
(
purchase_requisition_id
);
domain
=
purchase_requisitionService
.
action_done
(
domain
);
purchase_requisitiondto
=
purchase_requisitionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_requisitiondto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition-Action_draft-all')"
)
@ApiOperation
(
value
=
"重置为草稿"
,
tags
=
{
"采购申请"
},
notes
=
"重置为草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/action_draft"
)
public
ResponseEntity
<
Purchase_requisitionDTO
>
action_draft
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_requisitionDTO
purchase_requisitiondto
)
{
Purchase_requisition
domain
=
purchase_requisitionMapping
.
toDomain
(
purchase_requisitiondto
);
domain
.
setId
(
purchase_requisition_id
);
domain
=
purchase_requisitionService
.
action_draft
(
domain
);
purchase_requisitiondto
=
purchase_requisitionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_requisitiondto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition-Action_in_progress-all')"
)
@ApiOperation
(
value
=
"确认"
,
tags
=
{
"采购申请"
},
notes
=
"确认"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/action_in_progress"
)
public
ResponseEntity
<
Purchase_requisitionDTO
>
action_in_progress
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_requisitionDTO
purchase_requisitiondto
)
{
Purchase_requisition
domain
=
purchase_requisitionMapping
.
toDomain
(
purchase_requisitiondto
);
domain
.
setId
(
purchase_requisition_id
);
domain
=
purchase_requisitionService
.
action_in_progress
(
domain
);
purchase_requisitiondto
=
purchase_requisitionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_requisitiondto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition-Action_open-all')"
)
@ApiOperation
(
value
=
"验证"
,
tags
=
{
"采购申请"
},
notes
=
"验证"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/action_open"
)
public
ResponseEntity
<
Purchase_requisitionDTO
>
action_open
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_requisitionDTO
purchase_requisitiondto
)
{
Purchase_requisition
domain
=
purchase_requisitionMapping
.
toDomain
(
purchase_requisitiondto
);
domain
.
setId
(
purchase_requisition_id
);
domain
=
purchase_requisitionService
.
action_open
(
domain
);
purchase_requisitiondto
=
purchase_requisitionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_requisitiondto
);
}
@ApiOperation
(
value
=
"检查采购申请"
,
tags
=
{
"采购申请"
},
notes
=
"检查采购申请"
)
@ApiOperation
(
value
=
"检查采购申请"
,
tags
=
{
"采购申请"
},
notes
=
"检查采购申请"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Purchase_requisitionDTO
purchase_requisitiondto
)
{
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Purchase_requisitionDTO
purchase_requisitiondto
)
{
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录