Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
249489f6
提交
249489f6
authored
9月 22, 2023
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
918a6d15
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
14 行增加
和
6 行删除
+14
-6
OrderChildPCVO.java
...c/main/java/com/clx/performance/vo/pc/OrderChildPCVO.java
+4
-0
GoodsOrderController.java
...m/clx/performance/controller/pc/GoodsOrderController.java
+10
-6
没有找到文件。
performance-api/src/main/java/com/clx/performance/vo/pc/OrderChildPCVO.java
浏览文件 @
249489f6
...
...
@@ -19,6 +19,9 @@ public class OrderChildPCVO {
@ApiModelProperty
(
"运单编号"
)
private
String
childNo
;
@ApiModelProperty
(
"车牌号"
)
private
String
truckNo
;
@ApiModelProperty
(
"运单状态:10:已接单 20:支付 30:前往货源地 40:到达货源地 50:装货成功 60:前往目的地 70:到达目的地 80:收货待确认 90:待结算 100:完成 110:司机取消 111:平台取消"
)
private
Integer
status
;
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/controller/pc/GoodsOrderController.java
浏览文件 @
249489f6
...
...
@@ -16,6 +16,7 @@ import com.clx.performance.constant.RedisConstants;
import
com.clx.performance.dao.OrderGoodsTruckBindDao
;
import
com.clx.performance.enums.OrderGoodsStatusEnum
;
import
com.clx.performance.enums.OrderGoodsTypeEnum
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.mapper.OrderGoodsMapper
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.service.OrderChildService
;
...
...
@@ -24,6 +25,7 @@ import com.clx.performance.vo.pc.OrderChildPCVO;
import
com.clx.performance.vo.pc.OrderGoodsVO
;
import
com.msl.common.base.PageData
;
import
com.msl.common.convertor.aspect.UnitCovert
;
import
com.msl.common.exception.ServiceSystemException
;
import
com.msl.common.result.Result
;
import
com.msl.common.utils.DateUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -105,16 +107,18 @@ public class GoodsOrderController {
BigDecimal
childSum
=
childParamsList
.
stream
().
map
(
OrderGoodsChildParams:
:
getExtractWeight
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
if
(
orderInfo
.
getResidueWeight
().
compareTo
(
childSum
)
<
0
)
{
throw
new
RuntimeException
(
"当前货单总吨数已超订单总吨数"
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"当前货单总吨数已超订单总吨数"
);
}
long
beginOrderGoodsId
=
orderGoodsIdGenerate
.
getOrderGoodsId
(
OrderGoodsTypeEnum
.
Status
.
PLATFORM
.
getCode
(),
childParamsList
.
size
());
for
(
OrderGoodsChildParams
child
:
childParamsList
)
{
if
(
child
.
getPendingOrderWay
().
equals
(
2
)
)
{
if
(
child
.
getNeedTruckNum
()
==
null
){
throw
new
RuntimeException
(
"定向派单必须选择车辆"
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"定向派单必须选择车辆"
);
}
if
(
child
.
getNeedTruckNum
()
!=
child
.
getTruckList
().
size
()){
throw
new
RuntimeException
(
"定向派单需要车数与已选车辆数量不一致"
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"定向派单需要车数与已选车辆数量不一致"
);
}
}
OrderGoods
orderGoods
=
new
OrderGoods
();
...
...
@@ -173,10 +177,10 @@ public class GoodsOrderController {
BigDecimal
childSum
=
childParamsList
.
stream
().
map
(
OrderGoodsChildParams:
:
getExtractWeight
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
if
(
orderInfo
.
getResidueWeight
().
compareTo
(
childSum
)
<
0
)
{
throw
new
RuntimeException
(
"当前货单总吨数已超订单总吨数"
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"当前货单总吨数已超订单总吨数"
);
}
if
(
childParamsList
.
size
()
>
1
)
{
throw
new
RuntimeException
(
"全部自有车辆只能全部提取"
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"全部自有车辆只能全部提取"
);
}
long
beginOrderGoodsId
=
orderGoodsIdGenerate
.
getOrderGoodsId
(
OrderGoodsTypeEnum
.
Status
.
PLATFORM
.
getCode
(),
childParamsList
.
size
());
for
(
OrderGoodsChildParams
child
:
childParamsList
)
{
...
...
@@ -188,7 +192,7 @@ public class GoodsOrderController {
//提取方式 1提取全部 2提取部分
Integer
extractWay
=
child
.
getExtractWay
();
if
(
extractWay
.
equals
(
2
))
{
throw
new
RuntimeException
(
"全部自有车辆只能全部提取"
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"全部自有车辆只能全部提取"
);
}
orderGoods
.
setExtractWay
(
extractWay
);
//需要车辆
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论