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
7b958595
Commit
7b958595
authored
Sep 01, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
e92810c8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
128 additions
and
3 deletions
+128
-3
IdxFeign.java
...om/yeejoin/amos/boot/module/jxiop/api/feign/IdxFeign.java
+20
-0
McbWarningFeign.java
...oin/amos/boot/module/jxiop/api/feign/McbWarningFeign.java
+6
-0
StationBasicMapper.xml
...xiop-api/src/main/resources/mapper/StationBasicMapper.xml
+2
-1
PersonQrCodeController.java
...t/module/jxiop/biz/controller/PersonQrCodeController.java
+98
-0
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+2
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/feign/IdxFeign.java
0 → 100644
View file @
7b958595
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
feign
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.Map
;
@FeignClient
(
name
=
"${amos.idx.name:AMOS-IDX}"
,
path
=
"idx"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
IdxFeign
{
/**
* 根据风险来源查询人员红黄绿吗信息
*/
@GetMapping
(
"/jxIopAnalysis/healthIndexData"
)
FeignClientResult
<
Map
<
String
,
Object
>>
healthIndexData
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
required
=
false
,
value
=
"stationType"
)
String
stationType
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/feign/McbWarningFeign.java
View file @
7b958595
...
@@ -20,4 +20,10 @@ public interface McbWarningFeign {
...
@@ -20,4 +20,10 @@ public interface McbWarningFeign {
FeignClientResult
<
Map
<
String
,
Object
>>
getQrCodeCount
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
FeignClientResult
<
Map
<
String
,
Object
>>
getQrCodeCount
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
value
=
"warningObjectType"
)
String
warningObjectType
);
@RequestParam
(
value
=
"warningObjectType"
)
String
warningObjectType
);
/**
* 根据风险来源查询人员红黄绿吗信息
*/
@GetMapping
(
"/task/getWarningInfoCountByObjectId"
)
FeignClientResult
<
Integer
>
getWarningInfoCountByObjectId
(
@RequestParam
(
value
=
"code"
)
String
code
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/StationBasicMapper.xml
View file @
7b958595
...
@@ -174,7 +174,8 @@
...
@@ -174,7 +174,8 @@
update
update
`station_basic`
`station_basic`
set
set
`qrcode_color` = #{item.qrcodeColor}
`qrcode_color` = #{item.qrcodeColor},
rec_date = now()
where
where
project_org_code = #{item.code}
project_org_code = #{item.code}
</foreach>
</foreach>
...
...
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 @
7b958595
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
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.Enum.QrcodeColorEnum
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.feign.IdxFeign
;
import
com.yeejoin.amos.boot.module.jxiop.api.feign.McbWarningFeign
;
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.PersonBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationQrCodeStatisticsMapper
;
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.mapper2.SjglZsjZsbtzMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.PersonBasicServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.PersonBasicServiceImpl
;
...
@@ -46,6 +50,14 @@ public class PersonQrCodeController extends BaseController {
...
@@ -46,6 +50,14 @@ public class PersonQrCodeController extends BaseController {
@Autowired
@Autowired
private
SjglZsjZsbtzMapper
sjglZsjZsbtzMapper
;
private
SjglZsjZsbtzMapper
sjglZsjZsbtzMapper
;
@Autowired
private
IdxFeign
idxFeign
;
@Autowired
private
StationBasicMapper
stationBasicMapper
;
/**
/**
* 评估大屏 - 人员赋码环形图查询
* 评估大屏 - 人员赋码环形图查询
*
*
...
@@ -209,4 +221,90 @@ public class PersonQrCodeController extends BaseController {
...
@@ -209,4 +221,90 @@ public class PersonQrCodeController extends BaseController {
return
Math
.
abs
(
multiply
.
doubleValue
());
return
Math
.
abs
(
multiply
.
doubleValue
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getStationDetailInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 场站信息查询"
,
notes
=
"评估大屏 - 场站信息查询"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getStationDetailInfo
(
@RequestParam
(
required
=
true
,
value
=
"parentCode"
)
String
parentCode
)
{
FeignClientResult
<
Map
<
String
,
Object
>>
sevenEntity
=
null
;
try
{
sevenEntity
=
idxFeign
.
healthIndexData
(
parentCode
,
null
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
FeignClientResult
<
Integer
>
sevenEntityMcb
=
null
;
try
{
sevenEntityMcb
=
mcbWarningFeign
.
getWarningInfoCountByObjectId
(
parentCode
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
String
score
=
"100"
;
String
gradeColor
=
"green"
;
Integer
warningCount
=
0
;
if
(
sevenEntity
!=
null
&&
200
==
sevenEntity
.
getStatus
())
{
Map
<
String
,
Object
>
result
=
sevenEntity
.
getResult
();
score
=
result
.
get
(
"score"
).
toString
();
gradeColor
=
result
.
get
(
"gradeColor"
).
toString
();
}
if
(
sevenEntityMcb
!=
null
&&
200
==
sevenEntityMcb
.
getStatus
())
{
warningCount
=
sevenEntityMcb
.
getResult
();
}
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"score"
,
score
);
map
.
put
(
"gradeColor"
,
gradeColor
);
map
.
put
(
"warningCount"
,
warningCount
);
LambdaQueryWrapper
<
StationBasic
>
stationBasicLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
stationBasicLambdaQueryWrapper
.
eq
(
StationBasic:
:
getProjectOrgCode
,
parentCode
);
stationBasicLambdaQueryWrapper
.
last
(
"limit 1"
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectOne
(
stationBasicLambdaQueryWrapper
);
map
.
put
(
"stationMasterName"
,
stationBasic
.
getStationMasterName
());
map
.
put
(
"mobilePhone"
,
stationBasic
.
getMobilePhone
());
map
.
put
(
"recDate"
,
stationBasic
.
getRecDate
());
return
ResponseHelper
.
buildResponse
(
map
);
}
//
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @GetMapping(value = "/getStationDetailInfo")
// @ApiOperation(httpMethod = "GET", value = "评估大屏 - 场站信息查询", notes = "评估大屏 - 场站信息查询")
// public ResponseModel<Map<String, Object>> getStationEquipInfo(@RequestParam(required = true, value = "parentCode") String parentCode,
// @RequestParam(required = false, value = "column") String column) {
// FeignClientResult<Map<String, Object>> sevenEntity = null;
// try {
// sevenEntity = idxFeign.healthIndexData(parentCode, null);
// } catch (Exception e) {
// e.printStackTrace();
// }
// FeignClientResult<Integer> sevenEntityMcb = null;
// try {
// sevenEntityMcb = mcbWarningFeign.getWarningInfoCountByObjectId(parentCode);
// } catch (Exception e) {
// e.printStackTrace();
// }
// String score = "100";
// String gradeColor = "green";
// Integer warningCount = 0;
// if (sevenEntity != null && 200 == sevenEntity.getStatus()) {
// Map<String, Object> result = sevenEntity.getResult();
// score = result.get("score").toString();
// gradeColor = result.get("gradeColor").toString();
// }
// if (sevenEntityMcb != null && 200 == sevenEntityMcb.getStatus()) {
// warningCount = sevenEntityMcb.getResult();
// }
// HashMap<String, Object> map = new HashMap<>();
// map.put("score", score);
// map.put("gradeColor", gradeColor);
// map.put("warningCount", warningCount);
// LambdaQueryWrapper<StationBasic> stationBasicLambdaQueryWrapper = new LambdaQueryWrapper<>();
// stationBasicLambdaQueryWrapper.eq(StationBasic::getProjectOrgCode, parentCode);
// stationBasicLambdaQueryWrapper.last("limit 1");
// StationBasic stationBasic = stationBasicMapper.selectOne(stationBasicLambdaQueryWrapper);
// map.put("stationMasterName", stationBasic.getStationMasterName());
// map.put("mobilePhone", stationBasic.getMobilePhone());
// map.put("recDate", stationBasic.getRecDate());
// return ResponseHelper.buildResponse(map);
// }
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
7b958595
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE
<where>
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
<if
test=
"parentCode != null and parentCode != ''"
>
b.
COMPANY
_CODE like concat(#{parentCode},'%')
b.
ORG
_CODE like concat(#{parentCode},'%')
</if>
</if>
</where>
</where>
GROUP BY
GROUP BY
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE
<where>
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
<if
test=
"parentCode != null and parentCode != ''"
>
b.
COMPANY
_CODE like concat(#{parentCode},'%')
b.
ORG
_CODE like concat(#{parentCode},'%')
</if>
</if>
</where>
</where>
GROUP BY
GROUP BY
...
...
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