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
1771d2de
Commit
1771d2de
authored
Jan 10, 2022
by
helinlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加防火监督检查记录照片查看
parent
0fe04b5e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
86 deletions
+121
-86
CheckController.java
...amos/supervision/business/controller/CheckController.java
+10
-0
CheckMapper.java
...oin/amos/supervision/business/dao/mapper/CheckMapper.java
+2
-0
CheckServiceImpl.java
...s/supervision/business/service/impl/CheckServiceImpl.java
+5
-2
ICheckService.java
...mos/supervision/business/service/intfc/ICheckService.java
+2
-0
CheckVo.java
...ava/com/yeejoin/amos/supervision/business/vo/CheckVo.java
+4
-1
dbTemplate_check.xml
...rvision/src/main/resources/db/mapper/dbTemplate_check.xml
+98
-83
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/CheckController.java
View file @
1771d2de
...
@@ -586,4 +586,14 @@ public class CheckController extends AbstractBaseController {
...
@@ -586,4 +586,14 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
page
);
return
CommonResponseUtil
.
success
(
page
);
}
}
/**
* 根据检查记录查询照片
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据检查记录查询照片"
,
notes
=
"根据检查记录查询照片"
)
@RequestMapping
(
value
=
"/getPictureByCheckId"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPictureByCheckId
(
@ApiParam
(
value
=
"检查记录ID"
)
@RequestParam
String
checkId
)
{
List
<
String
>
pictures
=
checkService
.
getPictureByCheckId
(
checkId
);
return
CommonResponseUtil
.
success
(
pictures
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/CheckMapper.java
View file @
1771d2de
...
@@ -295,4 +295,6 @@ public interface CheckMapper extends BaseMapper {
...
@@ -295,4 +295,6 @@ public interface CheckMapper extends BaseMapper {
long
queryPageCount
(
CheckPageParam
param
);
long
queryPageCount
(
CheckPageParam
param
);
List
<
CheckVo
>
queryPage
(
CheckPageParam
param
);
List
<
CheckVo
>
queryPage
(
CheckPageParam
param
);
List
<
String
>
getPictureByCheckId
(
String
checkId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/CheckServiceImpl.java
View file @
1771d2de
...
@@ -1577,7 +1577,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1577,7 +1577,7 @@ public class CheckServiceImpl implements ICheckService {
Plan
plan
=
planService
.
queryPlanById
(
planTask
.
getPlanId
());
Plan
plan
=
planService
.
queryPlanById
(
planTask
.
getPlanId
());
// 计划完成,规则推送消息
// 计划完成,规则推送消息
if
(
PlanStatusEnum
.
COMPLETED
.
getValue
()
==
plan
.
getStatus
()){
if
(
PlanStatusEnum
.
COMPLETED
.
getValue
()
==
plan
.
getStatus
())
{
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
计划完成
);
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
计划完成
);
}
}
...
@@ -1685,5 +1685,8 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1685,5 +1685,8 @@ public class CheckServiceImpl implements ICheckService {
return
result
;
return
result
;
}
}
@Override
public
List
<
String
>
getPictureByCheckId
(
String
checkId
)
{
return
checkMapper
.
getPictureByCheckId
(
checkId
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/ICheckService.java
View file @
1771d2de
...
@@ -282,4 +282,6 @@ public interface ICheckService {
...
@@ -282,4 +282,6 @@ public interface ICheckService {
int
checkHasRecord
(
Long
planTaskId
,
Long
pointId
);
int
checkHasRecord
(
Long
planTaskId
,
Long
pointId
);
Page
<
CheckVo
>
queryPage
(
CheckPageParam
criterias
);
Page
<
CheckVo
>
queryPage
(
CheckPageParam
criterias
);
List
<
String
>
getPictureByCheckId
(
String
checkId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/vo/CheckVo.java
View file @
1771d2de
...
@@ -9,7 +9,10 @@ import java.util.Date;
...
@@ -9,7 +9,10 @@ import java.util.Date;
*/
*/
@Data
@Data
public
class
CheckVo
{
public
class
CheckVo
{
/**
* checkId
*/
private
Long
checkId
;
/**
/**
* 主键id
* 主键id
*/
*/
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
1771d2de
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<if
test=
"catalogId!=null"
>
and b.Catalog_Id = #{catalogId}
</if>
<if
test=
"catalogId!=null"
>
and b.Catalog_Id = #{catalogId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"pointId!=null"
>
and a.point_id = #{pointId}
</if>
<if
test=
"pointId!=null"
>
and a.point_id = #{pointId}
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<choose>
<choose>
<when
test=
"finishStatus == 0"
>
and (`a`.`plan_task_detail_id` = 0 OR `a`.`plan_task_detail_id` is
<when
test=
"finishStatus == 0"
>
and (`a`.`plan_task_detail_id` = 0 OR `a`.`plan_task_detail_id` is
null)
null)
...
@@ -109,7 +109,8 @@
...
@@ -109,7 +109,8 @@
LEFT JOIN `p_route` `d` ON `a`.`route_id` = `d`.`id`
LEFT JOIN `p_route` `d` ON `a`.`route_id` = `d`.`id`
LEFT JOIN `p_plan` `e` ON `a`.`plan_id` = `e`.`id`
LEFT JOIN `p_plan` `e` ON `a`.`plan_id` = `e`.`id`
<if
test=
"dangerId != null and dangerId != ''"
>
<if
test=
"dangerId != null and dangerId != ''"
>
LEFT JOIN ( SELECT check_id, GROUP_CONCAT( latent_danger_id ) dangerIds FROM p_latent_danger_patrol GROUP BY check_id ) t ON t.check_id = a.id
LEFT JOIN ( SELECT check_id, GROUP_CONCAT( latent_danger_id ) dangerIds FROM p_latent_danger_patrol GROUP BY
check_id ) t ON t.check_id = a.id
</if>
</if>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"beginDate!=null and endDate!=null"
>
and a.check_time BETWEEN #{beginDate} and #{endDate}
</if>
<if
test=
"beginDate!=null and endDate!=null"
>
and a.check_time BETWEEN #{beginDate} and #{endDate}
</if>
...
@@ -127,7 +128,7 @@
...
@@ -127,7 +128,7 @@
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"pointId!=null"
>
and a.point_id = #{pointId}
</if>
<if
test=
"pointId!=null"
>
and a.point_id = #{pointId}
</if>
<if
test=
"checkTime!=null"
>
and TO_DAYS(a.check_time) = TO_DAYS('${checkTime}')
</if>
<if
test=
"checkTime!=null"
>
and TO_DAYS(a.check_time) = TO_DAYS('${checkTime}')
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<if
test=
"checkType == '计划检查'"
>
and a.plan_task_id
>
0
</if>
<if
test=
"checkType == '计划检查'"
>
and a.plan_task_id
>
0
</if>
<if
test=
"checkType == '无计划检查'"
>
and a.plan_task_id
<
= 0
</if>
<if
test=
"checkType == '无计划检查'"
>
and a.plan_task_id
<
= 0
</if>
<choose>
<choose>
...
@@ -211,7 +212,8 @@
...
@@ -211,7 +212,8 @@
order by ci.order_no
order by ci.order_no
</select>
</select>
<select
id=
"findCheckPointInputItem"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
<select
id=
"findCheckPointInputItem"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
parameterType=
"long"
>
SELECT
SELECT
pp.id pointId,
pp.id pointId,
...
@@ -250,16 +252,16 @@
...
@@ -250,16 +252,16 @@
order by pci.order_no
order by pci.order_no
</select>
</select>
<!-- <select id="checkHasRecord" resultType="int">-->
<!-- <select id="checkHasRecord" resultType="int">-->
<!-- SELECT-->
<!-- SELECT-->
<!-- count(1) num-->
<!-- count(1) num-->
<!-- FROM-->
<!-- FROM-->
<!-- p_check c-->
<!-- p_check c-->
<!-- WHERE-->
<!-- WHERE-->
<!-- is_ok in (1,2)-->
<!-- is_ok in (1,2)-->
<!-- and c.point_id = #{pointId}-->
<!-- and c.point_id = #{pointId}-->
<!-- and c.plan_task_id = #{planTaskId}-->
<!-- and c.plan_task_id = #{planTaskId}-->
<!-- </select>-->
<!-- </select>-->
<select
id=
"pieChartData"
resultType=
"Map"
>
<select
id=
"pieChartData"
resultType=
"Map"
>
SELECT
SELECT
...
@@ -475,7 +477,7 @@
...
@@ -475,7 +477,7 @@
<when
test=
"finishStatus == 1"
>
and (`a`.`plan_task_detail_id` != 0 AND `a`.`is_ok` != 3)
</when>
<when
test=
"finishStatus == 1"
>
and (`a`.`plan_task_detail_id` != 0 AND `a`.`is_ok` != 3)
</when>
<when
test=
"finishStatus == 2"
>
and `a`.`is_ok` = 3
</when>
<when
test=
"finishStatus == 2"
>
and `a`.`is_ok` = 3
</when>
</choose>
</choose>
<if
test=
"departmentId!=null"
>
and find_in_set(#{departmentId},a.dep_id)>0
</if>
<if
test=
"departmentId!=null"
>
and find_in_set(#{departmentId},a.dep_id)>0
</if>
</trim>
</trim>
</select>
</select>
...
@@ -795,12 +797,13 @@
...
@@ -795,12 +797,13 @@
FROM
FROM
p_point_classify classify
p_point_classify classify
<where>
<where>
classify.id IN ( SELECT pci.point_classify_id FROM p_check_input pci WHERE
<if
test=
"checkID != null"
>
pci.check_id = #{checkID}
</if>
)
classify.id IN ( SELECT pci.point_classify_id FROM p_check_input pci WHERE
<if
test=
"checkID != null"
>
pci.check_id = #{checkID}
</if>
)
</where>
</where>
</select>
</select>
<!-- 根据巡检记录ID和巡检点ID获取巡检项信息 -->
<!-- 根据巡检记录ID和巡检点ID获取巡检项信息 -->
<select
id=
"getCheckInputByCheckId"
resultMap=
"checkInputResultMap"
>
<select
id=
"getCheckInputByCheckId"
resultMap=
"checkInputResultMap"
>
SELECT
SELECT
...
@@ -856,7 +859,8 @@
...
@@ -856,7 +859,8 @@
FROM p_check_input pci WHERE
FROM p_check_input pci WHERE
<if
test=
"pointID != null"
>
<if
test=
"pointID != null"
>
pci.check_id = #{checkID}
pci.check_id = #{checkID}
</if>
)
</if>
)
</select>
</select>
<!-- 根据巡检记录ID和巡检点ID获取巡检项信息 -->
<!-- 根据巡检记录ID和巡检点ID获取巡检项信息 -->
<select
id=
"getEquipInputByCheckId"
resultType=
"java.util.HashMap"
>
<select
id=
"getEquipInputByCheckId"
resultType=
"java.util.HashMap"
>
...
@@ -1092,7 +1096,8 @@
...
@@ -1092,7 +1096,8 @@
<!-- 风险点最新巡检信息查询,3d屏使用 -->
<!-- 风险点最新巡检信息查询,3d屏使用 -->
<resultMap
id=
"planRoutePointResultMap"
type=
"com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo"
>
<resultMap
id=
"planRoutePointResultMap"
type=
"com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo"
>
<result
property=
"routeName"
column=
"route_name"
/>
<result
property=
"routeName"
column=
"route_name"
/>
<result
property=
"planName"
column=
"plan_name"
/>
<result
property=
"planName"
column=
"plan_name"
/>
<result
property=
"deptName"
column=
"department_name"
/>
<result
property=
"deptName"
column=
"department_name"
/>
...
@@ -1189,7 +1194,7 @@
...
@@ -1189,7 +1194,7 @@
) sa
) sa
<where>
<where>
c.plan_id = sa.id
c.plan_id = sa.id
<if
test=
"userId != null"
>
AND find_in_set(#{userId}, sa.user_id) >0
</if>
<if
test=
"userId != null"
>
AND find_in_set(#{userId}, sa.user_id) >0
</if>
<if
test=
"checkDate != null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = DATE_FORMAT(#{checkDate}, '%Y%m%d')
<if
test=
"checkDate != null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = DATE_FORMAT(#{checkDate}, '%Y%m%d')
</if>
</if>
</where>
</where>
...
@@ -1235,7 +1240,7 @@
...
@@ -1235,7 +1240,7 @@
) sa
) sa
WHERE
WHERE
d.plan_id = sa.planID
d.plan_id = sa.planID
<if
test=
"userId != null"
>
AND find_in_set(#{userId},
sa.userID)>0
</if>
<if
test=
"userId != null"
>
AND find_in_set(#{userId},
sa.userID)>0
</if>
<if
test=
"checkDate != null"
>
AND DATE_FORMAT(d.check_time, '%y%m%d') = #{checkDate}
</if>
<if
test=
"checkDate != null"
>
AND DATE_FORMAT(d.check_time, '%y%m%d') = #{checkDate}
</if>
ORDER BY d.id DESC
ORDER BY d.id DESC
) temp_row
) temp_row
...
@@ -1685,7 +1690,7 @@
...
@@ -1685,7 +1690,7 @@
ADDDATE(#{startTime} , INTERVAL @d DAY)
<![CDATA[ < ]]>
DATE_FORMAT(#{endTime}, '%Y-%m-%d')
ADDDATE(#{startTime} , INTERVAL @d DAY)
<![CDATA[ < ]]>
DATE_FORMAT(#{endTime}, '%Y-%m-%d')
) d LEFT JOIN p_check c ON DATE_FORMAT(c.check_time, '%Y-%m-%d') = d.date
) d LEFT JOIN p_check c ON DATE_FORMAT(c.check_time, '%Y-%m-%d') = d.date
<if
test=
" orgCode != null and orgCode != '' "
>
and position( #{orgCode} in c.org_code )
</if>
<if
test=
" orgCode != null and orgCode != '' "
>
and position( #{orgCode} in c.org_code )
</if>
<if
test=
" userId != null and userId != '' "
>
and find_in_set(#{userId}, c.user_id)>0
</if>
<if
test=
" userId != null and userId != '' "
>
and find_in_set(#{userId}, c.user_id)>0
</if>
<if
test=
"type == 1"
>
and c.is_ok != #{param}
</if>
<if
test=
"type == 1"
>
and c.is_ok != #{param}
</if>
<if
test=
"type == 2"
>
and c.plan_id != #{param}
</if>
<if
test=
"type == 2"
>
and c.plan_id != #{param}
</if>
<if
test=
"type == 3"
>
and c.is_ok = #{param}
</if>
<if
test=
"type == 3"
>
and c.is_ok = #{param}
</if>
...
@@ -1698,50 +1703,50 @@
...
@@ -1698,50 +1703,50 @@
</select>
</select>
<!-- 巡检记录查询 -->
<!-- 巡检记录查询 -->
<!-- <select id="getCheckInfoList1" resultMap="CheckInfoResultMap">-->
<!-- <select id="getCheckInfoList1" resultMap="CheckInfoResultMap">-->
<!-- select * from (-->
<!-- select * from (-->
<!-- SELECT-->
<!-- SELECT-->
<!-- DATE_FORMAT(c.check_time, '%Y-%m-%d %T') as checkTime,-->
<!-- DATE_FORMAT(c.check_time, '%Y-%m-%d %T') as checkTime,-->
<!-- c.user_id as UserID,-->
<!-- c.user_id as UserID,-->
<!-- c.point_id as PointID,-->
<!-- c.point_id as PointID,-->
<!-- c.id as CheckID,-->
<!-- c.id as CheckID,-->
<!-- c.is_ok as IsOK,-->
<!-- c.is_ok as IsOK,-->
<!-- c.error as ErrorMsg,-->
<!-- c.error as ErrorMsg,-->
<!-- c.plan_task_id as ErrorID,-->
<!-- c.plan_task_id as ErrorID,-->
<!-- p.name as pointName,-->
<!-- p.name as pointName,-->
<!-- c.dep_name as NAME,-->
<!-- c.dep_name as NAME,-->
<!-- c.dep_id as GroupID,-->
<!-- c.dep_id as GroupID,-->
<!-- c.user_name as RealName,-->
<!-- c.user_name as RealName,-->
<!-- (SELECT-->
<!-- (SELECT-->
<!-- GROUP_CONCAT(-->
<!-- GROUP_CONCAT(-->
<!-- IFNULL(case when u.mobile = '' or u.mobile is null then null else u.mobile END,u.telephone)-->
<!-- IFNULL(case when u.mobile = '' or u.mobile is null then null else u.mobile END,u.telephone)-->
<!-- )-->
<!-- )-->
<!-- FROM-->
<!-- FROM-->
<!-- s_user u-->
<!-- s_user u-->
<!-- WHERE-->
<!-- WHERE-->
<!-- find_in_set(u.id,c.user_id)>0) as LoginName,-->
<!-- find_in_set(u.id,c.user_id)>0) as LoginName,-->
<!-- c.org_code as orgCode-->
<!-- c.org_code as orgCode-->
<!-- FROM-->
<!-- FROM-->
<!-- p_check c,-->
<!-- p_check c,-->
<!-- p_point p-->
<!-- p_point p-->
<!-- where-->
<!-- where-->
<!-- p.id =c.point_id ) as a-->
<!-- p.id =c.point_id ) as a-->
<!-- <trim prefix="WHERE" prefixOverrides="AND ">-->
<!-- <trim prefix="WHERE" prefixOverrides="AND ">-->
<!-- <if test="pointID!=null">AND a.PointID = #{pointID}</if>-->
<!-- <if test="pointID!=null">AND a.PointID = #{pointID}</if>-->
<!-- <if test="checkTime!=null">AND DATE_FORMAT(a.CheckTime, '%Y%m%d') = #{checkTime}</if>-->
<!-- <if test="checkTime!=null">AND DATE_FORMAT(a.CheckTime, '%Y%m%d') = #{checkTime}</if>-->
<!-- <if test="userID!=null and userID!=-1 ">AND find_in_set(#{userID}, a.userID)>0 </if>-->
<!-- <if test="userID!=null and userID!=-1 ">AND find_in_set(#{userID}, a.userID)>0 </if>-->
<!-- <if test="status!=null">AND a.IsOK = #{status}</if>-->
<!-- <if test="status!=null">AND a.IsOK = #{status}</if>-->
<!-- <if test="userName!=null">AND a.RealName LIKE concat(concat("%",#{userName}),"%")</if>-->
<!-- <if test="userName!=null">AND a.RealName LIKE concat(concat("%",#{userName}),"%")</if>-->
<!-- <if test="groupId!=null">AND find_in_set(#{groupId}, a.GroupID)>0</if>-->
<!-- <if test="groupId!=null">AND find_in_set(#{groupId}, a.GroupID)>0</if>-->
<!-- <if test="pointName!=null">AND a.pointName LIKE concat(concat("%",#{pointName}),"%")</if>-->
<!-- <if test="pointName!=null">AND a.pointName LIKE concat(concat("%",#{pointName}),"%")</if>-->
<!-- <if test="orgCode!=null">AND a.orgCode LIKE #{orgCode}</if>-->
<!-- <if test="orgCode!=null">AND a.orgCode LIKE #{orgCode}</if>-->
<!-- </trim>-->
<!-- </trim>-->
<!-- <choose>-->
<!-- <choose>-->
<!-- <when test="pageSize==-1"></when>-->
<!-- <when test="pageSize==-1"></when>-->
<!-- <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>-->
<!-- <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>-->
<!-- </choose>-->
<!-- </choose>-->
<!-- </select>!–>-->
<!-- </select>!–>-->
<select
id=
"getCheckInfoList1"
resultType=
"Map"
>
<select
id=
"getCheckInfoList1"
resultType=
"Map"
>
select
select
...
@@ -1763,7 +1768,7 @@
...
@@ -1763,7 +1768,7 @@
where c.point_id = p.id
where c.point_id = p.id
<if
test=
"pointID!=null"
>
AND c.point_id = #{pointID}
</if>
<if
test=
"pointID!=null"
>
AND c.point_id = #{pointID}
</if>
<if
test=
"checkTime!=null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = #{checkTime}
</if>
<if
test=
"checkTime!=null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = #{checkTime}
</if>
<if
test=
"userID!=null and userID!=-1 "
>
AND find_in_set(#{userID}, c.user_id)>0
</if>
<if
test=
"userID!=null and userID!=-1 "
>
AND find_in_set(#{userID}, c.user_id)>0
</if>
<if
test=
"status!=null"
>
AND c.is_ok = #{status}
</if>
<if
test=
"status!=null"
>
AND c.is_ok = #{status}
</if>
<if
test=
"userName!=null"
>
AND c.error LIKE concat(concat("%",#{userName}),"%")
</if>
<if
test=
"userName!=null"
>
AND c.error LIKE concat(concat("%",#{userName}),"%")
</if>
<if
test=
"groupId!=null"
>
AND find_in_set(#{groupId}, c.dep_id)>0
</if>
<if
test=
"groupId!=null"
>
AND find_in_set(#{groupId}, c.dep_id)>0
</if>
...
@@ -1788,7 +1793,7 @@
...
@@ -1788,7 +1793,7 @@
where c.point_id = p.id
where c.point_id = p.id
<if
test=
"pointID!=null"
>
AND c.point_id = #{pointID}
</if>
<if
test=
"pointID!=null"
>
AND c.point_id = #{pointID}
</if>
<if
test=
"checkTime!=null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = #{checkTime}
</if>
<if
test=
"checkTime!=null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = #{checkTime}
</if>
<if
test=
"userID!=null and userID!=-1 "
>
AND find_in_set(#{userID}, c.user_id)>0
</if>
<if
test=
"userID!=null and userID!=-1 "
>
AND find_in_set(#{userID}, c.user_id)>0
</if>
<if
test=
"status!=null"
>
AND c.is_ok = #{status}
</if>
<if
test=
"status!=null"
>
AND c.is_ok = #{status}
</if>
<if
test=
"userName!=null"
>
AND c.user_name LIKE concat(concat("%",#{userName}),"%")
</if>
<if
test=
"userName!=null"
>
AND c.user_name LIKE concat(concat("%",#{userName}),"%")
</if>
<if
test=
"groupId!=null"
>
AND find_in_set(#{groupId}, c.dep_id)>0
</if>
<if
test=
"groupId!=null"
>
AND find_in_set(#{groupId}, c.dep_id)>0
</if>
...
@@ -1886,8 +1891,8 @@
...
@@ -1886,8 +1891,8 @@
AND (c.org_code=#{orgCode} or c.org_code like CONCAT(#{orgCode},'-%'))
AND (c.org_code=#{orgCode} or c.org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
WHERE 1=1
WHERE 1=1
<if
test=
"startTime !=null and startTime!= '' "
>
AND d.date
<![CDATA[ >= ]]>
#{startTime}
</if>
<if
test=
"startTime !=null and startTime!= '' "
>
AND d.date
<![CDATA[ >= ]]>
#{startTime}
</if>
<if
test=
"endTime !=null and endTime!='' "
>
AND d.date
<![CDATA[ < ]]>
#{endTime}
</if>
<if
test=
"endTime !=null and endTime!='' "
>
AND d.date
<![CDATA[ < ]]>
#{endTime}
</if>
GROUP BY
GROUP BY
d.date
d.date
ORDER BY
ORDER BY
...
@@ -1955,12 +1960,12 @@
...
@@ -1955,12 +1960,12 @@
<if
test=
"teamId != null and teamId != ''"
>
<if
test=
"teamId != null and teamId != ''"
>
AND pp.original_id = #{teamId}
AND pp.original_id = #{teamId}
</if>
</if>
<!-- <if test="status != null and status != ''">-->
<!-- <if test="status != null and status != ''">-->
<!-- AND pc.point_id = #{status}-->
<!-- AND pc.point_id = #{status}-->
<!-- </if>-->
<!-- </if>-->
<!-- <if test="companyName != null and companyName != ''">-->
<!-- <if test="companyName != null and companyName != ''">-->
<!-- AND pc.company_name = #{company_name}-->
<!-- AND pc.company_name = #{company_name}-->
<!-- </if>-->
<!-- </if>-->
limit #{offset},#{pageSize}
limit #{offset},#{pageSize}
</select>
</select>
...
@@ -1999,13 +2004,14 @@
...
@@ -1999,13 +2004,14 @@
<if
test=
"pointId != null and pointId != -1"
>
<if
test=
"pointId != null and pointId != -1"
>
AND pp.id = #{pointId}
AND pp.id = #{pointId}
</if>
</if>
<!-- <if test="orgCode != null">-->
<!-- <if test="orgCode != null">-->
<!-- AND c.org_code = #{orgCode}-->
<!-- AND c.org_code = #{orgCode}-->
<!-- </if>-->
<!-- </if>-->
</where>
</where>
</select>
</select>
<select
id=
"queryPage"
resultType=
"com.yeejoin.amos.supervision.business.vo.CheckVo"
>
<select
id=
"queryPage"
resultType=
"com.yeejoin.amos.supervision.business.vo.CheckVo"
>
SELECT
SELECT
c.id checkId,
i.id,
i.id,
i.`name` inputItemName,
i.`name` inputItemName,
ci.safety_danger_num,
ci.safety_danger_num,
...
@@ -2015,7 +2021,6 @@
...
@@ -2015,7 +2021,6 @@
ci.accompany_user_name,
ci.accompany_user_name,
pp.original_id,
pp.original_id,
pp.name companyName,
pp.name companyName,
IF
IF
( c.check_time IS NULL, 0, 1 ) AS ext
( c.check_time IS NULL, 0, 1 ) AS ext
FROM
FROM
...
@@ -2033,9 +2038,9 @@
...
@@ -2033,9 +2038,9 @@
<if
test=
"pointId != null and pointId != -1"
>
<if
test=
"pointId != null and pointId != -1"
>
AND pp.id = #{pointId}
AND pp.id = #{pointId}
</if>
</if>
<!-- <if test="orgCode != null">-->
<!-- <if test="orgCode != null">-->
<!-- AND c.org_code = #{orgCode}-->
<!-- AND c.org_code = #{orgCode}-->
<!-- </if>-->
<!-- </if>-->
ORDER BY c.check_time DESC
ORDER BY c.check_time DESC
<choose>
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize==-1"
></when>
...
@@ -2043,4 +2048,13 @@
...
@@ -2043,4 +2048,13 @@
</choose>
</choose>
</where>
</where>
</select>
</select>
<select
id=
"getPictureByCheckId"
resultType=
"java.lang.String"
>
SELECT
photo_data
FROM
p_check_shot
WHERE
check_id = #{checkId}
</select>
</mapper>
</mapper>
\ 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