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 个修改的文件
包含
135 行增加
和
5 行删除
+135
-5
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
+0
-0
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;
...
@@ -3,9 +3,11 @@ package com.tykj.dev.device.library.repository;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
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.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
javax.transaction.Transactional
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -64,5 +66,16 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
...
@@ -64,5 +66,16 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnitIn
(
List
<
Integer
>
packingIds
,
List
<
String
>
unitNames
);
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnitIn
(
List
<
Integer
>
packingIds
,
List
<
String
>
unitNames
);
List
<
DeviceLibrary
>
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
String
ownUnitName
,
String
locationUnitName
,
Integer
status
);
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 {
...
@@ -68,7 +68,12 @@ public enum DeviceLifeStatus {
/**
/**
* 使用
* 使用
*/
*/
USE
(
14
,
"使用"
);
USE
(
14
,
"使用"
),
/**
* 待清退
*/
REPEL
(
15
,
"清退"
);
public
Integer
id
;
public
Integer
id
;
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
5e5efb84
...
@@ -73,12 +73,21 @@ public class RepelQueryController {
...
@@ -73,12 +73,21 @@ public class RepelQueryController {
return
ResponseEntity
.
ok
(
repelQueryService
.
clearedList
(
unitId
));
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}"
)
@GetMapping
(
value
=
"/provinceDirectlyUnderDev/{taskId}"
)
@ApiOperation
(
value
=
"省直属任务
装备
查询接口"
,
notes
=
"省直属任务装备查询接口"
)
@ApiOperation
(
value
=
"省直属任务
单位列表
查询接口"
,
notes
=
"省直属任务装备查询接口"
)
public
ResponseEntity
provinceDirectlyUnderDev
(
@PathVariable
Integer
taskId
){
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 {
...
@@ -64,6 +64,7 @@ public class DeviceRepel extends BaseEntity {
*
*
*/
*/
@ApiModelProperty
(
value
=
"正文"
)
@ApiModelProperty
(
value
=
"正文"
)
@Column
(
columnDefinition
=
"TEXT"
)
private
String
files
;
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 {
...
@@ -40,6 +40,12 @@ public class DeviceRepelDetail extends BaseEntity {
@ApiModelProperty
(
value
=
"账单id"
)
@ApiModelProperty
(
value
=
"账单id"
)
private
Integer
repelId
;
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;
...
@@ -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.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.domain.RepelTaskStatistical
;
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.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.entity.vo.RepelStatisticsVo
;
import
com.tykj.dev.device.user.base.ret.LeftNavigation
;
import
java.util.List
;
import
java.util.List
;
...
@@ -53,7 +55,13 @@ public interface RepelQueryService {
...
@@ -53,7 +55,13 @@ public interface RepelQueryService {
List
<
DeviceLibrary
>
clearedList
(
Integer
unitId
);
List
<
DeviceLibrary
>
clearedList
(
Integer
unitId
);
/**
/**
*
*
省直属任务装备查询接口
*/
*/
List
<
DeviceLibrary
>
provinceDirectlyUnderDev
(
Integer
taskId
);
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
差异被折叠。
点击展开。
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;
...
@@ -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.RepelDeviceUnit
;
import
com.tykj.dev.device.sendback.entity.domain.RepelTaskStatistical
;
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.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.entity.vo.RepelStatisticsVo
;
import
com.tykj.dev.device.sendback.service.*
;
import
com.tykj.dev.device.sendback.service.*
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
...
@@ -22,6 +23,7 @@ import org.springframework.stereotype.Service;
...
@@ -22,6 +23,7 @@ import org.springframework.stereotype.Service;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -115,6 +117,22 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -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
){
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
""
)&&
!
involeDevice
.
equals
(
","
))
{
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
""
)&&
!
involeDevice
.
equals
(
","
))
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论