Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
5e5efb84
提交
5e5efb84
authored
1月 19, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【清退】提交BUG修改代码
上级
4936e1c6
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
180 行增加
和
31 行删除
+180
-31
DeviceLibraryDao.java
.../tykj/dev/device/library/repository/DeviceLibraryDao.java
+13
-0
DeviceLifeStatus.java
...rc/main/java/com/tykj/dev/misc/base/DeviceLifeStatus.java
+6
-1
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+12
-3
DeviceRepel.java
...m/tykj/dev/device/sendback/entity/domain/DeviceRepel.java
+1
-0
DeviceRepelDetail.java
.../dev/device/sendback/entity/domain/DeviceRepelDetail.java
+6
-0
DirectlyUnderNavigation.java
...ev/device/sendback/entity/vo/DirectlyUnderNavigation.java
+37
-0
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+9
-1
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+45
-26
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+18
-0
sendDevice.java
...java/com/tykj/dev/device/sendback/service/sendDevice.java
+33
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryDao.java
浏览文件 @
5e5efb84
...
...
@@ -3,9 +3,11 @@ package com.tykj.dev.device.library.repository;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
javax.transaction.Transactional
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -64,5 +66,16 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnitIn
(
List
<
Integer
>
packingIds
,
List
<
String
>
unitNames
);
List
<
DeviceLibrary
>
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
String
ownUnitName
,
String
locationUnitName
,
Integer
status
);
@Transactional
@Modifying
@Query
(
"update DeviceLibrary o set o.lifeStatus = :lifeStatus where o.id in :idList"
)
int
upDateLeftStatus
(
Integer
lifeStatus
,
@Param
(
"idList"
)
List
<
Integer
>
idList
);
@Transactional
@Modifying
@Query
(
"update DeviceLibrary o set o.lifeStatus = :lifeStatus ,o.locationUnit = :unitName,o.ownUnit = :unitName where o.id in :idList"
)
int
upDateLeftStatusAndUnitName
(
Integer
lifeStatus
,
String
unitName
,
@Param
(
"idList"
)
List
<
Integer
>
idList
);
}
dev-misc/src/main/java/com/tykj/dev/misc/base/DeviceLifeStatus.java
浏览文件 @
5e5efb84
...
...
@@ -68,7 +68,12 @@ public enum DeviceLifeStatus {
/**
* 使用
*/
USE
(
14
,
"使用"
);
USE
(
14
,
"使用"
),
/**
* 待清退
*/
REPEL
(
15
,
"清退"
);
public
Integer
id
;
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
5e5efb84
...
...
@@ -73,12 +73,21 @@ public class RepelQueryController {
return
ResponseEntity
.
ok
(
repelQueryService
.
clearedList
(
unitId
));
}
// /**
// * 省直属任务装备查询接口
// */
// @GetMapping(value ="/provinceDirectlyUnderDev/{taskId}")
// @ApiOperation(value = "省直属任务装备查询接口", notes = "省直属任务装备查询接口")
// public ResponseEntity provinceDirectlyUnderDev(@PathVariable Integer taskId){
// return ResponseEntity.ok(repelQueryService.provinceDirectlyUnderDev(taskId));
// }
/**
* 省直属任务
装备
查询接口
* 省直属任务
单位列表
查询接口
*/
@GetMapping
(
value
=
"/provinceDirectlyUnderDev/{taskId}"
)
@ApiOperation
(
value
=
"省直属任务
装备
查询接口"
,
notes
=
"省直属任务装备查询接口"
)
@ApiOperation
(
value
=
"省直属任务
单位列表
查询接口"
,
notes
=
"省直属任务装备查询接口"
)
public
ResponseEntity
provinceDirectlyUnderDev
(
@PathVariable
Integer
taskId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
provinceDirectlyUnderDev
(
taskId
));
return
ResponseEntity
.
ok
(
repelQueryService
.
directlyUnderUnitLeftNavigation
(
taskId
));
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/DeviceRepel.java
浏览文件 @
5e5efb84
...
...
@@ -64,6 +64,7 @@ public class DeviceRepel extends BaseEntity {
*
*/
@ApiModelProperty
(
value
=
"正文"
)
@Column
(
columnDefinition
=
"TEXT"
)
private
String
files
;
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/DeviceRepelDetail.java
浏览文件 @
5e5efb84
...
...
@@ -40,6 +40,12 @@ public class DeviceRepelDetail extends BaseEntity {
@ApiModelProperty
(
value
=
"账单id"
)
private
Integer
repelId
;
/**
* 编号
*/
@ApiModelProperty
(
value
=
"单据编号"
)
private
String
num
;
/**
* 申请文号
*/
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/DirectlyUnderNavigation.java
0 → 100644
浏览文件 @
5e5efb84
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
com.tykj.dev.device.user.base.ret.LeftNavigation
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DirectlyUnderNavigation.java
* @Description TODO
* @createTime 2021年01月18日 10:41:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"直属单位列表"
)
public
class
DirectlyUnderNavigation
{
/**
* id
*/
private
Integer
id
;
/**
* 名称
*/
private
String
name
;
/**
* 定位id
*/
private
String
location
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
5e5efb84
...
...
@@ -5,7 +5,9 @@ import com.tykj.dev.device.sendback.entity.domain.DeviceRepel;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.domain.RepelTaskStatistical
;
import
com.tykj.dev.device.sendback.entity.vo.DeviceChooseRepel
;
import
com.tykj.dev.device.sendback.entity.vo.DirectlyUnderNavigation
;
import
com.tykj.dev.device.sendback.entity.vo.RepelStatisticsVo
;
import
com.tykj.dev.device.user.base.ret.LeftNavigation
;
import
java.util.List
;
...
...
@@ -53,7 +55,13 @@ public interface RepelQueryService {
List
<
DeviceLibrary
>
clearedList
(
Integer
unitId
);
/**
*
*
省直属任务装备查询接口
*/
List
<
DeviceLibrary
>
provinceDirectlyUnderDev
(
Integer
taskId
);
/**
* 查询直属单位列表
*/
List
<
DirectlyUnderNavigation
>
directlyUnderUnitLeftNavigation
(
Integer
taskId
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
5e5efb84
...
...
@@ -35,6 +35,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.stream.Collectors
;
...
...
@@ -115,16 +117,15 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepel
.
getTaskScopes
().
forEach
(
unisId
->{
Units
units1
=
unitsService
.
findById
(
unisId
);
if
(
units1
.
getType
()==
2
)
{
directlUnderUnit
.
set
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
())));
}
else
if
(
units1
.
getType
()==
1
){
log
.
info
(
"asdasdas{}"
,
units1
.
getName
());
Area
area1
=
areaService
.
findByid
(
units1
.
getAreaId
());
if
(
"2"
.
equals
(
unitsService
.
findById
(
unisId
).
getCode
()))
{
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
unisId
))){
directlUnderUnit
.
set
(
true
);
}
}
else
{
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
deviceRepelDetail
.
setId
(
null
);
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
uni
sId
))){
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
uni
ts1
.
getUnitId
()
))){
TaskBto
taskBto1
=
cityRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
model
,
""
));
}
...
...
@@ -136,8 +137,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setSendUnit
(
units
.
getName
());
deviceRepelDetail
.
setId
(
null
);
if
(
directlUnderUnit
.
get
()){
TaskBto
taskBto
1
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto
1
.
getId
(),
0
,
"省直属"
,
model
,
""
));
TaskBto
taskBto
2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto
2
.
getId
(),
0
,
"省直属"
,
model
,
""
));
}
deviceRepelDetail
.
setId
(
null
);
List
<
String
>
strings
=
new
ArrayList
<>();
...
...
@@ -294,11 +295,13 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
// List<ModelCount> modelCountList= JacksonUtil.readValue(a, new TypeReference<List<ModelCount>>() {});
// log.info("---{}",modelCountList.size());
// boolean flag= repelTaskStatisticalService.findAllRepelTaskStatistical(589,286).stream().allMatch(e->e.getTaskStatus()!=1);
}
@Override
public
void
submitChooseDevice
(
Integer
taskId
,
ResolveConfirm
resolveConfirm
)
{
long
stime
=
System
.
currentTimeMillis
();
log
.
info
(
"提交装备接口开始{}"
,
taskId
);
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
StringBuffer
ids
=
new
StringBuffer
();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
...
...
@@ -317,11 +320,13 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceLibrary
->
{
map
.
put
(
deviceLibrary
.
getModel
(),
map
.
get
(
deviceLibrary
.
getModel
())
+
1
);
ids
.
append
(
","
).
append
(
deviceLibrary
.
getId
());
deviceLibrary
.
setLifeStatus
(
12
);
//
deviceLibrary.setLifeStatus(12);
}
);
deviceLibraryDao
.
saveAll
(
deviceLibraries
);
log
.
info
(
"存储设备开始"
);
long
time1
=
System
.
currentTimeMillis
();
deviceLibraryDao
.
upDateLeftStatus
(
2
,
resolveConfirm
.
getDevIds
());
log
.
info
(
"存储结束{}"
,
System
.
currentTimeMillis
()-
time1
);
for
(
String
key:
map
.
keySet
()){
ModelCount
modelCount
=
new
ModelCount
();
modelCount
.
setCount
(
map
.
get
(
key
));
...
...
@@ -336,6 +341,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setDeviceIds
(
ids
.
toString
());
deviceRepelDetail
.
setSubmitDescription
(
resolveConfirm
.
getDes
());
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
log
.
info
(
"提交装备接口结束{}"
,
System
.
currentTimeMillis
()-
stime
);
}
@Override
...
...
@@ -379,6 +385,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
orderOutDataRepelDetail
.
setDeviceIds
(
deviceRepelDetail
.
getDeviceIds
());
orderOutDataRepelDetail
.
setLeftSignatureId
(
UUID
.
randomUUID
().
toString
());
orderOutDataRepelDetail
.
setRightSignatureId
(
UUID
.
randomUUID
().
toString
());
orderOutDataRepelDetail
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()+
"QT"
+
deviceRepelDetail
.
getId
());
deviceRepelDetailService
.
saveDeviceRepelDetail
(
orderOutDataRepelDetail
);
taskBto
.
setOwnUnit
(
orderOutData
.
getReceiveUnitId
());
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1209
,
0
);
...
...
@@ -400,20 +407,24 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
unitsService
.
findById
(
deviceRepelDetail
.
getReceiveUnitId
()).
getLevel
()==
2
){
inStock
=
2
;
}
else
{
inStock
=
1
2
;
inStock
=
1
5
;
}
List
<
DeviceLibrary
>
libraries
=
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
());
libraries
.
forEach
(
deviceLibrary
->
{
deviceLibrary
.
setLocationUnit
(
deviceRepelDetail
.
getReceiveUnit
());
deviceLibrary
.
setOwnUnit
(
deviceRepelDetail
.
getReceiveUnit
());
deviceLibrary
.
setLifeStatus
(
inStock
);
//
deviceLibrary.setLocationUnit(deviceRepelDetail.getReceiveUnit());
//
deviceLibrary.setOwnUnit(deviceRepelDetail.getReceiveUnit());
//
deviceLibrary.setLifeStatus(inStock);
list
.
add
(
new
RepelDeviceUnit
(
deviceLibrary
.
getId
(),
deviceRepelDetail
.
getSendUnitId
()));
}
);
deviceLibraryDao
.
saveAll
(
libraries
);
repelDeviceUnitService
.
saveAllRepelDeviceUnit
(
list
);
log
.
info
(
"更新数据装备以及所属单位-{}"
,
libraries
.
size
());
long
time
=
System
.
currentTimeMillis
();
deviceLibraryDao
.
upDateLeftStatusAndUnitName
(
inStock
,
deviceRepelDetail
.
getReceiveUnit
(),
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
log
.
info
(
"更新数据装备以及所属单位{}"
,
System
.
currentTimeMillis
()-
time
);
repelDeviceUnitService
.
saveAllRepelDeviceUnit
(
list
);
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
repelTaskStatistical
.
setTaskStatus
(
1
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
...
...
@@ -440,15 +451,19 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceLibrary
->
{
Units
units1
=
unitsService
.
findbyName
(
deviceLibrary
.
getOwnUnit
());
list
.
add
(
new
RepelDeviceUnit
(
deviceLibrary
.
getId
(),
units1
.
getUnitId
()));
deviceLibrary
.
setLocationUnit
(
units
.
getName
());
deviceLibrary
.
setOwnUnit
(
units
.
getName
());
deviceLibrary
.
setLifeStatus
(
12
);
//
deviceLibrary.setLocationUnit(units.getName());
//
deviceLibrary.setOwnUnit(units.getName());
// deviceLibrary.setLifeStatus(15
);
ids
.
append
(
","
).
append
(
deviceLibrary
.
getId
());
}
);
log
.
info
(
"更新数据装备以及所属单位-{}"
,
libraries
.
size
());
long
time
=
System
.
currentTimeMillis
();
deviceLibraryDao
.
upDateLeftStatusAndUnitName
(
15
,
units
.
getName
(),
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
log
.
info
(
"更新数据装备以及所属单位{}"
,
System
.
currentTimeMillis
()-
time
);
deviceRepelDetail
.
setDeviceIds
(
ids
.
toString
());
deviceLibraryDao
.
saveAll
(
libraries
);
//
deviceLibraryDao.saveAll(libraries);
repelDeviceUnitService
.
saveAllRepelDeviceUnit
(
list
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
isEnd
(
taskBto
,
deviceRepelDetail
.
getRepelId
());
...
...
@@ -496,14 +511,18 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
List
<
DeviceLibrary
>
libraries
=
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
());
libraries
.
forEach
(
deviceLibrary
->
{
deviceLibrary
.
setLocationUnit
(
deviceRepelDetail
.
getReceiveUnit
());
deviceLibrary
.
setOwnUnit
(
deviceRepelDetail
.
getReceiveUnit
());
deviceLibrary
.
setLifeStatus
(
2
);
//
deviceLibrary.setLocationUnit(deviceRepelDetail.getReceiveUnit());
//
deviceLibrary.setOwnUnit(deviceRepelDetail.getReceiveUnit());
//
deviceLibrary.setLifeStatus(2);
list
.
add
(
new
RepelDeviceUnit
(
deviceLibrary
.
getId
(),
deviceRepelDetail
.
getSendUnitId
()));
}
);
log
.
info
(
"更新数据装备以及所属单位-{}"
,
libraries
.
size
());
long
time
=
System
.
currentTimeMillis
();
deviceLibraryDao
.
upDateLeftStatusAndUnitName
(
2
,
deviceRepelDetail
.
getReceiveUnit
(),
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
log
.
info
(
"更新数据装备以及所属单位{}"
,
System
.
currentTimeMillis
()-
time
);
deviceLibraryDao
.
saveAll
(
libraries
);
//
deviceLibraryDao.saveAll(libraries);
repelDeviceUnitService
.
saveAllRepelDeviceUnit
(
list
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
}
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
5e5efb84
...
...
@@ -7,6 +7,7 @@ import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail;
import
com.tykj.dev.device.sendback.entity.domain.RepelDeviceUnit
;
import
com.tykj.dev.device.sendback.entity.domain.RepelTaskStatistical
;
import
com.tykj.dev.device.sendback.entity.vo.DeviceChooseRepel
;
import
com.tykj.dev.device.sendback.entity.vo.DirectlyUnderNavigation
;
import
com.tykj.dev.device.sendback.entity.vo.RepelStatisticsVo
;
import
com.tykj.dev.device.sendback.service.*
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
...
...
@@ -22,6 +23,7 @@ import org.springframework.stereotype.Service;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -115,6 +117,22 @@ public class RepelQueryServiceImpl implements RepelQueryService {
}
@Override
public
List
<
DirectlyUnderNavigation
>
directlyUnderUnitLeftNavigation
(
Integer
taskId
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
List
<
DirectlyUnderNavigation
>
list
=
new
ArrayList
<>();
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetailNoDev
(
taskBto
.
getBillId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
unitsService
.
findAllByIdIn
(
StringUtils
.
stringToList
(
deviceRepel
.
getTaskScope
())).
forEach
(
units
->
{
if
(
units
.
getType
()==
2
){
list
.
add
(
new
DirectlyUnderNavigation
(
units
.
getUnitId
(),
units
.
getName
(),
UUID
.
randomUUID
().
toString
()));
}
}
);
return
list
;
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
""
)&&
!
involeDevice
.
equals
(
","
))
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/sendDevice.java
0 → 100644
浏览文件 @
5e5efb84
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.stereotype.Service
;
/**
* @author zjm
* @version 1.0.0
* @ClassName sendDevice.java
* @Description TODO
* @createTime 2021年01月18日 09:36:00
*/
@Service
@Slf4j
public
class
sendDevice
implements
CommandLineRunner
{
@Autowired
DeviceLibraryDao
deviceLibraryDao
;
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
log
.
info
(
"开始模拟数据"
);
// DeviceLibrary deviceLibrary= deviceLibraryDao.findById(4).get();
// for (int i=0;i<100;i++){
// deviceLibrary.setId(null);
// deviceLibraryDao.save(deviceLibrary);
// }
log
.
info
(
"模拟数据结束"
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论