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
8799b9ee
Commit
8799b9ee
authored
Dec 26, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
今日值班人员接警数量统计
parent
f4f04e51
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
TzsCitInfoDto.java
...m/yeejoin/amos/boot/module/tzs/api/dto/TzsCitInfoDto.java
+1
-0
AlertCalledMapper.java
...in/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
+5
-0
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+26
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/TzsCitInfoDto.java
View file @
8799b9ee
...
@@ -58,6 +58,7 @@ public class TzsCitInfoDto extends BaseDto {
...
@@ -58,6 +58,7 @@ public class TzsCitInfoDto extends BaseDto {
private
Boolean
isOnline
;
private
Boolean
isOnline
;
private
Integer
countNum
;
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
View file @
8799b9ee
...
@@ -11,9 +11,11 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto;
...
@@ -11,9 +11,11 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyTaskListDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyTaskListDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -107,4 +109,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
...
@@ -107,4 +109,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Integer
getEquipmentHistoryCount
(
@Param
(
"regionCodes"
)
List
<
String
>
regionCodes
,
@Param
(
"equipmentClassCode"
)
String
equipmentClassCode
,
@Param
(
"equipmentCode"
)
String
equipmentCode
);
Integer
getEquipmentHistoryCount
(
@Param
(
"regionCodes"
)
List
<
String
>
regionCodes
,
@Param
(
"equipmentClassCode"
)
String
equipmentClassCode
,
@Param
(
"equipmentCode"
)
String
equipmentCode
);
List
<
AlertPaperInfoDto
>
getEquipmentHistory
(
@Param
(
"regionCodes"
)
List
<
String
>
regionCodes
,
@Param
(
"equipmentClassCode"
)
String
equipmentClassCode
,
@Param
(
"current"
)
Integer
current
,
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"equipmentCode"
)
String
equipmentCode
);
List
<
AlertPaperInfoDto
>
getEquipmentHistory
(
@Param
(
"regionCodes"
)
List
<
String
>
regionCodes
,
@Param
(
"equipmentClassCode"
)
String
equipmentClassCode
,
@Param
(
"current"
)
Integer
current
,
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"equipmentCode"
)
String
equipmentCode
);
@Select
(
"select count(1) from tz_alert_called where rec_user_name =#{userName} and rec_date >= #{startTime} and rec_date <= #{endTime}"
)
Integer
getCountNum
(
String
userName
,
Date
startTime
,
Date
endTime
);
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
8799b9ee
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.commons.lang.text.StrBuilder
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -37,6 +38,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -37,6 +38,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -395,6 +398,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -395,6 +398,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
citInfoDto
.
setServiceSocre
(
"100"
);
citInfoDto
.
setServiceSocre
(
"100"
);
//在线
//在线
citInfoDto
.
setIsOnline
(
true
);
citInfoDto
.
setIsOnline
(
true
);
citInfoDto
.
setCountNum
(
countNum
(
citInfo
.
getCtiUserName
()));
citInfoDtoList
.
add
(
citInfoDto
);
citInfoDtoList
.
add
(
citInfoDto
);
}
}
// List<AgencyUserModel> userList = userListResult.getResult();
// List<AgencyUserModel> userList = userListResult.getResult();
...
@@ -430,6 +434,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -430,6 +434,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
// }
// }
//
//
// });
// });
return
citInfoDtoList
;
return
citInfoDtoList
;
}
}
...
@@ -743,4 +748,24 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -743,4 +748,24 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
public
Integer
getEquipmentHistoryCount
(
List
<
String
>
useRegionCode
,
String
equipmentClassCode
,
String
equipmentCode
)
{
public
Integer
getEquipmentHistoryCount
(
List
<
String
>
useRegionCode
,
String
equipmentClassCode
,
String
equipmentCode
)
{
return
baseMapper
.
getEquipmentHistoryCount
(
useRegionCode
,
equipmentClassCode
,
equipmentCode
);
return
baseMapper
.
getEquipmentHistoryCount
(
useRegionCode
,
equipmentClassCode
,
equipmentCode
);
}
}
// 今日值班人员接警数量统计
public
Integer
countNum
(
String
userName
){
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
format
=
simpleDateFormat
.
format
(
new
Date
());
StrBuilder
strBuilderStart
=
new
StrBuilder
();
String
startTimeString
=
strBuilderStart
.
append
(
format
).
append
(
" "
).
append
(
"00:00:00"
).
toString
();
StrBuilder
strBuilderEnd
=
new
StrBuilder
();
String
endTimeString
=
strBuilderEnd
.
append
(
format
).
append
(
" "
).
append
(
" "
).
append
(
"23:59:59"
).
toString
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Date
startTime
=
null
;
Date
endTime
=
null
;
try
{
startTime
=
sdf
.
parse
(
startTimeString
);
endTime
=
sdf
.
parse
(
endTimeString
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"日期转化失敗:"
+
e
.
getMessage
());
}
return
alertCalledMapper
.
getCountNum
(
userName
,
startTime
,
endTime
);
}
}
}
\ 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