Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz商业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz商业套件
iBiz商业中心
提交
8babb97b
提交
8babb97b
编写于
10月 23, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
a6002249
变更
5
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
60 行增加
和
0 行删除
+60
-0
purchase_orderFallback.java
...ral/core/odoo_purchase/client/purchase_orderFallback.java
+4
-0
purchase_orderFeignClient.java
.../core/odoo_purchase/client/purchase_orderFeignClient.java
+4
-0
IPurchase_orderService.java
...al/core/odoo_purchase/service/IPurchase_orderService.java
+1
-0
Purchase_orderServiceImpl.java
...odoo_purchase/service/impl/Purchase_orderServiceImpl.java
+7
-0
Purchase_orderResource.java
...lab/businesscentral/core/rest/Purchase_orderResource.java
+44
-0
未找到文件。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/client/purchase_orderFallback.java
浏览文件 @
8babb97b
...
@@ -64,6 +64,10 @@ public class purchase_orderFallback implements purchase_orderFeignClient{
...
@@ -64,6 +64,10 @@ public class purchase_orderFallback implements purchase_orderFeignClient{
public
Purchase_order
button_approve
(
Long
id
,
Purchase_order
purchase_order
){
return
null
;
}
public
Purchase_order
button_cancel
(
Long
id
,
Purchase_order
purchase_order
){
public
Purchase_order
button_cancel
(
Long
id
,
Purchase_order
purchase_order
){
return
null
;
return
null
;
}
}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/client/purchase_orderFeignClient.java
浏览文件 @
8babb97b
...
@@ -60,6 +60,10 @@ public interface purchase_orderFeignClient {
...
@@ -60,6 +60,10 @@ public interface purchase_orderFeignClient {
Purchase_order
getDraft
();
Purchase_order
getDraft
();
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{id}/button_approve"
)
Purchase_order
button_approve
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{id}/button_cancel"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{id}/button_cancel"
)
Purchase_order
button_cancel
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
Purchase_order
button_cancel
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/IPurchase_orderService.java
浏览文件 @
8babb97b
...
@@ -34,6 +34,7 @@ public interface IPurchase_orderService extends IService<Purchase_order>{
...
@@ -34,6 +34,7 @@ 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
button_approve
(
Purchase_order
et
)
;
Purchase_order
button_cancel
(
Purchase_order
et
)
;
Purchase_order
button_cancel
(
Purchase_order
et
)
;
Purchase_order
button_confirm
(
Purchase_order
et
)
;
Purchase_order
button_confirm
(
Purchase_order
et
)
;
Purchase_order
button_done
(
Purchase_order
et
)
;
Purchase_order
button_done
(
Purchase_order
et
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/impl/Purchase_orderServiceImpl.java
浏览文件 @
8babb97b
...
@@ -164,6 +164,13 @@ public class Purchase_orderServiceImpl extends ServiceImpl<Purchase_orderMapper,
...
@@ -164,6 +164,13 @@ public class Purchase_orderServiceImpl extends ServiceImpl<Purchase_orderMapper,
return
et
;
return
et
;
}
}
@Override
@Transactional
public
Purchase_order
button_approve
(
Purchase_order
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
@Transactional
@Transactional
public
Purchase_order
button_cancel
(
Purchase_order
et
)
{
public
Purchase_order
button_cancel
(
Purchase_order
et
)
{
...
...
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Purchase_orderResource.java
浏览文件 @
8babb97b
...
@@ -115,6 +115,17 @@ public class Purchase_orderResource {
...
@@ -115,6 +115,17 @@ 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-Button_approve-all')"
)
@ApiOperation
(
value
=
"批准"
,
tags
=
{
"采购订单"
},
notes
=
"批准"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{purchase_order_id}/button_approve"
)
public
ResponseEntity
<
Purchase_orderDTO
>
button_approve
(
@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_approve
(
domain
);
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_cancel-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_cancel-all')"
)
@ApiOperation
(
value
=
"取消"
,
tags
=
{
"采购订单"
},
notes
=
"取消"
)
@ApiOperation
(
value
=
"取消"
,
tags
=
{
"采购订单"
},
notes
=
"取消"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{purchase_order_id}/button_cancel"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{purchase_order_id}/button_cancel"
)
...
@@ -316,6 +327,17 @@ public class Purchase_orderResource {
...
@@ -316,6 +327,17 @@ 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-Button_approve-all')"
)
@ApiOperation
(
value
=
"根据采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/button_approve"
)
public
ResponseEntity
<
Purchase_orderDTO
>
button_approveByPurchase_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_approve
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_cancel-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_cancel-all')"
)
@ApiOperation
(
value
=
"根据采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请采购订单"
)
@ApiOperation
(
value
=
"根据采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/button_cancel"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/button_cancel"
)
...
@@ -524,6 +546,17 @@ public class Purchase_orderResource {
...
@@ -524,6 +546,17 @@ 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-Button_approve-all')"
)
@ApiOperation
(
value
=
"根据供应商采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_orders/{purchase_order_id}/button_approve"
)
public
ResponseEntity
<
Purchase_orderDTO
>
button_approveByRes_supplier
(
@PathVariable
(
"res_supplier_id"
)
Long
res_supplier_id
,
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setPartnerId
(
res_supplier_id
);
domain
=
purchase_orderService
.
button_approve
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_cancel-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_cancel-all')"
)
@ApiOperation
(
value
=
"根据供应商采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购订单"
)
@ApiOperation
(
value
=
"根据供应商采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_orders/{purchase_order_id}/button_cancel"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_orders/{purchase_order_id}/button_cancel"
)
...
@@ -732,6 +765,17 @@ public class Purchase_orderResource {
...
@@ -732,6 +765,17 @@ 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-Button_approve-all')"
)
@ApiOperation
(
value
=
"根据供应商采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/button_approve"
)
public
ResponseEntity
<
Purchase_orderDTO
>
button_approveByRes_supplierPurchase_requisition
(
@PathVariable
(
"res_supplier_id"
)
Long
res_supplier_id
,
@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_approve
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_cancel-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Button_cancel-all')"
)
@ApiOperation
(
value
=
"根据供应商采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购申请采购订单"
)
@ApiOperation
(
value
=
"根据供应商采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/button_cancel"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/button_cancel"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录