Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
1b9e7a46
提交
1b9e7a46
authored
8月 10, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[清退、配置] 添加任务ID查询相关单据接口 以及 文件描述枚举
上级
c3bfdfb0
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
74 行增加
和
1 行删除
+74
-1
FileName.java
...nfig/src/main/java/com/tykj/dev/config/base/FileName.java
+27
-0
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+7
-0
DeviceRepelDetailService.java
...dev/device/sendback/service/DeviceRepelDetailService.java
+5
-0
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+7
-0
DeviceRepelDetailServiceImpl.java
...e/sendback/service/impl/DeviceRepelDetailServiceImpl.java
+19
-0
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+9
-1
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/base/FileName.java
0 → 100644
浏览文件 @
1b9e7a46
package
com
.
tykj
.
dev
.
config
.
base
;
import
lombok.AllArgsConstructor
;
@AllArgsConstructor
public
enum
FileName
{
/**
* 申请单
*/
APPLY
(
1
,
"申请单"
),
/**
* 批复单
*/
REPLY
(
2
,
"批复单"
),
/**
* 回执单
*/
RECEIPT
(
3
,
"回执单"
),
/**
* 签收单
*/
SIGN
(
3
,
"回执单"
);
public
Integer
id
;
public
String
name
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
1b9e7a46
...
...
@@ -180,4 +180,11 @@ public class RepelQueryController {
public
ResponseEntity
provinceDirectlyUnderDevice
(
@RequestBody
List
<
RepelFieldingVo
>
repelFieldingVoList
){
return
ResponseEntity
.
ok
(
repelQueryService
.
judgeFieldingIsNotNormal
(
repelFieldingVoList
));
}
@GetMapping
(
value
=
"/repel/fileMap/{taskId}"
)
@ApiOperation
(
value
=
"根据任务ID查询业务相关单据"
,
notes
=
"根据任务ID查询业务相关单据"
)
public
ResponseEntity
repelFileMap
(
@PathVariable
Integer
taskId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
findByTaskIdToFileMapList
(
taskId
));
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/DeviceRepelDetailService.java
浏览文件 @
1b9e7a46
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.vo.RepelDetailSelectVo
;
...
...
@@ -7,6 +8,7 @@ import org.springframework.data.domain.Page;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
public
interface
DeviceRepelDetailService
{
/**
...
...
@@ -43,4 +45,7 @@ public interface DeviceRepelDetailService {
Page
<
DeviceRepelDetail
>
findPageDeviceRepelDetail
(
RepelDetailSelectVo
repelDetailSelectVo
);
Map
<
String
,
List
<
FileRet
>>
findByIdToFileMapList
(
Integer
id
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
1b9e7a46
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepel
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
...
...
@@ -7,6 +8,7 @@ import com.tykj.dev.device.sendback.entity.vo.*;
import
org.springframework.data.domain.Page
;
import
java.util.List
;
import
java.util.Map
;
public
interface
RepelQueryService
{
/**
...
...
@@ -128,4 +130,9 @@ public interface RepelQueryService {
* 判断发起的列装是否需要提示
*/
RepelFieldingPrompt
judgeFieldingIsNotNormal
(
List
<
RepelFieldingVo
>
repelFieldingVoList
);
/**
* 根据taskId查询相关文件接口(设备日志使用)
*/
Map
<
String
,
List
<
FileRet
>>
findByTaskIdToFileMapList
(
Integer
taskId
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/DeviceRepelDetailServiceImpl.java
浏览文件 @
1b9e7a46
...
...
@@ -3,6 +3,8 @@ package com.tykj.dev.device.sendback.service.impl;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.config.base.FileName
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
...
...
@@ -117,6 +119,23 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
});
}
@Override
public
Map
<
String
,
List
<
FileRet
>>
findByIdToFileMapList
(
Integer
id
)
{
Map
<
String
,
List
<
FileRet
>>
map
=
new
HashMap
<>();
Optional
<
DeviceRepelDetail
>
optional
=
deviceRepelDetailDao
.
findById
(
id
);
if
(
optional
.
isPresent
()){
DeviceRepelDetail
deviceRepelDetail
=
optional
.
get
();
map
.
put
(
FileName
.
APPLY
.
name
,
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getApplyFiles
()));
map
.
put
(
FileName
.
RECEIPT
.
name
,
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getApplyFiles
()));
map
.
put
(
FileName
.
SIGN
.
name
,
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getBillFile
()));
map
.
put
(
FileName
.
REPLY
.
name
,
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getReplyFiles
()));
return
map
;
}
else
{
log
.
info
(
"[清退] 详情查看错误,id没有找到{}"
,
id
);
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"清退详情id没有找到:"
+
id
));
}
}
private
Specification
<
DeviceRepelDetail
>
getFindRetiredSpecification
(
RepelDetailSelectVo
repelDetailSelectVo
)
{
PredicateBuilder
<
DeviceRepelDetail
>
predicateBuilder
=
Specifications
.
and
();
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
1b9e7a46
...
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
...
...
@@ -66,7 +67,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
@Override
public
DeviceRepelDetail
findDeviceRepelDetail
(
Integer
taskId
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
if
(
deviceRepelDetail
.
getScriptJson
()!=
null
)
{
deviceRepelDetail
.
setScripts
(
JacksonUtil
.
readValue
(
deviceRepelDetail
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
...
...
@@ -616,6 +617,13 @@ public class RepelQueryServiceImpl implements RepelQueryService {
return
repelFieldingPrompt
;
}
@Override
public
Map
<
String
,
List
<
FileRet
>>
findByTaskIdToFileMapList
(
Integer
taskId
)
{
Map
<
String
,
List
<
FileRet
>>
map
=
new
HashMap
<>();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
return
repelDetailService
.
findByIdToFileMapList
(
taskBto
.
getBillId
());
}
private
Specification
<
DeviceLibrary
>
getRepelDeviceSpecificationIn
(
RepelManagementVo
repelManagementVo
)
{
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
repelManagementVo
);
//unitId为空,默认查询当前单位
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论