Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
15c948b7
Commit
15c948b7
authored
Jun 20, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-20提交
parent
4859b972
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
BoxMergePkgServiceImpl.java
.../shipment/service/boxMergePkg/BoxMergePkgServiceImpl.java
+25
-0
BoxMergePkgController.java
...dule/shipment/controller/admin/BoxMergePkgController.java
+4
-1
No files found.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxMergePkg/BoxMergePkgServiceImpl.java
View file @
15c948b7
...
...
@@ -62,6 +62,7 @@ import org.springframework.validation.annotation.Validated;
import
javax.annotation.Resource
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -401,7 +402,31 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
public
BoxMergePkgDO
getMergePkgInfoById
(
Long
id
)
{
BoxMergePkgDO
boxMergePkgDO
=
boxMergePkgMapper
.
selectById
(
id
);
if
(
boxMergePkgDO
.
getSumVolume
()
==
null
)
{
//lanbm 2024-06-20注释掉
boxMergePkgDO
=
boxMergePkgMapper
.
getMergePkgInfoById
(
id
);
//根据长宽高计算箱的体积
if
(
boxMergePkgDO
.
getPkgHight
()
==
null
)
{
boxMergePkgDO
.
setPkgHight
(
new
BigDecimal
(
0
));
}
if
(
boxMergePkgDO
.
getPkgWidth
()
==
null
)
{
boxMergePkgDO
.
setPkgWidth
(
new
BigDecimal
(
0
));
}
if
(
boxMergePkgDO
.
getPkgLength
()==
null
)
{
boxMergePkgDO
.
setPkgLength
(
new
BigDecimal
(
0
));
}
BigDecimal
v
=
boxMergePkgDO
.
getPkgHight
().
multiply
(
new
BigDecimal
(
0.01
)).
multiply
(
boxMergePkgDO
.
getPkgLength
()).
multiply
(
new
BigDecimal
(
0.01
)).
multiply
(
boxMergePkgDO
.
getPkgWidth
()
).
multiply
(
new
BigDecimal
(
0.01
));
//四舍五入
BigDecimal
v2
=
v
.
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
);
boxMergePkgDO
.
setSumVolume
(
v2
);
}
return
boxMergePkgDO
;
}
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/BoxMergePkgController.java
View file @
15c948b7
...
...
@@ -58,6 +58,7 @@ public class BoxMergePkgController {
@ApiOperation
(
"更新合包箱"
)
//@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:update')")
public
CommonResult
<
Boolean
>
updateBoxMergePkg
(
@Valid
@RequestBody
BoxMergePkgUpdateReqVO
updateReqVO
)
{
//lanbm 2024-06-20 添加注释
boxMergePkgService
.
updateBoxMergePkg
(
updateReqVO
);
return
success
(
true
);
}
...
...
@@ -140,7 +141,9 @@ public class BoxMergePkgController {
@ApiOperation
(
"获得封箱数据"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
//@PreAuthorize("@ss.hasPermission('ecw:box-pkg-order:query')")
public
CommonResult
<
BoxMergePkgBackVO
>
getMergePkgInfoById
(
@RequestParam
(
"id"
)
Long
id
)
{
public
CommonResult
<
BoxMergePkgBackVO
>
getMergePkgInfoById
(
@RequestParam
(
"id"
)
Long
id
)
{
//lanbm 2024-06-20 添加注释
BoxMergePkgDO
boxMergePkgBackVO
=
boxMergePkgService
.
getMergePkgInfoById
(
id
);
return
success
(
BoxMergePkgConvert
.
INSTANCE
.
convert
(
boxMergePkgBackVO
));
}
...
...
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