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
e0e8635d
Commit
e0e8635d
authored
Nov 08, 2023
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(patrol): 巡检接口查询数据错误
parent
d968c366
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
205 additions
and
155 deletions
+205
-155
EmergencyController.java
...m/yeejoin/equipmanage/controller/EmergencyController.java
+9
-2
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+3
-3
ControlScreenController.java
...s/patrol/business/controller/ControlScreenController.java
+4
-0
CheckMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/CheckMapper.java
+2
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+1
-1
dbTemplate_check.xml
...-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
+111
-86
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+75
-63
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EmergencyController.java
View file @
e0e8635d
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.config.PersonIdentify
;
...
...
@@ -18,6 +21,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -41,6 +45,9 @@ public class EmergencyController extends AbstractBaseController {
@Autowired
IEmergencyService
iEmergencyService
;
@Autowired
RedisUtils
redisUtils
;
/**
* 通过bizOrgCode过滤
*/
...
...
@@ -48,8 +55,8 @@ public class EmergencyController extends AbstractBaseController {
@ApiOperation
(
"系统状态"
)
@GetMapping
(
value
=
"/system/state"
)
public
ResponseModel
getSystemState
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
get
BizOrgCode
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getCompany
BizOrgCode
();
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getSystemState
(
bizOrgCode
));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
e0e8635d
...
...
@@ -99,10 +99,10 @@ public class CheckController extends AbstractBaseController {
//
// @Value("${file.port}")
// private String filePort;
// @Value("${file.url}")
// private String fileUrl;
@Value
(
"${amosRefresh.patrol.topic}"
)
private
String
patrolTopic
;
@Autowired
...
...
@@ -137,7 +137,7 @@ public class CheckController extends AbstractBaseController {
ReginParams
reginParams
=
getSelectedOrgInfo
();
param
.
setOrderBy
(
"checkDate desc"
);
param
.
setBizOrgCode
(
ObjectUtils
.
isEmpty
(
param
.
getBizOrgCode
())
?
"3"
.
equals
(
param
.
getIsOK
())
?
null
:
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
"3"
.
equals
(
param
.
getIsOK
())
?
null
:
reginParams
.
getPersonIdentity
().
get
Company
BizOrgCode
()
:
param
.
getBizOrgCode
());
if
(
commonPageable
!=
null
){
param
.
setPageNumber
(
commonPageable
.
getPageNumber
()-
1
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/ControlScreenController.java
View file @
e0e8635d
...
...
@@ -43,6 +43,10 @@ public class ControlScreenController extends AbstractBaseController {
@RequestParam
(
required
=
false
)
String
companyCode
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
}
return
CommonResponseUtil
.
success
(
iPlanTaskService
.
getStatics
(
companyCode
,
bizOrgCode
));
}
...
...
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 @
e0e8635d
...
...
@@ -23,6 +23,8 @@ public interface CheckMapper extends BaseMapper {
long
getCheckInfoCount
(
CheckInfoPageParam
param
);
long
getCheckInfoCountNew
(
CheckInfoPageParam
param
);
List
<
Map
>
queryUnqualifiedInputItem
(
@Param
(
value
=
"checkId"
)
int
checkId
);
List
<
Map
>
queryCheckPointInputItem
(
@Param
(
value
=
"planTaskId"
)
int
planTaskId
,
@Param
(
value
=
"pointId"
)
int
pointId
);
...
...
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 @
e0e8635d
...
...
@@ -159,7 +159,7 @@ public class CheckServiceImpl implements ICheckService {
}
public
Page
<
CheckInfoVo
>
getCheckInfoNew
(
String
toke
,
String
product
,
String
appKey
,
CheckInfoPageParam
param
)
{
long
total
=
checkMapper
.
getCheckInfoCount
(
param
);
long
total
=
checkMapper
.
getCheckInfoCount
New
(
param
);
List
<
CheckInfoVo
>
content
=
Lists
.
newArrayList
();
if
(
total
==
0
)
{
return
new
PageImpl
<>(
content
,
param
,
total
);
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
e0e8635d
...
...
@@ -25,9 +25,9 @@
<!--统计-记录统计 -->
<select
id=
"countCheckInfoData"
resultType=
"long"
>
SELECT
count(1) AS total_num
count(1) AS total_num
FROM
`p_check` `a`
`p_check` `a`
<choose>
<when
test=
"pointName!=null or pointNo!=null or isFixed!=null or catalogId!=null"
>
LEFT JOIN `p_point` `b` ON `a`.`point_id` = `b`.`id`
...
...
@@ -118,6 +118,55 @@
</trim>
</select>
<select
id=
"getCheckInfoCountNew"
resultType=
"long"
>
SELECT
COUNT(1)
FROM
`p_check` `a`
LEFT JOIN `p_point` `b` ON `a`.`point_id` = `b`.`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 wl_warehouse_structure wws on wws.id = b.risk_source_id
<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
</if>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"beginDate!=null and beginDate!= ''"
>
and a.check_time
>
= #{beginDate}
</if>
<if
test=
"endDate!=null and endDate!= ''"
>
and a.check_time
<
= #{endDate}
</if>
<if
test=
"userName!=null and userName!=''"
>
and a.user_name like concat(concat("%",#{userName}),"%")
</if>
<if
test=
"pointName!=null and pointName!= ''"
>
and b.name like concat(concat("%",#{pointName}),"%")
</if>
<if
test=
"pointNo!=null and pointNo!=''"
>
and b.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"isFixed!=null and isFixed!=''"
>
and b.is_fixed = #{isFixed}
</if>
<if
test=
"isOK!=null and isOK!=''"
>
and a.is_OK = #{isOK}
</if>
<if
test=
"planId!=null and planId!='' "
>
and a.plan_Id = #{planId}
</if>
<if
test=
"planTaskId!=null and planTaskId!=''"
>
and a.plan_task_id = #{planTaskId}
</if>
<if
test=
"userId!=null and userId!=''"
>
and find_in_set(#{userId}, a.user_id) > 0
</if>
<if
test=
"routeId!=null and routeId!=''"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"catalogId!=null and catalogId!=''"
>
and b.Catalog_Id = #{catalogId}
</if>
<if
test=
"orgCode!=null and orgCode!=''"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"pointId!=null and pointId!=''"
>
and a.point_id = #{pointId}
</if>
<if
test=
"checkTime!=null and checkTime!=''"
>
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=
"checkType == '计划检查'"
>
and a.plan_task_id
>
0
</if>
<if
test=
"checkType == '无计划检查'"
>
and a.plan_task_id
<
= 0
</if>
<choose>
<when
test=
"finishStatus == 0"
>
and (`a`.`plan_task_detail_id` = 0 OR `a`.`plan_task_detail_id` is null)
</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>
</choose>
<if
test=
"dangerId != null and dangerId != ''"
>
and FIND_IN_SET(#{dangerId}, t.dangerIds)
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and a.org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
<if
test=
"searchDay != null and searchDay != ''"
>
and date_format(a.check_time, '%Y-%m-%d') = curdate()
</if>
<if
test=
"isExecute!=null and isExecute!='' and isExecute == '3'"
>
and a.is_OK != #{isExecute}
</if>
</trim>
</select>
<select
id=
"getCheckInfo"
resultMap=
"checkInfoMap"
>
SELECT
a.id,
...
...
@@ -209,85 +258,65 @@
<select
id=
"getCheckInfoNew"
resultMap=
"checkInfoMap"
>
SELECT
a.id,
a.org_code,
a.point_id pointId,
a.point_name,
b.is_fixed,
b.point_no pointNo,
a.user_id,
a.user_name,
a.dep_name department_name,
a.dep_id departmentId,
wws.name address,
date_format(
`a`.`check_time`,
'%Y-%m-%d %H:%i:%s'
) AS `checkDate`,
date_format(
`a`.`upload_time`,
'%Y-%m-%d %H:%i:%s'
) AS `upload_time`,
(
CASE
WHEN `a`.`plan_task_detail_id` = 0 OR `a`.`plan_task_detail_id` is null
THEN '计划外完成'
WHEN `a`.`plan_task_detail_id` != 0 AND `a`.`is_ok` != 3
THEN '按时完成'
WHEN `a`.`is_ok` = 3
THEN '未执行'
END
) AS `Finish_Status`,
(
CASE
WHEN `a`.`is_ok` = 1
THEN '合格'
WHEN `a`.`is_ok` = 2
THEN '不合格'
WHEN `a`.`is_ok` = 3
THEN '漏检'
END
) as is_ok,
a.score,
a.`route_name`,
(
CASE
WHEN a.check_mode = 'QR'
THEN '二维码巡检'
WHEN a.check_mode = 'MOBILE'
THEN '移动点巡检'
WHEN a.check_mode = 'NFC'
THEN 'NFC巡检'
WHEN a.check_mode = 'WEB'
THEN '录入检查点巡检'
WHEN a.check_mode = 'WEB_OUT'
THEN '外来检查'
ELSE
'系统自检'
END
) as check_mode,
a.`plan_name` AS `plan_name`,
a.plan_task_id,
a.plan_id,
a.`route_id`,
b.`catalog_id`,
a.error,
a.remark,
b.biz_org_name AS bizOrgName
a.id,
a.org_code,
a.point_id pointId,
a.point_name,
b.is_fixed,
b.point_no pointNo,
a.user_id,
a.user_name,
a.dep_name department_name,
a.dep_id departmentId,
wws.name address,
date_format(`a`.`check_time`, '%Y-%m-%d %H:%i:%s') AS `checkDate`,
date_format(`a`.`upload_time`, '%Y-%m-%d %H:%i:%s') AS `upload_time`,
(
CASE
WHEN `a`.`plan_task_detail_id` = 0 OR `a`.`plan_task_detail_id` is null THEN '计划外完成'
WHEN `a`.`plan_task_detail_id` != 0 AND `a`.`is_ok` != 3 THEN '按时完成'
WHEN `a`.`is_ok` = 3 THEN '未执行'
END
) AS `Finish_Status`,
(
CASE
WHEN `a`.`is_ok` = 1 THEN '合格'
WHEN `a`.`is_ok` = 2 THEN '不合格'
WHEN `a`.`is_ok` = 3 THEN '漏检'
END
) as is_ok,
a.score,
a.`route_name`,
(
CASE
WHEN a.check_mode = 'QR' THEN '二维码巡检'
WHEN a.check_mode = 'MOBILE' THEN '移动点巡检'
WHEN a.check_mode = 'NFC' THEN 'NFC巡检'
WHEN a.check_mode = 'WEB' THEN '录入检查点巡检'
WHEN a.check_mode = 'WEB_OUT' THEN '外来检查'
ELSE '系统自检'
END
) as check_mode,
a.`plan_name` AS `plan_name`,
a.plan_task_id,
a.plan_id,
a.`route_id`,
b.`catalog_id`,
a.error,
a.remark,
b.biz_org_name AS bizOrgName
FROM
`p_check` `a`
LEFT JOIN `p_point` `b` ON `a`.`point_id` = `b`.`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 wl_warehouse_structure wws on wws.id = b.risk_source_id
`p_check` `a`
LEFT JOIN `p_point` `b` ON `a`.`point_id` = `b`.`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 wl_warehouse_structure wws on wws.id = b.risk_source_id
<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
</if>
<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 beginDate!= ''"
>
and a.check_time >= #{beginDate}
</if>
<if
test=
"endDate!=null and endDate!= ''"
>
and #{endDate} >= a.check_time
</if>
<!-- <if test="endDate!=null"> and #{endDate} <![CDATA[>=]]> a.check_time </if> -->
<if
test=
"beginDate!=null and beginDate!= ''"
>
and a.check_time
>
= #{beginDate}
</if>
<if
test=
"endDate!=null and endDate!= ''"
>
and a.check_time
<
= #{endDate}
</if>
<if
test=
"userName!=null and userName!=''"
>
and a.user_name like concat(concat("%",#{userName}),"%")
</if>
<if
test=
"pointName!=null and pointName!= ''"
>
and b.name like concat(concat("%",#{pointName}),"%")
</if>
<if
test=
"pointNo!=null and pointNo!=''"
>
and b.point_no like concat('%',#{pointNo},'%')
</if>
...
...
@@ -305,9 +334,7 @@
<if
test=
"checkType == '计划检查'"
>
and a.plan_task_id
>
0
</if>
<if
test=
"checkType == '无计划检查'"
>
and a.plan_task_id
<
= 0
</if>
<choose>
<when
test=
"finishStatus == 0"
>
and (`a`.`plan_task_detail_id` = 0 OR `a`.`plan_task_detail_id` is
null)
</when>
<when
test=
"finishStatus == 0"
>
and (`a`.`plan_task_detail_id` = 0 OR `a`.`plan_task_detail_id` is null)
</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>
</choose>
...
...
@@ -318,17 +345,15 @@
and a.org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
<if
test=
"searchDay != null and searchDay != ''"
>
and date_format(
a.check_time,
'%Y-%m-%d'
) = curdate()
and date_format(a.check_time, '%Y-%m-%d') = curdate()
</if>
<if
test=
"isExecute!=null and isExecute!='' and isExecute == '3'"
>
and a.is_OK != #{isExecute}
</if>
</trim>
order by ${orderBy}
order by
${orderBy}
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
<when
test=
"pageSize!=-1"
>
limit #{offset},
#{pageSize}
</when>
</choose>
</select>
...
...
@@ -2089,7 +2114,7 @@
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
e0e8635d
...
...
@@ -1359,91 +1359,103 @@
<select
id=
"getStatics"
resultType=
"java.util.Map"
>
SELECT
'0' AS `key`,
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'' AS unit,
'今日总巡查点位' AS `name`,
'xfxcjrzxcdw' AS code
'0' AS `key`,
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'' AS unit,
'今日总巡查点位' AS `name`,
'xfxcjrzxcdw' AS code
FROM
`p_plan_task`
`p_plan_task`
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'1' AS `key`,
ifnull( sum( `p_plan_task`.`finish_num` ), 0 ) AS `value`,
'' AS unit,
'今日累计巡查点位' AS `name`,
'xfxcjrljxcdw' AS code
'1' AS `key`,
ifnull( sum( `p_plan_task`.`finish_num` ), 0 ) AS `value`,
'' AS unit,
'今日累计巡查点位' AS `name`,
'xfxcjrljxcdw' AS code
FROM
`p_plan_task`
`p_plan_task`
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'2' AS `key`,
count(1) AS `value`,
'' AS unit,
'合格' AS `name`,
'xfxchg' AS code
'2' AS `key`,
count(1) AS `value`,
'' AS unit,
'合格' AS `name`,
'xfxchg' AS code
FROM
`p_plan_task` ppk
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
`p_plan_task` ppk
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE () AND pptd.STATUS = 1
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE () AND pptd.STATUS = 1
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'3' AS `key`,
'' AS `value`,
'%' AS unit,
'合格占比' AS `name`,
'xfxchgzb' AS code
'3' AS `key`,
'' AS `value`,
'%' AS unit,
'合格占比' AS `name`,
'xfxchgzb' AS code
UNION ALL
SELECT
'4' AS `key`,
count(1) AS `value`,
'' AS unit,
'不合格' AS `name`,
'xfxcbhg' AS code
'4' AS `key`,
count(1) AS `value`,
'' AS unit,
'不合格' AS `name`,
'xfxcbhg' AS code
FROM
`p_plan_task` ppk
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
`p_plan_task` ppk
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE () AND pptd.STATUS = 2
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE () AND pptd.STATUS = 2
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'5' AS `key`,
count(1) AS `value`,
'' AS unit,
'今日漏查点位' AS `name`,
'xfxcjrlcdw' AS code
'5' AS `key`,
count(1) AS `value`,
'' AS unit,
'今日漏查点位' AS `name`,
'xfxcjrlcdw' AS code
FROM
`p_plan_task`
`p_plan_task`
WHERE
`finish_status` = 3
AND DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
`finish_status` = 3
AND DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'6' AS `key`,
'' AS `value`,
'%' AS unit,
'漏查率' AS `name`,
'xfxclcl' AS code
'6' AS `key`,
'' AS `value`,
'%' AS unit,
'漏查率' AS `name`,
'xfxclcl' AS code
</select>
<select
id=
"queryByCompanyCode"
resultType=
"java.lang.String"
>
...
...
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