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
35ee00c5
Commit
35ee00c5
authored
Nov 08, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检查报告接口修改
parent
3ffa5dbf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
+28
-4
CheckReportParamDto.java
...amos/supervision/core/common/dto/CheckReportParamDto.java
+3
-0
CheckReportController.java
...upervision/business/controller/CheckReportController.java
+23
-2
CheckReportMapper.xml
...vision/src/main/resources/db/mapper/CheckReportMapper.xml
+2
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/core/common/dto/CheckReportParamDto.java
View file @
35ee00c5
package
com
.
yeejoin
.
amos
.
supervision
.
core
.
common
.
dto
;
package
com
.
yeejoin
.
amos
.
supervision
.
core
.
common
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -22,9 +23,11 @@ public class CheckReportParamDto implements Serializable {
...
@@ -22,9 +23,11 @@ public class CheckReportParamDto implements Serializable {
String
checkLevel
;
String
checkLevel
;
@ApiModelProperty
(
value
=
"检查开始时间"
)
@ApiModelProperty
(
value
=
"检查开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
Date
startCheckTime
;
Date
startCheckTime
;
@ApiModelProperty
(
value
=
"检查结束时间"
)
@ApiModelProperty
(
value
=
"检查结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
Date
endCheckTime
;
Date
endCheckTime
;
@ApiModelProperty
(
value
=
"检查执行人"
)
@ApiModelProperty
(
value
=
"检查执行人"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/CheckReportController.java
View file @
35ee00c5
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.supervision.business.controller;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.supervision.business.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.supervision.business.feign.DangerFeignClient
;
import
com.yeejoin.amos.supervision.business.feign.DangerFeignClient
;
import
com.yeejoin.amos.supervision.business.service.intfc.ICheckReportService
;
import
com.yeejoin.amos.supervision.business.service.intfc.ICheckReportService
;
import
com.yeejoin.amos.supervision.core.common.dto.CheckReportParamDto
;
import
com.yeejoin.amos.supervision.core.common.dto.CheckReportParamDto
;
...
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -24,6 +26,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -24,6 +26,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.Date
;
@RestController
@RestController
@RequestMapping
(
value
=
"/check/report"
)
@RequestMapping
(
value
=
"/check/report"
)
...
@@ -46,14 +49,32 @@ public class CheckReportController extends BaseController {
...
@@ -46,14 +49,32 @@ public class CheckReportController extends BaseController {
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询检查报告"
,
notes
=
"分页查询检查报告"
)
@ApiOperation
(
value
=
"分页查询检查报告"
,
notes
=
"分页查询检查报告"
)
@
Pos
tMapping
(
value
=
"/page"
)
@
Ge
tMapping
(
value
=
"/page"
)
public
ResponseModel
queryPage
(
@RequestParam
int
current
,
@RequestParam
int
size
,
public
ResponseModel
queryPage
(
@RequestParam
int
current
,
@RequestParam
int
size
,
@RequestBody
(
required
=
false
)
CheckReportParamDto
queryParam
)
{
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
planName
,
@RequestParam
(
required
=
false
)
String
planCheckType
,
@RequestParam
(
required
=
false
)
String
checkLevel
,
@RequestParam
(
required
=
false
)
String
startCheckTime
,
@RequestParam
(
required
=
false
)
String
endCheckTime
,
@RequestParam
(
required
=
false
)
String
checkUser
)
throws
ParseException
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
String
loginOrgCode
=
getOrgCode
(
reginParams
);
if
(
loginOrgCode
.
contains
(
"-"
))
{
if
(
loginOrgCode
.
contains
(
"-"
))
{
loginOrgCode
=
loginOrgCode
.
substring
(
0
,
loginOrgCode
.
indexOf
(
"-"
));
loginOrgCode
=
loginOrgCode
.
substring
(
0
,
loginOrgCode
.
indexOf
(
"-"
));
}
}
CheckReportParamDto
queryParam
=
new
CheckReportParamDto
();
queryParam
.
setName
(
name
);
queryParam
.
setPlanName
(
planName
);
queryParam
.
setPlanCheckType
(
planCheckType
);
queryParam
.
setCheckLevel
(
checkLevel
);
if
(!
ValidationUtil
.
isEmpty
(
startCheckTime
))
{
queryParam
.
setStartCheckTime
(
DateUtils
.
dateParse
(
startCheckTime
,
DateUtils
.
DATE_TIME_PATTERN
));
}
if
(!
ValidationUtil
.
isEmpty
(
endCheckTime
))
{
queryParam
.
setEndCheckTime
(
DateUtils
.
dateParse
(
endCheckTime
,
DateUtils
.
DATE_TIME_PATTERN
));
}
queryParam
.
setCheckUser
(
checkUser
);
queryParam
.
setOrgCode
(
loginOrgCode
);
queryParam
.
setOrgCode
(
loginOrgCode
);
Page
page
=
new
Page
<>(
current
,
size
);
Page
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
iCheckReportService
.
pageList
(
page
,
queryParam
));
return
ResponseHelper
.
buildResponse
(
iCheckReportService
.
pageList
(
page
,
queryParam
));
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/CheckReportMapper.xml
View file @
35ee00c5
...
@@ -46,10 +46,10 @@
...
@@ -46,10 +46,10 @@
<if
test=
"queryParam != null and queryParam.checkLevel != null and queryParam.checkLevel != ''"
>
<if
test=
"queryParam != null and queryParam.checkLevel != null and queryParam.checkLevel != ''"
>
and p.check_level = #{queryParam.checkLevel}
and p.check_level = #{queryParam.checkLevel}
</if>
</if>
<if
test=
"queryParam != null and queryParam.startCheckTime != null
and queryParam.startCheckTime != ''
"
>
<if
test=
"queryParam != null and queryParam.startCheckTime != null"
>
and cr.start_check_date
<![CDATA[>=]]>
#{queryParam.startCheckTime}
and cr.start_check_date
<![CDATA[>=]]>
#{queryParam.startCheckTime}
</if>
</if>
<if
test=
"queryParam != null and queryParam.endCheckTime != null
and queryParam.endCheckTime != ''
"
>
<if
test=
"queryParam != null and queryParam.endCheckTime != null"
>
and cr.end_check_date
<![CDATA[<=]]>
#{queryParam.endCheckTime}
and cr.end_check_date
<![CDATA[<=]]>
#{queryParam.endCheckTime}
</if>
</if>
<if
test=
"queryParam != null and queryParam.checkUser != null and queryParam.checkUser != ''"
>
<if
test=
"queryParam != null and queryParam.checkUser != null and queryParam.checkUser != ''"
>
...
...
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