Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
89c17c70
提交
89c17c70
authored
10月 30, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[统计分析、列装]增加了核查统计、修改了列装
上级
9c0eb997
隐藏空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
479 行增加
和
35 行删除
+479
-35
GlobalMap.java
dev-config/src/main/java/com/tykj/dev/config/GlobalMap.java
+16
-0
DeviceSecretLevel.java
...c/main/java/com/tykj/dev/misc/base/DeviceSecretLevel.java
+32
-0
PageUtil.java
dev-misc/src/main/java/com/tykj/dev/misc/utils/PageUtil.java
+3
-2
PackingController.java
...tykj/dev/device/packing/controller/PackingController.java
+68
-6
PackingLibraryController.java
...v/device/packing/controller/PackingLibraryController.java
+9
-4
PackingLibraryService.java
...ykj/dev/device/packing/service/PackingLibraryService.java
+7
-0
PackingLibraryServiceImpl.java
...evice/packing/service/impl/PackingLibraryServiceImpl.java
+35
-1
PackingLibrary.java
...tykj/dev/device/packing/subject/domin/PackingLibrary.java
+11
-2
AddModel.java
...java/com/tykj/dev/device/packing/subject/vo/AddModel.java
+36
-0
AddPack.java
.../java/com/tykj/dev/device/packing/subject/vo/AddPack.java
+88
-0
PackingModelEdit.java
.../tykj/dev/device/packing/subject/vo/PackingModelEdit.java
+37
-0
SelectPack.java
...va/com/tykj/dev/device/packing/subject/vo/SelectPack.java
+32
-0
SelfCheckSaveVo.java
...tykj/dev/device/selfcheck/subject/vo/SelfCheckSaveVo.java
+0
-1
StatisticalController.java
...ykj/dev/statistical/controller/StatisticalController.java
+5
-6
StatisticalService.java
.../com/tykj/dev/statistical/service/StatisticalService.java
+9
-2
StatisticalServiceImpl.java
.../dev/statistical/service/impl/StatisticalServiceImpl.java
+81
-6
Verification.java
...c/main/java/com/tykj/dev/statistical/vo/Verification.java
+3
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+3
-1
LogAspect.java
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
+1
-1
application.properties
dev-union/src/main/resources/application.properties
+1
-1
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+2
-2
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/GlobalMap.java
浏览文件 @
89c17c70
...
...
@@ -26,6 +26,10 @@ public class GlobalMap {
private
static
final
Map
<
Integer
,
MatchingDeviceType
>
matchingDeviceTypeMap
;
private
static
final
Map
<
Integer
,
DeviceInvisibleRange
>
deviceInvisibleRangeMap
;
private
static
final
Map
<
Integer
,
DeviceSecretLevel
>
deviceSecretLevelMap
;
static
{
statusEnumMap
=
Arrays
.
stream
(
StatusEnum
.
values
())
.
collect
(
Collectors
.
toMap
(
statusEnum
->
statusEnum
.
id
,
Function
.
identity
()));
...
...
@@ -41,6 +45,10 @@ public class GlobalMap {
.
collect
(
Collectors
.
toMap
(
storageType
->
storageType
.
id
,
Function
.
identity
()));
matchingDeviceTypeMap
=
Arrays
.
stream
(
MatchingDeviceType
.
values
())
.
collect
(
Collectors
.
toMap
(
matchingDeviceType
->
matchingDeviceType
.
id
,
Function
.
identity
()));
deviceInvisibleRangeMap
=
Arrays
.
stream
(
DeviceInvisibleRange
.
values
())
.
collect
(
Collectors
.
toMap
(
deviceInvisibleRange
->
deviceInvisibleRange
.
id
,
Function
.
identity
()));
deviceSecretLevelMap
=
Arrays
.
stream
(
DeviceSecretLevel
.
values
())
.
collect
(
Collectors
.
toMap
(
deviceSecretLevel
->
deviceSecretLevel
.
id
,
Function
.
identity
()));
}
public
static
Map
<
Integer
,
StatusEnum
>
getStatusEnumMap
()
{
...
...
@@ -70,4 +78,12 @@ public class GlobalMap {
public
static
Map
<
Integer
,
MatchingRange
>
getMatchingRangeMap
()
{
return
matchingRangeMap
;
}
public
static
Map
<
Integer
,
DeviceSecretLevel
>
getDeviceSecretLevelMap
()
{
return
deviceSecretLevelMap
;
}
public
static
Map
<
Integer
,
DeviceInvisibleRange
>
getDeviceInvisibleRangeMap
()
{
return
deviceInvisibleRangeMap
;
}
}
dev-misc/src/main/java/com/tykj/dev/misc/base/DeviceSecretLevel.java
0 → 100644
浏览文件 @
89c17c70
package
com
.
tykj
.
dev
.
misc
.
base
;
import
lombok.AllArgsConstructor
;
/**
* @author dengdiyi
* 装备可见范围枚举
*/
@AllArgsConstructor
public
enum
DeviceSecretLevel
{
/**
* 省一级
*/
SECRETLEVEL_1
(
1
,
"绝密"
),
/**
* 县一级
*/
SECRETLEVEL_2
(
2
,
"秘密"
),
/**
* 市一级
*/
SECRETLEVEL_3
(
3
,
"机密"
),
/**
* 县一级
*/
SECRETLEVEL_4
(
4
,
"无"
);
public
Integer
id
;
public
String
name
;
}
dev-misc/src/main/java/com/tykj/dev/misc/utils/PageUtil.java
浏览文件 @
89c17c70
...
...
@@ -4,6 +4,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -19,7 +20,7 @@ public class PageUtil {
*/
public
static
<
T
>
Page
<
T
>
getPerPage
(
Integer
page
,
Integer
size
,
List
<
T
>
list
,
Pageable
pageable
)
{
//若List的size小于分页大小(只有一页)
if
(
list
.
size
()
<=
size
)
{
if
(
list
.
size
()
<=
size
&&
page
==
0
)
{
return
new
PageImpl
<>(
list
,
pageable
,
list
.
size
());
}
else
{
//计算分了几页
...
...
@@ -27,7 +28,7 @@ public class PageUtil {
int
value
=
new
Double
(
d
).
intValue
();
//当前页数超出了最大页数
if
(
page
>=
value
)
{
return
n
ull
;
return
n
ew
PageImpl
<>(
new
ArrayList
<>(),
pageable
,
0
)
;
}
else
{
//当前页的第一条记录的索引值
int
index
=
page
*
size
;
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/controller/PackingController.java
浏览文件 @
89c17c70
...
...
@@ -3,10 +3,7 @@ package com.tykj.dev.device.packing.controller;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.packing.service.PackingLibraryService
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.packing.subject.vo.PackingDetailVo
;
import
com.tykj.dev.device.packing.subject.vo.PackingLibraryConfirmVo
;
import
com.tykj.dev.device.packing.subject.vo.PackingLibrarySaveVo
;
import
com.tykj.dev.device.packing.subject.vo.PartSaveVo
;
import
com.tykj.dev.device.packing.subject.vo.*
;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
...
...
@@ -16,6 +13,7 @@ import com.tykj.dev.device.user.util.UserUtils;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.PageUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
...
...
@@ -27,9 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -145,4 +141,70 @@ public class PackingController {
packingDetailVo
.
setTaskLogUserVos
(
taskLogUserVos
);
return
ResultUtil
.
success
(
packingDetailVo
);
}
@ApiOperation
(
value
=
"添加列装型号"
)
@PostMapping
(
"/add/model"
)
public
ResponseEntity
addModel
(
@RequestBody
@Validated
AddModel
addModel
){
PackingLibrary
packingLibrary
=
new
PackingLibrary
();
BeanUtils
.
copyProperties
(
addModel
,
packingLibrary
);
packingLibrary
.
setIsRoot
(
1
);
packingLibrary
.
setName
(
addModel
.
getModel
());
packingLibraryService
.
addEntity
(
packingLibrary
);
return
ResponseEntity
.
ok
(
"添加成功"
);
}
@ApiOperation
(
value
=
"添加列装装备"
)
@PostMapping
(
"/add"
)
public
ResponseEntity
addPack
(
@RequestBody
@Validated
AddPack
addPack
){
PackingLibrary
packingLibrary
=
addPack
.
toDo
();
packingLibraryService
.
addEntity
(
packingLibrary
);
return
ResponseEntity
.
ok
(
"添加成功"
);
}
@ApiOperation
(
value
=
"删除列装"
)
@PostMapping
(
"/delete/{id}"
)
public
ResponseEntity
deleteById
(
@PathVariable
(
"id"
)
int
id
){
packingLibraryService
.
delete
(
id
);
return
ResponseEntity
.
ok
(
"删除成功"
);
}
@ApiOperation
(
value
=
"查询父子结构列装"
)
@PostMapping
(
"/select"
)
public
ResponseEntity
selectPack
(
@RequestBody
SelectPack
selectPack
){
return
ResultUtil
.
success
(
PageUtil
.
getPerPage
(
selectPack
.
getPage
(),
selectPack
.
getSize
(),
packingLibraryService
.
getInsertList
(
selectPack
),
selectPack
.
getPageable
()));
}
@ApiOperation
(
value
=
"编辑列装型号"
)
@PostMapping
(
"/update/model"
)
public
ResponseEntity
updateModel
(
@RequestBody
PackingModelEdit
packingModelEdit
){
PackingLibrary
packingLibrary
=
packingLibraryService
.
getOne
(
packingModelEdit
.
getPackingId
());
if
(
packingLibrary
.
getIsRoot
()==
1
){
if
(
packingModelEdit
.
getModel
()!=
null
){
packingLibrary
.
setModel
(
packingModelEdit
.
getModel
());
}
if
(
packingModelEdit
.
getInvisibleRange
()!=
null
){
packingLibrary
.
setInvisibleRange
(
packingModelEdit
.
getInvisibleRange
());
}
if
(
packingModelEdit
.
getSecretLevel
()!=
null
){
packingLibrary
.
setSecretLevel
(
packingModelEdit
.
getSecretLevel
());
}
if
(
packingModelEdit
.
getShowOrder
()!=
null
){
packingLibrary
.
setShowOrder
(
packingModelEdit
.
getShowOrder
());
}
if
(
packingModelEdit
.
getStatus
()!=
null
){
packingLibrary
.
setStatus
(
packingModelEdit
.
getStatus
());
}
packingLibraryService
.
update
(
packingLibrary
);
}
else
{
throw
new
ApiException
(
"传入的列装id不是型号"
);
}
return
ResponseEntity
.
ok
(
"编辑成功"
);
}
@ApiOperation
(
value
=
"编辑列装装备"
)
@PostMapping
(
"/update/device"
)
public
ResponseEntity
updateDevice
(){
return
ResponseEntity
.
ok
(
"编辑成功"
);
}
}
dev-packing/src/main/java/com/tykj/dev/device/packing/controller/PackingLibraryController.java
浏览文件 @
89c17c70
...
...
@@ -6,10 +6,8 @@ import com.tykj.dev.device.library.service.DeviceLibraryService;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.packing.service.PackingLibraryService
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.packing.subject.vo.PackingEditVo
;
import
com.tykj.dev.device.packing.subject.vo.PackingLibrarySelectVo
;
import
com.tykj.dev.device.packing.subject.vo.PackingLibraryUpdateVo
;
import
com.tykj.dev.device.packing.subject.vo.PartSaveVo
;
import
com.tykj.dev.device.packing.subject.vo.*
;
import
com.tykj.dev.misc.utils.PageUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -243,4 +241,11 @@ public class PackingLibraryController {
public
ResponseEntity
selectInvalidDetail
(
@PathVariable
(
"id"
)
@Min
(
value
=
1
,
message
=
"id不能小于1"
)
int
id
)
{
return
ResultUtil
.
success
(
packingLibraryService
.
getInvalidDetail
(
id
));
}
@ApiOperation
(
value
=
"查询父子结构列装"
)
@PostMapping
(
"/selectList"
)
public
ResponseEntity
selectPack
(
@RequestBody
SelectPack
selectPack
){
return
ResultUtil
.
success
(
packingLibraryService
.
getInsertList
(
selectPack
));
}
}
dev-packing/src/main/java/com/tykj/dev/device/packing/service/PackingLibraryService.java
浏览文件 @
89c17c70
...
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.packing.service;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.packing.subject.vo.PackingLibrarySelectVo
;
import
com.tykj.dev.device.packing.subject.vo.SelectPack
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
...
...
@@ -79,4 +80,10 @@ public interface PackingLibraryService {
* 通过id逻辑删除列装
*/
void
delete
(
Integer
id
);
/**
* @param selectPack 列装查询vo
* 获取父子结构列装列表
*/
List
<
PackingLibrary
>
getInsertList
(
SelectPack
selectPack
);
}
dev-packing/src/main/java/com/tykj/dev/device/packing/service/impl/PackingLibraryServiceImpl.java
浏览文件 @
89c17c70
...
...
@@ -2,10 +2,12 @@ package com.tykj.dev.device.packing.service.impl;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.config.GlobalMap
;
import
com.tykj.dev.device.packing.repository.PackingLibraryDao
;
import
com.tykj.dev.device.packing.service.PackingLibraryService
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.packing.subject.vo.PackingLibrarySelectVo
;
import
com.tykj.dev.device.packing.subject.vo.SelectPack
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.GetTreeUtils
;
...
...
@@ -15,7 +17,6 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.persistence.Transient
;
import
java.lang.reflect.Field
;
...
...
@@ -143,6 +144,39 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
packingLibraryDao
.
deleteById
(
id
);
}
/**
* @param selectPack 列装查询vo
* 获取父子结构列装列表
*/
@Override
public
List
<
PackingLibrary
>
getInsertList
(
SelectPack
selectPack
)
{
final
String
model
=
selectPack
.
getModel
();
final
String
content
=
selectPack
.
getContent
();
final
String
name
=
selectPack
.
getName
();
final
Integer
status
=
selectPack
.
getStatus
();
final
Integer
secretLevel
=
selectPack
.
getSecretLevel
();
List
<
PackingLibrary
>
packingLibraryEntities
=
packingLibraryDao
.
findAll
();
//返回父子结构
Map
<
Integer
,
PackingLibrary
>
nodeCollect
=
packingLibraryEntities
.
stream
().
collect
(
Collectors
.
toMap
(
PackingLibrary:
:
getId
,
packingLibrary
->
packingLibrary
));
return
GetTreeUtils
.
parseTreeFromDown
(
packingLibraryEntities
,
PackingLibrary:
:
getId
,
packingLibrary
->
Optional
.
ofNullable
(
nodeCollect
.
get
(
packingLibrary
.
getPartParentId
())),
PackingLibrary:
:
addChildNode
).
stream
().
filter
(
packingLibrary
->
{
boolean
isSameModel
=
model
==
null
||
packingLibrary
.
getModel
().
equals
(
model
);
boolean
isSameName
=
name
==
null
||
packingLibrary
.
getName
().
equals
(
name
);
boolean
isSameStatus
=
status
==
null
||
packingLibrary
.
getStatus
().
equals
(
status
);
boolean
isSameSecretLevel
=
secretLevel
==
null
||
packingLibrary
.
getSecretLevel
().
equals
(
secretLevel
);
boolean
isContainContent
=
content
==
null
||
packingLibrary
.
getModel
().
contains
(
content
)
||
GlobalMap
.
getDeviceInvisibleRangeMap
().
get
(
packingLibrary
.
getInvisibleRange
()).
name
.
contains
(
content
)
||
GlobalMap
.
getDeviceSecretLevelMap
().
get
(
packingLibrary
.
getSecretLevel
()).
name
.
contains
(
content
);
return
isSameModel
&&
isSameName
&&
isSameStatus
&&
isSameSecretLevel
&&
isContainContent
;
}).
sorted
(
Comparator
.
comparing
(
PackingLibrary:
:
getShowOrder
)).
collect
(
Collectors
.
toList
());
}
private
Specification
<
PackingLibrary
>
getSelectSpecification
(
PackingLibrarySelectVo
packingLibrarySelectVo
)
{
PredicateBuilder
<
PackingLibrary
>
predicateBuilder
=
Specifications
.
and
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/subject/domin/PackingLibrary.java
浏览文件 @
89c17c70
...
...
@@ -52,6 +52,15 @@ public class PackingLibrary {
*/
@ApiModelProperty
(
value
=
"是不是配件(0:不是,1:是)"
)
private
Integer
isPart
;
@ApiModelProperty
(
value
=
"是不是配件(0:不是,1:是)"
)
private
Integer
isRoot
;
@ApiModelProperty
(
value
=
"排序号"
)
private
Integer
showOrder
;
@ApiModelProperty
(
value
=
"类型"
)
private
Integer
style
;
/**
* 配件对应装备列装id
*/
...
...
@@ -93,9 +102,9 @@ public class PackingLibrary {
@ApiModelProperty
(
value
=
"可见范围"
)
private
Integer
invisibleRange
;
/**
*
类型
*
形态
*/
@ApiModelProperty
(
value
=
"
类型
"
)
@ApiModelProperty
(
value
=
"
形态
"
)
private
Integer
type
;
/**
* 列装性质
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/subject/vo/AddModel.java
0 → 100644
浏览文件 @
89c17c70
package
com
.
tykj
.
dev
.
device
.
packing
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.stereotype.Repository
;
import
javax.validation.constraints.NotNull
;
/**
* @author dengdiyi
*/
@Repository
@Data
@ApiModel
(
"添加列装型号类"
)
public
class
AddModel
{
@NotNull
(
message
=
"model不能为Null"
)
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
@ApiModelProperty
(
value
=
"密级"
)
private
Integer
secretLevel
;
@NotNull
(
message
=
"invisibleRange不能为Null"
)
@ApiModelProperty
(
value
=
"可见范围"
)
private
Integer
invisibleRange
;
@NotNull
(
message
=
"status不能为Null"
)
@ApiModelProperty
(
value
=
"列装状态"
)
private
Integer
status
;
@NotNull
(
message
=
"showOrder不能为Null"
)
@ApiModelProperty
(
value
=
"排序号"
)
private
Integer
showOrder
;
}
dev-packing/src/main/java/com/tykj/dev/device/packing/subject/vo/AddPack.java
0 → 100644
浏览文件 @
89c17c70
package
com
.
tykj
.
dev
.
device
.
packing
.
subject
.
vo
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Repository
;
import
javax.validation.constraints.NotNull
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"列装存储类"
)
@Repository
public
class
AddPack
{
@NotNull
(
message
=
"model不能为空"
)
@ApiModelProperty
(
value
=
"型号"
,
example
=
"测试型号"
)
private
String
model
;
@NotNull
(
message
=
"name不能为空"
)
@ApiModelProperty
(
value
=
"名称"
,
example
=
"测试名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"应用类型"
,
example
=
"1"
)
private
Integer
applyType
;
@ApiModelProperty
(
value
=
"配用范围"
,
example
=
"1"
)
private
Integer
matchingRange
;
@NotNull
(
message
=
"invisibleRange不能为空"
)
@ApiModelProperty
(
value
=
"可见范围"
,
example
=
"1"
)
private
Integer
invisibleRange
;
@NotNull
(
message
=
"type不能为空"
)
@ApiModelProperty
(
value
=
"形态"
,
example
=
"1"
)
private
Integer
type
;
@NotNull
(
message
=
"style不能为空"
)
@ApiModelProperty
(
value
=
"类型"
,
example
=
"1"
)
private
Integer
style
;
@NotNull
(
message
=
"secretLevel不能为空"
)
@ApiModelProperty
(
value
=
"密级(0:绝密,1:机密,2:秘密)"
,
example
=
"1"
)
private
Integer
secretLevel
;
@ApiModelProperty
(
value
=
"列装性质"
,
example
=
"1"
)
private
Integer
nature
;
@NotNull
(
message
=
"status不能为空"
)
@ApiModelProperty
(
value
=
"列装状态"
,
example
=
"1"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"生产单位"
,
example
=
"测试型号"
)
private
String
prodUnit
;
@ApiModelProperty
(
value
=
"创建单位"
,
example
=
"测试创建单位"
)
private
String
createUnit
;
@NotNull
(
message
=
"price不能为空"
)
@ApiModelProperty
(
value
=
"价格"
,
example
=
"2.000.000"
)
private
String
price
;
@ApiModelProperty
(
value
=
"照片名称"
,
example
=
"没有先填一个空格"
)
private
String
imageName
;
@ApiModelProperty
(
value
=
"照片路径"
,
example
=
"没有先填一个空格"
)
private
String
imageUrl
;
@ApiModelProperty
(
value
=
"附件名称"
,
example
=
"没有先填一个空格"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"附件路径"
,
example
=
"没有先填一个空格"
)
private
String
fileUrl
;
@ApiModelProperty
(
value
=
"父级ID"
,
example
=
"1"
)
private
Integer
partParentId
;
public
PackingLibrary
toDo
()
{
PackingLibrary
packingLibraryEntity
=
new
PackingLibrary
();
BeanUtils
.
copyProperties
(
this
,
packingLibraryEntity
);
packingLibraryEntity
.
setPackingStatus
(
2
);
packingLibraryEntity
.
setIsRoot
(
0
);
return
packingLibraryEntity
;
}
}
dev-packing/src/main/java/com/tykj/dev/device/packing/subject/vo/PackingModelEdit.java
0 → 100644
浏览文件 @
89c17c70
package
com
.
tykj
.
dev
.
device
.
packing
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.stereotype.Repository
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
/**
* @author dengdiyi
*/
@Repository
@Data
@ApiModel
(
"列装型号编辑类"
)
public
class
PackingModelEdit
{
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
@ApiModelProperty
(
value
=
"密级"
)
private
Integer
secretLevel
;
@ApiModelProperty
(
value
=
"可见范围"
)
private
Integer
invisibleRange
;
@ApiModelProperty
(
value
=
"列装状态"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"排序号"
)
private
Integer
showOrder
;
@ApiModelProperty
(
value
=
"列装装备id"
,
example
=
"1"
)
@NotNull
(
message
=
"packingId不能为空"
)
private
Integer
packingId
;
}
dev-packing/src/main/java/com/tykj/dev/device/packing/subject/vo/SelectPack.java
0 → 100644
浏览文件 @
89c17c70
package
com
.
tykj
.
dev
.
device
.
packing
.
subject
.
vo
;
import
com.tykj.dev.misc.base.CustomPage
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"列装查询类"
)
public
class
SelectPack
extends
CustomPage
{
@ApiModelProperty
(
value
=
"模糊查询关键字"
,
example
=
"测试"
)
public
String
content
;
@ApiModelProperty
(
value
=
"名称"
,
example
=
"名称"
)
public
String
name
;
@ApiModelProperty
(
value
=
"型号"
,
example
=
"1234"
)
public
String
model
;
@ApiModelProperty
(
value
=
"密级(0:绝密,1:机密,2:秘密)"
,
example
=
"1"
)
private
Integer
secretLevel
;
@ApiModelProperty
(
value
=
"列装状态"
)
private
Integer
status
;
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/vo/SelfCheckSaveVo.java
浏览文件 @
89c17c70
...
...
@@ -20,7 +20,6 @@ import java.util.List;
@Repository
public
class
SelfCheckSaveVo
{
@NotNull
(
message
=
"taskId不能为空"
)
@Min
(
value
=
1
,
message
=
"taskId不能小于1"
)
@ApiModelProperty
(
name
=
"任务id"
,
example
=
"1"
)
private
Integer
taskId
;
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/controller/StatisticalController.java
浏览文件 @
89c17c70
...
...
@@ -88,9 +88,8 @@ public class StatisticalController {
*/
@ApiOperation
(
value
=
"查询各市核查情况数量"
)
@GetMapping
(
"/confirmInspection/{type}"
)
public
ResponseEntity
selectVerification
(
@PathVariable
Integer
type
){
List
<
Verification
>
nums
=
new
ArrayList
<>();
return
ResponseEntity
.
ok
(
nums
);
public
ResponseEntity
selectVerification
(
@PathVariable
Integer
type
)
throws
ParseException
{
return
ResponseEntity
.
ok
(
statisticalService
.
getConfirmCheck
(
type
));
}
/**
...
...
@@ -119,9 +118,9 @@ public class StatisticalController {
* @return 各市告警统计对象集合
*/
@ApiOperation
(
value
=
"查询各市告警情况"
)
@GetMapping
(
"/alarmSituation/detail"
)
public
ResponseEntity
selectAlarmSituationDetail
(){
return
ResponseEntity
.
ok
(
statisticalService
.
getRfidWarningDetail
());
@GetMapping
(
"/alarmSituation/detail
/{type}
"
)
public
ResponseEntity
selectAlarmSituationDetail
(
@PathVariable
(
"type"
)
int
type
){
return
ResponseEntity
.
ok
(
statisticalService
.
getRfidWarningDetail
(
type
));
}
/**
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/service/StatisticalService.java
浏览文件 @
89c17c70
...
...
@@ -43,15 +43,22 @@ public interface StatisticalService {
List
<
BusinessSituation
>
getBusinessNum
(
Integer
type
)
throws
ParseException
;
/**
* 获取本季度各市告警统计信息
* @param type 类型(1:本季度,2:本年)
* 获取各市告警统计信息
*/
List
<
AlarmSituation
>
getRfidWarningDetail
();
List
<
AlarmSituation
>
getRfidWarningDetail
(
Integer
type
);
/**
* 获取各市最近一次自查和核查装备数量
*/
List
<
Check
>
getCheckNum
();
/**
* @param type 类型(1:上半年,2:下半年)
* 获取核查统计信息
*/
List
<
Verification
>
getConfirmCheck
(
Integer
type
)
throws
ParseException
;
/**
* 获取专管员概要信息统计
*/
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/service/impl/StatisticalServiceImpl.java
浏览文件 @
89c17c70
...
...
@@ -2,7 +2,10 @@ package com.tykj.dev.statistical.service.impl;
import
com.tykj.dev.device.confirmcheck.entity.cache.AreaCache
;
import
com.tykj.dev.device.confirmcheck.entity.domain.DeviceCheckDetail
;
import
com.tykj.dev.device.confirmcheck.entity.domain.DeviceCheckStat
;
import
com.tykj.dev.device.confirmcheck.entity.vo.CheckDeviceStatVo
;
import
com.tykj.dev.device.confirmcheck.repository.DeviceCheckDetailDao
;
import
com.tykj.dev.device.confirmcheck.repository.DeviceCheckStatDao
;
import
com.tykj.dev.device.finalcheck.entity.domain.FinalReport
;
import
com.tykj.dev.device.finalcheck.repisotry.FinalReportDao
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
...
...
@@ -23,6 +26,8 @@ import com.tykj.dev.device.user.subject.entity.Area;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.rfid.entity.domin.LibraryWarningLog
;
import
com.tykj.dev.rfid.repository.LibraryWarningLogDao
;
import
com.tykj.dev.statistical.service.StatisticalService
;
...
...
@@ -72,6 +77,9 @@ public class StatisticalServiceImpl implements StatisticalService {
@Autowired
private
DeviceCheckDetailDao
deviceCheckDetailDao
;
@Autowired
private
DeviceCheckStatDao
deviceCheckStatDao
;
/**
* 获取装备统计信息
*/
...
...
@@ -319,10 +327,11 @@ public class StatisticalServiceImpl implements StatisticalService {
}
/**
* 获取本季度各市告警统计信息
* @param type 类型(1:本季度,2:本年)
* 获取各市告警统计信息
*/
@Override
public
List
<
AlarmSituation
>
getRfidWarningDetail
()
{
public
List
<
AlarmSituation
>
getRfidWarningDetail
(
Integer
type
)
{
List
<
AlarmSituation
>
alarmSituations
=
new
ArrayList
<>();
List
<
Area
>
areas
=
areaDao
.
findAreasByType
(
2
);
//每个市进行统计
...
...
@@ -343,9 +352,21 @@ public class StatisticalServiceImpl implements StatisticalService {
//获取当前季度
Integer
quarter
=
getQuarter
(
new
Date
());
//获取当前季度该区域所有告警记录
List
<
LibraryWarningLog
>
libraryWarningLogs
=
libraryWarningLogDao
.
findAll
().
stream
()
.
filter
(
libraryWarningLog
->
getQuarter
(
libraryWarningLog
.
getCreateTime
()).
equals
(
quarter
)&&
unitNames
.
contains
(
libraryWarningLog
.
getUnit
()))
.
collect
(
Collectors
.
toList
());
List
<
LibraryWarningLog
>
libraryWarningLogs
;
if
(
type
==
1
)
{
libraryWarningLogs
=
libraryWarningLogDao
.
findAll
().
stream
()
.
filter
(
libraryWarningLog
->
getQuarter
(
libraryWarningLog
.
getCreateTime
()).
equals
(
quarter
)
&&
unitNames
.
contains
(
libraryWarningLog
.
getUnit
()))
.
collect
(
Collectors
.
toList
());
}
else
if
(
type
==
2
){
int
year
=
new
Date
().
getYear
();
libraryWarningLogs
=
libraryWarningLogDao
.
findAll
().
stream
()
.
filter
(
libraryWarningLog
->
libraryWarningLog
.
getCreateTime
().
getYear
()==
year
&&
unitNames
.
contains
(
libraryWarningLog
.
getUnit
()))
.
collect
(
Collectors
.
toList
());
}
else
{
throw
new
ApiException
(
"type只能为1,2"
);
}
alarmSituation
.
setAlarmCount
(
libraryWarningLogs
.
size
());
//获取盘库异常数量
int
inventoryNum
=
(
int
)
libraryWarningLogs
.
stream
().
filter
(
libraryWarningLog
->
libraryWarningLog
.
getWarningType
()==
2
).
count
();
...
...
@@ -400,7 +421,7 @@ public class StatisticalServiceImpl implements StatisticalService {
List
<
Units
>
units
=
unitsDao
.
findAllByAreaId
(
a
.
getId
());
if
(
units
.
size
()==
1
)
{
//获取市单位名称
String
unitName
=
units
Dao
.
findAllByAreaId
(
a
.
getId
())
.
get
(
0
).
getName
();
String
unitName
=
units
.
get
(
0
).
getName
();
//筛选出当前单位已完成的自查和核查账单,按更新时间排序
List
<
SelfCheckBill
>
selfCheckBillList
=
selfCheckBills
.
stream
()
.
filter
(
selfCheckBill
->
selfCheckBill
.
getCheckUnit
().
equals
(
unitName
)
&&
selfCheckBill
.
getCheckedCount
()
!=
null
)
...
...
@@ -422,6 +443,59 @@ public class StatisticalServiceImpl implements StatisticalService {
return
checks
;
}
/**
* @param type 类型(1:上半年,2:下半年)
* 获取核查统计信息
*/
@Override
public
List
<
Verification
>
getConfirmCheck
(
Integer
type
)
throws
ParseException
{
List
<
Verification
>
verifications
=
new
ArrayList
<>();
//获取所有市
List
<
Area
>
areas
=
areaDao
.
findAreasByType
(
2
);
//获取所有核查详情单
List
<
DeviceCheckDetail
>
deviceCheckDetails
=
deviceCheckDetailDao
.
findAll
();
List
<
Date
>
dates
;
if
(
type
==
1
)
{
dates
=
getFirstHalfYear
();
}
else
if
(
type
==
2
)
{
dates
=
getLastHalfYear
();
}
else
{
throw
new
ApiException
(
"type只能为1,2"
);
}
//获取各市上半年自动核查
for
(
Area
a:
areas
)
{
Verification
verification
=
new
Verification
();
int
completeNum
=
0
;
int
unCompleteNum
=
0
;
verification
.
setAreaName
(
a
.
getName
());
//获取所有区县区域id
List
<
Integer
>
sonAreas
=
areaDao
.
findAllByFatherId
(
a
.
getId
()).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
//获取所有区县单位名称
List
<
String
>
unitNames
=
unitsCache
.
findAll
().
stream
().
filter
(
units
->
sonAreas
.
contains
(
units
.
getAreaId
())).
map
(
Units:
:
getName
).
collect
(
Collectors
.
toList
());
for
(
String
unitName:
unitNames
){
//筛选出上半年的自动核查按时间排序
List
<
DeviceCheckDetail
>
deviceCheckDetailList
=
deviceCheckDetails
.
stream
()
.
filter
(
deviceCheckDetail
->
deviceCheckDetail
.
getTitle
().
contains
(
"自动"
)&&
deviceCheckDetail
.
getTitle
().
contains
(
unitName
)
&&
Date
.
from
(
deviceCheckDetail
.
getCreateTime
().
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()).
after
(
dates
.
get
(
0
))&&
Date
.
from
(
deviceCheckDetail
.
getCreateTime
().
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()).
before
(
dates
.
get
(
1
)))
.
sorted
(
Comparator
.
comparing
(
DeviceCheckDetail:
:
getCreateTime
).
reversed
())
.
collect
(
Collectors
.
toList
());
if
(
deviceCheckDetailList
.
size
()>
0
){
if
(
deviceCheckDetailList
.
get
(
0
).
getCheckStatus
()==
2
){
completeNum
++;
}
else
{
unCompleteNum
++;
}
}
}
verification
.
setCompleteCount
(
completeNum
);
verification
.
setNoCompleteCount
(
unCompleteNum
);
verifications
.
add
(
verification
);
}
return
verifications
;
}
/**
* @param devLifeSector 装备生命状态添统计
* @param deviceLibraries 统计装备
...
...
@@ -624,4 +698,5 @@ public class StatisticalServiceImpl implements StatisticalService {
return
4
;
}
}
}
dev-statistical/src/main/java/com/tykj/dev/statistical/vo/Verification.java
浏览文件 @
89c17c70
package
com
.
tykj
.
dev
.
statistical
.
vo
;
import
lombok.Data
;
/**
* @author zjm
* @version 1.0.0
...
...
@@ -7,6 +9,7 @@ package com.tykj.dev.statistical.vo;
* @Description 核查各市完成情况
* @createTime 2020年10月16日 10:30:00
*/
@Data
public
class
Verification
{
/**
* 市 名称
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
89c17c70
...
...
@@ -395,7 +395,9 @@ public class TaskServiceImpl implements TaskService {
users
.
stream
().
filter
(
user
->
user
.
getUnitsId
().
equals
(
taskUserVo
.
getOwnUnit
())).
forEach
(
user
->
{
stringBuffer
.
append
(
user
.
getName
()).
append
(
","
);
});
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()-
1
);
if
(
stringBuffer
.
length
()>
0
)
{
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()
-
1
);
}
taskUserVo
.
setProcessingUser
(
stringBuffer
.
toString
());
}
else
{
...
...
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
浏览文件 @
89c17c70
...
...
@@ -328,7 +328,7 @@ public class LogAspect {
}
break
;
case
7
:
DeviceCheckStatDao
deviceCheckStatDao
=
SpringUtils
.
getBean
(
"deviceCheckStat
Rep
o"
);
DeviceCheckStatDao
deviceCheckStatDao
=
SpringUtils
.
getBean
(
"deviceCheckStat
Da
o"
);
if
(
deviceCheckStatDao
!=
null
)
{
getFieldsParam
(
deviceCheckStatDao
.
getOne
(
outPutTask
.
getBillId
()));
}
...
...
dev-union/src/main/resources/application.properties
浏览文件 @
89c17c70
...
...
@@ -4,7 +4,7 @@ spring.profiles.active=@activatedProperties@
logging.file
=
/opt/eqlog/equip.log
spring.servlet.multipart.max-file-size
=
400MB
spring.servlet.multipart.max-request-size
=
400MB
spring.jpa.hibernate.ddl-auto
=
non
e
spring.jpa.hibernate.ddl-auto
=
updat
e
spring.jpa.show-sql
=
false
spring.jpa.open-in-view
=
true
spring.main.allow-bean-definition-overriding
=
true
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
89c17c70
...
...
@@ -184,11 +184,11 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
}
//筛选列装
List
<
PackingLibrary
>
packingLibraryEntities
=
packingLibraryDao
.
findAll
().
stream
()
.
filter
(
packingLibraryEntity
->
packingLibraryEntity
.
getPackingStatus
()
==
2
&&
packingLibraryEntity
.
getCreateTime
().
after
(
date
)
&&
packingLibraryEntity
.
getCreateTime
().
before
(
date2
)
&&
packingLibraryEntity
.
getIsPart
()
==
0
)
.
filter
(
packingLibraryEntity
->
packingLibraryEntity
.
getPackingStatus
()
!=
null
&&
packingLibraryEntity
.
getPackingStatus
()
==
2
&&
packingLibraryEntity
.
getCreateTime
().
after
(
date
)
&&
packingLibraryEntity
.
getCreateTime
().
before
(
date2
)
)
.
collect
(
toList
());
//筛选退装
List
<
PackingLibrary
>
packingLibraryEntities2
=
packingLibraryDao
.
findAll
().
stream
()
.
filter
(
packingLibraryEntity
->
packingLibraryEntity
.
getPackingStatus
()
==
3
&&
packingLibraryEntity
.
getExitTime
().
after
(
date
)
&&
packingLibraryEntity
.
getExitTime
().
before
(
date2
)
&&
packingLibraryEntity
.
getIsPart
()
==
0
)
.
filter
(
packingLibraryEntity
->
packingLibraryEntity
.
getPackingStatus
()
!=
null
&&
packingLibraryEntity
.
getPackingStatus
()
==
3
&&
packingLibraryEntity
.
getExitTime
().
after
(
date
)
&&
packingLibraryEntity
.
getExitTime
().
before
(
date2
)
)
.
collect
(
toList
());
//添加列装数量
if
(
packingLibraryEntities
.
size
()
>
0
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论