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
cc92e3b3
Commit
cc92e3b3
authored
Nov 24, 2022
by
zhengjuzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管材统计修改
parent
f55256b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
10 deletions
+21
-10
MaterialMapper.java
...ejoin/amos/boot/module/ugp/api/mapper/MaterialMapper.java
+4
-1
MaterialMapper.xml
...dule-ugp-api/src/main/resources/mapper/MaterialMapper.xml
+6
-2
MaterialController.java
...os/boot/module/ugp/biz/controller/MaterialController.java
+2
-1
MaterialServiceImpl.java
...boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
+9
-6
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/MaterialMapper.java
View file @
cc92e3b3
...
...
@@ -14,5 +14,8 @@ import java.util.Map;
*/
public
interface
MaterialMapper
extends
BaseMapper
<
Material
>
{
List
<
Map
<
String
,
Long
>>
pipeManufacturerStatistics
();
List
<
String
>
pipeManufacturerStatisticsToaXisData
();
List
<
String
>
pipeManufacturerStatisticsToaSeriesData
();
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/MaterialMapper.xml
View file @
cc92e3b3
...
...
@@ -2,8 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ugp.api.mapper.MaterialMapper"
>
<select
id=
"pipeManufacturerStatistics"
resultType=
"java.util.Map"
>
SELECT manufacture_addr as axisData ,COUNT(1) as seriesData FROM tz_ugp_material GROUP BY manufacture_addr
<select
id=
"pipeManufacturerStatisticsToaXisData"
resultType=
"java.lang.String"
>
SELECT manufacture_addr as axisData FROM tz_ugp_material GROUP BY manufacture_addr
</select>
<select
id=
"pipeManufacturerStatisticsToaSeriesData"
resultType=
"java.lang.String"
>
SELECT COUNT(1) as seriesData FROM tz_ugp_material GROUP BY manufacture_addr
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/MaterialController.java
View file @
cc92e3b3
...
...
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -239,7 +240,7 @@ public class MaterialController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/pipeManufacturer"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管材厂家统计"
,
notes
=
"管材厂家统计"
)
public
ResponseModel
<
List
<
Map
<
String
,
Lo
ng
>>>
pipeManufacturerStatistics
()
{
public
ResponseModel
<
Map
<
String
,
List
<
Stri
ng
>>>
pipeManufacturerStatistics
()
{
return
ResponseHelper
.
buildResponse
(
materialServiceImpl
.
pipeManufacturerStatistics
());
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
View file @
cc92e3b3
...
...
@@ -21,10 +21,7 @@ import org.springframework.stereotype.Service;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* 材料信息表服务实现类
...
...
@@ -178,7 +175,12 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
return
material
;
}
public
List
<
Map
<
String
,
Long
>>
pipeManufacturerStatistics
()
{
return
materialMapper
.
pipeManufacturerStatistics
();
public
Map
<
String
,
List
<
String
>>
pipeManufacturerStatistics
()
{
List
<
String
>
list1
=
materialMapper
.
pipeManufacturerStatisticsToaXisData
();
List
<
String
>
list2
=
materialMapper
.
pipeManufacturerStatisticsToaSeriesData
();
Map
<
String
,
List
<
String
>>
map
=
new
HashMap
<>();
map
.
put
(
"axisData"
,
list1
);
map
.
put
(
"seriesData"
,
list2
);
return
map
;
}
}
\ 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