Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MultipleSourceSecurity
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周宗顺
MultipleSourceSecurity
Commits
eaa473a6
Commit
eaa473a6
authored
Oct 30, 2025
by
Allen Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
daf19865
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
252 additions
and
158 deletions
+252
-158
PddOpenController.java
...n/java/org/ta/pddserver/controller/PddOpenController.java
+94
-99
CollectMailDetailEntity.java
...java/org/ta/pddserver/entity/CollectMailDetailEntity.java
+24
-0
CollectOutMailDetailEntity.java
...a/org/ta/pddserver/entity/CollectOutMailDetailEntity.java
+24
-0
LogOrderMailDetailEntity.java
...ava/org/ta/pddserver/entity/LogOrderMailDetailEntity.java
+24
-0
PddJYPriceTool.java
.../src/main/java/org/ta/pddserver/utils/PddJYPriceTool.java
+12
-3
PddNationalPriceTool.java
...ain/java/org/ta/pddserver/utils/PddNationalPriceTool.java
+14
-11
PddOverseaPriceTool.java
...main/java/org/ta/pddserver/utils/PddOverseaPriceTool.java
+60
-45
No files found.
PddServer/src/main/java/org/ta/pddserver/controller/PddOpenController.java
View file @
eaa473a6
This diff is collapsed.
Click to expand it.
PddServer/src/main/java/org/ta/pddserver/entity/CollectMailDetailEntity.java
View file @
eaa473a6
...
@@ -51,5 +51,29 @@ public class CollectMailDetailEntity {
...
@@ -51,5 +51,29 @@ public class CollectMailDetailEntity {
@TableField
(
value
=
"consoWarehouseCode"
)
@TableField
(
value
=
"consoWarehouseCode"
)
private
String
consoWarehouseCode
;
private
String
consoWarehouseCode
;
/**
* 状态 长
*/
@TableField
(
value
=
"length"
)
private
Integer
length
;
/**
* 状态 宽
*/
@TableField
(
value
=
"width"
)
private
Integer
width
;
/**
* 状态 高
*/
@TableField
(
value
=
"height"
)
private
Integer
height
;
/**
* 状态 重
*/
@TableField
(
value
=
"weight"
)
private
Integer
weight
;
}
}
PddServer/src/main/java/org/ta/pddserver/entity/CollectOutMailDetailEntity.java
View file @
eaa473a6
...
@@ -51,5 +51,29 @@ public class CollectOutMailDetailEntity {
...
@@ -51,5 +51,29 @@ public class CollectOutMailDetailEntity {
@TableField
(
value
=
"consoWarehouseCode"
)
@TableField
(
value
=
"consoWarehouseCode"
)
private
String
consoWarehouseCode
;
private
String
consoWarehouseCode
;
/**
* 状态 长
*/
@TableField
(
value
=
"length"
)
private
Integer
length
;
/**
* 状态 宽
*/
@TableField
(
value
=
"width"
)
private
Integer
width
;
/**
* 状态 高
*/
@TableField
(
value
=
"height"
)
private
Integer
height
;
/**
* 状态 重
*/
@TableField
(
value
=
"weight"
)
private
Integer
weight
;
}
}
PddServer/src/main/java/org/ta/pddserver/entity/LogOrderMailDetailEntity.java
View file @
eaa473a6
...
@@ -43,4 +43,28 @@ public class LogOrderMailDetailEntity {
...
@@ -43,4 +43,28 @@ public class LogOrderMailDetailEntity {
@TableField
(
value
=
"mailNo"
)
@TableField
(
value
=
"mailNo"
)
private
String
mailNo
;
private
String
mailNo
;
/**
* 状态 长
*/
@TableField
(
value
=
"length"
)
private
Integer
length
;
/**
* 状态 宽
*/
@TableField
(
value
=
"width"
)
private
Integer
width
;
/**
* 状态 高
*/
@TableField
(
value
=
"height"
)
private
Integer
height
;
/**
* 状态 重
*/
@TableField
(
value
=
"weight"
)
private
Integer
weight
;
}
}
PddServer/src/main/java/org/ta/pddserver/utils/PddJYPriceTool.java
View file @
eaa473a6
package
org
.
ta
.
pddserver
.
utils
;
package
org
.
ta
.
pddserver
.
utils
;
import
lombok.Data
;
public
class
PddJYPriceTool
{
public
class
PddJYPriceTool
{
public
static
in
t
getTotalFee
(
String
type
,
int
length
,
int
width
,
int
height
,
int
weight
,
boolean
international
)
{
public
static
FeeResul
t
getTotalFee
(
String
type
,
int
length
,
int
width
,
int
height
,
int
weight
,
boolean
international
)
{
if
(
international
)
{
if
(
international
)
{
// 国际件
// 国际件
return
0
;
int
exchange
=
1
;
// return PddOverseaPriceTool.FreightCostCalculation(type, length, width, height, weight
);
return
PddOverseaPriceTool
.
FreightCostCalculation
(
type
,
length
,
width
,
height
,
weight
,
exchange
);
}
else
{
}
else
{
// 国内件 属于退件
// 国内件 属于退件
return
PddNationalPriceTool
.
FreightCostCalculation
(
length
,
width
,
height
,
weight
);
return
PddNationalPriceTool
.
FreightCostCalculation
(
length
,
width
,
height
,
weight
);
}
}
}
}
@Data
public
static
class
FeeResult
{
int
weight
;
int
rentFee
;
int
freightFee
;
}
}
}
PddServer/src/main/java/org/ta/pddserver/utils/PddNationalPriceTool.java
View file @
eaa473a6
...
@@ -33,18 +33,21 @@ public class PddNationalPriceTool {
...
@@ -33,18 +33,21 @@ public class PddNationalPriceTool {
/*
/*
* 根据类型、重量(g) 计算运费
* 根据类型、重量(g) 计算运费
* */
* */
public
static
int
FreightCostCalculation
(
int
length
,
int
width
,
int
height
,
int
weight
)
{
public
static
PddJYPriceTool
.
FeeResult
FreightCostCalculation
(
int
length
,
int
width
,
int
height
,
int
weight
)
{
PddJYPriceTool
.
FeeResult
result
=
new
PddJYPriceTool
.
FeeResult
();
int
price
=
initalPrice
;
int
price
=
initalPrice
;
if
(
weight
<
initialWeight
)
{
if
(
weight
>
initialWeight
)
{
return
price
;
int
pw
=
weight
-
initialWeight
;
int
pc
=
pw
/
excessWeight
;
if
(
pw
%
excessWeight
!=
0
)
{
pc
+=
1
;
}
price
=
price
+
pc
*
excessPrice
;
log
.
info
(
"续重数量:{}"
,
pc
);
}
}
int
pw
=
weight
-
initialWeight
;
result
.
setRentFee
(
0
);
int
pc
=
pw
/
excessWeight
;
result
.
setFreightFee
(
price
);
if
(
pw
%
excessWeight
!=
0
)
{
result
.
setWeight
(
weight
);
pc
+=
1
;
return
result
;
}
price
=
price
+
pc
*
excessPrice
;
log
.
info
(
"续重数量:{}"
,
pc
);
return
price
;
}
}
}
}
PddServer/src/main/java/org/ta/pddserver/utils/PddOverseaPriceTool.java
View file @
eaa473a6
package
org
.
ta
.
pddserver
.
utils
;
package
org
.
ta
.
pddserver
.
utils
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
PddOverseaPriceTool
{
public
class
PddOverseaPriceTool
{
//首重重量
//
首重重量
private
static
int
initialWeight
=
1000
;
private
static
int
initialWeight
=
1000
;
//上限重量
// 基础上限重量
private
static
int
maxWeight
=
20000
;
private
static
int
baseMaxWeight
=
20000
;
// 最大重量
private
static
int
maxWeight
=
300000
;
// 普货首重价格
// 普货首重价格
private
static
int
gInitalPrice
=
1850
;
private
static
int
gInitalPrice
=
1850
;
//特货首重价格
//
特货首重价格
private
static
int
sInitalPrice
=
2800
;
private
static
int
sInitalPrice
=
2800
;
//超重计费标准
//超重计费标准
...
@@ -22,56 +21,72 @@ public class PddOverseaPriceTool {
...
@@ -22,56 +21,72 @@ public class PddOverseaPriceTool {
//超重价格
//超重价格
private
static
int
excessPrice
=
175
;
private
static
int
excessPrice
=
175
;
//标椎
三
边长度
//标椎
单
边长度
private
static
int
standard
=
100
;
private
static
int
baseSingleLength
=
100
;
//标准三边之和
//标准三边之和
private
static
int
maxStandard
=
160
;
private
static
int
baseSumLength
=
160
;
//最大单边长度
private
static
int
maxSingleLength
=
250
;
//最大三边之和
private
static
int
maxSumLength
=
250
;
/*
/*
* 根据类型、重量(g) 计算运费
* 根据类型、重量(g) 计算运费
* */
* */
public
static
Map
FreightCostCalculation
(
String
type
,
int
length
,
int
width
,
int
height
,
int
weight
,
int
exchange
)
{
public
static
PddJYPriceTool
.
FeeResult
FreightCostCalculation
(
String
type
,
int
length
,
int
width
,
int
height
,
int
weight
,
int
exchange
)
{
Map
map
=
new
HashMap
();
int
price
=
0
;
boolean
key
=
true
;
int
excess
=
0
;
int
max
=
length
+
width
+
height
;
int
max
=
length
+
width
+
height
;
if
(
length
>
maxSingleLength
||
width
>
maxSingleLength
||
height
>
maxSingleLength
||
max
>
maxSumLength
)
{
//三边各超100或者和超160
return
null
;
}
if
(
weight
>
maxWeight
)
{
//超重无法计算
return
null
;
}
PddJYPriceTool
.
FeeResult
result
=
new
PddJYPriceTool
.
FeeResult
();
int
price
=
0
;
if
(
exchange
==
2
)
{
// 改派
price
=
2400
;
}
if
(
exchange
==
3
)
{
price
=
1200
;
}
//判断边长是否符合标准
int
compWeight
=
weight
;
if
(
length
>
standard
||
width
>
standard
||
height
>
standard
||
max
>
maxStandard
)
{
if
(
weight
>
baseMaxWeight
||
length
>
baseSingleLength
||
width
>
baseSingleLength
||
height
>
baseSingleLength
||
max
>
baseSumLength
)
{
//三边各超100或者和超160
//三边各超100或者和超160
key
=
false
;
int
newWeight
=
length
*
width
*
height
/
6000
+
1
;
}
else
{
compWeight
=
Math
.
max
(
compWeight
,
newWeight
);
}
result
.
setWeight
(
compWeight
);
int
excess
=
0
;
// 判断重量是否超重
//分析重量
if
(
compWeight
>
initialWeight
)
{
//计算超出重量
compWeight
=
compWeight
-
initialWeight
;
excess
=
excessPrice
*
((
int
)
Math
.
ceil
(
compWeight
/
excessWeight
));
}
// 判断重量是否超重
//计算价格
if
(
weight
>
maxWeight
)
{
if
(
type
.
equals
(
"NORMAL"
))
{
//超重无法计算
//普货
key
=
false
;
price
=
price
+
gInitalPrice
+
excess
;
}
else
{
//分析重量
}
else
{
if
(
weight
>
initialWeight
)
{
price
=
price
+
sInitalPrice
+
excess
;
//计算超出重量
weight
=
weight
-
initialWeight
;
excess
=
excessPrice
*
((
int
)
Math
.
ceil
(
weight
/
excessWeight
));
}
}
if
(
key
)
{
//计算价格
if
(
type
.
equals
(
"NORMAL"
))
{
//普货
price
=
gInitalPrice
+
excess
;
}
else
{
price
=
sInitalPrice
+
excess
;
}
}
}
}
map
.
put
(
"price"
,
price
);
result
.
setRentFee
(
0
);
map
.
put
(
"key"
,
key
);
result
.
setFreightFee
(
price
);
return
map
;
return
result
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment