Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cneeds-server
Overview
Overview
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
zhangzr
cneeds-server
Commits
0557a7f6
Commit
0557a7f6
authored
May 06, 2020
by
zzrdark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug 设备可以添加多个相同的IMEI 产品系列可以添加多个相同的系列
parent
4f90a0d6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
123 additions
and
23 deletions
+123
-23
cneeds_server.sql
cneeds-common-data/db/cneeds_server.sql
+8
-0
ResultCode.java
...c/main/java/com/mx/cneeds/common/constant/ResultCode.java
+19
-3
DeviceClient.java
...va/com/mx/cneeds/server/datashow/client/DeviceClient.java
+3
-0
LogFileClient.java
...a/com/mx/cneeds/server/datashow/client/LogFileClient.java
+5
-0
DeviceController.java
...x/cneeds/server/datashow/web/device/DeviceController.java
+5
-0
LogFlieController.java
.../cneeds/server/datashow/web/device/LogFlieController.java
+30
-1
application.yml
cneeds-server-datashow/src/main/resources/application.yml
+1
-1
index.html
cneeds-server-datashow/src/main/resources/statics/index.html
+0
-0
chunk-0b251b6b.eb155394.js
...in/resources/statics/static/js/chunk-0b251b6b.eb155394.js
+2
-2
ProductSeriesService.java
...mx/cneeds/server/device/service/ProductSeriesService.java
+2
-0
ProductSeriesServiceImpl.java
.../server/device/service/impl/ProductSeriesServiceImpl.java
+7
-0
DeviceInfoController.java
...com/mx/cneeds/server/device/web/DeviceInfoController.java
+8
-5
ProductSeriesController.java
.../mx/cneeds/server/device/web/ProductSeriesController.java
+15
-0
application.yml
cneeds-server-device/src/main/resources/application.yml
+1
-1
DeviceLogServiceImpl.java
...s/server/logupload/service/impl/DeviceLogServiceImpl.java
+7
-5
LogUploadController.java
...m/mx/cneeds/server/logupload/web/LogUploadController.java
+9
-4
application.yml
cneeds-server-logupload/src/main/resources/application.yml
+1
-1
No files found.
cneeds-common-data/db/cneeds_server.sql
View file @
0557a7f6
...
@@ -287,3 +287,10 @@ CREATE TABLE `sys_user_func` (
...
@@ -287,3 +287,10 @@ CREATE TABLE `sys_user_func` (
PRIMARY
KEY
(
`id`
)
USING
BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
489
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'功能与角色映射表'
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
489
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'功能与角色映射表'
ROW_FORMAT
=
Dynamic
;
-- 2020-05-06 加唯一索引
ALTER
TABLE
`cneeds_server`
.
`device_info`
ADD
UNIQUE
INDEX
`IMEI_UNIQUE`
(
`imei`
)
USING
BTREE
COMMENT
'imei唯一'
;
ALTER
TABLE
`cneeds_server`
.
`product_series`
ADD
UNIQUE
INDEX
`SERIES_NUM_UNIQUE`
(
`series_num`
)
USING
BTREE
COMMENT
'系列号唯一'
;
\ No newline at end of file
cneeds-server-datashow/src/main/java/com/mx/cneeds/common/constant/ResultCode.java
View file @
0557a7f6
...
@@ -7,12 +7,28 @@ package com.mx.cneeds.common.constant;
...
@@ -7,12 +7,28 @@ package com.mx.cneeds.common.constant;
* @Description TODO
* @Description TODO
**/
**/
public
class
ResultCode
{
public
class
ResultCode
{
//没有发现IMEI
/**
* 没有发现IMEI
*/
public
static
Integer
NOTFOUND_IMEI
=
1
;
public
static
Integer
NOTFOUND_IMEI
=
1
;
//没有设置渠道商
/**
* 没有设置渠道商
*/
public
static
Integer
NOTSET_CHANNEL
=
2
;
public
static
Integer
NOTSET_CHANNEL
=
2
;
// 参数有误
/**
* 参数有误
*/
public
static
Integer
PARAMERROR
=
3
;
public
static
Integer
PARAMERROR
=
3
;
/**
* 没找到对应的Log日志信息
*/
public
static
Integer
NOTFOUNDLOG
=
4
;
/**
* 数据重复
* 可表示imei,系列号 重复
*/
public
static
Integer
DATA_REPEATITION
=
5
;
}
}
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/client/DeviceClient.java
View file @
0557a7f6
...
@@ -33,6 +33,9 @@ public interface DeviceClient {
...
@@ -33,6 +33,9 @@ public interface DeviceClient {
@PostMapping
(
"/device/series/save"
)
@PostMapping
(
"/device/series/save"
)
void
addSeries
(
@RequestBody
SeriesDto
dto
);
void
addSeries
(
@RequestBody
SeriesDto
dto
);
@PostMapping
(
"/device/series/querySeriesDto"
)
SeriesDto
querySeries
(
@RequestBody
String
seriesNum
);
@PostMapping
(
"/device/series/update"
)
@PostMapping
(
"/device/series/update"
)
void
updateSeries
(
@RequestBody
SeriesDto
dto
);
void
updateSeries
(
@RequestBody
SeriesDto
dto
);
...
...
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/client/LogFileClient.java
View file @
0557a7f6
...
@@ -40,7 +40,12 @@ public interface LogFileClient {
...
@@ -40,7 +40,12 @@ public interface LogFileClient {
@PostMapping
(
value
=
"/log/upload/queryLogFileByLogid"
)
@PostMapping
(
value
=
"/log/upload/queryLogFileByLogid"
)
DeviceLogDto
queryLogFileByLogid
(
@RequestBody
Long
logId
);
DeviceLogDto
queryLogFileByLogid
(
@RequestBody
Long
logId
);
@PostMapping
(
value
=
"/log/upload/queryLogFileByLogAcceptId"
)
DeviceLogDto
queryLogFileByLogAcceptId
(
@RequestBody
String
logAcceptId
);
@PostMapping
(
value
=
"/log/upload/wechatUploadAloneFile"
)
@PostMapping
(
value
=
"/log/upload/wechatUploadAloneFile"
)
void
wechatUploadAloneFile
(
@RequestBody
WechatFileDto
wechatFileDto
);
void
wechatUploadAloneFile
(
@RequestBody
WechatFileDto
wechatFileDto
);
}
}
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/DeviceController.java
View file @
0557a7f6
...
@@ -109,6 +109,11 @@ public class DeviceController {
...
@@ -109,6 +109,11 @@ public class DeviceController {
@PostMapping
(
"/series/add"
)
@PostMapping
(
"/series/add"
)
public
R
addSeries
(
SeriesVo
seriesVo
){
public
R
addSeries
(
SeriesVo
seriesVo
){
SeriesDto
querySeries
=
deviceClient
.
querySeries
(
seriesVo
.
getSeriesNum
());
if
(
querySeries
!=
null
){
return
R
.
error
(
ResultCode
.
DATA_REPEATITION
,
"系列号重复"
);
}
SeriesDto
seriesDto
=
new
SeriesDto
();
SeriesDto
seriesDto
=
new
SeriesDto
();
BeanUtils
.
copyProperties
(
seriesVo
,
seriesDto
);
BeanUtils
.
copyProperties
(
seriesVo
,
seriesDto
);
...
...
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogFlieController.java
View file @
0557a7f6
...
@@ -115,9 +115,31 @@ public class LogFlieController {
...
@@ -115,9 +115,31 @@ public class LogFlieController {
return
R
.
ok
();
return
R
.
ok
();
}
}
@PostMapping
(
"/logfile/proDeviceUploadLogFile"
)
@ResponseBody
public
R
proDeviceUploadLogFile
(
DeviceLogFileVo
vo
){
DeviceLogFileDto
dto
=
new
DeviceLogFileDto
();
BeanUtils
.
copyProperties
(
vo
,
dto
);
log
.
debug
(
vo
.
toString
());
DeviceInfoDto
deviceInfoDto
=
deviceClient
.
queryDeviceByImei
(
dto
.
getImei
());
if
(
deviceInfoDto
==
null
){
log
.
debug
(
"ResultCode: "
+
ResultCode
.
NOTFOUND_IMEI
);
return
R
.
error
(
ResultCode
.
NOTFOUND_IMEI
,
"没有该imei"
);
}
DeviceLogDto
deviceLogDto
=
logFileClient
.
queryLogFileByLogAcceptId
(
vo
.
getLogAcceptId
());
if
(
deviceLogDto
==
null
){
log
.
debug
(
"ResultCode: "
+
ResultCode
.
NOTFOUNDLOG
);
return
R
.
error
(
ResultCode
.
NOTFOUNDLOG
,
"没找到对应的Log日志信息"
);
}
return
R
.
ok
();
}
@PostMapping
(
"/logfile/DeviceLogFileUpload"
)
@PostMapping
(
"/logfile/DeviceLogFileUpload"
)
@ResponseBody
@ResponseBody
public
R
u
ploadLogFile
(
DeviceLogFileVo
vo
,
MultipartFile
file
)
throws
IOException
{
public
R
deviceU
ploadLogFile
(
DeviceLogFileVo
vo
,
MultipartFile
file
)
throws
IOException
{
DeviceLogFileDto
dto
=
new
DeviceLogFileDto
();
DeviceLogFileDto
dto
=
new
DeviceLogFileDto
();
BeanUtils
.
copyProperties
(
vo
,
dto
);
BeanUtils
.
copyProperties
(
vo
,
dto
);
...
@@ -128,6 +150,13 @@ public class LogFlieController {
...
@@ -128,6 +150,13 @@ public class LogFlieController {
log
.
debug
(
"ResultCode: "
+
ResultCode
.
NOTFOUND_IMEI
);
log
.
debug
(
"ResultCode: "
+
ResultCode
.
NOTFOUND_IMEI
);
return
R
.
error
(
ResultCode
.
NOTFOUND_IMEI
,
"没有该imei"
);
return
R
.
error
(
ResultCode
.
NOTFOUND_IMEI
,
"没有该imei"
);
}
}
DeviceLogDto
deviceLogDto
=
logFileClient
.
queryLogFileByLogAcceptId
(
vo
.
getLogAcceptId
());
if
(
deviceLogDto
==
null
){
log
.
debug
(
"ResultCode: "
+
ResultCode
.
NOTFOUNDLOG
);
return
R
.
error
(
ResultCode
.
NOTFOUNDLOG
,
"没找到对应的Log日志信息"
);
}
// 把图片存入oos 返回路径
// 把图片存入oos 返回路径
StringBuffer
dir
=
new
StringBuffer
(
FilePath
.
LogFilePath
);
StringBuffer
dir
=
new
StringBuffer
(
FilePath
.
LogFilePath
);
dir
.
append
(
vo
.
getLogAcceptId
());
dir
.
append
(
vo
.
getLogAcceptId
());
...
...
cneeds-server-datashow/src/main/resources/application.yml
View file @
0557a7f6
spring
:
spring
:
profiles
:
profiles
:
active
:
prod
active
:
dev
application
:
application
:
name
:
cneeds-server-datashow
name
:
cneeds-server-datashow
server
:
server
:
...
...
cneeds-server-datashow/src/main/resources/statics/index.html
View file @
0557a7f6
This diff is collapsed.
Click to expand it.
cneeds-server-datashow/src/main/resources/statics/static/js/chunk-0b251b6b.
c62cffd6
.js
→
cneeds-server-datashow/src/main/resources/statics/static/js/chunk-0b251b6b.
eb155394
.js
View file @
0557a7f6
(
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[]).
push
([[
"chunk-0b251b6b"
],{
aa98
:
function
(
e
,
n
,
t
){
"use strict"
;
t
.
d
(
n
,
"b"
,(
function
(){
return
i
})),
t
.
d
(
n
,
"c"
,(
function
(){
return
c
})),
t
.
d
(
n
,
"e"
,(
function
(){
return
l
})),
t
.
d
(
n
,
"a"
,(
function
(){
return
s
})),
t
.
d
(
n
,
"d"
,(
function
(){
return
u
}));
t
(
"55dd"
);
var
a
=
t
(
"b775"
);
function
i
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/list"
,
method
:
"post"
,
params
:{
page
:
e
.
page
,
pageSize
:
e
.
pageSize
,
sort
:
e
.
sort
}})}
function
c
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/importDevice"
,
method
:
"post"
,
data
:
e
})}
function
l
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/updateDeviceSeriesBatch"
,
method
:
"post"
,
data
:
e
})}
function
s
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/delete"
,
method
:
"post"
,
data
:{
ids
:
e
}})}
function
u
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/saveChannel"
,
method
:
"post"
,
data
:
e
})}},
ee85
:
function
(
e
,
n
,
t
){
"use strict"
;
t
.
r
(
n
);
var
a
=
function
(){
var
e
=
this
,
n
=
e
.
$createElement
,
t
=
e
.
_self
.
_c
||
n
;
return
t
(
"el-container"
,[
t
(
"el-main"
,[
t
(
"el-form"
,{
ref
:
"setChannel"
,
attrs
:{
model
:
e
.
device
,
rules
:
e
.
rules
,
"label-width"
:
"80px"
}},[
t
(
"el-form-item"
,{
attrs
:{
prop
:
"channelNumsMessage"
,
label
:
"终端提示文字"
}},[
t
(
"el-input"
,{
model
:{
value
:
e
.
device
.
channelNumsMessage
,
callback
:
function
(
n
){
e
.
$set
(
e
.
device
,
"channelNumsMessage"
,
n
)},
expression
:
"device.channelNumsMessage"
}})],
1
),
e
.
_v
(
" "
),
t
(
"el-form-item"
,{
attrs
:{
prop
:
"channelRules"
,
label
:
"规则"
}},[
t
(
"el-select"
,{
attrs
:{
placeholder
:
"选择"
},
model
:{
value
:
e
.
device
.
channelRules
,
callback
:
function
(
n
){
e
.
$set
(
e
.
device
,
"channelRules"
,
n
)},
expression
:
"device.channelRules"
}},[
t
(
"el-option"
,{
attrs
:{
label
:
"黑名单"
,
value
:
"0"
}}),
e
.
_v
(
" "
),
t
(
"el-option"
,{
attrs
:{
label
:
"白名单"
,
value
:
"1"
}})],
1
)],
1
),
e
.
_v
(
" "
),
e
.
_l
(
e
.
device
.
channelNums
,(
function
(
n
,
a
){
return
t
(
"el-form-item"
,{
key
:
a
,
attrs
:{
label
:
"第"
+
(
a
+
1
)
+
"个渠道号: "
,
prop
:
"channelNums."
+
a
+
".value"
,
"label-width"
:
"20"
}},[
t
(
"el-row"
,[
t
(
"el-col"
,{
attrs
:{
span
:
14
}},[
t
(
"el-input"
,{
model
:{
value
:
n
.
value
,
callback
:
function
(
t
){
e
.
$set
(
n
,
"value"
,
t
)},
expression
:
"channelNum.value"
}})],
1
),
e
.
_v
(
" "
),
t
(
"el-col"
,{
attrs
:{
span
:
5
}},[
t
(
"el-button"
,{
on
:{
click
:
function
(
t
){
return
t
.
preventDefault
(),
e
.
removeChannelNums
(
n
)}}},[
e
.
_v
(
"
\
n 删除
\
n "
)])],
1
)],
1
)],
1
)})),
e
.
_v
(
" "
),
t
(
"el-form-item"
,[
t
(
"el-button"
,{
on
:{
click
:
e
.
addChannelNums
}},[
e
.
_v
(
"新增渠道号"
)]),
e
.
_v
(
" "
),
t
(
"el-button"
,{
attrs
:{
type
:
"primary"
},
on
:{
click
:
e
.
onSubmit
}},[
e
.
_v
(
"修改"
)]),
e
.
_v
(
" "
),
t
(
"el-button"
,{
on
:{
click
:
e
.
toDeviceList
}},[
e
.
_v
(
"取消"
)])],
1
)],
2
)],
1
)],
1
)},
i
=
[],
c
=
(
t
(
"456d"
),
t
(
"ac6a"
),
t
(
"96cf"
),
t
(
"3b8d"
)),
l
=
t
(
"aa98"
),
s
=
{
channelNumsMessage
:
"终端提示文字"
,
channelRules
:
"规则"
},
u
=
{
data
:
function
(){
var
e
=
function
(
e
,
n
,
t
){
void
0
===
n
||
null
===
n
||
0
===
n
.
length
?
t
(
new
Error
(
s
[
e
.
field
]
+
"必须填写"
)):
t
()};
return
{
loading
:
!
1
,
device
:{
channelNums
:[{
value
:
""
}],
channelNumsMessage
:
""
,
channelRules
:
""
,
imeis
:[]},
rules
:{
channelNumsMessage
:[{
validator
:
e
}],
channelRules
:[{
validator
:
e
}]},
selectSeriesOptions
:[]}},
mounted
:
function
(){
this
.
device
.
imeis
=
this
.
$route
.
query
.
imeis
,
this
.
getFormData
()},
methods
:{
getFormData
:
function
(){
var
e
=
Object
(
c
[
"a"
])(
regeneratorRuntime
.
mark
((
function
e
(){
return
regeneratorRuntime
.
wrap
((
function
(
e
){
while
(
1
)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
case
"end"
:
return
e
.
stop
()}}),
e
)})));
function
n
(){
return
e
.
apply
(
this
,
arguments
)}
return
n
}(),
setDefault
:
function
(){
this
.
$refs
.
device
=
[]},
onSubmit
:
function
(){
var
e
=
this
;
this
.
loading
||
(
this
.
loading
=!
0
,
this
.
$refs
.
setChannel
.
validate
((
function
(
n
,
t
){
if
(
n
){
var
a
=
e
.
device
.
channelNums
;
e
.
device
.
channelNums
=
[],
a
.
forEach
((
function
(
n
){
e
.
device
.
channelNums
.
push
(
n
.
value
)})),
Object
(
l
[
"d"
])(
e
.
device
).
then
((
function
(
n
){
var
t
=
n
.
msg
;
e
.
$notify
({
title
:
"操作成功"
,
message
:
t
,
type
:
"success"
,
duration
:
2
e3
}),
e
.
setDefault
(),
e
.
toDeviceList
(),
e
.
loading
=!
1
})).
catch
((
function
(){
e
.
loading
=!
1
}))}
else
{
var
i
=
t
[
Object
.
keys
(
t
)[
0
]][
0
].
message
;
e
.
$message
({
message
:
i
,
type
:
"error"
}),
e
.
loading
=!
1
}})))},
toDeviceList
:
function
(){
this
.
$router
.
push
({
path
:
"/deviceManagement/device"
})},
addChannelNums
:
function
(){
this
.
device
.
channelNums
.
push
({
value
:
""
})},
removeChannelNums
:
function
(
e
){
var
n
=
this
.
device
.
channelNums
.
indexOf
(
e
);
-
1
!==
n
&&
this
.
device
.
channelNums
.
splice
(
n
,
1
)}}},
r
=
u
,
o
=
t
(
"2877"
),
d
=
Object
(
o
[
"a"
])(
r
,
a
,
i
,
!
1
,
null
,
"6cae8d7a"
,
null
);
n
[
"default"
]
=
d
.
exports
}}]);
(
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[]).
push
([[
"chunk-0b251b6b"
],{
aa98
:
function
(
e
,
n
,
t
){
"use strict"
;
t
.
d
(
n
,
"b"
,(
function
(){
return
i
})),
t
.
d
(
n
,
"c"
,(
function
(){
return
c
})),
t
.
d
(
n
,
"e"
,(
function
(){
return
l
})),
t
.
d
(
n
,
"a"
,(
function
(){
return
s
})),
t
.
d
(
n
,
"d"
,(
function
(){
return
u
}));
t
(
"55dd"
);
var
a
=
t
(
"b775"
);
function
i
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/list"
,
method
:
"post"
,
params
:{
page
:
e
.
page
,
pageSize
:
e
.
pageSize
,
sort
:
e
.
sort
}})}
function
c
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/importDevice"
,
method
:
"post"
,
data
:
e
})}
function
l
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/updateDeviceSeriesBatch"
,
method
:
"post"
,
data
:
e
})}
function
s
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/delete"
,
method
:
"post"
,
data
:{
ids
:
e
}})}
function
u
(
e
){
return
Object
(
a
[
"a"
])({
url
:
"/device/device/saveChannel"
,
method
:
"post"
,
data
:
e
})}},
ee85
:
function
(
e
,
n
,
t
){
"use strict"
;
t
.
r
(
n
);
var
a
=
function
(){
var
e
=
this
,
n
=
e
.
$createElement
,
t
=
e
.
_self
.
_c
||
n
;
return
t
(
"el-container"
,[
t
(
"el-main"
,[
t
(
"el-form"
,{
ref
:
"setChannel"
,
attrs
:{
model
:
e
.
device
,
rules
:
e
.
rules
,
"label-width"
:
"80px"
}},[
t
(
"el-form-item"
,{
attrs
:{
prop
:
"channelNumsMessage"
,
label
:
"终端提示文字"
}},[
t
(
"el-input"
,{
model
:{
value
:
e
.
device
.
channelNumsMessage
,
callback
:
function
(
n
){
e
.
$set
(
e
.
device
,
"channelNumsMessage"
,
n
)},
expression
:
"device.channelNumsMessage"
}})],
1
),
e
.
_v
(
" "
),
t
(
"el-form-item"
,{
attrs
:{
prop
:
"channelRules"
,
label
:
"规则"
}},[
t
(
"el-select"
,{
attrs
:{
placeholder
:
"选择"
},
model
:{
value
:
e
.
device
.
channelRules
,
callback
:
function
(
n
){
e
.
$set
(
e
.
device
,
"channelRules"
,
n
)},
expression
:
"device.channelRules"
}},[
t
(
"el-option"
,{
attrs
:{
label
:
"白名单"
,
value
:
"0"
}}),
e
.
_v
(
" "
),
t
(
"el-option"
,{
attrs
:{
label
:
"黑名单"
,
value
:
"1"
}})],
1
)],
1
),
e
.
_v
(
" "
),
e
.
_l
(
e
.
device
.
channelNums
,(
function
(
n
,
a
){
return
t
(
"el-form-item"
,{
key
:
a
,
attrs
:{
label
:
"第"
+
(
a
+
1
)
+
"个渠道号: "
,
prop
:
"channelNums."
+
a
+
".value"
,
"label-width"
:
"20"
}},[
t
(
"el-row"
,[
t
(
"el-col"
,{
attrs
:{
span
:
14
}},[
t
(
"el-input"
,{
model
:{
value
:
n
.
value
,
callback
:
function
(
t
){
e
.
$set
(
n
,
"value"
,
t
)},
expression
:
"channelNum.value"
}})],
1
),
e
.
_v
(
" "
),
t
(
"el-col"
,{
attrs
:{
span
:
5
}},[
t
(
"el-button"
,{
on
:{
click
:
function
(
t
){
return
t
.
preventDefault
(),
e
.
removeChannelNums
(
n
)}}},[
e
.
_v
(
"
\
n 删除
\
n "
)])],
1
)],
1
)],
1
)})),
e
.
_v
(
" "
),
t
(
"el-form-item"
,[
t
(
"el-button"
,{
on
:{
click
:
e
.
addChannelNums
}},[
e
.
_v
(
"新增渠道号"
)]),
e
.
_v
(
" "
),
t
(
"el-button"
,{
attrs
:{
type
:
"primary"
},
on
:{
click
:
e
.
onSubmit
}},[
e
.
_v
(
"修改"
)]),
e
.
_v
(
" "
),
t
(
"el-button"
,{
on
:{
click
:
e
.
toDeviceList
}},[
e
.
_v
(
"取消"
)])],
1
)],
2
)],
1
)],
1
)},
i
=
[],
c
=
(
t
(
"456d"
),
t
(
"ac6a"
),
t
(
"96cf"
),
t
(
"3b8d"
)),
l
=
t
(
"aa98"
),
s
=
{
channelNumsMessage
:
"终端提示文字"
,
channelRules
:
"规则"
},
u
=
{
data
:
function
(){
var
e
=
function
(
e
,
n
,
t
){
void
0
===
n
||
null
===
n
||
0
===
n
.
length
?
t
(
new
Error
(
s
[
e
.
field
]
+
"必须填写"
)):
t
()};
return
{
loading
:
!
1
,
device
:{
channelNums
:[{
value
:
""
}],
channelNumsMessage
:
""
,
channelRules
:
""
,
imeis
:[]},
rules
:{
channelNumsMessage
:[{
validator
:
e
}],
channelRules
:[{
validator
:
e
}]},
selectSeriesOptions
:[]}},
mounted
:
function
(){
this
.
device
.
imeis
=
this
.
$route
.
query
.
imeis
,
this
.
getFormData
()},
methods
:{
getFormData
:
function
(){
var
e
=
Object
(
c
[
"a"
])(
regeneratorRuntime
.
mark
((
function
e
(){
return
regeneratorRuntime
.
wrap
((
function
(
e
){
while
(
1
)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
case
"end"
:
return
e
.
stop
()}}),
e
)})));
function
n
(){
return
e
.
apply
(
this
,
arguments
)}
return
n
}(),
setDefault
:
function
(){
this
.
$refs
.
device
=
[]},
onSubmit
:
function
(){
var
e
=
this
;
this
.
loading
||
(
this
.
loading
=!
0
,
this
.
$refs
.
setChannel
.
validate
((
function
(
n
,
t
){
if
(
n
){
var
a
=
e
.
device
.
channelNums
;
e
.
device
.
channelNums
=
[],
a
.
forEach
((
function
(
n
){
e
.
device
.
channelNums
.
push
(
n
.
value
)})),
Object
(
l
[
"d"
])(
e
.
device
).
then
((
function
(
n
){
var
t
=
n
.
msg
;
e
.
$notify
({
title
:
"操作成功"
,
message
:
t
,
type
:
"success"
,
duration
:
2
e3
}),
e
.
setDefault
(),
e
.
toDeviceList
(),
e
.
loading
=!
1
})).
catch
((
function
(){
e
.
loading
=!
1
}))}
else
{
var
i
=
t
[
Object
.
keys
(
t
)[
0
]][
0
].
message
;
e
.
$message
({
message
:
i
,
type
:
"error"
}),
e
.
loading
=!
1
}})))},
toDeviceList
:
function
(){
this
.
$router
.
push
({
path
:
"/deviceManagement/device"
})},
addChannelNums
:
function
(){
this
.
device
.
channelNums
.
push
({
value
:
""
})},
removeChannelNums
:
function
(
e
){
var
n
=
this
.
device
.
channelNums
.
indexOf
(
e
);
-
1
!==
n
&&
this
.
device
.
channelNums
.
splice
(
n
,
1
)}}},
r
=
u
,
o
=
t
(
"2877"
),
d
=
Object
(
o
[
"a"
])(
r
,
a
,
i
,
!
1
,
null
,
"4506f574"
,
null
);
n
[
"default"
]
=
d
.
exports
}}]);
\ No newline at end of file
\ No newline at end of file
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/ProductSeriesService.java
View file @
0557a7f6
...
@@ -24,5 +24,7 @@ public interface ProductSeriesService extends IService<ProductSeriesEntity> {
...
@@ -24,5 +24,7 @@ public interface ProductSeriesService extends IService<ProductSeriesEntity> {
List
<
ProductSeriesEntity
>
queryList
(
Map
<
String
,
Object
>
params
);
List
<
ProductSeriesEntity
>
queryList
(
Map
<
String
,
Object
>
params
);
ProductSeriesEntity
queryOne
(
Long
seriesId
);
ProductSeriesEntity
queryOne
(
Long
seriesId
);
ProductSeriesEntity
queryBySeriesNum
(
String
seriesNum
);
}
}
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/impl/ProductSeriesServiceImpl.java
View file @
0557a7f6
...
@@ -49,5 +49,12 @@ public class ProductSeriesServiceImpl extends ServiceImpl<ProductSeriesDao, Prod
...
@@ -49,5 +49,12 @@ public class ProductSeriesServiceImpl extends ServiceImpl<ProductSeriesDao, Prod
return
seriesEntity
;
return
seriesEntity
;
}
}
@Override
public
ProductSeriesEntity
queryBySeriesNum
(
String
seriesNum
){
ProductSeriesEntity
seriesEntity
=
getOne
(
new
QueryWrapper
<
ProductSeriesEntity
>().
eq
(
"series_num"
,
seriesNum
));
return
seriesEntity
;
}
}
}
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/web/DeviceInfoController.java
View file @
0557a7f6
...
@@ -150,11 +150,14 @@ public class DeviceInfoController {
...
@@ -150,11 +150,14 @@ public class DeviceInfoController {
List
<
DeviceInfoEntity
>
deviceInfoEntityList
=
new
LinkedList
<>();
List
<
DeviceInfoEntity
>
deviceInfoEntityList
=
new
LinkedList
<>();
if
(
devicesDto
.
getImeis
()
!=
null
&&
devicesDto
.
getImeis
().
size
()
!=
0
)
{
if
(
devicesDto
.
getImeis
()
!=
null
&&
devicesDto
.
getImeis
().
size
()
!=
0
)
{
devicesDto
.
getImeis
().
forEach
(
str
->
{
devicesDto
.
getImeis
().
forEach
(
str
->
{
DeviceInfoEntity
deviceInfoEntity
=
new
DeviceInfoEntity
();
DeviceInfoEntity
queryDeviceByImei
=
deviceInfoService
.
queryDeviceByImei
(
str
);
deviceInfoEntity
.
setImei
(
str
);
if
(
queryDeviceByImei
==
null
){
deviceInfoEntity
.
setSeriesId
(
devicesDto
.
getSeriesId
());
DeviceInfoEntity
deviceInfoEntity
=
new
DeviceInfoEntity
();
deviceInfoEntity
.
setDeptId
(
devicesDto
.
getDeptId
());
deviceInfoEntity
.
setImei
(
str
);
deviceInfoEntityList
.
add
(
deviceInfoEntity
);
deviceInfoEntity
.
setSeriesId
(
devicesDto
.
getSeriesId
());
deviceInfoEntity
.
setDeptId
(
devicesDto
.
getDeptId
());
deviceInfoEntityList
.
add
(
deviceInfoEntity
);
}
});
});
}
}
deviceInfoService
.
updateBatchByImei
(
deviceInfoEntityList
);
deviceInfoService
.
updateBatchByImei
(
deviceInfoEntityList
);
...
...
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/web/ProductSeriesController.java
View file @
0557a7f6
...
@@ -87,6 +87,21 @@ public class ProductSeriesController {
...
@@ -87,6 +87,21 @@ public class ProductSeriesController {
return
R
.
ok
();
return
R
.
ok
();
}
}
@RequestMapping
(
"/querySeriesDto"
)
public
SeriesDto
querySeriesDto
(
@RequestBody
String
seriesNum
){
ProductSeriesEntity
seriesEntity
=
productSeriesService
.
queryBySeriesNum
(
seriesNum
);
if
(
seriesEntity
==
null
){
return
null
;
}
SeriesDto
dto
=
new
SeriesDto
();
BeanUtils
.
copyProperties
(
seriesEntity
,
dto
);
return
dto
;
}
/**
/**
* 修改
* 修改
*/
*/
...
...
cneeds-server-device/src/main/resources/application.yml
View file @
0557a7f6
spring
:
spring
:
profiles
:
profiles
:
active
:
prod
active
:
dev
application
:
application
:
name
:
cneeds-server-device
name
:
cneeds-server-device
...
...
cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/service/impl/DeviceLogServiceImpl.java
View file @
0557a7f6
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.mx.cneeds.common.dto.DeviceLogDto
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.Query
;
import
com.mx.cneeds.common.pager.Query
;
import
com.mx.cneeds.server.dao.DeviceLogDao
;
import
com.mx.cneeds.server.dao.DeviceLogDao
;
...
@@ -56,13 +57,12 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogDao, DeviceLogEnt
...
@@ -56,13 +57,12 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogDao, DeviceLogEnt
public
Long
wechatUploadLog
(
DeviceLogEntity
deviceLogEntity
){
public
Long
wechatUploadLog
(
DeviceLogEntity
deviceLogEntity
){
DeviceLogEntity
logEntity
=
queryOneBylogAcceptId
(
deviceLogEntity
.
getLogAcceptId
());
DeviceLogEntity
logEntity
=
queryOneBylogAcceptId
(
deviceLogEntity
.
getLogAcceptId
());
if
(
logEntity
!=
null
){
if
(
logEntity
!=
null
){
/*//未处理状态
//未处理状态
deviceLogEntity.setStatus(0);
deviceLogEntity.setStatus(0);
deviceLogEntity.setLogfileStatus(1);
deviceLogEntity.setLogfileStatus(1);
getBaseMapper().update(deviceLogEntity,
getBaseMapper().update(deviceLogEntity,
new UpdateWrapper<DeviceLogEntity>()
new UpdateWrapper<DeviceLogEntity>()
.
eq
(
"log_accept_id"
,
deviceLogEntity
.
getLogAcceptId
()));
.eq("log_accept_id", deviceLogEntity.getLogAcceptId()));
*/
}
else
{
}
else
{
deviceLogEntity
.
setCreateTime
(
new
Date
());
deviceLogEntity
.
setCreateTime
(
new
Date
());
deviceLogEntity
.
setStatus
(-
1
);
deviceLogEntity
.
setStatus
(-
1
);
...
@@ -86,11 +86,12 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogDao, DeviceLogEnt
...
@@ -86,11 +86,12 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogDao, DeviceLogEnt
getBaseMapper
().
update
(
deviceLogEntity
,
getBaseMapper
().
update
(
deviceLogEntity
,
new
UpdateWrapper
<
DeviceLogEntity
>()
new
UpdateWrapper
<
DeviceLogEntity
>()
.
eq
(
"log_accept_id"
,
deviceLogEntity
.
getLogAcceptId
()));
.
eq
(
"log_accept_id"
,
deviceLogEntity
.
getLogAcceptId
()));
}
else
{
}
/*else {
deviceLogEntity.setCreateTime(new Date());
deviceLogEntity.setCreateTime(new Date());
deviceLogEntity.setStatus(-1);
deviceLogEntity.setStatus(-1);
getBaseMapper().insert(deviceLogEntity);
getBaseMapper().insert(deviceLogEntity);
}
}
*/
}
}
@Override
@Override
...
@@ -98,4 +99,5 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogDao, DeviceLogEnt
...
@@ -98,4 +99,5 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogDao, DeviceLogEnt
return
getBaseMapper
().
selectOne
(
new
QueryWrapper
<
DeviceLogEntity
>()
return
getBaseMapper
().
selectOne
(
new
QueryWrapper
<
DeviceLogEntity
>()
.
eq
(
"log_accept_id"
,
logAcceptId
));
.
eq
(
"log_accept_id"
,
logAcceptId
));
}
}
}
}
cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java
View file @
0557a7f6
...
@@ -45,10 +45,6 @@ public class LogUploadController {
...
@@ -45,10 +45,6 @@ public class LogUploadController {
deviceLogEntity
.
setRepetitionProbability
(
dto
.
getProbability
());
deviceLogEntity
.
setRepetitionProbability
(
dto
.
getProbability
());
deviceLogEntity
.
setRepetitionSteps
(
dto
.
getSteps
());
deviceLogEntity
.
setRepetitionSteps
(
dto
.
getSteps
());
Long
logId
=
deviceLogService
.
wechatUploadLog
(
deviceLogEntity
);
Long
logId
=
deviceLogService
.
wechatUploadLog
(
deviceLogEntity
);
/*if (dto.getFileMap()!=null && dto.getFileMap().size() != 0){
deviceLogMediaService.savewechatMedias(logId, dto.getFileMap());
}*/
}
}
@RequestMapping
(
"/wechatUploadAloneFile"
)
@RequestMapping
(
"/wechatUploadAloneFile"
)
...
@@ -71,6 +67,14 @@ public class LogUploadController {
...
@@ -71,6 +67,14 @@ public class LogUploadController {
return
dto
;
return
dto
;
}
}
@RequestMapping
(
"/queryLogFileByLogAcceptId"
)
public
DeviceLogDto
queryLogFileByLogAcceptId
(
@RequestBody
String
logAcceptId
){
DeviceLogEntity
deviceLogEntity
=
deviceLogService
.
queryOneBylogAcceptId
(
logAcceptId
);
DeviceLogDto
dto
=
new
DeviceLogDto
();
BeanUtils
.
copyProperties
(
deviceLogEntity
,
dto
);
return
dto
;
}
@RequestMapping
(
"/uploadLogFile"
)
@RequestMapping
(
"/uploadLogFile"
)
public
void
uploadLogFile
(
@RequestBody
DeviceLogFileDto
dto
){
public
void
uploadLogFile
(
@RequestBody
DeviceLogFileDto
dto
){
...
@@ -114,4 +118,5 @@ public class LogUploadController {
...
@@ -114,4 +118,5 @@ public class LogUploadController {
}
}
cneeds-server-logupload/src/main/resources/application.yml
View file @
0557a7f6
spring
:
spring
:
profiles
:
profiles
:
active
:
prod
active
:
dev
application
:
application
:
name
:
cneeds-server-logupload
name
:
cneeds-server-logupload
...
...
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