Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
bd762699
提交
bd762699
authored
9月 07, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新业务查询
上级
4d7b4d18
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
33 个修改的文件
包含
749 行增加
和
73 行删除
+749
-73
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+0
-0
pom.xml
dev-device/device-apply/pom.xml
+19
-1
applyApp.java
...ply/src/main/java/com/tykj/dev/device/apply/applyApp.java
+21
-0
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+168
-0
DeviceApplyBillDao.java
.../tykj/dev/device/apply/repository/DeviceApplyBillDao.java
+11
-0
DeviceApplyBillService.java
...tykj/dev/device/apply/service/DeviceApplyBillService.java
+17
-0
DeviceApplyBillServiceImpl.java
...device/apply/service/impl/DeviceApplyBillServiceImpl.java
+36
-0
DeviceApplyBill.java
.../tykj/dev/device/apply/subject/domin/DeviceApplyBill.java
+119
-0
ApplyBillDetailVo.java
...m/tykj/dev/device/apply/subject/vo/ApplyBillDetailVo.java
+24
-0
DeviceApplyAllotSaveVo.java
...j/dev/device/apply/subject/vo/DeviceApplyAllotSaveVo.java
+38
-0
DeviceApplyConfirmVo.java
...ykj/dev/device/apply/subject/vo/DeviceApplyConfirmVo.java
+21
-0
DeviceApplySaveVo.java
...m/tykj/dev/device/apply/subject/vo/DeviceApplySaveVo.java
+58
-0
package-info.java
dev-device/device-apply/src/main/java/package-info.java
+0
-0
pom.xml
dev-device/device-library/pom.xml
+1
-1
DeviceLibraryService.java
...tykj/dev/device/library/service/DeviceLibraryService.java
+0
-3
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+0
-7
DeviceLogServiceImpl.java
...dev/device/library/service/impl/DeviceLogServiceImpl.java
+0
-4
DeviceLogDto.java
...com/tykj/dev/device/library/subject/Dto/DeviceLogDto.java
+1
-1
DeviceLog.java
.../com/tykj/dev/device/library/subject/domin/DeviceLog.java
+1
-3
DeviceLogVo.java
...a/com/tykj/dev/device/library/subject/vo/DeviceLogVo.java
+31
-0
FileVo.java
...n/java/com/tykj/dev/device/library/subject/vo/FileVo.java
+26
-0
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+36
-42
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+1
-1
StorageBillSaveVo.java
...tykj/dev/device/storage/subject/vo/StorageBillSaveVo.java
+2
-2
pom.xml
dev-device/device-task/pom.xml
+5
-0
TaskController.java
...a/com/tykj/dev/device/task/controller/TaskController.java
+0
-0
TaskService.java
...in/java/com/tykj/dev/device/task/service/TaskService.java
+2
-1
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+0
-0
TaskBto.java
...in/java/com/tykj/dev/device/task/subject/bto/TaskBto.java
+21
-5
GlobalMap.java
...va/com/tykj/dev/device/task/subject/common/GlobalMap.java
+1
-1
StatusEnum.java
...a/com/tykj/dev/device/task/subject/common/StatusEnum.java
+7
-1
TaskUserVo.java
.../java/com/tykj/dev/device/task/subject/vo/TaskUserVo.java
+6
-0
TaskUtils.java
...c/main/java/com/tykj/dev/device/task/utils/TaskUtils.java
+76
-0
没有找到文件。
dev-device/device-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
bd762699
差异被折叠。
点击展开。
dev-device/device-apply/pom.xml
浏览文件 @
bd762699
...
...
@@ -10,6 +10,23 @@
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
device-apply
</artifactId>
<dependencies>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-user
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-task
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-allot
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-library
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/applyApp.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
/**
* @author zjm
* @version 1.0.0
* @ClassName userApp.java
* @Description TODO
* @createTime 2020年09月01日 14:32:00
*/
@SpringBootApplication
(
scanBasePackages
={
"com.tykj.dev.*"
,
}
)
public
class
applyApp
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
applyApp
.
class
,
args
);
}
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.allot.service.AllotBillService
;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.apply.service.DeviceApplyBillService
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
com.tykj.dev.device.apply.subject.vo.DeviceApplyAllotSaveVo
;
import
com.tykj.dev.device.apply.subject.vo.DeviceApplyConfirmVo
;
import
com.tykj.dev.device.apply.subject.vo.DeviceApplySaveVo
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskLogBto
;
import
com.tykj.dev.device.task.subject.common.StatusEnum
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.vo.FileVo
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author dengdiyi
*/
@RestController
@Api
(
tags
=
"装备申请模块"
,
description
=
"申请模块"
)
@AutoDocument
@RequestMapping
(
"/apply"
)
public
class
DeviceApplyController
{
@Autowired
private
DeviceApplyBillService
deviceApplyBillService
;
@Autowired
private
UserUtils
userUtils
;
@Autowired
private
TaskService
taskService
;
@Autowired
private
DeviceLogService
deviceLogService
;
@Autowired
private
UserPublicService
userPublicService
;
@Autowired
private
AllotBillService
allotBillService
;
@Autowired
private
TaskLogService
taskLogService
;
@ApiOperation
(
value
=
"发起装备申请"
,
notes
=
"可以通过这个接口发起装备申请"
)
@PostMapping
(
"/addDeviceApplyBill"
)
public
ResponseEntity
<
DeviceApplyBill
>
addDeviceApplyBill
(
@RequestBody
DeviceApplySaveVo
deviceApplySaveVo
){
//添加申请单
DeviceApplyBill
deviceApplyBillEntity
=
deviceApplyBillService
.
addEntity
(
deviceApplySaveVo
.
toDo
());
Integer
userId
=
userUtils
.
getCurrentUserId
();
//发起任务
TaskBto
taskBto
;
if
(
deviceApplySaveVo
.
getReplyUseraId
()!=
null
)
{
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
deviceApplySaveVo
.
getReplyUseraId
());
taskBto
=
new
TaskBto
(
StatusEnum
.
DEVICE_APPLY_CONFIRM
.
id
,
"申请业务"
,
null
,
"."
,
deviceApplyBillEntity
.
getId
(),
9
,
userPublicService
.
findUnitIdByName
(
deviceApplySaveVo
.
getReplyUnit
()),
1
,
null
,
userIds
);
}
else
{
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
0
);
taskBto
=
new
TaskBto
(
StatusEnum
.
DEVICE_APPLY_CONFIRM
.
id
,
"申请业务"
,
null
,
"."
,
deviceApplyBillEntity
.
getId
(),
9
,
userPublicService
.
findUnitIdByName
(
deviceApplySaveVo
.
getReplyUnit
()),
1
,
null
,
userIds
);
}
Task
saveEntity
=
taskService
.
start
(
taskBto
);
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
saveEntity
.
getId
(),
"发起装备申请"
,
null
);
taskLogService
.
addLog
(
taskLogBto
);
return
ResultUtil
.
success
(
deviceApplyBillEntity
);
}
@ApiOperation
(
value
=
"装备申请批复"
,
notes
=
"可以通过这个接口批复"
)
@PostMapping
(
"/replay"
)
public
ResponseEntity
<
TaskBto
>
addDeviceApplyBillReplay
(
@RequestBody
DeviceApplyConfirmVo
deviceApplyConfirmVo
){
TaskBto
taskBto
=
taskService
.
get
(
deviceApplyConfirmVo
.
getTaskId
());
Integer
userId
=
userUtils
.
getCurrentUserId
();
DeviceApplyBill
applyBillEntity
=
deviceApplyBillService
.
getOne
(
taskBto
.
getBillId
());
if
(
deviceApplyConfirmVo
.
getReplyNumber
()!=
null
){
applyBillEntity
.
setReplayNumber
(
deviceApplyConfirmVo
.
getReplyNumber
());
}
//批复驳回
if
(
deviceApplyConfirmVo
.
getStatus
()==
1
){
applyBillEntity
.
setApplyStatus
(
1
);
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
deviceApplyBillService
.
update
(
applyBillEntity
);
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"装备申请批复驳回"
,
null
);
taskLogService
.
addLog
(
taskLogBto
);
return
ResultUtil
.
success
(
taskBto
);
}
//批复成功
if
(
deviceApplyConfirmVo
.
getStatus
()==
0
){
applyBillEntity
.
setApplyStatus
(
2
);
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"装备申请批复通过"
,
null
);
taskLogService
.
addLog
(
taskLogBto
);
//生成配发子任务
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
WAIT_ALLOT
.
id
,
"配发业务"
,
taskBto
.
getId
(),
"."
+
taskBto
.
getId
()+
"."
,
0
,
3
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
Task
task
=
taskService
.
start
(
taskBto1
);
deviceApplyBillService
.
update
(
applyBillEntity
);
return
ResultUtil
.
success
(
task
.
parse2Bto
());
}
else
{
return
ResultUtil
.
failed
();
}
}
@ApiOperation
(
value
=
"装备申请后发起配发"
,
notes
=
"可以通过这个接口装备申请后发起配发"
)
@PostMapping
(
"/allot"
)
public
ResponseEntity
<
String
>
allot
(
@RequestBody
DeviceApplyAllotSaveVo
deviceApplyAllotSaveVo
){
TaskBto
taskBto
=
taskService
.
get
(
deviceApplyAllotSaveVo
.
getTaskId
());
TaskBto
applyTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
Integer
userId
=
userUtils
.
getCurrentUserId
();
DeviceApplyBill
deviceApplyBillEntity
=
deviceApplyBillService
.
getOne
(
applyTask
.
getBillId
());
AllotBill
allotBillEntity
=
new
AllotBill
();
BeanUtils
.
copyProperties
(
deviceApplyAllotSaveVo
,
allotBillEntity
);
allotBillEntity
.
setTitle
(
"申请后配发"
);
allotBillEntity
.
setSendUseraId
(
userId
);
allotBillEntity
.
setReceiveUseraId
(
applyTask
.
getCreateUserId
());
allotBillEntity
.
setApplyNumber
(
deviceApplyBillEntity
.
getApplyNumber
());
allotBillEntity
.
setReplayNumber
(
deviceApplyBillEntity
.
getReplayNumber
());
allotBillEntity
.
setSendUnit
(
deviceApplyBillEntity
.
getReplyUnit
());
allotBillEntity
.
setReceiveUnit
(
deviceApplyBillEntity
.
getApplyUnit
());
allotBillEntity
.
setSendTime
(
new
Date
());
allotBillEntity
.
setAllotType
(
2
);
allotBillEntity
.
setAllotStatus
(
0
);
AllotBill
allotBillEntity1
=
allotBillService
.
addEntity
(
allotBillEntity
);
taskBto
.
setBillId
(
allotBillEntity1
.
getId
());
taskService
.
update
(
taskService
.
moveToNext
(
taskBto
,
deviceApplyAllotSaveVo
.
getSendUserbId
()));
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"出库确认单"
,
allotBillEntity
.
getFileName
(),
allotBillEntity
.
getFileUrl
()));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"对"
+
allotBillEntity
.
getReceiveUnit
()
+
"发起配发"
,
fileVoList
);
taskLogService
.
addLog
(
taskLogBto
);
List
<
Integer
>
integerList
=
StringSplitUtil
.
split
(
allotBillEntity
.
getAllotCheckDetail
());
if
(
integerList
.
size
()>
0
)
{
for
(
Integer
id
:
integerList
)
{
if
(
id
>
0
)
{
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"对"
+
allotBillEntity
.
getReceiveUnit
()
+
"发起配发"
,
fileVoList
);
deviceLogService
.
addLog
(
deviceLogDto
);
}
}
}
return
ResultUtil
.
success
(
"发起配发成功"
);
}
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/repository/DeviceApplyBillDao.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
repository
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
/**
* @author dengdiyi
*/
public
interface
DeviceApplyBillDao
extends
JpaRepository
<
DeviceApplyBill
,
Integer
>,
JpaSpecificationExecutor
<
DeviceApplyBill
>
{
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/service/DeviceApplyBillService.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
service
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
/**
* @author dengdiyi
*/
public
interface
DeviceApplyBillService
{
DeviceApplyBill
addEntity
(
DeviceApplyBill
deviceApplyBillEntity
);
DeviceApplyBill
update
(
DeviceApplyBill
deviceApplyBillEntity
);
DeviceApplyBill
getOne
(
Integer
id
);
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/service/impl/DeviceApplyBillServiceImpl.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
service
.
impl
;
import
com.tykj.dev.device.apply.repository.DeviceApplyBillDao
;
import
com.tykj.dev.device.apply.service.DeviceApplyBillService
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Optional
;
/**
* @author dengdiyi
*/
@Service
public
class
DeviceApplyBillServiceImpl
implements
DeviceApplyBillService
{
@Autowired
private
DeviceApplyBillDao
deviceApplyBillDao
;
@Override
public
DeviceApplyBill
addEntity
(
DeviceApplyBill
deviceApplyBillEntity
)
{
return
deviceApplyBillDao
.
save
(
deviceApplyBillEntity
);
}
@Override
public
DeviceApplyBill
update
(
DeviceApplyBill
deviceApplyBillEntity
)
{
return
deviceApplyBillDao
.
save
(
deviceApplyBillEntity
);
}
@Override
public
DeviceApplyBill
getOne
(
Integer
id
)
{
Optional
<
DeviceApplyBill
>
deviceApplyBillEntity
=
deviceApplyBillDao
.
findById
(
id
);
return
deviceApplyBillEntity
.
orElse
(
null
);
}
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/subject/domin/DeviceApplyBill.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
subject
.
domin
;
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 device_apply_bill
* 申请账单
*/
@Data
@Entity
@EntityListeners
(
AuditingEntityListener
.
class
)
@SQLDelete
(
sql
=
"update device_apply_bill set delete_tag = 1 where id = ?"
)
@Where
(
clause
=
"delete_tag = 0"
)
@ApiModel
(
"申请账单"
)
public
class
DeviceApplyBill
{
/**
* 主键id
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@ApiModelProperty
(
name
=
"主键id"
)
private
Integer
id
;
/**
* 申请文号
*/
@ApiModelProperty
(
value
=
"申请文号"
)
private
String
applyNumber
;
/**
* 批复文号
*/
@ApiModelProperty
(
value
=
"批复文号"
)
private
String
replayNumber
;
/**
* 申请单位
*/
@ApiModelProperty
(
value
=
"申请单位"
)
private
String
applyUnit
;
/**
* 批复单位
*/
@ApiModelProperty
(
value
=
"批复单位"
)
private
String
replyUnit
;
/**
* 经办人
*/
@ApiModelProperty
(
value
=
"经办人"
)
private
String
agent
;
/**
* 配发单id
*/
@ApiModelProperty
(
value
=
"配发单id"
)
private
Integer
allotId
;
/**
* 申请方id(A岗位)
*/
@ApiModelProperty
(
value
=
"申请方id(A岗位)"
)
private
Integer
applyUseraId
;
/**
* 批复方id(A岗位)
*/
@ApiModelProperty
(
value
=
"批复方id(A岗位)"
)
private
Integer
replyUseraId
;
/**
* 申请状态(0:申请待审核,1:申请审核失败,2:申请中,3:已批复待审核,4:批复审核失败,5:申请成功)
*/
@ApiModelProperty
(
value
=
"申请状态(0:申请待审核,1:申请审核失败,2:申请中,3:驳回,4:申请成功)"
)
private
Integer
applyStatus
;
/**
* 列装库主键idx数量(,作为分隔符),例如1x2,2x3,意为列装库id为1的申请2件,id为2的申请3件
*/
@ApiModelProperty
(
value
=
"列装库主键idx数量(,作为分隔符),例如1x2,2x3,意为列装库id为1的申请2件,id为2的申请3件"
)
private
String
applyDetail
;
/**
* 创建用户id
*/
@CreatedBy
@ApiModelProperty
(
value
=
"创建用户id"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@CreatedDate
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 更新用户id
*/
@LastModifiedBy
@ApiModelProperty
(
value
=
"更新用户id"
)
private
Integer
updateUserId
;
/**
* 更新时间
*/
@LastModifiedDate
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
/**
* 删除标记(0:未删除,1:已删除)
*/
@ApiModelProperty
(
value
=
"删除标记(0:未删除,1:已删除)"
)
private
Integer
deleteTag
=
0
;
@ApiModelProperty
(
value
=
"申请人"
)
@Transient
private
String
applyUser
;
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/ApplyBillDetailVo.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"入库详情类"
)
public
class
ApplyBillDetailVo
{
@ApiModelProperty
(
value
=
"列装id"
)
private
Integer
packingId
;
@ApiModelProperty
(
value
=
"申请数量"
)
private
Integer
storageCount
;
@ApiModelProperty
(
value
=
"配件列表"
)
List
<
ApplyBillDetailVo
>
list
;
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/DeviceApplyAllotSaveVo.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"申请后配发类"
)
public
class
DeviceApplyAllotSaveVo
{
@ApiModelProperty
(
value
=
"发件方(B岗位)"
)
private
Integer
sendUserbId
;
@ApiModelProperty
(
value
=
"账单文件名"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"账单文件地址URL"
)
private
String
fileUrl
;
@ApiModelProperty
(
value
=
"配发设备数量"
)
private
Integer
allotCount
;
@ApiModelProperty
(
value
=
"已配发设备数量"
)
private
Integer
allotedCount
;
@ApiModelProperty
(
value
=
"配发出库检查详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配)"
)
private
String
allotCheckDetail
;
@ApiModelProperty
(
value
=
"配发出库检查结果"
)
private
String
allotCheckResult
;
@ApiModelProperty
(
value
=
"对应任务ID"
,
example
=
"1"
)
private
Integer
taskId
;
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/DeviceApplyConfirmVo.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"申请审核类"
)
public
class
DeviceApplyConfirmVo
{
@ApiModelProperty
(
value
=
"对应任务ID"
,
example
=
"1"
)
private
Integer
taskId
;
@ApiModelProperty
(
name
=
"需要修改的状态"
,
example
=
"0"
,
value
=
"0为审核通过,1为驳回"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"批复文号"
)
private
String
replyNumber
;
}
dev-device/device-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/DeviceApplySaveVo.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
apply
.
subject
.
vo
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
java.util.List
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"装备申请存储类"
)
public
class
DeviceApplySaveVo
{
@ApiModelProperty
(
value
=
"申请文号"
)
private
String
applyNumber
;
@ApiModelProperty
(
value
=
"批复文号"
)
private
String
replayNumber
;
@ApiModelProperty
(
value
=
"申请单位"
)
private
String
applyUnit
;
@ApiModelProperty
(
value
=
"批复单位"
)
private
String
replyUnit
;
@ApiModelProperty
(
value
=
"经办人"
)
private
String
agent
;
@ApiModelProperty
(
value
=
"申请人id"
)
private
Integer
applyUseraId
;
@ApiModelProperty
(
value
=
"批复人id"
)
private
Integer
replyUseraId
;
@ApiModelProperty
(
value
=
"入库列装数量详情"
)
private
List
<
ApplyBillDetailVo
>
storageBillDetailVoList
;
public
DeviceApplyBill
toDo
(){
DeviceApplyBill
deviceApplyBillEntity
=
new
DeviceApplyBill
();
BeanUtils
.
copyProperties
(
this
,
deviceApplyBillEntity
);
deviceApplyBillEntity
.
setApplyStatus
(
0
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
stringBuffer
.
append
(
"x"
);
if
(
this
.
storageBillDetailVoList
.
size
()>
0
){
for
(
ApplyBillDetailVo
s:
storageBillDetailVoList
)
{
stringBuffer
.
append
(
s
.
getPackingId
()).
append
(
"x"
);
stringBuffer
.
append
(
s
.
getStorageCount
()).
append
(
"x"
);
}
}
deviceApplyBillEntity
.
setApplyDetail
(
stringBuffer
.
toString
());
return
deviceApplyBillEntity
;
}
}
dev-device/device-apply/src/main/java/package-info.java
deleted
100644 → 0
浏览文件 @
4d7b4d18
dev-device/device-library/pom.xml
浏览文件 @
bd762699
...
...
@@ -11,7 +11,7 @@
<dependencies>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-
task
</artifactId>
<artifactId>
device-
user
</artifactId>
</dependency>
</dependencies>
<artifactId>
device-library
</artifactId>
...
...
dev-device/device-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryService.java
浏览文件 @
bd762699
...
...
@@ -2,7 +2,6 @@ package com.tykj.dev.device.library.service;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo
;
import
com.tykj.dev.device.task.subject.vo.BussinessLogVo
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
...
...
@@ -28,8 +27,6 @@ public interface DeviceLibraryService {
List
<
String
>
getAllName
();
List
<
BussinessLogVo
>
getDeviceLog
(
Integer
id
);
List
<
DeviceLibrary
>
getList
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
);
List
<
DeviceLibrary
>
getAllList
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
);
...
...
dev-device/device-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
bd762699
...
...
@@ -6,7 +6,6 @@ import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo
;
import
com.tykj.dev.device.task.subject.vo.BussinessLogVo
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
...
...
@@ -272,12 +271,6 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
return
new
ArrayList
<>(
s
);
}
@Override
public
List
<
BussinessLogVo
>
getDeviceLog
(
Integer
id
)
{
return
null
;
}
@Override
public
List
<
DeviceLibrary
>
getList
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryDao
.
findAll
(
getSelectSpecification
(
deviceLibrarySelectVo
));
...
...
dev-device/device-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLogServiceImpl.java
浏览文件 @
bd762699
...
...
@@ -4,15 +4,11 @@ import com.tykj.dev.device.library.repository.DeviceLogDao;
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.DeviceLog
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Optional
;
...
...
dev-device/device-library/src/main/java/com/tykj/dev/device/library/subject/Dto/DeviceLogDto.java
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
Dto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.
task
.subject.vo.FileVo
;
import
com.tykj.dev.device.
library
.subject.vo.FileVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
dev-device/device-library/src/main/java/com/tykj/dev/device/library/subject/domin/DeviceLog.java
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
domin
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.vo.FileVo
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
dev-device/device-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLogVo.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"装备详情日志返回类"
)
public
class
DeviceLogVo
{
@ApiModelProperty
(
value
=
"时间"
)
private
Date
time
;
@ApiModelProperty
(
value
=
"单位"
)
private
String
unit
;
@ApiModelProperty
(
value
=
"用户"
)
private
String
user
;
@ApiModelProperty
(
value
=
"操作"
)
private
String
operation
;
@ApiModelProperty
(
value
=
"单据列表"
)
private
List
<
FileVo
>
fileVoList
;
}
dev-device/device-library/src/main/java/com/tykj/dev/device/library/subject/vo/FileVo.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author dengdiyi
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"附件信息返回类"
)
public
class
FileVo
{
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
@ApiModelProperty
(
value
=
"附件名"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"附件url"
)
private
String
fileUrl
;
}
dev-device/device-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
bd762699
...
...
@@ -3,13 +3,16 @@ package com.tykj.dev.device.selfcheck.controller;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
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.selfcheck.service.SelfCheckBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.vo.*
;
import
com.tykj.dev.device.task.
repository.TaskDao
;
import
com.tykj.dev.device.task.
service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskLogBto
;
import
com.tykj.dev.device.task.subject.common.StatusEnum
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
...
...
@@ -43,20 +46,17 @@ public class SelfCheckController {
@Autowired
private
TaskService
taskService
;
@Autowired
private
TaskDao
taskDao
;
@Autowired
private
DeviceLibraryService
deviceLibraryService
;
@Autowired
private
DeviceLibraryDao
deviceLibraryDao
;
//
@Autowired
//
private DeviceLogService deviceLogService;
//
//
@Autowired
// private DeviceLogDao deviceLogDao
;
@Autowired
private
DeviceLogService
deviceLogService
;
@Autowired
private
TaskLogService
taskLogService
;
@Autowired
private
UserPublicService
userPublicService
;
...
...
@@ -151,17 +151,15 @@ public class SelfCheckController {
userIds
.
add
(
selfExaminationBillEntity1
.
getUserbId
());
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"自查业务"
,
null
,
"."
,
selfExaminationBillEntity1
.
getId
(),
4
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
Task
saveEntity
=
taskService
.
start
(
taskBto
);
// for (String s:strings) {
// if (s.length()>=2) {
// Integer id = Integer.parseInt(s.substring(0, s.length() - 1));
// LogVo bussinessLogVo = new LogVo();
// bussinessLogVo.setDeviceId(id);
// bussinessLogVo.setFileDetail("Ǵ");
// bussinessLogVo.setRemark("发起自查");
// bussinessLogVo.setTaskId(saveEntity.getId());
// deviceLogService.addLog(bussinessLogVo);
// }
// }
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
saveEntity
.
getId
(),
"发起自查"
,
null
);
taskLogService
.
addLog
(
taskLogBto
);
for
(
String
s:
strings
)
{
if
(
s
.
length
()>=
2
)
{
Integer
id
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"发起自查"
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
}
}
return
ResultUtil
.
success
(
selfExaminationBillEntity1
);
}
...
...
@@ -175,37 +173,33 @@ public class SelfCheckController {
//审核通过,改变账单和任务状态,发起确认的任务
if
(
selfExaminationConfirmVo
.
getStatus
()==
0
){
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"自查审核成功"
,
null
);
taskLogService
.
addLog
(
taskLogBto
);
selfExaminationBillEntity
.
setCheckStatus
(
2
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity
);
// for (String s:strings) {
// if (s.length()>=2) {
// Integer id = Integer.parseInt(s.substring(0, s.length() - 1));
// LogVo bussinessLogVo = new LogVo();
// bussinessLogVo.setDeviceId(id);
// bussinessLogVo.setFileDetail("Ǵ");
// bussinessLogVo.setRemark("自查审核成功");
// bussinessLogVo.setTaskId(taskBto.getId());
// deviceLogService.addLog(bussinessLogVo);
// }
// }
for
(
String
s:
strings
)
{
if
(
s
.
length
()>=
2
)
{
Integer
id
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"自查审核成功"
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
}
}
return
ResultUtil
.
success
(
"审核通过自查完成"
);
}
//审核不通过,改变账单和任务状态
if
(
selfExaminationConfirmVo
.
getStatus
()==
1
){
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"自查审核失败"
,
null
);
taskLogService
.
addLog
(
taskLogBto
);
selfExaminationBillEntity
.
setCheckStatus
(
1
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity
);
// for (String s:strings) {
// if (s.length()>=2) {
// Integer id = Integer.parseInt(s.substring(0, s.length() - 1));
// LogVo bussinessLogVo = new LogVo();
// bussinessLogVo.setDeviceId(id);
// bussinessLogVo.setFileDetail("Ǵ");
// bussinessLogVo.setRemark("自查审核失败");
// bussinessLogVo.setTaskId(taskBto.getId());
// deviceLogService.addLog(bussinessLogVo);
// }
// }
for
(
String
s:
strings
)
{
if
(
s
.
length
()>=
2
)
{
Integer
id
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"自查审核失败"
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
}
}
return
ResultUtil
.
success
(
"自查审核失败"
);
}
else
{
...
...
dev-device/device-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
bd762699
...
...
@@ -117,7 +117,7 @@ public class StorageBillController {
//2.发起入库任务
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
storageBillSaveVo
.
getReceiveUser
B
Id
());
userIds
.
add
(
storageBillSaveVo
.
getReceiveUser
b
Id
());
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
STORAGE_CONFIRM
.
id
,
"入库业务"
,
null
,
"."
,
storageBillEntity
.
getId
(),
2
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
Task
taskEntity1
=
taskService
.
start
(
taskBto
);
//存业务日志
...
...
dev-device/device-storage/src/main/java/com/tykj/dev/device/storage/subject/vo/StorageBillSaveVo.java
浏览文件 @
bd762699
...
...
@@ -32,10 +32,10 @@ public class StorageBillSaveVo {
private
Date
sendTime
;
@ApiModelProperty
(
value
=
"接收单位A岗"
)
private
Integer
receiveUser
A
Id
;
private
Integer
receiveUser
a
Id
;
@ApiModelProperty
(
value
=
"接收单位B岗"
)
private
Integer
receiveUser
B
Id
;
private
Integer
receiveUser
b
Id
;
@ApiModelProperty
(
value
=
"配发单附件名"
)
private
String
fileName
;
...
...
dev-device/device-task/pom.xml
浏览文件 @
bd762699
...
...
@@ -21,6 +21,10 @@
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-user
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-library
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-device/device-task/src/main/java/com/tykj/dev/device/task/controller/TaskController.java
0 → 100644
浏览文件 @
bd762699
差异被折叠。
点击展开。
dev-device/device-task/src/main/java/com/tykj/dev/device/task/service/TaskService.java
浏览文件 @
bd762699
...
...
@@ -4,6 +4,7 @@ import com.tykj.dev.device.task.subject.bto.TaskBto;
import
com.tykj.dev.device.task.subject.common.StatusEnum
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.vo.TaskSelectVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
java.util.List
;
...
...
@@ -95,5 +96,5 @@ public interface TaskService {
* @param taskSelectVo
* 获取跟踪和待办业务列表
*/
List
<
Task
>
getList
(
TaskSelectVo
taskSelectVo
);
List
<
Task
UserVo
>
getList
(
TaskSelectVo
taskSelectVo
);
}
dev-device/device-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
bd762699
差异被折叠。
点击展开。
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/bto/TaskBto.java
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
task
.
subject
.
bto
;
import
com.tykj.dev.device.task.subject.common.GlobalMap
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -9,11 +11,10 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -22,8 +23,12 @@ import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Repository
public
class
TaskBto
{
@Autowired
private
UserPublicService
userPublicService
;
@ApiModelProperty
(
value
=
"主键id"
)
private
Integer
id
;
...
...
@@ -54,6 +59,15 @@ public class TaskBto {
@ApiModelProperty
(
value
=
"自定义信息,针对不同业务需要保存一些自定信息"
)
private
String
customInfo
;
@ApiModelProperty
(
value
=
"创建用户id"
)
private
Integer
createUserId
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"置顶用户id的List"
)
private
List
<
Integer
>
topFlagDetailList
;
...
...
@@ -86,7 +100,9 @@ public class TaskBto {
//复制相同属性
ModelMapper
modelMapper
=
BeanHelper
.
getUserMapper
();
TaskUserVo
taskUserVo
=
modelMapper
.
map
(
this
,
TaskUserVo
.
class
);
//set vo字段 toDo
//set vo字段
taskUserVo
.
setStartUnit
(
userPublicService
.
findUnitsNameByUserId
(
this
.
createUserId
));
taskUserVo
.
setStatus
(
GlobalMap
.
getStatusEnumMap
().
get
(
this
.
billStatus
).
name
);
return
taskUserVo
;
}
...
...
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/common/GlobalMap.java
浏览文件 @
bd762699
...
...
@@ -17,7 +17,7 @@ public class GlobalMap {
.
collect
(
Collectors
.
toMap
(
statusEnum
->
statusEnum
.
id
,
Function
.
identity
()));
}
public
static
Map
<
Integer
,
StatusEnum
>
get
Hash
Map
()
{
public
static
Map
<
Integer
,
StatusEnum
>
get
StatusEnum
Map
()
{
return
statusEnumMap
;
}
}
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/common/StatusEnum.java
浏览文件 @
bd762699
...
...
@@ -85,7 +85,13 @@ public enum StatusEnum {
/**
* 自查待审核
*/
SELF_CHECK_CONFIRM
(
401
,
"自查待审核"
);
SELF_CHECK_CONFIRM
(
401
,
"自查待审核"
),
/**
* 装备申请待批复
*/
DEVICE_APPLY_CONFIRM
(
500
,
"装备申请待批复"
),
;
public
Integer
id
;
...
...
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/vo/TaskUserVo.java
浏览文件 @
bd762699
...
...
@@ -53,6 +53,12 @@ public class TaskUserVo {
@ApiModelProperty
(
value
=
"工作涉及人员id"
)
private
List
<
Integer
>
involveUserIdList
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"跟踪时间"
)
@Transient
private
String
userTime
;
...
...
dev-device/device-task/src/main/java/com/tykj/dev/device/task/utils/TaskUtils.java
0 → 100644
浏览文件 @
bd762699
package
com
.
tykj
.
dev
.
device
.
task
.
utils
;
import
com.tykj.dev.device.task.subject.domin.TaskLog
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.List
;
/**
* @author dengdiyi
* task工具类
*/
@Component
public
class
TaskUtils
{
/**
* @param list 业务日志list
* 按照日志创建时间降序排列
*/
public
List
<
TaskLog
>
orderByCreateTimeDesc
(
List
<
TaskLog
>
list
){
Collections
.
sort
(
list
,
(
o1
,
o2
)
->
{
int
flag
=
o2
.
getCreateTime
().
compareTo
(
o1
.
getCreateTime
());
return
flag
;
});
return
list
;
}
/**
* @param list taskUserVo list
* 按照跟踪时间增序排列
*/
public
List
<
TaskUserVo
>
orderByUserTimeDateAsc
(
List
<
TaskUserVo
>
list
){
Collections
.
sort
(
list
,
(
o1
,
o2
)
->
{
int
flag
=
o1
.
getUserTimeDate
().
compareTo
(
o2
.
getUserTimeDate
());
return
flag
;
});
return
list
;
}
/**
* @param list taskUserVo list
* 按照跟踪时间降序排列
*/
public
List
<
TaskUserVo
>
orderByUserTimeDateDesc
(
List
<
TaskUserVo
>
list
){
Collections
.
sort
(
list
,
(
o1
,
o2
)
->
{
int
flag
=
o2
.
getUserTimeDate
().
compareTo
(
o1
.
getUserTimeDate
());
return
flag
;
});
return
list
;
}
/**
* @param list taskUserVo list
* 按照待办时间增序排列
*/
public
List
<
TaskUserVo
>
orderByTrackingTimeDateAsc
(
List
<
TaskUserVo
>
list
){
Collections
.
sort
(
list
,
(
o1
,
o2
)
->
{
int
flag
=
o1
.
getTrackingTimeDate
().
compareTo
(
o2
.
getTrackingTimeDate
());
return
flag
;
});
return
list
;
}
/**
* @param list taskUserVo list
* 按照待办时间降序排列
*/
public
List
<
TaskUserVo
>
orderByTrackingTimeDateDesc
(
List
<
TaskUserVo
>
list
){
Collections
.
sort
(
list
,
(
o1
,
o2
)
->
{
int
flag
=
o2
.
getTrackingTimeDate
().
compareTo
(
o1
.
getTrackingTimeDate
());
return
flag
;
});
return
list
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论