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
52cdf642
Commit
52cdf642
authored
Jul 17, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏概览接口-业务全过程
parent
3035bd99
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
141 additions
and
14 deletions
+141
-14
AlertStatisticsMapper.java
...oot/module/elevator/api/mapper/AlertStatisticsMapper.java
+5
-0
AlertStatisticsMapper.xml
...3-api/src/main/resources/mapper/AlertStatisticsMapper.xml
+13
-0
AlertStatisticsServiceImpl.java
...elevator/biz/service/impl/AlertStatisticsServiceImpl.java
+50
-5
FourColorCountDataDto.java
...in/amos/boot/module/jg/api/dto/FourColorCountDataDto.java
+0
-2
ConstructionEnum.java
...ejoin/amos/boot/module/jg/api/enums/ConstructionEnum.java
+0
-1
FourColorCountItemEnum.java
...amos/boot/module/jg/api/enums/FourColorCountItemEnum.java
+26
-0
FourColorEnum.java
.../yeejoin/amos/boot/module/jg/api/enums/FourColorEnum.java
+30
-0
MaintenanceEnum.java
...eejoin/amos/boot/module/jg/api/enums/MaintenanceEnum.java
+0
-2
SafetyProblemTypeEnum.java
.../amos/boot/module/jg/api/enums/SafetyProblemTypeEnum.java
+0
-3
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+0
-0
DPStatisticsServiceImpl.java
...t/module/jg/biz/service/impl/DPStatisticsServiceImpl.java
+0
-0
TzBaseEnterpriseInfoMapper.java
...oot/module/ymt/api/mapper/TzBaseEnterpriseInfoMapper.java
+8
-1
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+9
-0
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-api/src/main/java/com/yeejoin/amos/boot/module/elevator/api/mapper/AlertStatisticsMapper.java
View file @
52cdf642
package
com
.
yeejoin
.
amos
.
boot
.
module
.
elevator
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.elevator.api.entity.AlertStatistics
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -15,4 +16,8 @@ public interface AlertStatisticsMapper extends BaseMapper<AlertStatistics> {
AlertStatistics
getStatisticsMessage
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
AlertStatistics
statisticsInfoByRegionAndDate
(
@Param
(
"regionCode"
)
String
regionCode
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
Long
countProblemByTypeDateAndOrgCode
(
@Param
(
"problemType"
)
String
problemType
,
@Param
(
"dto"
)
DPFilterParamDto
params
,
@Param
(
"orgCode"
)
String
orgCode
);
String
getOrgCodeByCompanyCode
(
String
cityCode
);
}
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-api/src/main/resources/mapper/AlertStatisticsMapper.xml
View file @
52cdf642
...
...
@@ -99,4 +99,17 @@
from tz_alert_called t1 where t1.region_code like concat('%', #{regionCode}, '%') and t1.alarm_type_code = '960' and t1.call_time BETWEEN #{startDate} and #{endDate} and t1.father_alert is null
) as s ) as avgNum)t
</select>
<select
id=
"countProblemByTypeDateAndOrgCode"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM
"tzs_safety_problem_tracing"
WHERE
problem_type = #{problemType}
and governing_body_org_code like concat(#{orgCode}, '%')
and cast(problem_time AS DATE) between #{dto.beginDate} and #{dto.endDate}
</select>
<select
id=
"getOrgCodeByCompanyCode"
resultType=
"java.lang.String"
>
select org_code from privilege_company where company_code = #{companyCode} limit 1
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertStatisticsServiceImpl.java
View file @
52cdf642
...
...
@@ -27,6 +27,7 @@ import java.text.SimpleDateFormat;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
@Service
...
...
@@ -37,6 +38,8 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
@Autowired
RedisUtils
redisUtils
;
private
static
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@SchedulerLock
(
name
=
"AlertStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
public
void
statisticalGenerationTask
(){
...
...
@@ -178,13 +181,15 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
startDate
=
LocalDate
.
parse
(
params
.
getBeginDate
());
endDate
=
LocalDate
.
parse
(
params
.
getEndDate
());
}
params
.
setBeginDate
(
startDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
params
.
setEndDate
(
endDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
AlertStatistics
statistics
=
this
.
baseMapper
.
statisticsInfoByRegionAndDate
(
regionCode
,
startDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)),
endDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
JSONArray
jsonArray
=
new
JSONArray
();
if
(!
ObjectUtils
.
isEmpty
(
statistics
))
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"key"
,
"dtkr"
);
jsonObject
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getTrappedPeople
())
?
0
:
statistics
.
getTrappedPeople
());
jsonObject
.
put
(
"name"
,
"电梯困人"
);
JSONObject
jsonObject
0
=
new
JSONObject
();
jsonObject
0
.
put
(
"key"
,
"dtkr"
);
jsonObject
0
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getTrappedPeople
())
?
0
:
statistics
.
getTrappedPeople
());
jsonObject
0
.
put
(
"name"
,
"电梯困人"
);
JSONObject
jsonObject1
=
new
JSONObject
();
jsonObject1
.
put
(
"key"
,
"slts"
);
...
...
@@ -211,13 +216,52 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
jsonObject5
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getAvgTime
())
?
0
:
statistics
.
getAvgTime
());
jsonObject5
.
put
(
"name"
,
"平均救援时间"
);
jsonArray
.
add
(
jsonObject
);
String
orgCode
=
this
.
getAndSetOrgCode
(
regionCode
);
JSONObject
jsonObject6
=
new
JSONObject
();
jsonObject5
.
put
(
"key"
,
"jycq"
);
jsonObject5
.
put
(
"value"
,
this
.
getQuestionNumber
(
"检验超期"
,
params
,
orgCode
));
jsonObject5
.
put
(
"name"
,
"检验超期"
);
JSONObject
jsonObject7
=
new
JSONObject
();
jsonObject5
.
put
(
"key"
,
"jybhg"
);
jsonObject5
.
put
(
"value"
,
this
.
getQuestionNumber
(
"检验不合格"
,
params
,
orgCode
));
jsonObject5
.
put
(
"name"
,
"检验不合格"
);
JSONObject
jsonObject8
=
new
JSONObject
();
jsonObject5
.
put
(
"key"
,
"wbcq"
);
jsonObject5
.
put
(
"value"
,
this
.
getQuestionNumber
(
"维保超期"
,
params
,
orgCode
));
jsonObject5
.
put
(
"name"
,
"c"
);
JSONObject
jsonObject9
=
new
JSONObject
();
jsonObject5
.
put
(
"key"
,
"csjsynx"
);
jsonObject5
.
put
(
"value"
,
this
.
getQuestionNumber
(
"超设计使用年限"
,
params
,
orgCode
));
jsonObject5
.
put
(
"name"
,
"超设计使用年限"
);
jsonArray
.
add
(
jsonObject0
);
jsonArray
.
add
(
jsonObject1
);
jsonArray
.
add
(
jsonObject2
);
jsonArray
.
add
(
jsonObject3
);
jsonArray
.
add
(
jsonObject4
);
jsonArray
.
add
(
jsonObject5
);
jsonArray
.
add
(
jsonObject6
);
jsonArray
.
add
(
jsonObject7
);
jsonArray
.
add
(
jsonObject8
);
jsonArray
.
add
(
jsonObject9
);
}
return
jsonArray
;
}
private
Long
getQuestionNumber
(
String
problemType
,
DPFilterParamDto
params
,
String
orgCode
)
{
return
this
.
getBaseMapper
().
countProblemByTypeDateAndOrgCode
(
problemType
,
params
,
orgCode
);
}
private
String
getAndSetOrgCode
(
String
region
)
{
String
orgCode
=
regionCodeOrgCodeMap
.
get
(
region
);
if
(
orgCode
==
null
)
{
orgCode
=
this
.
getBaseMapper
().
getOrgCodeByCompanyCode
(
region
);
if
(
orgCode
!=
null
)
{
regionCodeOrgCodeMap
.
put
(
region
,
orgCode
);
}
}
return
orgCode
;
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/FourColorCountDataDto.java
View file @
52cdf642
...
...
@@ -13,8 +13,6 @@ import java.util.List;
public
class
FourColorCountDataDto
{
private
String
label
;
private
String
img
;
private
String
key
;
private
Long
value
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/ConstructionEnum.java
View file @
52cdf642
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/FourColorCountItemEnum.java
0 → 100644
View file @
52cdf642
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.Getter
;
@Getter
public
enum
FourColorCountItemEnum
{
/**
* 四色统计项
*/
EQUIP
(
"设备"
,
"equip"
),
COMPANY
(
"企业"
,
"company"
),
USER
(
"人员"
,
"user"
);
private
String
label
;
private
String
key
;
FourColorCountItemEnum
(
String
label
,
String
key
)
{
this
.
label
=
label
;
this
.
key
=
key
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/FourColorEnum.java
0 → 100644
View file @
52cdf642
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.Getter
;
/**
* @author Administrator
*/
@Getter
public
enum
FourColorEnum
{
/**
* 四色统计项
*/
GREEN
(
"绿色"
,
"green"
),
RED
(
"红色"
,
"red"
),
YELLOW
(
"黄色"
,
"yellow"
),
GREY
(
"灰色"
,
"grey"
);
private
String
name
;
private
String
code
;
FourColorEnum
(
String
name
,
String
code
)
{
this
.
name
=
name
;
this
.
code
=
code
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/MaintenanceEnum.java
View file @
52cdf642
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
io.swagger.models.auth.In
;
/**
* 维保备案使用单位枚举
*/
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/SafetyProblemTypeEnum.java
View file @
52cdf642
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
com.yeejoin.amos.boot.module.jg.api.event.handler.SafetyProblemEventHandler
;
import
lombok.Getter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.config.AutowireCapableBeanFactory
;
/**
* 业务类型枚举
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
52cdf642
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DPStatisticsServiceImpl.java
View file @
52cdf642
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/TzBaseEnterpriseInfoMapper.java
View file @
52cdf642
...
...
@@ -70,5 +70,12 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
List
<
CountDto
>
countByUnitTypeAndOrgCodeNoParam
();
/**
* 按照状态统计
*
* @param orgCode 公司的orgCode
* @param operatingStatus 营业状态
* @return Long 统计数量
*/
Long
countByOperatingStatusAndOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"operatingStatus"
)
String
operatingStatus
);
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
52cdf642
...
...
@@ -215,4 +215,13 @@
"tz_base_enterprise_info" a
group by a.unit_type,a.supervise_org_code
</select>
<select
id=
"countByOperatingStatusAndOrgCode"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM
"tz_base_enterprise_info"
where
supervise_org_code like concat(#{orgCode},'%')
and operating_status = #{operatingStatus}
</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