Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
a2f49179
提交
a2f49179
authored
8月 14, 2024
作者:
刘海泉
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/test' into test
上级
6062a152
c76442da
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
94 行增加
和
48 行删除
+94
-48
NeedAlertSuperviseInfoParam.java
...lx/performance/param/app/NeedAlertSuperviseInfoParam.java
+0
-2
CarrierPageSettlementOwnerVO.java
...ce/vo/pc/carrier/settle/CarrierPageSettlementOwnerVO.java
+1
-0
AppDriverOrderChildController.java
...ormance/controller/app/AppDriverOrderChildController.java
+5
-0
TempSettlementController.java
...performance/controller/temp/TempSettlementController.java
+10
-0
TempTraceController.java
.../clx/performance/controller/temp/TempTraceController.java
+13
-7
SettlementOrderChildRiskDaoImpl.java
...ance/dao/impl/settle/SettlementOrderChildRiskDaoImpl.java
+1
-0
SettlementOwnerDetailDaoImpl.java
...ormance/dao/impl/settle/SettlementOwnerDetailDaoImpl.java
+5
-1
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+14
-16
SettlementDriverDetailServiceImpl.java
...ervice/impl/settle/SettlementDriverDetailServiceImpl.java
+1
-1
SettlementDriverServiceImpl.java
...ance/service/impl/settle/SettlementDriverServiceImpl.java
+2
-3
SettlementMqHandlerServiceImpl.java
...e/service/impl/settle/SettlementMqHandlerServiceImpl.java
+16
-2
SettlementOrderChildRiskServiceImpl.java
...vice/impl/settle/SettlementOrderChildRiskServiceImpl.java
+1
-0
SettlementOwnerServiceImpl.java
...mance/service/impl/settle/SettlementOwnerServiceImpl.java
+3
-12
GdService.java
...src/main/java/com/clx/performance/utils/gd/GdService.java
+22
-4
没有找到文件。
performance-api/src/main/java/com/clx/performance/param/app/NeedAlertSuperviseInfoParam.java
浏览文件 @
a2f49179
...
...
@@ -6,7 +6,6 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
/**
* 装车范围校验检查参数
...
...
@@ -22,7 +21,6 @@ public class NeedAlertSuperviseInfoParam {
@ApiModelProperty
(
value
=
"类型 1-监装 2-监卸"
,
example
=
"1"
)
@NotNull
(
message
=
"类型不能为空"
)
private
Integer
type
;
}
performance-api/src/main/java/com/clx/performance/vo/pc/carrier/settle/CarrierPageSettlementOwnerVO.java
浏览文件 @
a2f49179
...
...
@@ -78,6 +78,7 @@ public class CarrierPageSettlementOwnerVO {
@ApiModelProperty
(
"卸车净重(单位吨)"
)
private
BigDecimal
unloadNet
;
@MoneyOutConvert
@ApiModelProperty
(
"司机实收(分)"
)
private
BigDecimal
driverFreight
;
}
performance-web/src/main/java/com/clx/performance/controller/app/AppDriverOrderChildController.java
浏览文件 @
a2f49179
...
...
@@ -200,9 +200,14 @@ public class AppDriverOrderChildController {
public
Result
<
OrderChildLoadRangeCheckResultVO
>
loadRangeCheck
(
@RequestBody
@Validated
OrderChildLoadRangeCheckParam
param
)
{
return
orderChildService
.
loadRangeCheck
(
param
).
toResult
();
}
@ApiOperation
(
value
=
"是否需要弹出监装信息"
,
notes
=
"<br>By:姜武杰"
)
@PostMapping
(
"/needAlertSuperviseInfo"
)
public
Result
<
NeedAlertSuperviseInfoResultVO
>
needAlertSuperviseInfo
(
@RequestBody
@Validated
NeedAlertSuperviseInfoParam
param
)
{
// todo :jiangwujie 临时设置type 前端给type后删除
if
(
param
.
getType
()
==
null
)
{
param
.
setType
(
1
);
}
return
Result
.
ok
(
orderChildService
.
needAlertSuperviseInfo
(
param
));
}
...
...
performance-web/src/main/java/com/clx/performance/controller/temp/TempSettlementController.java
浏览文件 @
a2f49179
...
...
@@ -107,4 +107,14 @@ public class TempSettlementController {
return
Result
.
ok
();
}
@ApiOperation
(
value
=
"开票公司更新"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/updateInvoiceCompany"
,
method
=
RequestMethod
.
GET
)
public
Result
updateInvoiceCompany
(
Integer
id
)
{
// 发送mq (开票公司更新)
settlementMqService
.
updateInvoiceCompany
(
id
);
return
Result
.
ok
();
}
}
performance-web/src/main/java/com/clx/performance/controller/temp/TempTraceController.java
浏览文件 @
a2f49179
package
com
.
clx
.
performance
.
controller
.
temp
;
import
com.clx.performance.dto.gd.GdRouteDTO
;
import
com.clx.performance.param.mq.trace.TruckTraceSyncMqParam
;
import
com.clx.performance.esplus.model.TruckLatestPosESPlus
;
import
com.clx.performance.param.mq.trace.TruckTraceSyncMqParam
;
import
com.clx.performance.param.temp.DriverTraceAddParam
;
import
com.clx.performance.param.temp.TruckTraceAddParam
;
import
com.clx.performance.service.trace.TruckTraceMqHandlerService
;
...
...
@@ -20,12 +20,6 @@ import org.springframework.web.bind.annotation.*;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.math.BigDecimal
;
import
java.util.List
;
...
...
@@ -138,4 +132,16 @@ public class TempTraceController {
}
@ApiOperation
(
value
=
"获取车辆最新位置信息"
,
notes
=
"<br>By:姜武杰"
)
@GetMapping
(
"/calDistance"
)
public
Result
<
Integer
>
getTruckLatestPos
(
@RequestParam
(
"l1"
)
@NotNull
(
message
=
"当前经度不能为空"
)
BigDecimal
l1
,
@RequestParam
(
"l2"
)
@NotNull
(
message
=
"当前纬度不能为空"
)
BigDecimal
l2
,
@RequestParam
(
"l3"
)
@NotNull
(
message
=
"货源经度不能为空"
)
BigDecimal
l3
,
@RequestParam
(
"l4"
)
@NotNull
(
message
=
"货源纬度不能为空"
)
BigDecimal
l4
)
{
return
Result
.
ok
(
gdService
.
getShortestRouteDistance
(
l1
,
l2
,
l3
,
l4
));
}
}
performance-web/src/main/java/com/clx/performance/dao/impl/settle/SettlementOrderChildRiskDaoImpl.java
浏览文件 @
a2f49179
...
...
@@ -46,6 +46,7 @@ public class SettlementOrderChildRiskDaoImpl
.
map
(
item
->
lQrWrapper
()
.
eq
(
SettlementOrderChildRisk:
:
getChildNo
,
childNo
)
.
orderByDesc
(
SettlementOrderChildRisk:
:
getId
)
.
last
(
"limit 1"
)
)
.
map
(
super
::
getOne
);
}
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/settle/SettlementOwnerDetailDaoImpl.java
浏览文件 @
a2f49179
...
...
@@ -19,6 +19,7 @@ import com.msl.common.dao.impl.BaseDaoImpl;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Repository
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Objects
;
...
...
@@ -74,10 +75,11 @@ public class SettlementOwnerDetailDaoImpl extends BaseDaoImpl<SettlementOwnerDet
return
update
(
lUdWrapper
()
.
eq
(
SettlementOwnerDetail:
:
getId
,
item
.
getId
())
.
set
(
SettlementOwnerDetail:
:
getInvoiceType
,
item
.
getInvoiceType
())
.
set
(
SettlementOwnerDetail:
:
getInvoice
Status
,
item
.
getInvoic
eStatus
())
.
set
(
SettlementOwnerDetail:
:
getInvoice
TypeStatus
,
item
.
getInvoiceTyp
eStatus
())
.
set
(
SettlementOwnerDetail:
:
getInvoicingCompanyId
,
item
.
getInvoicingCompanyId
())
.
set
(
SettlementOwnerDetail:
:
getInvoicingCompanyShorterName
,
item
.
getInvoicingCompanyShorterName
())
.
set
(
SettlementOwnerDetail:
:
getInvoicingCompanyGroupCode
,
item
.
getInvoicingCompanyGroupCode
())
.
set
(
SettlementOwnerDetail:
:
getInvoiceTypeModifiedTime
,
item
.
getInvoiceTypeModifiedTime
())
);
}
...
...
@@ -87,6 +89,7 @@ public class SettlementOwnerDetailDaoImpl extends BaseDaoImpl<SettlementOwnerDet
.
eq
(
SettlementOwnerDetail:
:
getId
,
item
.
getId
())
.
set
(
SettlementOwnerDetail:
:
getInvoiceType
,
item
.
getInvoiceType
())
.
set
(
SettlementOwnerDetail:
:
getInvoiceFreight
,
item
.
getInvoiceFreight
())
.
set
(
SettlementOwnerDetail:
:
getInvoiceStatus
,
item
.
getInvoiceStatus
())
.
set
(
SettlementOwnerDetail:
:
getSettlementFreight
,
item
.
getSettlementFreight
())
.
set
(
SettlementOwnerDetail:
:
getFinalPaymentStatus
,
item
.
getFinalPaymentStatus
())
.
set
(
SettlementOwnerDetail:
:
getPrepayFreight
,
item
.
getPrepayFreight
())
...
...
@@ -214,6 +217,7 @@ public class SettlementOwnerDetailDaoImpl extends BaseDaoImpl<SettlementOwnerDet
update
(
lUdWrapper
()
.
in
(
SettlementOwnerDetail:
:
getChildNo
,
childNoList
)
.
set
(
SettlementOwnerDetail:
:
getInvoiceStatus
,
SettlementOwnerDetailEnum
.
InvoiceStatus
.
YES
.
getCode
())
.
set
(
SettlementOwnerDetail:
:
getInvoiceTime
,
LocalDateTime
.
now
())
);
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
a2f49179
...
...
@@ -2981,15 +2981,15 @@ public class OrderChildServiceImpl implements OrderChildService {
* @Param [truckNo, beginLongitude, beginLatitude, endLongitude, endLatitude]
* @return
**/
public
GdRouteDTO
getGdRoute
(
String
truckNo
,
BigDecimal
beginLongitude
,
BigDecimal
beginLatitude
,
public
Integer
getGdRoute
(
String
truckNo
,
BigDecimal
beginLongitude
,
BigDecimal
beginLatitude
,
BigDecimal
endLongitude
,
BigDecimal
endLatitude
)
{
List
<
GdRouteDTO
>
gdRouteDTOS
=
null
;
Integer
distance
=
null
;
try
{
gdRouteDTOS
=
gdService
.
getRout
e
(
beginLongitude
,
beginLatitude
,
endLongitude
,
endLatitude
);
distance
=
gdService
.
getShortestRouteDistanc
e
(
beginLongitude
,
beginLatitude
,
endLongitude
,
endLatitude
);
}
catch
(
ServiceSystemException
e
)
{
log
.
info
(
"orderChildExpect==高德地图调用失败,车辆{},异常原因{}"
,
truckNo
,
e
.
getMessage
());
}
return
CollectionUtils
.
isNotEmpty
(
gdRouteDTOS
)
?
gdRouteDTOS
.
get
(
0
)
:
null
;
return
distance
;
}
@Override
...
...
@@ -3198,10 +3198,8 @@ public class OrderChildServiceImpl implements OrderChildService {
if
(
longitude
==
null
||
latitude
==
null
)
{
return
new
OrderChildLoadRangeCheckResultVO
(
OrderChildEnum
.
NeedAlertEnum
.
FAIL
.
getCode
(),
TRUCK_LOCATION_ERROR
.
getCode
(),
TRUCK_LOCATION_ERROR
.
getMsg
());
}
List
<
GdRouteDTO
>
route
=
gdService
.
getRoute
(
longitude
,
latitude
,
sendLongitude
,
sendLatitude
);
if
(
CollectionUtils
.
isNotEmpty
(
route
))
{
GdRouteDTO
gdRouteDTO
=
route
.
get
(
0
);
Integer
distance
=
gdRouteDTO
.
getDistance
();
Integer
distance
=
gdService
.
getShortestRouteDistance
(
longitude
,
latitude
,
sendLongitude
,
sendLatitude
);
if
(
distance
!=
null
)
{
log
.
info
(
"truckNo:{} 高德计算距离:{} curr:{},{}, 货源地:{},{}"
,
orderChild
.
getTruckNo
(),
distance
,
longitude
,
latitude
,
sendLongitude
,
sendLatitude
);
if
(
distance
>
config
.
allowUploadDistanceMeter
())
{
// 装车位置 超限
...
...
@@ -3263,14 +3261,12 @@ public class OrderChildServiceImpl implements OrderChildService {
BigDecimal
siteLatitudeY
=
orderGoods
.
getSendLatitude
();
//调高德获取距离
if
(
Objects
.
nonNull
(
truckLongitudeX
)
&&
Objects
.
nonNull
(
truckLatitudeY
))
{
GdRouteDTO
rout
e
=
getGdRoute
(
truckNo
,
orderGoods
.
getSendLongitude
(),
orderGoods
.
getSendLatitude
(),
siteLongitudeX
,
Integer
distanc
e
=
getGdRoute
(
truckNo
,
orderGoods
.
getSendLongitude
(),
orderGoods
.
getSendLatitude
(),
siteLongitudeX
,
siteLatitudeY
);
if
(
rout
e
==
null
)
{
if
(
distanc
e
==
null
)
{
log
.
error
(
"高德获取卡车与货源地位置距离失败,orderGoodsNo:{},orderChildNo:{},truckNo:{}"
,
orderGoodsNo
,
childNo
,
truckNo
);
return
;
}
//距离
Integer
distance
=
route
.
getDistance
();
// 超出货源地+通知触发距离
if
(
distance
>
driverNoticeConfigVO
.
getNoticeTriggerDistanceMeter
())
{
if
(
Objects
.
equals
(
child
.
getExitNoticeStatus
(),
OrderChildEnum
.
ExitNoticeStatus
.
NOT_NOTIFIED
.
getCode
())
...
...
@@ -3293,8 +3289,8 @@ public class OrderChildServiceImpl implements OrderChildService {
child
.
setEnterExitSendStatus
(
OrderChildEnum
.
EnterExitSendStatus
.
DRIVE_OUT
.
getCode
());
orderChildDao
.
updateEntityByKey
(
child
);
}
}
else
{
}
else
if
(
distance
<=
1000
){
// 这里的1km的距离是产品需求写死的,不使用通知配置范围
// 未超出货源地+通知触发距离
// 驶入货源地+通知触发距离范围内了
if
(
Objects
.
equals
(
child
.
getEnterExitSendStatus
(),
OrderChildEnum
.
EnterExitSendStatus
.
DRIVE_OUT
.
getCode
()))
{
...
...
@@ -3334,7 +3330,8 @@ public class OrderChildServiceImpl implements OrderChildService {
req
.
setMobile
(
mobile
);
req
.
setContent
(
jsonObject
.
toString
());
req
.
setExpire
(
300L
);
clxMessageOpenapiFeign
.
sendAliSms
(
req
);
Result
<
String
>
result
=
clxMessageOpenapiFeign
.
sendAliSms
(
req
);
log
.
info
(
"发送上传装货信息提示短信:【当前车牌号{},运单{}未上传装车信息,请上传后再驶离货源地,如需帮助请联系客服。】,结果:{}"
,
truckNo
,
childNo
,
result
);
}
/**
...
...
@@ -3363,7 +3360,8 @@ public class OrderChildServiceImpl implements OrderChildService {
req
.
setMobile
(
mobile
);
req
.
setContent
(
jsonObject
.
toString
());
req
.
setExpire
(
300L
);
clxMessageOpenapiFeign
.
sendAliSms
(
req
);
Result
<
String
>
result
=
clxMessageOpenapiFeign
.
sendAliSms
(
req
);
log
.
info
(
"发送发送监装提示短信:【当前车牌号{},运单{}需要进行现场监装,请您前往{}进行配合,如需帮助请联系客服。】,结果:{}"
,
truckNo
,
childNo
,
supervisionAddress
,
result
);
}
private
BigDecimal
[]
getTruckLocation
(
String
truckNo
,
BigDecimal
longitude
,
BigDecimal
latitude
)
{
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementDriverDetailServiceImpl.java
浏览文件 @
a2f49179
...
...
@@ -187,7 +187,7 @@ public class SettlementDriverDetailServiceImpl implements SettlementDriverDetai
rowData
.
add
(
new
ExcelData
(
dto
.
getTruckNo
()));
rowData
.
add
(
new
ExcelData
(
dto
.
getInvoicingCompanyShorterName
()));
rowData
.
add
(
new
ExcelData
(
dto
.
getInvoiceType
()==
null
?
null
:
SettlementOwnerEnum
.
InvoiceType
.
getMsgByCode
(
dto
.
getInvoiceType
())));
rowData
.
add
(
new
ExcelData
(
SettlementDriverEnum
.
PrepayFreightFlag
.
getMsgByCode
(
dto
.
getPrepayFreightFlag
())));
rowData
.
add
(
new
ExcelData
(
dto
.
getPrepayFreightFlag
()==
null
?
null
:
SettlementDriverEnum
.
PrepayFreightFlag
.
getMsgByCode
(
dto
.
getPrepayFreightFlag
())));
rowData
.
add
(
new
ExcelData
(
dto
.
getLoanFlagMsg
()));
rowData
.
add
(
new
ExcelData
(
dto
.
getWeight
()));
rowData
.
add
(
new
ExcelData
(
dto
.
getFreightPrice
()==
null
?
null
:
dto
.
getFreightPrice
().
movePointLeft
(
2
)));
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementDriverServiceImpl.java
浏览文件 @
a2f49179
...
...
@@ -133,12 +133,11 @@ public class SettlementDriverServiceImpl implements SettlementDriverService {
rowData
.
add
(
new
ExcelData
(
vo
.
getDriverName
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getGoodsName
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getGoodsName
()));
rowData
.
add
(
new
ExcelData
(
SettlementDriverEnum
.
PrepayFreightFlag
.
getMsgByCode
(
vo
.
getPrepayFreightFlag
())));
rowData
.
add
(
new
ExcelData
(
vo
.
getPrepayFreightFlag
()==
null
?
null
:
SettlementDriverEnum
.
PrepayFreightFlag
.
getMsgByCode
(
vo
.
getPrepayFreightFlag
())));
rowData
.
add
(
new
ExcelData
(
vo
.
getLoanFlagMsg
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getTruckNo
()));
rowData
.
add
(
new
ExcelData
(
SettlementDriverEnum
.
InvoiceType
.
getMsgByCode
(
vo
.
getInvoiceType
())));
rowData
.
add
(
new
ExcelData
(
vo
.
getInvoiceType
()==
null
?
null
:
SettlementDriverEnum
.
InvoiceType
.
getMsgByCode
(
vo
.
getInvoiceType
())));
rowData
.
add
(
new
ExcelData
(
vo
.
getWeight
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getFreightPrice
()));
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementMqHandlerServiceImpl.java
浏览文件 @
a2f49179
...
...
@@ -60,6 +60,7 @@ import org.springframework.transaction.annotation.Transactional;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Slf4j
@Service
...
...
@@ -339,6 +340,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementOwnerDetail
.
setInvoiceTypeStatus
(
SettlementOwnerDetailEnum
.
InvoiceTypeStatus
.
SUCCESS
.
getCode
());
settlementOwnerDetailDao
.
updateInvoiceTypeStatus
(
settlementOwnerDetail
);
// 发送mq (运单更新)
orderChildBrokerMqService
.
orderChildUpdate
(
settlementOwnerDetail
.
getChildNo
());
// 发送mq (结算)
settlementMqService
.
settle
(
orderChild
.
getChildNo
(),
invoiceType
,
remark
);
}
...
...
@@ -374,6 +378,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
ApplicationContextUtils
.
getBean
(
SettlementOwnerService
.
class
)
.
invoicingStatusNotify
(
invoicingStatusNotifyDTO
);
// 发送mq (运单更新)
orderChildBrokerMqService
.
orderChildUpdate
(
settlementOwnerDetail
.
getChildNo
());
}
}
...
...
@@ -428,6 +435,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
// 发送mq (结算单平台自动确认)
settlementMqService
.
settlementPlatformAutoConfirmUpdate
(
settlementOwnerDetail
.
getSettlementNo
());
// 发送mq (运单更新)
orderChildBrokerMqService
.
orderChildUpdate
(
settlementOwnerDetail
.
getChildNo
());
}
else
if
(
Objects
.
equals
(
result
.
getSettleStatus
(),
3
)
)
{
SettlementOrderChildRisk
settlementOrderChildRisk
=
new
SettlementOrderChildRisk
();
...
...
@@ -797,8 +807,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementOwner
.
setUnloadNet
(
BigDecimal
.
ZERO
);
List
<
SettlementOwnerDetail
>
details
=
settlementOwnerDetailDao
.
getBySettlementNo
(
settlementOwner
.
getSettlementNo
());
details
.
forEach
(
item
->{
details
.
stream
().
filter
(
item
->!
Objects
.
equals
(
item
.
getChildNo
(),
settlementOwnerDetail
.
getChildNo
()))
.
collect
(
Collectors
.
toList
())
.
forEach
(
item
->{
settlementOwner
.
setWeight
(
settlementOwner
.
getWeight
().
add
(
item
.
getWeight
()));
settlementOwner
.
setFreight
(
settlementOwner
.
getFreight
().
add
(
item
.
getFreight
()));
settlementOwner
.
setLossWeight
(
settlementOwner
.
getLossWeight
().
add
(
item
.
getLossWeight
()));
...
...
@@ -897,6 +908,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementOwnerDetail
.
setFinalPaymentStatus
(
SettlementOwnerDetailEnum
.
FinalPaymentStatus
.
NO_REQUIRE
.
getCode
());
}
if
(
settlementOwnerDetail
.
getInvoiceFreight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
settlementOwnerDetail
.
setInvoiceStatus
(
SettlementOwnerDetailEnum
.
InvoiceStatus
.
NO_INVOICE
.
getCode
());
}
settlementDriverDetail
.
setInvoicingCompanyId
(
settlementOwnerDetail
.
getInvoicingCompanyId
());
settlementDriverDetail
.
setInvoicingCompanyShorterName
(
settlementOwnerDetail
.
getInvoicingCompanyShorterName
());
settlementDriverDetail
.
setInvoicingCompanyGroupCode
(
settlementOwnerDetail
.
getInvoicingCompanyGroupCode
());
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementOrderChildRiskServiceImpl.java
浏览文件 @
a2f49179
...
...
@@ -80,6 +80,7 @@ public class SettlementOrderChildRiskServiceImpl implements SettlementOrderChild
settlementOwnerDetail
.
setInvoicingCompanyShorterName
(
null
);
settlementOwnerDetail
.
setInvoicingCompanyGroupCode
(
null
);
settlementOwnerDetail
.
setInvoiceTypeStatus
(
SettlementOwnerDetailEnum
.
InvoiceTypeStatus
.
SUCCESS
.
getCode
());
settlementOwnerDetail
.
setInvoiceTypeModifiedTime
(
LocalDateTime
.
now
());
settlementOwnerDetailDao
.
updateConvertOrdinary
(
settlementOwnerDetail
);
settlementDriverDetail
.
setInvoiceType
(
settlementOwnerDetail
.
getInvoiceType
());
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementOwnerServiceImpl.java
浏览文件 @
a2f49179
...
...
@@ -689,18 +689,9 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
networkSyncComponent
.
ownerSettlementSync
(
settlementOwner
,
settlementOwnerDetailList
);
}
else
{
if
(
Objects
.
equals
(
settlementOwner
.
getInvoiceType
(),
SettlementOwnerEnum
.
InvoiceType
.
ORDINARY
.
getCode
())){
int
invoiceStatus
;
int
detailInvoiceStatus
;
if
(
settlementOwner
.
getInvoiceFreight
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
//结算单开票金额>0结算单填写发票物流单号以后,更新状态为“是”
invoiceStatus
=
SettlementOwnerEnum
.
InvoiceStatus
.
INVOICED
.
getCode
();
detailInvoiceStatus
=
SettlementOwnerDetailEnum
.
InvoiceStatus
.
YES
.
getCode
();
}
else
{
//结算单开票金额<=0的结算单,货主确认结算单后,更新状态为“无需开票”
invoiceStatus
=
SettlementOwnerEnum
.
InvoiceStatus
.
NO_NEED_INVOICE
.
getCode
();
detailInvoiceStatus
=
SettlementOwnerDetailEnum
.
InvoiceStatus
.
NO_INVOICE
.
getCode
();
}
settlementOwner
.
setInvoiceStatus
(
invoiceStatus
);
settlementOwnerDetailDao
.
updateInvoiceStatusBySettlementNo
(
settlementNo
,
detailInvoiceStatus
);
// 小于0不开票
if
(
settlementOwner
.
getInvoiceFreight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
settlementOwner
.
setInvoiceStatus
(
SettlementOwnerEnum
.
InvoiceStatus
.
NO_NEED_INVOICE
.
getCode
());
}
settlementOwner
.
setStatus
(
SettlementOwnerEnum
.
Status
.
COMPLETED
.
getCode
());
settlementOwnerDao
.
updateInvoiceStatusAndStatus
(
settlementOwner
);
...
...
performance-web/src/main/java/com/clx/performance/utils/gd/GdService.java
浏览文件 @
a2f49179
...
...
@@ -9,14 +9,12 @@ import com.msl.common.enums.ResultCodeEnum;
import
com.msl.common.exception.ServiceSystemException
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.dromara.easyes.common.utils.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.*
;
/**
* @Author: aiqingguo
...
...
@@ -47,6 +45,26 @@ public class GdService {
return
getRoute
(
gaodeKey
,
originLongitude
,
originLatitude
,
destinationLongitude
,
destinationLatitude
);
}
/**
* 获取最短距离路径
* @param originLongitude
* @param originLatitude
* @param destinationLongitude
* @param destinationLatitude
* @return
*/
public
Integer
getShortestRouteDistance
(
BigDecimal
originLongitude
,
BigDecimal
originLatitude
,
BigDecimal
destinationLongitude
,
BigDecimal
destinationLatitude
)
{
List
<
GdRouteDTO
>
routeList
=
getRoute
(
gaodeKey
,
originLongitude
,
originLatitude
,
destinationLongitude
,
destinationLatitude
);
if
(
CollectionUtils
.
isNotEmpty
(
routeList
))
{
Optional
<
GdRouteDTO
>
minRoute
=
routeList
.
stream
()
.
min
((
r1
,
r2
)
->
Double
.
compare
(
r1
.
getDistance
(),
r2
.
getDistance
()));
return
minRoute
.
map
(
GdRouteDTO:
:
getDistance
).
orElse
(
null
);
}
return
null
;
}
public
static
List
<
GdRouteDTO
>
getRoute
(
String
key
,
BigDecimal
originLongitude
,
BigDecimal
originLatitude
,
BigDecimal
destinationLongitude
,
BigDecimal
destinationLatitude
)
{
//log.info("高德线路规划开始");
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论