Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
7ab068f7
提交
7ab068f7
authored
4月 26, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[用户 退役 报废 销毁] 手动发起的 调用申请任务接口 看是否为申请的装备 并查看申请任务是否可以办结
上级
57945104
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
146 行增加
和
94 行删除
+146
-94
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+1
-1
DeviceApplyBillServiceImpl.java
...device/apply/service/impl/DeviceApplyBillServiceImpl.java
+1
-1
pom.xml
dev-decommissioning/pom.xml
+5
-0
DeviceDecommissioningDetail.java
...e/decommissioning/entity/DeviceDecommissioningDetail.java
+0
-2
DeviceDecommissioningBusinessServiceImpl.java
...ervice/impl/DeviceDecommissioningBusinessServiceImpl.java
+13
-2
pom.xml
dev-destroy/pom.xml
+4
-0
DeviceDestroyBusinessServiceImpl.java
...estroy/service/Impl/DeviceDestroyBusinessServiceImpl.java
+7
-0
pom.xml
dev-scrap/pom.xml
+5
-0
ScrapBusinessServiceImpl.java
...v/device/scrap/service/impl/ScrapBusinessServiceImpl.java
+6
-0
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+3
-3
DeviceRepelDetail.java
.../dev/device/sendback/entity/domain/DeviceRepelDetail.java
+4
-55
RepelDetailSelectVo.java
...kj/dev/device/sendback/entity/vo/RepelDetailSelectVo.java
+32
-0
DeviceRepelDetailService.java
...dev/device/sendback/service/DeviceRepelDetailService.java
+5
-0
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+3
-1
DeviceRepelDetailServiceImpl.java
...e/sendback/service/impl/DeviceRepelDetailServiceImpl.java
+43
-0
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+4
-2
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+2
-25
UnitsDao.java
...n/java/com/tykj/dev/device/user/subject/dao/UnitsDao.java
+2
-0
Units.java
...n/java/com/tykj/dev/device/user/subject/entity/Units.java
+2
-2
UnitsServiceImpl.java
...ev/device/user/subject/service/impl/UnitsServiceImpl.java
+4
-0
没有找到文件。
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
7ab068f7
...
...
@@ -457,7 +457,7 @@ public class DeviceApplyController {
seqs
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
r
.
getSeqInterval
()));
}
}
deviceLibraryDao
.
upDateSeqNumbersApplyTaskId
(
deviceApplyBill1
.
getId
(),
seqs
);
deviceLibraryDao
.
upDateSeqNumbersApplyTaskId
(
taskBto
.
getId
(),
seqs
);
}
return
ResponseEntity
.
ok
(
"ok"
);
}
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/service/impl/DeviceApplyBillServiceImpl.java
浏览文件 @
7ab068f7
...
...
@@ -119,7 +119,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
DeviceSeqUtil
.
selectDeviceSeqs
(
s
.
getSeqNumber
()).
forEach
(
s1
->
deviceLibraries
.
add
(
seqMap
.
get
(
s1
)));
}
}
Map
<
Integer
,
List
<
DeviceLibrary
>>
taskIdMap
=
deviceLibraries
.
stream
().
collect
(
groupingBy
(
DeviceLibrary:
:
getApplyTaskId
));
Map
<
Integer
,
List
<
DeviceLibrary
>>
taskIdMap
=
deviceLibraries
.
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getApplyTaskId
()!=
null
).
collect
(
groupingBy
(
DeviceLibrary:
:
getApplyTaskId
));
for
(
Integer
taskId:
taskIdMap
.
keySet
())
{
Map
<
Integer
,
List
<
DeviceLibrary
>>
map
=
taskIdMap
.
get
(
taskId
).
stream
().
collect
(
groupingBy
(
DeviceLibrary:
:
getPackingId
));
TaskBto
taskBto
=
taskMap
.
get
(
taskId
).
parse2Bto
();
...
...
dev-decommissioning/pom.xml
浏览文件 @
7ab068f7
...
...
@@ -29,6 +29,11 @@
<artifactId>
misc
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-apply
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-file
</artifactId>
...
...
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/entity/DeviceDecommissioningDetail.java
浏览文件 @
7ab068f7
...
...
@@ -184,8 +184,6 @@ public class DeviceDecommissioningDetail extends BaseEntity {
@Column
(
name
=
"auditing_feedback"
,
columnDefinition
=
"TEXT"
)
private
String
auditingFeedback
;
@ApiModelProperty
(
value
=
"清退状态"
,
name
=
"1.清退中,2.清退完成"
)
private
Integer
repelStatus
;
@ApiModelProperty
(
value
=
"批复文号文件"
)
@Column
(
name
=
"reply_files"
,
columnDefinition
=
"TEXT"
)
...
...
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/impl/DeviceDecommissioningBusinessServiceImpl.java
浏览文件 @
7ab068f7
...
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.decommissioning.service.impl;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.apply.service.DeviceApplyBillService
;
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
;
...
...
@@ -83,6 +84,8 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
@Autowired
MessageService
messageService
;
@Autowired
DeviceApplyBillService
deviceApplyBillService
;
@Override
public
TaskBto
saveDeviceDecommissioningDraft
(
Integer
userId
,
DecommissioningOrderOutData
decommissioningOrderOutData
)
{
...
...
@@ -162,6 +165,7 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
deviceDecommissioningDetail
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()
+
"QT"
+
deviceDecommissioningDetail
.
getId
());
deviceDecommissioningDetail
.
setDecommissioningStatus
(
taskBto
.
getBillStatus
());
}
deviceDecommissioningDetail
.
setReplyFiles
(
FilesUtil
.
stringFileToList
(
decommissioningOrderOutData
.
getReplyFileList
()));
deviceDecommissioningDetail
.
setApplyFiles
(
FilesUtil
.
stringFileToList
(
decommissioningOrderOutData
.
getApplyFileList
()));
deviceDecommissioningDetail
.
setDeviceIds
(
StringUtils
.
ListToString
(
decommissioningOrderOutData
.
getDevIds
()));
...
...
@@ -175,8 +179,10 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
if
(
decommissioningOrderOutData
.
getApplyId
()!=
null
)
{
Optional
<
Task
>
billIdAndBusinessTypeNotBillStatus
=
taskService
.
findBillIdAndBusinessTypeNotBillStatus
(
decommissioningOrderOutData
.
getApplyId
(),
BusinessEnum
.
APPLY
.
id
);
taskService
.
moveToEnd
(
billIdAndBusinessTypeNotBillStatus
.
get
().
parse2Bto
());
}
else
{
//2:退役申请,3:报废申请,4:销毁申请
deviceApplyBillService
.
updateCompleteNum
(
2
,
scriptSaveVos
);
}
return
deviceDecommissioningDetail
;
}
...
...
@@ -211,9 +217,14 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
if
(
storageDeviceDevommissiong
.
getUserAName
()!=
null
)
{
deviceDecommissioningDetail
.
setReceiveUserA
(
storageDeviceDevommissiong
.
getUserAName
());
}
if
(
storageDeviceDevommissiong
.
getSenderId
()!=
null
){
deviceDecommissioningDetail
.
setSendUserbId
(
storageDeviceDevommissiong
.
getSenderId
());
}
if
(
storageDeviceDevommissiong
.
getSenderName
()!=
null
){
deviceDecommissioningDetail
.
setSenderUserB
(
storageDeviceDevommissiong
.
getSenderName
());
}
taskBto
=
taskService
.
moveToEnd
(
taskBto
);
deviceDecommissioningDetail
.
setDecommissioningStatus
(
taskBto
.
getBillStatus
());
deviceDecommissioningDetail
.
setRepelStatus
(
2
);
deviceLibraryDao
.
upDateSeqNumbersLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
RETIRE
.
id
,
deviceDecommissioningDetail
.
getReceiveUnit
(),
0
,
seqNumbers
);
deviceDecommissioningDetailService
.
saveDeviceDecommissioningDetail
(
deviceDecommissioningDetail
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"退役任务回执单据上传成功任务结束"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
...
...
dev-destroy/pom.xml
浏览文件 @
7ab068f7
...
...
@@ -16,6 +16,10 @@
<groupId>
com.tykj
</groupId>
<artifactId>
dev-library
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-apply
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-task
</artifactId>
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/service/Impl/DeviceDestroyBusinessServiceImpl.java
浏览文件 @
7ab068f7
package
com
.
tykj
.
dev
.
device
.
destroy
.
service
.
Impl
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.apply.service.DeviceApplyBillService
;
import
com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill
;
import
com.tykj.dev.device.destroy.entity.vo.DeviceDestroyBillVo
;
import
com.tykj.dev.device.destroy.service.DeviceDestroyBillService
;
...
...
@@ -66,6 +67,9 @@ public class DeviceDestroyBusinessServiceImpl implements DeviceDestroyBusinessSe
@Autowired
UserService
userService
;
@Autowired
DeviceApplyBillService
deviceApplyBillService
;
@Override
public
TaskBto
saveDeviceDestroyBill
(
SecurityUser
securityUser
,
DeviceDestroyBillVo
deviceDestroyBillVo
)
{
...
...
@@ -131,6 +135,9 @@ public class DeviceDestroyBusinessServiceImpl implements DeviceDestroyBusinessSe
if
(
deviceDestroyBillVo
.
getApplyId
()!=
null
)
{
Optional
<
Task
>
billIdAndBusinessTypeNotBillStatus
=
taskService
.
findBillIdAndBusinessTypeNotBillStatus
(
deviceDestroyBillVo
.
getApplyId
(),
BusinessEnum
.
APPLY
.
id
);
taskService
.
moveToEnd
(
billIdAndBusinessTypeNotBillStatus
.
get
().
parse2Bto
());
}
else
{
//2:退役申请,3:报废申请,4:销毁申请
deviceApplyBillService
.
updateCompleteNum
(
4
,
deviceDestroyBillVo
.
getScripts
());
}
return
deviceDestroyBill
;
}
...
...
dev-scrap/pom.xml
浏览文件 @
7ab068f7
...
...
@@ -27,6 +27,11 @@
<groupId>
com.tykj.dev
</groupId>
<artifactId>
blockcha
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-apply
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-task
</artifactId>
...
...
dev-scrap/src/main/java/com/tykj/dev/device/scrap/service/impl/ScrapBusinessServiceImpl.java
浏览文件 @
7ab068f7
...
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.scrap.service.impl;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.apply.service.DeviceApplyBillService
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
...
...
@@ -54,6 +55,9 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
@Autowired
UserService
userService
;
@Autowired
DeviceApplyBillService
deviceApplyBillService
;
@Autowired
UnitsService
unitsService
;
...
...
@@ -168,6 +172,8 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
if
(
scrapOrderOutData
.
getApplyId
()!=
null
)
{
Optional
<
Task
>
billIdAndBusinessTypeNotBillStatus
=
taskService
.
findBillIdAndBusinessTypeNotBillStatus
(
scrapOrderOutData
.
getApplyId
(),
BusinessEnum
.
APPLY
.
id
);
taskService
.
moveToEnd
(
billIdAndBusinessTypeNotBillStatus
.
get
().
parse2Bto
());
}
else
{
deviceApplyBillService
.
updateCompleteNum
(
3
,
scriptSaveVos
);
}
return
scrap
;
}
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
7ab068f7
...
...
@@ -132,9 +132,9 @@ public class RepelQueryController {
}
@ApiOperation
(
value
=
"查询清退单列表"
)
@
Ge
tMapping
(
"/getList"
)
public
ResponseEntity
getList
(
@
ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
return
ResponseEntity
.
ok
(
repelQueryService
.
getList
(
securityUser
));
@
Pos
tMapping
(
"/getList"
)
public
ResponseEntity
getList
(
@
RequestBody
RepelDetailSelectVo
repelDetailSelectVo
)
{
return
ResponseEntity
.
ok
(
repelQueryService
.
getList
(
repelDetailSelectVo
));
}
@ApiOperation
(
value
=
"查询清退任务"
,
notes
=
"可以通过这个接口查询查询清退任务"
)
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/DeviceRepelDetail.java
浏览文件 @
7ab068f7
...
...
@@ -161,53 +161,6 @@ public class DeviceRepelDetail extends BaseEntity {
@Column
(
name
=
"in_file"
,
columnDefinition
=
"TEXT"
)
private
String
inFile
;
/**
* 退回状态(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的不匹配
*/
@Column
(
name
=
"send_check_detail"
,
columnDefinition
=
"TEXT"
)
@ApiModelProperty
(
value
=
"出库检查详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配"
)
private
String
sendCheckDetail
;
/**
* 出库检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条
*/
@ApiModelProperty
(
value
=
"出库检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条"
)
@Column
(
name
=
"send_check_result"
,
columnDefinition
=
"TEXT"
)
private
String
sendCheckResult
;
/**
* 接收方入库检查详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配
*/
@ApiModelProperty
(
value
=
"接收方入库检查详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配"
)
@Column
(
name
=
"receive_check_detail"
,
columnDefinition
=
"TEXT"
)
private
String
receiveCheckDetail
;
/**
* 接收方检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条
*/
@ApiModelProperty
(
value
=
"接收方检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条"
)
@Column
(
name
=
"receive_check_result"
,
columnDefinition
=
"TEXT"
)
private
String
receiveCheckResult
;
@ApiModelProperty
(
value
=
"装备id集合"
)
@Column
(
name
=
"device_ids"
,
columnDefinition
=
"TEXT"
)
private
String
deviceIds
;
...
...
@@ -221,15 +174,10 @@ public class DeviceRepelDetail extends BaseEntity {
@ApiModelProperty
(
value
=
"区块链RID"
,
name
=
"recordId"
)
private
String
recordId
;
/**
* 提交描述
*/
@ApiModelProperty
(
value
=
"提交描述"
)
@Column
(
name
=
"submit_description"
,
columnDefinition
=
"TEXT"
)
private
String
submitDescription
;
/**
* 审核反馈
*/
@ApiModelProperty
(
value
=
"审核反馈"
)
@Column
(
name
=
"auditing_feedback"
,
columnDefinition
=
"TEXT"
)
private
String
auditingFeedback
;
...
...
@@ -237,6 +185,9 @@ public class DeviceRepelDetail extends BaseEntity {
@ApiModelProperty
(
value
=
"清退状态"
,
name
=
"1.清退中,2.清退完成"
)
private
Integer
repelStatus
;
@ApiModelProperty
(
value
=
"清退单据类型"
,
name
=
"1.出入库,2.直属 3.本级"
)
private
Integer
repelType
=
1
;
@ApiModelProperty
(
value
=
"批复文号文件"
)
@Column
(
name
=
"reply_files"
,
columnDefinition
=
"TEXT"
)
private
String
replyFiles
;
...
...
@@ -254,8 +205,6 @@ public class DeviceRepelDetail extends BaseEntity {
@Column
(
name
=
"directly_under_devices"
,
columnDefinition
=
"TEXT"
)
private
String
directlyUnderDevices
;
@Transient
private
List
<
ScriptSaveVo
>
scripts
=
new
ArrayList
<>();
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/RepelDetailSelectVo.java
0 → 100644
浏览文件 @
7ab068f7
package
com
.
tykj
.
dev
.
device
.
sendback
.
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
;
import
java.time.LocalDateTime
;
/**
* @author zjm
* @version 1.0.0
* @ClassName RepelManagementVo.java
* @Description 清退管理 清退清退vo
* @createTime 2021年01月23日 12:42:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"退役业务分页查询业务"
)
public
class
RepelDetailSelectVo
extends
CustomPage
{
@ApiModelProperty
(
name
=
"开始清退的年份 默认各式 2020-01-01 00:00:00"
)
private
LocalDateTime
startTime
;
@ApiModelProperty
(
name
=
"开始清退的年份 默认各式 2020-01-01 00:00:00"
)
private
LocalDateTime
endTime
;
@ApiModelProperty
(
name
=
"单位id"
)
private
Integer
unitId
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/DeviceRepelDetailService.java
浏览文件 @
7ab068f7
...
...
@@ -2,6 +2,8 @@ package com.tykj.dev.device.sendback.service;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.vo.RepelDetailSelectVo
;
import
org.springframework.data.domain.Page
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -38,4 +40,7 @@ public interface DeviceRepelDetailService {
List
<
DeviceRepelDetail
>
findUnitIdSendOrReceive
(
Integer
unitId
);
List
<
DeviceRepelDetail
>
findIdsReceiptUnits
(
List
<
Integer
>
unitIds
);
Page
<
DeviceRepelDetail
>
findPageDeviceRepelDetail
(
RepelDetailSelectVo
repelDetailSelectVo
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
7ab068f7
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
;
import
com.sun.xml.internal.bind.v2.runtime.reflect.Lister
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepel
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.vo.*
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
org.springframework.data.domain.Page
;
import
java.util.List
;
...
...
@@ -96,7 +98,7 @@ public interface RepelQueryService {
/**
查询清退单
*/
List
<
DeviceRepelDetail
>
getList
(
SecurityUser
securityUser
);
Page
<
DeviceRepelDetail
>
getList
(
RepelDetailSelectVo
repelDetailSelectVo
);
/**
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/DeviceRepelDetailServiceImpl.java
浏览文件 @
7ab068f7
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
.
impl
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
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.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.vo.RepelDetailSelectVo
;
import
com.tykj.dev.device.sendback.repository.DeviceRepelDetailDao
;
import
com.tykj.dev.device.sendback.service.DeviceRepelDetailService
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
...
...
@@ -92,6 +101,40 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
return
deviceRepelDetailDao
.
findAllByReceiveUnitIdIn
(
unitIds
);
}
@Override
public
Page
<
DeviceRepelDetail
>
findPageDeviceRepelDetail
(
RepelDetailSelectVo
repelDetailSelectVo
)
{
return
deviceRepelDetailDao
.
findAll
(
getFindRetiredSpecification
(
repelDetailSelectVo
),
repelDetailSelectVo
.
getPageable
()).
map
(
deviceRepelDetail
->
{
deviceRepelDetail
.
setScripts
(
JacksonUtil
.
readValue
(
deviceRepelDetail
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
}));
deviceRepelDetail
.
setBillFiles
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getBillFile
()));
deviceRepelDetail
.
setOutboundFiles
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getOutboundFile
()));
deviceRepelDetail
.
setInFiles
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getInFile
()));
deviceRepelDetail
.
setReplyFileList
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getReplyFiles
()));
deviceRepelDetail
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getApplyFiles
()));
return
deviceRepelDetail
;
});
}
private
Specification
<
DeviceRepelDetail
>
getFindRetiredSpecification
(
RepelDetailSelectVo
repelDetailSelectVo
)
{
PredicateBuilder
<
DeviceRepelDetail
>
predicateBuilder
=
Specifications
.
and
();
// List<Integer> leftStatus=new ArrayList<>();
// leftStatus.add(com.tykj.dev.config.base.DeviceLifeStatus.RETIRED.id);
if
(
repelDetailSelectVo
.
getStartTime
()
!=
null
)
{
predicateBuilder
.
gt
(
"createTime"
,
repelDetailSelectVo
.
getStartTime
());
}
if
(
repelDetailSelectVo
.
getEndTime
()
!=
null
)
{
predicateBuilder
.
lt
(
"createTime"
,
repelDetailSelectVo
.
getEndTime
());
}
predicateBuilder
.
eq
(
"repelStatus"
,
2
);
predicateBuilder
.
eq
(
"repelType"
,
1
,
2
);
predicateBuilder
.
eq
(
"sendUnitId"
,
repelDetailSelectVo
.
getUnitId
());
return
predicateBuilder
.
build
();
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
","
)
)
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
7ab068f7
...
...
@@ -225,6 +225,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setSendUnitId
(
units
.
getUnitId
());
deviceRepelDetail
.
setSendUnit
(
units
.
getName
());
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setRepelType
(
2
);
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
directlUnderUnitNames
,
seqNumbers
,
lifeStatus
);
if
(
directlUnderUnit
.
get
()&&
count
!=
0
){
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
(),
userId
);
...
...
@@ -233,8 +234,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setId
(
null
);
List
<
String
>
strings
=
new
ArrayList
<>();
strings
.
add
(
units
.
getName
());
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
strings
,
seqNumbers
,
lifeStatus
);
deviceRepelDetail
.
setRepelType
(
3
);
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
strings
,
seqNumbers
,
lifeStatus
);
if
(
correspondingLevel
.
get
()&&
count
!=
0
){
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
(),
userId
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省本级"
,
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
));
...
...
@@ -317,6 +318,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setSendUnit
(
units
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units
.
getUnitId
());
deviceRepelDetail
.
setRepelType
(
3
);
List
<
String
>
unitNames
=
new
ArrayList
<>();
unitNames
.
add
(
units
.
getName
());
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
unitNames
,
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
()),
lifeStatus
);
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
7ab068f7
...
...
@@ -368,31 +368,8 @@ public class RepelQueryServiceImpl implements RepelQueryService {
}
@Override
public
List
<
DeviceRepelDetail
>
getList
(
SecurityUser
securityUser
)
{
List
<
DeviceRepelDetail
>
list
=
new
ArrayList
<>();
List
<
DeviceRepelDetail
>
deviceRepelDetails
=
new
ArrayList
<>();
Units
units
=
securityUser
.
getCurrentUserInfo
().
getUnits
();
if
(
securityUser
.
getCurrentUserInfo
().
getUnits
().
getLevel
()!=
1
){
deviceRepelDetails
=
repelDetailService
.
findUnitIdSendOrReceive
(
units
.
getUnitId
());
}
else
{
deviceRepelDetails
=
repelDetailService
.
findAll
();
}
deviceRepelDetails
.
stream
().
filter
(
i
->
i
.
getRepelStatus
()!=
null
&&
i
.
getRepelStatus
()==
2
).
forEach
(
deviceRepelDetail
->
{
if
(
deviceRepelDetail
.
getBillFile
()!=
null
){
deviceRepelDetail
.
setBillFiles
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getBillFile
()));
}
if
(
deviceRepelDetail
.
getOutboundFile
()!=
null
){
deviceRepelDetail
.
setOutboundFiles
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getOutboundFile
()));
}
deviceRepelDetail
.
setScripts
(
JacksonUtil
.
readValue
(
deviceRepelDetail
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{}));
deviceRepelDetail
.
setDeviceLibraryEntities
(
deviceLibraryDao
.
findAllById
(
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
())).
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
()));
list
.
add
(
deviceRepelDetail
);
}
);
return
list
;
public
Page
<
DeviceRepelDetail
>
getList
(
RepelDetailSelectVo
repelDetailSelectVo
)
{
return
repelDetailService
.
findPageDeviceRepelDetail
(
repelDetailSelectVo
);
}
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/dao/UnitsDao.java
浏览文件 @
7ab068f7
...
...
@@ -32,6 +32,8 @@ public interface UnitsDao extends JpaRepository<Units, Integer>, JpaSpecificatio
@Query
(
"select o.areaId from Units o where o.unitId=?1"
)
int
findAreaId
(
int
id
);
Units
findTopByOrderByShowOrderDesc
();
Units
findByAreaIdAndLevel
(
Integer
areaId
,
Integer
level
);
Units
findByAreaIdEquals
(
Integer
areaId
);
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/entity/Units.java
浏览文件 @
7ab068f7
...
...
@@ -64,7 +64,7 @@ public class Units {
* 是否删除
*/
@ApiModelProperty
(
value
=
"是否删除"
,
name
=
"idDel"
,
example
=
"12321L"
)
private
Integer
idDel
;
private
Integer
idDel
=
0
;
/**
序列号
...
...
@@ -76,7 +76,7 @@ public class Units {
* 2.省直属单位 areaid 0
* 3.省上级单位 areaid 0
*/
private
Integer
type
;
private
Integer
type
=
1
;
/**
* 区域id
*/
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UnitsServiceImpl.java
浏览文件 @
7ab068f7
...
...
@@ -288,13 +288,17 @@ public class UnitsServiceImpl implements UnitsService {
Optional
<
Area
>
optionalArea
=
areaDao
.
findById
(
units
.
getAreaId
());
if
(
optionalArea
.
isPresent
())
{
units
.
setLevel
(
optionalArea
.
get
().
getType
());
units
.
setType
(
1
);
}
else
{
throw
new
ApiException
(
ResponseEntity
.
ok
(
"[单位] 没找到对应的区域,请检查"
));
}
}
else
{
units
.
setLevel
(
4
);
units
.
setType
(
3
);
}
Integer
maxShowCode
=
unitsDao
.
findTopByOrderByShowOrderDesc
().
getShowOrder
();
units
.
setShowOrder
(
maxShowCode
+
1
);
Units
units1
=
unitsDao
.
save
(
units
);
unitsCache
.
refresh
(
unitsDao
.
findAll
());
return
units1
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论