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
c2ae4797
Commit
c2ae4797
authored
Feb 01, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: SQL问题处理
parent
05432645
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
189 additions
and
52 deletions
+189
-52
McbWarningController.java
...oot/module/jxiop/biz/controller/McbWarningController.java
+29
-8
McbWarningMapper.java
.../amos/boot/module/jxiop/biz/mapper2/McbWarningMapper.java
+26
-6
IMcbWarningService.java
...mos/boot/module/jxiop/biz/service/IMcbWarningService.java
+16
-2
McbWarningServiceImpl.java
.../module/jxiop/biz/service/impl/McbWarningServiceImpl.java
+43
-8
application-dev.properties
...analyse-biz/src/main/resources/application-dev.properties
+14
-7
McbWarningMapper.xml
...iz/src/main/resources/mapper/cluster/McbWarningMapper.xml
+61
-21
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/McbWarningController.java
View file @
c2ae4797
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IMcbWarningService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -15,6 +14,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -29,7 +29,7 @@ public class McbWarningController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]今日预警-预警总数"
,
notes
=
"[监测总览]今日预警-预警总数"
)
@GetMapping
(
value
=
"/count/today"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryTodayCount
(
@RequestParam
(
"processingStatus"
)
Integer
processingStatus
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
queryTodayCount
(
@RequestParam
(
value
=
"processingStatus"
,
required
=
false
)
Integer
processingStatus
)
{
return
ResponseHelper
.
buildResponse
(
IMcbWarningService
.
queryTodayCount
(
processingStatus
));
}
...
...
@@ -43,21 +43,42 @@ public class McbWarningController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]预警信息列表"
,
notes
=
"[监测总览]预警信息列表"
)
@GetMapping
(
value
=
"/warning/page"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
query
List
(
@RequestParam
(
value
=
"pageNumber"
,
defaultValue
=
"1"
)
Integer
pageNumber
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
,
@RequestParam
(
"processingStatus"
)
Integer
processingStatus
)
{
Page
<
BaseEntity
>
page
=
new
Page
<>(
pageNumber
,
pageSize
);
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
query
WarningPage
(
@RequestParam
(
value
=
"pageNumber"
,
defaultValue
=
"1"
)
Integer
pageNumber
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
,
@RequestParam
(
value
=
"processingStatus"
,
required
=
false
)
Integer
processingStatus
)
{
Page
<
Map
<
String
,
Object
>
>
page
=
new
Page
<>(
pageNumber
,
pageSize
);
return
ResponseHelper
.
buildResponse
(
IMcbWarningService
.
queryWarningPage
(
page
,
processingStatus
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]预警信息总数"
,
notes
=
"[监测总览]预警信息总数"
)
@GetMapping
(
value
=
"/warning/count"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryWarningCount
(
@RequestParam
(
value
=
"processingStatus"
,
required
=
false
)
Integer
processingStatus
)
{
Long
count
=
IMcbWarningService
.
queryWarningCount
(
processingStatus
);
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>()
{{
this
.
put
(
"count"
,
count
);
}};
return
ResponseHelper
.
buildResponse
(
result
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]问题列表"
,
notes
=
"[监测总览]问题列表"
)
@GetMapping
(
value
=
"/question/page"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
queryQuestionList
(
@RequestParam
(
value
=
"pageNumber"
,
defaultValue
=
"1"
)
Integer
pageNumber
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
,
@RequestParam
(
"completionStatus"
)
Integer
completionStatus
)
{
Page
<
BaseEntity
>
page
=
new
Page
<>(
pageNumber
,
pageSize
);
@RequestParam
(
value
=
"completionStatus"
,
required
=
false
)
Integer
completionStatus
)
{
Page
<
Map
<
String
,
Object
>
>
page
=
new
Page
<>(
pageNumber
,
pageSize
);
return
ResponseHelper
.
buildResponse
(
IMcbWarningService
.
queryQuestionPage
(
page
,
completionStatus
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]问题总数"
,
notes
=
"[监测总览]问题总数"
)
@GetMapping
(
value
=
"/question/count"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryQuestionCount
(
@RequestParam
(
value
=
"completionStatus"
,
required
=
false
)
Integer
completionStatus
)
{
Long
count
=
IMcbWarningService
.
queryQuestionCount
(
completionStatus
);
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>()
{{
this
.
put
(
"count"
,
count
);
}};
return
ResponseHelper
.
buildResponse
(
result
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/McbWarningMapper.java
View file @
c2ae4797
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -35,9 +33,20 @@ public interface McbWarningMapper extends BaseMapper {
*
* @return 预警列表
*/
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
List
<
Map
<
String
,
Object
>>
queryWarningList
(
@Param
(
"start"
)
Long
start
,
@Param
(
"offset"
)
Long
offset
,
@Param
(
"projectOrgCodes"
)
List
<
String
>
projectOrgCodes
,
@Param
(
"processingStatus"
)
Integer
processingStatus
);
/**
* 预警总数
*
* @return 预警总数
*/
Long
queryWarningCount
(
@Param
(
"projectOrgCodes"
)
List
<
String
>
projectOrgCodes
,
@Param
(
"page"
)
Page
<
BaseEntity
>
page
,
@Param
(
"processingStatus"
)
Integer
processingStatus
);
...
...
@@ -46,9 +55,20 @@ public interface McbWarningMapper extends BaseMapper {
*
* @return 问题列表
*/
Page
<
Map
<
String
,
Object
>>
queryQuestionPage
(
List
<
Map
<
String
,
Object
>>
queryQuestionList
(
@Param
(
"start"
)
Long
start
,
@Param
(
"offset"
)
Long
offset
,
@Param
(
"projectOrgCodes"
)
List
<
String
>
projectOrgCodes
,
@Param
(
"completionStatus"
)
Integer
completionStatus
);
/**
* 问题总数
*
* @return 问题总数
*/
Long
queryQuestionCount
(
@Param
(
"projectOrgCodes"
)
List
<
String
>
projectOrgCodes
,
@Param
(
"page"
)
Page
<
BaseEntity
>
page
,
@Param
(
"completionStatus"
)
Integer
completionStatus
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/IMcbWarningService.java
View file @
c2ae4797
...
...
@@ -29,13 +29,27 @@ public interface IMcbWarningService {
*
* @return 预警信息列表
*/
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
Page
<
BaseEntity
>
page
,
Integer
processingStatus
);
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
Page
<
Map
<
String
,
Object
>>
page
,
Integer
processingStatus
);
/**
* 预警信息总数
*
* @return 预警信息总数
*/
Long
queryWarningCount
(
Integer
processingStatus
);
/**
* 问题信息列表
*
* @return 问题信息列表
*/
Page
<
Map
<
String
,
Object
>>
queryQuestionPage
(
Page
<
Map
<
String
,
Object
>>
page
,
Integer
completionStatus
);
/**
* 问题信息列表
*
* @return 问题信息列表
*/
Page
<
Map
<
String
,
Object
>>
queryQuestionPage
(
Page
<
BaseEntity
>
page
,
Integer
processing
Status
);
Long
queryQuestionCount
(
Integer
completion
Status
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/McbWarningServiceImpl.java
View file @
c2ae4797
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.McbWarningMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IMcbWarningService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService
;
...
...
@@ -48,27 +47,63 @@ public class McbWarningServiceImpl implements IMcbWarningService {
/**
* 预警信息列表
*
* @param page 分页
* @param page
分页
* @param processingStatus 处理状态
* @return 预警信息列表
*/
@Override
public
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
Page
<
BaseEntity
>
page
,
Integer
processingStatus
)
{
public
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
Page
<
Map
<
String
,
Object
>
>
page
,
Integer
processingStatus
)
{
List
<
String
>
projectOrgCodes
=
this
.
getProjectOrgCodes
();
return
mcbWarningMapper
.
queryWarningPage
(
projectOrgCodes
,
page
,
processingStatus
);
long
start
=
page
.
getCurrent
()
-
1
;
long
offset
=
page
.
getSize
()
*
page
.
getCurrent
();
List
<
Map
<
String
,
Object
>>
records
=
mcbWarningMapper
.
queryWarningList
(
start
,
offset
,
projectOrgCodes
,
processingStatus
);
Long
total
=
mcbWarningMapper
.
queryWarningCount
(
projectOrgCodes
,
processingStatus
);
page
.
setRecords
(
records
);
page
.
setTotal
(
total
);
return
page
;
}
/**
* 预警信息总数
*
* @param processingStatus 处理状态
* @return 预警信息总数
*/
@Override
public
Long
queryWarningCount
(
Integer
processingStatus
)
{
List
<
String
>
projectOrgCodes
=
this
.
getProjectOrgCodes
();
return
mcbWarningMapper
.
queryWarningCount
(
projectOrgCodes
,
processingStatus
);
}
/**
* 问题信息列表
*
* @param page 分页
* @param completionStatus 完成状态
* @return 问题信息列表
*/
@Override
public
Page
<
Map
<
String
,
Object
>>
queryQuestionPage
(
Page
<
Map
<
String
,
Object
>>
page
,
Integer
completionStatus
)
{
List
<
String
>
projectOrgCodes
=
this
.
getProjectOrgCodes
();
long
start
=
page
.
getCurrent
()
-
1
;
long
offset
=
page
.
getSize
()
*
page
.
getCurrent
();
List
<
Map
<
String
,
Object
>>
records
=
mcbWarningMapper
.
queryQuestionList
(
start
,
offset
,
projectOrgCodes
,
completionStatus
);
Long
total
=
mcbWarningMapper
.
queryQuestionCount
(
projectOrgCodes
,
completionStatus
);
page
.
setRecords
(
records
);
page
.
setTotal
(
total
);
return
page
;
}
/**
* 问题信息列表
*
* @param page 分页
* @param completionStatus 处理状态
* @param completionStatus 完成状态
* @return 问题信息列表
*/
@Override
public
Page
<
Map
<
String
,
Object
>>
queryQuestionPage
(
Page
<
BaseEntity
>
page
,
Integer
completionStatus
)
{
public
Long
queryQuestionCount
(
Integer
completionStatus
)
{
List
<
String
>
projectOrgCodes
=
this
.
getProjectOrgCodes
();
return
mcbWarningMapper
.
queryQuestion
Page
(
projectOrgCodes
,
page
,
completionStatus
);
return
mcbWarningMapper
.
queryQuestion
Count
(
projectOrgCodes
,
completionStatus
);
}
/**
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application-dev.properties
View file @
c2ae4797
...
...
@@ -24,6 +24,12 @@ spring.db6.datasource.url=jdbc:mysql://139.9.173.44:3306/amos_project?allowMulti
spring.db6.datasource.username
=
root
spring.db6.datasource.password
=
Yeejoin@2020
spring.db6.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## amos_mcb
spring.db7.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db7.datasource.url
=
jdbc:mysql://10.20.1.157:3306/amos_mcb?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
spring.db7.datasource.username
=
root
spring.db7.datasource.password
=
Yeejoin@2020
spring.db7.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## eureka properties:
eureka.instance.hostname
=
139.9.173.44
...
...
@@ -90,7 +96,7 @@ spring.db3.datasource.password=taosdata
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
#
分析专用td数据库
analyse_data
#
����ר��td���ݿ� anal
yse_data
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url
=
jdbc:TAOS-RS://10.20.0.203:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username
=
root
...
...
@@ -181,19 +187,19 @@ spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.Str
spring.kafka.consumer.value-deserializer
=
org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.listener.ack-mode
=
manual_immediate
spring.kafka.listener.type
=
batch
#一
次拉取数量 && 线程数量
#һ
����ȡ���� && �߳�����
spring.kafka.consumer.max-poll-records
=
30
#spring.kafka.consumer.fetch-max-wait= 10000
#
当前时间向前偏移月数 向历史偏移月数
#
��ǰʱ����ǰƫ������ ����ʷƫ������
last.month.num
=
12
#
相关性 算法调用
#
����� �㷨����
base.url.XGX
=
http://139.9.171.247:8052/intelligent-analysis/correlation
#
工况划分 算法调用地
址
#
�������� �㷨���õ�ַ
base.url.GKHF
=
http://139.9.171.247:8052/intelligent-analysis/working-condition-division
#
相关性 算法调用
#
����� �㷨����
base.url.ZXZ
=
http://139.9.171.247:8052/intelligent-analysis/central-value
#指
数分析,算法调用
#ָ
���������㷨����
base.url.zsfx
:
http://139.9.171.247:8052/intelligent-analysis/index-analysis
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/McbWarningMapper.xml
View file @
c2ae4797
...
...
@@ -6,14 +6,14 @@
SELECT
COUNT(*) as count
FROM
mcb_warning_warning_info log
LEFT JOIN mcb_warning_base_source_attribution source ON source.CODE = log.SOURCE_ATTRIBUTION
amos_mcb.
mcb_warning_warning_info log
LEFT JOIN
amos_mcb.
mcb_warning_base_source_attribution source ON source.CODE = log.SOURCE_ATTRIBUTION
<where>
date(log.CREATE_DATE) = CURRENT_DATE
<if
test=
"projectOrgCodes != null and projectOrgCodes.size() > 0"
>
AND SOURCE_ATTRIBUTION IN
<foreach
collection=
"projectOrgCodes"
item=
"item"
open=
"("
separator=
","
close=
")"
>
$
{item}
#
{item}
</foreach>
</if>
<if
test=
"processingStatus != null and processingStatus != ''"
>
...
...
@@ -35,7 +35,7 @@
a.DATE AS alarmDate,
source.PROVINCE AS province
FROM
mcb_warning_base_source_attribution source,
amos_mcb.
mcb_warning_base_source_attribution source,
(
SELECT CURDATE() AS date
UNION ALL
...
...
@@ -52,15 +52,15 @@
SELECT DATE_SUB( CURDATE(), INTERVAL 6 DAY ) AS date
) a
) b
LEFT JOIN
mcb_warning_warning_info log ON date(log.CREATE_DATE) = b.alarmDate AND log.`SOURCE_ATTRIBUTION` = b.`code`
LEFT JOIN
amos_mcb.mcb_warning_warning_info log ON date(log.CREATE_DATE) = b.alarmDate AND log.SOURCE_ATTRIBUTION = b.CODE
GROUP BY
b.code,
--
b.code,
b.alarmDate
<trim
prefix=
"having"
prefixOverrides=
"and"
>
<if
test=
"projectOrgCodes != null and projectOrgCodes.size() > 0"
>
AND
b.`code`
IN
AND
log.SOURCE_ATTRIBUTION
IN
<foreach
collection=
"projectOrgCodes"
item=
"item"
open=
"("
separator=
","
close=
")"
>
$
{item}
#
{item}
</foreach>
</if>
</trim>
...
...
@@ -68,10 +68,10 @@
b.alarmDate ASC
</select>
<select
id=
"queryWarning
Page
"
resultType=
"java.util.Map"
>
<select
id=
"queryWarning
List
"
resultType=
"java.util.Map"
>
SELECT
log.SEQUENCE_NBR,
log.
CREATE_DATE,
DATE_FORMAT(log.CREATE_DATE, '%Y-%m-%d %H:%i:%s') AS
CREATE_DATE,
log.EVENT_LEVEL_DESC,
log.EVENT_LEVEL,
log.SOURCE_ATTRIBUTION_DESC,
...
...
@@ -81,14 +81,14 @@
source.PROVINCE,
log.WARNING_SOURCE_TYPE
FROM
mcb_warning_warning_info log
LEFT JOIN mcb_warning_base_warning_level LEVEL ON log.EVENT_LEVEL = LEVEL.CODE and LEVEL.SEQUENCE_NBR in (1, 2, 3)
LEFT JOIN mcb_warning_base_source_attribution source ON source.CODE = log.SOURCE_ATTRIBUTION
amos_mcb.
mcb_warning_warning_info log
LEFT JOIN
amos_mcb.
mcb_warning_base_warning_level LEVEL ON log.EVENT_LEVEL = LEVEL.CODE and LEVEL.SEQUENCE_NBR in (1, 2, 3)
LEFT JOIN
amos_mcb.
mcb_warning_base_source_attribution source ON source.CODE = log.SOURCE_ATTRIBUTION
<where>
<if
test=
"projectOrgCodes != null and projectOrgCodes.size() > 0"
>
AND
b.CODE
IN
AND
log.SOURCE_ATTRIBUTION
IN
<foreach
collection=
"projectOrgCodes"
item=
"item"
open=
"("
separator=
","
close=
")"
>
$
{item}
#
{item}
</foreach>
</if>
<if
test=
"processingStatus != null"
>
...
...
@@ -97,12 +97,33 @@
</where>
ORDER BY
log.CREATE_DATE DESC
LIMIT #{start}, #{offset}
</select>
<select
id=
"queryQuestionPage"
resultType=
"java.util.Map"
>
<select
id=
"queryWarningCount"
resultType=
"java.lang.Long"
>
SELECT
count(*)
FROM
amos_mcb.mcb_warning_warning_info log
LEFT JOIN amos_mcb.mcb_warning_base_warning_level LEVEL ON log.EVENT_LEVEL = LEVEL.CODE and LEVEL.SEQUENCE_NBR in (1, 2, 3)
LEFT JOIN amos_mcb.mcb_warning_base_source_attribution source ON source.CODE = log.SOURCE_ATTRIBUTION
<where>
<if
test=
"projectOrgCodes != null and projectOrgCodes.size() > 0"
>
AND log.SOURCE_ATTRIBUTION IN
<foreach
collection=
"projectOrgCodes"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"processingStatus != null"
>
AND log.PROCESSING_STATUS = #{processingStatus}
</if>
</where>
</select>
<select
id=
"queryQuestionList"
resultType=
"java.util.Map"
>
SELECT
question.SEQUENCE_NBR,
ifnull(question.REC_DATE, question.CREATE_DATE) as
REC_DATE,
DATE_FORMAT(ifnull(question.REC_DATE, question.CREATE_DATE), '%Y-%m-%d %H:%i:%s') AS
REC_DATE,
question.COMPLETION_STATUS_DESC,
question.COMPLETION_STATUS,
question.SOURCE_ATTRIBUTION_DESC,
...
...
@@ -110,13 +131,13 @@
question.CONTENT,
source.PROVINCE
FROM
mcb_warning_question_info question
LEFT JOIN mcb_warning_base_source_attribution source ON source.CODE = question.SOURCE_ATTRIBUTION
amos_mcb.
mcb_warning_question_info question
LEFT JOIN
amos_mcb.
mcb_warning_base_source_attribution source ON source.CODE = question.SOURCE_ATTRIBUTION
<where>
<if
test=
"projectOrgCodes != null and projectOrgCodes.size() > 0"
>
AND
b.CODE
IN
AND
question.SOURCE_ATTRIBUTION
IN
<foreach
collection=
"projectOrgCodes"
item=
"item"
open=
"("
separator=
","
close=
")"
>
$
{item}
#
{item}
</foreach>
</if>
<if
test=
"completionStatus != null"
>
...
...
@@ -125,6 +146,25 @@
</where>
ORDER BY
question.REC_DATE DESC
LIMIT #{start}, #{offset}
</select>
<select
id=
"queryQuestionCount"
resultType=
"java.lang.Long"
>
SELECT
count(*)
FROM
amos_mcb.mcb_warning_question_info question
LEFT JOIN amos_mcb.mcb_warning_base_source_attribution source ON source.CODE = question.SOURCE_ATTRIBUTION
<where>
<if
test=
"projectOrgCodes != null and projectOrgCodes.size() > 0"
>
AND question.SOURCE_ATTRIBUTION IN
<foreach
collection=
"projectOrgCodes"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"completionStatus != null"
>
AND question.COMPLETION_STATUS = #{completionStatus}
</if>
</where>
</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