Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
5b7aa28e
提交
5b7aa28e
authored
9月 21, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改配发日志bug
上级
1c435f86
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
13 行增加
和
8 行删除
+13
-8
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+2
-2
RepairControllerTest.java
...c/test/java/com/tykj/dev/repair/RepairControllerTest.java
+11
-6
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
5b7aa28e
...
@@ -185,8 +185,8 @@ public class AllotBillController {
...
@@ -185,8 +185,8 @@ public class AllotBillController {
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
//添加业务日志
//添加业务日志
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"配发单"
,
allot
BillEntity
.
getBillFileName
(),
allotBillEntity
.
getBillFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"配发单"
,
allot
ReceiveVo
.
getBillFileName
(),
allotReceiveVo
.
getBillFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"入库确认单"
,
allot
BillEntity
.
getReceiveFileName
(),
allotBillEntity
.
getReceiveFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"入库确认单"
,
allot
ReceiveVo
.
getReceiveFileName
(),
allotReceiveVo
.
getReceiveFileUrl
()));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"接收并发起入库"
,
fileVoList
);
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"接收并发起入库"
,
fileVoList
);
taskLogService
.
addLog
(
taskLogBto
);
taskLogService
.
addLog
(
taskLogBto
);
//更新账单状态
//更新账单状态
...
...
dev-union/src/test/java/com/tykj/dev/repair/RepairControllerTest.java
浏览文件 @
5b7aa28e
package
com
.
tykj
.
dev
.
repair
;
package
com
.
tykj
.
dev
.
repair
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wenhao.jpa.Specifications
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.repair.repository.RepairDetailDao
;
import
com.tykj.dev.device.repair.repository.RepairDetailDao
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.vo.*
;
import
com.tykj.dev.device.repair.subject.vo.*
;
...
@@ -10,11 +12,12 @@ import com.tykj.dev.device.user.subject.entity.SecurityUser;
...
@@ -10,11 +12,12 @@ import com.tykj.dev.device.user.subject.entity.SecurityUser;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.union.BaseTest
;
import
com.tykj.dev.union.BaseTest
;
import
com.tykj.dev.union.BeanConfig
;
import
com.tykj.dev.union.BeanConfig
;
import
org.junit.
jupiter.api.
Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
...
@@ -54,9 +57,9 @@ public class RepairControllerTest extends BaseTest {
...
@@ -54,9 +57,9 @@ public class RepairControllerTest extends BaseTest {
@Autowired
@Autowired
private
UserUtils
userUtils
;
private
UserUtils
userUtils
;
int
repairSendTaskId
;
static
int
repairSendTaskId
;
int
repairBackTaskId
;
static
int
repairBackTaskId
;
/**
/**
* 发起维修运输过程单元测试
* 发起维修运输过程单元测试
...
@@ -99,7 +102,7 @@ public class RepairControllerTest extends BaseTest {
...
@@ -99,7 +102,7 @@ public class RepairControllerTest extends BaseTest {
.
sorted
(
Comparator
.
comparing
(
Task:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
Task:
:
getCreateTime
).
reversed
())
.
collect
(
Collectors
.
toList
())
.
collect
(
Collectors
.
toList
())
.
get
(
0
);
.
get
(
0
);
this
.
repairSendTaskId
=
initTask
.
getId
();
repairSendTaskId
=
initTask
.
getId
();
//审核通过
//审核通过
RepairConfirmVo
repairConfirmVo
=
new
RepairConfirmVo
();
RepairConfirmVo
repairConfirmVo
=
new
RepairConfirmVo
();
repairConfirmVo
.
setStatus
(
0
);
repairConfirmVo
.
setStatus
(
0
);
...
@@ -158,14 +161,16 @@ public class RepairControllerTest extends BaseTest {
...
@@ -158,14 +161,16 @@ public class RepairControllerTest extends BaseTest {
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
RequestBuilder
request
;
RequestBuilder
request
;
if
(
level
==
2
||
level
==
3
){
if
(
level
==
2
||
level
==
3
){
request
=
get
(
"/repair/backDeviceSelect"
+
repairSendTaskId
)
request
=
get
(
"/repair/backDeviceSelect
/
"
+
repairSendTaskId
)
.
header
(
"Origin"
,
"*"
)
.
header
(
"Origin"
,
"*"
)
.
contentType
(
MediaType
.
APPLICATION_JSON
);
.
contentType
(
MediaType
.
APPLICATION_JSON
);
MvcResult
result
=
mockMvc
.
perform
(
request
)
MvcResult
result
=
mockMvc
.
perform
(
request
)
.
andExpect
(
status
().
isOk
())
.
andExpect
(
status
().
isOk
())
.
andDo
(
mvcResult1
->
System
.
out
.
println
(
"[测试结果] 维修退回装备出库查询成功"
))
.
andDo
(
mvcResult1
->
System
.
out
.
println
(
"[测试结果] 维修退回装备出库查询成功"
))
.
andReturn
();
.
andReturn
();
System
.
out
.
println
(
result
.
getAsyncResult
());
String
body
=
result
.
getResponse
().
getContentAsString
();
ResultObj
resultObj
=
JSONObject
.
parseObject
(
body
,
ResultObj
.
class
);
System
.
out
.
println
(
"出库装备详情:"
+
resultObj
.
getData
());
}
}
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论