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
30807b5a
Commit
30807b5a
authored
Aug 09, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡查统计增加接口
parent
9169dbe3
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
580 additions
and
3 deletions
+580
-3
SafetyPreCtrlController.java
...s/patrol/business/controller/SafetyPreCtrlController.java
+107
-0
CheckMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/CheckMapper.java
+1
-0
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+3
-1
PointMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
+3
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+8
-0
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+74
-0
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+133
-0
ICheckService.java
...oin/amos/patrol/business/service/intfc/ICheckService.java
+1
-0
IPlanTaskService.java
.../amos/patrol/business/service/intfc/IPlanTaskService.java
+2
-1
IPointService.java
...oin/amos/patrol/business/service/intfc/IPointService.java
+3
-1
dbTemplate_check.xml
...-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
+65
-0
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+69
-0
pointMapper.xml
...ystem-patrol/src/main/resources/db/mapper/pointMapper.xml
+111
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/SafetyPreCtrlController.java
View file @
30807b5a
...
...
@@ -82,6 +82,71 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
List
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检点统计"
,
notes
=
"巡检点统计"
)
@RequestMapping
(
value
=
"/countPointNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
HashMap
<
String
,
Object
>
sumCheckPtByIdNew
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
List
<
HashMap
<
String
,
Object
>>
List
=
pointService
.
getSumPtByRoleNew
(
loginOrgCode
);
HashMap
<
String
,
Object
>
temph
=
new
HashMap
<>();
temph
.
put
(
"result"
,
List
);
temph
.
put
(
"status"
,
200
);
temph
.
put
(
"message"
,
""
);
return
temph
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检情况统计"
,
notes
=
"巡检情况统计"
)
@RequestMapping
(
value
=
"/countMonthNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
HashMap
<
String
,
Object
>
countMonthCheckByIdNew
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
List
<
HashMap
<
String
,
Object
>>
countList
=
checkService
.
getCountMonthChkByRoleNew
(
loginOrgCode
);
List
<
String
>
axisData
=
new
ArrayList
<>();
List
<
String
>
actualNum
=
new
ArrayList
<>();
List
<
String
>
forNum
=
new
ArrayList
<>();
List
<
String
>
proNum
=
new
ArrayList
<>();
for
(
HashMap
<
String
,
Object
>
stringObjectHashMap
:
countList
)
{
axisData
.
add
(
stringObjectHashMap
.
get
(
"checkDate"
).
toString
());
actualNum
.
add
(
stringObjectHashMap
.
get
(
"actualNum"
).
toString
());
forNum
.
add
(
stringObjectHashMap
.
get
(
"forNum"
).
toString
());
proNum
.
add
(
stringObjectHashMap
.
get
(
"proNum"
).
toString
());
}
List
<
HashMap
<
String
,
Object
>>
seriesData
=
new
ArrayList
<>();
HashMap
<
String
,
Object
>
actualNummap
=
new
HashMap
<>();
actualNummap
.
put
(
"data"
,
actualNum
);
HashMap
<
String
,
Object
>
forNummap
=
new
HashMap
<>();
forNummap
.
put
(
"data"
,
forNum
);
HashMap
<
String
,
Object
>
proNummap
=
new
HashMap
<>();
proNummap
.
put
(
"data"
,
proNum
);
seriesData
.
add
(
proNummap
);
seriesData
.
add
(
forNummap
);
seriesData
.
add
(
actualNummap
);
HashMap
<
String
,
Object
>
date
=
new
HashMap
<>();
date
.
put
(
"seriesData"
,
seriesData
);
date
.
put
(
"axisData"
,
axisData
);
HashMap
<
String
,
Object
>
temph
=
new
HashMap
<>();
temph
.
put
(
"result"
,
date
);
temph
.
put
(
"status"
,
200
);
temph
.
put
(
"message"
,
""
);
return
temph
;
}
/**
* 月巡检情况统计
* @param dateMonth
...
...
@@ -118,6 +183,48 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkChkExListBo
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检执行情况查询"
,
notes
=
"巡检执行情况查询"
)
@RequestMapping
(
value
=
"/checkExecute/listNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
HashMap
<
String
,
Object
>
findChkExListNew
(
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
HashMap
<
String
,
Object
>
checkChkExListBo
=
iPlanTaskService
.
getChkExListNew
(
loginOrgCode
,
commonPageable
);
HashMap
<
String
,
Object
>
temph
=
new
HashMap
<>();
temph
.
put
(
"result"
,
checkChkExListBo
);
temph
.
put
(
"status"
,
200
);
temph
.
put
(
"message"
,
""
);
return
temph
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风险点查询"
,
notes
=
"风险点查询"
)
@RequestMapping
(
value
=
"/point/listNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
HashMap
<
String
,
Object
>
findPointListNew
(
@ApiParam
(
value
=
"分页参数"
,
required
=
false
)
CommonPageable
commonPageable
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
HashMap
<
String
,
Object
>
checkChkExListBo
=
pointService
.
getCheckPtListNew
(
loginOrgCode
,
commonPageable
);
HashMap
<
String
,
Object
>
temph
=
new
HashMap
<>();
temph
.
put
(
"result"
,
checkChkExListBo
);
temph
.
put
(
"status"
,
200
);
temph
.
put
(
"message"
,
""
);
return
temph
;
}
/**
* 获取巡检点列表查询接口
* @return
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/CheckMapper.java
View file @
30807b5a
...
...
@@ -99,6 +99,7 @@ public interface CheckMapper extends BaseMapper {
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getCountMonthChkNew
();
List
<
HashMap
<
String
,
Object
>>
getCountMonthChkNewXIN
(
String
orgCode
);
/**
* 获取巡检日历信息列表
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
View file @
30807b5a
...
...
@@ -116,13 +116,15 @@ public interface PlanTaskMapper extends BaseMapper {
* @return
*/
long
countChkExListData
(
CheckPtListPageParam
param
);
long
countChkExListDataNew
(
CheckPtListPageParam
param
);
/**
* 今日执行情况,业务信息查询
* @param param
* @return
*/
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
List
<
CheckChkExListBo
>
getChkExListNew
(
CheckPtListPageParam
param
);
/**
* 任务分页查询数量
* @param params 参数
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
View file @
30807b5a
...
...
@@ -83,11 +83,14 @@ public interface PointMapper extends BaseMapper {
List
<
HashMap
<
String
,
Object
>>
getSumPtForDept
(
@Param
(
value
=
"orgCode"
)
String
loginOrgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtForDeptNew
(
@Param
(
value
=
"orgCode"
)
String
loginOrgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtForAdmin
(
@Param
(
value
=
"orgCode"
)
String
orgCode
);
long
getCheckPointCount
(
CheckPtListPageParam
param
);
long
getCheckPointCountNew
(
CheckPtListPageParam
param
);
List
<
CheckPtListBo
>
getCheckPointList
(
CheckPtListPageParam
param
);
List
<
CheckPtListBo
>
getCheckPointListNew
(
CheckPtListPageParam
param
);
/**
* 巡检点明细查询
* @param param
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
30807b5a
...
...
@@ -1284,6 +1284,14 @@ public class CheckServiceImpl implements ICheckService {
return
checkMapper
.
getCountMonthChkNew
();
}
@Override
public
List
<
HashMap
<
String
,
Object
>>
getCountMonthChkByRoleNew
(
String
orgCode
)
{
return
checkMapper
.
getCountMonthChkNewXIN
(
orgCode
);
}
@SuppressWarnings
(
"unchecked"
)
@Override
public
QueryCriteriaRespone
getQueryCriteriaInit
(
String
toke
,
String
product
,
String
appKey
,
String
loginOrgCode
,
String
roleTypeName
,
String
departmentId
,
String
companyId
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
30807b5a
...
...
@@ -63,6 +63,7 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -1338,6 +1339,79 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
return
result
;
}
@Override
public
HashMap
<
String
,
Object
>
getChkExListNew
(
String
orgCode
,
CommonPageable
commonPageable
)
{
CheckPtListPageParam
param
=
new
CheckPtListPageParam
();
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
param
.
setOrgCode
(
orgCode
);
DateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
Date
date
=
new
Date
();
String
c
=
dateFormat
.
format
(
date
);
param
.
setCheckDate
(
c
);
long
total
=
planTaskMapper
.
countChkExListDataNew
(
param
);
List
<
CheckChkExListBo
>
content
=
planTaskMapper
.
getChkExListNew
(
param
);
Page
<
CheckChkExListBo
>
result
=
new
PageImpl
<
CheckChkExListBo
>(
content
,
param
,
total
);
List
<
HashMap
<
String
,
Object
>>
colModel
=
new
ArrayList
<>();
HashMap
<
String
,
Object
>
temph1
=
new
HashMap
<>();
temph1
.
put
(
"fid"
,
"name"
);
temph1
.
put
(
"dataIndex"
,
"name"
);
temph1
.
put
(
"name"
,
"巡检计划名称"
);
temph1
.
put
(
"title"
,
"巡检计划名称"
);
temph1
.
put
(
"type"
,
"name"
);
temph1
.
put
(
"key"
,
"name"
);
HashMap
<
String
,
Object
>
temph2
=
new
HashMap
<>();
temph2
.
put
(
"fid"
,
"lastTime"
);
temph2
.
put
(
"dataIndex"
,
"lastTime"
);
temph2
.
put
(
"name"
,
"开始时间"
);
temph2
.
put
(
"title"
,
"开始时间"
);
temph2
.
put
(
"type"
,
"lastTime"
);
temph2
.
put
(
"key"
,
"lastTime"
);
HashMap
<
String
,
Object
>
temph3
=
new
HashMap
<>();
temph3
.
put
(
"fid"
,
"endTime"
);
temph3
.
put
(
"dataIndex"
,
"endTime"
);
temph3
.
put
(
"name"
,
"结束时间"
);
temph3
.
put
(
"title"
,
"结束时间"
);
temph3
.
put
(
"type"
,
"endTime"
);
temph3
.
put
(
"key"
,
"endTime"
);
HashMap
<
String
,
Object
>
temph4
=
new
HashMap
<>();
temph4
.
put
(
"fid"
,
"finishStatus"
);
temph4
.
put
(
"dataIndex"
,
"finishStatus"
);
temph4
.
put
(
"name"
,
"完成情况"
);
temph4
.
put
(
"title"
,
"完成情况"
);
temph4
.
put
(
"type"
,
"finishStatus"
);
temph4
.
put
(
"key"
,
"finishStatus"
);
HashMap
<
String
,
Object
>
temph5
=
new
HashMap
<>();
temph5
.
put
(
"fid"
,
"realName"
);
temph5
.
put
(
"dataIndex"
,
"realName"
);
temph5
.
put
(
"name"
,
"巡检人员"
);
temph5
.
put
(
"title"
,
"巡检人员"
);
temph5
.
put
(
"type"
,
"realName"
);
temph5
.
put
(
"key"
,
"realName"
);
colModel
.
add
(
temph1
);
colModel
.
add
(
temph2
);
colModel
.
add
(
temph3
);
colModel
.
add
(
temph4
);
colModel
.
add
(
temph5
);
HashMap
<
String
,
Object
>
dataGridMock
=
new
HashMap
<>();
dataGridMock
.
put
(
"current"
,
result
.
getNumber
());
dataGridMock
.
put
(
"total"
,
result
.
getTotalElements
());
dataGridMock
.
put
(
"pagination"
,
true
);
dataGridMock
.
put
(
"totalPage"
,
result
.
getTotalPages
());
dataGridMock
.
put
(
"dataList"
,
result
.
getContent
());
dataGridMock
.
put
(
"pageSize"
,
result
.
getSize
());
HashMap
<
String
,
Object
>
DATE
=
new
HashMap
<>();
DATE
.
put
(
"dataGridMock"
,
dataGridMock
);
DATE
.
put
(
"colModel"
,
colModel
);
return
DATE
;
}
@Override
public
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
)
{
return
planTaskMapper
.
getPlanTaskStatisticsForApp
(
params
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
30807b5a
...
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.patrol.business.dao.mapper.PointMapper;
import
com.yeejoin.amos.patrol.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
import
com.yeejoin.amos.patrol.business.dto.PointClassifySynDto
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.CheckChkExListBo
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.CheckPtListBo
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.PushTargetBo
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
...
...
@@ -54,6 +55,8 @@ import javax.persistence.criteria.Predicate;
import
javax.persistence.criteria.Root
;
import
java.beans.PropertyDescriptor
;
import
java.math.BigInteger
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
...
...
@@ -1287,6 +1290,136 @@ public class PointServiceImpl implements IPointService {
return
rContent
;
}
@Override
public
List
<
HashMap
<
String
,
Object
>>
getSumPtByRoleNew
(
String
orgcode
)
{
List
<
HashMap
<
String
,
Object
>>
content
=
null
;
content
=
pointMapper
.
getSumPtForDeptNew
(
orgcode
);
List
<
Map
<
String
,
String
>>
statusEnums
=
PointStatusEnum
.
getEnumList
();
List
<
HashMap
<
String
,
Object
>>
rContent
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
statusEnum
:
statusEnums
)
{
String
code
=
statusEnum
.
get
(
"value"
);
boolean
isCreate
=
true
;
for
(
HashMap
<
String
,
Object
>
c
:
content
)
{
if
(
code
.
equals
(
c
.
get
(
"status"
)))
{
isCreate
=
false
;
rContent
.
add
(
c
);
break
;
}
}
if
(
isCreate
)
{
HashMap
<
String
,
Object
>
temp
=
new
HashMap
<>();
temp
.
put
(
"name"
,
statusEnum
.
get
(
"name"
));
temp
.
put
(
"value"
,
0
);
rContent
.
add
(
temp
);
}
}
return
rContent
;
}
@Override
public
HashMap
<
String
,
Object
>
getCheckPtListNew
(
String
orgCode
,
CommonPageable
commonPageable
)
{
CheckPtListPageParam
param
=
new
CheckPtListPageParam
();
long
total
=
pointMapper
.
getCheckPointCountNew
(
param
);
List
<
CheckPtListBo
>
content
=
pointMapper
.
getCheckPointListNew
(
param
);
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
param
.
setOrgCode
(
orgCode
);
Page
<
CheckPtListBo
>
result
=
new
PageImpl
<
CheckPtListBo
>(
content
,
param
,
total
);
List
<
HashMap
<
String
,
Object
>>
colModel
=
new
ArrayList
<>();
HashMap
<
String
,
Object
>
temph1
=
new
HashMap
<>();
temph1
.
put
(
"fid"
,
"no"
);
temph1
.
put
(
"dataIndex"
,
"no"
);
temph1
.
put
(
"name"
,
"编号"
);
temph1
.
put
(
"title"
,
"编号"
);
temph1
.
put
(
"type"
,
"no"
);
temph1
.
put
(
"key"
,
"no"
);
HashMap
<
String
,
Object
>
temph2
=
new
HashMap
<>();
temph2
.
put
(
"fid"
,
"name"
);
temph2
.
put
(
"dataIndex"
,
"name"
);
temph2
.
put
(
"name"
,
"名称"
);
temph2
.
put
(
"title"
,
"名称"
);
temph2
.
put
(
"type"
,
"name"
);
temph2
.
put
(
"key"
,
"name"
);
HashMap
<
String
,
Object
>
temph3
=
new
HashMap
<>();
temph3
.
put
(
"fid"
,
"level"
);
temph3
.
put
(
"dataIndex"
,
"level"
);
temph3
.
put
(
"name"
,
"等级"
);
temph3
.
put
(
"title"
,
"等级"
);
temph3
.
put
(
"type"
,
"level"
);
temph3
.
put
(
"key"
,
"level"
);
HashMap
<
String
,
Object
>
temph4
=
new
HashMap
<>();
temph4
.
put
(
"fid"
,
"groupName"
);
temph4
.
put
(
"dataIndex"
,
"groupName"
);
temph4
.
put
(
"name"
,
"单位"
);
temph4
.
put
(
"title"
,
"单位"
);
temph4
.
put
(
"type"
,
"groupName"
);
temph4
.
put
(
"key"
,
"groupName"
);
HashMap
<
String
,
Object
>
temph5
=
new
HashMap
<>();
temph5
.
put
(
"fid"
,
"realName"
);
temph5
.
put
(
"dataIndex"
,
"realName"
);
temph5
.
put
(
"name"
,
"责任人"
);
temph5
.
put
(
"title"
,
"责任人"
);
temph5
.
put
(
"type"
,
"realName"
);
temph5
.
put
(
"key"
,
"realName"
);
HashMap
<
String
,
Object
>
temph6
=
new
HashMap
<>();
temph6
.
put
(
"fid"
,
"realTimeStatus"
);
temph6
.
put
(
"dataIndex"
,
"realTimeStatus"
);
temph6
.
put
(
"name"
,
"状态"
);
temph6
.
put
(
"title"
,
"状态"
);
temph6
.
put
(
"type"
,
"realTimeStatus"
);
temph6
.
put
(
"key"
,
"realTimeStatus"
);
HashMap
<
String
,
Object
>
temph7
=
new
HashMap
<>();
temph7
.
put
(
"fid"
,
"checkTime"
);
temph7
.
put
(
"dataIndex"
,
"checkTime"
);
temph7
.
put
(
"name"
,
"最新更新时间"
);
temph7
.
put
(
"title"
,
"最新更新时间"
);
temph7
.
put
(
"type"
,
"checkTime"
);
temph7
.
put
(
"key"
,
"checkTime"
);
HashMap
<
String
,
Object
>
temph8
=
new
HashMap
<>();
temph8
.
put
(
"fid"
,
"errorMsg"
);
temph8
.
put
(
"dataIndex"
,
"errorMsg"
);
temph8
.
put
(
"name"
,
"最新异常内容"
);
temph8
.
put
(
"title"
,
"最新异常内容"
);
temph8
.
put
(
"type"
,
"errorMsg"
);
temph8
.
put
(
"key"
,
"errorMsg"
);
colModel
.
add
(
temph1
);
colModel
.
add
(
temph2
);
colModel
.
add
(
temph3
);
colModel
.
add
(
temph4
);
colModel
.
add
(
temph5
);
colModel
.
add
(
temph6
);
colModel
.
add
(
temph7
);
colModel
.
add
(
temph8
);
HashMap
<
String
,
Object
>
dataGridMock
=
new
HashMap
<>();
dataGridMock
.
put
(
"current"
,
result
.
getNumber
());
dataGridMock
.
put
(
"total"
,
result
.
getTotalElements
());
dataGridMock
.
put
(
"pagination"
,
true
);
dataGridMock
.
put
(
"totalPage"
,
result
.
getTotalPages
());
dataGridMock
.
put
(
"dataList"
,
result
.
getContent
());
dataGridMock
.
put
(
"pageSize"
,
result
.
getSize
());
HashMap
<
String
,
Object
>
DATE
=
new
HashMap
<>();
DATE
.
put
(
"dataGridMock"
,
dataGridMock
);
DATE
.
put
(
"colModel"
,
colModel
);
return
DATE
;
}
@Override
public
Page
<
CheckPtListBo
>
getCheckPtList
(
String
toke
,
String
product
,
String
appKey
,
CheckPtListPageParam
param
)
{
long
total
=
pointMapper
.
getCheckPointCount
(
param
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/ICheckService.java
View file @
30807b5a
...
...
@@ -134,6 +134,7 @@ public interface ICheckService {
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getCountMonthChkByRole
(
HashMap
<
String
,
Object
>
paramMap
,
String
dateMonth
);
List
<
HashMap
<
String
,
Object
>>
getCountMonthChkByRoleNew
(
String
orgcode
);
/**
* 风险点信息列表查询条件
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanTaskService.java
View file @
30807b5a
...
...
@@ -6,6 +6,7 @@ import java.util.List;
import
java.util.Map
;
import
com.yeejoin.amos.patrol.business.util.Toke
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
org.springframework.data.domain.Page
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.CheckChkExListBo
;
...
...
@@ -132,7 +133,7 @@ public interface IPlanTaskService {
* @return
*/
Page
<
CheckChkExListBo
>
getChkExList
(
String
toke
,
String
product
,
String
appKey
,
CheckPtListPageParam
params
);
HashMap
<
String
,
Object
>
getChkExListNew
(
String
orgCode
,
CommonPageable
commonPageable
);
/**
* 根据id获取执行计划
* @param ids
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPointService.java
View file @
30807b5a
...
...
@@ -252,6 +252,8 @@ public interface IPointService {
*/
List
<
HashMap
<
String
,
Object
>>
getSumPtByRole
(
HashMap
<
String
,
Object
>
paramMap
);
List
<
HashMap
<
String
,
Object
>>
getSumPtByRoleNew
(
String
orgCode
);
/**
* 导入导入巡检点数据
*
...
...
@@ -266,7 +268,7 @@ public interface IPointService {
* @return
*/
Page
<
CheckPtListBo
>
getCheckPtList
(
String
toke
,
String
product
,
String
appKey
,
CheckPtListPageParam
params
);
HashMap
<
String
,
Object
>
getCheckPtListNew
(
String
orgCode
,
CommonPageable
commonPageable
);
/**
* 风险点详细信息查询
*
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
30807b5a
...
...
@@ -827,6 +827,71 @@
</select>
<select
id=
"getCountMonthChkNewXIN"
resultType=
"java.util.HashMap"
>
SELECT
T_DATE.checkDate,
(
SELECT
count( 1 )
FROM
P_PLAN_TASK ppt
RIGHT JOIN P_PLAN_TASK_DETAIL pptd ON ppt.ID = pptd.TASK_NO
WHERE
ppt.org_code LIKE CONCAT( #{orgCode}, '%' ) and t_date.checkDate BETWEEN DATE_FORMAT( ppt.BEGIN_TIME, '%Y-%m-%d' )
AND DATE_FORMAT( ppt.END_TIME, '%Y-%m-%d' )
) AS proNum,
(
SELECT
count( 1 )
FROM
P_CHECK pc
WHERE
pc.org_code LIKE CONCAT( #{orgCode}, '%' ) and
DATE_FORMAT( pc.CHECK_TIME, '%Y-%m-%d' ) = t_date.checkDate
AND pc.IS_OK = 3
) AS forNum,
(
SELECT
count( 1 )
FROM
P_CHECK pc
WHERE
pc.org_code LIKE CONCAT( #{orgCode}, '%' ) and
DATE_FORMAT( pc.CHECK_TIME, '%Y-%m-%d' ) = t_date.checkDate
AND pc.IS_OK != 3
) AS actualNum
FROM
(
SELECT
DATE_FORMAT(
DATE_ADD( DATE_ADD( CURDATE( ), INTERVAL - DAY ( CURDATE( ) ) + 1 DAY ), INTERVAL b.help_topic_id DAY ),
'%Y-%m-%d'
) AS checkDate
FROM
( SELECT 1 ) a
JOIN mysql.help_topic b ON b.help_topic_id
<![CDATA[<]]>
(
DATEDIFF( LAST_DAY( CURDATE( ) ), DATE_ADD( CURDATE( ), INTERVAL - DAY ( CURDATE( ) ) + 1 DAY ) ) + 1
)
) AS t_date
</select>
<select
id=
"getCountMonthChkNew"
resultType=
"java.util.HashMap"
>
SELECT
T_DATE.checkDate
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
30807b5a
...
...
@@ -530,6 +530,23 @@
And (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )
</if>
</select>
<!-- 巡检执行情况统计分页用 -->
<select
id=
"countChkExListDataNew"
resultType=
"long"
>
select
count(A.ID) total_num
from
p_plan_task a,
p_plan b
<!-- s_user c -->
WHERE
<!-- A.USER_ID = C.ID AND -->
A.PLAN_ID = B.ID
<if
test=
"checkDate!=null"
>
and date_format(a.begin_time, '%Y%m%d')
<![CDATA[<=]]>
#{checkDate} and date_format(a.end_time, '%Y%m%d') >= #{checkDate}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
And a.org_code LIKE CONCAT( #{orgCode}, '%' )
</if>
</select>
<resultMap
id=
"ChkExResultMap"
type=
"com.yeejoin.amos.patrol.business.entity.mybatis.CheckChkExListBo"
>
</resultMap>
...
...
@@ -559,6 +576,58 @@
</choose>
</select>
<!-- 巡检执行情况查询 -->
<select
id=
"getChkExListNew"
resultMap=
"ChkExResultMap"
>
select
a.id,
b.name,
date_format(a.begin_time, '%Y-%m-%d %H:%i:%s') lastTime,
date_format(a.end_time, '%Y-%m-%d %H:%i:%s') as endTime,
CASE a.finish_status
WHEN '0' THEN
'未开始'
WHEN '1' THEN
'进行中'
WHEN '2' THEN
'已结束'
ELSE
'已超时'
END finishStatus,
a.user_name realName
from
p_plan_task a,
p_plan b
WHERE A.PLAN_ID = B.ID
<if
test=
"checkDate!=null"
>
and date_format(a.begin_time, '%Y%m%d')
<![CDATA[<=]]>
#{checkDate} and date_format(a.end_time, '%Y%m%d') >= #{checkDate}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
And a.org_code LIKE CONCAT( #{orgCode}, '%' )
</if>
order by a.id
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
<select
id=
"getPlanTaskStatisticsForApp"
resultType=
"Map"
>
SELECT
count(1) total,
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/pointMapper.xml
View file @
30807b5a
...
...
@@ -507,6 +507,48 @@
) VP
) tt group by tt.RealTimeStatus,tt.status order by status
</select>
<!-- 巡检点统计 -->
<select
id=
"getSumPtForDeptNew"
resultType=
"java.util.HashMap"
>
SELECT RealTimeStatus as name,status,count(1) as value
FROM
(select
case vp.status
when '1' then '合格'
when '2' then '不合格'
when '3' then '漏检'
else '未纳入巡检计划'
end as realTimeStatus,
vp.status
from
(select status ,id FROM p_point
where is_delete = 0
<if
test=
"orgCode!=null"
>
and biz_org_code LIKE CONCAT( #{orgCode}, '%' )
</if>
) VP
) tt group by tt.RealTimeStatus,tt.status order by status
</select>
<!-- 风险点分页统计,业务屏使用 -->
<select
id=
"getCheckPointCount"
resultType=
"long"
>
SELECT
...
...
@@ -521,6 +563,75 @@
<if
test=
"checkStatus!=null"
>
and FIND_IN_SET(status,#{checkStatus})
</if>
<if
test=
"name!=null"
>
and name like concat( '%',#{name},'%')
</if>
</select>
<select
id=
"getCheckPointCountNew"
resultType=
"long"
>
SELECT
count(1)
FROM p_point
where is_delete = 0
<if
test=
"orgCode!=null"
>
and biz_org_code LIKE CONCAT( #{orgCode}, '%' )
</if>
<if
test=
"level!=null"
>
and Level = #{level}
</if>
<if
test=
"checkType!=null"
>
and catalog_id = #{checkType}
</if>
<if
test=
"groupId!=null"
>
AND charge_dept_id = #{groupId}
</if>
<if
test=
"userId!=null"
>
and charge_person_id = #{userId}
</if>
<if
test=
"checkStatus!=null"
>
and FIND_IN_SET(status,#{checkStatus})
</if>
<if
test=
"name!=null"
>
and name like concat( '%',#{name},'%')
</if>
</select>
<select
id=
"getCheckPointListNew"
resultMap=
"checkPtListResultMap"
>
SELECT
p. NAME,
p.id,
p.point_no,
CASE p. LEVEL
WHEN '1' THEN
'一级'
WHEN '2' THEN
'二级'
WHEN '3' THEN
'三级'
WHEN '4' THEN
'四级'
WHEN '5' THEN
'五级'
ELSE
'一级'
END LEVEL,
p.biz_org_name department_name,
p.charge_person_name userName,
CASE p. STATUS
WHEN '0' THEN
'未纳入巡检计划'
WHEN '1' THEN
'合格'
WHEN '2' THEN
'不合格'
WHEN '3' THEN
'漏检'
ELSE
'合格'
END AS STATUS,
DATE_FORMAT(
P.check_Time,
'%Y-%m-%d %H:%i:%s'
) checkTime,
p.error errorMsg
FROM p_point p
where p.is_delete = 0
<if
test=
"orgCode!=null"
>
and biz_org_code LIKE CONCAT( #{orgCode}, '%' )
</if>
<if
test=
"level!=null"
>
and p.Level = #{level}
</if>
<if
test=
"checkType!=null"
>
and p.catalog_id = #{checkType}
</if>
<if
test=
"groupId!=null"
>
AND p.charge_dept_id = #{groupId}
</if>
<if
test=
"userId!=null"
>
and p.charge_person_id = #{userId}
</if>
<if
test=
"checkStatus!=null"
>
and FIND_IN_SET(p.status,#{checkStatus})
</if>
<if
test=
"name!=null"
>
and (p.name like concat( '%',#{name},'%') or p.point_no like concat( '%',#{name},'%'))
</if>
order by checkTime DESC
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
<resultMap
id=
"checkPtListResultMap"
type=
"com.yeejoin.amos.patrol.business.entity.mybatis.CheckPtListBo"
>
<result
property=
"pointID"
column=
"id"
/>
<result
property=
"no"
column=
"point_no"
/>
...
...
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