Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
416bb923
提交
416bb923
authored
6月 28, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[zjm] 代码修改
上级
3e73fc37
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
457 行增加
和
30 行删除
+457
-30
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+3
-4
CheckBillSelectVo.java
.../dev/device/confirmcheck/entity/vo/CheckBillSelectVo.java
+2
-0
ConfirmCheckServiceImpl.java
...ce/confirmcheck/service/impl/ConfirmCheckServiceImpl.java
+30
-5
DeviceDecommissioningQueryService.java
...missioning/service/DeviceDecommissioningQueryService.java
+3
-0
DeviceDecommissioningBusinessServiceImpl.java
...ervice/impl/DeviceDecommissioningBusinessServiceImpl.java
+0
-0
DeviceDecommissioningQueryServiceImpl.java
...g/service/impl/DeviceDecommissioningQueryServiceImpl.java
+2
-0
DeviceDestroyBusinessServiceImpl.java
...estroy/service/Impl/DeviceDestroyBusinessServiceImpl.java
+20
-6
DeviceLibrary.java
.../tykj/dev/device/library/subject/domin/DeviceLibrary.java
+8
-0
DeviceExcelVo.java
...com/tykj/dev/device/library/subject/vo/DeviceExcelVo.java
+96
-0
ScrapBusinessServiceImpl.java
...v/device/scrap/service/impl/ScrapBusinessServiceImpl.java
+25
-13
TaskService.java
...in/java/com/tykj/dev/device/task/service/TaskService.java
+3
-1
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+14
-1
bill6.html
dev-union/src/main/resources/bill6.html
+243
-0
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+4
-0
DeviceUseReportSelectVo.java
.../device/usereport/subject/vo/DeviceUseReportSelectVo.java
+4
-0
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
416bb923
...
...
@@ -10,7 +10,6 @@ import static com.tykj.dev.misc.base.BusinessEnum.*;
*/
@AllArgsConstructor
public
enum
LogType
{
/**
* 发起列装
*/
...
...
@@ -176,7 +175,7 @@ public enum LogType {
SEND_BACK_11
(
10001
,
SEND_BACK
.
id
,
SEND_BACK_1206
.
id
,
SEND_BACK_1207
.
id
,
"选择需要清退对装备,提交等待上级审核"
),
SEND_BACK_12
(
10002
,
SEND_BACK
.
id
,
SEND_BACK_1207
.
id
,
SEND_BACK_1208
.
id
,
"上级审核通过,可以进行出库,把装备送至上级"
),
SEND_BACK_13
(
10003
,
SEND_BACK
.
id
,
SEND_BACK_1208
.
id
,
SEND_BACK_1209
.
id
,
"清退装备已出库,等待单位接收"
),
SEND_BACK_14
(
10004
,
SEND_BACK
.
id
,
SEND_BACK_1209
.
id
,
END
.
id
,
"
单位接收
完成"
),
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_19
(
10009
,
SEND_BACK
.
id
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1211
.
id
,
"市发起清退任务,待省级单位审核"
),
...
...
@@ -185,10 +184,10 @@ public enum LogType {
SEND_BACK_23
(
100013
,
SEND_BACK
.
id
,
SEND_BACK_1212
.
id
,
END
.
id
,
"清退统计任务已办结"
),
SEND_BACK_24
(
100014
,
SEND_BACK_STATISTICAL
.
id
,
SEND_BACK_1204
.
id
,
SEND_BACK_1212
.
id
,
"市清退统计任务待办结"
),
SEND_BACK_25
(
100015
,
SEND_BACK_STATISTICAL
.
id
,
SEND_BACK_1200
.
id
,
SEND_BACK_1212
.
id
,
"省清退统计任务待办结"
),
SEND_BACK_26
(
100016
,
SEND_BACK
.
id
,
SEND_BACK_1214
.
id
,
END
.
id
,
"
清退装备任务,上传了回执单据,任务结束
"
),
SEND_BACK_26
(
100016
,
SEND_BACK
.
id
,
SEND_BACK_1214
.
id
,
END
.
id
,
"
上传相关签字单据,任务弯沉
"
),
SEND_BACK_27
(
100017
,
SEND_BACK
.
id
,
SEND_BACK_1202
.
id
,
SEND_BACK_1213
.
id
,
"省直属单位清退装备选择完成,等待签字单据上传"
),
SEND_BACK_28
(
100018
,
SEND_BACK
.
id
,
SEND_BACK_1213
.
id
,
END
.
id
,
"上传了直属单位清退签字单据"
),
SEND_BACK_29
(
100019
,
SEND_BACK
.
id
,
SEND_BACK_1209
.
id
,
SEND_BACK_1215
.
id
,
"单据未上传,继续等待
签收
单据上传"
),
SEND_BACK_29
(
100019
,
SEND_BACK
.
id
,
SEND_BACK_1209
.
id
,
SEND_BACK_1215
.
id
,
"单据未上传,继续等待
相关
单据上传"
),
SEND_BACK_30
(
100020
,
SEND_BACK
.
id
,
SEND_BACK_1208
.
id
,
SEND_BACK_1217
.
id
,
"调用电子签章,等待审核"
),
SEND_BACK_31
(
100021
,
SEND_BACK
.
id
,
SEND_BACK_1217
.
id
,
SEND_BACK_1219
.
id
,
"电之签章调用审核通过,等待盖章出库"
),
SEND_BACK_32
(
100022
,
SEND_BACK
.
id
,
SEND_BACK_1217
.
id
,
SEND_BACK_1208
.
id
,
"电之签章调用审核不通过,等待重新出库"
),
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckBillSelectVo.java
浏览文件 @
416bb923
...
...
@@ -11,4 +11,6 @@ import lombok.Data;
@ApiModel
(
"核查查询对象"
)
public
class
CheckBillSelectVo
extends
CustomPage
{
private
String
keyword
;
private
Integer
unitId
;
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/service/impl/ConfirmCheckServiceImpl.java
浏览文件 @
416bb923
...
...
@@ -29,6 +29,8 @@ import com.tykj.dev.device.user.subject.dao.AreaDao;
import
com.tykj.dev.device.user.subject.dao.UnitsDao
;
import
com.tykj.dev.device.user.subject.entity.Area
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.MapperUtils
;
...
...
@@ -79,6 +81,9 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
@Autowired
private
ObjTransUtil
objTransUtil
;
@Autowired
UserService
userService
;
@Autowired
private
AreaDao
areaRepo
;
...
...
@@ -310,16 +315,17 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
List
<
TaskBto
>
topDetailList
=
taskService
.
findBillType
(
8
);
topStatList
.
addAll
(
topDetailList
);
List
<
Integer
>
topIdList
=
topStatList
.
stream
()
.
filter
(
taskBto
->
taskBto
.
getParentTaskId
().
equals
(
0
)
||
taskBto
.
getParentTaskId
()
==
null
)
.
map
(
TaskBto:
:
getBillId
)
.
collect
(
toList
());
//
List<Integer> topIdList = topStatList.stream()
//
.filter(taskBto -> taskBto.getParentTaskId().equals(0) || taskBto.getParentTaskId() == null)
//
.map(TaskBto::getBillId)
//
.collect(toList());
List
<
CheckStatTableVo
>
tableVos
=
statDao
.
findAll
(
checkBillSelectVo
.
getPageable
().
getSort
()).
stream
()
.
filter
(
deviceCheckStat
->
!
"[]"
.
equals
(
deviceCheckStat
.
getStatInfo
()))
.
map
(
objTransUtil:
:
stat2TableVo
)
.
filter
(
vo
->
keywordFilter
(
vo
,
checkBillSelectVo
.
getKeyword
()))
.
filter
(
v
->
topIdList
.
contains
(
v
.
getId
()))
// .filter(v->topIdList.contains(v.getId()))
.
filter
(
v1
->
unitIdFilter
(
v1
,
checkBillSelectVo
.
getUnitId
()))
.
collect
(
Collectors
.
toList
());
return
PageUtil
.
getPerPage
(
checkBillSelectVo
.
getPage
(),
checkBillSelectVo
.
getSize
(),
tableVos
,
checkBillSelectVo
.
getPageable
());
...
...
@@ -486,6 +492,25 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
}
}
/**
* 关键字过滤器
*
* @param vo 要过滤的对象
* @param unitId 匹配的关键字
* @return 该对象是否通过过滤器
*/
private
boolean
unitIdFilter
(
CheckStatTableVo
vo
,
Integer
unitId
)
{
if
(
unitId
==
null
)
{
return
true
;
}
else
{
TaskBto
taskBto
=
taskService
.
findByBillIdAndBusinessTypeIsNotCustomInfo
(
vo
.
getId
(),
7
);
List
<
Integer
>
userIds
=
userService
.
findAllByUnite
(
unitId
).
stream
().
map
(
User:
:
getUserId
).
collect
(
toList
());
userIds
.
retainAll
(
taskBto
.
getInvolveUserIdList
());
return
taskBto
.
getOwnUnit
().
equals
(
unitId
);
}
}
private
String
addNode
(
String
originalNode
,
Integer
fatherId
)
{
return
originalNode
+
fatherId
+
"."
;
}
...
...
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/DeviceDecommissioningQueryService.java
浏览文件 @
416bb923
...
...
@@ -4,10 +4,12 @@ import com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail;
import
com.tykj.dev.device.decommissioning.entity.vo.DecommissioningSelectVo
;
import
com.tykj.dev.device.decommissioning.entity.vo.PagingVo
;
import
com.tykj.dev.device.decommissioning.entity.vo.RepelManagementVo
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.data.domain.Page
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
...
...
@@ -48,6 +50,7 @@ public interface DeviceDecommissioningQueryService {
PagingVo
retiredDeviceList
(
RepelManagementVo
repelManagementVo
);
/**
* 根据taskId查询退役业务详情
*/
...
...
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/impl/DeviceDecommissioningBusinessServiceImpl.java
浏览文件 @
416bb923
差异被折叠。
点击展开。
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/impl/DeviceDecommissioningQueryServiceImpl.java
浏览文件 @
416bb923
...
...
@@ -29,6 +29,7 @@ import org.springframework.stereotype.Service;
import
javax.persistence.Transient
;
import
java.lang.reflect.Field
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -112,6 +113,7 @@ public class DeviceDecommissioningQueryServiceImpl implements DeviceDecommission
.
size
(
repelManagementVo
.
getSize
()).
total
((
int
)
page
.
getTotalElements
()).
build
();
}
@Override
public
DeviceDecommissioningDetail
findTaskIdDeviceDecommissioningDetail
(
Integer
taskId
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/service/Impl/DeviceDestroyBusinessServiceImpl.java
浏览文件 @
416bb923
...
...
@@ -25,6 +25,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -35,6 +36,7 @@ import java.util.Date;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -76,15 +78,26 @@ public class DeviceDestroyBusinessServiceImpl implements DeviceDestroyBusinessSe
public
TaskBto
saveDeviceDestroyBill
(
SecurityUser
securityUser
,
DeviceDestroyBillVo
deviceDestroyBillVo
)
{
TaskBto
taskBto
;
DeviceDestroyBill
deviceDestroyBill
;
List
<
ScriptSaveVo
>
scriptSaveVos
=
deviceDestroyBillVo
.
getScripts
();
AtomicReference
<
Integer
>
count
=
new
AtomicReference
<>(
0
);
scriptSaveVos
.
forEach
(
scriptSaveVo
->
{
if
(
scriptSaveVo
.
getSeqNumber
()!=
null
){
count
.
set
(
count
.
get
()+
scriptSaveVo
.
getNum
());
}
}
);
if
(
deviceDestroyBillVo
.
getTaskId
()==
null
){
deviceDestroyBill
=
deviceDestroyBillVo
.
toDeviceDestroyBill
();
if
(
deviceDestroyBillVo
.
getApplyId
()!=
null
)
{
Optional
<
DeviceDestroyBill
>
deviceDestroyBill1
=
deviceDestroyBillService
.
findApplyId
(
deviceDestroyBillVo
.
getApplyId
());
deviceDestroyBill1
.
ifPresent
(
deviceDestroyBill2
->
deviceDestroyBill
.
setId
(
deviceDestroyBill2
.
getId
()));
}
String
title
=
"销毁型号为"
+
StringSplitUtil
.
stringListToString
(
scriptSaveVos
.
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"的设备共"
+
count
.
get
()+
"件"
;
deviceDestroyBillService
.
saveDeviceDestroyBill
(
deviceDestroyBill
);
deviceDestroyBill
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()
+
"XF"
+
deviceDestroyBill
.
getId
());
taskBto
=
sendDraftTask
(
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
deviceDestroyBill
.
getId
(),
securityUser
.
getCurrentUserInfo
().
getUserId
());
taskBto
=
sendDraftTask
(
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
deviceDestroyBill
.
getId
(),
securityUser
.
getCurrentUserInfo
().
getUserId
()
,
title
);
deviceDestroyBill
.
setDestroyStatus
(
taskBto
.
getBillStatus
());
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"保存销毁任务草稿"
,
gainThisUser
(
securityUser
.
getCurrentUserInfo
().
getUserId
(),
securityUser
.
getCurrentUserInfo
().
getUnitsId
())));
}
else
{
...
...
@@ -114,7 +127,8 @@ public class DeviceDestroyBusinessServiceImpl implements DeviceDestroyBusinessSe
deviceDestroyBillService
.
saveDeviceDestroyBill
(
deviceDestroyBill
);
deviceDestroyBill
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()
+
"XF"
+
deviceDestroyBill
.
getId
());
//等待上传销毁单据
taskBto
=
awaitUploadDestructionTask
(
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
deviceDestroyBill
.
getId
(),
securityUser
.
getCurrentUserInfo
().
getUserId
());
String
title
=
"销毁型号为"
+
StringSplitUtil
.
stringListToString
(
deviceDestroyBillVo
.
getScripts
().
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"的设备共"
+
seqNumbers
.
size
()+
"件"
;
taskBto
=
awaitUploadDestructionTask
(
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
deviceDestroyBill
.
getId
(),
securityUser
.
getCurrentUserInfo
().
getUserId
(),
title
);
deviceDestroyBill
.
setDestroyStatus
(
taskBto
.
getBillStatus
());
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"销毁任务等待补充手续"
,
gainThisUser
(
securityUser
.
getCurrentUserInfo
().
getUserId
(),
securityUser
.
getCurrentUserInfo
().
getUnitsId
())));
}
else
{
...
...
@@ -187,10 +201,10 @@ public class DeviceDestroyBusinessServiceImpl implements DeviceDestroyBusinessSe
/**
* 保存为草稿
*/
private
TaskBto
sendDraftTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
){
private
TaskBto
sendDraftTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
,
String
title
){
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
userId
);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
DESTROY_0
.
id
,
"销毁设备任务"
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
DESTROY
.
id
,
unitId
,
0
,
""
,
list
));
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
DESTROY_0
.
id
,
title
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
DESTROY
.
id
,
unitId
,
0
,
""
,
list
));
}
/**
...
...
@@ -199,11 +213,11 @@ public class DeviceDestroyBusinessServiceImpl implements DeviceDestroyBusinessSe
* @param unitId 单位id
* @param repelDetailId 业务id
*/
private
TaskBto
awaitUploadDestructionTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
){
private
TaskBto
awaitUploadDestructionTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
,
String
title
){
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
0
);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
DESTROY_2
.
id
,
"销毁设备任务"
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
DESTROY
.
id
,
unitId
,
1
,
""
,
userIds
));
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
DESTROY_2
.
id
,
title
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
DESTROY
.
id
,
unitId
,
1
,
""
,
userIds
));
}
private
List
<
String
>
scriptListToStringList
(
DeviceDestroyBillVo
deviceDestroyBillVo
){
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/domin/DeviceLibrary.java
浏览文件 @
416bb923
...
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.library.subject.domin;
import
com.tykj.dev.config.cache.ConfigCache
;
import
com.tykj.dev.device.library.subject.vo.DeviceExcel
;
import
com.tykj.dev.device.library.subject.vo.DeviceExcelVo
;
import
com.tykj.dev.device.library.subject.vo.DeviceVo
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.SpringUtils
;
...
...
@@ -279,6 +280,13 @@ public class DeviceLibrary {
return
mapper
.
map
(
this
,
DeviceVo
.
class
);
}
public
DeviceExcelVo
toDeviceExcelVo
(){
setConfigName
();
//modelMap复制
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
return
mapper
.
map
(
this
,
DeviceExcelVo
.
class
);
}
public
DeviceExcel
parseExcel
(){
setConfigName
();
//modelMap复制
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceExcelVo.java
0 → 100644
浏览文件 @
416bb923
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
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
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Transient
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceExcelVo.java
* @Description TODO
* @createTime 2021年06月28日 13:06:00
*/
@Data
@ApiModel
(
"装备库"
)
@AllArgsConstructor
@NoArgsConstructor
public
class
DeviceExcelVo
{
/**
* 型号
*/
@Excel
(
name
=
"型号"
,
orderNum
=
"1"
,
width
=
30
,
needMerge
=
true
)
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
/**
* 装备名称
*/
@Excel
(
name
=
"装备名称"
,
orderNum
=
"2"
,
width
=
30
,
needMerge
=
true
)
@ApiModelProperty
(
value
=
"装备名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"密级"
)
@Excel
(
name
=
"密级"
,
orderNum
=
"3"
,
width
=
30
,
needMerge
=
true
)
private
String
secretLevelName
;
/**
* 装备序列号
*/
@Excel
(
name
=
"装备序列号"
,
orderNum
=
"4"
,
width
=
30
,
needMerge
=
true
)
@ApiModelProperty
(
value
=
"装备序列号"
)
private
String
seqNumber
;
// /**
// * 生产序列号
// */
// @Excel(name = "区域名称", orderNum = "1", width = 30, needMerge = true)
// @ApiModelProperty(value = "生产序列号")
// private String prodNumber;
/**
* 所在单位
*/
@Excel
(
name
=
"所在单位"
,
orderNum
=
"5"
,
width
=
30
,
needMerge
=
true
)
@ApiModelProperty
(
value
=
"所在单位"
)
private
String
locationUnit
;
/**
* 所属单位
*/
@Excel
(
name
=
"所属单位"
,
orderNum
=
"6"
,
width
=
30
,
needMerge
=
true
)
@ApiModelProperty
(
value
=
"所属单位"
)
private
String
ownUnit
;
@ApiModelProperty
(
value
=
"装备存放位置"
,
notes
=
"默认是库房"
)
@Excel
(
name
=
"装备存放位置"
,
orderNum
=
"7"
,
width
=
30
,
needMerge
=
true
)
private
String
storageLocation
;
@ApiModelProperty
(
value
=
"配用范围"
)
@Excel
(
name
=
"配用范围"
,
orderNum
=
"8"
,
width
=
30
,
needMerge
=
true
)
private
String
matchingRangeName
;
@ApiModelProperty
(
value
=
"生命状态"
)
@Excel
(
name
=
"生命状态"
,
orderNum
=
"9"
,
width
=
30
,
needMerge
=
true
)
private
String
lifeStatusName
;
}
dev-scrap/src/main/java/com/tykj/dev/device/scrap/service/impl/ScrapBusinessServiceImpl.java
浏览文件 @
416bb923
...
...
@@ -27,10 +27,7 @@ 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.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.misc.utils.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -98,9 +95,11 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
scrap
.
setId
(
scrap1
.
get
().
getId
());
}
}
String
title
=
"报废型号为"
+
StringSplitUtil
.
stringListToString
(
scriptSaveVos
.
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"的设备共"
+
seqNumbers
.
size
()+
"件"
;
scrapService
.
saveScrap
(
scrap
);
scrap
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()
+
"QT"
+
scrap
.
getId
());
taskBto
=
sendDraftTask
(
units
.
getUnitId
(),
scrap
.
getId
(),
userId
);
taskBto
=
sendDraftTask
(
units
.
getUnitId
(),
scrap
.
getId
(),
userId
,
title
);
scrap
.
setScrapStatus
(
taskBto
.
getBillStatus
());
}
else
{
taskBto
=
taskService
.
get
(
scrapOrderOutData
.
getTaskId
());
...
...
@@ -156,8 +155,10 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
}
else
{
scrap
=
scrapOrderOutData
.
toScrap
();
scrapService
.
saveScrap
(
scrap
);
String
title
=
"报废型号为"
+
StringSplitUtil
.
stringListToString
(
scriptSaveVos
.
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"的设备共"
+
seqNumbers
.
size
()+
"件"
;
scrap
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()
+
"QT"
+
scrap
.
getId
());
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
scrap
.
getId
(),
userId
);
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
scrap
.
getId
(),
userId
,
title
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起报废任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
scrap
.
setScrapStatus
(
taskBto
.
getBillStatus
());
}
...
...
@@ -235,11 +236,22 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
Scrap
scrap
=
new
Scrap
();
User
user
=
userService
.
findByUser
(
scrapOrderOutData
.
getSendUserbId
());
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
List
<
ScriptSaveVo
>
scriptSaveVos
=
scrapOrderOutData
.
getScriptSaveVos
();
List
<
String
>
seqNumbers
=
new
ArrayList
<>();
scriptSaveVos
.
forEach
(
scriptSaveVo
->
{
if
(
scriptSaveVo
.
getSeqNumber
()
!=
null
)
{
seqNumbers
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
scriptSaveVo
.
getSeqNumber
()));
}
}
);
if
(
scrapOrderOutData
.
getTaskId
()==
null
){
scrap
=
scrapOrderOutData
.
toScrap
();
scrapService
.
saveScrap
(
scrap
);
String
title
=
"报废型号为"
+
StringSplitUtil
.
stringListToString
(
scriptSaveVos
.
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"的设备共"
+
seqNumbers
.
size
()+
"件"
;
scrap
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()
+
"QT"
+
scrap
.
getId
());
TaskBto
taskBto
=
sealOfAuditTask
(
units
.
getUnitId
(),
scrap
.
getId
(),
user
.
getUserId
());
TaskBto
taskBto
=
sealOfAuditTask
(
units
.
getUnitId
(),
scrap
.
getId
(),
user
.
getUserId
()
,
title
);
scrap
.
setScrapStatus
(
taskBto
.
getBillStatus
());
}
else
{
TaskBto
taskBto
=
taskService
.
get
(
scrapOrderOutData
.
getTaskId
());
...
...
@@ -291,10 +303,10 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
/**
* 发起调用电子签章确认任务
*/
private
TaskBto
sealOfAuditTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
){
private
TaskBto
sealOfAuditTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
,
String
title
){
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
userId
);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SCRAP_2224
.
id
,
"报废设备任务"
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
SCRAP
.
id
,
unitId
,
0
,
""
,
list
));
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SCRAP_2224
.
id
,
title
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
SCRAP
.
id
,
unitId
,
0
,
""
,
list
));
}
/**
...
...
@@ -304,22 +316,22 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
* @param repelDetailId 业务id
* @return
*/
private
TaskBto
sendOutSuperior
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
){
private
TaskBto
sendOutSuperior
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
,
String
title
){
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
0
);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SCRAP_2222
.
id
,
"报废设备任务"
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
SCRAP
.
id
,
unitId
,
1
,
"country"
,
userIds
));
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SCRAP_2222
.
id
,
title
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
SCRAP
.
id
,
unitId
,
1
,
"country"
,
userIds
));
}
/**
* 报废保存为草稿
*/
private
TaskBto
sendDraftTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
){
private
TaskBto
sendDraftTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
userId
,
String
title
){
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
userId
);
// list.add(0);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SCRAP_2223
.
id
,
"报废设备任务"
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
SCRAP
.
id
,
unitId
,
0
,
""
,
list
));
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SCRAP_2223
.
id
,
title
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
SCRAP
.
id
,
unitId
,
0
,
""
,
list
));
}
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/TaskService.java
浏览文件 @
416bb923
...
...
@@ -193,12 +193,14 @@ public interface TaskService {
*/
TaskBto
findFatherIdAndCustomInfo
(
Integer
taskId
);
/**
* 根据billType 查询task集合
*/
List
<
TaskBto
>
findBillType
(
Integer
billType
);
TaskBto
findByBillIdAndBusinessTypeIsNotCustomInfo
(
Integer
billId
,
Integer
businessType
);
/**
* @param taaskId 父Task ID
* 将父Task所有子Task办结
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
416bb923
...
...
@@ -1067,6 +1067,18 @@ public class TaskServiceImpl implements TaskService {
return
taskDao
.
findAllByBusinessType
(
billType
).
stream
().
map
(
Task:
:
parse2Bto
).
collect
(
Collectors
.
toList
());
}
@Override
public
TaskBto
findByBillIdAndBusinessTypeIsNotCustomInfo
(
Integer
billId
,
Integer
businessType
)
{
List
<
Task
>
taskList
=
taskDao
.
findAllByBillIdAndBusinessType
(
billId
,
businessType
).
stream
().
filter
(
task
->
task
.
getCustomInfo
()!=
null
).
collect
(
Collectors
.
toList
());
if
(
taskList
.
size
()!=
0
){
return
taskList
.
get
(
0
).
parse2Bto
();
}
else
{
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"[task] 根据业务id、业务类型、自定义字段不为空查询任务对象失败"
));
}
}
@Override
public
TaskBto
findBillTypeAndFatherId
(
Integer
billType
,
Integer
fatherId
)
{
...
...
@@ -1143,7 +1155,7 @@ public class TaskServiceImpl implements TaskService {
//查询跟踪
if
(
taskSelectVo
.
getSelectNum
()
==
3
)
{
//所有涉及人员所在单位包含当前用户所在单位且指针对应UserId不是当前用户
List
<
Integer
>
status
=
Arrays
.
asList
(
201
,
333
,
810
,
322
,
722
,
788
,
1250
,
2223
,
8110
,
888
,
140
,
130
,
141
,
111
,
1002
);
List
<
Integer
>
status
=
Arrays
.
asList
(
201
,
333
,
810
,
322
,
722
,
788
,
1250
,
2223
,
8110
,
888
,
140
,
130
,
141
,
111
,
1002
,
150
);
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
.
filter
(
taskBto
->
{
// boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId);
...
...
@@ -1163,6 +1175,7 @@ public class TaskServiceImpl implements TaskService {
// boolean involveExists = taskBto.getInvolveUserIdList().contains(userId);
boolean
pointExists
=
taskBto
.
getCurrentPoint
()
<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
userConfirm
=
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
-
1
;
// System.out.println("___---"+taskBto.getOwnUnit());
boolean
unitConfirm
=
taskBto
.
getOwnUnit
().
equals
(
unitId
);
boolean
isCreateUser
=
userId
.
equals
(
taskBto
.
getCreateUserId
());
return
pointExists
&&
userConfirm
&&
unitConfirm
&&
isCreateUser
;
...
...
dev-union/src/main/resources/bill6.html
0 → 100755
浏览文件 @
416bb923
<!DOCTYPE html>
<html
lang=
"en"
>
<!--数据清单-->
<head>
<meta
charset=
"UTF-8"
/>
<title>
Document
</title>
<style>
body
,
span
,
p
,
tr
,
td
{
font-size
:
15px
;
font-family
:
SimHei
;
margin
:
0
;
padding
:
0
;
}
.bottomTxt
{
text-align
:
center
;
font-size
:
15px
;
color
:
#000
;
height
:
15px
;
line-height
:
10px
;
}
/*
@page
{
size
:
297mm
210mm
;}
<!
--
设置
PDF
页面大小,此配置只对生成
PDF
文件有效,不会对页面显示生效
--
>*/
@page
{
size
:
210mm
297mm
;
/*margin: 0.25in;*/
/*-fs-flow-bottom: "footer";*/
/*-fs-flow-left: "left";*/
/*-fs-flow-right: "right";*/
/*border: thin solid black;*/
/*padding: 1em;*/
}
.returnTablePrint
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
color
:
#000
;
cursor
:
default
;
}
.returnTablePrint
.content
{
width
:
100%
;
height
:
100%
;
/* background: url("../../../assets/img/detailsBg.png") no-repeat; */
/*background-size: 100% 100%;*/
/*padding: 30px;*/
/*box-sizing: border-box;*/
}
.returnTablePrint
.content
>
div
{
width
:
100%
;
height
:
100%
;
background
:
#fff
;
/* padding: 30px; */
box-sizing
:
border-box
;
}
.returnTablePrint
.content
>
p
{
width
:
100%
;
text-align
:
center
;
font-size
:
22px
;
font-weight
:
bold
;
color
:
#4a475d
;
}
.returnTablePrint
.listWrapper
{
/* width: 92%; */
margin
:
0
auto
;
/* padding: 0px 20px 20px 20px; */
height
:
calc
(
100%
-
70px
);
/*padding: 10px 30px;*/
box-sizing
:
border-box
;
}
.returnTablePrint
.list
{
/* width: 92%; */
margin
:
0
auto
;
/* padding: 0px 20px 20px 20px; */
/* height: calc(100% - 75px); */
height
:
calc
(
100%
-
12px
)
}
.returnTablePrint
.title
{
width
:
100%
;
font-size
:
20px
;
text-align
:
center
;
position
:
relative
;
margin
:
0
;
padding
:
0
;
box-sizing
:
border-box
;
margin-top
:
9px
;
}
.returnTablePrint
.title
span
:nth-child
(
2
)
{
font-size
:
28px
;
color
:
#000000
;
}
.returnTablePrint
.title
span
:nth-child
(
2
)
span
{
font-size
:
20px
;
color
:
#000
;
}
.returnTablePrint
.main-title
span
{
font-size
:
22px
;
color
:
#333
;
font-weight
:
bold
;
}
.returnTablePrint
.main-title
{
font-size
:
17px
;
color
:
#000000
;
text-align
:
center
;
}
table
.altrowstable
{
width
:
100%
;
font-size
:
15px
;
color
:
#000
;
border-width
:
0px
;
border-color
:
#a9c6c9
;
border-collapse
:
collapse
;
text-align
:
center
;
table-layout
:
fixed
;
word-break
:
break-all
;
}
table
.altrowstable
th
{
background-color
:
#dedede
;
border
:
1px
solid
#bebebe
;
height
:
24px
;
line-height
:
24px
;
font-size
:
15px
;
}
table
.altrowstable
td
{
word-break
:
break-all
;
/*border: 1px solid #bebebe;*/
word-wrap
:
break-word
;
height
:
24px
;
line-height
:
24px
;
font-size
:
15px
;
width
:
100%
;
}
.oddrowcolor
{
background-color
:
#fff
;
}
.evenrowcolor
{
background-color
:
#fafafa
;
}
.person
{
color
:
#000
;
text-align
:
right
;
font-size
:
15px
;
}
.person
>
span
{
display
:
inline-block
;
margin-right
:
30pt
;
}
tr
:nth-child
(
odd
)
{
background
:
#fafafa
;
}
</style>
</head>
<body>
<div
class=
"returnTablePrint"
>
<div
class=
"content"
>
<div>
<div
class=
"listWrapper"
>
<div
class=
"list"
>
<p
class=
"title"
style=
"margin-bottom:20px"
>
<div
class=
"main-title"
>
<span>
设备数据列表
</span>
</div>
</p>
<div
style=
"height: 900px;"
>
<table
class=
"altrowstable"
id=
"alternatecolor"
>
<tr>
<th
width=
"30px"
>
序号
</th>
<th
style=
"width: 150px;"
>
型号
</th>
<th
style=
"width: 150px"
>
名称
</th>
<th
width=
"150"
>
装备序列号
</th>
<th>
所在单位
</th>
<th>
所属单位
</th>
<th
width=
"80px"
>
存放位置
</th>
</tr>
<
#
list
documentDevices
as
dev
>
<tr>
<td>
${dev.code!}
</td>
<td>
${dev.model!}
</td>
<td>
${dev.parts!}
</td>
<td>
${dev.applicationField!}
</td>
<td>
${dev.deviceSerialNumber!}
</td>
<td>
${dev.proofreading!}
</td>
</tr>
</
#
list>
</table>
</div>
</div>
<p
class=
"person"
style=
"margin-top: 20px;font-size: 10px;"
>
<span
style=
"width: 200px;text-align: left"
>
经办人:
</span>
<span
style=
"width: 200px;text-align: left"
>
审核人:
</span>
</p>
</div>
</div>
</div>
<p
class=
"bottomTxt"
style=
"margin-top: 20px;"
>
第${page}页/共${count}页
</p>
</div>
<!--<script type="text/javascript">-->
<!--function altRows(id){-->
<!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--rows[i].className = "oddrowcolor";-->
<!--}-->
<!--}-->
<!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--</script>-->
</body>
</html>
\ No newline at end of file
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
416bb923
...
...
@@ -395,6 +395,10 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
if
(
deviceUseReportSelectVo
.
getStartTime
()
!=
null
)
{
predicateBuilder
.
gt
(
"createTime"
,
deviceUseReportSelectVo
.
getStartTime
());
}
if
(
deviceUseReportSelectVo
.
getUnitId
()
!=
null
){
String
name
=
userPublicService
.
findByUnitsToname
(
deviceUseReportSelectVo
.
unitId
);
predicateBuilder
.
eq
(
"unit"
,
name
);
}
if
(
deviceUseReportSelectVo
.
getEndTime
()
!=
null
)
{
predicateBuilder
.
lt
(
"updateTime"
,
deviceUseReportSelectVo
.
getEndTime
());
}
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/subject/vo/DeviceUseReportSelectVo.java
浏览文件 @
416bb923
...
...
@@ -22,4 +22,8 @@ public class DeviceUseReportSelectVo extends CustomPage {
@ApiModelProperty
(
value
=
"结束时间"
,
example
=
"2020-10-10 01:10:10"
)
public
Date
endTime
;
@ApiModelProperty
(
value
=
"单位id"
,
example
=
"2020-10-10 01:10:10"
)
public
Integer
unitId
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论