Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
b4c1355a
提交
b4c1355a
authored
12月 02, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改维修bug
上级
5e141d45
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
30 行增加
和
523 行删除
+30
-523
pom.xml
dev-allot/pom.xml
+0
-6
AllotBackBillController.java
.../dev/device/allot/controller/AllotBackBillController.java
+2
-2
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+2
-2
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+4
-3
pom.xml
dev-read/pom.xml
+0
-27
MessageController.java
...om/tykj/dev/device/read/controller/MessageController.java
+0
-44
readApp.java
dev-read/src/main/java/com/tykj/dev/device/read/readApp.java
+0
-21
MessageDao.java
.../java/com/tykj/dev/device/read/repository/MessageDao.java
+0
-13
MessageService.java
...java/com/tykj/dev/device/read/service/MessageService.java
+0
-35
MessageServiceImpl.java
...tykj/dev/device/read/service/impl/MessageServiceImpl.java
+0
-96
MessageBto.java
...java/com/tykj/dev/device/read/subject/bto/MessageBto.java
+0
-104
Message.java
.../java/com/tykj/dev/device/read/subject/domin/Message.java
+0
-89
MessageUserVo.java
...va/com/tykj/dev/device/read/subject/vo/MessageUserVo.java
+0
-50
pom.xml
dev-repair/pom.xml
+0
-6
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+8
-6
SendBackServiceImpl.java
...dev/device/sendback/service/impl/SendBackServiceImpl.java
+0
-2
pom.xml
dev-storage/pom.xml
+0
-6
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+3
-4
pom.xml
dev-union/pom.xml
+0
-5
MessageController.java
...kj/dev/device/user/read/controller/MessageController.java
+11
-2
没有找到文件。
dev-allot/pom.xml
浏览文件 @
b4c1355a
...
...
@@ -40,10 +40,5 @@
<groupId>
com.tykj.dev
</groupId>
<artifactId>
rfid
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-read
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBackBillController.java
浏览文件 @
b4c1355a
...
...
@@ -13,10 +13,10 @@ import com.tykj.dev.device.library.service.DeviceLogService;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.read.service.MessageService
;
import
com.tykj.dev.device.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
b4c1355a
...
...
@@ -14,11 +14,11 @@ import com.tykj.dev.device.library.service.DeviceLogService;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.read.service.MessageService
;
import
com.tykj.dev.device.read.subject.bto.MessageBto
;
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.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
b4c1355a
...
...
@@ -17,14 +17,14 @@ import com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.packing.service.PackingLibraryService
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.read.service.MessageService
;
import
com.tykj.dev.device.read.subject.bto.MessageBto
;
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.domin.Task
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
...
...
@@ -202,6 +202,7 @@ public class DeviceApplyController {
//获取申请的业务
TaskBto
applyTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
Integer
userId
=
userUtils
.
getCurrentUserId
();
taskService
.
addInvolveUser
(
taskBto
,
userId
);
//获取申请账单
DeviceApplyBill
deviceApplyBillEntity
=
deviceApplyBillService
.
getOne
(
applyTask
.
getBillId
());
//添加配发单
...
...
@@ -260,7 +261,7 @@ public class DeviceApplyController {
userIds
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBillEntity
.
getReceiveUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
taskBto1
.
getId
(),
taskBto1
.
getBusinessType
(),
"对"
+
allotBillEntity
.
getReceiveUnit
()
+
"发起配发"
,
userIds
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto1
.
getId
(),
taskBto1
.
getBusinessType
(),
allotBillEntity
.
getSendUnit
()
+
"对"
+
allotBillEntity
.
getReceiveUnit
()
+
"发起配发"
,
userIds
);
messageService
.
add
(
messageBto
);
log
.
info
(
"[申请模块]:装备申请后发起配发"
);
myWebSocket
.
sendMessage1
();
...
...
dev-read/pom.xml
deleted
100644 → 0
浏览文件 @
5e141d45
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
equip
</artifactId>
<groupId>
com.tykj
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
dev-read
</artifactId>
<dependencies>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
config
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-user
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-read/src/main/java/com/tykj/dev/device/read/controller/MessageController.java
deleted
100644 → 0
浏览文件 @
5e141d45
package
com
.
tykj
.
dev
.
device
.
read
.
controller
;
/**
* @author dengdiyi
*/
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.read.service.MessageService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
/**
* @author dengdiyi
*/
@RestController
@Api
(
tags
=
"阅知模块"
,
description
=
"阅知模块"
)
@AutoDocument
@RequestMapping
(
"/read"
)
public
class
MessageController
{
@Autowired
private
MessageService
messageService
;
@ApiOperation
(
value
=
"阅知信息查询"
)
@GetMapping
(
"/get"
)
public
ResponseEntity
getMessage
(){
return
ResponseEntity
.
ok
(
messageService
.
getList
());
}
@ApiOperation
(
value
=
"提交已读阅知信息"
)
@PostMapping
(
"/read/{id}"
)
public
ResponseEntity
readMessage
(
@PathVariable
(
"id"
)
int
id
){
return
ResponseEntity
.
ok
(
messageService
.
read
(
id
).
parse2Bto
().
toVo
());
}
@ApiOperation
(
value
=
"完成阅知信息"
)
@PostMapping
(
"/complete/{id}"
)
public
ResponseEntity
completeMessage
(
@PathVariable
(
"id"
)
int
id
){
return
ResponseEntity
.
ok
(
messageService
.
complete
(
id
).
parse2Bto
().
toVo
());
}
}
dev-read/src/main/java/com/tykj/dev/device/read/readApp.java
deleted
100644 → 0
浏览文件 @
5e141d45
package
com
.
tykj
.
dev
.
device
.
read
;
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
readApp
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
readApp
.
class
,
args
);
}
}
dev-read/src/main/java/com/tykj/dev/device/read/repository/MessageDao.java
deleted
100644 → 0
浏览文件 @
5e141d45
package
com
.
tykj
.
dev
.
device
.
read
.
repository
;
import
com.tykj.dev.device.read.subject.domin.Message
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.stereotype.Repository
;
/**
* @author dengdiyi
*/
@Repository
public
interface
MessageDao
extends
JpaRepository
<
Message
,
Integer
>,
JpaSpecificationExecutor
<
Message
>
{
}
dev-read/src/main/java/com/tykj/dev/device/read/service/MessageService.java
deleted
100644 → 0
浏览文件 @
5e141d45
package
com
.
tykj
.
dev
.
device
.
read
.
service
;
import
com.tykj.dev.device.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.read.subject.domin.Message
;
import
com.tykj.dev.device.read.subject.vo.MessageUserVo
;
import
java.util.List
;
/**
* @author dengdiyi
*/
public
interface
MessageService
{
MessageBto
add
(
MessageBto
messageBto
);
Message
update
(
Message
message
);
Message
get
(
Integer
id
);
void
delete
(
Integer
id
);
List
<
MessageUserVo
>
getList
();
/**
* @param messageId 阅知信息id
* 阅读该信息
*/
Message
read
(
Integer
messageId
);
/**
* @param messageId 阅知信息id
* 完成该阅知信息
*/
Message
complete
(
Integer
messageId
);
}
dev-read/src/main/java/com/tykj/dev/device/read/service/impl/MessageServiceImpl.java
deleted
100644 → 0
浏览文件 @
5e141d45
package
com
.
tykj
.
dev
.
device
.
read
.
service
.
impl
;
import
com.tykj.dev.device.read.repository.MessageDao
;
import
com.tykj.dev.device.read.service.MessageService
;
import
com.tykj.dev.device.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.read.subject.domin.Message
;
import
com.tykj.dev.device.read.subject.vo.MessageUserVo
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* @author dengdiyi
*/
@Service
public
class
MessageServiceImpl
implements
MessageService
{
@Autowired
private
MessageDao
messageDao
;
@Autowired
private
UserUtils
userUtils
;
@Override
public
MessageBto
add
(
MessageBto
messageBto
)
{
return
messageDao
.
save
(
messageBto
.
toDo
()).
parse2Bto
();
}
@Override
public
Message
update
(
Message
message
)
{
return
messageDao
.
save
(
message
);
}
@Override
public
Message
get
(
Integer
id
)
{
Optional
<
Message
>
message
=
messageDao
.
findById
(
id
);
if
(
message
.
isPresent
()){
return
message
.
get
();
}
else
{
throw
new
ApiException
(
"Id不存在"
);
}
}
@Override
public
void
delete
(
Integer
id
)
{
messageDao
.
deleteById
(
id
);
}
@Override
public
List
<
MessageUserVo
>
getList
()
{
Integer
userId
=
userUtils
.
getCurrentUserId
();
return
messageDao
.
findAll
().
stream
()
.
map
(
Message:
:
parse2Bto
)
.
filter
(
messageBto
->
messageBto
.
getInvolveUserIdList
().
contains
(
userId
)&&!
messageBto
.
getCompleteUserIdList
().
contains
(
userId
))
.
map
(
MessageBto:
:
toVo
)
.
sorted
(
Comparator
.
comparing
(
MessageUserVo:
:
getCreateTime
).
reversed
())
.
collect
(
Collectors
.
toList
());
}
/**
* @param messageId 阅知信息id
*/
@Override
public
Message
read
(
Integer
messageId
)
{
Integer
userId
=
userUtils
.
getCurrentUserId
();
MessageBto
messageBto
=
get
(
messageId
).
parse2Bto
();
List
<
Integer
>
userIds
=
messageBto
.
getUserReadDetailList
();
userIds
.
add
(
userId
);
messageBto
.
setUserReadDetailList
(
userIds
);
List
<
Integer
>
userIds2
=
messageBto
.
getCompleteUserIdList
();
userIds2
.
add
(
userId
);
messageBto
.
setCompleteUserIdList
(
userIds2
);
return
messageDao
.
save
(
messageBto
.
toDo
());
}
/**
* @param messageId 阅知信息id
* 完成该阅知信息
*/
@Override
public
Message
complete
(
Integer
messageId
)
{
Integer
userId
=
userUtils
.
getCurrentUserId
();
MessageBto
messageBto
=
get
(
messageId
).
parse2Bto
();
List
<
Integer
>
userIds
=
messageBto
.
getCompleteUserIdList
();
userIds
.
add
(
userId
);
messageBto
.
setCompleteUserIdList
(
userIds
);
return
messageDao
.
save
(
messageBto
.
toDo
());
}
}
dev-read/src/main/java/com/tykj/dev/device/read/subject/bto/MessageBto.java
deleted
100644 → 0
浏览文件 @
5e141d45
package
com
.
tykj
.
dev
.
device
.
read
.
subject
.
bto
;
import
com.tykj.dev.device.read.subject.domin.Message
;
import
com.tykj.dev.device.read.subject.vo.MessageUserVo
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.data.annotation.CreatedDate
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author dengdiyi
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
MessageBto
{
@ApiModelProperty
(
name
=
"主键id"
)
private
Integer
id
;
@ApiModelProperty
(
name
=
"阅知信息对应业务Id"
)
private
Integer
taskId
;
@ApiModelProperty
(
value
=
"业务类型主键id"
)
private
Integer
businessType
;
@ApiModelProperty
(
value
=
"信息内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"阅知人员id类别"
)
private
List
<
Integer
>
involveUserIdList
;
@ApiModelProperty
(
value
=
"已完成人员id列表"
)
private
List
<
Integer
>
completeUserIdList
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"用户已读列表"
)
private
List
<
Integer
>
userReadDetailList
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"创建用户id"
)
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
;
/**
* bto类转化为do类
*/
public
Message
toDo
()
{
//复制相同属性
ModelMapper
modelMapper
=
BeanHelper
.
getUserMapper
();
Message
message
=
modelMapper
.
map
(
this
,
Message
.
class
);
//set组合字段
message
.
setInvolveUsers
(
StringSplitUtil
.
idListToString
(
this
.
involveUserIdList
));
message
.
setUserReadDetail
(
StringSplitUtil
.
idListToString
(
this
.
userReadDetailList
));
message
.
setCompleteUsers
(
StringSplitUtil
.
idListToString
(
this
.
completeUserIdList
));
return
message
;
}
/**
* bto类转化为vo类
*/
public
MessageUserVo
toVo
()
{
UserUtils
userUtils
=
SpringUtils
.
getBean
(
"userUtils"
);
//复制相同属性
ModelMapper
modelMapper
=
BeanHelper
.
getUserMapper
();
MessageUserVo
messageUserVo
=
modelMapper
.
map
(
this
,
MessageUserVo
.
class
);
//set vo字段
if
(
userUtils
!=
null
&&
userReadDetailList
.
contains
(
userUtils
.
getCurrentUserId
())){
messageUserVo
.
setIsRead
(
1
);
}
return
messageUserVo
;
}
public
MessageBto
(
Integer
taskId
,
Integer
businessType
,
String
content
,
List
<
Integer
>
involveUserIdList
)
{
this
.
taskId
=
taskId
;
this
.
businessType
=
businessType
;
this
.
content
=
content
;
this
.
involveUserIdList
=
involveUserIdList
;
}
}
dev-read/src/main/java/com/tykj/dev/device/read/subject/domin/Message.java
deleted
100644 → 0
浏览文件 @
5e141d45
package
com
.
tykj
.
dev
.
device
.
read
.
subject
.
domin
;
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
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.modelmapper.ModelMapper
;
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
com.tykj.dev.device.read.subject.bto.MessageBto
;
import
javax.persistence.*
;
import
java.util.Date
;
/**
* 阅知信息表
* @author dengdiyi
*/
@Data
@Entity
@EntityListeners
(
AuditingEntityListener
.
class
)
@SQLDelete
(
sql
=
"update message set delete_tag = 1 where id = ?"
)
@Where
(
clause
=
"delete_tag = 0"
)
@ApiModel
(
"阅知信息表"
)
public
class
Message
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@ApiModelProperty
(
name
=
"主键id"
)
private
Integer
id
;
@ApiModelProperty
(
name
=
"阅知信息对应业务Id"
)
private
Integer
taskId
;
@ApiModelProperty
(
value
=
"业务类型主键id"
)
private
Integer
businessType
;
@ApiModelProperty
(
value
=
"信息内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"阅知人员id(x作为分隔符),例如x1x2x,意为id为1,2的用户待阅知该信息"
)
private
String
involveUsers
;
@ApiModelProperty
(
value
=
"已完成人员id(x作为分隔符),例如x1x2x,意为id为1,2的用户已完成阅知该信息"
)
private
String
completeUsers
;
@ApiModelProperty
(
value
=
"用户阅读信息"
)
private
String
userReadDetail
;
@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
;
/**
* do类转化为bto类
*/
public
MessageBto
parse2Bto
()
{
//modelMap复制
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
MessageBto
messageBto
=
mapper
.
map
(
this
,
MessageBto
.
class
);
//解析组合字段并添加
messageBto
.
setInvolveUserIdList
(
StringSplitUtil
.
userIdSplit
(
this
.
involveUsers
));
messageBto
.
setUserReadDetailList
(
StringSplitUtil
.
userIdSplit
(
this
.
userReadDetail
));
messageBto
.
setCompleteUserIdList
(
StringSplitUtil
.
userIdSplit
(
this
.
completeUsers
));
return
messageBto
;
}
}
dev-read/src/main/java/com/tykj/dev/device/read/subject/vo/MessageUserVo.java
deleted
100644 → 0
浏览文件 @
5e141d45
package
com
.
tykj
.
dev
.
device
.
read
.
subject
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.data.annotation.CreatedDate
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
java.util.Date
;
/**
* @author dengdiyi
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
MessageUserVo
{
@ApiModelProperty
(
name
=
"主键id"
)
private
Integer
id
;
@ApiModelProperty
(
name
=
"阅知信息对应业务Id"
)
private
Integer
taskId
;
@ApiModelProperty
(
value
=
"业务类型主键id"
)
private
Integer
businessType
;
@ApiModelProperty
(
value
=
"信息内容"
)
private
String
content
;
@ApiModelProperty
(
name
=
"当前用户是否已阅读(0:未读,1:已读)"
)
private
Integer
isRead
=
0
;
@ApiModelProperty
(
value
=
"创建用户id"
)
private
Integer
createUserId
;
@ApiModelProperty
(
value
=
"创建时间"
)
@CreatedDate
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新用户id"
)
@LastModifiedBy
private
Integer
updateUserId
;
@ApiModelProperty
(
value
=
"更新时间"
)
@LastModifiedDate
private
Date
updateTime
;
}
dev-repair/pom.xml
浏览文件 @
b4c1355a
...
...
@@ -40,11 +40,6 @@
<groupId>
com.tykj.dev
</groupId>
<artifactId>
rfid
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-read
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
b4c1355a
...
...
@@ -9,8 +9,6 @@ import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
import
com.tykj.dev.device.library.subject.domin.DeviceChange
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.read.service.MessageService
;
import
com.tykj.dev.device.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.repair.repository.RepairBackBillDao
;
import
com.tykj.dev.device.repair.repository.RepairDetailDao
;
import
com.tykj.dev.device.repair.repository.RepairSendBillDao
;
...
...
@@ -27,6 +25,8 @@ 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.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
...
...
@@ -765,13 +765,13 @@ public class RepairController {
RepairSendBill
repairSendBill
=
deviceRepairSendBillDao
.
findByDeviceRepairBillId
(
taskBto
.
getBillId
());
repairBackBill
=
new
RepairBackBill
();
repairBackBill
.
setSendUnit
(
"中办"
);
repairBackBill
.
setReceiveUnit
(
userUtils
.
getCurrentUserUnitName
());
repairBackBill
.
setBackCheckDetail
(
repairSendBill
.
getRepairDeviceCheckDetail
());
repairBackBill
.
setDeviceRepairBillId
(
taskBto
.
getBillId
());
}
String
deviceIdDetail
=
repairReceiveVo
.
getReceiveCheckDetail
();
if
(
repairBackBill
.
getReceiveUseraId
()
==
null
)
{
repairBackBill
.
setReceiveUseraId
(
userId
);
taskService
.
addInvolveUser
(
taskBto
,
userId
);
}
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"维修单"
,
repairBackBill
.
getBillFileName
(),
repairBackBill
.
getBillFileUrl
()));
...
...
@@ -854,9 +854,11 @@ public class RepairController {
});
//发送阅知信息
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
ids
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
repairBackBill
.
getReceiveUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
if
(
level
>
1
)
{
ids
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
repairBackBill
.
getReceiveUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
}
MessageBto
messageBto
=
new
MessageBto
(
taskBto2
.
getId
(),
taskBto2
.
getBusinessType
(),
repairBackBill
.
getReceiveUnit
()+
"接收维修退回装备"
,
ids
);
messageService
.
add
(
messageBto
);
myWebSocket
.
sendMessage1
();
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/SendBackServiceImpl.java
浏览文件 @
b4c1355a
...
...
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.github.wenhao.jpa.Specifications
;
import
com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIConversion
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
...
...
@@ -34,7 +33,6 @@ import com.tykj.dev.misc.exception.ApiException;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.Snowflake
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
...
...
dev-storage/pom.xml
浏览文件 @
b4c1355a
...
...
@@ -32,11 +32,6 @@
<groupId>
com.tykj.dev
</groupId>
<artifactId>
config
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-read
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
b4c1355a
...
...
@@ -8,10 +8,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import
com.tykj.dev.device.library.subject.vo.DeviceLibrarySaveVo
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.packing.service.PackingLibraryService
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.read.service.MessageService
;
import
com.tykj.dev.device.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.storage.service.StorageBillService
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.storage.service.StorageBillService
;
import
com.tykj.dev.device.storage.subject.domin.StorageBill
;
import
com.tykj.dev.device.storage.subject.vo.StorageBillConfirmVo
;
import
com.tykj.dev.device.storage.subject.vo.StorageBillDetailVo
;
...
...
@@ -21,6 +18,8 @@ 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.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BusinessEnum
;
...
...
dev-union/pom.xml
浏览文件 @
b4c1355a
...
...
@@ -381,11 +381,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-read
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<!-- Spring Security Test -->
<dependency>
<groupId>
org.springframework.security
</groupId>
...
...
dev-user/src/main/java/com/tykj/dev/device/user/read/controller/MessageController.java
浏览文件 @
b4c1355a
...
...
@@ -5,13 +5,17 @@ package com.tykj.dev.device.user.read.controller;
*/
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.read.service.MessageService
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.vo.MessageUserVo
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
//import com.tykj.dev.device.read.service.MessageService;
/**
* @author dengdiyi
*/
...
...
@@ -24,6 +28,9 @@ public class MessageController {
@Autowired
private
MessageService
messageService
;
@Autowired
private
MyWebSocket
myWebSocket
;
@ApiOperation
(
value
=
"阅知信息查询"
)
@GetMapping
(
"/get"
)
public
ResponseEntity
getMessage
(){
...
...
@@ -33,7 +40,9 @@ public class MessageController {
@ApiOperation
(
value
=
"提交已读阅知信息"
)
@PostMapping
(
"/read/{id}"
)
public
ResponseEntity
readMessage
(
@PathVariable
(
"id"
)
int
id
){
return
ResponseEntity
.
ok
(
messageService
.
read
(
id
).
parse2Bto
().
toVo
());
MessageUserVo
m
=
messageService
.
read
(
id
).
parse2Bto
().
toVo
();
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
m
);
}
@ApiOperation
(
value
=
"完成阅知信息"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论