Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
952d78a6
提交
952d78a6
authored
4月 22, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
7b90a5e9
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
178 行增加
和
109 行删除
+178
-109
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+2
-6
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+9
-0
BatchAllotController.java
...ykj/dev/device/allot/controller/BatchAllotController.java
+50
-0
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+40
-71
DeviceLibrarySelectVo.java
.../dev/device/library/subject/vo/DeviceLibrarySelectVo.java
+3
-0
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+2
-2
DeviceSeqUtil.java
.../src/main/java/com/tykj/dev/misc/utils/DeviceSeqUtil.java
+4
-0
PackingController.java
...tykj/dev/device/packing/controller/PackingController.java
+5
-5
PackingLibraryServiceImpl.java
...evice/packing/service/impl/PackingLibraryServiceImpl.java
+3
-0
RepairBillSelectController.java
.../device/repair/controller/RepairBillSelectController.java
+1
-1
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+26
-22
RepairTaskSelectVo.java
...tykj/dev/device/repair/subject/vo/RepairTaskSelectVo.java
+2
-0
StatisticalController.java
...ykj/dev/statistical/controller/StatisticalController.java
+24
-1
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+1
-1
hibernate.properties
dev-union/src/main/resources/hibernate.properties
+2
-0
Message.java
.../com/tykj/dev/device/user/read/subject/domin/Message.java
+4
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
952d78a6
...
...
@@ -229,9 +229,7 @@ public class AllotBillController {
PackingLibrary
packingLibrary
=
packingLibraryService
.
getOne
(
deviceLibraryEntity
.
getPackingId
());
PackingLibrary
packingLibrary1
=
packingLibraryService
.
findSamePacking
(
packingLibrary
.
getPartParentId
(),
1
);
if
(
packingLibrary1
==
null
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"error"
,
"序列号为"
+
deviceLibraryEntity
.
getSeqNumber
()+
"的装备所属列装不存在配用范围为省对下纵向的列装装备"
);
return
ResponseEntity
.
ok
(
map
);
throw
new
ApiException
(
ResponseEntity
.
status
(
20000
).
body
(
new
ResultObj
(
"序列号为"
+
deviceLibraryEntity
.
getSeqNumber
()+
"的装备所属列装不存在配用范围为省对下纵向的列装装备"
)));
}
else
{
deviceLibraryEntity
.
setPackingId
(
packingLibrary1
.
getId
());
...
...
@@ -254,9 +252,7 @@ public class AllotBillController {
PackingLibrary
packingLibrary
=
packingLibraryService
.
getOne
(
deviceLibraryEntity
.
getPackingId
());
PackingLibrary
packingLibrary1
=
packingLibraryService
.
findSamePacking
(
packingLibrary
.
getPartParentId
(),
3
);
if
(
packingLibrary1
==
null
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"error"
,
"序列号为"
+
deviceLibraryEntity
.
getSeqNumber
()
+
"的装备所属列装不存在配用范围为省对下横向的列装装备"
);
return
ResponseEntity
.
ok
(
map
);
throw
new
ApiException
(
ResponseEntity
.
status
(
20000
).
body
(
new
ResultObj
(
"序列号为"
+
deviceLibraryEntity
.
getSeqNumber
()
+
"的装备所属列装不存在配用范围为省对下横向的列装装备"
)));
}
else
{
changeMap
.
put
(
deviceLibraryEntity
.
getPackingId
(),
packingLibrary1
.
getId
());
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
952d78a6
...
...
@@ -332,8 +332,17 @@ public class BackController {
allotBackBill
.
setReceiveUserbId
(
fileVo
.
getReceiveUserbId
());
idList
.
add
(
fileVo
.
getReceiveUserbId
());
}
if
(
fileVo
.
getSendUserbId
()!=
null
){
allotBackBill
.
setSendUserbId
(
fileVo
.
getSendUserbId
());
allotBackBill
.
setAgent
(
userPublicService
.
getOne
(
fileVo
.
getSendUserbId
()).
getName
());
List
<
Integer
>
idList1
=
new
ArrayList
<>();
idList1
.
add
(
fileVo
.
getSendUserbId
());
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"被选为签发人"
,
idList1
,
1
);
messageService
.
add
(
messageBto
);
}
//保存账单
allotBackBill
.
setSendFiles
(
FilesUtil
.
stringFileToList
(
fileVo
.
getAllotFiles
()));
allotBackBill
.
setBackStatus
(
3
);
allotBackBillService
.
update
(
allotBackBill
);
List
<
Integer
>
ids
=
StringSplitUtil
.
split
(
allotBackBill
.
getBackCheckDetail
());
//业务完结
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BatchAllotController.java
0 → 100644
浏览文件 @
952d78a6
package
com
.
tykj
.
dev
.
device
.
allot
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.allot.service.AllotBillService
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author dengdiyi
*/
@RestController
@RequestMapping
(
value
=
"/batchAllot"
)
@AutoDocument
@Api
(
tags
=
"装备配发模块"
,
description
=
"装备配发接口"
)
@Slf4j
public
class
BatchAllotController
{
@Autowired
private
AllotBillService
allotBillService
;
@Autowired
private
UserUtils
userUtils
;
@Autowired
private
TaskService
taskService
;
@Autowired
private
DeviceLibraryService
deviceLibraryService
;
@Autowired
private
DeviceLogService
deviceLogService
;
@ApiOperation
(
value
=
"发起批量配发"
)
@PostMapping
(
value
=
"/createBatchAllot"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
createBatchAllot
(){
return
ResponseEntity
.
ok
(
""
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
952d78a6
package
com
.
tykj
.
dev
.
device
.
library
.
controller
;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.config.cache.ConfigCache
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
...
...
@@ -27,6 +29,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.Min
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -134,10 +137,15 @@ public class DeviceLibraryController {
@ApiOperation
(
value
=
"查询检查装备列表"
,
notes
=
"可以通过这个接口查询装备列表"
)
@GetMapping
(
"/selectCheckDeviceList"
)
public
ResponseEntity
selectDeviceList
()
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getCheckList
();
deviceLibraryEntities
.
forEach
(
DeviceLibrary:
:
setConfigName
);
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryService
.
getNotInStockList
();
String
unit
=
userUtils
.
getCurrentUserUnitName
();
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
Specifications
.
and
();
predicateBuilder
.
eq
(
"ownUnit"
,
unit
);
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
findAll
(
predicateBuilder
.
build
());
deviceLibraries
.
forEach
(
DeviceLibrary:
:
setConfigName
);
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraries
.
stream
()
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLocationUnit
().
equals
(
unit
))
.
collect
(
Collectors
.
toList
());
deviceLibraries
.
removeAll
(
deviceLibraryEntities
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"stockDevices"
,
deviceLibraryEntities
);
map
.
put
(
"notInStockDevices"
,
deviceLibraries
);
...
...
@@ -154,77 +162,38 @@ public class DeviceLibraryController {
@ApiOperation
(
value
=
"模糊查询核心装备分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@PostMapping
(
"/core/feature/summary"
)
public
ResponseEntity
selectCoreDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
List
<
DeviceVo
>
resultList
=
deviceLibraryService
.
getCoreDevicePage
(
deviceLibrarySelectVo
).
stream
().
map
(
DeviceLibrary:
:
parseVo
).
collect
(
Collectors
.
toList
());
// resultList.forEach(deviceVo -> deviceVo.setChilds(null));
// List<Comparator<DeviceVo>> comparators = new ArrayList<>();
// if (deviceLibrarySelectVo.getOrders().size() > 0) {
// for (CustomOrder c:deviceLibrarySelectVo.getOrders()) {
// if ("model".equals(c.getCoulmn())){
// if ("ASC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getModel,Comparator.nullsFirst(String::compareTo)));
// }
// else if ("DESC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getModel,Comparator.nullsFirst(String::compareTo)).reversed());
// }
// }
// else if ("name".equals(c.getCoulmn())){
// if ("ASC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getName,Comparator.nullsFirst(String::compareTo)));
// }
// else if ("DESC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getName,Comparator.nullsFirst(String::compareTo)).reversed());
// }
// }
// else if ("seqNumber".equals(c.getCoulmn())){
// if ("ASC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getSeqNumber,Comparator.nullsFirst(String::compareTo)));
// }
// else if ("DESC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getSeqNumber,Comparator.nullsFirst(String::compareTo)).reversed());
// }
// }
// else if ("locationUnit".equals(c.getCoulmn())){
// if ("ASC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getLocationUnit,Comparator.nullsFirst(String::compareTo)));
// }
// else if ("DESC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getLocationUnit,Comparator.nullsFirst(String::compareTo)).reversed());
// }
// }
// else if ("ownUnit".equals(c.getCoulmn())){
// if ("ASC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getOwnUnit,Comparator.nullsFirst(String::compareTo)));
// }
// else if ("DESC".equals(c.getDirection().toString())) {
// comparators.add(Comparator.comparing(DeviceVo::getOwnUnit,Comparator.nullsFirst(String::compareTo)).reversed());
// }
// }
// }
// if (comparators.size()==1){
// resultList = resultList.stream().sorted(comparators.get(0)).collect(Collectors.toList());
// }
// else if(comparators.size()==2){
// resultList = resultList.stream().sorted(comparators.get(0).thenComparing(comparators.get(1))).collect(Collectors.toList());
// }
// else if(comparators.size()==3){
// resultList = resultList.stream().sorted(comparators.get(0).thenComparing(comparators.get(1)).thenComparing(comparators.get(2))).collect(Collectors.toList());
// }
// else if(comparators.size()==4){
// resultList = resultList.stream().sorted(comparators.get(0).thenComparing(comparators.get(1)).thenComparing(comparators.get(2)).thenComparing(comparators.get(3))).collect(Collectors.toList());
// }
// else if(comparators.size()==5){
// resultList = resultList.stream().sorted(comparators.get(0).thenComparing(comparators.get(1)).thenComparing(comparators.get(2)).thenComparing(comparators.get(3)).thenComparing(comparators.get(4))).collect(Collectors.toList());
// }
// }
Page
<
DeviceVo
>
deviceLibraryEntities
=
PageUtil
.
getPerPage
(
deviceLibrarySelectVo
.
getPage
(),
deviceLibrarySelectVo
.
getSize
(),
resultList
,
deviceLibrarySelectVo
.
getPageable
());
Boolean
hasModelDim
=
deviceLibrarySelectVo
.
getModelDim
()!=
null
;
Boolean
hasNameDim
=
deviceLibrarySelectVo
.
getNameDim
()!=
null
;
Boolean
hasSeqDim
=
deviceLibrarySelectVo
.
getSeqDim
()!=
null
;
Boolean
hasLocationUnitDim
=
deviceLibrarySelectVo
.
getLocationUnitDim
()!=
null
;
Boolean
hasOwnUnitDim
=
deviceLibrarySelectVo
.
getOwnUnitDim
()!=
null
;
Boolean
hasLifeStatusDim
=
deviceLibrarySelectVo
.
getLifeStatusDim
()!=
null
;
Boolean
hasUpdateTimeDim
=
deviceLibrarySelectVo
.
getUpdateTimeDim
()!=
null
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
DeviceLibrary
>
resultList
=
deviceLibraryService
.
getCoreDevicePage
(
deviceLibrarySelectVo
);
resultList
.
forEach
(
DeviceLibrary:
:
setConfigName
);
if
(
hasModelDim
||
hasLifeStatusDim
||
hasLocationUnitDim
||
hasNameDim
||
hasOwnUnitDim
||
hasSeqDim
)
{
resultList
=
resultList
.
stream
().
filter
(
deviceLibrary
->
{
Boolean
containModelDim
=
!
hasModelDim
||
deviceLibrary
.
getModel
().
contains
(
deviceLibrarySelectVo
.
getModelDim
());
Boolean
containNameDim
=
!
hasNameDim
||
deviceLibrary
.
getName
().
contains
(
deviceLibrarySelectVo
.
getNameDim
());
Boolean
containSeqDim
=
!
hasSeqDim
||
deviceLibrary
.
getSeqNumber
().
contains
(
deviceLibrarySelectVo
.
getSeqDim
());
Boolean
containLocationUnitDim
=
!
hasLocationUnitDim
||
deviceLibrary
.
getLocationUnit
().
contains
(
deviceLibrarySelectVo
.
getLocationUnitDim
());
Boolean
containOwnUnitDim
=
!
hasOwnUnitDim
||
deviceLibrary
.
getOwnUnit
().
contains
(
deviceLibrarySelectVo
.
getOwnUnitDim
());
Boolean
containLifeStatusDim
=
!
hasLifeStatusDim
||
deviceLibrary
.
getLifeStatusName
().
contains
(
deviceLibrarySelectVo
.
getLifeStatusDim
());
Boolean
containUpdateTimeDim
=
!
hasUpdateTimeDim
||
sdf
.
format
(
deviceLibrary
.
getUpdateTime
()).
contains
(
deviceLibrarySelectVo
.
getUpdateTimeDim
());
return
containModelDim
&&
containNameDim
&&
containSeqDim
&&
containLocationUnitDim
&&
containOwnUnitDim
&&
containLifeStatusDim
&&
containUpdateTimeDim
;
}).
collect
(
Collectors
.
toList
());
}
List
<
DeviceVo
>
deviceVos
=
resultList
.
stream
().
map
(
DeviceLibrary:
:
parseVo
).
collect
(
Collectors
.
toList
());
Page
<
DeviceVo
>
deviceLibraryEntities
=
PageUtil
.
getPerPage
(
deviceLibrarySelectVo
.
getPage
(),
deviceLibrarySelectVo
.
getSize
(),
deviceVos
,
deviceLibrarySelectVo
.
getPageable
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
Integer
,
String
>
lifeStatusMap
=
configCache
.
getLifeStatusMap
();
Set
<
Integer
>
status
=
resultList
.
stream
().
map
(
DeviceVo:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
status
=
deviceVos
.
stream
().
map
(
DeviceVo:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
map
.
put
(
"pages"
,
deviceLibraryEntities
);
map
.
put
(
"models"
,
resultList
.
stream
().
map
(
DeviceVo:
:
getModel
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"names"
,
resultList
.
stream
().
map
(
DeviceVo:
:
getName
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"ownUnits"
,
resultList
.
stream
().
map
(
DeviceVo:
:
getOwnUnit
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"locationUnits"
,
resultList
.
stream
().
map
(
DeviceVo:
:
getLocationUnit
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"models"
,
deviceVos
.
stream
().
map
(
DeviceVo:
:
getModel
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"names"
,
deviceVos
.
stream
().
map
(
DeviceVo:
:
getName
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"ownUnits"
,
deviceVos
.
stream
().
map
(
DeviceVo:
:
getOwnUnit
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"locationUnits"
,
deviceVos
.
stream
().
map
(
DeviceVo:
:
getLocationUnit
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"lifeStatus"
,
status
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
lifeStatusMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
return
ResultUtil
.
success
(
map
);
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibrarySelectVo.java
浏览文件 @
952d78a6
...
...
@@ -98,4 +98,7 @@ public class DeviceLibrarySelectVo extends CustomPage {
@ApiModelProperty
(
value
=
"生命状态模糊查询字段"
)
private
String
lifeStatusDim
;
@ApiModelProperty
(
value
=
"更新时间模糊查询字段"
)
private
String
updateTimeDim
;
}
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
952d78a6
...
...
@@ -240,7 +240,7 @@ public enum StatusEnum {
WAIT_UPLOAD_FILE
(
704
,
"等待上传签收单"
),
WAIT_UPLOAD_SEND_FILE
(
722
,
"等待上传回执单"
),
COUNTRY_REPAIRING
(
777
,
"等待接收维修退回装备"
),
REPAIR_SEND_DRAFT
(
788
,
"
草稿
"
),
REPAIR_SEND_DRAFT
(
788
,
"
等待出库
"
),
REPAIR_SEND_SIGN_WAIT_CONFIRM
(
790
,
"申请签章待审核"
),
REPAIR_SEND_WAIT_SIGN
(
791
,
"等待盖章"
),
/**
...
...
@@ -253,7 +253,7 @@ public enum StatusEnum {
WAIT_UPLOAD_BACK_SEND_FILE
(
810
,
"等待上传回执单"
),
REPAIR_BACK_SIGN_WAIT_CONFIRM
(
820
,
"申请签章待审核"
),
REPAIR_BACK_WAIT_SIGN
(
821
,
"等待盖章"
),
REPAIR_BACK_DRAFT
(
888
,
"
草稿
"
),
REPAIR_BACK_DRAFT
(
888
,
"
等待出库
"
),
/**
* 配发退回状态
...
...
dev-misc/src/main/java/com/tykj/dev/misc/utils/DeviceSeqUtil.java
浏览文件 @
952d78a6
...
...
@@ -4,8 +4,10 @@ import com.tykj.dev.misc.exception.ApiException;
import
org.springframework.http.ResponseEntity
;
import
java.math.BigInteger
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -29,6 +31,8 @@ public class DeviceSeqUtil {
list
.
add
(
"生成1"
);
list
.
add
(
""
);
System
.
out
.
println
(
getContinuousSeqs
(
list
));
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
System
.
out
.
println
(
sdf
.
format
(
new
Date
()));
}
/**
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/controller/PackingController.java
浏览文件 @
952d78a6
...
...
@@ -361,6 +361,11 @@ public class PackingController {
@PostMapping
(
"/update/model"
)
public
ResponseEntity
updateModel
(
@RequestBody
@Validated
PackingModelEdit
packingModelEdit
){
PackingLibrary
packingLibrary
=
packingLibraryService
.
getOne
(
packingModelEdit
.
getPackingId
());
if
(!
packingLibrary
.
getModel
().
equals
(
packingModelEdit
.
getModel
())&&
packingLibraryService
.
modelIsExist
(
packingModelEdit
.
getModel
())){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"error"
,
"型号"
+
packingModelEdit
.
getModel
()+
"已存在"
);
return
ResponseEntity
.
ok
(
map
);
}
List
<
PackingLibrary
>
packingLibraries
=
new
ArrayList
<>();
if
(
packingLibrary
.
getShowOrder
()>
packingModelEdit
.
getShowOrder
()){
for
(
int
i
=
packingModelEdit
.
getShowOrder
();
i
<
packingLibrary
.
getShowOrder
();
i
++){
...
...
@@ -393,11 +398,6 @@ public class PackingController {
packingLibraryDao
.
saveAll
(
packingLibraries
);
}
if
(
packingLibrary
.
getIsRoot
()==
1
){
if
(!
packingLibrary
.
getModel
().
equals
(
packingModelEdit
.
getModel
())&&
packingLibraryService
.
modelIsExist
(
packingModelEdit
.
getModel
())){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"error"
,
"型号"
+
packingModelEdit
.
getModel
()+
"已存在"
);
return
ResponseEntity
.
ok
(
map
);
}
if
(
packingModelEdit
.
getModel
()!=
null
&&!
packingModelEdit
.
getModel
().
equals
(
packingLibrary
.
getModel
())){
packingLibrary
.
setModel
(
packingModelEdit
.
getModel
());
packingLibrary
.
setName
(
packingModelEdit
.
getModel
());
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/service/impl/PackingLibraryServiceImpl.java
浏览文件 @
952d78a6
...
...
@@ -679,6 +679,9 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
if
(
packingLibrarySelectVo
.
getModel
()
!=
null
)
{
predicateBuilder
.
eq
(
"model"
,
packingLibrarySelectVo
.
getModel
());
}
if
(
packingLibrarySelectVo
.
getName
()
!=
null
)
{
predicateBuilder
.
eq
(
"name"
,
packingLibrarySelectVo
.
getName
());
}
if
(
packingLibrarySelectVo
.
getType
()
!=
null
)
{
predicateBuilder
.
eq
(
"type"
,
packingLibrarySelectVo
.
getType
());
}
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairBillSelectController.java
浏览文件 @
952d78a6
...
...
@@ -88,7 +88,7 @@ public class RepairBillSelectController {
@GetMapping
(
value
=
"/repairNum"
)
public
ResponseEntity
getRepairNum
(){
RepairNum
repairNum
=
new
RepairNum
();
RepairTaskSelectVo
repairTaskSelectVo
=
new
RepairTaskSelectVo
(
1
);
RepairTaskSelectVo
repairTaskSelectVo
=
new
RepairTaskSelectVo
(
1
,
null
);
repairTaskSelectVo
.
setPage
(
0
);
repairTaskSelectVo
.
setSize
(
Integer
.
MAX_VALUE
);
Page
<
RepairDetail
>
repairDetails
=
(
Page
)
repairController
.
getRepairList
(
repairTaskSelectVo
).
getBody
();
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
952d78a6
...
...
@@ -281,6 +281,7 @@ public class RepairController {
BeanUtils
.
copyProperties
(
repairBillSaveVo
,
repairBill1
);
BeanUtils
.
copyProperties
(
repairBillSaveVo
,
deviceRepairSendBillEntity1
);
repairBill
=
deviceRepairBillService
.
addEntity
(
repairBill1
);
deviceRepairSendBillEntity1
.
setDeviceRepairBillId
(
repairBill
.
getId
());
deviceRepairSendBillEntity
=
deviceRepairSendBillService
.
addEntity
(
deviceRepairSendBillEntity1
);
}
if
(
repairBillSaveVo
.
getScriptSaveVos
()
!=
null
)
{
...
...
@@ -1433,6 +1434,8 @@ public class RepairController {
Integer
type
=
repairTaskSelectVo
.
getType
();
// Integer userId = userUtils.getCurrentUserId();
String
unitName
=
userUtils
.
getCurrentUserUnitName
();
Integer
year
=
repairTaskSelectVo
.
getYear
();
Boolean
hasYear
=
year
!=
null
&&
year
>
0
;
//待维修装备
if
(
type
==
1
){
List
<
Integer
>
integerList
=
new
ArrayList
<>();
...
...
@@ -1487,7 +1490,7 @@ public class RepairController {
});
List
<
String
>
units
=
unitsService
.
findListById
(
0
).
stream
().
map
(
Units:
:
getName
).
collect
(
Collectors
.
toList
());
units
.
addAll
(
unitsService
.
findBySubordinateNotOneself
(
userUtils
.
getCurrentUnitId
()).
stream
().
map
(
Units:
:
getName
).
collect
(
Collectors
.
toList
()));
List
<
RepairDetail
>
repairDetails2
=
repairDetails
.
stream
().
filter
(
repairDetail
->
units
.
contains
(
repairDetail
.
getLocationUnit
())).
collect
(
Collectors
.
toList
());
List
<
RepairDetail
>
repairDetails2
=
repairDetails
.
stream
().
filter
(
repairDetail
->
units
.
contains
(
repairDetail
.
getLocationUnit
())
&&(!
hasYear
||
repairDetail
.
getUpdateTime
().
getYear
()==
year
-
1900
)
).
collect
(
Collectors
.
toList
());
return
ResponseEntity
.
ok
(
PageUtil
.
getPerPage
(
repairTaskSelectVo
.
getPage
(),
repairTaskSelectVo
.
getSize
(),
repairDetails2
,
repairTaskSelectVo
.
getPageable
()));
}
else
{
...
...
@@ -1573,7 +1576,6 @@ public class RepairController {
repairDetail
.
setRepairStatus
(
4
);
repairDetail
.
setLocationUnit
(
deviceLibraryEntity
.
getLocationUnit
());
repairDetail
.
setOwnUnit
(
deviceLibraryEntity
.
getLocationUnit
());
deviceRepairDetailService
.
update
(
repairDetail
);
deviceLibraryEntity
.
setOwnUnit
(
deviceLibraryEntity
.
getLocationUnit
());
deviceLibraryEntity
.
setLifeStatus
(
5
);
deviceLibraryService
.
update
(
deviceLibraryEntity
);
...
...
@@ -1600,18 +1602,20 @@ public class RepairController {
}
}
deviceLibraryService
.
update
(
deviceLibrary
);
deviceRepairDetailService
.
save
(
newRepairDetail
);
RepairDetail
repairDetail3
=
deviceRepairDetailService
.
save
(
newRepairDetail
);
repairDetail
.
setNewDeviceDetailId
(
repairDetail3
.
getId
());
deviceRepairDetailService
.
update
(
repairDetail
);
//修改所有父维修记录序列号
if
(
newRepairDetail
.
getPid
()!=
null
){
RepairDetail
repairDetail1
=
deviceRepairDetailService
.
getOne
(
newRepairDetail
.
getPid
());
repairDetail1
.
setSeqNumber
(
newRepairDetail
.
getSeqNumber
());
repairDetail1
.
setDeviceId
(
newRepairDetail
.
getDeviceId
());
if
(
repairDetail3
.
getPid
()!=
null
){
RepairDetail
repairDetail1
=
deviceRepairDetailService
.
getOne
(
repairDetail3
.
getPid
());
repairDetail1
.
setSeqNumber
(
repairDetail3
.
getSeqNumber
());
repairDetail1
.
setDeviceId
(
repairDetail3
.
getDeviceId
());
repairDetail1
.
setLocationUnit
(
userUtils
.
getCurrentUserUnitName
());
deviceRepairDetailService
.
update
(
repairDetail1
);
if
(
repairDetail1
.
getPid
()
!=
null
)
{
RepairDetail
repairDetail2
=
deviceRepairDetailService
.
getOne
(
newRepairDetail
.
getPid
());
repairDetail2
.
setSeqNumber
(
newRepairDetail
.
getSeqNumber
());
repairDetail2
.
setDeviceId
(
newRepairDetail
.
getDeviceId
());
RepairDetail
repairDetail2
=
deviceRepairDetailService
.
getOne
(
repairDetail1
.
getPid
());
repairDetail2
.
setSeqNumber
(
repairDetail3
.
getSeqNumber
());
repairDetail2
.
setDeviceId
(
repairDetail3
.
getDeviceId
());
repairDetail2
.
setLocationUnit
(
userUtils
.
getCurrentUserUnitName
());
deviceRepairDetailService
.
update
(
repairDetail2
);
}
...
...
@@ -1818,18 +1822,18 @@ public class RepairController {
*/
private
List
<
RepairDetail
>
getRepairDetail
(
int
repairBillId
)
{
List
<
RepairDetail
>
repairDetails
=
deviceRepairDetailService
.
findByBillId
(
repairBillId
);
List
<
RepairDetail
>
orderList
=
new
ArrayList
<>();
repairDetails
.
forEach
(
repairDetail
->
{
if
(!
repairDetail
.
getRepairStatus
().
equals
(
RepairStatusEnum
.
CHANGE_NEW
.
id
)
&&
!
repairDetail
.
getRepairStatus
().
equals
(
RepairStatusEnum
.
CHANGE_NEW_DEVICE
.
id
))
{
orderList
.
add
(
repairDetail
);
if
(
repairDetail
.
getRepairStatus
().
equals
(
RepairStatusEnum
.
SCRAPPED
.
id
))
{
if
(
repairDetail
.
getNewDeviceDetailId
()
>
0
)
{
orderList
.
add
(
deviceRepairDetailService
.
getOne
(
repairDetail
.
getNewDeviceDetailId
()));
}
}
}
});
return
orderList
;
//
List<RepairDetail> orderList = new ArrayList<>();
//
repairDetails.forEach(repairDetail -> {
//
if (!repairDetail.getRepairStatus().equals(RepairStatusEnum.CHANGE_NEW.id) && !repairDetail.getRepairStatus().equals(RepairStatusEnum.CHANGE_NEW_DEVICE.id)) {
//
orderList.add(repairDetail);
//
if (repairDetail.getRepairStatus().equals(RepairStatusEnum.SCRAPPED.id)) {
//
if (repairDetail.getNewDeviceDetailId() > 0) {
//
orderList.add(deviceRepairDetailService.getOne(repairDetail.getNewDeviceDetailId()));
//
}
//
}
//
}
//
});
return
repairDetails
;
}
@ApiOperation
(
value
=
"上传送修发送方签发人"
,
notes
=
"上传发送方签发人"
)
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/subject/vo/RepairTaskSelectVo.java
浏览文件 @
952d78a6
...
...
@@ -19,4 +19,6 @@ public class RepairTaskSelectVo extends CustomPage {
@ApiModelProperty
(
value
=
"查询类型"
,
example
=
"1"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"年份"
,
example
=
"1"
)
private
Integer
year
;
}
dev-statistical/src/main/java/com/tykj/dev/statistical/controller/StatisticalController.java
浏览文件 @
952d78a6
...
...
@@ -26,6 +26,7 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.web.bind.annotation.*
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -195,7 +196,29 @@ public class StatisticalController {
@ApiOperation
(
value
=
"查询所有装备统计列表"
,
notes
=
"可以通过这个接口查询所有装备统计列表"
)
@PostMapping
(
"/device"
)
public
ResponseEntity
selectAllDeviceStatList
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getAllList
(
deviceLibrarySelectVo
);
Boolean
hasModelDim
=
deviceLibrarySelectVo
.
getModelDim
()!=
null
;
Boolean
hasNameDim
=
deviceLibrarySelectVo
.
getNameDim
()!=
null
;
Boolean
hasSeqDim
=
deviceLibrarySelectVo
.
getSeqDim
()!=
null
;
Boolean
hasLocationUnitDim
=
deviceLibrarySelectVo
.
getLocationUnitDim
()!=
null
;
Boolean
hasOwnUnitDim
=
deviceLibrarySelectVo
.
getOwnUnitDim
()!=
null
;
Boolean
hasLifeStatusDim
=
deviceLibrarySelectVo
.
getLifeStatusDim
()!=
null
;
Boolean
hasUpdateTimeDim
=
deviceLibrarySelectVo
.
getUpdateTimeDim
()!=
null
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
DeviceLibrary
>
resultList
=
deviceLibraryService
.
getAllList
(
deviceLibrarySelectVo
);
resultList
.
forEach
(
DeviceLibrary:
:
setConfigName
);
if
(
hasModelDim
||
hasLifeStatusDim
||
hasLocationUnitDim
||
hasNameDim
||
hasOwnUnitDim
||
hasSeqDim
)
{
resultList
=
resultList
.
stream
().
filter
(
deviceLibrary
->
{
Boolean
containModelDim
=
!
hasModelDim
||
deviceLibrary
.
getModel
().
contains
(
deviceLibrarySelectVo
.
getModelDim
());
Boolean
containNameDim
=
!
hasNameDim
||
deviceLibrary
.
getName
().
contains
(
deviceLibrarySelectVo
.
getNameDim
());
Boolean
containSeqDim
=
!
hasSeqDim
||
deviceLibrary
.
getSeqNumber
().
contains
(
deviceLibrarySelectVo
.
getSeqDim
());
Boolean
containLocationUnitDim
=
!
hasLocationUnitDim
||
deviceLibrary
.
getLocationUnit
().
contains
(
deviceLibrarySelectVo
.
getLocationUnitDim
());
Boolean
containOwnUnitDim
=
!
hasOwnUnitDim
||
deviceLibrary
.
getOwnUnit
().
contains
(
deviceLibrarySelectVo
.
getOwnUnitDim
());
Boolean
containLifeStatusDim
=
!
hasLifeStatusDim
||
deviceLibrary
.
getLifeStatusName
().
contains
(
deviceLibrarySelectVo
.
getLifeStatusDim
());
Boolean
containUpdateTimeDim
=
!
hasUpdateTimeDim
||
sdf
.
format
(
deviceLibrary
.
getUpdateTime
()).
contains
(
deviceLibrarySelectVo
.
getUpdateTimeDim
());
return
containModelDim
&&
containNameDim
&&
containSeqDim
&&
containLocationUnitDim
&&
containOwnUnitDim
&&
containLifeStatusDim
&&
containUpdateTimeDim
;
}).
collect
(
Collectors
.
toList
());
}
List
<
DeviceLibrary
>
deviceLibraryEntities
=
resultList
;
deviceLibraryEntities
.
forEach
(
DeviceLibrary:
:
setConfigName
);
Page
<
DeviceLibrary
>
deviceLibraries
=
PageUtil
.
getPerPage
(
deviceLibrarySelectVo
.
getPage
(),
deviceLibrarySelectVo
.
getSize
(),
deviceLibraryEntities
,
deviceLibrarySelectVo
.
getPageable
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
952d78a6
...
...
@@ -898,7 +898,7 @@ public class TaskServiceImpl implements TaskService {
//查询跟踪
if
(
taskSelectVo
.
getSelectNum
()
==
3
)
{
//所有涉及人员所在单位包含当前用户所在单位且指针对应UserId不是当前用户
List
<
Integer
>
status
=
Arrays
.
asList
(
201
,
333
,
810
,
322
,
722
,
788
,
1250
,
2223
,
8110
);
List
<
Integer
>
status
=
Arrays
.
asList
(
201
,
333
,
810
,
322
,
722
,
788
,
1250
,
2223
,
8110
,
888
);
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
.
filter
(
taskBto
->
{
// boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId);
...
...
dev-union/src/main/resources/hibernate.properties
0 → 100644
浏览文件 @
952d78a6
hibernate.dialect.storage_engine
=
innodb
\ No newline at end of file
dev-user/src/main/java/com/tykj/dev/device/user/read/subject/domin/Message.java
浏览文件 @
952d78a6
...
...
@@ -44,12 +44,15 @@ public class Message {
@ApiModelProperty
(
value
=
"信息内容"
)
private
String
content
;
@Column
(
name
=
"involve_users"
,
columnDefinition
=
"TEXT"
)
@ApiModelProperty
(
value
=
"阅知人员id(x作为分隔符),例如x1x2x,意为id为1,2的用户待阅知该信息"
)
private
String
involveUsers
;
@Column
(
name
=
"complete_users"
,
columnDefinition
=
"TEXT"
)
@ApiModelProperty
(
value
=
"已完成人员id(x作为分隔符),例如x1x2x,意为id为1,2的用户已完成阅知该信息"
)
private
String
completeUsers
;
@Column
(
name
=
"user_read_detail"
,
columnDefinition
=
"TEXT"
)
@ApiModelProperty
(
value
=
"用户阅读信息"
)
private
String
userReadDetail
;
...
...
@@ -72,6 +75,7 @@ public class Message {
@ApiModelProperty
(
value
=
"删除标记(0:未删除,1:已删除)"
)
private
Integer
deleteTag
=
0
;
@Column
(
name
=
"record"
,
columnDefinition
=
"TEXT"
)
@ApiModelProperty
(
value
=
"附加信息"
)
private
String
record
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论