Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
af029f12
提交
af029f12
authored
1月 12, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
70f3cd01
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
255 行增加
和
24 行删除
+255
-24
pom.xml
dev-allot/pom.xml
+5
-0
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+33
-4
AllotBill.java
...va/com/tykj/dev/device/allot/subject/domin/AllotBill.java
+8
-0
AllotBillSaveVo.java
...com/tykj/dev/device/allot/subject/vo/AllotBillSaveVo.java
+9
-0
RfidVo.java
...ain/java/com/tykj/dev/device/allot/subject/vo/RfidVo.java
+17
-0
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+3
-3
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+11
-5
RepairBillSelectController.java
.../device/repair/controller/RepairBillSelectController.java
+19
-2
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+93
-9
RepairNum.java
...java/com/tykj/dev/device/repair/subject/vo/RepairNum.java
+22
-0
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+17
-0
TaskSelectController.java
...ev/device/taskselect/controller/TaskSelectController.java
+1
-0
LogAspect.java
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
+8
-1
MessageBto.java
...com/tykj/dev/device/user/read/subject/bto/MessageBto.java
+3
-0
Message.java
.../com/tykj/dev/device/user/read/subject/domin/Message.java
+3
-0
MessageUserVo.java
...m/tykj/dev/device/user/read/subject/vo/MessageUserVo.java
+3
-0
没有找到文件。
dev-allot/pom.xml
浏览文件 @
af029f12
...
...
@@ -44,5 +44,9 @@
<groupId>
com.tykj.dev
</groupId>
<artifactId>
blockcha
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-file
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
af029f12
...
...
@@ -5,10 +5,9 @@ import com.tykj.dev.device.allot.service.AllotBackBillService;
import
com.tykj.dev.device.allot.service.AllotBillService
;
import
com.tykj.dev.device.allot.subject.domin.AllotBackBill
;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.allot.subject.vo.AllotBillConfirmVo
;
import
com.tykj.dev.device.allot.subject.vo.AllotBillSaveVo
;
import
com.tykj.dev.device.allot.subject.vo.AllotReceiveConfirmVo
;
import
com.tykj.dev.device.allot.subject.vo.AllotReceiveVo
;
import
com.tykj.dev.device.allot.subject.vo.*
;
import
com.tykj.dev.device.file.service.FilesUtil
;
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
;
...
...
@@ -26,6 +25,7 @@ import com.tykj.dev.device.user.util.UserUtils;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.Snowflake
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TimestampUtil
;
...
...
@@ -95,6 +95,34 @@ public class AllotBillController {
@Autowired
private
AllotBackBillService
allotBackBillService
;
@Autowired
private
DeviceLibraryDao
deviceLibraryDao
;
@ApiOperation
(
value
=
"导入二维码获取配发装备"
,
notes
=
"可以通过这个接口导入二维码获取配发装备"
)
@PostMapping
(
value
=
"/load"
)
public
ResponseEntity
loadDevice
(
@RequestBody
RfidVo
rfidVo
)
{
String
unit
=
userUtils
.
getCurrentUserUnitName
();
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
rfidVo
.
getRfidResultList
().
forEach
(
s
->
{
List
<
DeviceLibrary
>
deviceLibraries1
=
deviceLibraryDao
.
getAllByRfidCardId
(
s
);
if
(
deviceLibraries1
.
isEmpty
()){
throw
new
ApiException
(
"系统中不存在rfid为"
+
s
+
"的装备"
);
}
else
{
if
(!
deviceLibraries1
.
get
(
0
).
getOwnUnit
().
equals
(
unit
)){
throw
new
ApiException
(
"rfid为"
+
s
+
"的装备不属于本单位"
);
}
else
if
(
deviceLibraries1
.
get
(
0
).
getLifeStatus
()!=
2
){
throw
new
ApiException
(
"rfid为"
+
s
+
"的装备不在库"
);
}
else
{
deviceLibraries
.
add
(
deviceLibraries1
.
get
(
0
));
}
}
});
return
ResponseEntity
.
ok
(
deviceLibraries
);
}
@ApiOperation
(
value
=
"发起配发业务"
,
notes
=
"可以通过这个接口发起配发任务"
)
@PostMapping
(
value
=
"/addAllotBill"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -439,6 +467,7 @@ public class AllotBillController {
ids
.
forEach
(
integer
->
deviceLibraryList
.
add
(
deviceLibraryService
.
getOne
(
integer
)));
allotBillEntity
.
setDeviceLibraries
(
deviceLibraryList
);
}
allotBillEntity
.
setReplyFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getReplyFiles
()));
return
ResponseEntity
.
ok
(
allotBillEntity
);
}
}
dev-allot/src/main/java/com/tykj/dev/device/allot/subject/domin/AllotBill.java
浏览文件 @
af029f12
package
com
.
tykj
.
dev
.
device
.
allot
.
subject
.
domin
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.data.annotation.LastModifiedDate;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -234,4 +236,10 @@ public class AllotBill {
@Transient
private
List
<
DeviceLibrary
>
deviceLibraries
;
@Column
(
name
=
"reply_files"
,
columnDefinition
=
"TEXT"
)
private
String
replyFiles
;
@Transient
private
List
<
FileRet
>
replyFileList
=
new
ArrayList
<>();
}
dev-allot/src/main/java/com/tykj/dev/device/allot/subject/vo/AllotBillSaveVo.java
浏览文件 @
af029f12
package
com
.
tykj
.
dev
.
device
.
allot
.
subject
.
vo
;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.misc.utils.TimestampUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -9,6 +11,7 @@ import org.springframework.beans.BeanUtils;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
/**
* @author dengdiyi
...
...
@@ -81,9 +84,15 @@ public class AllotBillSaveVo {
@ApiModelProperty
(
value
=
"入库类型"
)
private
Integer
allotType
;
@ApiModelProperty
(
value
=
"批复文号附件名"
)
private
List
<
FileRet
>
replyFiles
;
public
AllotBill
toDo
()
{
AllotBill
allotBillEntity
=
new
AllotBill
();
BeanUtils
.
copyProperties
(
this
,
allotBillEntity
);
if
(
this
.
replyFiles
!=
null
&&
this
.
replyFiles
.
size
()>
0
){
allotBillEntity
.
setReplyFiles
(
FilesUtil
.
stringFileToList
(
this
.
replyFiles
));
}
allotBillEntity
.
setAllotStatus
(
2
);
allotBillEntity
.
setSendTime
(
TimestampUtil
.
getCurrentTimestamp
());
return
allotBillEntity
;
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/subject/vo/RfidVo.java
0 → 100644
浏览文件 @
af029f12
package
com
.
tykj
.
dev
.
device
.
allot
.
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
RfidVo
{
@ApiModelProperty
(
value
=
"二维码上传RFID列表"
)
private
List
<
String
>
rfidResultList
;
}
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
af029f12
...
...
@@ -94,13 +94,13 @@ public enum LogType {
REPAIR_BACK_1
(
37
,
REPAIR_BACK
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_BACK_RECEIVE
.
id
,
"向(%receiveUnit)退还维修装备"
),
REPAIR_BACK_2
(
38
,
REPAIR_BACK
.
id
,
REPAIR_BACK_CONFIRM
.
id
,
WAIT_BACK_RECEIVE
.
id
,
"维修退回审核成功并出库
"
),
REPAIR_BACK_2
(
38
,
REPAIR_BACK
.
id
,
WAIT_BACK_RECEIVE
.
id
,
WAIT_UPLOAD_BACK_FILE
.
id
,
"维修退回装备接收并发起入库(缺失单据)
"
),
REPAIR_BACK_3
(
39
,
REPAIR_BACK
.
id
,
REPAIR_BACK_CONFIRM
.
id
,
ARCHIVE
.
id
,
"维修退回出库审核失败
"
),
REPAIR_BACK_3
(
39
,
REPAIR_BACK
.
id
,
WAIT_UPLOAD_BACK_FILE
.
id
,
END
.
id
,
"上传回执单据
"
),
REPAIR_BACK_4
(
40
,
REPAIR_BACK
.
id
,
WAIT_BACK_RECEIVE
.
id
,
END
.
id
,
"维修退回装备接收并发起入库"
),
REPAIR_BACK_5
(
41
,
REPAIR_BACK
.
id
,
REPAIR_BACK_RECEIVE_CONFIRM
.
id
,
END
.
id
,
"维修退回装备入库审核成功
"
),
REPAIR_BACK_5
(
41
,
REPAIR_BACK
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_UPLOAD_BACK_FILE
.
id
,
"维修退回装备接收并发起入库(缺失单据)
"
),
REPAIR_BACK_6
(
42
,
REPAIR_BACK
.
id
,
REPAIR_BACK_RECEIVE_CONFIRM
.
id
,
ARCHIVE
.
id
,
"维修退回装备入库审核失败"
),
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
af029f12
...
...
@@ -12,6 +12,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -246,7 +247,7 @@ public class DeviceLibraryController {
}
if
(
libraryUpdateVo
.
getProdNumber
()
!=
null
&&
!
libraryUpdateVo
.
getProdNumber
().
equals
(
deviceLibraryEntity
.
getProdNumber
()))
{
//添加装备日志
String
remark
=
"将装备生产序列号由"
+
deviceLibraryEntity
.
getProdNumber
()
+
"改为"
+
libraryUpdateVo
.
getProdNumber
();
String
remark
=
"
装备换新:
将装备生产序列号由"
+
deviceLibraryEntity
.
getProdNumber
()
+
"改为"
+
libraryUpdateVo
.
getProdNumber
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setProdNumber
(
libraryUpdateVo
.
getProdNumber
());
...
...
@@ -255,10 +256,15 @@ public class DeviceLibraryController {
deviceLibraryEntity
.
setSecretLevel
(
libraryUpdateVo
.
getSecretLevel
());
}
if
(
libraryUpdateVo
.
getSeqNumber
()
!=
null
&&
!
libraryUpdateVo
.
getSeqNumber
().
equals
(
deviceLibraryEntity
.
getSeqNumber
()))
{
String
remark
=
"将装备序列号由"
+
deviceLibraryEntity
.
getSeqNumber
()
+
"改为"
+
libraryUpdateVo
.
getSeqNumber
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setSeqNumber
(
libraryUpdateVo
.
getSeqNumber
());
if
(
deviceLibraryDao
.
getAllBySeqNumber
(
libraryUpdateVo
.
getSeqNumber
()).
size
()>
0
){
throw
new
ApiException
(
"序列号"
+
libraryUpdateVo
.
getSeqNumber
()+
"已存在"
);
}
else
{
String
remark
=
"装备换新:将装备序列号由"
+
deviceLibraryEntity
.
getSeqNumber
()
+
"改为"
+
libraryUpdateVo
.
getSeqNumber
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setSeqNumber
(
libraryUpdateVo
.
getSeqNumber
());
}
}
if
(
libraryUpdateVo
.
getStorageType
()
!=
null
&&
!
libraryUpdateVo
.
getStorageType
().
equals
(
deviceLibraryEntity
.
getStorageType
()))
{
//添加装备日志
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairBillSelectController.java
浏览文件 @
af029f12
...
...
@@ -10,6 +10,7 @@ import com.tykj.dev.device.repair.subject.domin.RepairBill;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.repair.subject.vo.RepairBillSelectVo
;
import
com.tykj.dev.device.repair.subject.vo.RepairNum
;
import
com.tykj.dev.device.repair.subject.vo.TaskRemark
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
...
...
@@ -56,6 +57,22 @@ public class RepairBillSelectController {
@Autowired
private
TaskUtils
taskUtils
;
@Autowired
private
RepairController
repairController
;
@ApiOperation
(
value
=
"查询工作台维修装备数量"
,
notes
=
"可以通过这个接口查询工作台维修装备数量"
)
@GetMapping
(
value
=
"/repairNum"
)
public
ResponseEntity
getRepairNum
(){
RepairNum
repairNum
=
new
RepairNum
();
List
<
RepairDetail
>
repairDetails
=
(
ArrayList
)
repairController
.
getRepairList
(
1
).
getBody
();
List
<
RepairDetail
>
repairDetails2
=
(
ArrayList
)
repairController
.
getRepairList
(
2
).
getBody
();
List
<
RepairDetail
>
repairDetails3
=
(
ArrayList
)
repairController
.
getRepairList
(
3
).
getBody
();
repairNum
.
setNum1
(
repairDetails
.
size
());
repairNum
.
setNum2
(
repairDetails2
.
size
());
repairNum
.
setNum3
(
repairDetails3
.
size
());
return
ResponseEntity
.
ok
(
repairNum
);
}
@ApiOperation
(
value
=
"查询维修管理任务"
,
notes
=
"可以通过这个接口查询查询维修管理任务"
)
@PostMapping
(
value
=
"/repair"
)
public
ResponseEntity
selectRepairTasks
(
@RequestBody
TaskSelectVo
taskSelectVo
){
...
...
@@ -89,8 +106,8 @@ public class RepairBillSelectController {
RepairSendBill
repairSendBill
=
repairSendBillDao
.
findByDeviceRepairBillId
(
repairBill
.
getId
());
list
.
add
(
repairSendBill
);
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
if
(
repairSendBill
.
getRepair
Reciv
eCheckDetail
()
!=
null
)
{
String
[]
strings1
=
repairSendBill
.
getRepair
Reciv
eCheckDetail
().
split
(
"x"
);
if
(
repairSendBill
.
getRepair
Devic
eCheckDetail
()
!=
null
)
{
String
[]
strings1
=
repairSendBill
.
getRepair
Devic
eCheckDetail
().
split
(
"x"
);
for
(
String
s
:
strings1
)
{
if
(
s
.
length
()
>=
2
&&
"1"
.
equals
(
s
.
substring
(
s
.
length
()
-
1
)))
{
Integer
deviceId
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
af029f12
...
...
@@ -722,7 +722,7 @@ public class RepairController {
ids
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
repairBackBill
.
getReceiveUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
task
Bto1
.
getId
(),
taskBto1
.
getBusinessType
(),
repairBackBill
.
getSendUnit
()+
"向"
+
repairBackBill
.
getReceiveUnit
()+
"退回维修装备"
,
ids
);
MessageBto
messageBto
=
new
MessageBto
(
task
.
getId
(),
task
.
getBusinessType
(),
repairBackBill
.
getSendUnit
()+
"向"
+
repairBackBill
.
getReceiveUnit
()+
"退回维修装备"
,
ids
);
messageService
.
add
(
messageBto
);
myWebSocket
.
sendMessage1
();
return
ResultUtil
.
success
(
task
);
...
...
@@ -855,6 +855,7 @@ public class RepairController {
fileVoList
.
add
(
new
FileVo
(
"回执单"
,
repairBackBill
.
getBillFileName
(),
repairBackBill
.
getBillFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"入库确认单"
,
repairBackBill
.
getReceiveFileName
(),
repairBackBill
.
getReceiveFileUrl
()));
TaskBto
taskBto2
;
Map
<
Integer
,
List
<
Integer
>>
messageMap
=
new
HashMap
<>();
if
(
level
==
1
)
{
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
...
...
@@ -875,6 +876,15 @@ public class RepairController {
RepairDetail
repairDetail1
=
deviceRepairDetailService
.
getOne
(
repairDetail
.
getPid
());
repairDetail1
.
setRepairStatus
(
2
);
deviceRepairDetailService
.
update
(
repairDetail1
);
Integer
unitId
=
userPublicService
.
getOne
(
repairDetail1
.
getCreateUserId
()).
getUnitsId
();
if
(
messageMap
.
get
(
unitId
)==
null
)
{
messageMap
.
put
(
unitId
,
Collections
.
singletonList
(
repairDetail1
.
getId
()));
}
else
{
List
<
Integer
>
ids
=
new
ArrayList
<
Integer
>(
messageMap
.
getOrDefault
(
unitId
,
new
ArrayList
<>()));
ids
.
add
(
repairDetail1
.
getId
());
messageMap
.
put
(
unitId
,
ids
);
}
}
deviceRepairDetailService
.
update
(
repairDetail
);
}
...
...
@@ -899,6 +909,15 @@ public class RepairController {
RepairDetail
repairDetail1
=
deviceRepairDetailService
.
getOne
(
repairDetail
.
getPid
());
repairDetail1
.
setRepairStatus
(
2
);
deviceRepairDetailService
.
update
(
repairDetail1
);
Integer
unitId
=
userPublicService
.
getOne
(
repairDetail1
.
getCreateUserId
()).
getUnitsId
();
if
(
messageMap
.
get
(
unitId
)==
null
)
{
messageMap
.
put
(
unitId
,
Collections
.
singletonList
(
repairDetail1
.
getId
()));
}
else
{
List
<
Integer
>
ids
=
new
ArrayList
<
Integer
>(
messageMap
.
getOrDefault
(
unitId
,
new
ArrayList
<>()));
ids
.
add
(
repairDetail1
.
getId
());
messageMap
.
put
(
unitId
,
ids
);
}
}
deviceRepairDetailService
.
update
(
repairDetail
);
});
...
...
@@ -977,8 +996,17 @@ public class RepairController {
}
MessageBto
messageBto
=
new
MessageBto
(
taskBto2
.
getId
(),
taskBto2
.
getBusinessType
(),
repairBackBill
.
getReceiveUnit
()+
"接收维修退回装备"
,
ids
);
messageService
.
add
(
messageBto
);
MessageBto
messageBto2
=
new
MessageBto
(
taskBto2
.
getId
(),
taskBto2
.
getBusinessType
(),
"待领取送修装备"
,
ids2
);
messageService
.
add
(
messageBto2
);
messageMap
.
keySet
().
forEach
(
integer
->
{
List
<
Integer
>
integerList
=
new
ArrayList
<>();
integerList
.
addAll
(
userDao
.
findAllByUnitsId
(
integer
).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto2
=
new
MessageBto
(
0
,
5
,
"待领取送修装备"
,
integerList
);
messageBto2
.
setRecord
(
StringSplitUtil
.
idListToString
(
messageMap
.
get
(
integer
)));
messageService
.
add
(
messageBto2
);
});
// MessageBto messageBto2 = new MessageBto(taskBto2.getId(),taskBto2.getBusinessType(),"待领取送修装备",ids2);
// messageService.add(messageBto2);
myWebSocket
.
sendMessage1
();
return
ResultUtil
.
success
(
"维修成功退回装备接收入库"
);
}
...
...
@@ -1089,6 +1117,7 @@ public class RepairController {
// TaskBto taskBto = taskService.get(repairStatusChangeVo.getTaskId());
//获取所有父任务id
// List<Integer> fathers = StringSplitUtil.taskIdSplit(taskBto.getNodeIdDetail());
Map
<
Integer
,
List
<
Integer
>>
messageMap
=
new
HashMap
<>();
for
(
Integer
id
:
repairStatusChangeVo
.
getId
())
{
//获取维修详情单
RepairDetail
repairDetail1
=
deviceRepairDetailService
.
getOne
(
id
);
...
...
@@ -1131,14 +1160,45 @@ public class RepairController {
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
repairDetail1
.
getDeviceId
(),
remark
,
fileVos
);
deviceLogService
.
addLog
(
deviceLogDto
);
if
(
repairStatusChangeVo
.
getNewStatus
()==
2
)
{
List
<
Integer
>
ids2
=
new
ArrayList
<>();
ids2
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
getOne
(
repairDetail1
.
getCreateUserId
()).
getUnitsId
()).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto2
=
new
MessageBto
(
0
,
0
,
"待领取送修装备"
,
ids2
);
messageService
.
add
(
messageBto2
);
if
(
repairDetail1
.
getPid
()!=
null
)
{
RepairDetail
repairDetail
=
deviceRepairDetailService
.
getOne
(
repairDetail1
.
getPid
());
Integer
unitId
=
userPublicService
.
getOne
(
repairDetail
.
getCreateUserId
()).
getUnitsId
();
if
(
messageMap
.
get
(
unitId
)
==
null
)
{
messageMap
.
put
(
unitId
,
Collections
.
singletonList
(
repairDetail
.
getId
()));
}
else
{
List
<
Integer
>
ids
=
new
ArrayList
<
Integer
>(
messageMap
.
getOrDefault
(
unitId
,
new
ArrayList
<>()));
ids
.
add
(
repairDetail
.
getId
());
messageMap
.
put
(
unitId
,
ids
);
}
}
else
{
Integer
unitId
=
userPublicService
.
getOne
(
repairDetail1
.
getCreateUserId
()).
getUnitsId
();
if
(
messageMap
.
get
(
unitId
)
==
null
)
{
messageMap
.
put
(
unitId
,
Collections
.
singletonList
(
repairDetail1
.
getId
()));
}
else
{
List
<
Integer
>
ids
=
new
ArrayList
<
Integer
>(
messageMap
.
getOrDefault
(
unitId
,
new
ArrayList
<>()));
ids
.
add
(
repairDetail1
.
getId
());
messageMap
.
put
(
unitId
,
ids
);
}
}
// List<Integer> ids2 = new ArrayList<>();
// ids2.addAll(userDao.findAllByUnitsId(userPublicService.getOne(repairDetail1.getCreateUserId()).getUnitsId()).stream()
// .map(User::getUserId)
// .collect(Collectors.toList()));
// MessageBto messageBto2 = new MessageBto(0, 0, "待领取送修装备", ids2);
// messageBto2.setRecord();
// messageService.add(messageBto2);
}
}
messageMap
.
keySet
().
forEach
(
integer
->
{
List
<
Integer
>
ids2
=
new
ArrayList
<>();
ids2
.
addAll
(
userDao
.
findAllByUnitsId
(
integer
).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto2
=
new
MessageBto
(
0
,
5
,
"待领取送修装备"
,
ids2
);
messageBto2
.
setRecord
(
StringSplitUtil
.
idListToString
(
messageMap
.
get
(
integer
)));
messageService
.
add
(
messageBto2
);
});
return
ResultUtil
.
success
(
"修改成功"
);
}
...
...
@@ -1323,6 +1383,10 @@ public class RepairController {
//获取维修详情
List
<
RepairDetail
>
repairDetailList
=
repairDetailDao
.
findByRepairBackBillId
(
repairBackBill
.
getId
());
repairDetailList
.
forEach
(
repairDetail
->
{
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
());
repairDetail
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
});
repairBillDetailVo
.
setRepairDetails
(
repairDetailList
);
//设置装备备注
deviceLibraryList
.
forEach
(
deviceLibrary
->
{
...
...
@@ -1418,6 +1482,26 @@ public class RepairController {
return
ResponseEntity
.
ok
(
"更新成功"
);
}
@ApiOperation
(
value
=
"查询待领取装备阅知详情"
,
notes
=
"可以通过这个接口查询待领取装备阅知详情"
)
@GetMapping
(
value
=
"/read/detail/{string}"
)
public
ResponseEntity
getDetail
(
@PathVariable
(
"string"
)
String
string
)
{
List
<
RepairDetail
>
repairDetails
=
new
ArrayList
<>();
List
<
Integer
>
ids
=
StringSplitUtil
.
userIdSplit
(
string
);
ids
.
forEach
(
integer
->
{
RepairDetail
repairDetail
=
deviceRepairDetailService
.
getOne
(
integer
);
// if (repairDetail.getPid()==null){
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetails
.
add
(
repairDetail
);
// }
// else {
// RepairDetail repairDetail2 = deviceRepairDetailService.getOne(repairDetail.getPid());
// repairDetail2.setLocationUnit(deviceLibraryService.getOne(repairDetail2.getDeviceId()).getLocationUnit());
// repairDetails.add(repairDetail2);
// }
});
return
ResponseEntity
.
ok
(
repairDetails
);
}
/**
* @param repairBillId 维修单id
* @return 维修详情列表
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/subject/vo/RepairNum.java
0 → 100644
浏览文件 @
af029f12
package
com
.
tykj
.
dev
.
device
.
repair
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"工作台维修数量类"
)
public
class
RepairNum
{
@ApiModelProperty
(
value
=
"待维修装备数量"
)
private
Integer
num1
;
@ApiModelProperty
(
value
=
"送修装备数量"
)
private
Integer
num2
;
@ApiModelProperty
(
value
=
"待领取数量"
)
private
Integer
num3
;
}
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
af029f12
...
...
@@ -104,6 +104,7 @@ public class StorageBillController {
List
<
String
>
strings
=
DeviceSeqUtil
.
createDeviceSeqs
(
s
.
getSeqInterval
(),
s
.
getStorageCount
());
List
<
String
>
strings3
=
DeviceSeqUtil
.
createDeviceSeqs
(
s
.
getProdInterval
(),
s
.
getStorageCount
());
List
<
List
<
String
>>
sons
=
new
ArrayList
<>();
List
<
List
<
String
>>
sons2
=
new
ArrayList
<>();
int
count
=
1
;
Integer
deviceNum
=
s
.
getStorageCount
();
while
(
deviceNum
>=
count
)
{
...
...
@@ -127,15 +128,24 @@ public class StorageBillController {
StorageBillDetailVo
s2
=
s
.
getList
().
get
(
j
);
if
(
j
>=
sons
.
size
()){
sons
.
add
(
DeviceSeqUtil
.
createDeviceSeqs
(
s2
.
getSeqInterval
(),
s2
.
getStorageCount
()));
sons2
.
add
(
DeviceSeqUtil
.
createDeviceSeqs
(
s2
.
getProdInterval
(),
s2
.
getStorageCount
()));
}
packingLibraryEntity
=
packingLibraryService
.
getOne
(
s2
.
getPackingId
());
List
<
String
>
strings2
=
sons
.
get
(
j
);
List
<
String
>
strings1
=
sons2
.
get
(
j
);
if
(
s2
.
getStorageCount
()
>=
count
)
{
packingLibraryEntity
.
setCorresponding
(
count
);
if
(!
strings2
.
isEmpty
())
{
if
(
deviceLibraryDao
.
getAllBySeqNumber
(
strings2
.
get
(
0
)).
size
()>
0
){
throw
new
ApiException
(
"序列号"
+
strings2
.
get
(
0
)+
"已存在"
);
}
packingLibraryEntity
.
setSeq
(
strings2
.
get
(
0
));
strings2
.
remove
(
0
);
}
if
(!
strings1
.
isEmpty
())
{
packingLibraryEntity
.
setProdNumber
(
strings1
.
get
(
0
));
strings1
.
remove
(
0
);
}
libraryEntities
.
add
(
packingLibraryEntity
);
}
if
(
s2
.
getStorageCount
()-
strings2
.
size
()==
deviceNum
)
{
...
...
@@ -144,9 +154,16 @@ public class StorageBillController {
packingLibraryEntity
=
packingLibraryService
.
getOne
(
s2
.
getPackingId
());
packingLibraryEntity
.
setCorresponding
(
0
);
if
(!
strings2
.
isEmpty
())
{
if
(
deviceLibraryDao
.
getAllBySeqNumber
(
strings2
.
get
(
0
)).
size
()>
0
){
throw
new
ApiException
(
"序列号"
+
strings2
.
get
(
0
)+
"已存在"
);
}
packingLibraryEntity
.
setSeq
(
strings2
.
get
(
0
));
strings2
.
remove
(
0
);
}
if
(!
strings1
.
isEmpty
())
{
packingLibraryEntity
.
setProdNumber
(
strings1
.
get
(
0
));
strings1
.
remove
(
0
);
}
packingLibraries
.
add
(
packingLibraryEntity
);
}
map
.
put
(
s2
.
getPackingId
(),
packingLibraries
);
...
...
dev-taskselect/src/main/java/com/tykj/dev/device/taskselect/controller/TaskSelectController.java
浏览文件 @
af029f12
...
...
@@ -176,6 +176,7 @@ public class TaskSelectController {
}
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
billId
);
allotBillEntity
.
setReplyFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getReplyFiles
()));
if
(
allotBillEntity
.
getSendUseraId
()
!=
null
)
{
allotBillEntity
.
setSenderUserA
(
userPublicService
.
getOne
(
allotBillEntity
.
getSendUseraId
()).
getName
());
}
...
...
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
浏览文件 @
af029f12
...
...
@@ -365,9 +365,16 @@ public class LogAspect {
}
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
WAIT_BACK_RECEIVE
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
END
.
id
))||
(
this
.
oldStatus
.
equals
(
StatusEnum
.
ORIGIN_STATUS
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
END
.
id
)))
{
this
.
fileVos
.
add
(
new
FileVo
(
"
维修
单"
,
repairBackBill
.
getBillFileName
(),
repairBackBill
.
getBillFileUrl
()));
this
.
fileVos
.
add
(
new
FileVo
(
"
回执
单"
,
repairBackBill
.
getBillFileName
(),
repairBackBill
.
getBillFileUrl
()));
this
.
fileVos
.
add
(
new
FileVo
(
"入库确认单"
,
repairBackBill
.
getReceiveFileName
(),
repairBackBill
.
getReceiveFileUrl
()));
}
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
ORIGIN_STATUS
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
.
id
))
||(
this
.
oldStatus
.
equals
(
StatusEnum
.
WAIT_BACK_RECEIVE
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
.
id
)))
{
this
.
fileVos
.
add
(
new
FileVo
(
"出库确认单"
,
repairBackBill
.
getFileName
(),
repairBackBill
.
getFileUrl
()));
}
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
END
.
id
)))
{
this
.
fileVos
.
add
(
new
FileVo
(
"回执单"
,
repairBackBill
.
getBillFileName
(),
repairBackBill
.
getBillFileUrl
()));
}
}
break
;
case
13
:
...
...
dev-user/src/main/java/com/tykj/dev/device/user/read/subject/bto/MessageBto.java
浏览文件 @
af029f12
...
...
@@ -39,6 +39,9 @@ public class MessageBto {
@ApiModelProperty
(
value
=
"信息内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"附加信息"
)
private
String
record
;
@ApiModelProperty
(
value
=
"阅知人员id类别"
)
private
List
<
Integer
>
involveUserIdList
;
...
...
dev-user/src/main/java/com/tykj/dev/device/user/read/subject/domin/Message.java
浏览文件 @
af029f12
...
...
@@ -72,6 +72,9 @@ public class Message {
@ApiModelProperty
(
value
=
"删除标记(0:未删除,1:已删除)"
)
private
Integer
deleteTag
=
0
;
@ApiModelProperty
(
value
=
"附加信息"
)
private
String
record
;
/**
* do类转化为bto类
*/
...
...
dev-user/src/main/java/com/tykj/dev/device/user/read/subject/vo/MessageUserVo.java
浏览文件 @
af029f12
...
...
@@ -47,4 +47,7 @@ public class MessageUserVo {
@ApiModelProperty
(
value
=
"更新时间"
)
@LastModifiedDate
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"附加信息"
)
private
String
record
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论