Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
7a1bfd5d
提交
7a1bfd5d
authored
3月 11, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
dae697ce
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
108 行增加
和
4 行删除
+108
-4
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+10
-0
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+11
-4
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+25
-0
DeviceLibrary.java
.../tykj/dev/device/library/subject/domin/DeviceLibrary.java
+5
-0
DeviceVo.java
...java/com/tykj/dev/device/library/subject/vo/DeviceVo.java
+5
-0
LifeStatusVo.java
.../com/tykj/dev/device/library/subject/vo/LifeStatusVo.java
+21
-0
PackingLibraryServiceImpl.java
...evice/packing/service/impl/PackingLibraryServiceImpl.java
+11
-0
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+20
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
7a1bfd5d
...
@@ -611,4 +611,14 @@ public class AllotBillController {
...
@@ -611,4 +611,14 @@ public class AllotBillController {
}
}
return
ResponseEntity
.
ok
(
"OK"
);
return
ResponseEntity
.
ok
(
"OK"
);
}
}
@ApiOperation
(
value
=
"上传发送方签发人"
,
notes
=
"上传发送方签发人"
)
@PostMapping
(
value
=
"/updateAgent/{id}/{name}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
updateAgent
(
@PathVariable
(
"id"
)
int
taskId
,
@PathVariable
(
"name"
)
String
name
){
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
AllotBill
allotBill
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
allotBill
.
setAgent
(
name
);
return
ResponseEntity
.
ok
(
allotBillService
.
update
(
allotBill
));
}
}
}
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
7a1bfd5d
...
@@ -36,10 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -36,10 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -288,4 +285,14 @@ public class BackController {
...
@@ -288,4 +285,14 @@ public class BackController {
}
}
return
ResponseEntity
.
ok
(
"OK"
);
return
ResponseEntity
.
ok
(
"OK"
);
}
}
@ApiOperation
(
value
=
"上传发送方签发人"
,
notes
=
"上传发送方签发人"
)
@PostMapping
(
value
=
"/updateAgent/{id}/{name}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
updateAgent
(
@PathVariable
(
"id"
)
int
taskId
,
@PathVariable
(
"name"
)
String
name
){
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
AllotBackBill
allotBackBill
=
allotBackBillService
.
getOne
(
taskBto
.
getBillId
());
allotBackBill
.
setAgent
(
name
);
return
ResponseEntity
.
ok
(
allotBackBillService
.
update
(
allotBackBill
));
}
}
}
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
7a1bfd5d
...
@@ -13,6 +13,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLog;
...
@@ -13,6 +13,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLog;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.GetTreeUtils
;
import
com.tykj.dev.misc.utils.PageUtil
;
import
com.tykj.dev.misc.utils.PageUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -143,6 +144,30 @@ public class DeviceLibraryController {
...
@@ -143,6 +144,30 @@ public class DeviceLibraryController {
return
ResultUtil
.
success
(
map
);
return
ResultUtil
.
success
(
map
);
}
}
@ApiOperation
(
value
=
"模糊查询日常管理装备父子分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@PostMapping
(
"/core/feature/summary/daily"
)
public
ResponseEntity
selectDailyDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
DeviceLibrary
>
resultList
=
deviceLibraryService
.
getList
(
deviceLibrarySelectVo
);
resultList
.
forEach
(
DeviceLibrary:
:
setConfigName
);
Map
<
Integer
,
DeviceLibrary
>
nodeCollect
=
resultList
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLibrary:
:
getId
,
deviceLibraryEntity
->
deviceLibraryEntity
));
List
<
DeviceVo
>
containList
=
GetTreeUtils
.
parseTreeFromDown
(
resultList
,
DeviceLibrary:
:
getId
,
deviceLibraryEntity
->
Optional
.
ofNullable
(
nodeCollect
.
get
(
deviceLibraryEntity
.
getPartParentId
())),
DeviceLibrary:
:
addChildNode
).
stream
().
map
(
DeviceLibrary:
:
parseVo
).
sorted
(
Comparator
.
comparing
(
DeviceVo:
:
getLifeStatus
)).
collect
(
Collectors
.
toList
());
map
.
put
(
"models"
,
resultList
.
stream
().
map
(
DeviceLibrary:
:
getModel
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"names"
,
resultList
.
stream
().
map
(
DeviceLibrary:
:
getName
).
collect
(
Collectors
.
toSet
()));
Set
<
Integer
>
status
=
resultList
.
stream
().
map
(
DeviceLibrary:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
Map
<
Integer
,
String
>
lifeStatusMap
=
configCache
.
getLifeStatusMap
();
map
.
put
(
"lifeStatus"
,
status
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
lifeStatusMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
Page
<
DeviceVo
>
deviceLibraryEntities
=
PageUtil
.
getPerPage
(
deviceLibrarySelectVo
.
getPage
(),
deviceLibrarySelectVo
.
getSize
(),
containList
,
deviceLibrarySelectVo
.
getPageable
());
map
.
put
(
"pages"
,
deviceLibraryEntities
);
return
ResultUtil
.
success
(
map
);
}
@ApiOperation
(
value
=
"查询存在的装备名称"
,
notes
=
"可以通过这个接口查询存在的装备名称"
)
@ApiOperation
(
value
=
"查询存在的装备名称"
,
notes
=
"可以通过这个接口查询存在的装备名称"
)
@GetMapping
(
"/selectAllName"
)
@GetMapping
(
"/selectAllName"
)
public
ResponseEntity
selectAllName
()
{
public
ResponseEntity
selectAllName
()
{
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/domin/DeviceLibrary.java
浏览文件 @
7a1bfd5d
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.library.subject.domin;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.library.subject.domin;
import
com.tykj.dev.config.cache.ConfigCache
;
import
com.tykj.dev.config.cache.ConfigCache
;
import
com.tykj.dev.device.library.subject.vo.DeviceVo
;
import
com.tykj.dev.device.library.subject.vo.DeviceVo
;
import
com.tykj.dev.device.library.subject.vo.LifeStatusVo
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -273,6 +274,10 @@ public class DeviceLibrary {
...
@@ -273,6 +274,10 @@ public class DeviceLibrary {
}
}
return
this
;
return
this
;
}
}
public
LifeStatusVo
getLifeStatusVo
(){
return
new
LifeStatusVo
(
this
.
lifeStatus
,
this
.
lifeStatusName
);
}
// public String getKeyWords(){
// public String getKeyWords(){
// StringBuffer stringBuffer = new StringBuffer();
// StringBuffer stringBuffer = new StringBuffer();
// stringBuffer.append(this.model);
// stringBuffer.append(this.model);
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceVo.java
浏览文件 @
7a1bfd5d
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
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
;
import
java.util.List
;
/**
/**
* @author dengdiyi
* @author dengdiyi
*/
*/
...
@@ -77,4 +80,6 @@ public class DeviceVo {
...
@@ -77,4 +80,6 @@ public class DeviceVo {
@ApiModelProperty
(
value
=
"入库类型"
)
@ApiModelProperty
(
value
=
"入库类型"
)
private
String
storageTypeName
;
private
String
storageTypeName
;
private
List
<
DeviceLibrary
>
childs
;
}
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/LifeStatusVo.java
0 → 100644
浏览文件 @
7a1bfd5d
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
/**
* @author dengdiyi
*/
@Data
@AllArgsConstructor
@ApiModel
(
"装备生命状态类"
)
public
class
LifeStatusVo
{
private
Integer
lifeStatus
;
@ApiModelProperty
(
value
=
"生命状态"
)
private
String
lifeStatusName
;
}
dev-packing/src/main/java/com/tykj/dev/device/packing/service/impl/PackingLibraryServiceImpl.java
浏览文件 @
7a1bfd5d
...
@@ -212,6 +212,17 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
...
@@ -212,6 +212,17 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
final
Integer
status
=
selectPack
.
getStatus
();
final
Integer
status
=
selectPack
.
getStatus
();
final
Integer
secretLevel
=
selectPack
.
getSecretLevel
();
final
Integer
secretLevel
=
selectPack
.
getSecretLevel
();
List
<
PackingLibrary
>
packingLibraryEntities
=
packingLibraryDao
.
findAll
(
getSelectSpecification6
());
List
<
PackingLibrary
>
packingLibraryEntities
=
packingLibraryDao
.
findAll
(
getSelectSpecification6
());
// .stream().filter(packingLibrary -> {
// boolean isSameModel = model == null || packingLibrary.getModel().equals(model);
// boolean isSameName = name == null || packingLibrary.getName().equals(name);
// boolean isSameStatus = status == null || packingLibrary.getStatus().equals(status);
// boolean isSameSecretLevel = secretLevel == null || packingLibrary.getSecretLevel().equals(secretLevel);
// boolean isContainContent = content == null
// || packingLibrary.getModel().contains(content)
// || configCache.getInvisibleRangeMap().get(packingLibrary.getInvisibleRange()).contains(content)
// || configCache.getSecretLevelMap().get(packingLibrary.getSecretLevel()).contains(content);
// return isSameModel && isSameName && isSameStatus && isSameSecretLevel && isContainContent;
// }).collect(Collectors.toList());
packingLibraryEntities
.
forEach
(
PackingLibrary:
:
setConfigName
);
packingLibraryEntities
.
forEach
(
PackingLibrary:
:
setConfigName
);
//返回父子结构
//返回父子结构
Map
<
Integer
,
PackingLibrary
>
nodeCollect
=
Map
<
Integer
,
PackingLibrary
>
nodeCollect
=
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
7a1bfd5d
...
@@ -1763,4 +1763,24 @@ public class RepairController {
...
@@ -1763,4 +1763,24 @@ public class RepairController {
});
});
return
orderList
;
return
orderList
;
}
}
@ApiOperation
(
value
=
"上传送修发送方签发人"
,
notes
=
"上传发送方签发人"
)
@PostMapping
(
value
=
"/updateSendAgent/{id}/{name}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
updateSendAgent
(
@PathVariable
(
"id"
)
int
taskId
,
@PathVariable
(
"name"
)
String
name
){
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
RepairBill
repairBill
=
deviceRepairBillService
.
getOne
(
taskBto
.
getBillId
());
repairBill
.
setStartUserB
(
name
);
return
ResponseEntity
.
ok
(
deviceRepairBillService
.
update
(
repairBill
));
}
@ApiOperation
(
value
=
"上传领取发送方签发人"
,
notes
=
"上传发送方签发人"
)
@PostMapping
(
value
=
"/updateBackAgent/{id}/{name}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
updateBackAgent
(
@PathVariable
(
"id"
)
int
taskId
,
@PathVariable
(
"name"
)
String
name
){
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
RepairBackBill
repairBackBill
=
deviceRepairBackBillService
.
getOne
(
taskBto
.
getBillId
());
repairBackBill
.
setAgent
(
name
);
return
ResponseEntity
.
ok
(
deviceRepairBackBillService
.
update
(
repairBackBill
));
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论