Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
91c05ce7
Commit
91c05ce7
authored
Jan 22, 2025
by
zhoushiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://106.120.201.126:14725/signal/traffic-signal-platform
parents
17a635d5
ad7fe0ee
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
293 additions
and
27 deletions
+293
-27
InduceFontHistController.java
...wanji/opt/controller/induce/InduceFontHistController.java
+80
-0
InduceFontHistMapper.java
...net/wanji/opt/dao/mapper/induce/InduceFontHistMapper.java
+11
-0
InduceFontHist.java
...ce/src/main/java/net/wanji/opt/entity/InduceFontHist.java
+52
-0
StrategyGreenOptHistEntity.java
...ain/java/net/wanji/opt/po/StrategyGreenOptHistEntity.java
+4
-0
InduceFontHistService.java
...a/net/wanji/opt/service/induce/InduceFontHistService.java
+31
-0
InduceFontHistServiceImpl.java
...ji/opt/service/induce/impl/InduceFontHistServiceImpl.java
+63
-0
StrategyControlController.java
...i/opt/synthesis/controller/StrategyControlController.java
+2
-2
StrategyCrossResultEntity.java
...t/wanji/opt/synthesis/pojo/StrategyCrossResultEntity.java
+2
-0
StrategyControlHistVO.java
...et/wanji/opt/synthesis/pojo/vo/StrategyControlHistVO.java
+2
-0
StrategyControlServiceImpl.java
...pt/synthesis/service/impl/StrategyControlServiceImpl.java
+41
-25
InduceFontHistMapper.xml
...src/main/resources/mapper/induce/InduceFontHistMapper.xml
+5
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/induce/InduceFontHistController.java
0 → 100644
View file @
91c05ce7
package
net
.
wanji
.
opt
.
controller
.
induce
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.framework.i18n.I18nResourceBundle
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.common.framework.rest.ValidationGroups
;
import
net.wanji.opt.entity.InduceFontHist
;
import
net.wanji.opt.service.induce.InduceFontHistService
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.ws.rs.core.MediaType
;
import
java.util.List
;
/**
* @author duanruiming
* @date 2025/01/21 14:37
*/
@Api
(
value
=
"InduceFontHistController"
,
description
=
"诱导屏-文字下发历史信息"
)
@RestController
@RequestMapping
(
"/induceFontHist"
)
@Slf4j
public
class
InduceFontHistController
{
@Resource
private
InduceFontHistService
induceFontHistService
;
@ApiOperation
(
value
=
"获取所有诱导文字下发记录"
,
notes
=
"获取所有诱导文字下发记录"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
)
@GetMapping
(
value
=
"/byAll"
,
produces
=
MediaType
.
APPLICATION_JSON
)
public
JsonViewObject
getAll
(
@RequestParam
(
defaultValue
=
""
)
String
equipCode
)
{
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
try
{
List
<
InduceFontHist
>
list
=
induceFontHistService
.
getAll
(
equipCode
);
jsonViewObject
.
success
(
list
);
}
catch
(
Exception
e
)
{
jsonViewObject
.
fail
(
I18nResourceBundle
.
getConstants
(
"GET_FAILED_MSG"
));
log
.
error
(
"{} getAll error"
,
this
.
getClass
().
getSimpleName
(),
e
);
}
return
jsonViewObject
;
}
@ApiOperation
(
value
=
"诱导屏文字编辑新增修改"
,
notes
=
"诱导屏文字编辑新增修改"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/editor"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
public
JsonViewObject
editor
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@RequestBody
@Validated
({
ValidationGroups
.
Query
.
class
})
InduceFontHist
induceFontHist
)
{
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
try
{
induceFontHistService
.
editor
(
induceFontHist
);
jsonViewObject
.
success
(
"编辑成功"
);
}
catch
(
Exception
e
)
{
jsonViewObject
.
fail
(
I18nResourceBundle
.
getConstants
(
"POST_FAILED_MSG"
));
log
.
error
(
"{} editor error"
,
this
.
getClass
().
getSimpleName
(),
e
);
}
return
jsonViewObject
;
}
@ApiOperation
(
value
=
"通过编号获取诱导屏最新文字"
,
notes
=
"通过编号获取诱导屏最新文字"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
)
@GetMapping
(
value
=
"/byLastOne"
,
produces
=
MediaType
.
APPLICATION_JSON
)
public
JsonViewObject
getLastOne
(
@RequestParam
(
"equipCode"
)
String
equipCode
)
{
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
try
{
InduceFontHist
induceFontHist
=
induceFontHistService
.
getLastOne
(
equipCode
);
jsonViewObject
.
success
(
induceFontHist
);
}
catch
(
Exception
e
)
{
jsonViewObject
.
fail
(
I18nResourceBundle
.
getConstants
(
"GET_FAILED_MSG"
));
log
.
error
(
"{} byLastOne error"
,
this
.
getClass
().
getSimpleName
(),
e
);
}
return
jsonViewObject
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/dao/mapper/induce/InduceFontHistMapper.java
0 → 100644
View file @
91c05ce7
package
net
.
wanji
.
opt
.
dao
.
mapper
.
induce
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
net.wanji.opt.entity.InduceFontHist
;
/**
* @author duanruiming
* @date 2025/01/21 14:40
*/
public
interface
InduceFontHistMapper
extends
BaseMapper
<
InduceFontHist
>
{
}
signal-optimize-service/src/main/java/net/wanji/opt/entity/InduceFontHist.java
0 → 100644
View file @
91c05ce7
package
net
.
wanji
.
opt
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author duanruiming
* @date 2025/01/21 14:29
*/
@Data
@TableName
(
"t_induce_font_hist_log"
)
public
class
InduceFontHist
{
@ApiModelProperty
(
value
=
"唯一ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
@ApiModelProperty
(
value
=
"诱导屏编码"
)
@TableField
(
"equip_code"
)
private
String
equipCode
;
@ApiModelProperty
(
value
=
"字体类型"
)
@TableField
(
"font_type"
)
private
String
fontType
;
@ApiModelProperty
(
value
=
"字体大小"
)
@TableField
(
"font_size"
)
private
String
fontSize
;
@ApiModelProperty
(
value
=
"字体颜色"
)
@TableField
(
"font_color"
)
private
String
fontColor
;
@ApiModelProperty
(
value
=
"字体行间距"
)
@TableField
(
"line_spacing"
)
private
String
lineSpacing
;
@ApiModelProperty
(
value
=
"文字内容"
)
@TableField
(
"content"
)
private
String
content
;
@ApiModelProperty
(
value
=
"绿波编号"
)
@TableField
(
"green_id"
)
private
Integer
greenId
;
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@TableField
(
"gmt_create"
)
private
Date
gmtCreate
;
@ApiModelProperty
(
value
=
"修改时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@TableField
(
"gmt_modified"
)
private
Date
gmtModified
;
}
signal-optimize-service/src/main/java/net/wanji/opt/po/StrategyGreenOptHistEntity.java
View file @
91c05ce7
...
@@ -51,4 +51,8 @@ public class StrategyGreenOptHistEntity {
...
@@ -51,4 +51,8 @@ public class StrategyGreenOptHistEntity {
private
Date
createTime
;
private
Date
createTime
;
@TableField
(
"modify_time"
)
@TableField
(
"modify_time"
)
private
Date
modifyTime
;
private
Date
modifyTime
;
@TableField
(
"response_code"
)
private
Integer
responseCode
;
@TableField
(
"response_content"
)
private
String
responseContent
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/service/induce/InduceFontHistService.java
0 → 100644
View file @
91c05ce7
package
net
.
wanji
.
opt
.
service
.
induce
;
import
net.wanji.opt.entity.InduceFontHist
;
import
java.util.List
;
/**
* @author duanruiming
* @date 2025/01/21 14:38
*/
public
interface
InduceFontHistService
{
/**
* 获取诱导屏所有文字下发记录
* @return
*/
List
<
InduceFontHist
>
getAll
(
String
equipCode
);
/**
* 诱导屏文字编辑
* @param induceFontHist
*/
void
editor
(
InduceFontHist
induceFontHist
);
/**
* 通过诱导屏编码获取最新编辑文字
* @param equipCode
* @return
*/
InduceFontHist
getLastOne
(
String
equipCode
);
}
signal-optimize-service/src/main/java/net/wanji/opt/service/induce/impl/InduceFontHistServiceImpl.java
0 → 100644
View file @
91c05ce7
package
net
.
wanji
.
opt
.
service
.
induce
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.utils.tool.StringUtils
;
import
net.wanji.opt.dao.mapper.induce.InduceFontHistMapper
;
import
net.wanji.opt.entity.InduceFontHist
;
import
net.wanji.opt.service.induce.InduceFontHistService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author duanruiming
* @date 2025/01/21 14:39
*/
@Service
@Slf4j
public
class
InduceFontHistServiceImpl
implements
InduceFontHistService
{
@Resource
private
InduceFontHistMapper
induceFontHistMapper
;
@Override
public
List
<
InduceFontHist
>
getAll
(
String
equipCode
)
{
LambdaQueryWrapper
<
InduceFontHist
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
StringUtils
.
isNotBlank
(
equipCode
))
{
queryWrapper
.
eq
(
InduceFontHist:
:
getEquipCode
,
equipCode
);
queryWrapper
.
orderByDesc
(
InduceFontHist:
:
getGmtModified
);
}
List
<
InduceFontHist
>
induceFontHists
=
induceFontHistMapper
.
selectList
(
queryWrapper
);
return
induceFontHists
;
}
@Override
public
void
editor
(
InduceFontHist
induceFontHist
)
{
if
(
Objects
.
nonNull
(
induceFontHist
))
{
Long
id
=
induceFontHist
.
getId
();
if
(
Objects
.
isNull
(
id
))
{
induceFontHistMapper
.
insert
(
induceFontHist
);
}
else
{
induceFontHist
.
setGmtModified
(
new
Date
());
induceFontHistMapper
.
updateById
(
induceFontHist
);
}
}
}
@Override
public
InduceFontHist
getLastOne
(
String
equipCode
)
{
if
(
StringUtils
.
isNotBlank
(
equipCode
))
{
LambdaQueryWrapper
<
InduceFontHist
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
InduceFontHist:
:
getEquipCode
,
equipCode
);
queryWrapper
.
orderByDesc
(
InduceFontHist:
:
getGmtModified
);
queryWrapper
.
last
(
"limit 1"
);
InduceFontHist
induceFontHist
=
induceFontHistMapper
.
selectOne
(
queryWrapper
);
return
induceFontHist
;
}
return
null
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/controller/StrategyControlController.java
View file @
91c05ce7
...
@@ -58,9 +58,9 @@ public class StrategyControlController {
...
@@ -58,9 +58,9 @@ public class StrategyControlController {
@GetMapping
(
"/crossStrategyHistList"
)
@GetMapping
(
"/crossStrategyHistList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"策略执行记录历史->路口/干线,时间粒度, 策略成功失败类型"
,
notes
=
""
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"策略执行记录历史->路口/干线,时间粒度, 策略成功失败类型"
,
notes
=
""
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"strategyType"
,
value
=
"策略类型 0-路口 1-干线
空
-查所有"
,
required
=
false
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"strategyType"
,
value
=
"策略类型 0-路口 1-干线
null
-查所有"
,
required
=
false
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"groupType"
,
value
=
"时间粒度类型 0-1小时 1-1天 2-5秒"
,
required
=
false
,
dataType
=
"Integer"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"groupType"
,
value
=
"时间粒度类型 0-1小时 1-1天 2-5秒"
,
required
=
false
,
dataType
=
"Integer"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"resultType"
,
value
=
"时间粒度类型 0-失败 1-成功
空
-查所有"
,
required
=
false
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"resultType"
,
value
=
"时间粒度类型 0-失败 1-成功
null
-查所有"
,
required
=
false
,
dataType
=
"Integer"
),
})
})
@ApiResponses
({
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"成功"
,
response
=
GreenwaveHist
.
class
,
@ApiResponse
(
code
=
200
,
message
=
"成功"
,
response
=
GreenwaveHist
.
class
,
...
...
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/pojo/StrategyCrossResultEntity.java
View file @
91c05ce7
...
@@ -33,6 +33,8 @@ public class StrategyCrossResultEntity {
...
@@ -33,6 +33,8 @@ public class StrategyCrossResultEntity {
private
Date
issueTime
;
private
Date
issueTime
;
@TableField
(
"response_code"
)
@TableField
(
"response_code"
)
private
Integer
responseCode
;
private
Integer
responseCode
;
@TableField
(
"response_content"
)
private
String
responseContent
;
@TableField
(
"timing_plan"
)
@TableField
(
"timing_plan"
)
private
String
timingPlan
;
private
String
timingPlan
;
@TableField
(
"insert_time"
)
@TableField
(
"insert_time"
)
...
...
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/pojo/vo/StrategyControlHistVO.java
View file @
91c05ce7
...
@@ -23,6 +23,8 @@ public class StrategyControlHistVO {
...
@@ -23,6 +23,8 @@ public class StrategyControlHistVO {
private
String
optTime
;
private
String
optTime
;
@ApiModelProperty
(
"优化结果"
)
@ApiModelProperty
(
"优化结果"
)
private
String
result
;
private
String
result
;
@ApiModelProperty
(
"优化结果"
)
private
Integer
code
;
@ApiModelProperty
(
"经纬度"
)
@ApiModelProperty
(
"经纬度"
)
private
String
wkt
;
private
String
wkt
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/impl/StrategyControlServiceImpl.java
View file @
91c05ce7
...
@@ -29,6 +29,7 @@ import net.wanji.opt.synthesis.pojo.vo.*;
...
@@ -29,6 +29,7 @@ import net.wanji.opt.synthesis.pojo.vo.*;
import
net.wanji.opt.synthesis.service.PushStrategyControlService
;
import
net.wanji.opt.synthesis.service.PushStrategyControlService
;
import
net.wanji.opt.synthesis.service.StrategyControlService
;
import
net.wanji.opt.synthesis.service.StrategyControlService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -184,21 +185,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -184,21 +185,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
if
(
Objects
.
isNull
(
groupType
))
{
if
(
Objects
.
isNull
(
groupType
))
{
groupType
=
1
;
groupType
=
1
;
}
}
// LocalDateTime localDateTime = Objects.equals(0, groupType) ? DateUtil.getPlusHour(-1) : DateUtil.getMidNight();
LocalDateTime
localDateTime
=
getLocalDateTime
(
groupType
);
LocalDateTime
localDateTime
=
null
;
switch
(
groupType
)
{
case
0
:
localDateTime
=
DateUtil
.
getPlusHour
(-
1
);
break
;
case
1
:
localDateTime
=
DateUtil
.
getMidNight
();
break
;
case
2
:
localDateTime
=
DateUtil
.
getPlusSecond
(-
5
);
break
;
default
:
localDateTime
=
DateUtil
.
getMidNight
();
}
// 查询干线和路口
// 查询干线和路口
if
(
Objects
.
isNull
(
strategyType
))
{
if
(
Objects
.
isNull
(
strategyType
))
{
...
@@ -220,14 +207,36 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -220,14 +207,36 @@ public class StrategyControlServiceImpl implements StrategyControlService {
return
JsonViewObject
.
newInstance
().
success
(
sorted
);
return
JsonViewObject
.
newInstance
().
success
(
sorted
);
}
}
@NotNull
private
static
LocalDateTime
getLocalDateTime
(
Integer
groupType
)
{
LocalDateTime
localDateTime
=
null
;
switch
(
groupType
)
{
case
0
:
localDateTime
=
DateUtil
.
getPlusHour
(-
1
);
break
;
case
1
:
localDateTime
=
DateUtil
.
getMidNight
();
break
;
case
2
:
localDateTime
=
DateUtil
.
getPlusSecond
(-
5
);
break
;
default
:
localDateTime
=
DateUtil
.
getMidNight
();
}
return
localDateTime
;
}
private
void
setCrossOptHist
(
List
<
StrategyControlHistVO
>
results
,
LocalDateTime
midnight
,
Integer
resultType
)
{
private
void
setCrossOptHist
(
List
<
StrategyControlHistVO
>
results
,
LocalDateTime
midnight
,
Integer
resultType
)
{
LambdaQueryWrapper
<
StrategyCrossResultEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
StrategyCrossResultEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
Objects
.
nonNull
(
midnight
))
{
if
(
Objects
.
nonNull
(
midnight
))
{
queryWrapper
.
ge
(
StrategyCrossResultEntity:
:
getIssueTime
,
midnight
);
queryWrapper
.
ge
(
StrategyCrossResultEntity:
:
getIssueTime
,
midnight
);
}
}
if
(
Objects
.
nonNull
(
resultType
))
{
if
(
Objects
.
nonNull
(
resultType
))
{
Integer
resCode
=
Objects
.
equals
(
1
,
resultType
)
?
200
:
500
;
if
(
Objects
.
equals
(
1
,
resultType
))
{
queryWrapper
.
ge
(
StrategyCrossResultEntity:
:
getResponseCode
,
resCode
);
queryWrapper
.
eq
(
StrategyCrossResultEntity:
:
getResponseCode
,
200
);
}
else
{
queryWrapper
.
ne
(
StrategyCrossResultEntity:
:
getResponseCode
,
200
);
}
}
}
List
<
StrategyCrossResultEntity
>
resultEntities
=
strategyCrossResultMapper
.
selectList
(
queryWrapper
);
List
<
StrategyCrossResultEntity
>
resultEntities
=
strategyCrossResultMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
resultEntities
))
{
if
(!
CollectionUtils
.
isEmpty
(
resultEntities
))
{
...
@@ -243,11 +252,13 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -243,11 +252,13 @@ public class StrategyControlServiceImpl implements StrategyControlService {
Date
issueTime
=
resultEntity
.
getIssueTime
();
Date
issueTime
=
resultEntity
.
getIssueTime
();
String
format
=
DateUtil
.
format
(
issueTime
,
Constants
.
DATE_FORMAT
.
E_DATE_FORMAT_SECOND
);
String
format
=
DateUtil
.
format
(
issueTime
,
Constants
.
DATE_FORMAT
.
E_DATE_FORMAT_SECOND
);
histVO
.
setOptTime
(
format
);
histVO
.
setOptTime
(
format
);
if
(
resultEntity
.
getCurrentAlgo
()
!=
1
)
{
//if (resultEntity.getCurrentAlgo() != 1) {
histVO
.
setResult
(
Objects
.
equals
(
200
,
resultEntity
.
getResponseCode
())
?
"成功"
:
"失败"
);
// histVO.setResult(Objects.equals(200, resultEntity.getResponseCode()) ? "成功" : "失败");
}
else
{
//} else {
histVO
.
setResult
(
"成功"
);
// histVO.setResult("成功");
}
//}
histVO
.
setResult
(
resultEntity
.
getResponseContent
());
histVO
.
setCode
(
resultEntity
.
getResponseCode
());
results
.
add
(
histVO
);
results
.
add
(
histVO
);
}
}
}
}
...
@@ -259,8 +270,11 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -259,8 +270,11 @@ public class StrategyControlServiceImpl implements StrategyControlService {
queryWrapper
.
ge
(
StrategyGreenOptHistEntity:
:
getControlTime
,
midnight
);
queryWrapper
.
ge
(
StrategyGreenOptHistEntity:
:
getControlTime
,
midnight
);
}
}
if
(
Objects
.
nonNull
(
resultType
))
{
if
(
Objects
.
nonNull
(
resultType
))
{
Integer
controlMethod
=
Objects
.
equals
(
1
,
resultType
)
?
1
:
0
;
if
(
Objects
.
equals
(
1
,
resultType
))
{
queryWrapper
.
ge
(
StrategyGreenOptHistEntity:
:
getControlMethod
,
controlMethod
);
queryWrapper
.
eq
(
StrategyGreenOptHistEntity:
:
getResponseCode
,
200
);
}
else
{
queryWrapper
.
ne
(
StrategyGreenOptHistEntity:
:
getResponseCode
,
200
);
}
}
}
List
<
StrategyGreenOptHistEntity
>
entities
=
strategyGreenOptHistMapper
.
selectList
(
queryWrapper
);
List
<
StrategyGreenOptHistEntity
>
entities
=
strategyGreenOptHistMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
entities
))
{
if
(!
CollectionUtils
.
isEmpty
(
entities
))
{
...
@@ -294,7 +308,9 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -294,7 +308,9 @@ public class StrategyControlServiceImpl implements StrategyControlService {
histVO
.
setStrategyName
(
"绿波带"
);
histVO
.
setStrategyName
(
"绿波带"
);
}
}
histVO
.
setOptTime
(
entity
.
getControlTime
());
histVO
.
setOptTime
(
entity
.
getControlTime
());
histVO
.
setResult
(
Objects
.
equals
(
1
,
entity
.
getControlMethod
())
?
"失败"
:
"成功"
);
//histVO.setResult(Objects.equals(1, entity.getControlMethod()) ? "失败" : "成功");
histVO
.
setResult
(
entity
.
getResponseContent
());
histVO
.
setCode
(
entity
.
getResponseCode
());
results
.
add
(
histVO
);
results
.
add
(
histVO
);
}
}
}
}
...
...
signal-optimize-service/src/main/resources/mapper/induce/InduceFontHistMapper.xml
0 → 100644
View file @
91c05ce7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.opt.dao.mapper.induce.InduceFontHistMapper"
>
</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