Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
b42bdaba
提交
b42bdaba
authored
5月 12, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
5aa5c7b5
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
315 行增加
和
43 行删除
+315
-43
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+60
-39
DeviceApplyBillServiceImpl.java
...device/apply/service/impl/DeviceApplyBillServiceImpl.java
+1
-1
UploadApplyFile.java
...com/tykj/dev/device/apply/subject/vo/UploadApplyFile.java
+3
-0
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+1
-0
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+20
-3
DeviceStatisticsVo.java
...ykj/dev/device/library/subject/vo/DeviceStatisticsVo.java
+3
-0
RfidController.java
...ain/java/com/tykj/dev/rfid/controller/RfidController.java
+33
-0
WarningDetailSelectVo.java
...va/com/tykj/dev/rfid/entity/vo/WarningDetailSelectVo.java
+15
-0
TaskController.java
...a/com/tykj/dev/device/task/controller/TaskController.java
+13
-0
TaskSelectVo.java
...ava/com/tykj/dev/device/task/subject/vo/TaskSelectVo.java
+14
-0
TaskSelectController.java
...ev/device/taskselect/controller/TaskSelectController.java
+2
-0
MessageSelectVo.java
...va/com/tykj/dev/device/user/base/ret/MessageSelectVo.java
+7
-0
MessageController.java
...kj/dev/device/user/read/controller/MessageController.java
+9
-0
UserRecordDao.java
...a/com/tykj/dev/device/user/subject/dao/UserRecordDao.java
+8
-0
UserRecord.java
...a/com/tykj/dev/device/user/subject/entity/UserRecord.java
+61
-0
UserRecordService.java
...kj/dev/device/user/subject/service/UserRecordService.java
+7
-0
UserRecordServiceImpl.java
...vice/user/subject/service/impl/UserRecordServiceImpl.java
+58
-0
没有找到文件。
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
b42bdaba
...
...
@@ -413,51 +413,72 @@ public class DeviceApplyController {
@PostMapping
(
"/uploadFile"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
uploadFile
(
@RequestBody
@Validated
UploadApplyFile
uploadApplyFile
)
{
if
(
uploadApplyFile
.
getReplyVos
()!=
null
&&
uploadApplyFile
.
getReplyVos
().
size
()>
0
)
{
for
(
ReplyVo
replyVo
:
uploadApplyFile
.
getReplyVos
())
{
ResponseEntity
responseEntity
=
packingController
.
seqsExist
(
replyVo
.
getId
(),
replyVo
.
getNum
(),
replyVo
.
getSeqInterval
());
if
(!
"ok"
.
equals
(
responseEntity
.
getBody
()))
{
return
responseEntity
;
}
TaskBto
taskBto
=
taskService
.
get
(
uploadApplyFile
.
getTaskId
());
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
if
(
uploadApplyFile
.
getStatus
()==
0
){
taskService
.
moveToEnd
(
taskBto
);
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"申请不同意,业务办结"
,
userIds
,
0
);
messageService
.
add
(
messageBto
);
DeviceApplyBill
deviceApplyBill
=
deviceApplyBillService
.
getOne
(
taskBto
.
getBillId
());
deviceApplyBill
.
setApplyStatus
(
1
);
deviceApplyBill
.
setBackFiles
(
FilesUtil
.
stringFileToList
(
uploadApplyFile
.
getBackFiles
()));
if
(
uploadApplyFile
.
getReplyVos
()
!=
null
&&
uploadApplyFile
.
getReplyVos
().
size
()
>
0
)
{
deviceApplyBill
.
setReplyVos
(
JacksonUtil
.
toJSon
(
uploadApplyFile
.
getReplyVos
()));
}
if
(
uploadApplyFile
.
getReplayNumber
()
!=
null
)
{
deviceApplyBill
.
setReplayNumber
(
uploadApplyFile
.
getReplayNumber
());
}
if
(
uploadApplyFile
.
getReplyFiles
()
!=
null
&&
uploadApplyFile
.
getReplyFiles
().
size
()
>
0
)
{
deviceApplyBill
.
setReplyFiles
(
FilesUtil
.
stringFileToList
(
uploadApplyFile
.
getReplyFiles
()));
}
deviceApplyBillService
.
update
(
deviceApplyBill
);
}
if
(
uploadApplyFile
.
getApplyBillDetailVos
()!=
null
&&
uploadApplyFile
.
getApplyBillDetailVos
().
size
()>
0
)
{
for
(
ApplyBillDetailVo
a
:
uploadApplyFile
.
getApplyBillDetailVos
())
{
ResponseEntity
responseEntity
=
packingController
.
seqsNotExist
(
a
.
getPackingId
(),
a
.
getStorageCount
(),
a
.
getSeqInterval
());
if
(!
"ok"
.
equals
(
responseEntity
.
getBody
()))
{
return
responseEntity
;
else
{
if
(
uploadApplyFile
.
getReplyVos
()
!=
null
&&
uploadApplyFile
.
getReplyVos
().
size
()
>
0
)
{
for
(
ReplyVo
replyVo
:
uploadApplyFile
.
getReplyVos
())
{
ResponseEntity
responseEntity
=
packingController
.
seqsExist
(
replyVo
.
getId
(),
replyVo
.
getNum
(),
replyVo
.
getSeqInterval
());
if
(!
"ok"
.
equals
(
responseEntity
.
getBody
()))
{
return
responseEntity
;
}
}
}
}
TaskBto
taskBto
=
taskService
.
get
(
uploadApplyFile
.
getTaskId
());
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
taskService
.
moveToNext
(
taskBto
);
DeviceApplyBill
deviceApplyBill
=
deviceApplyBillService
.
getOne
(
taskBto
.
getBillId
());
deviceApplyBill
.
setApplyStatus
(
4
);
deviceApplyBill
.
setBackFiles
(
FilesUtil
.
stringFileToList
(
uploadApplyFile
.
getBackFiles
()));
if
(
uploadApplyFile
.
getReplyVos
()!=
null
&&
uploadApplyFile
.
getReplyVos
().
size
()>
0
){
deviceApplyBill
.
setReplyVos
(
JacksonUtil
.
toJSon
(
uploadApplyFile
.
getReplyVos
()));
}
if
(
uploadApplyFile
.
getReplayNumber
()!=
null
){
deviceApplyBill
.
setReplayNumber
(
uploadApplyFile
.
getReplayNumber
());
}
if
(
uploadApplyFile
.
getReplyFiles
()!=
null
&&
uploadApplyFile
.
getReplyFiles
().
size
()>
0
){
deviceApplyBill
.
setReplyFiles
(
FilesUtil
.
stringFileToList
(
uploadApplyFile
.
getReplyFiles
()));
}
if
(
uploadApplyFile
.
getApplyBillDetailVos
()!=
null
&&
uploadApplyFile
.
getApplyBillDetailVos
().
size
()>
0
){
deviceApplyBill
.
setApplyStat
(
JacksonUtil
.
toJSon
(
uploadApplyFile
.
getApplyBillDetailVos
()));
}
DeviceApplyBill
deviceApplyBill1
=
deviceApplyBillService
.
update
(
deviceApplyBill
);
if
(
deviceApplyBill
.
getApplyType
()>
1
){
List
<
String
>
seqs
=
new
ArrayList
<>();
List
<
ReplyVo
>
replyVos
=
JacksonUtil
.
readValue
(
deviceApplyBill1
.
getReplyVos
(),
new
TypeReference
<
List
<
ReplyVo
>>()
{
});
if
(
replyVos
!=
null
)
{
for
(
ReplyVo
r
:
replyVos
)
{
seqs
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
r
.
getSeqInterval
()));
if
(
uploadApplyFile
.
getApplyBillDetailVos
()
!=
null
&&
uploadApplyFile
.
getApplyBillDetailVos
().
size
()
>
0
)
{
for
(
ApplyBillDetailVo
a
:
uploadApplyFile
.
getApplyBillDetailVos
())
{
ResponseEntity
responseEntity
=
packingController
.
seqsNotExist
(
a
.
getPackingId
(),
a
.
getStorageCount
(),
a
.
getSeqInterval
());
if
(!
"ok"
.
equals
(
responseEntity
.
getBody
()))
{
return
responseEntity
;
}
}
}
taskService
.
moveToNext
(
taskBto
);
DeviceApplyBill
deviceApplyBill
=
deviceApplyBillService
.
getOne
(
taskBto
.
getBillId
());
deviceApplyBill
.
setApplyStatus
(
4
);
deviceApplyBill
.
setBackFiles
(
FilesUtil
.
stringFileToList
(
uploadApplyFile
.
getBackFiles
()));
if
(
uploadApplyFile
.
getReplyVos
()
!=
null
&&
uploadApplyFile
.
getReplyVos
().
size
()
>
0
)
{
deviceApplyBill
.
setReplyVos
(
JacksonUtil
.
toJSon
(
uploadApplyFile
.
getReplyVos
()));
}
if
(
uploadApplyFile
.
getReplayNumber
()
!=
null
)
{
deviceApplyBill
.
setReplayNumber
(
uploadApplyFile
.
getReplayNumber
());
}
if
(
uploadApplyFile
.
getReplyFiles
()
!=
null
&&
uploadApplyFile
.
getReplyFiles
().
size
()
>
0
)
{
deviceApplyBill
.
setReplyFiles
(
FilesUtil
.
stringFileToList
(
uploadApplyFile
.
getReplyFiles
()));
}
if
(
uploadApplyFile
.
getApplyBillDetailVos
()
!=
null
&&
uploadApplyFile
.
getApplyBillDetailVos
().
size
()
>
0
)
{
deviceApplyBill
.
setApplyStat
(
JacksonUtil
.
toJSon
(
uploadApplyFile
.
getApplyBillDetailVos
()));
}
DeviceApplyBill
deviceApplyBill1
=
deviceApplyBillService
.
update
(
deviceApplyBill
);
if
(
deviceApplyBill
.
getApplyType
()
>
1
)
{
List
<
String
>
seqs
=
new
ArrayList
<>();
List
<
ReplyVo
>
replyVos
=
JacksonUtil
.
readValue
(
deviceApplyBill1
.
getReplyVos
(),
new
TypeReference
<
List
<
ReplyVo
>>()
{
});
if
(
replyVos
!=
null
)
{
for
(
ReplyVo
r
:
replyVos
)
{
seqs
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
r
.
getSeqInterval
()));
}
}
deviceLibraryDao
.
upDateSeqNumbersApplyTaskId
(
taskBto
.
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
浏览文件 @
b42bdaba
...
...
@@ -176,7 +176,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
messageBto
.
setBusinessType
(
taskBto
.
getBusinessType
());
messageService
.
add
(
messageBto
);
}
deviceApplyBill
.
set
ApplyStat
(
JacksonUtil
.
toJSon
(
replyVos
));
deviceApplyBill
.
set
ReplyVos
(
JacksonUtil
.
toJSon
(
replyVos
));
update
(
deviceApplyBill
);
}
}
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/UploadApplyFile.java
浏览文件 @
b42bdaba
...
...
@@ -36,4 +36,7 @@ public class UploadApplyFile {
@ApiModelProperty
(
value
=
"申请批复详情"
)
private
List
<
ApplyBillDetailVo
>
applyBillDetailVos
;
@ApiModelProperty
(
value
=
"申请批复结果(0:未通过,1:通过)"
)
private
Integer
status
;
}
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
b42bdaba
...
...
@@ -313,6 +313,7 @@ public enum LogType {
REPAIR_BACK_19
(
137
,
REPAIR
.
id
,
REPAIR_BACK_WAIT_SIGN
.
id
,
END
.
id
,
"盖电子签章并入库"
),
REPAIR_BACK_20
(
138
,
REPAIR
.
id
,
REPAIR_BACK_WAIT_SIGN
.
id
,
WAIT_UPLOAD_BACK_FILE
.
id
,
"盖电子签章并入库"
),
REPAIR_BACK_21
(
139
,
REPAIR
.
id
,
REPAIR_BACK_SIGN_WAIT_CONFIRM
.
id
,
WAIT_BACK_RECEIVE
.
id
,
"拒绝电子签章申请"
),
APPLY_7
(
140
,
APPLY
.
id
,
WAIT_APPLY_FILE
.
id
,
END
.
id
,
"申请不同意,业务办结"
),
;
public
Integer
id
;
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
b42bdaba
...
...
@@ -257,11 +257,19 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
scrappedNum
++;
scrappedIds
.
add
(
d2
.
getId
());
break
;
case
17
:
scrappedNum
++;
scrappedIds
.
add
(
d2
.
getId
());
break
;
case
18
:
scrappedNum
++;
scrappedIds
.
add
(
d2
.
getId
());
break
;
case
6
:
allot
Num
++;
allot
Ids
.
add
(
d2
.
getId
());
retired
Num
++;
retired
Ids
.
add
(
d2
.
getId
());
break
;
case
15
:
case
7
:
retiredNum
++;
retiredIds
.
add
(
d2
.
getId
());
break
;
...
...
@@ -273,6 +281,14 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
destoryNum
++;
destoryIds
.
add
(
d2
.
getId
());
break
;
case
19
:
destoryNum
++;
destoryIds
.
add
(
d2
.
getId
());
break
;
case
20
:
destoryNum
++;
destoryIds
.
add
(
d2
.
getId
());
break
;
case
13
:
scrappedNum
++;
scrappedIds
.
add
(
d2
.
getId
());
...
...
@@ -305,6 +321,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
deviceStatisticsVo
.
setScrappedNum
(
scrappedNum
);
deviceStatisticsVo
.
setRetiredNum
(
retiredNum
);
deviceStatisticsVo
.
setUseNum
(
useNum
);
deviceStatisticsVo
.
setOtherNum
(
num
-
allotNum
-
inLibraryNum
-
repairNum
-
destoryNum
-
scrappedNum
-
retiredNum
-
useNum
);
deviceStatisticsVo
.
setSeqs
(
StringSplitUtil
.
stringListToString
(
DeviceSeqUtil
.
getContinuousSeqs
(
devSeqs
)));
deviceStatisticsVos
.
add
(
deviceStatisticsVo
);
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceStatisticsVo.java
浏览文件 @
b42bdaba
...
...
@@ -47,6 +47,9 @@ public class DeviceStatisticsVo {
@ApiModelProperty
(
value
=
"使用数量"
,
example
=
"10"
)
private
Integer
useNum
;
@ApiModelProperty
(
value
=
"其他数量"
,
example
=
"10"
)
private
Integer
otherNum
;
@ApiModelProperty
(
value
=
"该型号所有装备Id列表"
)
private
List
<
Integer
>
deviceIds
=
new
ArrayList
<>();
...
...
dev-rfid/src/main/java/com/tykj/dev/rfid/controller/RfidController.java
浏览文件 @
b42bdaba
...
...
@@ -20,6 +20,7 @@ import com.tykj.dev.device.user.util.AuthenticationUtils;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.PageUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.rfid.entity.domin.LibraryWarningLog
;
...
...
@@ -27,6 +28,7 @@ import com.tykj.dev.rfid.entity.domin.RfidChangeBill;
import
com.tykj.dev.rfid.entity.domin.RfidChangeLog
;
import
com.tykj.dev.rfid.entity.enums.RfidChangeStatus
;
import
com.tykj.dev.rfid.entity.vo.*
;
import
com.tykj.dev.rfid.repository.LibraryWarningLogDao
;
import
com.tykj.dev.rfid.service.LibraryWarningLogService
;
import
com.tykj.dev.rfid.service.RfidChangeBillService
;
import
com.tykj.dev.rfid.service.RfidChangeLogService
;
...
...
@@ -48,6 +50,7 @@ import javax.transaction.Transactional;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -81,6 +84,8 @@ public class RfidController {
private
AuthenticationUtils
AuthenticationUtils
;
@Autowired
private
DeviceLogDao
deviceLogDao
;
@Autowired
private
LibraryWarningLogDao
libraryWarningLogDao
;
public
RfidController
(
RfidChangeLogService
rfidChangeLogService
,
RfidService
rfidService
,
LibraryWarningLogService
libraryWarningLogService
,
RfidChangeBillService
rfidChangeBillService
,
InventoryScheduled
inventoryScheduled
)
{
this
.
rfidChangeLogService
=
rfidChangeLogService
;
...
...
@@ -268,6 +273,34 @@ public class RfidController {
return
ResultUtil
.
success
(
inoutWarningDetailVo
);
}
@ApiOperation
(
value
=
"查询所有出库告警装备列表"
,
notes
=
"查询所有入库告警装备列表"
)
@PostMapping
(
value
=
"/out/all"
)
public
ResponseEntity
allOutDevice
(
@RequestBody
WarningDetailSelectVo
warningDetailSelectVo
)
{
Boolean
hasModelDim
=
warningDetailSelectVo
.
getModelDim
()!=
null
;
Boolean
hasNameDim
=
warningDetailSelectVo
.
getNameDim
()!=
null
;
Boolean
hasSeqDim
=
warningDetailSelectVo
.
getSeqDim
()!=
null
;
Boolean
hasInventoryResultsDim
=
warningDetailSelectVo
.
getInventoryResultsDim
()!=
null
;
Boolean
hasCreateTimeDim
=
warningDetailSelectVo
.
getCreateTimeDim
()!=
null
;
List
<
LibraryWarningLog
>
libraryWarningLogs
=
libraryWarningLogDao
.
findAll
();
List
<
WarningDetailListVo
>
warningDetailListVos
=
new
ArrayList
<>();
for
(
LibraryWarningLog
libraryWarningLog
:
libraryWarningLogs
)
{
List
<
WarningDetailListVo
>
warningDetails
=
libraryWarningLogService
.
getWarningDetail
(
libraryWarningLog
.
getId
(),
null
);
warningDetailListVos
.
addAll
(
warningDetails
);
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
hasModelDim
||
hasNameDim
||
hasInventoryResultsDim
||
hasSeqDim
||
hasCreateTimeDim
)
{
warningDetailListVos
=
warningDetailListVos
.
stream
().
filter
(
warningDetailListVo
->
{
Boolean
containModelDim
=
!
hasModelDim
||
warningDetailListVo
.
getDeviceLibraryEntity
().
getModel
().
contains
(
warningDetailSelectVo
.
getModelDim
());
Boolean
containNameDim
=
!
hasNameDim
||
warningDetailListVo
.
getDeviceLibraryEntity
().
getName
().
contains
(
warningDetailSelectVo
.
getNameDim
());
Boolean
containSeqDim
=
!
hasSeqDim
||
warningDetailListVo
.
getDeviceLibraryEntity
().
getSeqNumber
().
contains
(
warningDetailSelectVo
.
getSeqDim
());
Boolean
containInventoryResultsDim
=
!
hasInventoryResultsDim
||
warningDetailListVo
.
getInventoryResults
().
contains
(
warningDetailSelectVo
.
getInventoryResultsDim
());
Boolean
containCreateTimeDim
=
!
hasCreateTimeDim
||
sdf
.
format
(
warningDetailListVo
.
getCreateTime
()).
contains
(
warningDetailSelectVo
.
getCreateTimeDim
());
return
containModelDim
&&
containNameDim
&&
containSeqDim
&&
containInventoryResultsDim
&&
containCreateTimeDim
;
}).
sorted
(
Comparator
.
comparing
(
WarningDetailListVo:
:
getCreateTime
).
reversed
()).
collect
(
Collectors
.
toList
());
}
return
ResultUtil
.
success
(
PageUtil
.
getPerPage
(
warningDetailSelectVo
.
getPage
(),
warningDetailSelectVo
.
getSize
(),
warningDetailListVos
,
warningDetailSelectVo
.
getPageable
()));
}
@ApiOperation
(
value
=
"库房告警日志详情"
,
notes
=
"可以通过这个接口查询告警日志详情"
)
@PostMapping
(
value
=
"/warningDetail"
)
public
ResponseEntity
warningDetail
(
@RequestBody
WarningDetailSelectVo
warningDetailSelectVo
)
{
...
...
dev-rfid/src/main/java/com/tykj/dev/rfid/entity/vo/WarningDetailSelectVo.java
浏览文件 @
b42bdaba
...
...
@@ -18,4 +18,19 @@ public class WarningDetailSelectVo extends CustomPage {
@ApiModelProperty
(
value
=
"告警记录ID"
)
Integer
warningId
;
@ApiModelProperty
(
value
=
"型号模糊查询字段"
)
private
String
modelDim
;
@ApiModelProperty
(
value
=
"名称模糊查询字段"
)
private
String
nameDim
;
@ApiModelProperty
(
value
=
"序列号模糊查询字段"
)
private
String
seqDim
;
@ApiModelProperty
(
value
=
"告警信息模糊查询字段"
)
private
String
inventoryResultsDim
;
@ApiModelProperty
(
value
=
"告警时间模糊查询字段"
)
private
String
createTimeDim
;
}
dev-task/src/main/java/com/tykj/dev/device/task/controller/TaskController.java
浏览文件 @
b42bdaba
...
...
@@ -52,7 +52,20 @@ public class TaskController {
@ApiOperation
(
value
=
"业务分页查询"
,
notes
=
"可以通过这个接口分页查询业务"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/manage/summary"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
getTaskPage
(
@RequestBody
TaskSelectVo
taskSelectVo
)
{
Boolean
hasTitleDim
=
taskSelectVo
.
getTitleDim
()!=
null
;
Boolean
hasStatusDim
=
taskSelectVo
.
getStatusDim
()!=
null
;
Boolean
hasCreateUserDim
=
taskSelectVo
.
getCreateUserDim
()!=
null
;
Boolean
hasProcessingUserDim
=
taskSelectVo
.
getProcessingUserDim
()!=
null
;
List
<
TaskUserVo
>
taskUserVos
=
taskService
.
getManageList
(
taskSelectVo
);
if
(
hasTitleDim
||
hasStatusDim
||
hasCreateUserDim
||
hasProcessingUserDim
)
{
taskUserVos
=
taskUserVos
.
stream
().
filter
(
taskUserVo
->
{
Boolean
containTitleDim
=
!
hasTitleDim
||
taskUserVo
.
getTitle
().
contains
(
taskSelectVo
.
getTitleDim
());
Boolean
containStatusDim
=
!
hasStatusDim
||
taskUserVo
.
getStatus
().
contains
(
taskSelectVo
.
getStatusDim
());
Boolean
containCreateUserDim
=
!
hasCreateUserDim
||
taskUserVo
.
getCreateUser
().
contains
(
taskSelectVo
.
getCreateUserDim
());
Boolean
containProcessingUserDim
=
!
hasProcessingUserDim
||
taskUserVo
.
getProcessingUser
().
contains
(
taskSelectVo
.
getProcessingUserDim
());
return
containTitleDim
&&
containStatusDim
&&
containCreateUserDim
&&
containProcessingUserDim
;
}).
collect
(
Collectors
.
toList
());
}
Page
<
TaskUserVo
>
taskUserVos1
=
PageUtil
.
getPerPage
(
taskSelectVo
.
getPage
(),
taskSelectVo
.
getSize
(),
taskUserVos
,
taskSelectVo
.
getPageable
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
Integer
,
String
>
businessMap
=
GlobalMap
.
getBusinessMap
();
...
...
dev-task/src/main/java/com/tykj/dev/device/task/subject/vo/TaskSelectVo.java
浏览文件 @
b42bdaba
...
...
@@ -30,4 +30,18 @@ public class TaskSelectVo extends CustomPage {
private
Integer
billStatus
;
@ApiModelProperty
(
value
=
"业务备注"
,
example
=
"测试"
)
public
List
<
String
>
remark
;
@ApiModelProperty
(
value
=
"标题模糊查询字段"
)
private
String
titleDim
;
@ApiModelProperty
(
value
=
"状态模糊查询字段"
)
private
String
statusDim
;
@ApiModelProperty
(
value
=
"发起人模糊查询字段"
)
private
String
createUserDim
;
@ApiModelProperty
(
value
=
"待办人模糊查询字段"
)
private
String
processingUserDim
;
}
dev-taskselect/src/main/java/com/tykj/dev/device/taskselect/controller/TaskSelectController.java
浏览文件 @
b42bdaba
...
...
@@ -390,6 +390,8 @@ public class TaskSelectController {
if
(
map
.
size
()>
0
)
{
p
.
setApplyNum
(
map
.
get
(
p
.
getId
()).
getNum
());
p
.
setSeq
(
map
.
get
(
p
.
getId
()).
getSeqInterval
());
p
.
setCompleteNum
(
map
.
get
(
p
.
getId
()).
getCompleteCount
());
p
.
setWaitNum
(
p
.
getApplyNum
()-
p
.
getCompleteNum
());
}
}
packingLibraryEntityList
.
add
(
p
);
...
...
dev-user/src/main/java/com/tykj/dev/device/user/base/ret/MessageSelectVo.java
浏览文件 @
b42bdaba
...
...
@@ -21,4 +21,11 @@ public class MessageSelectVo extends CustomPage {
@ApiModelProperty
(
value
=
"已读/未读"
,
example
=
"0"
)
private
Integer
isRead
;
@ApiModelProperty
(
value
=
"内容模糊查询字段"
)
private
String
contentDim
;
@ApiModelProperty
(
value
=
"状态模糊查询字段"
)
private
String
operatorDim
;
}
dev-user/src/main/java/com/tykj/dev/device/user/read/controller/MessageController.java
浏览文件 @
b42bdaba
...
...
@@ -51,7 +51,16 @@ public class MessageController {
@ApiOperation
(
value
=
"所有阅知信息查询"
)
@PostMapping
(
"/get/all"
)
public
ResponseEntity
getAllMessage
(
@RequestBody
MessageSelectVo
messageSelectVo
){
Boolean
hasContentDim
=
messageSelectVo
.
getContentDim
()!=
null
;
Boolean
hasOperatorDim
=
messageSelectVo
.
getOperatorDim
()!=
null
;
List
<
MessageUserVo
>
messageUserVos
=
messageService
.
getAllList
(
messageSelectVo
);
if
(
hasContentDim
||
hasOperatorDim
)
{
messageUserVos
=
messageUserVos
.
stream
().
filter
(
messageUserVo
->
{
Boolean
containContentDim
=
!
hasContentDim
||
messageUserVo
.
getContent
().
contains
(
messageSelectVo
.
getContentDim
());
Boolean
containOperatorDim
=
!
hasOperatorDim
||
messageUserVo
.
getOperator
().
contains
(
messageSelectVo
.
getOperatorDim
());
return
containContentDim
&&
containOperatorDim
;
}).
collect
(
Collectors
.
toList
());
}
Page
<
MessageUserVo
>
taskUserVos1
=
PageUtil
.
getPerPage
(
messageSelectVo
.
getPage
(),
messageSelectVo
.
getSize
(),
messageUserVos
,
messageSelectVo
.
getPageable
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
Integer
,
String
>
businessMap
=
GlobalMap
.
getBusinessMap
();
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/dao/UserRecordDao.java
0 → 100644
浏览文件 @
b42bdaba
package
com
.
tykj
.
dev
.
device
.
user
.
subject
.
dao
;
import
com.tykj.dev.device.user.subject.entity.UserRecord
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
public
interface
UserRecordDao
extends
JpaRepository
<
UserRecord
,
Integer
>,
JpaSpecificationExecutor
<
UserRecord
>
{
}
dev-user/src/main/java/com/tykj/dev/device/user/subject/entity/UserRecord.java
0 → 100644
浏览文件 @
b42bdaba
package
com
.
tykj
.
dev
.
device
.
user
.
subject
.
entity
;
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.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
java.util.Date
;
@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
@ApiModel
(
value
=
"用户待办阅知记录对象"
,
description
=
"用户记录"
)
public
class
UserRecord
{
@Id
@GeneratedValue
@ApiModelProperty
(
value
=
"id"
,
name
=
"id"
)
@Column
(
columnDefinition
=
"integer NOT NULL AUTO_INCREMENT"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id"
,
name
=
"userId"
)
private
Integer
userId
;
@ApiModelProperty
(
value
=
"待办任务id拼接"
,
name
=
"taskIds"
)
@Column
(
name
=
"task_ids"
,
columnDefinition
=
"TEXT"
)
private
String
taskIds
;
@ApiModelProperty
(
value
=
"阅知任务id拼接"
,
name
=
"readIds"
)
@Column
(
name
=
"read_ids"
,
columnDefinition
=
"TEXT"
)
private
String
readIds
;
@ApiModelProperty
(
value
=
"创建用户id"
)
@CreatedBy
private
Integer
createUserId
;
@ApiModelProperty
(
value
=
"创建时间"
)
@CreatedDate
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新用户id"
)
@LastModifiedBy
private
Integer
updateUserId
;
@ApiModelProperty
(
value
=
"更新时间"
)
@LastModifiedDate
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"删除标记(0:未删除,1:已删除)"
)
private
Integer
deleteTag
=
0
;
}
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/UserRecordService.java
0 → 100644
浏览文件 @
b42bdaba
package
com
.
tykj
.
dev
.
device
.
user
.
subject
.
service
;
import
com.tykj.dev.device.user.subject.entity.UserRecord
;
public
interface
UserRecordService
extends
PublicService
<
UserRecord
>{
}
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UserRecordServiceImpl.java
0 → 100644
浏览文件 @
b42bdaba
package
com
.
tykj
.
dev
.
device
.
user
.
subject
.
service
.
impl
;
import
com.tykj.dev.device.user.subject.dao.UserRecordDao
;
import
com.tykj.dev.device.user.subject.entity.UserRecord
;
import
com.tykj.dev.device.user.subject.service.UserRecordService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
UserRecordServiceImpl
implements
UserRecordService
{
@Autowired
UserRecordDao
userRecordDao
;
/**
* 通用新增接口
*
* @param userRecord 对象
* @return 对象
*/
@Override
public
UserRecord
save
(
UserRecord
userRecord
)
{
return
userRecordDao
.
save
(
userRecord
);
}
/**
* 根据id删除数据
*
* @param id 数据id
* @return 布尔
*/
@Override
public
boolean
delete
(
Integer
id
)
{
return
false
;
}
/**
* 查询所有数据
*
* @return 数据集合
*/
@Override
public
List
<
UserRecord
>
findAll
()
{
return
userRecordDao
.
findAll
();
}
/**
* 更新数据
*
* @param userRecord 对象
* @return 对象
*/
@Override
public
UserRecord
update
(
UserRecord
userRecord
)
{
return
userRecordDao
.
save
(
userRecord
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论