Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
f2cfcf90
提交
f2cfcf90
authored
8月 14, 2024
作者:
jiangwujie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v21.1_jianzhuang_20240807' into test
上级
56a61901
b0e9d0cb
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
58 行增加
和
18 行删除
+58
-18
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+58
-18
没有找到文件。
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
f2cfcf90
...
...
@@ -99,7 +99,9 @@ import com.tencentcloudapi.ocr.v20181119.models.ItemInfo;
import
com.tencentcloudapi.ocr.v20181119.models.SmartStructuralOCRV2Request
;
import
com.tencentcloudapi.ocr.v20181119.models.SmartStructuralOCRV2Response
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.exception.ExceptionUtils
;
...
...
@@ -1745,9 +1747,9 @@ public class OrderChildServiceImpl implements OrderChildService {
result
.
setSendSamplingPic
(
orderInfoFeign
.
getSendSamplingPic
());
result
.
setSendQualityPosition
(
orderInfoFeign
.
getSendQualityPosition
());
result
.
setSendSamplingVideo
(
orderInfoFeign
.
getSendSamplingVideo
());
Object
[]
superviseInfo
=
getSuperviseInfo
(
orderChild
.
getOrderNo
(),
orderChild
.
getChildNo
());
result
.
setSuperviseContacts
(
superviseInfo
!=
null
?
(
String
)
superviseInfo
[
0
]
:
null
);
result
.
setSuperviseMobile
(
superviseInfo
!=
null
?
(
String
)
superviseInfo
[
1
]
:
null
);
SuperviseInfo
superviseInfo
=
getSuperviseInfo
(
orderChild
.
getOrderNo
(),
orderChild
.
getChildNo
());
result
.
setSuperviseContacts
(
superviseInfo
!=
null
?
superviseInfo
.
getSuperviseContacts
()
:
null
);
result
.
setSuperviseMobile
(
superviseInfo
!=
null
?
superviseInfo
.
getSuperviseMobile
()
:
null
);
//查询结算信息
Optional
<
SettlementOwnerDetail
>
optional
=
settlementOwnerDetailDao
.
getByChildNo
(
childNo
);
...
...
@@ -1777,6 +1779,15 @@ public class OrderChildServiceImpl implements OrderChildService {
return
result
;
}
@Data
@AllArgsConstructor
@NoArgsConstructor
static
class
SuperviseInfo
{
private
String
superviseContacts
;
private
String
superviseMobile
;
private
String
taskAddress
;
}
/**
* todo 要改成两个
* 获取监装
...
...
@@ -1784,7 +1795,7 @@ public class OrderChildServiceImpl implements OrderChildService {
* @param childNo
* @return
*/
private
Object
[]
getSuperviseInfo
(
String
orderNo
,
String
childNo
)
{
private
SuperviseInfo
getSuperviseInfo
(
String
orderNo
,
String
childNo
)
{
NeedAlertSuperviseInfoResultVO
result
=
new
NeedAlertSuperviseInfoResultVO
();
App
app
=
appConfig
.
getPurchaseManageApp
();
//对接马上来供应链配置信息
//组装配置信息
...
...
@@ -1801,7 +1812,39 @@ public class OrderChildServiceImpl implements OrderChildService {
return
null
;
}
SupervisionLoadInfoDto
supervisionLoadInfo
=
supervisionLoadInfoDto
.
getData
();
//监装信息
if
(
Objects
.
nonNull
(
supervisionLoadInfo
))
{
//有监装信息
if
(
Objects
.
isNull
(
supervisionLoadInfo
))
{
//有监装信息
return
null
;
}
//通过运单号查询监装监卸子任务状态
return
new
SuperviseInfo
(
supervisionLoadInfo
.
getTaskContracts
(),
supervisionLoadInfo
.
getTaskMobile
(),
supervisionLoadInfo
.
getTaskAddress
());
}
/**
* 获取监装
* @param orderNo
* @param childNo
* @return
*/
private
SuperviseInfo
getSuperviseInfoWithSubStatus
(
String
orderNo
,
String
childNo
)
{
NeedAlertSuperviseInfoResultVO
result
=
new
NeedAlertSuperviseInfoResultVO
();
App
app
=
appConfig
.
getPurchaseManageApp
();
//对接马上来供应链配置信息
//组装配置信息
RequestConfig
config
=
new
RequestConfig
()
.
setAppId
(
app
.
getAppNo
())
.
setAppKey
(
app
.
getAppKey
())
.
setGatewayUrl
(
app
.
getCallback
());
//通过订单号查询监装监卸信息
SupplyChainSupervisionLoadAction
action
=
new
SupplyChainSupervisionLoadAction
();
action
.
setOrderNo
(
orderNo
);
action
.
setType
(
OrderChildEnum
.
SuperviseTypeEnum
.
SUPERVISE_LOAD
.
getCode
());
Result
<
SupervisionLoadInfoDto
>
supervisionLoadInfoDto
=
OpenClient
.
doAction
(
config
,
action
);
if
(!
supervisionLoadInfoDto
.
succeed
())
{
//接口调用失败
return
null
;
}
SupervisionLoadInfoDto
supervisionLoadInfo
=
supervisionLoadInfoDto
.
getData
();
//监装信息
if
(
Objects
.
isNull
(
supervisionLoadInfo
))
{
//有监装信息
return
null
;
}
//通过运单号查询监装监卸子任务状态
SupplyChainSupervisionLoadTruckAction
truckAction
=
new
SupplyChainSupervisionLoadTruckAction
();
truckAction
.
setChildNo
(
childNo
);
...
...
@@ -1811,15 +1854,11 @@ public class OrderChildServiceImpl implements OrderChildService {
return
null
;
}
SupervisionLoadTruckInfoDto
supervisionLoadTruckInfo
=
supervisionLoadTruckInfoDto
.
getData
();
if
(
Objects
.
nonNull
(
supervisionLoadTruckInfo
))
{
if
(
supervisionLoadTruckInfo
.
getLoadStatus
())
{
return
new
Object
[]{
supervisionLoadInfo
.
getTaskContracts
(),
supervisionLoadInfo
.
getTaskMobile
(),
supervisionLoadInfo
.
getTaskAddress
()};
}
}
}
if
(
Objects
.
isNull
(
supervisionLoadTruckInfo
)
||
!
supervisionLoadTruckInfo
.
getLoadStatus
())
{
return
null
;
}
return
new
SuperviseInfo
(
supervisionLoadInfo
.
getTaskContracts
(),
supervisionLoadInfo
.
getTaskMobile
(),
supervisionLoadInfo
.
getTaskAddress
());
}
//查看运单车辆是否开启了中交兴路
public
String
isOpenZJXL
(
Integer
orderChildStatus
,
String
truckNo
){
...
...
@@ -3248,8 +3287,8 @@ public class OrderChildServiceImpl implements OrderChildService {
truckLatitudeY
=
truckTraceDTO
.
getLocation
()[
1
];
}
if
(
truckLongitudeX
==
null
||
truckLatitudeY
==
null
)
{
log
.
info
(
"运单号:{},卡车:{},卡车经纬度:{}"
,
childNo
,
truckNo
,
truckTraceDTO
);
BigDecimal
[]
location
=
truckTraceService
.
getCurrentPosition
(
truckNo
,
driverUserNo
);
log
.
info
(
"运单号:{},卡车:{},卡车经纬度:{}"
,
childNo
,
truckNo
,
location
);
if
(
location
!=
null
&&
location
.
length
>
2
)
{
truckLongitudeX
=
location
[
0
];
truckLatitudeY
=
location
[
1
];
...
...
@@ -3262,7 +3301,9 @@ public class OrderChildServiceImpl implements OrderChildService {
BigDecimal
siteLatitudeY
=
orderGoods
.
getSendLatitude
();
log
.
info
(
"运单号:{},卡车:{},status:{},站点经度:{},站点纬度:{},卡车经度:{},卡车纬度:{}"
,
childNo
,
truckNo
,
child
.
getStatus
(),
siteLongitudeX
,
siteLatitudeY
,
truckLongitudeX
,
truckLatitudeY
);
//调高德获取距离
if
(
Objects
.
nonNull
(
truckLongitudeX
)
&&
Objects
.
nonNull
(
truckLatitudeY
))
{
if
(
Objects
.
isNull
(
truckLongitudeX
)
||
Objects
.
isNull
(
truckLatitudeY
))
{
continue
;
}
Integer
distance
=
getGdRoute
(
truckNo
,
orderGoods
.
getSendLongitude
(),
orderGoods
.
getSendLatitude
(),
siteLongitudeX
,
siteLatitudeY
);
if
(
distance
==
null
)
{
...
...
@@ -3283,11 +3324,11 @@ public class OrderChildServiceImpl implements OrderChildService {
}
// 已装货
if
(
Objects
.
equals
(
child
.
getStatus
(),
OrderChildEnum
.
Status
.
LOAD
.
getCode
()))
{
Object
[]
superviseInfo
=
getSuperviseInfo
(
child
.
getOrderNo
(),
child
.
getChildNo
());
SuperviseInfo
superviseInfo
=
getSuperviseInfoWithSubStatus
(
child
.
getOrderNo
(),
child
.
getChildNo
());
log
.
info
(
"运单号:{},卡车:{},监装信息{}"
,
childNo
,
truckNo
,
superviseInfo
);
if
(
superviseInfo
!=
null
)
{
log
.
info
(
"{}超出货源地x公里范围了,运单{}为装货成功状态,发送短信"
,
truckNo
,
childNo
);
sendSupervisionSms
(
child
.
getDriverMobile
(),
child
.
getTruckNo
(),
child
.
getChildNo
(),
(
String
)
superviseInfo
[
2
]
);
sendSupervisionSms
(
child
.
getDriverMobile
(),
child
.
getTruckNo
(),
child
.
getChildNo
(),
superviseInfo
.
getTaskAddress
()
);
}
}
// 修改 通知状态 为已通知
...
...
@@ -3296,7 +3337,7 @@ public class OrderChildServiceImpl implements OrderChildService {
orderChildDao
.
updateEntityByKey
(
child
);
}
}
else
if
(
distance
<=
1000
)
{
log
.
info
(
"运单号:{},卡车:{},status:{},站点经度:{},站点纬度:{},卡车经度:{},卡车纬度:{},距离:{} 距离小于1km"
,
orderGoods
No
,
truckNo
,
child
.
getStatus
(),
siteLongitudeX
,
siteLatitudeY
,
truckLongitudeX
,
truckLatitudeY
,
distance
);
log
.
info
(
"运单号:{},卡车:{},status:{},站点经度:{},站点纬度:{},卡车经度:{},卡车纬度:{},距离:{} 距离小于1km"
,
child
No
,
truckNo
,
child
.
getStatus
(),
siteLongitudeX
,
siteLatitudeY
,
truckLongitudeX
,
truckLatitudeY
,
distance
);
// 这里的1km的距离是产品需求写死的,不使用通知配置范围
// 未超出货源地+通知触发距离
// 驶入货源地+通知触发距离范围内了
...
...
@@ -3313,7 +3354,6 @@ public class OrderChildServiceImpl implements OrderChildService {
}
}
}
}
/**
* 发送上传装货信息短信
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论