Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
2f7a9b39
提交
2f7a9b39
authored
3月 31, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[清退 报废 销毁 misc] 等代码进行提交 0331
上级
43350ddc
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
57 个修改的文件
包含
1580 行增加
和
532 行删除
+1580
-532
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+6
-3
DeviceLifeStatus.java
.../main/java/com/tykj/dev/config/base/DeviceLifeStatus.java
+23
-2
pom.xml
dev-decommissioning/pom.xml
+42
-0
DecommissioningApp.java
...m/tykj/dev/device/decommissioning/DecommissioningApp.java
+18
-0
DecommissioningDevController.java
...ommissioning/controller/DecommissioningDevController.java
+50
-0
DecommissioningQueryController.java
...missioning/controller/DecommissioningQueryController.java
+79
-0
DeviceDecommissioningDetail.java
...e/decommissioning/entity/DeviceDecommissioningDetail.java
+0
-0
DecommissioningOrderOutData.java
...ecommissioning/entity/vo/DecommissioningOrderOutData.java
+194
-0
PagingVo.java
...m/tykj/dev/device/decommissioning/entity/vo/PagingVo.java
+25
-0
RepelManagementVo.java
...v/device/decommissioning/entity/vo/RepelManagementVo.java
+63
-0
StorageDeviceDevommissiong.java
...decommissioning/entity/vo/StorageDeviceDevommissiong.java
+73
-0
DeviceDecommissioningDetailDao.java
...missioning/repository/DeviceDecommissioningDetailDao.java
+8
-0
DeviceDecommissioningBusinessService.java
...sioning/service/DeviceDecommissioningBusinessService.java
+28
-0
DeviceDecommissioningDetailService.java
...issioning/service/DeviceDecommissioningDetailService.java
+38
-0
DeviceDecommissioningQueryService.java
...missioning/service/DeviceDecommissioningQueryService.java
+46
-0
DeviceDecommissioningBusinessServiceImpl.java
...ervice/impl/DeviceDecommissioningBusinessServiceImpl.java
+186
-0
DeviceDecommissioningDetailServiceImpl.java
.../service/impl/DeviceDecommissioningDetailServiceImpl.java
+87
-0
DeviceDecommissioningQueryServiceImpl.java
...g/service/impl/DeviceDecommissioningQueryServiceImpl.java
+191
-0
DeviceDestroyController.java
...ev/device/destroy/controller/DeviceDestroyController.java
+3
-1
DeviceLibraryDao.java
.../tykj/dev/device/library/repository/DeviceLibraryDao.java
+2
-0
BusinessEnum.java
...sc/src/main/java/com/tykj/dev/misc/base/BusinessEnum.java
+1
-1
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+3
-0
StringUtils.java
...sc/src/main/java/com/tykj/dev/misc/utils/StringUtils.java
+1
-1
pom.xml
dev-scrap/pom.xml
+5
-0
DeviceScrapController.java
...kj/dev/device/scrap/controller/DeviceScrapController.java
+4
-1
ScrapDao.java
...n/java/com/tykj/dev/device/scrap/repository/ScrapDao.java
+16
-0
ScrapService.java
.../java/com/tykj/dev/device/scrap/service/ScrapService.java
+32
-0
ScrapServiceImpl.java
.../tykj/dev/device/scrap/service/impl/ScrapServiceImpl.java
+44
-0
Scrap.java
...n/java/com/tykj/dev/device/scrap/subject/domin/Scrap.java
+160
-0
RepelDevController.java
...kj/dev/device/sendback/controller/RepelDevController.java
+5
-83
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+3
-102
AgainStorageBill.java
...j/dev/device/sendback/entity/domain/AgainStorageBill.java
+9
-0
DeviceRepel.java
...m/tykj/dev/device/sendback/entity/domain/DeviceRepel.java
+6
-0
RepelTaskStatistical.java
...v/device/sendback/entity/domain/RepelTaskStatistical.java
+5
-6
SendBackBill.java
.../tykj/dev/device/sendback/entity/domain/SendBackBill.java
+0
-110
ListVo.java
...n/java/com/tykj/dev/device/sendback/entity/vo/ListVo.java
+0
-26
TransitionOfLifeVo.java
...ykj/dev/device/sendback/entity/vo/TransitionOfLifeVo.java
+28
-0
SendBackBillDao.java
.../tykj/dev/device/sendback/repository/SendBackBillDao.java
+0
-15
SendBackBillDetailDao.java
...dev/device/sendback/repository/SendBackBillDetailDao.java
+0
-18
AgainStorageBillService.java
.../dev/device/sendback/service/AgainStorageBillService.java
+3
-2
RepelBusinessService.java
...ykj/dev/device/sendback/service/RepelBusinessService.java
+3
-25
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+4
-19
AgainStorageBillServiceImpl.java
...ce/sendback/service/impl/AgainStorageBillServiceImpl.java
+37
-11
DeviceRepelDetailServiceImpl.java
...e/sendback/service/impl/DeviceRepelDetailServiceImpl.java
+1
-1
DeviceRepelServiceImpl.java
.../device/sendback/service/impl/DeviceRepelServiceImpl.java
+1
-1
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+0
-0
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+0
-0
RepelTaskStatisticalServiceImpl.java
...endback/service/impl/RepelTaskStatisticalServiceImpl.java
+1
-11
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+4
-1
TaskSelectVo.java
...ava/com/tykj/dev/device/task/subject/vo/TaskSelectVo.java
+0
-1
TaskSelectController.java
...ev/device/taskselect/controller/TaskSelectController.java
+0
-18
pom.xml
dev-union/pom.xml
+11
-0
Groups.java
.../java/com/tykj/dev/device/user/subject/entity/Groups.java
+6
-0
GroupServiceImpl.java
...ev/device/user/subject/service/impl/GroupServiceImpl.java
+5
-2
UnitsServiceImpl.java
...ev/device/user/subject/service/impl/UnitsServiceImpl.java
+4
-58
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+10
-13
pom.xml
pom.xml
+6
-0
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
2f7a9b39
...
...
@@ -183,8 +183,11 @@ public enum LogType {
SEND_BACK_14
(
10004
,
SEND_BACK
.
id
,
SEND_BACK_1209
.
id
,
END
.
id
,
"单位接收完成"
),
SEND_BACK_15
(
10005
,
SEND_BACK
.
id
,
SEND_BACK_1207
.
id
,
SEND_BACK_1206
.
id
,
"上级审核不通过"
),
SEND_BACK_16
(
10006
,
SEND_BACK
.
id
,
SEND_BACK_1206
.
id
,
SEND_BACK_1208
.
id
,
"全部清退任务,不需要审核,等待清退装备出库"
),
SEND_BACK_17
(
10007
,
SEND_BACK
.
id
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1210
.
id
,
"发起对中办对清退任务,等待中办签字单据"
),
SEND_BACK_18
(
10008
,
SEND_BACK
.
id
,
SEND_BACK_1210
.
id
,
END
.
id
,
"上传中办签字单据,任务结束"
),
//退役
SEND_BACK_17
(
10007
,
DECOMMISSIONING
.
id
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1210
.
id
,
"发起退役任务,等待中办签字单据"
),
SEND_BACK_18
(
10008
,
DECOMMISSIONING
.
id
,
SEND_BACK_1210
.
id
,
END
.
id
,
"上传中办签字单据,任务结束"
),
SEND_BACK_19
(
10009
,
SEND_BACK
.
id
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1211
.
id
,
"市发起清退任务,待省级单位审核"
),
SEND_BACK_20
(
100010
,
SEND_BACK
.
id
,
SEND_BACK_1211
.
id
,
END
.
id
,
"省对单位审核不通过,任务结束"
),
SEND_BACK_21
(
100011
,
SEND_BACK
.
id
,
SEND_BACK_1211
.
id
,
SEND_BACK_1204
.
id
,
"省对单位审核通过,等待下级单位提交"
),
...
...
@@ -197,7 +200,7 @@ public enum LogType {
SEND_BACK_29
(
100019
,
SEND_BACK
.
id
,
SEND_BACK_1209
.
id
,
SEND_BACK_1215
.
id
,
"单据未上传,继续等待单据上传"
),
SEND_BACK_30
(
100020
,
SEND_BACK
.
id
,
SEND_BACK_1215
.
id
,
END
.
id
,
"接收单据已上传,清退装备配送完成"
),
//重新入库
AGAINSTORAGE_01
(
100021
,
AGAINSTORAGE
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"发起了
重新入库
"
),
AGAINSTORAGE_01
(
100021
,
AGAINSTORAGE
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"发起了
装备生命状态转换
"
),
LOSS_1
(
9000
,
LOSS
.
id
,
ORIGIN_STATUS
.
id
,
LOSS1300
.
id
,
"发起装备丢失上报"
),
...
...
dev-config/src/main/java/com/tykj/dev/config/base/DeviceLifeStatus.java
浏览文件 @
2f7a9b39
...
...
@@ -37,7 +37,7 @@ public enum DeviceLifeStatus {
/**
* 清退
*/
SEND_BACK
(
6
,
"清退"
),
SEND_BACK
(
6
,
"
待
清退"
),
// /**
// * 待退装
// */
...
...
@@ -79,7 +79,28 @@ public enum DeviceLifeStatus {
/**
* 退役中
*/
RETIRED
(
16
,
"退役中"
);
RETIRED
(
16
,
"退役中"
),
/**
* 待报废
*/
TO_BE_SCRAPPED
(
17
,
"待报废"
),
/**
* 报废中
*/
IN_THE_SCRAPPED
(
18
,
"报废中"
),
/**
* 待销毁
*/
TO_BE_DESTROYED
(
19
,
"待销毁"
),
/**
* 销毁中
*/
IN_THE_DESTROYED
(
20
,
"销毁中"
);
public
Integer
id
;
...
...
dev-decommissioning/pom.xml
0 → 100644
浏览文件 @
2f7a9b39
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
equip
</artifactId>
<groupId>
com.tykj
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
dev-decommissioning
</artifactId>
<dependencies>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-library
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-task
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-packing
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
misc
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-file
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
config
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/DecommissioningApp.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
/**
* ConfirmCheckApp.
*
* @author zjm
* @since 2020/9/14 at 1:50 下午
*/
@SpringBootApplication
(
scanBasePackages
=
{
"com.tykj.dev.*"
}
)
public
class
DecommissioningApp
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
DecommissioningApp
.
class
,
args
);
}
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/controller/DecommissioningDevController.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.decommissioning.entity.vo.DecommissioningOrderOutData
;
import
com.tykj.dev.device.decommissioning.entity.vo.StorageDeviceDevommissiong
;
import
com.tykj.dev.device.decommissioning.service.DeviceDecommissioningBusinessService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
/**
* @author zjm
* @version 1.0.0
* @ClassName RepelDevController.java
* @Description TODO
* @createTime 2021年01月10日 13:52:00
*/
@RestController
@Api
(
tags
=
"装备退役业务接口模块"
,
description
=
"包括装备退役业务相关接口"
)
@AutoDocument
@RequestMapping
(
"/decommissioning"
)
public
class
DecommissioningDevController
{
@Autowired
DeviceDecommissioningBusinessService
deviceDecommissioningBusinessService
;
/**
* 省清退中办
*/
@ApiOperation
(
value
=
"省清退中办"
,
notes
=
"省清退中办"
)
@PostMapping
(
value
=
"/provinceSendOutSuperior/{userId}"
)
public
ResponseEntity
provinceSendOutSuperior
(
@PathVariable
Integer
userId
,
@RequestBody
DecommissioningOrderOutData
orderOutData
){
// repelBusinessService.provinceSendOutSuperior(userId,orderOutData);
return
ResponseEntity
.
ok
(
deviceDecommissioningBusinessService
.
provinceSendDecommissioning
(
userId
,
orderOutData
));
}
/**
* 省上传中办回执单
*/
@ApiOperation
(
value
=
"省上传中办回执单"
,
notes
=
"省上传中办回执单"
)
@PostMapping
(
value
=
"/receiptSingle/{taskId}"
)
public
ResponseEntity
receiptSingle
(
@PathVariable
Integer
taskId
,
@RequestBody
StorageDeviceDevommissiong
storageDeviceRepel
){
deviceDecommissioningBusinessService
.
receiptSingle
(
taskId
,
storageDeviceRepel
);
return
ResponseEntity
.
ok
(
"省上传中办回执单,成功任务结束"
);
}
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/controller/DecommissioningQueryController.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.decommissioning.entity.vo.RepelManagementVo
;
import
com.tykj.dev.device.decommissioning.service.DeviceDecommissioningQueryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
/**
* @author zjm
* @version 1.0.0
* @ClassName RepelQueryController.java
* @Description TODO
* @createTime 2021年01月10日 15:43:00
*/
@RestController
@Api
(
tags
=
"装备退役查询接口模块"
,
description
=
"包括装备清退、装备异常处理、装备出库、装备入库"
)
@AutoDocument
@RequestMapping
(
"/decommissioningQuery"
)
public
class
DecommissioningQueryController
{
@Autowired
DeviceDecommissioningQueryService
deviceDecommissioningQueryService
;
/**
* 查询退役中办任务
*/
@ApiOperation
(
value
=
"查询退役中办任务"
)
@GetMapping
(
"/outsideTheProvince"
)
public
ResponseEntity
findOutsideTheProvince
()
{
return
ResponseEntity
.
ok
(
deviceDecommissioningQueryService
.
findOutsideTheProvince
());
}
/**
* 查询已办结退役任务列表
*/
@ApiOperation
(
value
=
"查询退役中办任务"
)
@GetMapping
(
"/endProvince"
)
public
ResponseEntity
findOutsideTheProvinceEnd
()
{
return
ResponseEntity
.
ok
(
deviceDecommissioningQueryService
.
findOutsideTheProvinceEnd
());
}
/**
* 待清退 待退役
*/
@PostMapping
(
value
=
"/toBeRetiredDeviceList"
)
@ApiOperation
(
value
=
"待清退"
,
notes
=
"待清退列表"
)
public
ResponseEntity
clearedList1
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
deviceDecommissioningQueryService
.
toBeRetiredDeviceList
(
repelManagementVo
));
}
/**
* 退役中
*/
@PostMapping
(
value
=
"/findRetired"
)
@ApiOperation
(
value
=
"退役中"
,
notes
=
"退役中列表"
)
public
ResponseEntity
clearedList2
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
deviceDecommissioningQueryService
.
findRetired
(
repelManagementVo
));
}
/**
* 已退役
*/
@PostMapping
(
value
=
"/retiredDeviceList"
)
@ApiOperation
(
value
=
"已退役"
,
notes
=
"已清退列表"
)
public
ResponseEntity
clearedList4
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
deviceDecommissioningQueryService
.
retiredDeviceList
(
repelManagementVo
));
}
}
dev-
sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/SendBackBill
Detail.java
→
dev-
decommissioning/src/main/java/com/tykj/dev/device/decommissioning/entity/DeviceDecommissioning
Detail.java
浏览文件 @
2f7a9b39
差异被折叠。
点击展开。
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/entity/vo/DecommissioningOrderOutData.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
entity
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.modelmapper.ModelMapper
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName OrderOutData.java
* @Description TODO
* @createTime 2021年01月10日 09:43:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
DecommissioningOrderOutData
{
/**
* 申请文号
*/
@ApiModelProperty
(
value
=
"申请文号"
)
private
String
applyNumber
;
/**
* 批复文号
*/
@ApiModelProperty
(
value
=
"批复文号"
)
private
String
replayNumber
;
/**
* 发件单位
*/
@ApiModelProperty
(
value
=
"发件单位"
)
private
String
sendUnit
;
/**
* 发件单位id
*/
@ApiModelProperty
(
value
=
"发件单位id"
)
private
Integer
sendUnitId
;
/**
* 收件单位id
*/
@ApiModelProperty
(
value
=
"收件单位id"
)
private
Integer
receiveUnitId
;
/**
* 收件单位
*/
@ApiModelProperty
(
value
=
"收件单位"
)
private
String
receiveUnit
;
/**
* 配发时间
*/
@ApiModelProperty
(
value
=
"配发时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
sendTime
=
new
Date
();
/**
* 经办人
*/
@ApiModelProperty
(
value
=
"发件方id(A岗位)"
)
private
Integer
sendUseraId
;
/**
* 经办人 名称
*/
@ApiModelProperty
(
value
=
"发件方名称(A岗位)"
)
private
String
senderUserA
;
/**
* 签发人
*/
@ApiModelProperty
(
value
=
"签发人(B岗位)"
)
private
String
senderUserB
;
/**
* 签发人
*/
@ApiModelProperty
(
value
=
"签发人(B岗位)"
)
private
String
sendUserbId
;
/**
* 收件方 经办人
*/
@ApiModelProperty
(
value
=
"收件方id(A岗位)"
)
private
Integer
receiveUseraId
;
/**
* 收件方 经办人名称
*/
@ApiModelProperty
(
value
=
"收件方名称(A岗位)"
)
private
String
receiveUserA
;
/**
* 收件方id(B岗位)
*/
@ApiModelProperty
(
value
=
"收件方名称(B岗位)"
)
private
String
receiveUserB
;
/**
* 收件方id(B岗位)
*/
@ApiModelProperty
(
value
=
"收件方id(B岗位)"
)
private
Integer
receiveUserbId
;
/**
* 出库附件文件
*/
@ApiModelProperty
(
value
=
"出库附件文件"
)
private
String
outboundFile
;
/**
* 清退单文件
*/
@ApiModelProperty
(
value
=
"清退单文件"
)
private
String
billFile
;
/**
* 退回状态(1:退回待审核,2:退回审核失败,3:退回中,4:退回接收待审核,5:退回接收审核失败,6:退回成功)
*/
@ApiModelProperty
(
value
=
"退回状态(1:退回待审核,2:退回审核失败,3:退回中,4:退回接收待审核,5:退回接收审核失败,6:退回成功)"
)
private
Integer
sendBackStatus
;
/**
* 退回装备数量
*/
@ApiModelProperty
(
value
=
"退回装备数量"
)
private
Integer
sendBackCount
;
/**
* 已出库装备数量
*/
@ApiModelProperty
(
value
=
"已出库装备数量"
)
private
Integer
sendedCount
;
/**
* 已接收装备数量
*/
@ApiModelProperty
(
value
=
"已接收装备数量"
)
private
Integer
receiveCount
;
/**
* 出库检查详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配
*/
@ApiModelProperty
(
value
=
"出库检查详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配"
)
private
String
sendCheckDetail
;
/**
* 出库检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条
*/
@ApiModelProperty
(
value
=
"出库检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条"
)
private
String
sendCheckResult
;
/**
* 装备id集合
*/
@ApiModelProperty
(
value
=
"涉及装备的id集合"
)
private
List
<
Integer
>
devIds
;
/**
* 出库附件文件
*/
@ApiModelProperty
(
value
=
"出库附件文件"
)
private
List
<
FileRet
>
outboundFileList
;
/**
* 清退单文件
*/
@ApiModelProperty
(
value
=
"清退单文件"
)
private
List
<
FileRet
>
billFileList
;
@ApiModelProperty
(
value
=
"发件单位签章id"
)
private
String
leftSignatureId
;
@ApiModelProperty
(
value
=
"批复文号文件集合"
)
private
List
<
FileRet
>
replyFileList
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"申请文号文件集合"
)
private
List
<
FileRet
>
applyFileList
=
new
ArrayList
<>();
private
List
<
FileRet
>
sendFileList
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"单据装备数据信息"
)
private
List
<
ScriptSaveVo
>
scriptSaveVos
=
new
ArrayList
<>();
public
DeviceDecommissioningDetail
toDeviceDecommissioningDetail
()
{
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
return
mapper
.
map
(
this
,
DeviceDecommissioningDetail
.
class
);
}
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/entity/vo/PagingVo.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
entity
.
vo
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
PagingVo
{
private
Integer
total
;
private
Integer
page
;
private
Integer
size
;
private
List
<
DeviceLibrary
>
data
;
}
\ No newline at end of file
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/entity/vo/RepelManagementVo.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
entity
.
vo
;
import
com.tykj.dev.misc.base.CustomPage
;
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 RepelManagementVo.java
* @Description 清退管理 清退清退vo
* @createTime 2021年01月23日 12:42:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"清退管理 清退清退vo"
)
public
class
RepelManagementVo
extends
CustomPage
{
@ApiModelProperty
(
name
=
"开始清退的年份 默认各式 2020-01-01 00:00:00"
)
private
Long
time
;
@ApiModelProperty
(
name
=
"开始清退的年份 默认各式 2020-01-01 00:00:00"
)
private
Long
endTime
;
@ApiModelProperty
(
name
=
"单位id"
)
private
Integer
unitId
;
@ApiModelProperty
(
name
=
"单位名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"型号"
,
example
=
"bmxx"
)
public
String
model
;
@ApiModelProperty
(
value
=
"类型"
,
example
=
"1"
)
public
Integer
type
;
@ApiModelProperty
(
value
=
"密级"
,
example
=
"1"
)
public
Integer
secretLevel
;
@ApiModelProperty
(
value
=
"可见范围(应用领域)"
,
example
=
"1"
)
public
Integer
invisibleRange
;
@ApiModelProperty
(
value
=
"名称"
,
example
=
"BM-1"
)
public
String
name
;
@ApiModelProperty
(
value
=
"配用范围"
,
example
=
"1"
)
public
Integer
matchingRange
;
@ApiModelProperty
(
value
=
"入库类型"
,
example
=
"1"
)
public
Integer
storageType
;
@ApiModelProperty
(
value
=
"管理状态"
,
example
=
"1"
)
public
Integer
manageStatus
;
@ApiModelProperty
(
value
=
"模糊查询内容"
,
example
=
"测试"
)
public
String
content
;
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/entity/vo/StorageDeviceDevommissiong.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
entity
.
vo
;
import
com.tykj.dev.device.file.entity.FileRet
;
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 StorageDeviceRepel.java
* @Description 入库参数对象
* @createTime 2021年01月10日 13:01:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"退役入库参数提交对象"
)
public
class
StorageDeviceDevommissiong
{
/**
* 接收方单据
*/
private
List
<
FileRet
>
fileRets
;
/**
* 装备id集合
*/
private
List
<
Integer
>
deviceIds
;
/**
* 回执单据
*/
private
List
<
FileRet
>
outFiles
;
private
Integer
isIgnore
;
private
Integer
userId
;
private
Integer
taskId
;
private
Integer
userA
;
private
Integer
userB
;
private
String
userAName
;
private
String
userBName
;
private
String
senderName
;
private
Integer
senderId
;
/**
* 电子签章发件方
*/
private
String
srcA
;
/**
* 电子签章收件方
*/
private
String
srcB
;
/**
* 接收方、发件方都使用电子签章
*/
private
Integer
isNotTwoSides
;
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/repository/DeviceDecommissioningDetailDao.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
repository
;
import
com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
public
interface
DeviceDecommissioningDetailDao
extends
JpaRepository
<
DeviceDecommissioningDetail
,
Integer
>,
JpaSpecificationExecutor
<
DeviceDecommissioningDetail
>
{
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/DeviceDecommissioningBusinessService.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
service
;
import
com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail
;
import
com.tykj.dev.device.decommissioning.entity.vo.DecommissioningOrderOutData
;
import
com.tykj.dev.device.decommissioning.entity.vo.StorageDeviceDevommissiong
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceDecommissioningBusinessService.java
* @Description TODO
* @createTime 2021年03月29日 16:37:00
*/
public
interface
DeviceDecommissioningBusinessService
{
/**
* 生成省中办退役的任务
* @param userId 用户id
* @param decommissioningOrderOutData 出库对象
*/
DeviceDecommissioningDetail
provinceSendDecommissioning
(
Integer
userId
,
DecommissioningOrderOutData
decommissioningOrderOutData
);
/**
* 上传中办的回执单
* @param taskId 任务ID
* @param storageDeviceDevommissiong 单据 和装id对象
*/
void
receiptSingle
(
Integer
taskId
,
StorageDeviceDevommissiong
storageDeviceDevommissiong
);
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/DeviceDecommissioningDetailService.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
service
;
import
com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceDecommissioningDetailService.java
* @Description TODO
* @createTime 2021年03月29日 16:18:00
*/
public
interface
DeviceDecommissioningDetailService
{
/**
* 添加清退详情
* @return 清退详情对象
*/
DeviceDecommissioningDetail
saveDeviceDecommissioningDetail
(
DeviceDecommissioningDetail
deviceDecommissioningDetail
);
/**
* 根据清退详情id查询清退详情
* @param decommissioningId 退役详情id
* @return 详情对象
*/
DeviceDecommissioningDetail
findDeviceDecommissioningDetail
(
Integer
decommissioningId
);
/**
* 根据清退详情id查询清退详情(不包括装备详情)
* @param decommissioningId 退役详情id
* @return 详情对象
*/
DeviceDecommissioningDetail
findDeviceDecommissioningDetailNoDev
(
Integer
decommissioningId
);
List
<
DeviceDecommissioningDetail
>
findAll
();
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/DeviceDecommissioningQueryService.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
service
;
import
com.tykj.dev.device.decommissioning.entity.vo.PagingVo
;
import
com.tykj.dev.device.decommissioning.entity.vo.RepelManagementVo
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceDecommissioningQueryService.java
* @Description TODO
* @createTime 2021年03月29日 16:39:00
*/
public
interface
DeviceDecommissioningQueryService
{
/**
* 查询待中机回执业务代办
*/
List
<
TaskBto
>
findOutsideTheProvince
();
/**
* 查询退役办结业务
*/
List
<
TaskBto
>
findOutsideTheProvinceEnd
();
/**
* 查看退役中装备列表
* @param repelManagementVo 查询条件对象
* @return PagingVo
*/
PagingVo
findRetired
(
RepelManagementVo
repelManagementVo
);
/**
* 查看待退役列表装备
*/
PagingVo
toBeRetiredDeviceList
(
RepelManagementVo
repelManagementVo
);
/**
* 查看已退役装备列表
*/
PagingVo
retiredDeviceList
(
RepelManagementVo
repelManagementVo
);
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/impl/DeviceDecommissioningBusinessServiceImpl.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
service
.
impl
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail
;
import
com.tykj.dev.device.decommissioning.entity.vo.DecommissioningOrderOutData
;
import
com.tykj.dev.device.decommissioning.entity.vo.StorageDeviceDevommissiong
;
import
com.tykj.dev.device.decommissioning.service.DeviceDecommissioningBusinessService
;
import
com.tykj.dev.device.decommissioning.service.DeviceDecommissioningDetailService
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.stream.Collectors
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceDecommissioningBusinessServiceImpl.java
* @Description TODO
* @createTime 2021年03月29日 16:38:00
*/
@Service
@Slf4j
public
class
DeviceDecommissioningBusinessServiceImpl
implements
DeviceDecommissioningBusinessService
{
@Autowired
UserService
userService
;
@Autowired
UnitsService
unitsService
;
@Autowired
DeviceDecommissioningDetailService
deviceDecommissioningDetailService
;
@Autowired
DeviceLibraryDao
deviceLibraryDao
;
@Autowired
TaskService
taskService
;
@Autowired
DeviceLogService
deviceLogService
;
@Autowired
MessageService
messageService
;
@Override
public
DeviceDecommissioningDetail
provinceSendDecommissioning
(
Integer
userId
,
DecommissioningOrderOutData
decommissioningOrderOutData
)
{
User
user
=
userService
.
findByUser
(
userId
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
DeviceDecommissioningDetail
deviceDecommissioningDetail
=
decommissioningOrderOutData
.
toDeviceDecommissioningDetail
();
deviceDecommissioningDetail
.
setDeviceIds
(
StringUtils
.
ListToString
(
decommissioningOrderOutData
.
getDevIds
()));
deviceDecommissioningDetail
.
setOutboundFile
(
FilesUtil
.
stringFileToList
(
decommissioningOrderOutData
.
getOutboundFileList
()));
deviceDecommissioningDetailService
.
saveDeviceDecommissioningDetail
(
deviceDecommissioningDetail
);
deviceDecommissioningDetail
.
setScripts
(
decommissioningOrderOutData
.
getScriptSaveVos
());
deviceDecommissioningDetail
.
setScriptJson
(
JacksonUtil
.
toJSon
(
decommissioningOrderOutData
.
getScriptSaveVos
()));
deviceDecommissioningDetail
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()+
"QT"
+
deviceDecommissioningDetail
.
getId
());
deviceDecommissioningDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceDecommissioningDetail
.
getDeviceIds
()));
deviceDecommissioningDetailService
.
saveDeviceDecommissioningDetail
(
deviceDecommissioningDetail
);
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
RETIRED
.
id
,
decommissioningOrderOutData
.
getDevIds
());
TaskBto
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
deviceDecommissioningDetail
.
getId
());
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起退役任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
return
deviceDecommissioningDetail
;
}
@Override
public
void
receiptSingle
(
Integer
taskId
,
StorageDeviceDevommissiong
storageDeviceDevommissiong
)
{
User
user
=
userService
.
findByUser
(
storageDeviceDevommissiong
.
getUserId
());
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SEND_BACK_1210
);
DeviceDecommissioningDetail
deviceDecommissioningDetail
=
deviceDecommissioningDetailService
.
findDeviceDecommissioningDetail
(
taskBto
.
getBillId
());
deviceDecommissioningDetail
.
setBillFile
(
FilesUtil
.
stringFileToList
(
storageDeviceDevommissiong
.
getFileRets
()));
if
(
storageDeviceDevommissiong
.
getUserBName
()!=
null
)
{
deviceDecommissioningDetail
.
setReceiveUserB
(
storageDeviceDevommissiong
.
getUserBName
());
}
if
(
storageDeviceDevommissiong
.
getUserB
()!=
null
){
deviceDecommissioningDetail
.
setReceiveUserbId
(
storageDeviceDevommissiong
.
getUserB
());
}
if
(
storageDeviceDevommissiong
.
getUserA
()!=
null
){
deviceDecommissioningDetail
.
setReceiveUseraId
(
storageDeviceDevommissiong
.
getUserA
());
}
if
(
storageDeviceDevommissiong
.
getUserAName
()!=
null
)
{
deviceDecommissioningDetail
.
setReceiveUserA
(
storageDeviceDevommissiong
.
getUserAName
());
}
taskService
.
moveToEnd
(
taskBto
);
deviceDecommissioningDetail
.
setRepelStatus
(
2
);
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
RETIRE
.
id
,
deviceDecommissioningDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceDecommissioningDetail
.
getDeviceIds
()));
deviceDecommissioningDetailService
.
saveDeviceDecommissioningDetail
(
deviceDecommissioningDetail
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"退役任务回执单据上传成功任务结束"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
}
/**
* 省出库中办 16
* @param unitId
* @param repelDetailId
* @return
*/
private
TaskBto
sendOutSuperior
(
Integer
unitId
,
Integer
repelDetailId
){
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
0
);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1210
.
id
,
"退役设备任务"
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
DECOMMISSIONING
.
id
,
unitId
,
0
,
""
,
list
));
}
/**
* 异步添加装备日志
* @param deviceLibraries
* @param remark
* @param userId
*/
private
void
devLogAdd
(
List
<
DeviceLibrary
>
deviceLibraries
,
String
remark
,
Integer
userId
){
List
<
DeviceLog
>
logDtos
=
new
ArrayList
<>();
deviceLibraries
.
forEach
(
deviceLibrary
->
{
logDtos
.
add
(
new
DeviceLogDto
(
deviceLibrary
.
getId
(),
remark
,
null
,
userId
).
toDo
());
}
);
CompletableFuture
.
runAsync
(()
->
{
deviceLogService
.
saveAllLog
(
logDtos
);
});
}
private
void
addMessage
(
MessageBto
messageBto
){
messageService
.
add
(
messageBto
);
}
/**
* 根据单位id查询用户 去除用户id
* @param userId
* @param unitId
* @return
*/
private
List
<
Integer
>
gainThisUser
(
Integer
userId
,
Integer
unitId
){
return
userService
.
findAllByUnite
(
unitId
).
stream
().
filter
(
user
->
user
.
getUnitsId
()!=
userId
).
map
(
User:
:
getUserId
).
collect
(
Collectors
.
toList
());
}
/**
* 根据单位id查询用户id集合
* @param unitId
* @return
*/
private
List
<
Integer
>
findUnitId
(
Integer
unitId
){
return
userService
.
findAllByUnite
(
unitId
).
stream
().
map
(
User:
:
getUserId
).
collect
(
Collectors
.
toList
());
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
","
)
)
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
List
<
String
>
idListString
=
idStringList
.
stream
().
filter
(
list2
->!
list2
.
equals
(
""
)).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
idListString
);
List
<
Integer
>
devIds
=
idListString
.
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
).
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
());
}
else
{
return
new
ArrayList
<>();
}
}
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/impl/DeviceDecommissioningDetailServiceImpl.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
service
.
impl
;
import
com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail
;
import
com.tykj.dev.device.decommissioning.repository.DeviceDecommissioningDetailDao
;
import
com.tykj.dev.device.decommissioning.service.DeviceDecommissioningDetailService
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceDecommissioningDetailServiceImpl.java
* @Description TODO
* @createTime 2021年03月29日 16:18:00
*/
@Service
@Slf4j
public
class
DeviceDecommissioningDetailServiceImpl
implements
DeviceDecommissioningDetailService
{
@Autowired
DeviceDecommissioningDetailDao
deviceDecommissioningDetailDao
;
@Autowired
DeviceLibraryDao
deviceLibraryDao
;
@Override
public
DeviceDecommissioningDetail
saveDeviceDecommissioningDetail
(
DeviceDecommissioningDetail
deviceDecommissioningDetail
)
{
log
.
info
(
"[清退] 详情添加成功"
);
return
deviceDecommissioningDetailDao
.
save
(
deviceDecommissioningDetail
);
}
@Override
public
DeviceDecommissioningDetail
findDeviceDecommissioningDetail
(
Integer
decommissioningId
)
{
Optional
<
DeviceDecommissioningDetail
>
optional
=
deviceDecommissioningDetailDao
.
findById
(
decommissioningId
);
if
(
optional
.
isPresent
()){
DeviceDecommissioningDetail
deviceDecommissioningDetail
=
optional
.
get
();
deviceDecommissioningDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceDecommissioningDetail
.
getDeviceIds
()));
deviceDecommissioningDetail
.
setBillFiles
(
FilesUtil
.
stringFileToList
(
deviceDecommissioningDetail
.
getBillFile
()));
deviceDecommissioningDetail
.
setOutboundFiles
(
FilesUtil
.
stringFileToList
(
deviceDecommissioningDetail
.
getOutboundFile
()));
deviceDecommissioningDetail
.
setInFiles
(
FilesUtil
.
stringFileToList
(
deviceDecommissioningDetail
.
getInFile
()));
return
deviceDecommissioningDetail
;
}
else
{
log
.
info
(
"[退役] 详情查看错误,id没有找到{}"
,
decommissioningId
);
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"退役详情id没有找到:"
+
decommissioningId
));
}
}
@Override
public
DeviceDecommissioningDetail
findDeviceDecommissioningDetailNoDev
(
Integer
decommissioningId
)
{
Optional
<
DeviceDecommissioningDetail
>
optional
=
deviceDecommissioningDetailDao
.
findById
(
decommissioningId
);
if
(
optional
.
isPresent
()){
return
optional
.
get
();
}
else
{
log
.
info
(
"[退役] 详情查看错误,id没有找到{}"
,
decommissioningId
);
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"退役详情id没有找到:"
+
decommissioningId
));
}
}
@Override
public
List
<
DeviceDecommissioningDetail
>
findAll
()
{
return
deviceDecommissioningDetailDao
.
findAll
();
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
","
)
)
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
List
<
String
>
idListString
=
idStringList
.
stream
().
filter
(
list2
->!
list2
.
equals
(
""
)).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
idListString
);
List
<
Integer
>
devIds
=
idListString
.
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
).
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
());
}
else
{
return
new
ArrayList
<>();
}
}
}
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/impl/DeviceDecommissioningQueryServiceImpl.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
service
.
impl
;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.device.decommissioning.entity.vo.PagingVo
;
import
com.tykj.dev.device.decommissioning.entity.vo.RepelManagementVo
;
import
com.tykj.dev.device.decommissioning.service.DeviceDecommissioningQueryService
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.DeviceLifeStatus
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
import
javax.persistence.Transient
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceDecommissioningQueryServiceImpl.java
* @Description TODO
* @createTime 2021年03月29日 16:39:00
*/
@Service
@Slf4j
public
class
DeviceDecommissioningQueryServiceImpl
implements
DeviceDecommissioningQueryService
{
@Autowired
TaskService
taskService
;
@Autowired
DeviceLibraryDao
deviceLibraryDao
;
@Override
public
List
<
TaskBto
>
findOutsideTheProvince
()
{
List
<
TaskBto
>
taskBtoList
;
taskBtoList
=
taskService
.
findBillType
(
BusinessEnum
.
DECOMMISSIONING
.
id
).
stream
().
filter
(
taskBto
->
!
taskBto
.
getBillStatus
().
equals
(
StatusEnum
.
END
.
id
)).
collect
(
Collectors
.
toList
());
return
taskBtoList
;
}
@Override
public
List
<
TaskBto
>
findOutsideTheProvinceEnd
()
{
List
<
TaskBto
>
taskBtoList
;
taskBtoList
=
taskService
.
findBillType
(
BusinessEnum
.
DECOMMISSIONING
.
id
).
stream
().
filter
(
taskBto
->
taskBto
.
getBillStatus
().
equals
(
StatusEnum
.
END
.
id
)).
collect
(
Collectors
.
toList
());
return
taskBtoList
;
}
//装备有现成的接口直接调用
@Override
public
PagingVo
findRetired
(
RepelManagementVo
repelManagementVo
)
{
Page
<
DeviceLibrary
>
page
=
deviceLibraryDao
.
findAll
(
getFindRetiredSpecification
(
repelManagementVo
),
repelManagementVo
.
getPageable
());
return
PagingVo
.
builder
()
.
data
(
page
.
getContent
().
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
())).
page
(
repelManagementVo
.
getPage
())
.
size
(
repelManagementVo
.
getSize
()).
total
((
int
)
page
.
getTotalElements
()).
build
();
}
private
Specification
<
DeviceLibrary
>
getFindRetiredSpecification
(
RepelManagementVo
repelManagementVo
)
{
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
repelManagementVo
);
// List<Integer> leftStatus=new ArrayList<>();
// leftStatus.add(com.tykj.dev.config.base.DeviceLifeStatus.RETIRED.id);
predicateBuilder
.
in
(
"lifeStatus"
,
com
.
tykj
.
dev
.
config
.
base
.
DeviceLifeStatus
.
RETIRED
.
id
);
return
predicateBuilder
.
build
();
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
""
)&&
!
involeDevice
.
equals
(
","
))
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
List
<
String
>
idListString
=
idStringList
.
stream
().
filter
(
list2
->!
list2
.
equals
(
""
)).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
idListString
);
List
<
Integer
>
devIds
=
idListString
.
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
).
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
());
}
else
{
return
new
ArrayList
<>();
}
}
/**
* 查询已清退装备列表
*/
@Override
public
PagingVo
retiredDeviceList
(
RepelManagementVo
repelManagementVo
)
{
Page
<
DeviceLibrary
>
page
=
deviceLibraryDao
.
findAll
(
getRetiredSpecification
(
repelManagementVo
),
repelManagementVo
.
getPageable
());
return
PagingVo
.
builder
()
.
data
(
page
.
getContent
().
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
())).
page
(
repelManagementVo
.
getPage
())
.
size
(
repelManagementVo
.
getSize
()).
total
((
int
)
page
.
getTotalElements
()).
build
();
}
private
Specification
<
DeviceLibrary
>
getRetiredSpecification
(
RepelManagementVo
repelManagementVo
)
{
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
repelManagementVo
);
predicateBuilder
.
eq
(
"lifeStatus"
,
DeviceLifeStatus
.
RETIRE
.
id
);
return
predicateBuilder
.
build
();
}
/**
* 查询待退役列表
* @param repelManagementVo 条件对象
* @return 退役对象
*/
@Override
public
PagingVo
toBeRetiredDeviceList
(
RepelManagementVo
repelManagementVo
)
{
Page
<
DeviceLibrary
>
page
=
deviceLibraryDao
.
findAll
(
getSelectSpecification
(
repelManagementVo
),
repelManagementVo
.
getPageable
());
// deviceLibraryDao.findAll(getSelectSpecification(repelManagementVo),repelManagementVo.getPageable())
// deviceLibrarySelectVo.setLifeStatus(leftStatus);
return
PagingVo
.
builder
()
.
data
(
page
.
getContent
().
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
())).
page
(
repelManagementVo
.
getPage
())
.
size
(
repelManagementVo
.
getSize
()).
total
((
int
)
page
.
getTotalElements
()).
build
();
}
private
Specification
<
DeviceLibrary
>
getSelectSpecification
(
RepelManagementVo
repelManagementVo
)
{
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
repelManagementVo
);
//unitId为空,默认查询当前单位
// List<Integer> leftStatus=new ArrayList<>();
// leftStatus.add(DeviceLifeStatus.REPEL.id);
predicateBuilder
.
eq
(
"lifeStatus"
,
DeviceLifeStatus
.
REPEL
.
id
);
predicateBuilder
.
eq
(
"locationUnit"
,
repelManagementVo
.
getUnitName
());
predicateBuilder
.
eq
(
"ownUnit"
,
repelManagementVo
.
getUnitName
());
return
predicateBuilder
.
build
();
}
private
PredicateBuilder
<
DeviceLibrary
>
getPredicateBuilder
(
RepelManagementVo
repelManagementVo
)
{
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
Specifications
.
and
();
if
(
repelManagementVo
!=
null
)
{
if
(
repelManagementVo
.
getModel
()
!=
null
)
{
predicateBuilder
.
eq
(
"model"
,
repelManagementVo
.
getModel
());
}
if
(
repelManagementVo
.
getName
()
!=
null
)
{
predicateBuilder
.
eq
(
"name"
,
repelManagementVo
.
getName
());
}
if
(
repelManagementVo
.
getSecretLevel
()
!=
null
)
{
predicateBuilder
.
eq
(
"secretLevel"
,
repelManagementVo
.
getSecretLevel
());
}
if
(
repelManagementVo
.
getMatchingRange
()
!=
null
)
{
predicateBuilder
.
eq
(
"matchingRange"
,
repelManagementVo
.
getMatchingRange
());
}
if
(
repelManagementVo
.
getStorageType
()
!=
null
)
{
predicateBuilder
.
eq
(
"storageType"
,
repelManagementVo
.
getStorageType
());
}
if
(
repelManagementVo
.
getManageStatus
()
!=
null
)
{
predicateBuilder
.
eq
(
"manageStatus"
,
repelManagementVo
.
getManageStatus
());
}
if
(
repelManagementVo
.
getInvisibleRange
()
!=
null
)
{
predicateBuilder
.
eq
(
"invisibleRange"
,
repelManagementVo
.
getInvisibleRange
());
}
if
(
repelManagementVo
.
getTime
()!=
null
){
predicateBuilder
.
gt
(
"updateTime"
,
new
Date
(
repelManagementVo
.
getTime
()));
}
if
(
repelManagementVo
.
getEndTime
()!=
null
){
predicateBuilder
.
lt
(
"updateTime"
,
new
Date
(
repelManagementVo
.
getEndTime
()));
}
if
(
repelManagementVo
.
getContent
()
!=
null
)
{
Class
<
DeviceLibrary
>
deviceLibraryEntity
=
DeviceLibrary
.
class
;
Field
[]
declaredFields
=
deviceLibraryEntity
.
getDeclaredFields
();
PredicateBuilder
<
DeviceLibrary
>
p
=
Specifications
.
or
();
for
(
Field
field
:
declaredFields
)
{
if
(
field
.
getType
().
equals
(
String
.
class
)
&&
field
.
getAnnotation
(
Transient
.
class
)
==
null
)
{
p
.
like
(
field
.
getName
(),
"%"
+
repelManagementVo
.
getContent
()
+
"%"
);
}
}
predicateBuilder
.
predicate
(
p
.
build
());
}
}
return
predicateBuilder
;
}
}
dev-destroy/src/main/java/com/tykj/dev/device/destroy/controller/DeviceDestroyController.java
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
destroy
.
controller
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill
;
import
com.tykj.dev.device.destroy.entity.enums.DestroyStatus
;
...
...
@@ -252,6 +253,7 @@ public class DeviceDestroyController {
new
FileVo
(
"销毁单据"
,
deviceDestroyBill
.
getDestroyFileName
(),
deviceDestroyBill
.
getDestroyFileUrl
())
:
null
);
List
<
Integer
>
list
=
StringSplitUtil
.
split
(
deviceDestroyBill
.
getDestroyDeviceDetail
());
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
DESTROYED
.
id
,
list
);
for
(
Integer
id
:
list
)
{
if
(
id
>
0
)
{
//生成装备日志
...
...
@@ -272,7 +274,7 @@ public class DeviceDestroyController {
if
(
flag
==
0
)
{
//将装备装备变更为销毁
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
id
);
deviceLibraryEntity
.
setLifeStatus
(
D
EVICE_DESTROY_LIFE_STATUS
);
deviceLibraryEntity
.
setLifeStatus
(
D
eviceLifeStatus
.
IN_THE_DESTROYED
.
id
);
deviceLibraryService
.
update
(
deviceLibraryEntity
);
}
//生成装备日志
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryDao.java
浏览文件 @
2f7a9b39
...
...
@@ -65,6 +65,8 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
Integer
countAllByModelAndOwnUnitInAndLifeStatusIn
(
String
model
,
List
<
String
>
unitNames
,
List
<
Integer
>
lifeStatus
);
Integer
countAllByPackingIdInAndOwnUnitInAndLifeStatusIn
(
List
<
Integer
>
packingIds
,
List
<
String
>
unitNames
,
List
<
Integer
>
lifeStatus
);
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnit
(
List
<
Integer
>
packingIds
,
String
unitNames
);
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnitIn
(
List
<
Integer
>
packingIds
,
List
<
String
>
unitNames
);
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/BusinessEnum.java
浏览文件 @
2f7a9b39
...
...
@@ -72,7 +72,7 @@ public enum BusinessEnum {
/**
* 清退异常处理
*/
SEND_BACK_EXCEPTION
(
17
,
"清退异常处理
"
),
DECOMMISSIONING
(
17
,
"退役业务
"
),
/**
* 清退出库
*/
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
2f7a9b39
...
...
@@ -89,6 +89,9 @@ public enum StatusEnum {
LOSS1300
(
1300
,
"丢失装备等待市审核"
),
LOSS1301
(
1301
,
"丢失装备等待省审核"
),
...
...
dev-
sendback/src/main/java/com/tykj/dev/device/sendback/util
/StringUtils.java
→
dev-
misc/src/main/java/com/tykj/dev/misc/utils
/StringUtils.java
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
sendback
.
util
;
package
com
.
tykj
.
dev
.
misc
.
utils
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
dev-scrap/pom.xml
浏览文件 @
2f7a9b39
...
...
@@ -31,5 +31,9 @@
<groupId>
com.tykj
</groupId>
<artifactId>
dev-task
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-file
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-scrap/src/main/java/com/tykj/dev/device/scrap/controller/DeviceScrapController.java
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
scrap
.
controller
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
...
...
@@ -120,7 +121,7 @@ public class DeviceScrapController {
//添加装备日志
for
(
Integer
id:
scrapSaveVo
.
getDeviceIds
())
{
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
id
);
deviceLibrary
.
setLifeStatus
(
5
);
deviceLibrary
.
setLifeStatus
(
DeviceLifeStatus
.
IN_THE_SCRAPPED
.
id
);
deviceLibraryService
.
update
(
deviceLibrary
);
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"发起报废"
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
...
...
@@ -143,6 +144,8 @@ public class DeviceScrapController {
scrapBillService
.
update
(
scrapBill
);
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
taskService
.
moveToEnd
(
taskBto
);
List
<
Integer
>
ids
=
StringSplitUtil
.
userIdSplit
(
scrapBill
.
getScrapDetail
());
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
SCRAP_I
.
id
,
ids
);
List
<
FileVo
>
fileVos
=
new
ArrayList
<>();
fileVos
.
add
(
new
FileVo
(
"报废单"
,
scrapBill
.
getFileName
(),
scrapBill
.
getFileUrl
()));
//添加装备日志
...
...
dev-scrap/src/main/java/com/tykj/dev/device/scrap/repository/ScrapDao.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
scrap
.
repository
;
import
com.tykj.dev.device.scrap.subject.domin.Scrap
;
import
com.tykj.dev.device.scrap.subject.domin.ScrapBill
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
/**
* @author zjm
* @version 1.0.0
* @ClassName ScrapDao.java
* @Description 报废业务
* @createTime 2021年03月31日 10:15:00
*/
public
interface
ScrapDao
extends
JpaRepository
<
Scrap
,
Integer
>,
JpaSpecificationExecutor
<
Scrap
>
{
}
dev-scrap/src/main/java/com/tykj/dev/device/scrap/service/ScrapService.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
scrap
.
service
;
import
com.tykj.dev.device.scrap.subject.domin.Scrap
;
import
java.util.List
;
public
interface
ScrapService
{
/**
* 添加报废详情
* @return 报废详情对象
*/
Scrap
saveScrap
(
Scrap
scrap
);
/**
* 根据报废详情id查询清退详情
* @param scrapId 报废详情id
* @return 详情对象
*/
Scrap
findScrap
(
Integer
scrapId
);
/**
* 根据报废详情id查询清退详情(不包括装备详情)
* @param scrapId 报废详情id
* @return 详情对象
*/
Scrap
findScrapNoDev
(
Integer
scrapId
);
/**
* 查询所有的报废任务
*/
List
<
Scrap
>
findAll
();
}
dev-scrap/src/main/java/com/tykj/dev/device/scrap/service/impl/ScrapServiceImpl.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
scrap
.
service
.
impl
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.scrap.repository.ScrapDao
;
import
com.tykj.dev.device.scrap.service.ScrapBillService
;
import
com.tykj.dev.device.scrap.service.ScrapService
;
import
com.tykj.dev.device.scrap.subject.domin.Scrap
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName ScrapServiceImpl.java
* @Description TODO
* @createTime 2021年03月31日 10:23:00
*/
public
class
ScrapServiceImpl
implements
ScrapService
{
@Autowired
ScrapDao
scrapDao
;
@Autowired
DeviceLibraryDao
deviceLibraryDao
;
@Override
public
Scrap
saveScrap
(
Scrap
scrap
)
{
return
null
;
}
@Override
public
Scrap
findScrap
(
Integer
scrapId
)
{
return
null
;
}
@Override
public
Scrap
findScrapNoDev
(
Integer
scrapId
)
{
return
null
;
}
@Override
public
List
<
Scrap
>
findAll
()
{
return
null
;
}
}
dev-scrap/src/main/java/com/tykj/dev/device/scrap/subject/domin/Scrap.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
scrap
.
subject
.
domin
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.tykj.dev.device.file.entity.Documents
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.misc.base.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.EntityListeners
;
import
javax.persistence.Transient
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceRepel.java
* @Description DeviceRepel 清退业务id
* @createTime 2021年01月06日 20:02:00
*/
@Data
@Entity
@EntityListeners
(
AuditingEntityListener
.
class
)
@ApiModel
(
"报废业务详情"
)
public
class
Scrap
extends
BaseEntity
{
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
@ApiModelProperty
(
value
=
"单据编号"
)
private
String
num
;
@ApiModelProperty
(
value
=
"申请文号"
)
private
String
applyNumber
;
@ApiModelProperty
(
value
=
"批复文号"
)
private
String
replayNumber
;
@ApiModelProperty
(
value
=
"发件单位"
)
private
String
sendUnit
;
@ApiModelProperty
(
value
=
"发件单位id"
)
private
Integer
sendUnitId
;
@ApiModelProperty
(
value
=
"收件单位id"
)
private
Integer
receiveUnitId
;
@ApiModelProperty
(
value
=
"收件单位"
)
private
String
receiveUnit
;
@ApiModelProperty
(
value
=
"配发时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
sendTime
;
@ApiModelProperty
(
value
=
"接收时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
receiveTime
;
@ApiModelProperty
(
value
=
"发件方id(A岗位)"
)
private
Integer
sendUseraId
;
@ApiModelProperty
(
value
=
"发件方名称(A岗位)"
)
private
String
senderUserA
;
@ApiModelProperty
(
value
=
"签发人(B岗位)"
)
private
String
senderUserB
;
@ApiModelProperty
(
value
=
"签发人(B岗位)"
)
private
Integer
sendUserbId
;
@ApiModelProperty
(
value
=
"收件方id(A岗位)"
)
private
Integer
receiveUseraId
;
@ApiModelProperty
(
value
=
"收件方名称(A岗位)"
)
private
String
receiveUserA
;
@ApiModelProperty
(
value
=
"收件方名称(B岗位)"
)
private
String
receiveUserB
;
@ApiModelProperty
(
value
=
"收件方id(B岗位)"
)
private
Integer
receiveUserbId
;
@ApiModelProperty
(
value
=
"回执单"
)
@Column
(
name
=
"outbound_file"
,
columnDefinition
=
"TEXT"
)
private
String
outboundFile
;
@ApiModelProperty
(
value
=
"签收单"
)
@Column
(
name
=
"bill_file"
,
columnDefinition
=
"TEXT"
)
private
String
billFile
;
/**
* 退回状态(1:退回待审核,2:退回审核失败,3:退回中,4:退回接收待审核,5:退回接收审核失败,6:退回成功)
*/
@ApiModelProperty
(
value
=
"退回状态(1:退回待审核,2:退回审核失败,3:退回中,4:退回接收待审核,5:退回接收审核失败,6:退回成功)"
)
private
Integer
sendBackStatus
;
@ApiModelProperty
(
value
=
"装备id集合"
)
@Column
(
name
=
"device_ids"
,
columnDefinition
=
"TEXT"
)
private
String
deviceIds
;
@ApiModelProperty
(
value
=
"发件单位签章id"
)
private
String
leftSignatureId
;
@ApiModelProperty
(
value
=
"收件单位签章id"
)
private
String
rightSignatureId
;
@ApiModelProperty
(
value
=
"区块链RID"
,
name
=
"recordId"
)
private
String
recordId
;
@ApiModelProperty
(
value
=
"批复文号文件"
)
@Column
(
name
=
"reply_files"
,
columnDefinition
=
"TEXT"
)
private
String
replyFiles
;
@ApiModelProperty
(
value
=
"申请文号文件"
)
@Column
(
name
=
"apply_files"
,
columnDefinition
=
"TEXT"
)
private
String
applyFiles
;
@Column
(
name
=
"script_json"
,
columnDefinition
=
"TEXT"
)
private
String
scriptJson
;
@Transient
private
List
<
ScriptSaveVo
>
scripts
=
new
ArrayList
<>();
@Transient
@ApiModelProperty
(
value
=
"批复文号文件集合"
)
private
List
<
FileRet
>
replyFileList
=
new
ArrayList
<>();
@Transient
@ApiModelProperty
(
value
=
"申请文号文件集合"
)
private
List
<
FileRet
>
applyFileList
=
new
ArrayList
<>();
@Transient
@ApiModelProperty
(
value
=
"装备List"
)
private
List
<
DeviceLibrary
>
deviceLibraryEntities
=
new
ArrayList
<>();
@Transient
@ApiModelProperty
(
value
=
"签收单文件集合对象"
)
private
List
<
FileRet
>
billFiles
;
@Transient
@ApiModelProperty
(
value
=
"回执单文件集合对象"
)
private
List
<
FileRet
>
outboundFiles
;
public
Documents
toDoc
(){
return
new
Documents
(
num
,
"装备清退单据"
,
receiveUnit
,
replayNumber
,
sendUnit
,
null
,
null
,
senderUserA
,
senderUserB
,
receiveUserA
,
receiveUserB
,
null
);
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelDevController.java
浏览文件 @
2f7a9b39
...
...
@@ -48,9 +48,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"市转发省级任务成功"
);
}
/**
* 等待审核
*/
@ApiOperation
(
value
=
"提交任务等待审核"
,
notes
=
"选择装备的接口"
)
@PostMapping
(
value
=
"/resolveConfirm/{userId}/{taskId}"
)
public
ResponseEntity
resolveConfirm
(
@PathVariable
Integer
userId
,
@PathVariable
Integer
taskId
){
...
...
@@ -58,9 +55,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"提交任务成功,等待审核"
);
}
/**
* 选则装备等待审核
*/
@ApiOperation
(
value
=
"提交选择则的装备"
,
notes
=
"选择装备的接口"
)
@PostMapping
(
value
=
"/submitChoose/{taskId}"
)
public
ResponseEntity
resolveConfirm1
(
@RequestBody
ResolveConfirm
resolveConfirm
,
@PathVariable
Integer
taskId
){
...
...
@@ -68,9 +62,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"选中装备提交成功"
);
}
/**
* 审核接口
*/
@ApiOperation
(
value
=
"清退代办业务审核接口"
,
notes
=
"清退代办业务审核接口"
)
@PostMapping
(
value
=
"/resolveAudit/{taskId}"
)
public
ResponseEntity
resolveAudit
(
@PathVariable
Integer
taskId
,
@RequestBody
RepelAuditResult
repelAuditResult
){
...
...
@@ -78,21 +69,12 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"审核成功"
);
}
/**
* 出库任务
* @param taskId
* @param userId
* @return
*/
@ApiOperation
(
value
=
"清退出库任务接口"
,
notes
=
"清退出库任务接口"
)
@PostMapping
(
value
=
"/sendBackOutCheck/{userId}/{taskId}"
)
public
ResponseEntity
sendBackOutCheck
(
@PathVariable
Integer
taskId
,
@RequestBody
OrderOutData
orderOutData
,
@PathVariable
Integer
userId
){
return
ResponseEntity
.
ok
(
repelBusinessService
.
sendBackOutCheck
(
taskId
,
userId
,
orderOutData
));
}
/**
* 入库任务
*/
@ApiOperation
(
value
=
"清退入库任务接口"
,
notes
=
"清退入库任务接口"
)
@PostMapping
(
value
=
"/storageDeviceRepel/{taskId}"
)
public
ResponseEntity
storageDeviceRepel
(
@PathVariable
Integer
taskId
,
@RequestBody
StorageDeviceRepel
storageDeviceRepel
){
...
...
@@ -100,10 +82,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"入库任务"
);
}
/**
* 省本级清退任务
*/
@ApiOperation
(
value
=
"省本级清退任务"
,
notes
=
"省本级清退任务"
)
@PostMapping
(
value
=
"/oneselfRepel/{taskId}/{userId}"
)
public
ResponseEntity
oneselfRepel
(
@PathVariable
Integer
taskId
,
@RequestBody
StorageDeviceRepel
storageDeviceRepel
,
@PathVariable
Integer
userId
){
...
...
@@ -111,30 +89,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"入库任务"
);
}
/**
* 省清退中办
*/
@ApiOperation
(
value
=
"省清退中办"
,
notes
=
"省清退中办"
)
@PostMapping
(
value
=
"/provinceSendOutSuperior/{userId}"
)
public
ResponseEntity
provinceSendOutSuperior
(
@PathVariable
Integer
userId
,
@RequestBody
OrderOutData
orderOutData
){
// repelBusinessService.provinceSendOutSuperior(userId,orderOutData);
return
ResponseEntity
.
ok
(
repelBusinessService
.
provinceSendOutSuperior
(
userId
,
orderOutData
));
}
/**
* 省上传中办回执单
*/
@ApiOperation
(
value
=
"省上传中办回执单"
,
notes
=
"省上传中办回执单"
)
@PostMapping
(
value
=
"/receiptSingle/{taskId}"
)
public
ResponseEntity
receiptSingle
(
@PathVariable
Integer
taskId
,
@RequestBody
StorageDeviceRepel
storageDeviceRepel
){
repelBusinessService
.
receiptSingle
(
taskId
,
storageDeviceRepel
);
return
ResponseEntity
.
ok
(
"省上传中办回执单,成功任务结束"
);
}
/**
* 市发起清退任务
*/
@ApiOperation
(
value
=
"市发起清退任务"
,
notes
=
"市发起清退任务"
)
@PostMapping
(
value
=
"/cityInitiateRepel/{userId}"
)
public
ResponseEntity
cityInitiateRepel
(
@PathVariable
Integer
userId
,
@RequestBody
DeviceRepel
deviceRepel
){
...
...
@@ -142,9 +96,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"省上传中办回执单,成功任务结束"
);
}
/**
* 省审核市清退任务
*/
@ApiOperation
(
value
=
"省审核市清退任务"
,
notes
=
"省审核市清退任务"
)
@PostMapping
(
value
=
"/provinceAuditCity/{taskId}/{userId}"
)
public
ResponseEntity
provinceAuditCity
(
@PathVariable
Integer
taskId
,
@PathVariable
Integer
userId
,
@RequestBody
RepelAuditResult
repelAuditResult
){
...
...
@@ -152,9 +103,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"省上传中办回执单,成功任务结束"
);
}
/**
* 统计清退任务的办结
*/
@ApiOperation
(
value
=
"统计清退任务的办结"
,
notes
=
"统计清退任务的办结"
)
@GetMapping
(
value
=
"/repelEnd/{taskId}"
)
public
ResponseEntity
cityRepelEnd
(
@PathVariable
Integer
taskId
){
...
...
@@ -162,9 +110,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"统计清退任务的办结"
);
}
/**
* 省直属任务待清退
*/
@ApiOperation
(
value
=
"省直属任务待清退"
,
notes
=
"省直属任务待清退"
)
@GetMapping
(
value
=
"/provinceDirectlyUnder/{taskId}"
)
public
ResponseEntity
provinceDirectlyUnder
(
@PathVariable
Integer
taskId
,
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
){
...
...
@@ -172,9 +117,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"省直属单位任务提交成功"
);
}
/**
* 清退装备任务等待上传回执单
*/
@ApiOperation
(
value
=
"清退装备任务等待上传回执单"
,
notes
=
"上传回执单 也可以不上传回执单"
)
@PostMapping
(
value
=
"/receipts"
)
public
ResponseEntity
receipts
(
@RequestBody
StorageDeviceRepel
storageDeviceRepel
){
...
...
@@ -182,9 +124,6 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"上传回执单成功"
);
}
/**
* 清退出入库发件方选择签发人接口
*/
@ApiOperation
(
value
=
"清退出入库发件方选择签发人接口"
,
notes
=
"上传回执单 也可以不上传回执单"
)
@PostMapping
(
value
=
"/addSendBUser"
)
public
ResponseEntity
addSendBUser
(
@RequestBody
StorageDeviceRepel
storageDeviceRepel
){
...
...
@@ -192,30 +131,13 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"签发人选择成功"
);
}
/**
* 重新入库接口
*/
@ApiOperation
(
value
=
"重新入库接口"
,
notes
=
"重新入库接口"
)
@PostMapping
(
value
=
"/againPutInStorage"
)
public
ResponseEntity
againPutInStorage
(
@RequestBody
List
<
Integer
>
ids
){
repelBusinessService
.
againPutInStorage
(
ids
);
return
ResponseEntity
.
ok
(
"重新入库成功"
);
}
/**
* 重新入库接口会生成业务记录
*/
@ApiOperation
(
value
=
"重新入库接口会生成业务记录"
,
notes
=
"重新入库接口会生成业务记录"
)
@PostMapping
(
value
=
"/againPutInStorage/business"
)
public
ResponseEntity
againPutInStorage1
(
@RequestBody
List
<
Integer
>
ids
,
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
){
againStorageBillService
.
againPutInStorage
(
ids
,
securityUser
);
return
ResponseEntity
.
ok
(
"重新入库成功"
);
@ApiOperation
(
value
=
"装备生命状态转换接口-会生成业务记录"
,
notes
=
"装备生命状态转换接口-会生成业务记录"
)
@PostMapping
(
value
=
"/transitionOfLife/business"
)
public
ResponseEntity
transitionOfLife
(
@RequestBody
TransitionOfLifeVo
transitionOfLifeVo
,
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
){
againStorageBillService
.
againPutInStorage
(
transitionOfLifeVo
,
securityUser
);
return
ResponseEntity
.
ok
(
"装备生命状态转换成功"
);
}
/**
* 测试
*/
@ApiOperation
(
value
=
"测试"
,
notes
=
"上传回执单 也可以不上传回执单"
)
@PostMapping
(
value
=
"/test"
)
public
ResponseEntity
receipts1
(){
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
2f7a9b39
...
...
@@ -29,7 +29,7 @@ import java.util.stream.Collectors;
* @author zjm
* @version 1.0.0
* @ClassName RepelQueryController.java
* @Description
TODO
* @Description
装备清退查询接口提供
* @createTime 2021年01月10日 15:43:00
*/
@RestController
...
...
@@ -85,55 +85,30 @@ public class RepelQueryController {
return
ResponseEntity
.
ok
(
repelQueryService
.
findDeviceSendOut
(
taskId
));
}
/**
* 待清退列表
*/
@PostMapping
(
value
=
"/toRepelList"
)
@ApiOperation
(
value
=
"待清退列表"
,
notes
=
"待清退列表"
)
public
ResponseEntity
toRepelList
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
toRepel
List
(
repelManagementVo
));
return
ResponseEntity
.
ok
(
repelQueryService
.
repelDevice
List
(
repelManagementVo
));
}
/**
* 已清退列表
*/
@PostMapping
(
value
=
"/clearedList"
)
@ApiOperation
(
value
=
"已清退列表"
,
notes
=
"已清退列表"
)
public
ResponseEntity
clearedList
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
clearedList
(
repelManagementVo
));
}
/**
* 已退役
*/
@PostMapping
(
value
=
"/retiredList"
)
@ApiOperation
(
value
=
"已退役列表"
,
notes
=
"已退役列表接口"
)
public
ResponseEntity
retiredList
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
retiredList
(
repelManagementVo
));
}
// /**
// * 省直属任务装备查询接口
// */
// @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
=
"省直属任务装备查询接口"
)
public
ResponseEntity
provinceDirectlyUnderDev
(
@PathVariable
Integer
taskId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
directlyUnderUnitLeftNavigation
(
taskId
));
}
/**
* 清退管理页面 统计列表数据点击接口
*/
@PostMapping
(
value
=
"/repelManagementListDetails"
)
@ApiOperation
(
value
=
"清退管理页面 统计列表数据点击接口"
,
notes
=
"清退管理页面 统计列表数据点击接口"
)
public
ResponseEntity
repelManagementListDetails
(
@RequestBody
DeviceIdLIstVo
deviceIdLIstVo
){
...
...
@@ -141,41 +116,24 @@ public class RepelQueryController {
return
ResponseEntity
.
ok
(
repelQueryService
.
repelManagementListDetails
(
deviceIdLIstVo
.
getIds
()));
}
/**
* 省直属单位 待上传接口装备查询
*/
@GetMapping
(
value
=
"/provinceDirectlyUnderSelectedDev/{taskId}/{unitId}"
)
@ApiOperation
(
value
=
"省直属单位 待上传接口装备查询"
,
notes
=
"省直属单位 待上传接口装备查询"
)
public
ResponseEntity
provinceDirectlyUnderSelectedDev
(
@PathVariable
Integer
taskId
,
@PathVariable
Integer
unitId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
provinceDirectlyUnderSelectedDev
(
taskId
,
unitId
));
}
/**
* 清退管理 选择装备列表的接口
*/
@PostMapping
(
value
=
"/findRepelListModelNameGroup"
)
@ApiOperation
(
value
=
"清退管理 选择装备列表的接口"
,
notes
=
"清退管理 选择装备列表的接口"
)
public
ResponseEntity
findRepelListModelNameGroup
(
@RequestBody
ModelAndTypeVo
modelAndTypeVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
findRepelListModelNameGroup
(
modelAndTypeVo
));
}
/**
* 查询清退单列表
*/
@ApiOperation
(
value
=
"查询清退单列表"
)
@GetMapping
(
"/getList"
)
public
ResponseEntity
getList
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
return
ResponseEntity
.
ok
(
repelQueryService
.
getList
(
securityUser
));
}
/**
* 查询清退任务
* @param taskSelectVo
* @return
*/
@ApiOperation
(
value
=
"查询清退任务"
,
notes
=
"可以通过这个接口查询查询清退任务"
)
@PostMapping
(
value
=
"/taskList"
)
public
ResponseEntity
selectRepairTasks
(
@RequestBody
TaskSelectVo
taskSelectVo
){
...
...
@@ -183,73 +141,16 @@ public class RepelQueryController {
return
ResultUtil
.
success
(
PageUtil
.
getPerPage
(
taskSelectVo
.
getPage
(),
taskSelectVo
.
getSize
(),
taskUtils
.
orderByTopDesc
(
taskUserVos
),
taskSelectVo
.
getPageable
()));
}
/**
* 查询退役中办任务
*/
@ApiOperation
(
value
=
"查询退役中办任务"
)
@GetMapping
(
"/outsideTheProvince"
)
public
ResponseEntity
findOutsideTheProvince
()
{
return
ResponseEntity
.
ok
(
repelQueryService
.
findOutsideTheProvince
());
}
// /**
// * 查询清退任务
// * @param
// * @return
// */
// @ApiOperation(value = "查询退役中的装备列表", notes = "可以通过这个接口查询查询清退任务")
// @PostMapping(value = "/findRetired")
// public ResponseEntity selectRepairTasks(@RequestBody ModelAndTypeVo modelAndTypeVo){
//
// return ResponseEntity.ok(repelQueryService.findRetired(modelAndTypeVo));
// }
/**
* 待清退 待退役
*/
@PostMapping
(
value
=
"/toBeRetiredDeviceList"
)
@ApiOperation
(
value
=
"待清退"
,
notes
=
"待清退列表"
)
public
ResponseEntity
clearedList1
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
toBeRetiredDeviceList
(
repelManagementVo
));
}
/**
* 退役中
*/
@PostMapping
(
value
=
"/findRetired"
)
@ApiOperation
(
value
=
"退役中"
,
notes
=
"退役中列表"
)
public
ResponseEntity
clearedList2
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
findRetired
(
repelManagementVo
));
}
/**
* 已清退列表
*/
@PostMapping
(
value
=
"/clearedDeviceList"
)
@ApiOperation
(
value
=
"已清退"
,
notes
=
"已清退列表"
)
public
ResponseEntity
clearedList3
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
clearedDeviceList
(
repelManagementVo
));
}
/**
* 已退役
*/
@PostMapping
(
value
=
"/retiredDeviceList"
)
@ApiOperation
(
value
=
"已退役"
,
notes
=
"已清退列表"
)
public
ResponseEntity
clearedList4
(
@RequestBody
RepelManagementVo
repelManagementVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
retiredDeviceList
(
repelManagementVo
));
}
/**
* 重新入库查询业务详情
*/
@PostMapping
(
value
=
"/againStorage/{taskId}"
)
@ApiOperation
(
value
=
"重新入库查询业务详情"
,
notes
=
"重新入库查询业务详情"
)
public
ResponseEntity
findAgainStorage
(
@PathVariable
Integer
taskId
){
return
ResponseEntity
.
ok
(
againStorageBillService
.
findByid
(
taskId
));
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/AgainStorageBill.java
浏览文件 @
2f7a9b39
...
...
@@ -5,6 +5,7 @@ import com.tykj.dev.misc.base.BaseEntity;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -34,10 +35,18 @@ public class AgainStorageBill extends BaseEntity {
@Column
(
name
=
"dev_ids"
,
columnDefinition
=
"TEXT"
)
private
String
DevIds
;
@ApiModelProperty
(
value
=
"转换类型 0.重新入库 1.转为待报废设备 2.转为待销毁设备 3.转为待退役设备"
)
private
Integer
type
;
@Transient
private
List
<
DeviceLibrary
>
deviceLibraries
;
public
AgainStorageBill
(
String
devIds
)
{
DevIds
=
devIds
;
}
public
AgainStorageBill
(
String
devIds
,
Integer
type
)
{
DevIds
=
devIds
;
this
.
type
=
type
;
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/DeviceRepel.java
浏览文件 @
2f7a9b39
...
...
@@ -92,6 +92,12 @@ public class DeviceRepel extends BaseEntity {
*/
private
String
unitName
;
/**
* 清退类型 0.正常清退 1.退役清退 2.报废清退 3.销毁清退
*/
private
Integer
type
;
/**
* 发起单位id
*/
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/RepelTaskStatistical.java
浏览文件 @
2f7a9b39
...
...
@@ -64,11 +64,10 @@ public class RepelTaskStatistical extends BaseEntity {
private
String
areaName
;
/**
*
提交的型号和数量 json存储modelCount对象
*
本单位需要清退装备数量
*/
@ApiModelProperty
(
value
=
"提交的型号和数量 json存储modelCount对象"
)
@Column
(
name
=
"model_count"
,
columnDefinition
=
"TEXT"
)
private
String
modelCount
;
@ApiModelProperty
(
value
=
"本单位需要清退装备数量"
)
private
Integer
count
;
/**
* 描述
...
...
@@ -93,13 +92,13 @@ public class RepelTaskStatistical extends BaseEntity {
this
.
areaName
=
areaName
;
}
public
RepelTaskStatistical
(
Integer
repelId
,
Integer
fatherTaskId
,
Integer
taskId
,
Integer
taskStatus
,
String
areaName
,
String
modelC
ount
,
String
des
)
{
public
RepelTaskStatistical
(
Integer
repelId
,
Integer
fatherTaskId
,
Integer
taskId
,
Integer
taskStatus
,
String
areaName
,
Integer
c
ount
,
String
des
)
{
this
.
repelId
=
repelId
;
this
.
fatherTaskId
=
fatherTaskId
;
this
.
taskId
=
taskId
;
this
.
taskStatus
=
taskStatus
;
this
.
areaName
=
areaName
;
this
.
modelCount
=
modelC
ount
;
this
.
count
=
c
ount
;
this
.
des
=
des
;
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/SendBackBill.java
deleted
100644 → 0
浏览文件 @
43350ddc
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.springframework.data.annotation.CreatedBy
;
import
org.springframework.data.annotation.CreatedDate
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
import
java.util.Date
;
/**
* entity class for send_back_bill
* 清退账单
*/
@Data
@Entity
@EntityListeners
(
AuditingEntityListener
.
class
)
@SQLDelete
(
sql
=
"update send_back_bill set delete_tag = 1 where id = ?"
)
@Where
(
clause
=
"delete_tag = 0"
)
@ApiModel
(
"清退账单"
)
public
class
SendBackBill
{
/**
* 主键id
*/
@Id
@GeneratedValue
@ApiModelProperty
(
name
=
"主键id"
)
@Column
(
columnDefinition
=
"integer NOT NULL AUTO_INCREMENT"
)
private
Integer
id
;
/**
* 清退标题
*/
@ApiModelProperty
(
value
=
"清退标题"
)
private
String
title
;
/**
* 审核人id
*/
@ApiModelProperty
(
value
=
"审核人id"
)
private
Integer
reviewUserId
;
/**
* 截止时间
*/
@ApiModelProperty
(
value
=
"截止时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
deadLine
;
/**
* 涉及装备id(x作为分隔符),例如x1x2x,意为id为1,2的装备需要退回
*/
@ApiModelProperty
(
value
=
"涉及装备id(x作为分隔符),例如x1x2x,意为id为1,2的装备需要退回"
)
private
String
involeDevice
;
/**
* 创建用户id
*/
@CreatedBy
@ApiModelProperty
(
value
=
"创建用户id"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@CreatedDate
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
/**
* 更新用户id
*/
@LastModifiedBy
@ApiModelProperty
(
value
=
"更新用户id"
)
private
Integer
updateUserId
;
/**
* 更新时间
*/
@LastModifiedDate
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
=
new
Date
();
/**
* 删除标记(0:未删除,1:已删除)
*/
@ApiModelProperty
(
value
=
"删除标记(0:未删除,1:已删除)"
)
private
Integer
deleteTag
=
0
;
@ApiModelProperty
(
value
=
"记录初始清退单"
)
private
String
sendBackStatistical
;
@ApiModelProperty
(
value
=
"异常装备说明"
)
private
String
exceptionDes
;
@ApiModelProperty
(
value
=
"出库单详情"
)
private
String
sendBackOut
;
@ApiModelProperty
(
value
=
"出库单表格"
)
private
String
sendBackOutForm
;
@ApiModelProperty
(
value
=
"清退单id"
)
private
Integer
formId
;
@ApiModelProperty
(
value
=
"是否完成"
)
private
Integer
isComplete
=
0
;
@ApiModelProperty
(
value
=
"区块链RID"
,
name
=
"recordId"
)
private
String
recordId
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/ListVo.java
deleted
100644 → 0
浏览文件 @
43350ddc
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
com.tykj.dev.device.sendback.entity.domain.SendBackBillDetail
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
java.util.List
;
/**
* <h4>Description : </h4>
*
* @Author czq
* @Date 2020-08-19 19:09
* @Version 1.0
*/
@Data
@AllArgsConstructor
@ApiModel
(
"返回查询列表"
)
public
class
ListVo
{
private
long
count
;
private
List
<
SendBackBillDetail
>
sendBackBillDetailEntities
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/TransitionOfLifeVo.java
0 → 100644
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName TransitionOfLifeVo.java
* @Description TODO
* @createTime 2021年03月29日 14:30:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"装备生命状态转换vo"
)
public
class
TransitionOfLifeVo
{
@ApiModelProperty
(
value
=
"相关装备的id集合"
,
name
=
"ids"
)
private
List
<
Integer
>
ids
;
@ApiModelProperty
(
value
=
"转换类型 0.重新入库 1.转为待报废设备 2.转为待销毁设备 3.转为待退役设备"
)
private
Integer
type
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/repository/SendBackBillDao.java
deleted
100644 → 0
浏览文件 @
43350ddc
package
com
.
tykj
.
dev
.
device
.
sendback
.
repository
;
import
com.tykj.dev.device.sendback.entity.domain.SendBackBill
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
/**
* <h4>Description : </h4>
*
* @Author czq
* @Date 2020-08-16 11:54
* @Version 1.0
*/
public
interface
SendBackBillDao
extends
JpaRepository
<
SendBackBill
,
Integer
>,
JpaSpecificationExecutor
<
SendBackBill
>
{
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/repository/SendBackBillDetailDao.java
deleted
100644 → 0
浏览文件 @
43350ddc
package
com
.
tykj
.
dev
.
device
.
sendback
.
repository
;
import
com.tykj.dev.device.sendback.entity.domain.SendBackBillDetail
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
/**
* <h4>Description : </h4>
*
* @Author czq
* @Date 2020-08-16 12:01
* @Version 1.0
*/
public
interface
SendBackBillDetailDao
extends
JpaRepository
<
SendBackBillDetail
,
Integer
>,
JpaSpecificationExecutor
<
SendBackBillDetail
>
{
SendBackBillDetail
findSendBackBillDetailById
(
Integer
id
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/AgainStorageBillService.java
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
;
import
com.tykj.dev.device.sendback.entity.domain.AgainStorageBill
;
import
com.tykj.dev.device.sendback.entity.vo.TransitionOfLifeVo
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
java.util.List
;
...
...
@@ -15,9 +16,9 @@ import java.util.List;
public
interface
AgainStorageBillService
{
/**
* 装备重新入库 改变装备的生命状态
* @param
ids 装备id
* @param
transitionOfLifeVo vo
*/
void
againPutInStorage
(
List
<
Integer
>
ids
,
SecurityUser
securityUser
);
void
againPutInStorage
(
TransitionOfLifeVo
transitionOfLifeVo
,
SecurityUser
securityUser
);
AgainStorageBill
findByid
(
Integer
taskId
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelBusinessService.java
浏览文件 @
2f7a9b39
...
...
@@ -64,18 +64,17 @@ public interface RepelBusinessService {
/**
* 上级清退装备入库
* todo
*/
void
storageDeviceRepel
(
Integer
taskId
,
StorageDeviceRepel
storageDeviceRepel
);
/**
* 本级装备待清退提交
* 本级装备待清退提交
(需要根据主业务的type 给涉及的装备装备给不同的状态)
*/
void
oneselfRepel
(
Integer
taskId
,
StorageDeviceRepel
storageDeviceRepel
,
Integer
userId
);
/**
* 省直属任务等待上传
* 省直属任务等待上传
(需要根据主业务的type 给涉及的装备装备给不同的状态)
*/
void
provinceDirectlyUnder
(
Integer
taskId
,
SecurityUser
securityUser
);
...
...
@@ -89,23 +88,9 @@ public interface RepelBusinessService {
*/
void
cityRepelEnd
(
Integer
taskId
);
/**
* 生成省中办退役的任务
* @param userId 用户id
* @param orderOutData 出库对象
*/
DeviceRepelDetail
provinceSendOutSuperior
(
Integer
userId
,
OrderOutData
orderOutData
);
/**
* 上传中办的回执单
* @param taskId 任务ID
* @param storageDeviceRepel 单据 和装备id对象
*/
void
receiptSingle
(
Integer
taskId
,
StorageDeviceRepel
storageDeviceRepel
);
/**
* 出库等待上传回执单
* 出库等待上传回执单
(需要根据主业务的type 给涉及的装备装备给不同的状态)
*/
void
receipts
(
StorageDeviceRepel
storageDeviceRepel
);
...
...
@@ -114,13 +99,6 @@ public interface RepelBusinessService {
*/
void
addSendBUser
(
StorageDeviceRepel
storageDeviceRepel
);
/**
* 装备重新入库 改变装备的生命状态
* @param ids 装备id
*/
void
againPutInStorage
(
List
<
Integer
>
ids
);
/**
* 省直接从在库到待退役
* 装备装备 在库-》待退役
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
2f7a9b39
...
...
@@ -96,28 +96,12 @@ public interface RepelQueryService {
*/
List
<
DeviceRepelDetail
>
getList
(
SecurityUser
securityUser
);
/**
* 查询上级
*/
List
<
TaskBto
>
findOutsideTheProvince
();
/**
* 省自己装备清退列表查询的接口
*/
DeviceChooseRepel
findDeviceChooseRepel1
(
List
<
Integer
>
fielding
,
Integer
unitId
);
/**
* 查看退役中装备列表
* @param repelManagementVo
* @return
*/
PagingVo
findRetired
(
RepelManagementVo
repelManagementVo
);
/**
* 查看待退役列表装备
*/
PagingVo
toBeRetiredDeviceList
(
RepelManagementVo
repelManagementVo
);
/**
...
...
@@ -125,9 +109,10 @@ public interface RepelQueryService {
*/
PagingVo
clearedDeviceList
(
RepelManagementVo
repelManagementVo
);
/**
* 查看
已退役
装备列表
* 查看
待清退
装备列表
*/
PagingVo
retiredDeviceList
(
RepelManagementVo
repelManagementVo
);
PagingVo
repelDeviceList
(
RepelManagementVo
repelManagementVo
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/AgainStorageBillServiceImpl.java
浏览文件 @
2f7a9b39
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
.
impl
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.sendback.entity.domain.AgainStorageBill
;
import
com.tykj.dev.device.sendback.entity.vo.TransitionOfLifeVo
;
import
com.tykj.dev.device.sendback.repository.AgainStorageBillDao
;
import
com.tykj.dev.device.sendback.service.AgainStorageBillService
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.read.service.MessageService
;
...
...
@@ -17,9 +18,10 @@ import com.tykj.dev.device.user.subject.entity.SecurityUser;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.DeviceLifeStatus
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
...
...
@@ -41,6 +43,7 @@ import java.util.stream.Collectors;
* @createTime 2021年03月16日 17:07:00
*/
@Service
@Slf4j
public
class
AgainStorageBillServiceImpl
implements
AgainStorageBillService
{
@Autowired
DeviceLibraryDao
deviceLibraryDao
;
...
...
@@ -60,16 +63,38 @@ public class AgainStorageBillServiceImpl implements AgainStorageBillService {
UserService
userService
;
@Override
public
void
againPutInStorage
(
List
<
Integer
>
ids
,
SecurityUser
securityUser
)
{
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
ids
);
deviceLibraries
.
forEach
(
deviceLibrary
->
deviceLibrary
.
setLifeStatus
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
);
deviceLibraryDao
.
saveAll
(
deviceLibraries
);
AgainStorageBill
againStorageBill
=
againStorageBillDao
.
save
(
new
AgainStorageBill
(
StringUtils
.
ListToString
(
ids
)));
public
void
againPutInStorage
(
TransitionOfLifeVo
transitionOfLifeVo
,
SecurityUser
securityUser
)
{
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
transitionOfLifeVo
.
getIds
());
AgainStorageBill
againStorageBill
=
againStorageBillDao
.
save
(
new
AgainStorageBill
(
StringUtils
.
ListToString
(
transitionOfLifeVo
.
getIds
()),
transitionOfLifeVo
.
getType
()));
TaskBto
taskBto
=
againStorageTask
(
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
againStorageBill
.
getId
(),
securityUser
.
getCurrentUserInfo
().
getUserId
());
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
securityUser
.
getUsername
()+
"发起了重新入库"
,
gainThisUser
(
securityUser
.
getCurrentUserInfo
().
getUserId
(),
securityUser
.
getCurrentUserInfo
().
getUnitsId
())));
devLogAdd
(
deviceLibraries
,
"重新入库"
,
securityUser
.
getCurrentUserInfo
().
getUserId
());
String
typeName
;
switch
(
transitionOfLifeVo
.
getType
()){
case
0
:
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
,
transitionOfLifeVo
.
getIds
());
typeName
=
"重新入库"
;
break
;
case
1
:
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
TO_BE_SCRAPPED
.
id
,
transitionOfLifeVo
.
getIds
());
typeName
=
"转为待报废设备"
;
break
;
case
2
:
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
TO_BE_DESTROYED
.
id
,
transitionOfLifeVo
.
getIds
());
typeName
=
"转为待销毁设备"
;
break
;
case
3
:
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
REPEL
.
id
,
transitionOfLifeVo
.
getIds
());
typeName
=
"转为待退役设备"
;
break
;
default
:
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"[生命状态转换] 为找到对应的type"
));
}
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
securityUser
.
getUsername
()+
"执行了"
+
typeName
,
gainThisUser
(
securityUser
.
getCurrentUserInfo
().
getUserId
(),
securityUser
.
getCurrentUserInfo
().
getUnitsId
())));
devLogAdd
(
deviceLibraries
,
typeName
,
securityUser
.
getCurrentUserInfo
().
getUserId
());
}
@Override
...
...
@@ -117,6 +142,7 @@ public class AgainStorageBillServiceImpl implements AgainStorageBillService {
}
);
log
.
info
(
"调用异步添加装备日志"
);
CompletableFuture
.
runAsync
(()
->
{
deviceLogService
.
saveAllLog
(
logDtos
);
});
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/DeviceRepelDetailServiceImpl.java
浏览文件 @
2f7a9b39
...
...
@@ -6,8 +6,8 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.repository.DeviceRepelDetailDao
;
import
com.tykj.dev.device.sendback.service.DeviceRepelDetailService
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/DeviceRepelServiceImpl.java
浏览文件 @
2f7a9b39
...
...
@@ -4,10 +4,10 @@ import com.tykj.dev.device.file.service.FilesUtil;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepel
;
import
com.tykj.dev.device.sendback.repository.DeviceRepelDao
;
import
com.tykj.dev.device.sendback.service.DeviceRepelService
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
2f7a9b39
差异被折叠。
点击展开。
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
2f7a9b39
差异被折叠。
点击展开。
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelTaskStatisticalServiceImpl.java
浏览文件 @
2f7a9b39
...
...
@@ -32,17 +32,7 @@ public class RepelTaskStatisticalServiceImpl implements RepelTaskStatisticalServ
@Override
public
List
<
RepelTaskStatistical
>
findAllRepelTaskStatistical
(
Integer
fatherTaskId
,
Integer
repelId
)
{
List
<
RepelTaskStatistical
>
list
=
repelTaskStatisticalDao
.
findAllByFatherTaskIdAndAndRepelId
(
fatherTaskId
,
repelId
);
list
.
forEach
(
repelTaskStatistical
->{
if
(
repelTaskStatistical
.
getModelCount
()!=
null
){
repelTaskStatistical
.
setModelCountList
(
JacksonUtil
.
readValue
(
repelTaskStatistical
.
getModelCount
(),
new
TypeReference
<
List
<
ModelCount
>>()
{}));
}
}
);
return
list
;
return
repelTaskStatisticalDao
.
findAllByFatherTaskIdAndAndRepelId
(
fatherTaskId
,
repelId
);
}
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
2f7a9b39
...
...
@@ -573,7 +573,10 @@ public class TaskServiceImpl implements TaskService {
Integer
userId3
=
userIds
.
get
(
taskUserVo
.
getCurrentPoint
());
//当前指针userId大于0,待办人即当前id
if
(
userId3
>
0
)
{
taskUserVo
.
setProcessingUser
(
userCache
.
findById
(
userId3
).
getName
());
User
user
=
userCache
.
findById
(
userId3
);
if
(
user
!=
null
){
taskUserVo
.
setProcessingUser
(
userCache
.
findById
(
userId3
).
getName
());
}
}
//当前指针userId等于0,待办人为所属单位下所有用户
else
if
(
userId3
==
0
&&
taskUserVo
.
getOwnUnit
()
!=
null
)
{
...
...
dev-task/src/main/java/com/tykj/dev/device/task/subject/vo/TaskSelectVo.java
浏览文件 @
2f7a9b39
...
...
@@ -14,7 +14,6 @@ import java.util.List;
@Data
@ApiModel
(
"待办任务查询类"
)
public
class
TaskSelectVo
extends
CustomPage
{
@ApiModelProperty
(
value
=
"模糊查询关键字"
,
example
=
"测试"
)
public
String
content
;
@ApiModelProperty
(
value
=
"发起时间"
,
example
=
"2020-10-10 01:10:10"
)
...
...
dev-taskselect/src/main/java/com/tykj/dev/device/taskselect/controller/TaskSelectController.java
浏览文件 @
2f7a9b39
...
...
@@ -27,10 +27,6 @@ import com.tykj.dev.device.repair.subject.domin.RepairBackBill;
import
com.tykj.dev.device.repair.subject.domin.RepairBill
;
import
com.tykj.dev.device.selfcheck.service.SelfCheckBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.sendback.entity.domain.SendBackBill
;
import
com.tykj.dev.device.sendback.entity.domain.SendBackBillDetail
;
import
com.tykj.dev.device.sendback.repository.SendBackBillDao
;
import
com.tykj.dev.device.sendback.repository.SendBackBillDetailDao
;
import
com.tykj.dev.device.storage.service.StorageBillService
;
import
com.tykj.dev.device.storage.subject.domin.StorageBill
;
import
com.tykj.dev.device.task.repository.TaskDao
;
...
...
@@ -105,11 +101,6 @@ public class TaskSelectController {
@Autowired
private
RepairBackBillService
repairBackBillService
;
@Autowired
private
SendBackBillDao
sendBackBillDao
;
@Autowired
private
SendBackBillDetailDao
sendBackBillDetailDao
;
@Autowired
private
Snowflake
snowflake
;
...
...
@@ -464,15 +455,6 @@ public class TaskSelectController {
}
case
16
:
if
(
taskBto
.
getBillId
()
>
0
)
{
SendBackBill
sendBackBill
=
sendBackBillDao
.
getOne
(
taskBto
.
getBillId
());
SendBackBillDetail
sendBackBillDetail
=
sendBackBillDetailDao
.
findSendBackBillDetailById
(
sendBackBill
.
getFormId
());
if
(
signatureSaveVo
.
getType
()
==
1
)
{
sendBackBillDetail
.
setLeftSignatureId
(
signatureSaveVo
.
getSignatureId
());
}
if
(
signatureSaveVo
.
getType
()
==
2
)
{
sendBackBillDetail
.
setRightSignatureId
(
signatureSaveVo
.
getSignatureId
());
}
sendBackBillDetailDao
.
save
(
sendBackBillDetail
);
return
ResponseEntity
.
ok
(
"添加成功"
);
}
else
{
throw
new
ApiException
(
ResultUtil
.
failed
(
"当前task不存在账单id"
));
...
...
dev-union/pom.xml
浏览文件 @
2f7a9b39
...
...
@@ -382,6 +382,17 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-decommissioning
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
union
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-statistical
</artifactId>
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/entity/Groups.java
浏览文件 @
2f7a9b39
...
...
@@ -44,6 +44,12 @@ public class Groups {
*/
private
String
memberId
;
@Transient
private
List
<
Integer
>
members
;
@Transient
private
List
<
Units
>
unitsList
;
}
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/GroupServiceImpl.java
浏览文件 @
2f7a9b39
...
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.user.subject.service.impl;
import
com.tykj.dev.device.user.subject.dao.GroupDao
;
import
com.tykj.dev.device.user.subject.entity.Groups
;
import
com.tykj.dev.device.user.subject.service.GroupService
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.units.qual.A
;
...
...
@@ -26,6 +27,8 @@ import java.util.stream.Collectors;
public
class
GroupServiceImpl
implements
GroupService
{
@Autowired
GroupDao
groupDao
;
@Autowired
UnitsService
unitsService
;
@Override
public
void
saveGroup
(
Groups
group
)
{
StringBuffer
stringBuffer
=
new
StringBuffer
();
...
...
@@ -38,8 +41,8 @@ public class GroupServiceImpl implements GroupService {
@Override
public
List
<
Groups
>
findAll
(
Integer
type
)
{
List
<
Groups
>
list
=
groupDao
.
findAllByType
(
type
);
list
.
forEach
(
groups
->
groups
.
set
Members
(
integerList
(
groups
.
getMemberId
(
))));
List
<
Groups
>
list
=
groupDao
.
findAllByType
(
type
);
list
.
forEach
(
groups
->
groups
.
set
UnitsList
(
unitsService
.
findAllByIdIn
(
integerList
(
groups
.
getMemberId
()
))));
return
list
;
}
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UnitsServiceImpl.java
浏览文件 @
2f7a9b39
...
...
@@ -60,41 +60,6 @@ public class UnitsServiceImpl implements UnitsService {
@Override
public
List
<
AreaVo
>
findListAreaUnitsVo
(
SecurityUser
securityUser
)
{
// List<AreaVo> areaVos=new ArrayList<>();
// //查询当前登入用户所属单位 的区域
// log.info("数据:"+securityUser.getUsername());
// Integer areaId=securityUser.getCurrentUserInfo().getUnits().getAreaId();
//
// Area belongsArea= areaDao.findById(areaId).get();
// if (belongsArea.getType()==1){
// int i=10000;
// AreaVo areaVo = belongsArea.toVo();
// areaVo.setFrontEnd(i++);
// List<UnitsVo> unitsList = unitsDao.findAllByAreaId(belongsArea.getId()).stream().map(Units::toVo).collect(Collectors.toList());
// for (UnitsVo unitsVo : unitsList) {
// unitsVo.setFrontEnd(i++);
// }
// areaVo.setUnits(unitsList);
// areaVos.add(areaVo);
// }
// List<Area> areas= areaDao.findAllByFatherId(areaId);
// if (areas.size()!=0) {
// areaVos=provinceAndCity(belongsArea,areas,areaVos);
// }else {
// int i=0;
// AreaVo areaVo = belongsArea.toVo();
// areaVo.setFrontEnd(i++);
// List<UnitsVo> unitsList = unitsDao.findAllByAreaId(belongsArea.getId()).stream().map(Units::toVo).collect(Collectors.toList());
// for (UnitsVo unitsVo : unitsList) {
// unitsVo.setFrontEnd(i++);
// }
// areaVo.setUnits(unitsList);
// areaVos.add(areaVo);
// }
// //查询区域下所有的区域
// //根据区域查看
//
// return areaVos;
return
new
ArrayList
<>();
}
...
...
@@ -122,9 +87,7 @@ public class UnitsServiceImpl implements UnitsService {
leftNavigationList
.
add
(
leftNavigation
);
});
}
else
if
(
thisArea
.
getType
()==
2
){
areas
.
forEach
(
area
->
{
leftNavigationList
.
addAll
(
unitsDao
.
findAllByAreaId
(
area
.
getId
()).
stream
().
map
(
Units:
:
toLeftNavigation
).
sorted
(
Comparator
.
comparing
(
LeftNavigation:
:
getOrder
,
Comparator
.
nullsLast
(
Integer:
:
compareTo
))).
collect
(
Collectors
.
toList
()));
});
areas
.
forEach
(
area
->
leftNavigationList
.
addAll
(
unitsDao
.
findAllByAreaId
(
area
.
getId
()).
stream
().
map
(
Units:
:
toLeftNavigation
).
sorted
(
Comparator
.
comparing
(
LeftNavigation:
:
getOrder
,
Comparator
.
nullsLast
(
Integer:
:
compareTo
))).
collect
(
Collectors
.
toList
())));
}
else
{
return
leftNavigationList
;
}
...
...
@@ -190,10 +153,10 @@ public class UnitsServiceImpl implements UnitsService {
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
units
.
getAreaId
()).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Units
>
units1
=
unitsDao
.
findAllByAreaIdIn
(
areaIds
);
if
(
units
.
getLevel
()==
1
){
//
units1.add(units);
units1
.
add
(
units
);
units1
.
addAll
(
unitsDao
.
findAllByType
(
2
));
}
return
units1
.
stream
().
sorted
(
Comparator
.
comparing
(
Units:
:
getShowOrder
)).
collect
(
Collectors
.
toList
());
return
units1
.
stream
().
sorted
(
Comparator
.
comparing
(
Units:
:
getShowOrder
)).
collect
(
Collectors
.
toList
());
}
@Override
...
...
@@ -233,28 +196,10 @@ public class UnitsServiceImpl implements UnitsService {
@Override
public
List
<
Units
>
findByUserIdUnitsTrainListVo
(
Integer
unitsId
)
{
// List<Units> province=new ArrayList<>();
// List<Units> city=new ArrayList<>();
// List<Units> county=new ArrayList<>();
Optional
<
Units
>
unitsOptional
=
unitsDao
.
findById
(
unitsId
);
if
(
unitsOptional
.
isPresent
())
{
Units
units
=
unitsOptional
.
get
();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
units
.
getAreaId
()).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
// if (areaIds.size() != 0) {
// unitsDao.findAllByAreaIdIn(areaIds).forEach(
// units1 -> {
// if (units1.getLevel()==1){
// province.add(units1);
// }else if (units1.getLevel()==2){
// city.add(units1);
// }else if (units1.getLevel()==3){
// county.add(units1);
// }else {
// log.info("[清退] 没有找到对应的单位id");
// }
// }
// );
// }
return
unitsDao
.
findAllByAreaIdIn
(
areaIds
);
}
else
{
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"单位没有查到"
));
...
...
@@ -314,6 +259,7 @@ public class UnitsServiceImpl implements UnitsService {
return
unitsList
;
}
@Override
public
List
<
Units
>
findSubordinateList
(
Integer
unitsId
)
{
Units
units
=
unitsDao
.
findById
(
unitsId
).
get
();
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
2f7a9b39
...
...
@@ -19,8 +19,6 @@ import com.tykj.dev.device.repair.subject.domin.RepairDetail;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.scrap.repository.ScrapBillDao
;
import
com.tykj.dev.device.scrap.subject.domin.ScrapBill
;
import
com.tykj.dev.device.sendback.entity.domain.SendBackBillDetail
;
import
com.tykj.dev.device.sendback.repository.SendBackBillDetailDao
;
import
com.tykj.dev.device.storage.repository.StorageBillDao
;
import
com.tykj.dev.device.storage.subject.domin.StorageBill
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
...
...
@@ -53,8 +51,7 @@ import static java.util.stream.Collectors.toList;
@Service
public
class
DeviceUseReportServiceImpl
implements
DeviceUseReportService
{
@Autowired
SendBackBillDetailDao
sendBackBillDetailDao
;
@Autowired
private
DeviceUseReportDao
deviceUseReportDao
;
@Autowired
...
...
@@ -227,15 +224,15 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
sendBackStatusList
.
add
(
4
);
sendBackStatusList
.
add
(
6
);
//筛选出清退账单
List
<
SendBackBillDetail
>
sendBackBillDetailEntities
=
sendBackBillDetailDao
.
findAll
().
stream
()
.
filter
(
sendBackBillDetailEntity
->
sendBackStatusList
.
contains
(
sendBackBillDetailEntity
.
getSendBackStatus
())
&&
sendBackBillDetailEntity
.
getSendUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
sendBackBillDetailEntity
.
getSendTime
().
after
(
date
)
&&
sendBackBillDetailEntity
.
getSendTime
().
before
(
date2
))
.
collect
(
toList
());
//累加清退数量
if
(
sendBackBillDetailEntities
.
size
()
>
0
)
{
for
(
SendBackBillDetail
s
:
sendBackBillDetailEntities
)
{
sendBackNum
=
sendBackNum
+
s
.
getSendedCount
();
}
}
//
List<SendBackBillDetail> sendBackBillDetailEntities = sendBackBillDetailDao.findAll().stream()
//
.filter(sendBackBillDetailEntity -> sendBackStatusList.contains(sendBackBillDetailEntity.getSendBackStatus()) && sendBackBillDetailEntity.getSendUnit().equals(userUtils.getCurrentUserUnitName()) && sendBackBillDetailEntity.getSendTime().after(date) && sendBackBillDetailEntity.getSendTime().before(date2))
//
.collect(toList());
//
//累加清退数量
//
if (sendBackBillDetailEntities.size() > 0) {
//
for (SendBackBillDetail s : sendBackBillDetailEntities) {
//
sendBackNum = sendBackNum + s.getSendedCount();
//
}
//
}
//维修数量
List
<
RepairDetail
>
repairDetails
=
repairDetailDao
.
findAll
().
stream
()
.
filter
(
repairDetail
->
repairDetail
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
repairDetail
.
getRepairStatus
()
!=
3
&&
repairDetail
.
getCreateTime
().
after
(
date
)
&&
repairDetail
.
getCreateTime
().
before
(
date2
))
...
...
pom.xml
浏览文件 @
2f7a9b39
...
...
@@ -45,6 +45,7 @@
<module>
dev-statistical
</module>
<module>
dev-es
</module>
<module>
dev-loss
</module>
<module>
dev-decommissioning
</module>
</modules>
<properties>
...
...
@@ -221,6 +222,11 @@
<artifactId>
dev-usereport
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-decommissioning
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论