Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
1ad394a3
提交
1ad394a3
authored
10月 31, 2023
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改BUG
上级
79421ce0
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
36 行增加
和
36 行删除
+36
-36
OrderGoodsStatusLazyComponent.java
.../performance/component/OrderGoodsStatusLazyComponent.java
+2
-2
OrderGoodsDao.java
.../src/main/java/com/clx/performance/dao/OrderGoodsDao.java
+2
-2
OrderGoodsDaoImpl.java
.../java/com/clx/performance/dao/impl/OrderGoodsDaoImpl.java
+4
-4
OrderGoodsMapper.java
...ain/java/com/clx/performance/mapper/OrderGoodsMapper.java
+4
-4
OrderGoodsSqlProvider.java
...om/clx/performance/sqlProvider/OrderGoodsSqlProvider.java
+3
-3
GoodsOrderStrategy.java
...java/com/clx/performance/strategy/GoodsOrderStrategy.java
+21
-21
没有找到文件。
performance-web/src/main/java/com/clx/performance/component/OrderGoodsStatusLazyComponent.java
浏览文件 @
1ad394a3
...
...
@@ -213,11 +213,11 @@ public class OrderGoodsStatusLazyComponent implements InitializingBean {
}
}
//只更新货单未拉运吨数,已拉运吨数
orderGoodsDao
.
updateOrderGoodsSet
Residue
Weight
(
childSum
,
orderGoods
.
getId
());
orderGoodsDao
.
updateOrderGoodsSet
Already
Weight
(
childSum
,
orderGoods
.
getId
());
orderFeign
.
rollbackOrderWeight
(
param
);
}
else
{
//只更新货单未拉运吨数,已拉运吨数
orderGoodsDao
.
updateOrderGoodsSetResidueWeight
(
childSum
,
childSum
,
orderGoods
.
getId
());
orderGoodsDao
.
updateOrderGoodsSetResidueWeight
AndAlreadyWeight
(
childSum
,
childSum
,
orderGoods
.
getId
());
}
redisTemplate
.
opsForZSet
().
remove
(
RedisConstants
.
ORDER_GOODS_STATUS_LAZY_LAST_ARRIVE_SEND_TIME
,
orderGoodsId
.
getValue
());
}
...
...
performance-web/src/main/java/com/clx/performance/dao/OrderGoodsDao.java
浏览文件 @
1ad394a3
...
...
@@ -62,9 +62,9 @@ public interface OrderGoodsDao extends BaseDao<OrderGoodsMapper, OrderGoods, Int
boolean
updateOrderGoodsStatusAndRollbackResidueWeightByOrderGoodsNo
(
Integer
orderGoodsId
,
Integer
status
);
Integer
updateOrderGoodsSet
ResidueWeight
(
BigDecimal
residue
Weight
,
Integer
id
);
Integer
updateOrderGoodsSet
AlreadyWeight
(
BigDecimal
already
Weight
,
Integer
id
);
Integer
updateOrderGoodsSetResidueWeight
(
BigDecimal
residueWeight
,
BigDecimal
alreadyWeight
,
Integer
id
);
Integer
updateOrderGoodsSetResidueWeight
AndAlreadyWeight
(
BigDecimal
residueWeight
,
BigDecimal
alreadyWeight
,
Integer
id
);
OrderGoodsVO
findOrderGoodsById
(
Integer
id
);
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/OrderGoodsDaoImpl.java
浏览文件 @
1ad394a3
...
...
@@ -165,13 +165,13 @@ public class OrderGoodsDaoImpl extends BaseDaoImpl<OrderGoodsMapper, OrderGoods,
}
@Override
public
Integer
updateOrderGoodsSet
ResidueWeight
(
BigDecimal
residue
Weight
,
Integer
id
)
{
return
baseMapper
.
updateOrderGoodsSet
ResidueWeight
(
residue
Weight
,
id
);
public
Integer
updateOrderGoodsSet
AlreadyWeight
(
BigDecimal
already
Weight
,
Integer
id
)
{
return
baseMapper
.
updateOrderGoodsSet
AlreadyWeight
(
already
Weight
,
id
);
}
@Override
public
Integer
updateOrderGoodsSetResidueWeight
(
BigDecimal
residueWeight
,
BigDecimal
alreadyWeight
,
Integer
id
)
{
return
baseMapper
.
updateOrderGoodsSetResidueWeight
(
residueWeight
,
alreadyWeight
,
id
);
public
Integer
updateOrderGoodsSetResidueWeight
AndAlreadyWeight
(
BigDecimal
residueWeight
,
BigDecimal
alreadyWeight
,
Integer
id
)
{
return
baseMapper
.
updateOrderGoodsSetResidueWeight
AndAlreadyWeight
(
residueWeight
,
alreadyWeight
,
id
);
}
@Override
...
...
performance-web/src/main/java/com/clx/performance/mapper/OrderGoodsMapper.java
浏览文件 @
1ad394a3
...
...
@@ -56,11 +56,11 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
@SelectProvider
(
type
=
OrderGoodsSqlProvider
.
class
,
method
=
"saveBatchEntity"
)
void
saveBatchEntity
(
List
<
OrderGoods
>
orderGoodsList
);
@UpdateProvider
(
type
=
OrderGoodsSqlProvider
.
class
,
method
=
"updateOrderGoodsSetResidueWeight"
)
Integer
updateOrderGoodsSetResidueWeight
(
@Param
(
value
=
"residueWeight"
)
BigDecimal
residueWeight
,
@Param
(
value
=
"alreadyWeight"
)
BigDecimal
alreadyWeight
,
@Param
(
value
=
"id"
)
Integer
id
);
@UpdateProvider
(
type
=
OrderGoodsSqlProvider
.
class
,
method
=
"updateOrderGoodsSetResidueWeight
AndAlreadyWeight
"
)
Integer
updateOrderGoodsSetResidueWeight
AndAlreadyWeight
(
@Param
(
value
=
"residueWeight"
)
BigDecimal
residueWeight
,
@Param
(
value
=
"alreadyWeight"
)
BigDecimal
alreadyWeight
,
@Param
(
value
=
"id"
)
Integer
id
);
@UpdateProvider
(
type
=
OrderGoodsSqlProvider
.
class
,
method
=
"updateOrderGoodsSet
Residue
Weight"
)
Integer
updateOrderGoodsSet
ResidueWeight
(
@Param
(
value
=
"residueWeight"
)
BigDecimal
residue
Weight
,
@Param
(
value
=
"id"
)
Integer
id
);
@UpdateProvider
(
type
=
OrderGoodsSqlProvider
.
class
,
method
=
"updateOrderGoodsSet
Already
Weight"
)
Integer
updateOrderGoodsSet
AlreadyWeight
(
@Param
(
value
=
"alreadyWeight"
)
BigDecimal
already
Weight
,
@Param
(
value
=
"id"
)
Integer
id
);
@SelectProvider
(
type
=
OrderGoodsSqlProvider
.
class
,
method
=
"findOrderGoodsById"
)
OrderGoodsVO
findOrderGoodsById
(
Integer
id
);
...
...
performance-web/src/main/java/com/clx/performance/sqlProvider/OrderGoodsSqlProvider.java
浏览文件 @
1ad394a3
...
...
@@ -174,17 +174,17 @@ public class OrderGoodsSqlProvider {
return
sqlList
.
toString
();
}
public
String
updateOrderGoodsSet
ResidueWeight
(
@Param
(
value
=
"residueWeight"
)
BigDecimal
residue
Weight
,
@Param
(
value
=
"id"
)
Integer
id
){
public
String
updateOrderGoodsSet
AlreadyWeight
(
@Param
(
value
=
"alreadyWeight"
)
BigDecimal
already
Weight
,
@Param
(
value
=
"id"
)
Integer
id
){
String
sql
=
new
SQL
()
{{
UPDATE
(
"order_goods"
)
.
SET
(
"
residue_transport_weight = residue
_transport_weight + #{residueWeight}"
)
.
SET
(
"
already_transport_weight = already
_transport_weight + #{residueWeight}"
)
.
WHERE
(
"id = #{id}"
);
}}.
toString
();
return
sql
;
}
public
String
updateOrderGoodsSetResidueWeight
(
@Param
(
value
=
"residueWeight"
)
BigDecimal
residueWeight
,
@Param
(
value
=
"alreadyWeight"
)
BigDecimal
alreadyWeight
,
@Param
(
value
=
"id"
)
Integer
id
){
public
String
updateOrderGoodsSetResidueWeight
AndAlreadyWeight
(
@Param
(
value
=
"residueWeight"
)
BigDecimal
residueWeight
,
@Param
(
value
=
"alreadyWeight"
)
BigDecimal
alreadyWeight
,
@Param
(
value
=
"id"
)
Integer
id
){
String
sql
=
new
SQL
()
{{
UPDATE
(
"order_goods"
)
.
SET
(
"residue_transport_weight = residue_transport_weight + #{residueWeight}"
)
...
...
performance-web/src/main/java/com/clx/performance/strategy/GoodsOrderStrategy.java
浏览文件 @
1ad394a3
...
...
@@ -44,27 +44,27 @@ public abstract class GoodsOrderStrategy {
throw
new
ServiceSystemException
(
ResultEnum
.
DATA_ERROR
,
"订单已暂停,无法进行提量"
);
}
//多个定向单不允许车辆重复
//
List<OrderGoodsChildParams> orderGoodsChildParams = orderGoodsParams.getOrderGoodsChildParams();
//
Set<String> set = new HashSet<>();
//
for (OrderGoodsChildParams item : orderGoodsChildParams) {
//
if(CollectionUtils.isNotEmpty(item.getTruckList())){
//
int lastSize = set.size() + item.getTruckList().size();
//
set.addAll(item.getTruckList());
//
if (!Objects.equals(lastSize,set.size() +item.getTruckList().size())) {
//
throw new ServiceSystemException(ResultEnum.DATA_ERROR,"定向单选择车辆重复");
//
}
//
}
//
}
//
//
if(CollectionUtils.isNotEmpty(set)){
//
OrderGoodsTruckBindDao orderGoodsTruckBindDao = SpringContextUtils.getBeanByClass(OrderGoodsTruckBindDao.class);
//
List<OrderGoodsTruckBind> binds = orderGoodsTruckBindDao.judgeTruckIsBindDxOrder(set);
//
if(CollectionUtils.isNotEmpty(binds)){
//
List<String> repeatBind = binds.stream().map(OrderGoodsTruckBind::getTruckNo).collect(Collectors.toList());
//
String trucks = String.join(", ", repeatBind);
//
throw new ServiceSystemException(ResultEnum.DATA_ERROR,"已被定向单绑定车辆:"+ trucks);
//
}
//
}
List
<
OrderGoodsChildParams
>
orderGoodsChildParams
=
orderGoodsParams
.
getOrderGoodsChildParams
();
Set
<
String
>
set
=
new
HashSet
<>();
for
(
OrderGoodsChildParams
item
:
orderGoodsChildParams
)
{
if
(
CollectionUtils
.
isNotEmpty
(
item
.
getTruckList
())){
int
lastSize
=
set
.
size
()
+
item
.
getTruckList
().
size
();
set
.
addAll
(
item
.
getTruckList
());
if
(!
Objects
.
equals
(
lastSize
,
set
.
size
()
+
item
.
getTruckList
().
size
()))
{
throw
new
ServiceSystemException
(
ResultEnum
.
DATA_ERROR
,
"定向单选择车辆重复"
);
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
set
)){
OrderGoodsTruckBindDao
orderGoodsTruckBindDao
=
SpringContextUtils
.
getBeanByClass
(
OrderGoodsTruckBindDao
.
class
);
List
<
OrderGoodsTruckBind
>
binds
=
orderGoodsTruckBindDao
.
judgeTruckIsBindDxOrder
(
set
);
if
(
CollectionUtils
.
isNotEmpty
(
binds
)){
List
<
String
>
repeatBind
=
binds
.
stream
().
map
(
OrderGoodsTruckBind:
:
getTruckNo
).
collect
(
Collectors
.
toList
());
String
trucks
=
String
.
join
(
", "
,
repeatBind
);
throw
new
ServiceSystemException
(
ResultEnum
.
DATA_ERROR
,
"已被定向单绑定车辆:"
+
trucks
);
}
}
//根据不同的订单类型创建不同的货单
LocalDateTime
sendLazyTime
=
goodsOrderProcess
(
orderGoodsParams
,
orderInfo
,
now
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论