Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
oms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
oms-ci-test
Commits
61c45339
提交
61c45339
authored
9月 15, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
采购订单优化、修改
上级
aec5b71c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
46 行增加
和
6 行删除
+46
-6
UavPOController.java
...main/java/com/mmc/oms/controller/uav/UavPOController.java
+1
-1
UavPurchaseOrderDTO.java
...n/java/com/mmc/oms/model/dto/uav/UavPurchaseOrderDTO.java
+3
-0
UavPOService.java
src/main/java/com/mmc/oms/service/uav/UavPOService.java
+3
-1
UavOrderServiceImpl.java
...ava/com/mmc/oms/service/uav/impl/UavOrderServiceImpl.java
+2
-0
UavPOServiceImpl.java
...n/java/com/mmc/oms/service/uav/impl/UavPOServiceImpl.java
+37
-4
没有找到文件。
src/main/java/com/mmc/oms/controller/uav/UavPOController.java
浏览文件 @
61c45339
...
@@ -45,7 +45,7 @@ public class UavPOController extends BaseController {
...
@@ -45,7 +45,7 @@ public class UavPOController extends BaseController {
@ApiOperation
(
value
=
"订单详情"
)
@ApiOperation
(
value
=
"订单详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UavPurchaseOrderDTO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UavPurchaseOrderDTO
.
class
)})
@GetMapping
(
"getPurchaseOrder"
)
@GetMapping
(
"getPurchaseOrder"
)
private
ResultBody
getPurchaseOrder
(
@RequestParam
Integer
id
,
HttpServletRequest
request
){
private
ResultBody
getPurchaseOrder
(
@RequestParam
Integer
id
,
HttpServletRequest
request
)
throws
Exception
{
return
uavPOService
.
getPurchaseOrder
(
id
,
this
.
getCurrentAccount
(
request
));
return
uavPOService
.
getPurchaseOrder
(
id
,
this
.
getCurrentAccount
(
request
));
}
}
...
...
src/main/java/com/mmc/oms/model/dto/uav/UavPurchaseOrderDTO.java
浏览文件 @
61c45339
...
@@ -2,6 +2,7 @@ package com.mmc.oms.model.dto.uav;
...
@@ -2,6 +2,7 @@ package com.mmc.oms.model.dto.uav;
import
com.mmc.oms.entity.uav.UavPurchaseOrderPayDO
;
import
com.mmc.oms.entity.uav.UavPurchaseOrderPayDO
;
import
com.mmc.oms.model.dto.ContractInfoDTO
;
import
com.mmc.oms.model.dto.ContractInfoDTO
;
import
com.mmc.oms.model.dto.kdn.KdnExpDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -60,5 +61,7 @@ public class UavPurchaseOrderDTO implements Serializable {
...
@@ -60,5 +61,7 @@ public class UavPurchaseOrderDTO implements Serializable {
private
ContractInfoDTO
contractInfoDTO
;
private
ContractInfoDTO
contractInfoDTO
;
@ApiModelProperty
(
"支付凭证列表"
)
@ApiModelProperty
(
"支付凭证列表"
)
private
List
<
UavOrderPayDTO
>
payDTOS
;
private
List
<
UavOrderPayDTO
>
payDTOS
;
@ApiModelProperty
(
"支付凭证列表"
)
private
KdnExpDTO
kdnExpDTO
;
}
}
src/main/java/com/mmc/oms/service/uav/UavPOService.java
浏览文件 @
61c45339
...
@@ -16,7 +16,7 @@ public interface UavPOService {
...
@@ -16,7 +16,7 @@ public interface UavPOService {
ResultBody
listPurchase
(
UavPOrderQO
uavPOrderQO
,
BaseAccountDTO
currentAccount
);
ResultBody
listPurchase
(
UavPOrderQO
uavPOrderQO
,
BaseAccountDTO
currentAccount
);
ResultBody
getPurchaseOrder
(
Integer
id
,
BaseAccountDTO
currentAccount
);
ResultBody
getPurchaseOrder
(
Integer
id
,
BaseAccountDTO
currentAccount
)
throws
Exception
;
ResultBody
upLoadPay
(
UavOrderPayVO
uavOrderPayVO
);
ResultBody
upLoadPay
(
UavOrderPayVO
uavOrderPayVO
);
...
@@ -25,4 +25,6 @@ public interface UavPOService {
...
@@ -25,4 +25,6 @@ public interface UavPOService {
ResultBody
send
(
UavOrderExpressVO
param
);
ResultBody
send
(
UavOrderExpressVO
param
);
ResultBody
uavPOFinishSign
(
String
orderNo
);
ResultBody
uavPOFinishSign
(
String
orderNo
);
ResultBody
receive
(
Integer
id
);
}
}
src/main/java/com/mmc/oms/service/uav/impl/UavOrderServiceImpl.java
浏览文件 @
61c45339
...
@@ -447,6 +447,8 @@ public class UavOrderServiceImpl implements UavOrderService {
...
@@ -447,6 +447,8 @@ public class UavOrderServiceImpl implements UavOrderService {
uavOrderDao
.
updateUavOrderProportion
(
uavOrderDO
.
getId
(),
UavOrderProportion
.
PROPORTION
.
intValue
());
uavOrderDao
.
updateUavOrderProportion
(
uavOrderDO
.
getId
(),
UavOrderProportion
.
PROPORTION
.
intValue
());
}
}
this
.
updateUavOrderStatus
(
id
,
UavOrderStatus
.
WAITING_RECEIVE_GOODS
);
this
.
updateUavOrderStatus
(
id
,
UavOrderStatus
.
WAITING_RECEIVE_GOODS
);
// 修改采购订单状态
uavPOService
.
receive
(
id
);
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
...
...
src/main/java/com/mmc/oms/service/uav/impl/UavPOServiceImpl.java
浏览文件 @
61c45339
package
com
.
mmc
.
oms
.
service
.
uav
.
impl
;
package
com
.
mmc
.
oms
.
service
.
uav
.
impl
;
import
com.mmc.oms.common.ResultEnum
;
import
com.mmc.oms.common.ResultEnum
;
import
com.mmc.oms.common.json.JsonUtil
;
import
com.mmc.oms.common.result.PageResult
;
import
com.mmc.oms.common.result.PageResult
;
import
com.mmc.oms.common.result.ResultBody
;
import
com.mmc.oms.common.result.ResultBody
;
import
com.mmc.oms.common.util.KdnExpressUtil
;
import
com.mmc.oms.dao.uav.UavOrderDao
;
import
com.mmc.oms.dao.uav.UavOrderDao
;
import
com.mmc.oms.dao.uav.UavOrderExpressDao
;
import
com.mmc.oms.dao.uav.UavOrderExpressDao
;
import
com.mmc.oms.dao.uav.UavPODao
;
import
com.mmc.oms.dao.uav.UavPODao
;
...
@@ -13,6 +15,8 @@ import com.mmc.oms.entity.uav.UavPurchaseOrderPayDO;
...
@@ -13,6 +15,8 @@ import com.mmc.oms.entity.uav.UavPurchaseOrderPayDO;
import
com.mmc.oms.enums.UavOrderStatus
;
import
com.mmc.oms.enums.UavOrderStatus
;
import
com.mmc.oms.feign.UserAppApi
;
import
com.mmc.oms.feign.UserAppApi
;
import
com.mmc.oms.model.dto.ContractInfoDTO
;
import
com.mmc.oms.model.dto.ContractInfoDTO
;
import
com.mmc.oms.model.dto.kdn.KdnExpDTO
;
import
com.mmc.oms.model.dto.order.ExpStationsDTO
;
import
com.mmc.oms.model.dto.uav.UavOrderPayDTO
;
import
com.mmc.oms.model.dto.uav.UavOrderPayDTO
;
import
com.mmc.oms.model.dto.uav.UavPurchaseOrderDTO
;
import
com.mmc.oms.model.dto.uav.UavPurchaseOrderDTO
;
import
com.mmc.oms.model.dto.user.BaseAccountDTO
;
import
com.mmc.oms.model.dto.user.BaseAccountDTO
;
...
@@ -30,9 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -30,9 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -122,7 +124,7 @@ public class UavPOServiceImpl implements UavPOService {
...
@@ -122,7 +124,7 @@ public class UavPOServiceImpl implements UavPOService {
}
}
@Override
@Override
public
ResultBody
getPurchaseOrder
(
Integer
id
,
BaseAccountDTO
currentAccount
)
{
public
ResultBody
getPurchaseOrder
(
Integer
id
,
BaseAccountDTO
currentAccount
)
throws
Exception
{
UavPurchaseOrderDO
uavPOrder
=
uavPODao
.
getUavPOrder
(
id
);
UavPurchaseOrderDO
uavPOrder
=
uavPODao
.
getUavPOrder
(
id
);
if
(
uavPOrder
==
null
)
{
if
(
uavPOrder
==
null
)
{
return
ResultBody
.
error
(
"订单不存在!"
);
return
ResultBody
.
error
(
"订单不存在!"
);
...
@@ -131,6 +133,11 @@ public class UavPOServiceImpl implements UavPOService {
...
@@ -131,6 +133,11 @@ public class UavPOServiceImpl implements UavPOService {
// 收货信息
// 收货信息
UavOrderExpressDO
uavOrderExpressDO
=
uavOrderExpressDao
.
getUavOrderExpressDO
(
uavPOrder
.
getUavOrderId
());
UavOrderExpressDO
uavOrderExpressDO
=
uavOrderExpressDao
.
getUavOrderExpressDO
(
uavPOrder
.
getUavOrderId
());
uavPurchaseOrderDTO
.
setUavOrderExpressDTO
(
uavOrderExpressDO
==
null
?
null
:
uavOrderExpressDO
.
buildUavOrderExpressDTO
());
uavPurchaseOrderDTO
.
setUavOrderExpressDTO
(
uavOrderExpressDO
==
null
?
null
:
uavOrderExpressDO
.
buildUavOrderExpressDTO
());
// 快递信息
KdnExpDTO
kdnExpDTO
=
this
.
getOrderExpInfo
(
uavOrderExpressDO
);
if
(
kdnExpDTO
!=
null
)
{
uavPurchaseOrderDTO
.
setKdnExpDTO
(
kdnExpDTO
);
}
// 付款凭证信息
// 付款凭证信息
List
<
UavPurchaseOrderPayDO
>
purchaseOrderPayDOS
=
uavPODao
.
listUavPOrderPay
(
id
);
List
<
UavPurchaseOrderPayDO
>
purchaseOrderPayDOS
=
uavPODao
.
listUavPOrderPay
(
id
);
List
<
UavOrderPayDTO
>
uavOrderPayDTOS
=
purchaseOrderPayDOS
.
stream
().
map
(
UavPurchaseOrderPayDO:
:
buildUavOrderPayDTO
).
collect
(
Collectors
.
toList
());
List
<
UavOrderPayDTO
>
uavOrderPayDTOS
=
purchaseOrderPayDOS
.
stream
().
map
(
UavPurchaseOrderPayDO:
:
buildUavOrderPayDTO
).
collect
(
Collectors
.
toList
());
...
@@ -153,6 +160,23 @@ public class UavPOServiceImpl implements UavPOService {
...
@@ -153,6 +160,23 @@ public class UavPOServiceImpl implements UavPOService {
return
ResultBody
.
success
(
uavPurchaseOrderDTO
);
return
ResultBody
.
success
(
uavPurchaseOrderDTO
);
}
}
private
KdnExpDTO
getOrderExpInfo
(
UavOrderExpressDO
exp
)
throws
Exception
{
String
json
=
""
;
if
(
"SF"
.
equals
(
exp
.
getSendExpCode
()))
{
json
=
KdnExpressUtil
.
SF
(
exp
.
getTakePhone
(),
exp
.
getSendExpNo
());
}
else
if
(
"JD"
.
equals
(
exp
.
getSendExpCode
()))
{
json
=
KdnExpressUtil
.
JD
(
""
,
exp
.
getSendExpNo
());
}
else
{
json
=
KdnExpressUtil
.
others
(
exp
.
getSendExpCode
(),
exp
.
getSendExpNo
());
}
KdnExpDTO
kdn
=
JsonUtil
.
parseJsonToObj
(
json
,
KdnExpDTO
.
class
);
kdn
.
setLogisticCode
(
exp
.
getSendExpNo
());
if
(!
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
kdn
.
getTraces
()))
{
Collections
.
sort
(
kdn
.
getTraces
(),
Comparator
.
comparing
(
ExpStationsDTO:
:
getAcceptTime
).
reversed
());
// 升序
}
return
kdn
;
}
@Override
@Override
public
ResultBody
upLoadPay
(
UavOrderPayVO
uavOrderPayVO
)
{
public
ResultBody
upLoadPay
(
UavOrderPayVO
uavOrderPayVO
)
{
UavPurchaseOrderDO
uavPOrder
=
uavPODao
.
getUavPOrder
(
uavOrderPayVO
.
getUavOrderId
());
UavPurchaseOrderDO
uavPOrder
=
uavPODao
.
getUavPOrder
(
uavOrderPayVO
.
getUavOrderId
());
...
@@ -183,6 +207,7 @@ public class UavPOServiceImpl implements UavPOService {
...
@@ -183,6 +207,7 @@ public class UavPOServiceImpl implements UavPOService {
}
}
@Override
@Override
@Transactional
public
ResultBody
send
(
UavOrderExpressVO
param
)
{
public
ResultBody
send
(
UavOrderExpressVO
param
)
{
UavPurchaseOrderDO
uavPOrder
=
uavPODao
.
getUavPOrderByUavOId
(
param
.
getUavOrderId
());
UavPurchaseOrderDO
uavPOrder
=
uavPODao
.
getUavPOrderByUavOId
(
param
.
getUavOrderId
());
if
(!
uavPOrder
.
getStatusCode
().
equals
(
UavOrderStatus
.
WAITING_DELIVER_GOODS
.
getCode
()))
{
if
(!
uavPOrder
.
getStatusCode
().
equals
(
UavOrderStatus
.
WAITING_DELIVER_GOODS
.
getCode
()))
{
...
@@ -207,4 +232,12 @@ public class UavPOServiceImpl implements UavPOService {
...
@@ -207,4 +232,12 @@ public class UavPOServiceImpl implements UavPOService {
this
.
updateUavPOrderStatus
(
uavPOrder
.
getId
(),
UavOrderStatus
.
SIGN
);
this
.
updateUavPOrderStatus
(
uavPOrder
.
getId
(),
UavOrderStatus
.
SIGN
);
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
@Override
public
ResultBody
receive
(
Integer
uavOrderId
)
{
// 修改订单状态
UavPurchaseOrderDO
uavPurchaseOrderDO
=
uavPODao
.
getUavPOrderByUavOId
(
uavOrderId
);
this
.
updateUavPOrderStatus
(
uavPurchaseOrderDO
.
getId
(),
UavOrderStatus
.
WAITING_REMARK
);
return
ResultBody
.
success
();
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论