Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
a6bf27f0
提交
a6bf27f0
authored
8月 08, 2024
作者:
刘海泉
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/v20.8_add_sub_weight_20240805' into dev
上级
7b20e9d2
1b531d9c
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
7 行增加
和
26 行删除
+7
-26
PerformanceFeign.java
...main/java/com/clx/performance/feign/PerformanceFeign.java
+2
-1
OrderGoodsDao.java
.../src/main/java/com/clx/performance/dao/OrderGoodsDao.java
+0
-2
OrderGoodsDaoImpl.java
.../java/com/clx/performance/dao/impl/OrderGoodsDaoImpl.java
+0
-6
OrderGoodsMapper.java
...ain/java/com/clx/performance/mapper/OrderGoodsMapper.java
+0
-7
OrderGoodsSqlProvider.java
...om/clx/performance/sqlProvider/OrderGoodsSqlProvider.java
+5
-10
没有找到文件。
performance-api/src/main/java/com/clx/performance/feign/PerformanceFeign.java
浏览文件 @
a6bf27f0
...
...
@@ -11,6 +11,7 @@ import com.clx.performance.param.pc.owner.ThawAccountParam;
import
com.clx.performance.param.pc.owner.UpdateStatusParam
;
import
com.clx.performance.vo.app.collect.AppCollectTruckVO
;
import
com.clx.performance.vo.feign.FreightEstimateVO
;
import
com.clx.performance.vo.feign.OrderExtractWeightVO
;
import
com.clx.performance.vo.feign.OrderGoodsFeignVO
;
import
com.clx.performance.vo.feign.PlatformServiceFeeConfigFeignVO
;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
...
...
@@ -158,7 +159,7 @@ public interface PerformanceFeign {
@GetMapping
(
value
=
{
"clx-performance/feign/order/weight/getOrderResidueWeight"
})
Result
<
BigDecimal
>
getOrderResidueWeight
(
@RequestParam
(
"orderNo"
)
String
orderNo
);
Result
<
OrderExtractWeightVO
>
getOrderResidueWeight
(
@RequestParam
(
"orderNo"
)
String
orderNo
);
...
...
performance-web/src/main/java/com/clx/performance/dao/OrderGoodsDao.java
浏览文件 @
a6bf27f0
...
...
@@ -16,7 +16,6 @@ import com.clx.performance.vo.app.OrderGoodsAPPVO;
import
com.clx.performance.vo.pc.OrderGoodsVO
;
import
com.msl.common.base.Optional
;
import
com.msl.common.dao.BaseDao
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
...
...
@@ -28,7 +27,6 @@ import java.util.List;
* Time 16:45
*/
public
interface
OrderGoodsDao
extends
BaseDao
<
OrderGoodsMapper
,
OrderGoods
,
Integer
>
{
boolean
updateWeight
(
@Param
(
"orderId"
)
Integer
orderId
,
@Param
(
"weight"
)
BigDecimal
weight
);
String
getMaxOrderGoodsId
();
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/OrderGoodsDaoImpl.java
浏览文件 @
a6bf27f0
...
...
@@ -20,7 +20,6 @@ import com.clx.performance.vo.app.OrderGoodsAPPVO;
import
com.clx.performance.vo.pc.OrderGoodsVO
;
import
com.msl.common.base.Optional
;
import
com.msl.common.dao.impl.BaseDaoImpl
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.math.BigDecimal
;
...
...
@@ -35,11 +34,6 @@ import java.util.List;
@Repository
public
class
OrderGoodsDaoImpl
extends
BaseDaoImpl
<
OrderGoodsMapper
,
OrderGoods
,
Integer
>
implements
OrderGoodsDao
{
@Override
public
boolean
updateWeight
(
@Param
(
"orderId"
)
Integer
orderId
,
@Param
(
"weight"
)
BigDecimal
weight
)
{
return
baseMapper
.
updateWeight
(
orderId
,
weight
)
>
0
;
}
@Override
public
String
getMaxOrderGoodsId
()
{
return
baseMapper
.
getMaxOrderGoodsId
();
...
...
performance-web/src/main/java/com/clx/performance/mapper/OrderGoodsMapper.java
浏览文件 @
a6bf27f0
...
...
@@ -26,11 +26,6 @@ import java.util.List;
*/
public
interface
OrderGoodsMapper
extends
BaseMapper
<
OrderGoods
>
{
@Update
(
" update order_goods set "
+
" residue_transport_weight = residue_transport_weight-#{weight} "
+
" where id = #{orderId}"
)
int
updateWeight
(
@Param
(
"orderId"
)
Integer
orderId
,
@Param
(
"weight"
)
BigDecimal
weight
);
@SelectProvider
(
type
=
OrderGoodsSqlProvider
.
class
,
method
=
"getMaxOrderGoodsId"
)
String
getMaxOrderGoodsId
();
...
...
@@ -38,14 +33,12 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
IPage
<
OrderGoodsVO
>
pageOrderGoodsList
(
@Param
(
"page"
)
Page
<
OrderGoodsVO
>
page
,
@Param
(
"param"
)
PageOrderGoodsListParam
param
);
@Update
(
" update order_goods set "
+
" residue_transport_weight = residue_transport_weight-#{weight},"
+
" already_transport_weight = already_transport_weight+#{weight},"
+
"order_goods_status = #{orderGoodsStatus} "
+
" where id = #{id}"
)
void
updateOrderGoodsWeightAndStatus
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"weight"
)
BigDecimal
orderChildWeight
,
@Param
(
"orderGoodsStatus"
)
Integer
orderGoodsStatus
);
@Update
(
" update order_goods set "
+
" residue_transport_weight = residue_transport_weight-#{residueTransportWeight},"
+
" already_transport_weight = already_transport_weight+#{alreadyTransportWeight},"
+
"order_goods_status = #{orderGoodsStatus} "
+
" where id = #{id}"
)
...
...
performance-web/src/main/java/com/clx/performance/sqlProvider/OrderGoodsSqlProvider.java
浏览文件 @
a6bf27f0
...
...
@@ -118,7 +118,7 @@ public class OrderGoodsSqlProvider {
}
WHERE
(
"a.last_arrive_send_time >= now()"
);
WHERE
(
"a.order_goods_status IN ( "
+
OrderGoodsStatusEnum
.
Status
.
PAYING
.
getCode
()+
","
+
OrderGoodsStatusEnum
.
Status
.
GO_TO_SEND
.
getCode
()+
")"
);
WHERE
(
"
a.residue_transport_weight
> 0"
);
WHERE
(
"
IFNULL(a.extract_weight,0) - IFNULL(a.already_transport_weight,0)
> 0"
);
ORDER_BY
(
"a.pending_order_time desc"
);
}}.
toString
();
return
sql
;
...
...
@@ -134,7 +134,7 @@ public class OrderGoodsSqlProvider {
WHERE
(
" a.pending_order_way = "
+
PendingOrderWayStatusEnum
.
Status
.
FLEET_GK
.
getCode
());
WHERE
(
"a.last_arrive_send_time >= now()"
);
WHERE
(
"a.order_goods_status IN ( "
+
OrderGoodsStatusEnum
.
Status
.
PAYING
.
getCode
()+
","
+
OrderGoodsStatusEnum
.
Status
.
GO_TO_SEND
.
getCode
()+
")"
);
WHERE
(
"
a.residue_transport_weight
> 0"
);
WHERE
(
"
IFNULL(a.extract_weight,0) - IFNULL(a.already_transport_weight,0)
> 0"
);
WHERE
(
"b.id is not null"
);
}}.
toString
();
return
sql
;
...
...
@@ -161,7 +161,7 @@ public class OrderGoodsSqlProvider {
"a.pending_order_freight,a.user_no,a.user_name from order_goods a "
+
"where a.stop_flag = "
+
OrderGoodsStopEnum
.
Status
.
NO
.
getCode
()+
" and a.last_arrive_send_time >= now() and (a.order_goods_status = "
+
OrderGoodsStatusEnum
.
Status
.
PAYING
.
getCode
()+
" or a.order_goods_status = "
+
OrderGoodsStatusEnum
.
Status
.
GO_TO_SEND
.
getCode
()+
")"
+
"and
a.residue_transport_weight
> 0"
+
"and
IFNULL(a.extract_weight,0) - IFNULL(a.already_transport_weight,0)
> 0"
+
" and a.pending_order_way in ( "
+
PendingOrderWayStatusEnum
.
Status
.
DX
.
getCode
()+
","
+
PendingOrderWayStatusEnum
.
Status
.
FLEET_DX
.
getCode
()+
") and a.order_goods_no in ("
);
...
...
@@ -226,7 +226,6 @@ public class OrderGoodsSqlProvider {
public
String
updateOrderGoodsSetResidueWeightAndAlreadyWeight
(
@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}"
)
.
SET
(
"already_transport_weight = already_transport_weight - #{alreadyWeight}"
)
.
WHERE
(
"id = #{id}"
);
...
...
@@ -266,7 +265,6 @@ public class OrderGoodsSqlProvider {
UPDATE
(
"order_goods"
)
.
SET
(
"vehicle_usage = #{params.vehicleUsage}"
)
.
SET
(
"extract_weight = #{params.extractWeight}"
)
.
SET
(
"residue_transport_weight = #{params.residueTransportWeight}"
)
.
SET
(
"pending_order_way = #{params.pendingOrderWay}"
)
.
SET
(
"last_order_time = #{params.lastOrderTime}"
)
.
SET
(
"last_arrive_send_time = #{params.lastArriveSendTime}"
)
...
...
@@ -287,7 +285,6 @@ public class OrderGoodsSqlProvider {
public
String
updateOrderGoodsSetResidueWeightAndAlreadyWeightAndStatus
(
@Param
(
value
=
"residueWeight"
)
BigDecimal
residueWeight
,
@Param
(
value
=
"alreadyWeight"
)
BigDecimal
alreadyWeight
,
@Param
(
value
=
"status"
)
Integer
status
,
@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 - #{alreadyWeight}"
)
.
SET
(
"order_goods_status = #{status}"
)
...
...
@@ -354,7 +351,7 @@ public class OrderGoodsSqlProvider {
WHERE
(
"a.stop_flag = "
+
OrderGoodsStopEnum
.
Status
.
NO
.
getCode
());
WHERE
(
"a.last_arrive_send_time >= now()"
);
WHERE
(
"(a.order_goods_status = "
+
OrderGoodsStatusEnum
.
Status
.
PAYING
.
getCode
()+
" or a.order_goods_status = "
+
OrderGoodsStatusEnum
.
Status
.
GO_TO_SEND
.
getCode
()+
")"
);
WHERE
(
"
a.residue_transport_weight >=35
"
);
WHERE
(
"
IFNULL(a.extract_weight,0) - IFNULL(a.already_transport_weight,0) > 0
"
);
if
(
ObjectUtil
.
isNotNull
(
param
.
getSearchType
()))
{
if
(
1
==
param
.
getSearchType
())
{
WHERE
(
"a.send_address_shorter like '%"
+
param
.
getSearchName
()
+
"%'"
);
...
...
@@ -371,8 +368,7 @@ public class OrderGoodsSqlProvider {
public
String
batchCancelOrderGoods
(
List
<
CancelOrderGoodsWeightDTO
>
cancelOrderGoodsWeight
){
StringJoiner
sj
=
new
StringJoiner
(
"; "
);
for
(
CancelOrderGoodsWeightDTO
item
:
cancelOrderGoodsWeight
){
sj
.
add
(
"update order_goods set residue_transport_weight = residue_transport_weight +"
+
item
.
getCancelWeight
()
+
", already_transport_weight = already_transport_weight -"
+
item
.
getCancelWeight
()
+
sj
.
add
(
"update order_goods set already_transport_weight = already_transport_weight -"
+
item
.
getCancelWeight
()
+
" where order_goods_no = '"
+
item
.
getOrderGoodsNo
()
+
"'"
)
;
}
return
sj
.
toString
();
...
...
@@ -400,7 +396,6 @@ public class OrderGoodsSqlProvider {
for
(
OrderGoodsCancelWeightDTO
dto
:
list
){
sj
.
add
(
"update order_goods "
+
"set "
+
"residue_transport_weight = residue_transport_weight + "
+
dto
.
getWeight
()
+
","
+
"already_transport_weight = already_transport_weight - "
+
dto
.
getWeight
()
+
" "
+
"where order_goods_no = '"
+
dto
.
getOrderGoodsNo
()+
"'"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论