Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
836900fd
Commit
836900fd
authored
Jun 02, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
气瓶总览单个企业页面气瓶/标签数量比计算值错误修改
parent
7979d6cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
CylinderTagsDataUnitDto.java
.../boot/module/tzs/flc/api/dto/CylinderTagsDataUnitDto.java
+1
-1
CylinderTagsDataUnit.java
.../boot/module/tzs/flc/api/entity/CylinderTagsDataUnit.java
+1
-1
CylinderInfoServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+10
-5
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/dto/CylinderTagsDataUnitDto.java
View file @
836900fd
...
@@ -22,7 +22,7 @@ public class CylinderTagsDataUnitDto extends BaseDto {
...
@@ -22,7 +22,7 @@ public class CylinderTagsDataUnitDto extends BaseDto {
@ApiModelProperty
(
value
=
"气瓶标签比"
)
@ApiModelProperty
(
value
=
"气瓶标签比"
)
private
Double
tagPercent
;
private
String
tagPercent
;
@ApiModelProperty
(
value
=
"气瓶数量"
)
@ApiModelProperty
(
value
=
"气瓶数量"
)
private
Long
cylinderSum
;
private
Long
cylinderSum
;
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/entity/CylinderTagsDataUnit.java
View file @
836900fd
...
@@ -26,7 +26,7 @@ public class CylinderTagsDataUnit extends BaseEntity {
...
@@ -26,7 +26,7 @@ public class CylinderTagsDataUnit extends BaseEntity {
* 气瓶标签比
* 气瓶标签比
*/
*/
@TableField
(
"tag_percent"
)
@TableField
(
"tag_percent"
)
private
Double
tagPercent
;
private
String
tagPercent
;
/**
/**
* 气瓶数量
* 气瓶数量
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
836900fd
...
@@ -52,6 +52,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -52,6 +52,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -490,15 +491,19 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
...
@@ -490,15 +491,19 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
.
count
(
new
LambdaQueryWrapper
<
CylinderInfo
>().
eq
(
CylinderInfo:
:
getAppId
,
cylinderUnit
.
getAppId
()));
.
count
(
new
LambdaQueryWrapper
<
CylinderInfo
>().
eq
(
CylinderInfo:
:
getAppId
,
cylinderUnit
.
getAppId
()));
int
tags
=
cylinderTagsServiceImpl
int
tags
=
cylinderTagsServiceImpl
.
count
(
new
LambdaQueryWrapper
<
CylinderTags
>().
eq
(
CylinderTags:
:
getAppId
,
cylinderUnit
.
getAppId
()));
.
count
(
new
LambdaQueryWrapper
<
CylinderTags
>().
eq
(
CylinderTags:
:
getAppId
,
cylinderUnit
.
getAppId
()));
double
percent
=
0
d
;
String
percent
=
""
;
if
(
tags
!=
0
)
{
if
(
tags
!=
0
)
{
percent
=
(
double
)
cylinder
/
(
double
)
tags
;
double
zz
=
(
double
)
cylinder
/(
double
)
tags
;
BigDecimal
bg
=
new
BigDecimal
(
percent
);
DecimalFormat
df
=
new
DecimalFormat
(
"##.00%"
);
percent
=
bg
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
if
(
Math
.
abs
(
zz
)
<
0.0000000000001
)
{
percent
=
"0.00%"
;
}
else
{
percent
=
df
.
format
(
zz
);
}
}
}
temp
.
setCylinderSum
((
long
)
cylinder
);
temp
.
setCylinderSum
((
long
)
cylinder
);
temp
.
setTagsSum
((
long
)
tags
);
temp
.
setTagsSum
((
long
)
tags
);
temp
.
setTagPercent
(
percent
*
100
);
temp
.
setTagPercent
(
percent
);
cylinderTagsDataUnitServiceImpl
.
createWithModel
(
temp
);
cylinderTagsDataUnitServiceImpl
.
createWithModel
(
temp
);
});
});
}
}
...
...
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