Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
0a9d5d45
提交
0a9d5d45
authored
1月 14, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【清退】 代码提交
上级
35c40056
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
193 行增加
和
69 行删除
+193
-69
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+14
-3
DeviceLibraryDao.java
.../tykj/dev/device/library/repository/DeviceLibraryDao.java
+2
-0
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+2
-0
JacksonUtil.java
...sc/src/main/java/com/tykj/dev/misc/utils/JacksonUtil.java
+0
-2
PackingLibraryDao.java
...tykj/dev/device/packing/repository/PackingLibraryDao.java
+2
-0
pom.xml
dev-sendback/pom.xml
+4
-0
RepelDevController.java
...kj/dev/device/sendback/controller/RepelDevController.java
+14
-4
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+12
-3
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+6
-1
DeviceRepelDetailServiceImpl.java
...e/sendback/service/impl/DeviceRepelDetailServiceImpl.java
+6
-1
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+89
-40
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+23
-8
SendBackServiceImpl.java
...dev/device/sendback/service/impl/SendBackServiceImpl.java
+0
-1
UnitsDao.java
...n/java/com/tykj/dev/device/user/subject/dao/UnitsDao.java
+2
-0
Units.java
...n/java/com/tykj/dev/device/user/subject/entity/Units.java
+8
-5
UnitsService.java
...om/tykj/dev/device/user/subject/service/UnitsService.java
+2
-0
UnitsServiceImpl.java
...ev/device/user/subject/service/impl/UnitsServiceImpl.java
+5
-0
VenitalisServiceImpl.java
...evice/user/subject/service/impl/VenitalisServiceImpl.java
+2
-1
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
0a9d5d45
...
...
@@ -175,9 +175,20 @@ public enum LogType {
SEND_BACK_8
(
76
,
SEND_BACK
.
id
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1205
.
id
,
"市转发了省清退任务,对区县发起了清退任务"
),
SEND_BACK_9
(
77
,
SEND_BACK
.
id
,
SEND_BACK_1201
.
id
,
SEND_BACK_1206
.
id
,
"市等待下级单位提交清退装备,在选择装备库送至省里"
),
SEND_BACK_10
(
78
,
SEND_BACK
.
id
,
SEND_BACK_1205
.
id
,
SEND_BACK_1206
.
id
,
"区县根据清退通知,选择了需要清退对装备"
),
SEND_BACK_11
(
10000
,
SEND_BACK
.
id
,
SEND_BACK_1206
.
id
,
SEND_BACK_1207
.
id
,
"区县根据清退通知,选择了需要清退对装备"
),
SEND_BACK_11
(
10001
,
SEND_BACK
.
id
,
SEND_BACK_1206
.
id
,
SEND_BACK_1207
.
id
,
"选择需要清退对装备,提交等待上级审核"
),
SEND_BACK_12
(
10002
,
SEND_BACK
.
id
,
SEND_BACK_1207
.
id
,
SEND_BACK_1208
.
id
,
"上级审核通过,可以进行出库,把装备送至上级"
),
SEND_BACK_13
(
10003
,
SEND_BACK
.
id
,
SEND_BACK_1208
.
id
,
SEND_BACK_1209
.
id
,
"清退装备已出库,等待单位接收"
),
SEND_BACK_14
(
10004
,
SEND_BACK
.
id
,
SEND_BACK_1209
.
id
,
END
.
id
,
"单位接收完成"
),
SEND_BACK_15
(
10005
,
SEND_BACK
.
id
,
SEND_BACK_1207
.
id
,
SEND_BACK_1206
.
id
,
"上级审核不通过"
),
SEND_BACK_16
(
10006
,
SEND_BACK
.
id
,
SEND_BACK_1206
.
id
,
SEND_BACK_1208
.
id
,
"全部清退任务,不需要审核,等待清退装备出库"
),
SEND_BACK_17
(
10007
,
SEND_BACK
.
id
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1210
.
id
,
"发起对中办对清退任务,等待中办签字单据"
),
SEND_BACK_18
(
10008
,
SEND_BACK
.
id
,
SEND_BACK_1210
.
id
,
END
.
id
,
"上传中办签字单据,任务结束"
),
SEND_BACK_19
(
10009
,
SEND_BACK
.
id
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1211
.
id
,
"市发起清退任务,待省级单位审核"
),
SEND_BACK_20
(
100010
,
SEND_BACK
.
id
,
SEND_BACK_1211
.
id
,
END
.
id
,
"省对单位审核不通过,任务结束"
),
SEND_BACK_21
(
100011
,
SEND_BACK
.
id
,
SEND_BACK_1211
.
id
,
SEND_BACK_1204
.
id
,
"省对单位审核通过,等待下级单位提交"
),
SEND_BACK_23
(
100013
,
SEND_BACK
.
id
,
SEND_BACK_1212
.
id
,
END
.
id
,
"清退统计任务已办结"
),
SEND_BACK_24
(
100014
,
SEND_BACK
.
id
,
SEND_BACK_1204
.
id
,
SEND_BACK_1212
.
id
,
"市清退统计任务待办结"
),
SEND_BACK_25
(
100015
,
SEND_BACK
.
id
,
SEND_BACK_1200
.
id
,
SEND_BACK_1212
.
id
,
"省清退统计任务待办结"
),
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryDao.java
浏览文件 @
0a9d5d45
...
...
@@ -61,6 +61,8 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnit
(
List
<
Integer
>
packingIds
,
String
unitNames
);
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnitIn
(
List
<
Integer
>
packingIds
,
List
<
String
>
unitNames
);
List
<
DeviceLibrary
>
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
String
ownUnitName
,
String
locationUnitName
,
Integer
status
);
}
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
0a9d5d45
...
...
@@ -82,6 +82,8 @@ public enum StatusEnum {
SEND_BACK_1209
(
1209
,
"清退装备等待入库"
),
SEND_BACK_1210
(
1210
,
"省清退送往中办等待回执单"
),
SEND_BACK_1211
(
1211
,
"市发清退任务待省审核"
),
SEND_BACK_1212
(
1212
,
"清退统计任务待办结"
),
...
...
dev-misc/src/main/java/com/tykj/dev/misc/utils/JacksonUtil.java
浏览文件 @
0a9d5d45
...
...
@@ -67,13 +67,11 @@ public final class JacksonUtil {
if
(
objectMapper
==
null
)
{
objectMapper
=
new
ObjectMapper
();
}
try
{
return
objectMapper
.
readValue
(
jsonStr
,
valueTypeRef
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/repository/PackingLibraryDao.java
浏览文件 @
0a9d5d45
...
...
@@ -12,4 +12,6 @@ import java.util.List;
public
interface
PackingLibraryDao
extends
JpaRepository
<
PackingLibrary
,
Integer
>,
JpaSpecificationExecutor
<
PackingLibrary
>
{
List
<
PackingLibrary
>
findAllByPartParentId
(
Integer
id
);
List
<
PackingLibrary
>
findAllByIdIn
(
List
<
Integer
>
ids
);
}
dev-sendback/pom.xml
浏览文件 @
0a9d5d45
...
...
@@ -20,6 +20,10 @@
<groupId>
com.tykj
</groupId>
<artifactId>
dev-task
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-packing
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
misc
</artifactId>
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelDevController.java
浏览文件 @
0a9d5d45
...
...
@@ -131,8 +131,8 @@ public class RepelDevController {
* 市发起清退任务
*/
@ApiOperation
(
value
=
"市发起清退任务"
,
notes
=
"市发起清退任务"
)
@PostMapping
(
value
=
"/
receiptSingle
/{userId}"
)
public
ResponseEntity
receiptSingle
(
@PathVariable
Integer
userId
,
@RequestBody
DeviceRepel
deviceRepel
){
@PostMapping
(
value
=
"/
cityInitiateRepel
/{userId}"
)
public
ResponseEntity
cityInitiateRepel
(
@PathVariable
Integer
userId
,
@RequestBody
DeviceRepel
deviceRepel
){
repelBusinessService
.
cityInitiateRepel
(
deviceRepel
,
userId
);
return
ResponseEntity
.
ok
(
"省上传中办回执单,成功任务结束"
);
}
...
...
@@ -141,10 +141,20 @@ public class RepelDevController {
* 省审核市清退任务
*/
@ApiOperation
(
value
=
"省审核市清退任务"
,
notes
=
"省审核市清退任务"
)
@PostMapping
(
value
=
"/
receiptSingle
/{taskId}/{userId}"
)
public
ResponseEntity
receiptSingle
(
@PathVariable
Integer
taskId
,
@PathVariable
Integer
userId
,
@RequestBody
RepelAuditResult
repelAuditResult
){
@PostMapping
(
value
=
"/
provinceAuditCity
/{taskId}/{userId}"
)
public
ResponseEntity
provinceAuditCity
(
@PathVariable
Integer
taskId
,
@PathVariable
Integer
userId
,
@RequestBody
RepelAuditResult
repelAuditResult
){
repelBusinessService
.
provinceAuditCity
(
taskId
,
userId
,
repelAuditResult
);
return
ResponseEntity
.
ok
(
"省上传中办回执单,成功任务结束"
);
}
/**
* 统计清退任务的办结
*/
@ApiOperation
(
value
=
"统计清退任务的办结"
,
notes
=
"统计清退任务的办结"
)
@GetMapping
(
value
=
"/repelEnd/{taskId}"
)
public
ResponseEntity
cityRepelEnd
(
@PathVariable
Integer
taskId
){
repelBusinessService
.
cityRepelEnd
(
taskId
);
return
ResponseEntity
.
ok
(
"统计清退任务的办结"
);
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
0a9d5d45
...
...
@@ -58,10 +58,10 @@ public class RepelQueryController {
/**
* 待清退列表
*/
@GetMapping
(
value
=
"/toRepelList/{unit
Name
}"
)
@GetMapping
(
value
=
"/toRepelList/{unit
Id
}"
)
@ApiOperation
(
value
=
"待清退列表"
,
notes
=
"待清退列表"
)
public
ResponseEntity
toRepelList
(
@PathVariable
String
unitName
){
return
ResponseEntity
.
ok
(
repelQueryService
.
toRepelList
(
unit
Name
));
public
ResponseEntity
toRepelList
(
@PathVariable
Integer
unitId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
toRepelList
(
unit
Id
));
}
/**
...
...
@@ -72,4 +72,13 @@ public class RepelQueryController {
public
ResponseEntity
clearedList
(
@PathVariable
Integer
unitId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
clearedList
(
unitId
));
}
/**
* 省直属任务装备查询接口
*/
@GetMapping
(
value
=
"/provinceDirectlyUnderDev/{taskId}"
)
@ApiOperation
(
value
=
"省直属任务装备查询接口"
,
notes
=
"省直属任务装备查询接口"
)
public
ResponseEntity
provinceDirectlyUnderDev
(
@PathVariable
Integer
taskId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
provinceDirectlyUnderDev
(
taskId
));
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
0a9d5d45
...
...
@@ -45,10 +45,15 @@ public interface RepelQueryService {
/**
* 待清退列表 省
*/
List
<
DeviceLibrary
>
toRepelList
(
String
unitName
);
List
<
DeviceLibrary
>
toRepelList
(
Integer
unitId
);
/**
* 已清退列表
*/
List
<
DeviceLibrary
>
clearedList
(
Integer
unitId
);
/**
*
*/
List
<
DeviceLibrary
>
provinceDirectlyUnderDev
(
Integer
taskId
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/DeviceRepelDetailServiceImpl.java
浏览文件 @
0a9d5d45
...
...
@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -65,10 +66,14 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
","
)
)
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
List
<
String
>
idListString
=
idStringList
.
stream
().
filter
(
list2
->!
list2
.
equals
(
""
)).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
idListString
);
List
<
Integer
>
devIds
=
idListString
.
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
);
}
}
else
{
return
new
ArrayList
<>();
}
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
0a9d5d45
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
.
impl
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.config.GlobalMap
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.packing.repository.PackingLibraryDao
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepel
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.domain.RepelDeviceUnit
;
import
com.tykj.dev.device.sendback.entity.domain.RepelTaskStatistical
;
import
com.tykj.dev.device.sendback.entity.vo.*
;
import
com.tykj.dev.device.sendback.sendBackApp
;
import
com.tykj.dev.device.sendback.service.*
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
import
com.tykj.dev.device.task.service.TaskService
;
...
...
@@ -25,6 +28,7 @@ import com.tykj.dev.misc.base.StatusEnum;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
...
...
@@ -72,6 +76,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
@Autowired
RepelDeviceUnitService
repelDeviceUnitService
;
@Autowired
PackingLibraryDao
packingLibraryDao
;
@Override
public
void
initiateRepel
(
DeviceRepel
deviceRepel
,
Integer
userId
)
{
User
user
=
userService
.
findByUser
(
userId
);
...
...
@@ -104,15 +111,16 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
Units
units1
=
unitsService
.
findById
(
unisId
);
Area
area1
=
areaService
.
findByid
(
units1
.
getAreaId
());
if
(
"2"
.
equals
(
unitsService
.
findById
(
unisId
).
getCode
()))
{
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
u
ser
Id
))){
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
u
nis
Id
))){
directlUnderUnit
.
set
(
true
);
}
}
else
{
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
userId
))){
deviceRepelDetail
.
setId
(
null
);
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
unisId
))){
TaskBto
taskBto1
=
cityRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
null
,
area1
.
getName
(),
model
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
model
,
""
));
}
}
}
...
...
@@ -120,15 +128,17 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setSendUnitId
(
units
.
getUnitId
());
deviceRepelDetail
.
setSendUnit
(
units
.
getName
());
deviceRepelDetail
.
setId
(
null
);
if
(
directlUnderUnit
.
get
()){
TaskBto
taskBto1
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
null
,
"省直属"
,
model
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省直属"
,
model
,
""
));
}
deviceRepelDetail
.
setId
(
null
);
List
<
String
>
strings
=
new
ArrayList
<>();
strings
.
add
(
units
.
getName
());
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
strings
)){
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
null
,
"省本级"
,
model
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省本级"
,
model
,
""
));
}
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
...
...
@@ -162,13 +172,14 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
deviceRepel
.
getTaskScopes
().
forEach
(
unisId
->{
Units
units1
=
unitsService
.
findById
(
u
ser
Id
);
Units
units1
=
unitsService
.
findById
(
u
nis
Id
);
Area
area1
=
areaService
.
findByid
(
units1
.
getAreaId
());
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
u
serId
))){
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
u
nits1
.
getUnitId
()
))){
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
null
,
area1
.
getName
(),
model
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
model
,
""
));
}
}
...
...
@@ -184,7 +195,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
User
user
=
userService
.
findByUser
(
userId
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
Units
unitsFather
=
unitsService
.
findByAreaId
(
area
.
getFather
Id
());
Units
unitsFather
=
unitsService
.
findByAreaId
(
units
.
getUnit
Id
());
deviceRepel
.
setFielding
(
StringUtils
.
ListToString
(
deviceRepel
.
getFieldingIds
()));
deviceRepel
.
setTaskScope
(
StringUtils
.
ListToString
(
deviceRepel
.
getTaskScopes
()));
...
...
@@ -192,7 +203,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
deviceRepelDetail
.
setRepelId
(
deviceRepel1
.
getId
());
TaskBto
taskBto
=
city
Total
Task
(
unitsFather
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
());
TaskBto
taskBto
=
city
Initiate
Task
(
unitsFather
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
());
// repelTaskStatisticalService.saveRepelTaskStatistical(new RepelTaskStatistical(deviceRepel1.getId(),null,taskBto.getId(),null,area.getName()));
// Set<ModelCount> modelCounts=new HashSet<>();
// deviceRepel.getModels().forEach(i->{
...
...
@@ -220,23 +231,24 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
public
void
provinceAuditCity
(
Integer
taskId
,
Integer
userId
,
RepelAuditResult
repelAuditResult
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
if
(
repelAuditResult
.
getType
()==
1
)
{
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
NoDev
(
taskBto
.
getBillId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
Set
<
ModelCount
>
modelCounts
=
new
HashSet
<>();
deviceRepel
.
getModels
(
).
forEach
(
i
->
{
modelCounts
.
add
(
new
ModelCount
(
i
,
0
));
packingLibraryDao
.
findAllByIdIn
(
StringUtils
.
stringToList
(
deviceRepel
.
getFielding
())
).
forEach
(
i
->
{
modelCounts
.
add
(
new
ModelCount
(
i
.
getModel
()
,
0
));
});
String
model
=
JacksonUtil
.
toJSon
(
modelCounts
);
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
deviceRepel
.
getTaskScopes
(
).
forEach
(
StringUtils
.
stringToList
(
deviceRepel
.
getTaskScope
()
).
forEach
(
unisId
->
{
Units
units1
=
unitsService
.
findById
(
u
ser
Id
);
Units
units1
=
unitsService
.
findById
(
u
nis
Id
);
Area
area1
=
areaService
.
findByid
(
units1
.
getAreaId
());
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
u
ser
Id
)))
{
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
u
nis
Id
)))
{
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
null
,
area1
.
getName
(),
model
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
model
,
""
));
}
}
...
...
@@ -271,34 +283,47 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
public
static
void
main
(
String
[]
args
)
{
// String a="[{\"model\":\"BM-002\",\"count\":0},{\"model\":\"BM-001\",\"count\":0},{\"model\":\"aa\",\"count\":0},{\"model\":\"bb\",\"count\":0}]";
// List<ModelCount> modelCountList= JacksonUtil.readValue(a, new TypeReference<List<ModelCount>>() {});
// log.info("---{}",modelCountList.size());
// boolean flag= repelTaskStatisticalService.findAllRepelTaskStatistical(589,286).stream().allMatch(e->e.getTaskStatus()!=1);
}
@Override
public
void
submitChooseDevice
(
Integer
taskId
,
ResolveConfirm
resolveConfirm
)
{
List
<
ModelCount
>
modelCounts
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
StringBuffer
ids
=
new
StringBuffer
();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetailNoDev
(
taskBto
.
getBillId
());
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
resolveConfirm
.
getDevIds
());
deviceLibraries
.
forEach
(
deviceLibrary
->
{
if
(
map
.
containsKey
(
deviceLibrary
.
getModel
())){
map
.
put
(
deviceLibrary
.
getModel
(),
map
.
get
(
deviceLibrary
.
getModel
())+
1
);
}
else
{
map
.
put
(
deviceLibrary
.
getModel
(),
1
);
}
ids
.
append
(
","
).
append
(
deviceLibrary
.
getId
());
deviceLibrary
.
setLifeStatus
(
12
);
List
<
ModelCount
>
modelCountList
=
JacksonUtil
.
readValue
(
repelTaskStatistical
.
getModelCount
(),
new
TypeReference
<
List
<
ModelCount
>>()
{});
modelCountList
.
forEach
(
modelCount
->
{
map
.
put
(
modelCount
.
getModel
(),
modelCount
.
getCount
());
}
);
deviceLibraryDao
.
saveAll
(
deviceLibraries
);
ModelCount
modelCount
=
new
ModelCount
();
for
(
String
key:
map
.
keySet
()){
modelCount
.
setCount
(
map
.
get
(
key
));
modelCount
.
setModel
(
key
);
modelCounts
.
add
(
modelCount
);
List
<
ModelCount
>
modelCounts
=
new
ArrayList
<>();
if
(
resolveConfirm
.
getDevIds
().
size
()!=
0
)
{
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
resolveConfirm
.
getDevIds
());
deviceLibraries
.
forEach
(
deviceLibrary
->
{
map
.
put
(
deviceLibrary
.
getModel
(),
map
.
get
(
deviceLibrary
.
getModel
())
+
1
);
ids
.
append
(
","
).
append
(
deviceLibrary
.
getId
());
deviceLibrary
.
setLifeStatus
(
12
);
}
);
deviceLibraryDao
.
saveAll
(
deviceLibraries
);
for
(
String
key:
map
.
keySet
()){
ModelCount
modelCount
=
new
ModelCount
();
modelCount
.
setCount
(
map
.
get
(
key
));
modelCount
.
setModel
(
key
);
modelCounts
.
add
(
modelCount
);
}
repelTaskStatistical
.
setModelCount
(
JacksonUtil
.
toJSon
(
modelCounts
));
}
repelTaskStatistical
.
setModelCount
(
JacksonUtil
.
toJSon
(
modelCounts
));
repelTaskStatistical
.
setDes
(
resolveConfirm
.
getDes
());
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
...
...
@@ -328,7 +353,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
deviceRepelDetail
.
setAuditingFeedback
(
repelAuditResult
.
getDes
());
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
//判读是否还有需要审核待task
isCommission
(
taskBto
,
deviceRepelDetail
.
getRepelId
());
//检查上级任务是完成
// 修改当前任务的状态 清退提交装备待出库
// 修改上级任务是否代办
...
...
@@ -364,7 +390,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
//判断是否为 市提交 是则为在库
//否则为待清退
Integer
inStock
;
if
(
unitsService
.
findById
(
taskBto
.
getOwnUnit
()).
getLevel
()==
2
){
if
(
unitsService
.
findById
(
deviceRepelDetail
.
getReceiveUnitId
()).
getLevel
()==
2
){
inStock
=
2
;
}
else
{
inStock
=
12
;
...
...
@@ -384,8 +410,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
repelTaskStatistical
.
setTaskStatus
(
1
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
isEnd
(
taskBto
,
deviceRepelDetail
.
getRepelId
());
//完结当前任务
//把任务状态修改为 清退提交装备已完成
//修改统计表中的数据信息 状态
...
...
@@ -417,6 +443,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceLibraryDao
.
saveAll
(
libraries
);
repelDeviceUnitService
.
saveAllRepelDeviceUnit
(
list
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
isEnd
(
taskBto
,
deviceRepelDetail
.
getRepelId
());
//完结当前任务
//修改统计表中的数据信息 状态
//把装备的状态都修改为待清退。
...
...
@@ -498,7 +525,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
private
TaskBto
cityInitiateTask
(
Integer
unitId
,
Integer
repelDetailId
,
String
title
){
//省清退任务待市提交
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
-
1
);
list
.
add
(
0
);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1211
.
id
,
title
,
null
,
"."
,
repelDetailId
,
BusinessEnum
.
SEND_BACK_STATISTICAL
.
id
,
unitId
,
0
,
""
,
list
));
}
...
...
@@ -597,4 +624,26 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
);
}
/**
* 判读是否留在代办
*/
private
void
isCommission
(
TaskBto
taskBto
,
Integer
repelId
){
boolean
flag
=
repelTaskStatisticalService
.
findAllRepelTaskStatistical
(
taskBto
.
getParentTaskId
(),
repelId
).
stream
().
allMatch
(
e
->
e
.
getTaskStatus
()!=
3
);
if
(
flag
){
TaskBto
parentTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
taskService
.
moveToSpecial
(
parentTask
,
GlobalMap
.
getStatusEnumMap
().
get
(
parentTask
.
getBillStatus
()),-
1
);
}
}
/**
* 判读是否可以办结任务
*/
private
void
isEnd
(
TaskBto
taskBto
,
Integer
repelId
){
boolean
flag
=
repelTaskStatisticalService
.
findAllRepelTaskStatistical
(
taskBto
.
getParentTaskId
(),
repelId
).
stream
().
allMatch
(
e
->
e
.
getTaskStatus
()==
1
);
if
(
flag
){
TaskBto
parentTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
taskService
.
moveToSpecial
(
parentTask
,
StatusEnum
.
SEND_BACK_1212
,
0
);
}
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
0a9d5d45
...
...
@@ -5,9 +5,11 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepel
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.domain.RepelDeviceUnit
;
import
com.tykj.dev.device.sendback.entity.domain.RepelTaskStatistical
;
import
com.tykj.dev.device.sendback.entity.vo.DeviceChooseRepel
;
import
com.tykj.dev.device.sendback.entity.vo.RepelStatisticsVo
;
import
com.tykj.dev.device.sendback.service.*
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.subject.entity.Units
;
...
...
@@ -42,7 +44,6 @@ public class RepelQueryServiceImpl implements RepelQueryService {
DeviceRepelService
deviceRepelService
;
@Autowired
DeviceLibraryDao
deviceLibraryDao
;
@Autowired
UnitsService
unitsService
;
@Autowired
...
...
@@ -93,8 +94,9 @@ public class RepelQueryServiceImpl implements RepelQueryService {
}
@Override
public
List
<
DeviceLibrary
>
toRepelList
(
String
unitName
)
{
return
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
unitName
,
unitName
,
12
);
public
List
<
DeviceLibrary
>
toRepelList
(
Integer
unitId
)
{
Units
units
=
unitsService
.
findById
(
unitId
);
return
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
12
);
}
@Override
...
...
@@ -103,13 +105,26 @@ public class RepelQueryServiceImpl implements RepelQueryService {
return
deviceUnitService
.
findHasRepel
(
unitId
);
}
@Override
public
List
<
DeviceLibrary
>
provinceDirectlyUnderDev
(
Integer
taskId
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetailNoDev
(
taskBto
.
getBillId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
List
<
String
>
unitNames
=
unitsService
.
finAllDirectlUnderUnits
().
stream
().
map
(
Units:
:
getName
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnitIn
(
StringUtils
.
stringToList
(
deviceRepel
.
getFielding
()),
unitNames
);
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
List
<
String
>
idListString
=
idStringList
.
stream
().
filter
(
list2
->!
list2
.
equals
(
""
)).
collect
(
Collectors
.
toList
());
List
<
Integer
>
devIds
=
idListString
.
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
);
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
""
)&&
!
involeDevice
.
equals
(
","
))
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
List
<
String
>
idListString
=
idStringList
.
stream
().
filter
(
list2
->!
list2
.
equals
(
""
)).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
idListString
);
List
<
Integer
>
devIds
=
idListString
.
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
);
}
else
{
return
new
ArrayList
<>();
}
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/SendBackServiceImpl.java
浏览文件 @
0a9d5d45
...
...
@@ -749,7 +749,6 @@ public class SendBackServiceImpl implements SendBackService {
List
<
String
>
idListString
=
idStringList
.
stream
().
filter
(
list2
->!
list2
.
equals
(
""
)).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
idListString
);
List
<
Integer
>
devIds
=
idListString
.
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
);
}
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/dao/UnitsDao.java
浏览文件 @
0a9d5d45
...
...
@@ -38,4 +38,6 @@ public interface UnitsDao extends JpaRepository<Units, Integer>, JpaSpecificatio
List
<
Units
>
findAllByLevelIn
(
List
<
Integer
>
levels
);
List
<
Units
>
findAllByType
(
Integer
type
);
}
dev-user/src/main/java/com/tykj/dev/device/user/subject/entity/Units.java
浏览文件 @
0a9d5d45
...
...
@@ -60,13 +60,16 @@ public class Units {
private
Integer
idDel
;
/**
* 类型 1.在系统单位
* 2.省直属单位 areaid 0
* 3.省上级单位 areaid 0
序列号
*/
@ApiModelProperty
(
value
=
"序列号"
,
name
=
"code"
,
example
=
"12321L"
)
private
String
code
;
/**
* 1.在系统单位
* 2.省直属单位 areaid 0
* 3.省上级单位 areaid 0
*/
private
Integer
type
;
/**
* 区域id
*/
...
...
@@ -91,7 +94,7 @@ public class Units {
1
,
0
,
"1234"
,
1
,
1
,
1
,
null
,
null
);
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/UnitsService.java
浏览文件 @
0a9d5d45
...
...
@@ -113,4 +113,6 @@ public interface UnitsService extends PublicService<Units> {
*/
List
<
Units
>
findAllByIdIn
(
List
<
Integer
>
ids
);
List
<
Units
>
finAllDirectlUnderUnits
();
}
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UnitsServiceImpl.java
浏览文件 @
0a9d5d45
...
...
@@ -267,6 +267,11 @@ public class UnitsServiceImpl implements UnitsService {
return
unitsDao
.
findAllById
(
ids
);
}
@Override
public
List
<
Units
>
finAllDirectlUnderUnits
()
{
return
unitsDao
.
findAllByType
(
2
);
}
@Override
public
Units
save
(
Units
units
)
{
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/VenitalisServiceImpl.java
浏览文件 @
0a9d5d45
...
...
@@ -39,7 +39,8 @@ public class VenitalisServiceImpl implements VenitalisService {
private
UserLogDao
userLogDao
;
private
final
static
String
http
=
"http://10.153.4.11:8081"
;
// private final static String http="http://10.153.4.11:8081";
private
final
static
String
http
=
"http://192.168.0.80:8081"
;
private
final
static
String
REGISTERE
=
"/api/v2/auth/register"
;
private
final
static
String
CONTRAST
=
"/api/v2/auth/identify"
;
@Override
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论