Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
6ae038f7
提交
6ae038f7
authored
9月 14, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新报废单
上级
d8339067
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
382 行增加
和
1 行删除
+382
-1
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+0
-0
RepairBillDao.java
.../com/tykj/dev/device/repair/repository/RepairBillDao.java
+1
-0
RepairDetailService.java
...m/tykj/dev/device/repair/service/RepairDetailService.java
+6
-0
RepairDetailServiceImpl.java
...v/device/repair/service/impl/RepairDetailServiceImpl.java
+15
-0
RepairDetail.java
...om/tykj/dev/device/repair/subject/domin/RepairDetail.java
+5
-0
ChangeNewDeviceVo.java
.../tykj/dev/device/repair/subject/vo/ChangeNewDeviceVo.java
+22
-0
DeviceScrapController.java
...ice/device-scrap/src/main/java/DeviceScrapController.java
+86
-0
DeviceVo.java
dev-device/device-scrap/src/main/java/DeviceVo.java
+53
-0
ScrapConditions.java
dev-device/device-scrap/src/main/java/ScrapConditions.java
+34
-0
ScrapListVo.java
dev-device/device-scrap/src/main/java/ScrapListVo.java
+78
-0
ScrapPage.java
dev-device/device-scrap/src/main/java/ScrapPage.java
+32
-0
GlobalMap.java
...va/com/tykj/dev/device/task/subject/common/GlobalMap.java
+9
-1
RepairStatusEnum.java
...tykj/dev/device/task/subject/common/RepairStatusEnum.java
+41
-0
没有找到文件。
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
6ae038f7
差异被折叠。
点击展开。
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/repository/RepairBillDao.java
浏览文件 @
6ae038f7
...
@@ -8,4 +8,5 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
...
@@ -8,4 +8,5 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
* @author dengdiyi
* @author dengdiyi
*/
*/
public
interface
RepairBillDao
extends
JpaRepository
<
RepairBill
,
Integer
>,
JpaSpecificationExecutor
<
RepairBill
>
{
public
interface
RepairBillDao
extends
JpaRepository
<
RepairBill
,
Integer
>,
JpaSpecificationExecutor
<
RepairBill
>
{
}
}
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/service/RepairDetailService.java
浏览文件 @
6ae038f7
...
@@ -30,4 +30,10 @@ public interface RepairDetailService extends RepairPublicService<RepairDetail> {
...
@@ -30,4 +30,10 @@ public interface RepairDetailService extends RepairPublicService<RepairDetail> {
*/
*/
RepairDetail
updateIdAndStatus
(
Integer
id
,
Integer
status
);
RepairDetail
updateIdAndStatus
(
Integer
id
,
Integer
status
);
/**
* @param id 主键id
* 根据主键Id查询
*/
RepairDetail
getOne
(
Integer
id
);
}
}
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/service/impl/RepairDetailServiceImpl.java
浏览文件 @
6ae038f7
...
@@ -61,4 +61,19 @@ public class RepairDetailServiceImpl implements RepairDetailService {
...
@@ -61,4 +61,19 @@ public class RepairDetailServiceImpl implements RepairDetailService {
throw
new
ApiException
(
ResultUtil
.
failed
(
"所查询ID不存在"
));
throw
new
ApiException
(
ResultUtil
.
failed
(
"所查询ID不存在"
));
}
}
}
}
/**
* @param id 主键id
* 根据主键Id查询
*/
@Override
public
RepairDetail
getOne
(
Integer
id
)
{
Optional
<
RepairDetail
>
repairDetail
=
deviceRepairDetailDao
.
findById
(
id
);
if
(
repairDetail
.
isPresent
()){
return
repairDetail
.
get
();
}
else
{
throw
new
ApiException
(
ResultUtil
.
failed
(
"所查询ID不存在"
));
}
}
}
}
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/subject/domin/RepairDetail.java
浏览文件 @
6ae038f7
...
@@ -92,6 +92,11 @@ public class RepairDetail {
...
@@ -92,6 +92,11 @@ public class RepairDetail {
*/
*/
@ApiModelProperty
(
value
=
"维修备注"
)
@ApiModelProperty
(
value
=
"维修备注"
)
private
String
remark
;
private
String
remark
;
/**
* 已报废换新装备详情主键Id(null代表没有报废,0代表已报废还没有换新)
*/
@ApiModelProperty
(
value
=
"已报废换新装备详情主键Id(null代表没有报废,0代表已报废还没有换新)"
)
private
Integer
newDeviceDetailId
;
/**
/**
* 创建用户id
* 创建用户id
*/
*/
...
...
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/subject/vo/ChangeNewDeviceVo.java
0 → 100644
浏览文件 @
6ae038f7
package
com
.
tykj
.
dev
.
device
.
repair
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"维修装备换新类"
)
public
class
ChangeNewDeviceVo
{
@ApiModelProperty
(
name
=
"业务id"
,
value
=
"1"
)
private
Integer
taskId
;
@ApiModelProperty
(
name
=
"维修详情单主键Id"
,
value
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
name
=
"装备主键id"
,
value
=
"1"
)
private
Integer
deviceId
;
}
dev-device/device-scrap/src/main/java/DeviceScrapController.java
0 → 100644
浏览文件 @
6ae038f7
import
com.tykj.dev.misc.config.AutoDocument
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.*
;
/**
* @author zjm
*/
@RestController
@RequestMapping
(
value
=
"/scrap"
)
@AutoDocument
@Api
(
tags
=
"报废模块"
,
description
=
"报废模块"
)
public
class
DeviceScrapController
{
@ApiOperation
(
value
=
"查询列表"
,
notes
=
"可以通过这个接口查询销毁单"
)
@PostMapping
(
value
=
"/summary"
)
public
ResponseEntity
<
com
.
tykj
.
dev
.
device
.
scrap
.
ScrapPage
>
selectRepairBill
(
@RequestBody
ScrapConditions
scrapConditions
){
List
<
ScrapListVo
>
listVos
=
new
ArrayList
<>();
Long
time
=
1598163550704L
;
listVos
.
add
(
new
ScrapListVo
(
1
,
"No2.2019号WX12"
,
"张馋"
,
"李思念"
,
"伸莎"
,
"MB-001,MC-001"
,
"密码机"
,
new
Date
(
time
),
"国家密码局"
,
"192.168.102.211:8087/status/1.jpeg"
,
"陈龚"
,
null
));
listVos
.
add
(
new
ScrapListVo
(
2
,
"No2.2019号WX13"
,
"李生成"
,
"许仁"
,
"詹彻"
,
"MA-001,MP-001"
,
"密码机"
,
new
Date
(
time
),
"国家密码局"
,
"192.168.102.211:8087/status/1.jpeg"
,
"陈龚"
,
null
));
listVos
.
add
(
new
ScrapListVo
(
3
,
"No2.2019号WX14"
,
"鲍若人"
,
"李奕"
,
"陈行"
,
"MC-001,M1-001"
,
"密码机"
,
new
Date
(
time
),
"国家密码局"
,
"192.168.102.211:8087/status/1.jpeg"
,
"陈龚"
,
null
));
listVos
.
add
(
new
ScrapListVo
(
4
,
"No2.2019号WX15"
,
"李力"
,
"石彻"
,
"陈镇"
,
"MK-001,MC-001"
,
"密码机"
,
new
Date
(
time
),
"国家密码局"
,
"192.168.102.211:8087/status/1.jpeg"
,
"陈龚"
,
null
));
if
(
scrapConditions
.
getDimName
()!=
null
)
{
for
(
int
i
=
0
;
i
<
listVos
.
size
();
i
++)
{
if
(((
ScrapListVo
)
(
listVos
.
get
(
i
))).
getName
().
indexOf
(
scrapConditions
.
getDimName
())
<=
-
1
)
listVos
.
remove
(
i
);
}
}
if
(
scrapConditions
.
getEndTime
()!=
null
&&
scrapConditions
.
getStatusTime
()!=
null
)
{
listVos
.
forEach
(
scrapListVo
->
{
if
(
scrapConditions
.
getStatusTime
().
getTime
()
<
time
&&
scrapConditions
.
getEndTime
().
getTime
()
>
time
)
{
}
else
{
listVos
.
remove
(
scrapListVo
);
}
}
);
}
return
ResponseEntity
.
ok
(
com
.
tykj
.
dev
.
device
.
scrap
.
ScrapPage
.
builder
().
data
(
listVos
)
.
page
(
scrapConditions
.
getPage
()).
size
(
scrapConditions
.
getSize
()).
total
(
listVos
.
size
()).
build
());
}
@ApiOperation
(
value
=
"查询列表"
,
notes
=
"可以通过这个接口查询销毁单"
)
@PostMapping
(
value
=
"/summary/{scrapId}"
)
public
ResponseEntity
<
ScrapListVo
>
selectRepairBill1
(
@PathVariable
Integer
scrapId
){
Map
<
Integer
,
ScrapListVo
>
map
=
new
HashMap
<>();
map
.
put
(
1
,
new
ScrapListVo
(
1
,
"No2.2019号WX12"
,
"张馋"
,
"李思念"
,
"伸莎"
,
"MB-001,MC-001"
,
"密码机"
,
new
Date
(),
"国家密码局"
,
"192.168.102.211:8087/status/1.jpeg"
,
"陈龚"
,
null
));
map
.
put
(
2
,
new
ScrapListVo
(
2
,
"No2.2019号WX13"
,
"李生成"
,
"许仁"
,
"詹彻"
,
"MA-001,MP-001"
,
"密码机"
,
new
Date
(),
"国家密码局"
,
"192.168.102.211:8087/status/1.jpeg"
,
"陈龚"
,
null
));
map
.
put
(
3
,
new
ScrapListVo
(
3
,
"No2.2019号WX14"
,
"鲍若人"
,
"李奕"
,
"陈行"
,
"MC-001,M1-001"
,
"密码机"
,
new
Date
(),
"国家密码局"
,
"192.168.102.211:8087/status/1.jpeg"
,
"陈龚"
,
null
));
map
.
put
(
4
,
new
ScrapListVo
(
4
,
"No2.2019号WX15"
,
"李力"
,
"石彻"
,
"陈镇"
,
"MK-001,MC-001"
,
"密码机"
,
new
Date
(),
"国家密码局"
,
"192.168.102.211:8087/status/1.jpeg"
,
"陈龚"
,
null
));
List
<
DeviceVo
>
listVos
=
new
ArrayList
<>();
Random
rand
=
new
Random
();
// nextInt is normally exclusive of the top value,
// so add 1 to make it inclusive
int
randomNum
=
rand
.
nextInt
((
1000
-
1
)
+
1
)
+
1
;
for
(
int
i
=
0
;
i
<
3
;
i
++){
DeviceVo
deviceVo
=
DeviceVo
.
toDo
();
deviceVo
.
setModel
(
"M"
+
randomNum
);
listVos
.
add
(
deviceVo
);
}
ScrapListVo
scrapListVo
=
map
.
get
(
scrapId
);
scrapListVo
.
setList
(
listVos
);
return
ResponseEntity
.
ok
(
scrapListVo
);
}
}
dev-device/device-scrap/src/main/java/DeviceVo.java
0 → 100644
浏览文件 @
6ae038f7
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceVo.java
* @Description TODO
* @createTime 2020年08月19日 16:39:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"报废装备对象"
,
description
=
"报废装备对象"
)
public
class
DeviceVo
{
@ApiModelProperty
(
value
=
"型号"
,
example
=
"bmxx"
)
public
String
model
;
@ApiModelProperty
(
value
=
"类别"
,
example
=
"1"
)
public
Integer
type
;
@ApiModelProperty
(
value
=
"部件"
,
example
=
"1"
)
public
Integer
parts
;
@ApiModelProperty
(
value
=
"密级"
,
example
=
"1"
)
public
String
secretLevel
;
@ApiModelProperty
(
value
=
"可见范围(应用领域)"
,
example
=
"1"
)
public
Integer
invisibleRange
;
@ApiModelProperty
(
value
=
"备注"
,
example
=
"msg"
)
public
String
msg
;
/**
* 装备序列号
*/
@ApiModelProperty
(
value
=
"装备序列号"
)
private
String
seqNumber
;
/**
* 生产序列号
*/
@ApiModelProperty
(
value
=
"生产序列号"
)
private
String
prodNumber
;
public
static
DeviceVo
toDo
(){
return
new
DeviceVo
(
"MB-01"
,
1
,
1
,
"机密"
,
1
,
"---"
,
"MB0125576p101"
,
"MB012374123"
);
}
}
dev-device/device-scrap/src/main/java/ScrapConditions.java
0 → 100644
浏览文件 @
6ae038f7
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* @author zjm
* @version 1.0.0
* @ClassName Conditions.java
* @Description TODO
* @createTime 2020年08月23日 13:56:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"报废装备查询条件"
,
description
=
"报废装备查询条件"
)
public
class
ScrapConditions
{
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
value
=
"开始时间"
,
example
=
"bmxx"
,
name
=
"statusTime"
)
private
Date
statusTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
value
=
"结束时间"
,
example
=
"bmxx"
,
name
=
"endTime"
)
private
Date
endTime
;
@ApiModelProperty
(
value
=
"模糊搜索"
,
example
=
"bmxx"
,
name
=
"dimName"
)
private
String
dimName
;
@ApiModelProperty
(
value
=
"页数"
,
example
=
"bmxx"
,
name
=
"page"
)
private
Integer
page
;
@ApiModelProperty
(
value
=
"条数"
,
example
=
"bmxx"
,
name
=
"size"
)
private
Integer
size
;
}
dev-device/device-scrap/src/main/java/ScrapListVo.java
0 → 100644
浏览文件 @
6ae038f7
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName entity.java
* @Description TODO
* @createTime 2020年08月19日 16:07:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"专管员对象"
,
description
=
"专管员记录"
)
public
class
ScrapListVo
{
/**
* 主键id
*/
@ApiModelProperty
(
name
=
"主键id"
)
private
Integer
id
;
/**
* 文号
*/
@ApiModelProperty
(
value
=
"文号"
)
private
String
docNumber
;
/**
* 监销人
*/
@ApiModelProperty
(
value
=
"监销人"
)
private
String
supervisor
;
/**
* 主管领导
*/
@ApiModelProperty
(
value
=
"主管领导"
)
private
String
leader
;
/**
* 承办人
*/
@ApiModelProperty
(
value
=
"承办人"
)
private
String
undertaker
;
/**
* 型号
*/
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
/**
* 名称
*/
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
/**
* 报废时间
*/
@ApiModelProperty
(
value
=
"报废时间"
)
private
Date
scrap
;
/**
* 报废单位
*/
private
String
unitsName
;
private
String
url
;
private
String
v1
;
private
List
<
DeviceVo
>
list
;
}
dev-device/device-scrap/src/main/java/ScrapPage.java
0 → 100644
浏览文件 @
6ae038f7
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author LJJ cnljj1995@gmail.com
* on 2020-04-26
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"报废单分页"
,
description
=
"报废单分页"
)
@Builder
public
class
ScrapPage
{
@ApiModelProperty
(
value
=
"总数"
,
example
=
"10"
)
private
Integer
total
;
@ApiModelProperty
(
value
=
"页数,0开始"
,
example
=
"0"
)
private
Integer
page
;
@ApiModelProperty
(
value
=
"大小"
,
example
=
"10"
)
private
Integer
size
;
@ApiModelProperty
(
value
=
"数据内容"
,
example
=
"略"
)
private
List
<
ScrapListVo
>
data
;
}
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/common/GlobalMap.java
浏览文件 @
6ae038f7
...
@@ -10,14 +10,22 @@ import java.util.stream.Collectors;
...
@@ -10,14 +10,22 @@ import java.util.stream.Collectors;
*/
*/
public
class
GlobalMap
{
public
class
GlobalMap
{
private
static
Map
<
Integer
,
StatusEnum
>
statusEnumMap
;
private
static
final
Map
<
Integer
,
StatusEnum
>
statusEnumMap
;
private
static
final
Map
<
Integer
,
RepairStatusEnum
>
repairStatusMap
;
static
{
static
{
statusEnumMap
=
Arrays
.
stream
(
StatusEnum
.
values
())
statusEnumMap
=
Arrays
.
stream
(
StatusEnum
.
values
())
.
collect
(
Collectors
.
toMap
(
statusEnum
->
statusEnum
.
id
,
Function
.
identity
()));
.
collect
(
Collectors
.
toMap
(
statusEnum
->
statusEnum
.
id
,
Function
.
identity
()));
repairStatusMap
=
Arrays
.
stream
(
RepairStatusEnum
.
values
())
.
collect
(
Collectors
.
toMap
(
repairStatusEnum
->
repairStatusEnum
.
id
,
Function
.
identity
()));
}
}
public
static
Map
<
Integer
,
StatusEnum
>
getStatusEnumMap
()
{
public
static
Map
<
Integer
,
StatusEnum
>
getStatusEnumMap
()
{
return
statusEnumMap
;
return
statusEnumMap
;
}
}
public
static
Map
<
Integer
,
RepairStatusEnum
>
getRepairStatusMap
()
{
return
repairStatusMap
;
}
}
}
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/common/RepairStatusEnum.java
0 → 100644
浏览文件 @
6ae038f7
package
com
.
tykj
.
dev
.
device
.
task
.
subject
.
common
;
import
lombok.AllArgsConstructor
;
/**
* @author dengdiyi
* 维修状态枚举
*/
@AllArgsConstructor
public
enum
RepairStatusEnum
{
/**
* 等待维修
*/
WAIT_REPAIR
(
0
,
"等待维修"
),
/**
* 维修中
*/
REPAIRING
(
1
,
"维修中"
),
/**
* 待领取
*/
WAIT_RECEIVE
(
2
,
"待领取"
),
/**
* 换新
*/
CHANGE_NEW
(
3
,
"换新"
),
/**
* 已报废
*/
SCRAPPED
(
4
,
"已报废"
),
/**
* 已领取
*/
RECEIVED
(
5
,
"已领取"
)
;
public
Integer
id
;
public
String
name
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论