Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
67f773fb
提交
67f773fb
authored
8月 12, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(配发模块): 业务完结,修改业务文件,新增日志
业务完结,修改业务文件,新增日志
上级
0286b350
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
204 行增加
和
7 行删除
+204
-7
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+6
-0
AllotBillService.java
...a/com/tykj/dev/device/allot/service/AllotBillService.java
+8
-0
AllotBillServiceImpl.java
...j/dev/device/allot/service/impl/AllotBillServiceImpl.java
+81
-4
UpdateFilesVO.java
...a/com/tykj/dev/device/allot/subject/vo/UpdateFilesVO.java
+30
-0
TaskLogBto.java
...java/com/tykj/dev/device/task/subject/bto/TaskLogBto.java
+15
-0
TaskLog.java
.../java/com/tykj/dev/device/task/subject/domin/TaskLog.java
+20
-0
TaskFileRet.java
...java/com/tykj/dev/device/task/subject/vo/TaskFileRet.java
+37
-0
TaskLogUserVo.java
...va/com/tykj/dev/device/task/subject/vo/TaskLogUserVo.java
+6
-0
SecurityConfig.java
.../java/com/tykj/dev/device/user/config/SecurityConfig.java
+1
-0
QRCodeUtils.java
...main/java/com/tykj/dev/device/zxing/util/QRCodeUtils.java
+0
-3
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
67f773fb
...
@@ -1034,6 +1034,12 @@ public class AllotBillController {
...
@@ -1034,6 +1034,12 @@ public class AllotBillController {
return
ResponseEntity
.
ok
(
allotBillService
.
getFileList
(
taskId
));
return
ResponseEntity
.
ok
(
allotBillService
.
getFileList
(
taskId
));
}
}
@PostMapping
(
"/updateFiles"
)
@ApiOperation
(
"修改业务中的文件"
)
public
ResponseEntity
updateFiles
(
@RequestBody
UpdateFilesVO
updateFilesVO
){
return
ResponseEntity
.
ok
(
allotBillService
.
updateFiles
(
updateFilesVO
));
}
//递归取出最大目录
//递归取出最大目录
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/service/AllotBillService.java
浏览文件 @
67f773fb
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.allot.service;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.allot.service;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.allot.subject.vo.AllotBillSelectVo
;
import
com.tykj.dev.device.allot.subject.vo.AllotBillSelectVo
;
import
com.tykj.dev.device.allot.subject.vo.UpdateFilesVO
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
...
@@ -66,4 +67,11 @@ public interface AllotBillService {
...
@@ -66,4 +67,11 @@ public interface AllotBillService {
* @return
* @return
*/
*/
Map
<
String
,
List
<
FileRet
>>
getFileList
(
Integer
taskId
);
Map
<
String
,
List
<
FileRet
>>
getFileList
(
Integer
taskId
);
/**
* 修改业务中的文件
* @param updateFilesVO
* @return
*/
AllotBill
updateFiles
(
UpdateFilesVO
updateFilesVO
);
}
}
dev-allot/src/main/java/com/tykj/dev/device/allot/service/impl/AllotBillServiceImpl.java
浏览文件 @
67f773fb
...
@@ -10,13 +10,19 @@ import com.tykj.dev.device.allot.repository.AllotBillDao;
...
@@ -10,13 +10,19 @@ import com.tykj.dev.device.allot.repository.AllotBillDao;
import
com.tykj.dev.device.allot.service.AllotBillService
;
import
com.tykj.dev.device.allot.service.AllotBillService
;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.allot.subject.vo.AllotBillSelectVo
;
import
com.tykj.dev.device.allot.subject.vo.AllotBillSelectVo
;
import
com.tykj.dev.device.allot.subject.vo.UpdateFilesVO
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
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.vo.TaskFileRet
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
org.aspectj.util.FileUtil
;
import
org.aspectj.util.FileUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
...
@@ -24,12 +30,10 @@ import org.springframework.data.jpa.domain.Specification;
...
@@ -24,12 +30,10 @@ import org.springframework.data.jpa.domain.Specification;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.persistence.Transient
;
import
javax.persistence.Transient
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
/**
/**
...
@@ -53,6 +57,9 @@ public class AllotBillServiceImpl implements AllotBillService {
...
@@ -53,6 +57,9 @@ public class AllotBillServiceImpl implements AllotBillService {
@Autowired
@Autowired
TaskService
taskService
;
TaskService
taskService
;
@Resource
private
TaskLogService
taskLogService
;
@Override
@Override
public
AllotBill
addEntity
(
AllotBill
allotBillEntity
)
{
public
AllotBill
addEntity
(
AllotBill
allotBillEntity
)
{
AllotBill
allotBill
=
allotBillDao
.
save
(
allotBillEntity
);
AllotBill
allotBill
=
allotBillDao
.
save
(
allotBillEntity
);
...
@@ -151,6 +158,76 @@ public class AllotBillServiceImpl implements AllotBillService {
...
@@ -151,6 +158,76 @@ public class AllotBillServiceImpl implements AllotBillService {
return
map
;
return
map
;
}
}
@Override
public
AllotBill
updateFiles
(
UpdateFilesVO
updateFilesVO
)
{
//操作人
Integer
currentUserId
=
userUtils
.
getCurrentUserId
();
Integer
taskId
=
updateFilesVO
.
getTaskId
();
//查询任务对象
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
//拿到业务对象
Integer
billId
=
taskBto
.
getBillId
();
AllotBill
allotBill
=
getOne
(
billId
);
//存储单据
//发件方单据
FileRet
sendFile
=
updateFilesVO
.
getSendFile
();
TaskLogBto
taskLogBto
=
new
TaskLogBto
();
String
remark
=
""
;
if
(
sendFile
!=
null
){
//先拿到之前的单据
String
sendFiles
=
allotBill
.
getSendFiles
();
//从数据库拿到的单据
List
<
FileRet
>
fileRets
=
FilesUtil
.
stringFileToList
(
sendFiles
);
//应该拿到最新的 如 a->b->c 此时应该拿c
FileRet
fileRet
=
fileRets
.
get
(
fileRets
.
size
()
-
1
);
TaskFileRet
taskFileRet
=
new
TaskFileRet
();
BeanUtils
.
copyProperties
(
fileRet
,
taskFileRet
);
taskLogBto
.
setTaskFileRet
(
taskFileRet
);
//和现在的单据进行合并
fileRets
.
add
(
sendFile
);
TaskFileRet
updateFile
=
new
TaskFileRet
();
BeanUtils
.
copyProperties
(
sendFile
,
updateFile
);
taskLogBto
.
setUpdateTaskFile
(
updateFile
);
//在存储
allotBill
.
setSendFiles
(
FilesUtil
.
stringFileToList
(
fileRets
));
//日志描述
remark
=
"修改回执单"
;
}
//收件方单据
FileRet
receiveFile
=
updateFilesVO
.
getReceiveFile
();
if
(
receiveFile
!=
null
){
//先拿到之前的单据
String
receiveFiles
=
allotBill
.
getReceiveFiles
();
//从数据库拿到的单据
List
<
FileRet
>
fileRets
=
FilesUtil
.
stringFileToList
(
receiveFiles
);
//应该拿到最新的 如 a->b->c 此时应该拿c
FileRet
fileRet
=
fileRets
.
get
(
fileRets
.
size
()
-
1
);
TaskFileRet
taskFileRet
=
new
TaskFileRet
();
BeanUtils
.
copyProperties
(
fileRet
,
taskFileRet
);
taskLogBto
.
setTaskFileRet
(
taskFileRet
);
//和现在的单据进行合并
fileRets
.
add
(
receiveFile
);
TaskFileRet
updateFile
=
new
TaskFileRet
();
BeanUtils
.
copyProperties
(
receiveFile
,
updateFile
);
taskLogBto
.
setUpdateTaskFile
(
updateFile
);
//在存储
allotBill
.
setReceiveFiles
(
FilesUtil
.
stringFileToList
(
fileRets
));
//日志描述
remark
=
"修改签收单"
;
}
//保存业务
AllotBill
update
=
update
(
allotBill
);
//保存日志
taskLogBto
.
setCreateUserId
(
currentUserId
);
taskLogBto
.
setOldStatus
(
taskBto
.
getBillStatus
());
taskLogBto
.
setRemark
(
remark
);
taskLogBto
.
setCreateTime
(
new
Date
());
taskLogBto
.
setOldStatus
(
taskBto
.
getBillStatus
());
taskLogBto
.
setTaskId
(
taskId
);
taskLogService
.
addLog
(
taskLogBto
);
return
update
;
}
/**
/**
* @param allotBillSelectVo 查询vo
* @param allotBillSelectVo 查询vo
* 查询统一筛选器
* 查询统一筛选器
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/subject/vo/UpdateFilesVO.java
0 → 100644
浏览文件 @
67f773fb
package
com
.
tykj
.
dev
.
device
.
allot
.
subject
.
vo
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author zsp
*/
@Data
@ApiModel
(
"修改文件通用vo"
)
public
class
UpdateFilesVO
{
@ApiModelProperty
(
value
=
"任务id"
)
private
Integer
taskId
;
@ApiModelProperty
(
value
=
"发件方回执单"
)
private
FileRet
sendFile
;
@ApiModelProperty
(
value
=
"收件方签收单"
)
private
FileRet
receiveFile
;
@ApiModelProperty
(
value
=
"业务类型"
)
private
Integer
businessType
;
}
dev-task/src/main/java/com/tykj/dev/device/task/subject/bto/TaskLogBto.java
浏览文件 @
67f773fb
package
com
.
tykj
.
dev
.
device
.
task
.
subject
.
bto
;
package
com
.
tykj
.
dev
.
device
.
task
.
subject
.
bto
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.task.subject.domin.TaskLog
;
import
com.tykj.dev.device.task.subject.domin.TaskLog
;
import
com.tykj.dev.device.task.subject.vo.TaskFileRet
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
jdk.internal.org.objectweb.asm.TypeReference
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.modelmapper.ModelMapper
;
import
org.modelmapper.ModelMapper
;
...
@@ -25,6 +30,7 @@ import java.util.Objects;
...
@@ -25,6 +30,7 @@ import java.util.Objects;
@Data
@Data
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
@Builder
public
class
TaskLogBto
{
public
class
TaskLogBto
{
@ApiModelProperty
(
name
=
"主键id"
)
@ApiModelProperty
(
name
=
"主键id"
)
...
@@ -48,6 +54,12 @@ public class TaskLogBto {
...
@@ -48,6 +54,12 @@ public class TaskLogBto {
@ApiModelProperty
(
value
=
"存放旧状态"
)
@ApiModelProperty
(
value
=
"存放旧状态"
)
private
Integer
oldStatus
;
private
Integer
oldStatus
;
@ApiModelProperty
(
value
=
"源文件"
)
private
TaskFileRet
taskFileRet
;
@ApiModelProperty
(
value
=
"修改后的文件"
)
private
TaskFileRet
updateTaskFile
;
public
TaskLogBto
(
Integer
taskId
,
String
remark
,
List
<
FileVo
>
fileVoList
)
{
public
TaskLogBto
(
Integer
taskId
,
String
remark
,
List
<
FileVo
>
fileVoList
)
{
...
@@ -96,6 +108,9 @@ public class TaskLogBto {
...
@@ -96,6 +108,9 @@ public class TaskLogBto {
}
}
}
}
taskLog
.
setFileDetail
(
stringBuffer
.
toString
());
taskLog
.
setFileDetail
(
stringBuffer
.
toString
());
//处理文件
taskLog
.
setTaskFileRets
(
JacksonUtil
.
toJSon
(
this
.
getTaskFileRet
()));
taskLog
.
setUpdateTaskFile
(
JacksonUtil
.
toJSon
(
this
.
getUpdateTaskFile
()));
return
taskLog
;
return
taskLog
;
}
}
...
...
dev-task/src/main/java/com/tykj/dev/device/task/subject/domin/TaskLog.java
浏览文件 @
67f773fb
package
com
.
tykj
.
dev
.
device
.
task
.
subject
.
domin
;
package
com
.
tykj
.
dev
.
device
.
task
.
subject
.
domin
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.task.subject.bto.TaskLogBto
;
import
com.tykj.dev.device.task.subject.bto.TaskLogBto
;
import
com.tykj.dev.device.task.subject.vo.TaskFileRet
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -90,6 +93,12 @@ public class TaskLog {
...
@@ -90,6 +93,12 @@ public class TaskLog {
@ApiModelProperty
(
value
=
"存放旧状态"
)
@ApiModelProperty
(
value
=
"存放旧状态"
)
private
Integer
oldStatus
;
private
Integer
oldStatus
;
@ApiModelProperty
(
value
=
"源文件"
)
private
String
taskFileRets
;
@ApiModelProperty
(
value
=
"修改后的文件"
)
private
String
updateTaskFile
;
/**
/**
* do类转化为bto类
* do类转化为bto类
*/
*/
...
@@ -122,6 +131,17 @@ public class TaskLog {
...
@@ -122,6 +131,17 @@ public class TaskLog {
}
}
}
}
taskLogBto
.
setFileVoList
(
fileVos
);
taskLogBto
.
setFileVoList
(
fileVos
);
//处理文件
if
(
this
.
getTaskFileRets
()
!=
null
){
TaskFileRet
taskFileRet
=
JacksonUtil
.
readValue
(
this
.
getTaskFileRets
(),
new
TypeReference
<
TaskFileRet
>()
{
});
taskLogBto
.
setTaskFileRet
(
taskFileRet
);
}
if
(
this
.
getUpdateTaskFile
()
!=
null
){
TaskFileRet
taskFileRet
=
JacksonUtil
.
readValue
(
this
.
getUpdateTaskFile
(),
new
TypeReference
<
TaskFileRet
>()
{
});
taskLogBto
.
setUpdateTaskFile
(
taskFileRet
);
}
return
taskLogBto
;
return
taskLogBto
;
}
}
...
...
dev-task/src/main/java/com/tykj/dev/device/task/subject/vo/TaskFileRet.java
0 → 100644
浏览文件 @
67f773fb
package
com
.
tykj
.
dev
.
device
.
task
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author zjm
* @version 1.0.0
* @ClassName FileRet.java
* @Description TODO
* @createTime 2020年08月03日 18:03:00
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel
(
value
=
"任务文件上传返回对象"
,
description
=
"任务文件上传返回对象"
)
public
class
TaskFileRet
{
/**
* 上传文件名称
*/
private
String
name
;
/**
* 文件路径
*/
private
String
filePath
;
/**
* 预览地址
*/
private
String
previewPath
;
}
dev-task/src/main/java/com/tykj/dev/device/task/subject/vo/TaskLogUserVo.java
浏览文件 @
67f773fb
...
@@ -41,4 +41,10 @@ public class TaskLogUserVo {
...
@@ -41,4 +41,10 @@ public class TaskLogUserVo {
@ApiModelProperty
(
value
=
"存放旧状态"
)
@ApiModelProperty
(
value
=
"存放旧状态"
)
private
Integer
oldStatus
;
private
Integer
oldStatus
;
@ApiModelProperty
(
value
=
"源文件"
)
private
TaskFileRet
taskFileRet
;
@ApiModelProperty
(
value
=
"修改后的文件"
)
private
TaskFileRet
updateTaskFile
;
}
}
dev-user/src/main/java/com/tykj/dev/device/user/config/SecurityConfig.java
浏览文件 @
67f773fb
...
@@ -114,6 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -114,6 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.
antMatchers
(
"/packageVersion/getVersion"
,
"/equip/packageVersion/getVersion"
).
permitAll
()
//
.
antMatchers
(
"/packageVersion/getVersion"
,
"/equip/packageVersion/getVersion"
).
permitAll
()
//
.
antMatchers
(
"/equip/file/llq/**"
).
permitAll
()
.
antMatchers
(
"/equip/file/llq/**"
).
permitAll
()
.
antMatchers
(
"/code/**"
,
"/equip/code/**"
).
permitAll
()
.
antMatchers
(
"/code/**"
,
"/equip/code/**"
).
permitAll
()
.
antMatchers
(
"/upload"
).
permitAll
()
.
antMatchers
(
HttpMethod
.
OPTIONS
,
"/**"
).
permitAll
()
.
antMatchers
(
HttpMethod
.
OPTIONS
,
"/**"
).
permitAll
()
// .withObjectPostProcessor(new ObjectPostProcessor<FilterSecurityInterceptor>() {
// .withObjectPostProcessor(new ObjectPostProcessor<FilterSecurityInterceptor>() {
// @Override
// @Override
...
...
dev-zxing/src/main/java/com/tykj/dev/device/zxing/util/QRCodeUtils.java
浏览文件 @
67f773fb
...
@@ -57,9 +57,6 @@ public class QRCodeUtils {
...
@@ -57,9 +57,6 @@ public class QRCodeUtils {
zxingTaskVo
=
new
ZxingTaskVo
(
task
.
getParentTaskId
(),
task
.
getId
());
zxingTaskVo
=
new
ZxingTaskVo
(
task
.
getParentTaskId
(),
task
.
getId
());
}
}
return
zxingTaskVo
;
return
zxingTaskVo
;
// System.out.println("图片中内容: ");
// System.out.println("content: " + result.getText());
// content = result.getText();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
catch
(
NotFoundException
e
)
{
}
catch
(
NotFoundException
e
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论