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
2e469a06
Commit
2e469a06
authored
Aug 28, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API
parent
5f37cd0c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
278 additions
and
98 deletions
+278
-98
PersonBasicMapper.xml
...jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
+1
-1
PersonQrCodeController.java
...t/module/jxiop/biz/controller/PersonQrCodeController.java
+59
-9
SjglZsjZsbtzMapper.java
...mos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
+38
-0
PersonBasicController.java
...ot/module/jxiop/biz/controller/PersonBasicController.java
+88
-88
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+92
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
View file @
2e469a06
...
...
@@ -210,7 +210,7 @@
<select
id=
"getPersonYardByPage"
resultType=
"java.util.Map"
>
SELECT
ifnull(b.name, '') as
person
Name ,
ifnull(b.name, '') as
object
Name ,
ifnull(a.qrcode_color, '') AS qrCodeColor,
ifnull(c.station_name, '') AS stationName
FROM
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/PersonQrCodeController.java
View file @
2e469a06
...
...
@@ -2,13 +2,16 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.api.Enum.QrcodeColorEnum
;
import
com.yeejoin.amos.boot.module.jxiop.api.feign.McbWarningFeign
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationQrCodeStatisticsMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.PersonBasicServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -20,6 +23,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -40,16 +44,34 @@ public class PersonQrCodeController extends BaseController {
@Autowired
private
StationQrCodeStatisticsMapper
stationQrCodeStatisticsMapper
;
@Autowired
private
SjglZsjZsbtzMapper
sjglZsjZsbtzMapper
;
/**
* 评估大屏 - 人员赋码环形图查询
*
* @param parentCode 父级code
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getPersonYardStatistics"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码环形图查询"
,
notes
=
"评估大屏 - 人员赋码环形图查询"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPersonYardStatistics
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicServiceImpl
.
getPersonYardStatistics
(
parentCode
);
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPersonYardStatistics
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"person"
))
{
resultList
=
personBasicMapper
.
getPersonYardStatistics
(
parentCode
);
}
else
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"equip"
))
{
resultList
=
sjglZsjZsbtzMapper
.
getEquipYardStatistics
(
parentCode
);
}
else
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"job"
))
{
resultList
=
sjglZsjZsbtzMapper
.
getJobYardStatistics
(
parentCode
);
}
resultList
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
item
.
put
(
"value"
,
Integer
.
parseInt
(
item
.
get
(
"value"
).
toString
()));
});
return
ResponseHelper
.
buildResponse
(
resultList
);
}
...
...
@@ -58,13 +80,40 @@ public class PersonQrCodeController extends BaseController {
*
* @param parentCode 父级code
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getPersonYardByPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码列表查询"
,
notes
=
"评估大屏 - 人员赋码列表查询"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getPersonYardByPage
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
Integer
size
)
{
Page
<
Map
<
String
,
Object
>>
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
);
@RequestParam
(
value
=
"size"
)
Integer
size
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
)
{
Page
<
Map
<
String
,
Object
>>
resultList
=
new
Page
<>();
if
(
"person"
.
equals
(
dataType
))
{
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
);
}
else
if
(
"equip"
.
equals
(
dataType
))
{
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
);
equipYardByPage
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
});
resultList
.
setRecords
(
equipYardByPage
);
resultList
.
setCurrent
(
current
);
resultList
.
setSize
(
size
);
resultList
.
setTotal
(
equipYardByPageCount
);
}
else
if
(
"job"
.
equals
(
dataType
))
{
List
<
Map
<
String
,
Object
>>
jobYardByPage
=
sjglZsjZsbtzMapper
.
getJobYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
);
Integer
jobYardByPageCount
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
);
jobYardByPage
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
});
resultList
.
setRecords
(
jobYardByPage
);
resultList
.
setCurrent
(
current
);
resultList
.
setSize
(
size
);
resultList
.
setTotal
(
jobYardByPageCount
);
}
return
ResponseHelper
.
buildResponse
(
resultList
);
}
...
...
@@ -73,10 +122,11 @@ public class PersonQrCodeController extends BaseController {
*
* @param parentCode 父级code
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getQrCodeCount"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码数量等统计"
,
notes
=
"评估大屏 - 人员赋码数量等统计"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getQrCodeCount
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getQrCodeCount
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
)
{
FeignClientResult
<
Map
<
String
,
Object
>>
sevenEntity
=
null
;
try
{
...
...
@@ -107,7 +157,7 @@ public class PersonQrCodeController extends BaseController {
* @param parentCode 父级code
* @param dataType 类型 - 人员、任务、设备等
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getQrCodeCountByStation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 场站 人员赋码数量等统计 【折线图】"
,
notes
=
"评估大屏 - 场站 人员赋码数量等统计 【折线图】"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getQrCodeCountByStation
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
View file @
2e469a06
...
...
@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -37,4 +38,41 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
* 任务赋码数据
*/
List
<
StationQrCodeStatistics
>
getTaskQrcodeInfo
();
/**
* 设备赋码数据
*/
List
<
Map
<
String
,
Object
>>
getEquipYardStatistics
(
@Param
(
"parentCode"
)
String
parentCode
);
/**
* 任务赋码数据
*/
List
<
Map
<
String
,
Object
>>
getJobYardStatistics
(
@Param
(
"parentCode"
)
String
parentCode
);
/**
* 设备赋码列表
*/
List
<
Map
<
String
,
Object
>>
getEquipYardByPage
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
);
/**
* 设备赋码列表
*/
Integer
getEquipYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
);
/**
* 任务赋码列表
*/
List
<
Map
<
String
,
Object
>>
getJobYardByPage
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
);
/**
* 任务赋码列表数量统计
*/
Integer
getJobYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/PersonBasicController.java
View file @
2e469a06
...
...
@@ -195,93 +195,93 @@ public class PersonBasicController extends BaseController {
return
response
;
}
/**
* 评估大屏 - 人员赋码环形图查询
*
* @param parentCode 父级code
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPersonYardStatistics"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码环形图查询"
,
notes
=
"评估大屏 - 人员赋码环形图查询"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPersonYardStatistics
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicServiceImpl
.
getPersonYardStatistics
(
parentCode
);
return
ResponseHelper
.
buildResponse
(
resultList
);
}
/**
* 评估大屏 - 人员赋码列表查询
*
* @param parentCode 父级code
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPersonYardByPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码列表查询"
,
notes
=
"评估大屏 - 人员赋码列表查询"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getPersonYardByPage
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
Integer
size
)
{
Page
<
Map
<
String
,
Object
>>
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
);
return
ResponseHelper
.
buildResponse
(
resultList
);
}
/**
* 评估大屏 - 人员赋码数量等统计
*
* @param parentCode 父级code
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getQrCodeCount"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码数量等统计"
,
notes
=
"评估大屏 - 人员赋码数量等统计"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getQrCodeCount
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
)
{
FeignClientResult
<
Map
<
String
,
Object
>>
sevenEntity
=
null
;
try
{
sevenEntity
=
mcbWarningFeign
.
getQrCodeCount
(
parentCode
,
"RYFM"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(
sevenEntity
!=
null
&&
200
==
sevenEntity
.
getStatus
())
{
Map
<
String
,
Object
>
result
=
sevenEntity
.
getResult
();
String
red
=
result
.
get
(
"red"
).
toString
();
String
yellow
=
result
.
get
(
"yellow"
).
toString
();
String
redToGreen
=
result
.
get
(
"redToGreen"
).
toString
();
String
yellowToGreen
=
result
.
get
(
"yellowToGreen"
).
toString
();
Integer
countAll
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
);
result
.
put
(
"redToGreenPercent"
,
getPercent
(
new
BigDecimal
(
red
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"redPercent"
,
getPercent
(
new
BigDecimal
(
redToGreen
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"yellowToGreenPercent"
,
getPercent
(
new
BigDecimal
(
yellow
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"yellowPercent"
,
getPercent
(
new
BigDecimal
(
yellowToGreen
),
new
BigDecimal
(
countAll
)));
return
ResponseHelper
.
buildResponse
(
result
);
}
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
* 评估大屏 - 场站 人员赋码数量等统计 【折线图】
*
* @param parentCode 父级code
* @param dataType 类型 - 人员、任务、设备等
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getQrCodeCountByStation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 场站 人员赋码数量等统计 【折线图】"
,
notes
=
"评估大屏 - 场站 人员赋码数量等统计 【折线图】"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getQrCodeCountByStation
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
)
{
List
<
Map
<
String
,
Object
>>
qrCodeCountByStation
=
stationQrCodeStatisticsMapper
.
getQrCodeCountByStation
(
parentCode
,
dataType
);
return
ResponseHelper
.
buildResponse
(
qrCodeCountByStation
);
}
/**
* 百分比
*
* @param numerator 分子
* @param denominator 分母
* @return 百分比
*/
private
double
getPercent
(
BigDecimal
numerator
,
BigDecimal
denominator
)
{
BigDecimal
multiply
=
numerator
.
divide
(
denominator
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
?
denominator
:
new
BigDecimal
(
1
),
4
,
BigDecimal
.
ROUND_DOWN
).
multiply
(
new
BigDecimal
(
100
));
return
Math
.
abs
(
multiply
.
doubleValue
());
}
//
/**
//
* 评估大屏 - 人员赋码环形图查询
//
*
//
* @param parentCode 父级code
//
*/
//
@TycloudOperation(ApiLevel = UserType.AGENCY)
//
@GetMapping(value = "/getPersonYardStatistics")
//
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码环形图查询", notes = "评估大屏 - 人员赋码环形图查询")
//
public ResponseModel<List<Map<String, Object>>> getPersonYardStatistics(@RequestParam(required = false, value = "parentCode") String parentCode) {
//
List<Map<String, Object>> resultList = personBasicServiceImpl.getPersonYardStatistics(parentCode);
//
return ResponseHelper.buildResponse(resultList);
//
}
//
/**
//
* 评估大屏 - 人员赋码列表查询
//
*
//
* @param parentCode 父级code
//
*/
//
@TycloudOperation(ApiLevel = UserType.AGENCY)
//
@GetMapping(value = "/getPersonYardByPage")
//
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码列表查询", notes = "评估大屏 - 人员赋码列表查询")
//
public ResponseModel<Page<Map<String, Object>>> getPersonYardByPage(@RequestParam(required = false, value = "parentCode") String parentCode,
//
@RequestParam(value = "current") Integer current,
//
@RequestParam(value = "size") Integer size) {
//
Page<Map<String, Object>> resultList = personBasicServiceImpl.getPersonYardByPage(parentCode, current, size);
//
return ResponseHelper.buildResponse(resultList);
//
}
//
//
/**
//
* 评估大屏 - 人员赋码数量等统计
//
*
//
* @param parentCode 父级code
//
*/
//
@TycloudOperation(ApiLevel = UserType.AGENCY)
//
@GetMapping(value = "/getQrCodeCount")
//
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码数量等统计", notes = "评估大屏 - 人员赋码数量等统计")
//
public ResponseModel<Map<String, Object>> getQrCodeCount(@RequestParam(required = false, value = "parentCode") String parentCode) {
//
//
FeignClientResult<Map<String, Object>> sevenEntity = null;
//
try {
//
sevenEntity = mcbWarningFeign.getQrCodeCount(parentCode, "RYFM");
//
} catch (Exception e) {
//
e.printStackTrace();
//
}
//
if (sevenEntity != null && 200 == sevenEntity.getStatus()) {
//
Map<String, Object> result = sevenEntity.getResult();
//
String red = result.get("red").toString();
//
String yellow = result.get("yellow").toString();
//
String redToGreen = result.get("redToGreen").toString();
//
String yellowToGreen = result.get("yellowToGreen").toString();
//
Integer countAll = personBasicMapper.getPersonYardByPageCount(parentCode);
//
result.put("redToGreenPercent", getPercent(new BigDecimal(red), new BigDecimal(countAll)));
//
result.put("redPercent", getPercent(new BigDecimal(redToGreen), new BigDecimal(countAll)));
//
result.put("yellowToGreenPercent", getPercent(new BigDecimal(yellow), new BigDecimal(countAll)));
//
result.put("yellowPercent", getPercent(new BigDecimal(yellowToGreen), new BigDecimal(countAll)));
//
return ResponseHelper.buildResponse(result);
//
}
//
return ResponseHelper.buildResponse(null);
//
}
//
//
//
/**
//
* 评估大屏 - 场站 人员赋码数量等统计 【折线图】
//
*
//
* @param parentCode 父级code
//
* @param dataType 类型 - 人员、任务、设备等
//
*/
//
@TycloudOperation(ApiLevel = UserType.AGENCY)
//
@GetMapping(value = "/getQrCodeCountByStation")
//
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 场站 人员赋码数量等统计 【折线图】", notes = "评估大屏 - 场站 人员赋码数量等统计 【折线图】")
//
public ResponseModel<List<Map<String, Object>>> getQrCodeCountByStation(@RequestParam(required = false, value = "parentCode") String parentCode,
//
@RequestParam(required = false, value = "dataType") String dataType) {
//
List<Map<String, Object>> qrCodeCountByStation = stationQrCodeStatisticsMapper.getQrCodeCountByStation(parentCode, dataType);
//
return ResponseHelper.buildResponse(qrCodeCountByStation);
//
}
//
//
//
/**
//
* 百分比
//
*
//
* @param numerator 分子
//
* @param denominator 分母
//
* @return 百分比
//
*/
//
private double getPercent(BigDecimal numerator, BigDecimal denominator) {
//
BigDecimal multiply = numerator.divide(denominator.compareTo(BigDecimal.ZERO) != 0 ? denominator : new BigDecimal(1), 4, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(100));
//
return Math.abs(multiply.doubleValue());
//
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
2e469a06
...
...
@@ -64,4 +64,96 @@
GROUP BY
WERKS
</select>
<select
id=
"getEquipYardStatistics"
resultType=
"java.util.Map"
>
SELECT
a.QRCODE_COLOR as qrCodeColor,
count( 1 ) as value
FROM
sjgl_zsj_zsbtz a
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
GROUP BY
QRCODE_COLOR
</select>
<select
id=
"getJobYardStatistics"
resultType=
"java.util.Map"
>
SELECT
a.QRCODE_COLOR as qrCodeColor,
count( 1 ) as value
FROM
fdgl_job_main a
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
GROUP BY
QRCODE_COLOR
</select>
<select
id=
"getEquipYardByPage"
resultType=
"java.util.Map"
>
SELECT
ifnull(a.SBMC, '') as objectName ,
ifnull(a.QRCODE_COLOR, '') AS qrCodeColor,
ifnull(b.COMPANY_NAME, '') AS stationName
FROM
sjgl_zsj_zsbtz a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
ORDER BY a.CREATE_TIME DESC
limit #{current},#{size}
</select>
<select
id=
"getEquipYardByPageCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM
sjgl_zsj_zsbtz a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
</select>
<select
id=
"getJobYardByPage"
resultType=
"java.util.Map"
>
SELECT
ifnull(a.JOB_DESCRIPTION, '') as objectName ,
ifnull(a.qrcode_color, '') AS qrCodeColor,
ifnull(b.COMPANY_NAME, '') AS stationName
FROM
fdgl_job_main a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
ORDER BY a.CREATE_TIME DESC
limit #{current},#{size}
</select>
<select
id=
"getJobYardByPageCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM
fdgl_job_main a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
</select>
</mapper>
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