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
a8d81784
Commit
a8d81784
authored
Jul 11, 2024
by
刘凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改:统计新增操作人界数据
parent
9611b135
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
7 deletions
+49
-7
CylinderAreaDataMapper.java
...odule/cylinder/flc/api/mapper/CylinderAreaDataMapper.java
+2
-0
CylinderAreaDataMapper.xml
...-api/src/main/resources/mapper/CylinderAreaDataMapper.xml
+18
-0
CylinderInfoController.java
...e/cylinder/flc/biz/controller/CylinderInfoController.java
+1
-1
CylinderAreaDataServiceImpl.java
...der/flc/biz/service/impl/CylinderAreaDataServiceImpl.java
+28
-6
No files found.
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/mapper/CylinderAreaDataMapper.java
View file @
a8d81784
...
...
@@ -44,4 +44,6 @@ public interface CylinderAreaDataMapper extends BaseMapper<CylinderAreaData> {
List
<
CylinderInfoStatisticsDto
>
getCylinderStatisticsDataByCity
(
String
orgCode
);
List
<
Map
<
String
,
Object
>>
getQiZhanStatisticsDataByCity
(
@Param
(
value
=
"orgCodes"
)
List
<
String
>
orgCodes
);
Long
getOpertorStatisticsDataByCity
(
@Param
(
value
=
"orgCodes"
)
List
<
String
>
orgCodes
);
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/resources/mapper/CylinderAreaDataMapper.xml
View file @
a8d81784
...
...
@@ -141,4 +141,22 @@
a.orgCode
</select>
<select
id=
"getOpertorStatisticsDataByCity"
resultType=
"Long"
>
SELECT
count(1)
FROM
tz_base_enterprise_info u
RIGHT JOIN tzs_user_info ui ON ui.unit_code = u.use_code
WHERE
u.data_sources = '陕西省内企业'
AND u.unit_type LIKE'%充装单位%'
AND ui.post like '%"6552"%'
<if
test=
"orgCodes != null and orgCodes.size > 0"
>
AND
<foreach
collection=
"orgCodes"
open=
"("
item=
"orgCode"
close=
")"
separator=
" or "
>
(u.org_code like concat(#{orgCode}, '%') )
</foreach>
</if>
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/controller/CylinderInfoController.java
View file @
a8d81784
...
...
@@ -1464,7 +1464,7 @@ public class CylinderInfoController extends BaseController {
public
ResponseModel
<
IPage
<
CylinderFillingMessageModel
>>
getUploadCylinderLogs
(
PageParam
pageParam
,
String
regionCode
)
{
IPage
<
CylinderFillingMessageModel
>
result
=
cylinderFillingMessageService
.
getUploadCylinderLogs
(
pageParam
,
regionCode
);
return
ResponseHelper
.
buildResponse
(
result
);
}
;
}
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/service/impl/CylinderAreaDataServiceImpl.java
View file @
a8d81784
...
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
joptsimple.internal.Strings
;
import
org.apache.lucene.search.comparators.DoubleComparator
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.client.RequestOptions
;
...
...
@@ -599,7 +600,7 @@ public class CylinderAreaDataServiceImpl extends BaseService<CylinderAreaDataDto
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"cylindersCount"
,
qiping
);
result
.
put
(
"stationCount"
,
unitNumber
);
result
.
put
(
"operatorCount"
,
0
);
result
.
put
(
"operatorCount"
,
this
.
baseMapper
.
getOpertorStatisticsDataByCity
(
orgCodes
)
);
return
result
;
}
...
...
@@ -735,9 +736,12 @@ public class CylinderAreaDataServiceImpl extends BaseService<CylinderAreaDataDto
}
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"xdata"
,
xdata
);
List
<
String
>
ydata
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
data
=
new
ArrayList
<>();
// List<String> ydata = new ArrayList<>();
for
(
int
i
=
0
;
i
<
xdata
.
size
();
i
++)
{
Map
<
String
,
String
>
item
=
new
HashMap
<>();
item
.
put
(
"name"
,
xdata
.
get
(
i
));
// 计算xuke的加权值
double
xukeWeighted
=
Double
.
parseDouble
(
xuke
.
get
(
i
))
*
0.10
;
// 10%
...
...
@@ -753,10 +757,27 @@ public class CylinderAreaDataServiceImpl extends BaseService<CylinderAreaDataDto
// 计算总指数
double
totalIndex
=
xukeWeighted
+
jianyanchaoqiWeighted
+
jianyanhegeWeighted
+
czjcWeighted
+
czjchegeWeighted
;
ydata
.
add
(
String
.
format
(
"%.2f"
,
totalIndex
));
item
.
put
(
"value"
,
String
.
format
(
"%.2f"
,
totalIndex
));
data
.
add
(
item
);
// ydata.add(String.format("%.2f", totalIndex));
}
result
.
put
(
"ydata"
,
ydata
);
data
=
data
.
stream
()
.
filter
(
map
->
map
.
containsKey
(
"value"
))
// 确保每个Map都包含指定的键
.
sorted
(
Comparator
.
comparingDouble
(
map
->
{
// 检查并解析值,如果失败则返回Double.MIN_VALUE(或根据需要处理)
try
{
return
Double
.
parseDouble
(
map
.
get
(
"value"
));
}
catch
(
NumberFormatException
e
)
{
// 处理无法解析为double的情况,这里返回Double.MIN_VALUE表示最小
// 或者可以抛出自定义异常,记录日志等
return
Double
.
MIN_VALUE
;
}
}))
.
collect
(
Collectors
.
toList
());
result
.
put
(
"xdata"
,
data
.
stream
().
map
(
map
->
map
.
get
(
"name"
)).
collect
(
Collectors
.
toList
()));
result
.
put
(
"ydata"
,
data
.
stream
().
map
(
map
->
map
.
get
(
"value"
)).
collect
(
Collectors
.
toList
()));
return
result
;
}
}
\ No newline at end of file
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