Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
f85ed9b0
提交
f85ed9b0
authored
4月 09, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
45bda9b6
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
155 行增加
和
47 行删除
+155
-47
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+12
-0
AllotBillSaveVo.java
...com/tykj/dev/device/allot/subject/vo/AllotBillSaveVo.java
+3
-0
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+1
-1
ApplyBillDetailVo.java
...m/tykj/dev/device/apply/subject/vo/ApplyBillDetailVo.java
+8
-0
DeviceApplySaveVo.java
...m/tykj/dev/device/apply/subject/vo/DeviceApplySaveVo.java
+6
-6
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+5
-0
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+1
-1
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+24
-24
DeviceLibrary.java
.../tykj/dev/device/library/subject/domin/DeviceLibrary.java
+4
-0
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+10
-0
GetTreeUtils.java
...c/src/main/java/com/tykj/dev/misc/utils/GetTreeUtils.java
+31
-0
PackingLibraryService.java
...ykj/dev/device/packing/service/PackingLibraryService.java
+7
-0
PackingLibraryServiceImpl.java
...evice/packing/service/impl/PackingLibraryServiceImpl.java
+16
-0
PackingLibrary.java
...tykj/dev/device/packing/subject/domin/PackingLibrary.java
+4
-0
RepairBillSelectController.java
.../device/repair/controller/RepairBillSelectController.java
+11
-6
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+6
-3
DeviceRetiredController.java
...ev/device/retired/controller/DeviceRetiredController.java
+2
-2
DeviceRetiredFormVo.java
...ykj/dev/device/retired/entity/vo/DeviceRetiredFormVo.java
+1
-1
DeviceRetiredResultVo.java
...j/dev/device/retired/entity/vo/DeviceRetiredResultVo.java
+3
-3
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
f85ed9b0
...
@@ -609,6 +609,18 @@ public class AllotBillController {
...
@@ -609,6 +609,18 @@ public class AllotBillController {
return
ResponseEntity
.
ok
(
"删除成功"
);
return
ResponseEntity
.
ok
(
"删除成功"
);
}
}
// @ApiOperation(value = "删除配发单草稿", notes = "可以通过这个接口删除配发单草稿")
// @PostMapping(value = "/deleteAllotBill/{taskId}")
// @Transactional(rollbackFor = Exception.class)
// public ResponseEntity deleteAllotBill(@PathVariable("taskId") int taskId) {
// //任务封存
// TaskBto taskBto = taskService.get(taskId);
// TaskBto taskBto1 = taskService.addInvolveUser(taskBto,userUtils.getCurrentUserId());
// taskService.moveToArchive(taskBto1);
// myWebSocket.sendMessage1();
// return ResponseEntity.ok("删除成功");
// }
@ApiOperation
(
value
=
"查询配发草稿详情"
,
notes
=
"可以通过这个接口查询配发草稿详情"
)
@ApiOperation
(
value
=
"查询配发草稿详情"
,
notes
=
"可以通过这个接口查询配发草稿详情"
)
@PostMapping
(
value
=
"/selectAllotDetail/{taskId}"
)
@PostMapping
(
value
=
"/selectAllotDetail/{taskId}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/subject/vo/AllotBillSaveVo.java
浏览文件 @
f85ed9b0
...
@@ -51,6 +51,9 @@ public class AllotBillSaveVo {
...
@@ -51,6 +51,9 @@ public class AllotBillSaveVo {
@ApiModelProperty
(
value
=
"发件方(B岗位)"
)
@ApiModelProperty
(
value
=
"发件方(B岗位)"
)
private
Integer
sendUserbId
;
private
Integer
sendUserbId
;
// @ApiModelProperty(value = "签章审核方")
// private Integer confirmUserId;
// @NotNull(message = "receiveUseraId不能为空")
// @NotNull(message = "receiveUseraId不能为空")
@Min
(
value
=
1
,
message
=
"receiveUseraId不能小于1"
)
@Min
(
value
=
1
,
message
=
"receiveUseraId不能小于1"
)
@ApiModelProperty
(
value
=
"收件方(A岗位)"
)
@ApiModelProperty
(
value
=
"收件方(A岗位)"
)
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
f85ed9b0
...
@@ -113,7 +113,7 @@ public class DeviceApplyController {
...
@@ -113,7 +113,7 @@ public class DeviceApplyController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
addDeviceApplyBill
(
@RequestBody
@Validated
DeviceApplySaveVo
deviceApplySaveVo
)
{
public
ResponseEntity
addDeviceApplyBill
(
@RequestBody
@Validated
DeviceApplySaveVo
deviceApplySaveVo
)
{
if
(
deviceApplySaveVo
.
getApplyType
()!=
1
)
{
if
(
deviceApplySaveVo
.
getApplyType
()!=
1
)
{
for
(
ApplyBillDetailVo
applyBillDetailVo
:
deviceApplySaveVo
.
getStorageBillDetailVoList
(
))
{
for
(
ApplyBillDetailVo
applyBillDetailVo
:
GetTreeUtils
.
splitTree2
(
deviceApplySaveVo
.
getStorageBillDetailVoList
(),
ApplyBillDetailVo:
:
getChilds
))
{
ResponseEntity
responseEntity
=
packingController
.
seqsExist
(
applyBillDetailVo
.
getPackingId
(),
applyBillDetailVo
.
getStorageCount
(),
applyBillDetailVo
.
getSeqInterval
());
ResponseEntity
responseEntity
=
packingController
.
seqsExist
(
applyBillDetailVo
.
getPackingId
(),
applyBillDetailVo
.
getStorageCount
(),
applyBillDetailVo
.
getSeqInterval
());
if
(!
"ok"
.
equals
(
responseEntity
.
getBody
()))
{
if
(!
"ok"
.
equals
(
responseEntity
.
getBody
()))
{
return
responseEntity
;
return
responseEntity
;
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/ApplyBillDetailVo.java
浏览文件 @
f85ed9b0
...
@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
...
@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* @author dengdiyi
* @author dengdiyi
*/
*/
...
@@ -26,4 +28,10 @@ public class ApplyBillDetailVo {
...
@@ -26,4 +28,10 @@ public class ApplyBillDetailVo {
@ApiModelProperty
(
value
=
"序列号区间"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"序列号区间"
,
example
=
"1"
)
private
String
seqInterval
;
private
String
seqInterval
;
private
List
<
ApplyBillDetailVo
>
childs
;
public
void
setChildNull
()
{
childs
=
null
;
}
}
}
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/DeviceApplySaveVo.java
浏览文件 @
f85ed9b0
...
@@ -4,6 +4,7 @@ import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill;
...
@@ -4,6 +4,7 @@ import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill;
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.misc.base.BeanHelper
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.GetTreeUtils
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
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
;
...
@@ -75,8 +76,9 @@ public class DeviceApplySaveVo {
...
@@ -75,8 +76,9 @@ public class DeviceApplySaveVo {
deviceApplyBillEntity
.
setApplyStatus
(
0
);
deviceApplyBillEntity
.
setApplyStatus
(
0
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
stringBuffer
.
append
(
"x"
);
stringBuffer
.
append
(
"x"
);
if
(
this
.
storageBillDetailVoList
.
size
()
>
0
)
{
if
(
this
.
storageBillDetailVoList
!=
null
&&
this
.
storageBillDetailVoList
.
size
()
>
0
)
{
for
(
ApplyBillDetailVo
s
:
storageBillDetailVoList
)
{
List
<
ApplyBillDetailVo
>
applyBillDetailVos
=
GetTreeUtils
.
splitTree
(
storageBillDetailVoList
,
ApplyBillDetailVo:
:
getChilds
,
ApplyBillDetailVo:
:
setChildNull
);
for
(
ApplyBillDetailVo
s
:
applyBillDetailVos
)
{
stringBuffer
.
append
(
s
.
getPackingId
()).
append
(
"x"
);
stringBuffer
.
append
(
s
.
getPackingId
()).
append
(
"x"
);
if
(
s
.
getStorageCount
()!=
null
)
{
if
(
s
.
getStorageCount
()!=
null
)
{
stringBuffer
.
append
(
s
.
getStorageCount
()).
append
(
"x"
);
stringBuffer
.
append
(
s
.
getStorageCount
()).
append
(
"x"
);
...
@@ -85,12 +87,10 @@ public class DeviceApplySaveVo {
...
@@ -85,12 +87,10 @@ public class DeviceApplySaveVo {
stringBuffer
.
append
(
0
).
append
(
"x"
);
stringBuffer
.
append
(
0
).
append
(
"x"
);
}
}
}
}
}
deviceApplyBillEntity
.
setApplyStat
(
JacksonUtil
.
toJSon
(
applyBillDetailVos
));
if
(
this
.
storageBillDetailVoList
!=
null
){
deviceApplyBillEntity
.
setApplyStat
(
JacksonUtil
.
toJSon
(
this
.
storageBillDetailVoList
));
if
(
this
.
applyType
!=
1
){
if
(
this
.
applyType
!=
1
){
List
<
ReplyVo
>
replyVos
=
new
ArrayList
<>();
List
<
ReplyVo
>
replyVos
=
new
ArrayList
<>();
for
(
ApplyBillDetailVo
applyBillDetailVo
:
storageBillDetailVoList
){
for
(
ApplyBillDetailVo
applyBillDetailVo
:
applyBillDetailVos
){
ReplyVo
replyVo
=
new
ReplyVo
();
ReplyVo
replyVo
=
new
ReplyVo
();
replyVo
.
setId
(
applyBillDetailVo
.
getPackingId
());
replyVo
.
setId
(
applyBillDetailVo
.
getPackingId
());
replyVo
.
setNum
(
applyBillDetailVo
.
getStorageCount
());
replyVo
.
setNum
(
applyBillDetailVo
.
getStorageCount
());
...
...
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
f85ed9b0
...
@@ -263,6 +263,11 @@ public enum LogType {
...
@@ -263,6 +263,11 @@ public enum LogType {
REPAIR_BACK_9
(
105
,
REPAIR_BACK
.
id
,
WAIT_UPLOAD_BACK_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传领取单"
),
REPAIR_BACK_9
(
105
,
REPAIR_BACK
.
id
,
WAIT_UPLOAD_BACK_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传领取单"
),
APPLY_5
(
106
,
APPLY
.
id
,
WAIT_APPLY_FILE
.
id
,
WAIT_CONFIRM_APPLY_DEVICE
.
id
,
"上传批复单"
),
APPLY_5
(
106
,
APPLY
.
id
,
WAIT_APPLY_FILE
.
id
,
WAIT_CONFIRM_APPLY_DEVICE
.
id
,
"上传批复单"
),
APPLY_6
(
107
,
APPLY
.
id
,
WAIT_CONFIRM_APPLY_DEVICE
.
id
,
END
.
id
,
"业务办结"
),
APPLY_6
(
107
,
APPLY
.
id
,
WAIT_CONFIRM_APPLY_DEVICE
.
id
,
END
.
id
,
"业务办结"
),
ALLOT_15
(
108
,
ALLOT
.
id
,
ORIGIN_STATUS
.
id
,
SIGN_WAIT_CONFIRM
.
id
,
"申请电子签章"
),
ALLOT_16
(
109
,
ALLOT
.
id
,
ALLOT_DRAFT
.
id
,
SIGN_WAIT_CONFIRM
.
id
,
"申请电子签章"
),
ALLOT_17
(
110
,
ALLOT
.
id
,
SIGN_WAIT_CONFIRM
.
id
,
ALLOT_DRAFT
.
id
,
"拒绝电子签章申请"
),
ALLOT_18
(
111
,
ALLOT
.
id
,
SIGN_WAIT_CONFIRM
.
id
,
WAIT_SIGN
.
id
,
"同意电子签章申请"
),
ALLOT_19
(
112
,
ALLOT
.
id
,
WAIT_SIGN
.
id
,
ALLOTING
.
id
,
"盖电子签章并出库"
),
;
;
public
Integer
id
;
public
Integer
id
;
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
f85ed9b0
...
@@ -148,7 +148,7 @@ public class DeviceLibraryController {
...
@@ -148,7 +148,7 @@ public class DeviceLibraryController {
@PostMapping
(
"/core/feature/summary"
)
@PostMapping
(
"/core/feature/summary"
)
public
ResponseEntity
selectCoreDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
ResponseEntity
selectCoreDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
List
<
DeviceVo
>
resultList
=
deviceLibraryService
.
getCoreDevicePage
(
deviceLibrarySelectVo
).
stream
().
map
(
DeviceLibrary:
:
parseVo
).
collect
(
Collectors
.
toList
());
List
<
DeviceVo
>
resultList
=
deviceLibraryService
.
getCoreDevicePage
(
deviceLibrarySelectVo
).
stream
().
map
(
DeviceLibrary:
:
parseVo
).
collect
(
Collectors
.
toList
());
resultList
.
forEach
(
deviceVo
->
deviceVo
.
setChilds
(
null
));
//
resultList.forEach(deviceVo -> deviceVo.setChilds(null));
// List<Comparator<DeviceVo>> comparators = new ArrayList<>();
// List<Comparator<DeviceVo>> comparators = new ArrayList<>();
// if (deviceLibrarySelectVo.getOrders().size() > 0) {
// if (deviceLibrarySelectVo.getOrders().size() > 0) {
// for (CustomOrder c:deviceLibrarySelectVo.getOrders()) {
// for (CustomOrder c:deviceLibrarySelectVo.getOrders()) {
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
f85ed9b0
...
@@ -103,17 +103,17 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -103,17 +103,17 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
libraryEntities
=
getList3
(
deviceLibrarySelectVo
,
unitName
);
libraryEntities
=
getList3
(
deviceLibrarySelectVo
,
unitName
);
}
}
//按照子装备跟在父装备后面排列返回
//按照子装备跟在父装备后面排列返回
List
<
DeviceLibrary
>
resultList
=
new
ArrayList
<>();
//
List<DeviceLibrary> resultList = new ArrayList<>();
for
(
DeviceLibrary
d
:
libraryEntities
)
{
//
for (DeviceLibrary d : libraryEntities) {
resultList
.
add
(
d
);
//
resultList.add(d);
if
(
d
.
getChilds
().
size
()
>
0
)
{
//
if (d.getChilds().size() > 0) {
resultList
.
addAll
(
d
.
getChilds
());
//
resultList.addAll(d.getChilds());
}
//
}
}
//
}
// if (deviceLibrarySelectVo.getContent()!=null){
// if (deviceLibrarySelectVo.getContent()!=null){
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// }
return
resultList
;
return
GetTreeUtils
.
splitTree
(
libraryEntities
,
DeviceLibrary:
:
getChilds
,
DeviceLibrary:
:
setChildNull
)
;
}
}
//areId不为空,查询某个区域下的所有单位的所有装备
//areId不为空,查询某个区域下的所有单位的所有装备
else
{
else
{
...
@@ -127,32 +127,32 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -127,32 +127,32 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
.
filter
(
deviceLibraryEntity
->
units
.
contains
(
deviceLibraryEntity
.
getOwnUnit
()))
.
filter
(
deviceLibraryEntity
->
units
.
contains
(
deviceLibraryEntity
.
getOwnUnit
()))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
DeviceLibrary
>
deviceLibraries
=
getList4
(
libraryEntities
);
List
<
DeviceLibrary
>
deviceLibraries
=
getList4
(
libraryEntities
);
List
<
DeviceLibrary
>
resultList
=
new
ArrayList
<>();
//
List<DeviceLibrary> resultList = new ArrayList<>();
for
(
DeviceLibrary
d
:
deviceLibraries
)
{
//
for (DeviceLibrary d : deviceLibraries) {
resultList
.
add
(
d
);
//
resultList.add(d);
if
(
d
.
getChilds
().
size
()
>
0
)
{
//
if (d.getChilds().size() > 0) {
resultList
.
addAll
(
d
.
getChilds
());
//
resultList.addAll(d.getChilds());
}
//
}
}
//
}
// if (deviceLibrarySelectVo.getContent()!=null){
// if (deviceLibrarySelectVo.getContent()!=null){
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// }
return
resultList
;
return
GetTreeUtils
.
splitTree
(
deviceLibraries
,
DeviceLibrary:
:
getChilds
,
DeviceLibrary:
:
setChildNull
)
;
}
}
//省能看到所有装备
//省能看到所有装备
if
(
selectLevel
==
1
)
{
if
(
selectLevel
==
1
)
{
List
<
DeviceLibrary
>
libraryEntities
=
getList4
(
getAllList
(
deviceLibrarySelectVo
));
List
<
DeviceLibrary
>
libraryEntities
=
getList4
(
getAllList
(
deviceLibrarySelectVo
));
List
<
DeviceLibrary
>
resultList
=
new
ArrayList
<>();
//
List<DeviceLibrary> resultList = new ArrayList<>();
for
(
DeviceLibrary
d
:
libraryEntities
)
{
//
for (DeviceLibrary d : libraryEntities) {
resultList
.
add
(
d
);
//
resultList.add(d);
if
(
d
.
getChilds
().
size
()
>
0
)
{
//
if (d.getChilds().size() > 0) {
resultList
.
addAll
(
d
.
getChilds
());
//
resultList.addAll(d.getChilds());
}
//
}
}
//
}
// if (deviceLibrarySelectVo.getContent()!=null){
// if (deviceLibrarySelectVo.getContent()!=null){
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// }
return
resultList
;
return
GetTreeUtils
.
splitTree
(
libraryEntities
,
DeviceLibrary:
:
getChilds
,
DeviceLibrary:
:
setChildNull
)
;
}
else
{
}
else
{
throw
new
ApiException
(
ResultUtil
.
failed
(
"区域等级只能为1,2,3"
));
throw
new
ApiException
(
ResultUtil
.
failed
(
"区域等级只能为1,2,3"
));
}
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/domin/DeviceLibrary.java
浏览文件 @
f85ed9b0
...
@@ -262,6 +262,10 @@ public class DeviceLibrary {
...
@@ -262,6 +262,10 @@ public class DeviceLibrary {
childs
.
add
(
deviceLibraryEntity
);
childs
.
add
(
deviceLibraryEntity
);
}
}
public
void
setChildNull
()
{
childs
=
null
;
}
public
DeviceVo
parseVo
(){
public
DeviceVo
parseVo
(){
setConfigName
();
setConfigName
();
//modelMap复制
//modelMap复制
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
f85ed9b0
...
@@ -182,6 +182,16 @@ public enum StatusEnum {
...
@@ -182,6 +182,16 @@ public enum StatusEnum {
*/
*/
ALLOT_DRAFT
(
333
,
"草稿"
),
ALLOT_DRAFT
(
333
,
"草稿"
),
/**
* 申请签章待审核
*/
SIGN_WAIT_CONFIRM
(
340
,
"申请签章待审核"
),
/**
* 待盖章出库
*/
WAIT_SIGN
(
341
,
"待盖章出库"
),
/**
/**
* 待自查
* 待自查
*/
*/
...
...
dev-misc/src/main/java/com/tykj/dev/misc/utils/GetTreeUtils.java
浏览文件 @
f85ed9b0
...
@@ -2,6 +2,7 @@ package com.tykj.dev.misc.utils;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.misc.utils;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.BiConsumer
;
import
java.util.function.BiConsumer
;
import
java.util.function.Consumer
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -61,4 +62,34 @@ public class GetTreeUtils {
...
@@ -61,4 +62,34 @@ public class GetTreeUtils {
//根据rootIds返回所有的顶层节点
//根据rootIds返回所有的顶层节点
return
rootIds
.
stream
().
map
(
map:
:
get
).
collect
(
Collectors
.
toList
());
return
rootIds
.
stream
().
map
(
map:
:
get
).
collect
(
Collectors
.
toList
());
}
}
/**
* 拆分父子结构列装,set child null
*/
public
static
<
T
>
List
<
T
>
splitTree
(
List
<
T
>
treeList
,
Function
<
T
,
List
<
T
>>
getChild
,
Consumer
<
T
>
setChild
)
{
List
<
T
>
resultList
=
new
ArrayList
<>();
for
(
T
p:
treeList
){
resultList
.
add
(
p
);
if
(
getChild
.
apply
(
p
)!=
null
&&
getChild
.
apply
(
p
).
size
()>
0
){
resultList
.
addAll
(
splitTree
(
getChild
.
apply
(
p
),
getChild
,
setChild
));
setChild
.
accept
(
p
);
}
}
return
resultList
;
}
/**
* 拆分父子结构列装
*/
public
static
<
T
>
List
<
T
>
splitTree2
(
List
<
T
>
treeList
,
Function
<
T
,
List
<
T
>>
getChild
)
{
List
<
T
>
resultList
=
new
ArrayList
<>();
for
(
T
p:
treeList
){
resultList
.
add
(
p
);
if
(
getChild
.
apply
(
p
)!=
null
&&
getChild
.
apply
(
p
).
size
()>
0
){
resultList
.
addAll
(
splitTree2
(
getChild
.
apply
(
p
),
getChild
));
}
}
return
resultList
;
}
}
}
dev-packing/src/main/java/com/tykj/dev/device/packing/service/PackingLibraryService.java
浏览文件 @
f85ed9b0
...
@@ -149,4 +149,11 @@ public interface PackingLibraryService {
...
@@ -149,4 +149,11 @@ public interface PackingLibraryService {
* 查询对应横向或纵向列装
* 查询对应横向或纵向列装
*/
*/
PackingLibrary
findSamePacking
(
Integer
parentId
,
Integer
matchingRange
);
PackingLibrary
findSamePacking
(
Integer
parentId
,
Integer
matchingRange
);
/**
* @param packingLibraries 父子结构列装
* 拆分父子结构列装
*/
List
<
PackingLibrary
>
splitTree
(
List
<
PackingLibrary
>
packingLibraries
);
}
}
dev-packing/src/main/java/com/tykj/dev/device/packing/service/impl/PackingLibraryServiceImpl.java
浏览文件 @
f85ed9b0
...
@@ -560,6 +560,22 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
...
@@ -560,6 +560,22 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
}
}
}
}
/**
* @param packingLibraries 父子结构列装
* 拆分父子结构列装
*/
@Override
public
List
<
PackingLibrary
>
splitTree
(
List
<
PackingLibrary
>
packingLibraries
)
{
List
<
PackingLibrary
>
resultList
=
new
ArrayList
<>();
for
(
PackingLibrary
p:
packingLibraries
){
resultList
.
add
(
p
);
if
(
p
.
getChilds
()!=
null
&&
p
.
getChilds
().
size
()>
0
){
resultList
.
addAll
(
splitTree
(
p
.
getChilds
()));
}
}
return
resultList
;
}
private
Specification
<
PackingLibrary
>
getSelectSpecification
(
PackingLibrarySelectVo
packingLibrarySelectVo
)
{
private
Specification
<
PackingLibrary
>
getSelectSpecification
(
PackingLibrarySelectVo
packingLibrarySelectVo
)
{
PredicateBuilder
<
PackingLibrary
>
predicateBuilder
=
Specifications
.
and
();
PredicateBuilder
<
PackingLibrary
>
predicateBuilder
=
Specifications
.
and
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/subject/domin/PackingLibrary.java
浏览文件 @
f85ed9b0
...
@@ -252,6 +252,10 @@ public class PackingLibrary {
...
@@ -252,6 +252,10 @@ public class PackingLibrary {
childs
.
add
(
packingLibraryEntity
);
childs
.
add
(
packingLibraryEntity
);
}
}
public
void
setChildNull
()
{
this
.
childs
=
null
;
}
public
PackingLibrary
setConfigName
(){
public
PackingLibrary
setConfigName
(){
ConfigCache
configCache
=
SpringUtils
.
getBean
(
"initConfigCache"
);
ConfigCache
configCache
=
SpringUtils
.
getBean
(
"initConfigCache"
);
if
(
configCache
!=
null
)
{
if
(
configCache
!=
null
)
{
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairBillSelectController.java
浏览文件 @
f85ed9b0
...
@@ -88,12 +88,17 @@ public class RepairBillSelectController {
...
@@ -88,12 +88,17 @@ public class RepairBillSelectController {
@GetMapping
(
value
=
"/repairNum"
)
@GetMapping
(
value
=
"/repairNum"
)
public
ResponseEntity
getRepairNum
(){
public
ResponseEntity
getRepairNum
(){
RepairNum
repairNum
=
new
RepairNum
();
RepairNum
repairNum
=
new
RepairNum
();
List
<
RepairDetail
>
repairDetails
=
(
ArrayList
)
repairController
.
getRepairList
(
new
RepairTaskSelectVo
(
1
)).
getBody
();
RepairTaskSelectVo
repairTaskSelectVo
=
new
RepairTaskSelectVo
(
1
);
List
<
RepairDetail
>
repairDetails2
=
(
ArrayList
)
repairController
.
getRepairList
(
new
RepairTaskSelectVo
(
2
)).
getBody
();
repairTaskSelectVo
.
setPage
(
0
);
List
<
RepairDetail
>
repairDetails3
=
(
ArrayList
)
repairController
.
getRepairList
(
new
RepairTaskSelectVo
(
3
)).
getBody
();
repairTaskSelectVo
.
setSize
(
Integer
.
MAX_VALUE
);
repairNum
.
setNum1
(
repairDetails
.
size
());
Page
<
RepairDetail
>
repairDetails
=
(
Page
)
repairController
.
getRepairList
(
repairTaskSelectVo
).
getBody
();
repairNum
.
setNum2
(
repairDetails2
.
size
());
repairTaskSelectVo
.
setType
(
2
);
repairNum
.
setNum3
(
repairDetails3
.
size
());
Page
<
RepairDetail
>
repairDetails2
=
(
Page
)
repairController
.
getRepairList
(
repairTaskSelectVo
).
getBody
();
repairTaskSelectVo
.
setType
(
3
);
Page
<
RepairDetail
>
repairDetails3
=
(
Page
)
repairController
.
getRepairList
(
repairTaskSelectVo
).
getBody
();
repairNum
.
setNum1
(
Long
.
valueOf
(
repairDetails
.
getTotalElements
()).
intValue
());
repairNum
.
setNum2
(
Long
.
valueOf
(
repairDetails2
.
getTotalElements
()).
intValue
());
repairNum
.
setNum3
(
Long
.
valueOf
(
repairDetails3
.
getTotalElements
()).
intValue
());
return
ResponseEntity
.
ok
(
repairNum
);
return
ResponseEntity
.
ok
(
repairNum
);
}
}
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
f85ed9b0
...
@@ -1484,7 +1484,8 @@ public class RepairController {
...
@@ -1484,7 +1484,8 @@ public class RepairController {
repairDetail
.
setLocationUnit
(
deviceLibraryMap
.
get
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setLocationUnit
(
deviceLibraryMap
.
get
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setConfigName
();
repairDetail
.
setConfigName
();
});
});
return
ResponseEntity
.
ok
(
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
collect
(
Collectors
.
toList
()));
List
<
RepairDetail
>
repairDetails1
=
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
collect
(
Collectors
.
toList
());
return
ResponseEntity
.
ok
(
PageUtil
.
getPerPage
(
repairTaskSelectVo
.
getPage
(),
repairTaskSelectVo
.
getSize
(),
repairDetails1
,
repairTaskSelectVo
.
getPageable
()));
}
}
//送修装备
//送修装备
else
if
(
type
==
2
){
else
if
(
type
==
2
){
...
@@ -1496,7 +1497,8 @@ public class RepairController {
...
@@ -1496,7 +1497,8 @@ public class RepairController {
repairDetail
.
setLocationUnit
(
deviceLibraryMap
.
get
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setLocationUnit
(
deviceLibraryMap
.
get
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setConfigName
();
repairDetail
.
setConfigName
();
});
});
return
ResponseEntity
.
ok
(
repairDetails1
.
stream
().
filter
(
repairDetail
->
userPublicService
.
findUnitsNameByUserId
(
repairDetail
.
getCreateUserId
()).
equals
(
unitName
)).
collect
(
Collectors
.
toList
()));
List
<
RepairDetail
>
repairDetails2
=
repairDetails1
.
stream
().
filter
(
repairDetail
->
userPublicService
.
findUnitsNameByUserId
(
repairDetail
.
getCreateUserId
()).
equals
(
unitName
)).
collect
(
Collectors
.
toList
());
return
ResponseEntity
.
ok
(
PageUtil
.
getPerPage
(
repairTaskSelectVo
.
getPage
(),
repairTaskSelectVo
.
getSize
(),
repairDetails2
,
repairTaskSelectVo
.
getPageable
()));
}
}
//待领取装备
//待领取装备
else
if
(
type
==
3
){
else
if
(
type
==
3
){
...
@@ -1505,7 +1507,8 @@ public class RepairController {
...
@@ -1505,7 +1507,8 @@ public class RepairController {
repairDetail
.
setLocationUnit
(
deviceLibraryMap
.
get
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setLocationUnit
(
deviceLibraryMap
.
get
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setConfigName
();
repairDetail
.
setConfigName
();
});
});
return
ResponseEntity
.
ok
(
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
collect
(
Collectors
.
toList
()));
List
<
RepairDetail
>
repairDetails2
=
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
collect
(
Collectors
.
toList
());
return
ResponseEntity
.
ok
(
PageUtil
.
getPerPage
(
repairTaskSelectVo
.
getPage
(),
repairTaskSelectVo
.
getSize
(),
repairDetails2
,
repairTaskSelectVo
.
getPageable
()));
}
}
// else if(type==4){
// else if(type==4){
// List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(2,repairTaskSelectVo.getPageable().getSort());
// List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(2,repairTaskSelectVo.getPageable().getSort());
...
...
dev-retired/src/main/java/com/tykj/dev/device/retired/controller/DeviceRetiredController.java
浏览文件 @
f85ed9b0
...
@@ -237,10 +237,10 @@ public class DeviceRetiredController {
...
@@ -237,10 +237,10 @@ public class DeviceRetiredController {
childDeviceRetiredResultVo
.
setCount
(
deviceRetiredBillService
.
getCantPackingCount
(
p
.
getId
()));
childDeviceRetiredResultVo
.
setCount
(
deviceRetiredBillService
.
getCantPackingCount
(
p
.
getId
()));
if
(!
p
.
getChilds
().
isEmpty
()){
if
(!
p
.
getChilds
().
isEmpty
()){
for
(
PackingLibrary
pack:
p
.
getChilds
())
{
for
(
PackingLibrary
pack:
p
.
getChilds
())
{
childDeviceRetiredResultVo
.
getChild
Node
s
().
add
(
calcDeviceRetiredResultVo
(
pack
));
childDeviceRetiredResultVo
.
getChilds
().
add
(
calcDeviceRetiredResultVo
(
pack
));
}
}
}
}
deviceRetiredResultVo
.
getChild
Node
s
().
add
(
childDeviceRetiredResultVo
);
deviceRetiredResultVo
.
getChilds
().
add
(
childDeviceRetiredResultVo
);
}
}
return
deviceRetiredResultVo
;
return
deviceRetiredResultVo
;
}
}
...
...
dev-retired/src/main/java/com/tykj/dev/device/retired/entity/vo/DeviceRetiredFormVo.java
浏览文件 @
f85ed9b0
...
@@ -16,7 +16,7 @@ import java.util.List;
...
@@ -16,7 +16,7 @@ import java.util.List;
@Data
@Data
public
class
DeviceRetiredFormVo
{
public
class
DeviceRetiredFormVo
{
@NotNull
//
@NotNull
private
Integer
confirmUserId
;
private
Integer
confirmUserId
;
@NotNull
@NotNull
...
...
dev-retired/src/main/java/com/tykj/dev/device/retired/entity/vo/DeviceRetiredResultVo.java
浏览文件 @
f85ed9b0
...
@@ -44,12 +44,12 @@ public class DeviceRetiredResultVo {
...
@@ -44,12 +44,12 @@ public class DeviceRetiredResultVo {
private
Integer
isPart
;
private
Integer
isPart
;
@ApiModelProperty
(
value
=
"数量"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"数量"
,
example
=
"1"
)
private
List
<
DeviceRetiredResultVo
>
child
Node
s
=
new
ArrayList
<>();
private
List
<
DeviceRetiredResultVo
>
childs
=
new
ArrayList
<>();
public
boolean
devNumIsZero
(){
public
boolean
devNumIsZero
(){
if
(
this
.
count
==
0
){
if
(
this
.
count
==
0
){
if
(
this
.
child
Node
s
.
size
()>
0
){
if
(
this
.
childs
.
size
()>
0
){
for
(
DeviceRetiredResultVo
d:
this
.
child
Node
s
)
{
for
(
DeviceRetiredResultVo
d:
this
.
childs
)
{
if
(
d
.
getCount
()>
0
){
if
(
d
.
getCount
()>
0
){
return
false
;
return
false
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论