Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
6d3dfc57
提交
6d3dfc57
authored
4月 08, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[清退 退役 用户] 代码提交
上级
a76386c1
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
313 行增加
和
126 行删除
+313
-126
DeviceDecommissioningBusinessService.java
...sioning/service/DeviceDecommissioningBusinessService.java
+1
-0
DeviceDecommissioningBusinessServiceImpl.java
...ervice/impl/DeviceDecommissioningBusinessServiceImpl.java
+25
-5
DeviceLibraryDao.java
.../tykj/dev/device/library/repository/DeviceLibraryDao.java
+1
-1
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+1
-1
pom.xml
dev-loss/pom.xml
+5
-0
DeviceLossVo.java
...java/com/tykj/dev/device/loss/entity/vo/DeviceLossVo.java
+1
-0
DeviceLossService.java
...a/com/tykj/dev/device/loss/service/DeviceLossService.java
+12
-0
LossBillSelectServiceImpl.java
...v/device/loss/service/impl/LossBillSelectServiceImpl.java
+3
-1
LossBillServiceImpl.java
...ykj/dev/device/loss/service/impl/LossBillServiceImpl.java
+8
-0
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+1
-16
ScrapBusinessServiceImpl.java
...v/device/scrap/service/impl/ScrapBusinessServiceImpl.java
+25
-2
DeviceRepel.java
...m/tykj/dev/device/sendback/entity/domain/DeviceRepel.java
+12
-0
SupervisorVo.java
.../com/tykj/dev/device/sendback/entity/vo/SupervisorVo.java
+25
-0
RepelBusinessService.java
...ykj/dev/device/sendback/service/RepelBusinessService.java
+5
-0
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+140
-54
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+48
-20
UserController.java
...kj/dev/device/user/subject/controller/UserController.java
+0
-26
没有找到文件。
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/DeviceDecommissioningBusinessService.java
浏览文件 @
6d3dfc57
...
@@ -12,6 +12,7 @@ import com.tykj.dev.device.decommissioning.entity.vo.StorageDeviceDevommissiong;
...
@@ -12,6 +12,7 @@ import com.tykj.dev.device.decommissioning.entity.vo.StorageDeviceDevommissiong;
* @createTime 2021年03月29日 16:37:00
* @createTime 2021年03月29日 16:37:00
*/
*/
public
interface
DeviceDecommissioningBusinessService
{
public
interface
DeviceDecommissioningBusinessService
{
/**
/**
* 生成省中办退役的任务
* 生成省中办退役的任务
* @param userId 用户id
* @param userId 用户id
...
...
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/impl/DeviceDecommissioningBusinessServiceImpl.java
浏览文件 @
6d3dfc57
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
service
.
impl
;
package
com
.
tykj
.
dev
.
device
.
decommissioning
.
service
.
impl
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail
;
import
com.tykj.dev.device.decommissioning.entity.DeviceDecommissioningDetail
;
import
com.tykj.dev.device.decommissioning.entity.vo.DecommissioningOrderOutData
;
import
com.tykj.dev.device.decommissioning.entity.vo.DecommissioningOrderOutData
;
...
@@ -12,6 +14,7 @@ import com.tykj.dev.device.library.service.DeviceLogService;
...
@@ -12,6 +14,7 @@ import com.tykj.dev.device.library.service.DeviceLogService;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.service.MessageService
;
...
@@ -22,9 +25,11 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
...
@@ -22,9 +25,11 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
jdk.nashorn.internal.ir.IfNode
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -81,7 +86,17 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
...
@@ -81,7 +86,17 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
deviceDecommissioningDetail
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()+
"QT"
+
deviceDecommissioningDetail
.
getId
());
deviceDecommissioningDetail
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()+
"QT"
+
deviceDecommissioningDetail
.
getId
());
deviceDecommissioningDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceDecommissioningDetail
.
getDeviceIds
()));
deviceDecommissioningDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceDecommissioningDetail
.
getDeviceIds
()));
deviceDecommissioningDetailService
.
saveDeviceDecommissioningDetail
(
deviceDecommissioningDetail
);
deviceDecommissioningDetailService
.
saveDeviceDecommissioningDetail
(
deviceDecommissioningDetail
);
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
RETIRED
.
id
,
decommissioningOrderOutData
.
getDevIds
());
List
<
ScriptSaveVo
>
scriptSaveVos
=
decommissioningOrderOutData
.
getScriptSaveVos
();
List
<
String
>
seqNumbers
=
new
ArrayList
<>();
scriptSaveVos
.
forEach
(
scriptSaveVo
->
{
if
(
scriptSaveVo
.
getSeqNumber
()!=
null
){
seqNumbers
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
scriptSaveVo
.
getSeqNumber
()));
}
}
);
deviceLibraryDao
.
upDateSeqNumbersLeftStatus
(
DeviceLifeStatus
.
RETIRED
.
id
,
seqNumbers
);
TaskBto
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
deviceDecommissioningDetail
.
getId
());
TaskBto
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
deviceDecommissioningDetail
.
getId
());
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起退役任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起退役任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
return
deviceDecommissioningDetail
;
return
deviceDecommissioningDetail
;
...
@@ -110,7 +125,15 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
...
@@ -110,7 +125,15 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
}
}
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveToEnd
(
taskBto
);
deviceDecommissioningDetail
.
setRepelStatus
(
2
);
deviceDecommissioningDetail
.
setRepelStatus
(
2
);
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
RETIRE
.
id
,
deviceDecommissioningDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceDecommissioningDetail
.
getDeviceIds
()));
List
<
String
>
seqNumbers
=
new
ArrayList
<>();
JacksonUtil
.
readValue
(
deviceDecommissioningDetail
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{}).
forEach
(
scriptSaveVo
->
{
if
(
scriptSaveVo
.
getSeqNumber
()!=
null
){
seqNumbers
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
scriptSaveVo
.
getSeqNumber
()));
}
}
);
deviceLibraryDao
.
upDateSeqNumbersLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
RETIRE
.
id
,
deviceDecommissioningDetail
.
getReceiveUnit
(),
0
,
seqNumbers
);
deviceDecommissioningDetailService
.
saveDeviceDecommissioningDetail
(
deviceDecommissioningDetail
);
deviceDecommissioningDetailService
.
saveDeviceDecommissioningDetail
(
deviceDecommissioningDetail
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"退役任务回执单据上传成功任务结束"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"退役任务回执单据上传成功任务结束"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
}
}
...
@@ -130,9 +153,6 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
...
@@ -130,9 +153,6 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
/**
/**
* 异步添加装备日志
* 异步添加装备日志
* @param deviceLibraries
* @param remark
* @param userId
*/
*/
private
void
devLogAdd
(
List
<
DeviceLibrary
>
deviceLibraries
,
String
remark
,
Integer
userId
){
private
void
devLogAdd
(
List
<
DeviceLibrary
>
deviceLibraries
,
String
remark
,
Integer
userId
){
List
<
DeviceLog
>
logDtos
=
new
ArrayList
<>();
List
<
DeviceLog
>
logDtos
=
new
ArrayList
<>();
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryDao.java
浏览文件 @
6d3dfc57
...
@@ -104,7 +104,7 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
...
@@ -104,7 +104,7 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
@Transactional
@Transactional
@Modifying
@Modifying
@Query
(
"update DeviceLibrary o set o.lifeStatus = :lifeStatus ,o.ownUnit = :unitName where o.id in :idList"
)
@Query
(
"update DeviceLibrary o set o.lifeStatus = :lifeStatus ,o.ownUnit = :unitName
,o.locationUnit = :unitName
where o.id in :idList"
)
int
upDateLeftStatusAndOwnUnitName
(
Integer
lifeStatus
,
String
unitName
,
@Param
(
"idList"
)
List
<
Integer
>
idList
);
int
upDateLeftStatusAndOwnUnitName
(
Integer
lifeStatus
,
String
unitName
,
@Param
(
"idList"
)
List
<
Integer
>
idList
);
List
<
DeviceLibrary
>
findAllByLifeStatus
(
Integer
status
);
List
<
DeviceLibrary
>
findAllByLifeStatus
(
Integer
status
);
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
6d3dfc57
...
@@ -434,7 +434,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -434,7 +434,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
public
void
isInStockOrWaitRetired
(
List
<
Integer
>
ids
)
{
public
void
isInStockOrWaitRetired
(
List
<
Integer
>
ids
)
{
ids
.
forEach
(
integer
->
{
ids
.
forEach
(
integer
->
{
DeviceLibrary
deviceLibrary
=
getOne
(
integer
);
DeviceLibrary
deviceLibrary
=
getOne
(
integer
);
if
(
deviceLibrary
.
getLifeStatus
()!=
2
&&
deviceLibrary
.
getLifeStatus
()!=
15
&&
!
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
){
if
(
deviceLibrary
.
getLifeStatus
()!=
2
&&
deviceLibrary
.
getLifeStatus
()!=
15
&&
deviceLibrary
.
getLifeStatus
()!=
DeviceLifeStatus
.
SEND_BACK
.
id
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"序列号"
+
deviceLibrary
.
getSeqNumber
()+
"的装备已被其他专管员操作"
));
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"序列号"
+
deviceLibrary
.
getSeqNumber
()+
"的装备已被其他专管员操作"
));
}
}
});
});
...
...
dev-loss/pom.xml
浏览文件 @
6d3dfc57
...
@@ -12,18 +12,22 @@
...
@@ -12,18 +12,22 @@
<artifactId>
dev-loss
</artifactId>
<artifactId>
dev-loss
</artifactId>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-library
</artifactId>
<artifactId>
dev-library
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-task
</artifactId>
<artifactId>
dev-task
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-packing
</artifactId>
<artifactId>
dev-packing
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
misc
</artifactId>
<artifactId>
misc
</artifactId>
...
@@ -33,6 +37,7 @@
...
@@ -33,6 +37,7 @@
<groupId>
com.tykj
</groupId>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-file
</artifactId>
<artifactId>
dev-file
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
config
</artifactId>
<artifactId>
config
</artifactId>
...
...
dev-loss/src/main/java/com/tykj/dev/device/loss/entity/vo/DeviceLossVo.java
浏览文件 @
6d3dfc57
...
@@ -25,6 +25,7 @@ public class DeviceLossVo {
...
@@ -25,6 +25,7 @@ public class DeviceLossVo {
@ApiModelProperty
(
value
=
"类型"
)
@ApiModelProperty
(
value
=
"类型"
)
private
Integer
type
;
private
Integer
type
;
private
String
typeName
;
/**
/**
* 装备名称
* 装备名称
*/
*/
...
...
dev-loss/src/main/java/com/tykj/dev/device/loss/service/DeviceLossService.java
浏览文件 @
6d3dfc57
...
@@ -5,12 +5,24 @@ import com.tykj.dev.device.loss.entity.domain.DeviceLoss;
...
@@ -5,12 +5,24 @@ import com.tykj.dev.device.loss.entity.domain.DeviceLoss;
import
java.util.List
;
import
java.util.List
;
public
interface
DeviceLossService
{
public
interface
DeviceLossService
{
/**
* 丢失、找回表单信息保存
*/
DeviceLoss
save
(
DeviceLoss
deviceLoss
);
DeviceLoss
save
(
DeviceLoss
deviceLoss
);
/**
* 丢失、找回 根据单据id查询单据详情
*/
DeviceLoss
findByDeviceLoss
(
Integer
lossId
);
DeviceLoss
findByDeviceLoss
(
Integer
lossId
);
/**
* 丢失、找回 查询所有的丢失、找回单据信息
*/
List
<
DeviceLoss
>
findByListLoss
();
List
<
DeviceLoss
>
findByListLoss
();
/**
* 丢失、找回 根据单位ID查询单据信息集合
*/
List
<
DeviceLoss
>
findByListLossUnitId
(
Integer
unitId
);
List
<
DeviceLoss
>
findByListLossUnitId
(
Integer
unitId
);
...
...
dev-loss/src/main/java/com/tykj/dev/device/loss/service/impl/LossBillSelectServiceImpl.java
浏览文件 @
6d3dfc57
...
@@ -44,6 +44,8 @@ public class LossBillSelectServiceImpl implements LossBillSelectService {
...
@@ -44,6 +44,8 @@ public class LossBillSelectServiceImpl implements LossBillSelectService {
private
DeviceLossVo
toDeviceLossVo
(
DeviceLibrary
deviceLibrary
){
private
DeviceLossVo
toDeviceLossVo
(
DeviceLibrary
deviceLibrary
){
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
return
mapper
.
map
(
deviceLibrary
,
DeviceLossVo
.
class
);
DeviceLossVo
deviceLossVo
=
mapper
.
map
(
deviceLibrary
,
DeviceLossVo
.
class
);
deviceLossVo
.
setTypeName
(
deviceLibrary
.
setConfigName
().
getTypeName
());
return
deviceLossVo
;
}
}
}
}
dev-loss/src/main/java/com/tykj/dev/device/loss/service/impl/LossBillServiceImpl.java
浏览文件 @
6d3dfc57
...
@@ -13,6 +13,7 @@ import com.tykj.dev.device.loss.service.LossBillService;
...
@@ -13,6 +13,7 @@ import com.tykj.dev.device.loss.service.LossBillService;
import
com.tykj.dev.device.loss.util.StringUtils
;
import
com.tykj.dev.device.loss.util.StringUtils
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.subject.entity.Area
;
import
com.tykj.dev.device.user.subject.entity.Area
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.Units
;
...
@@ -61,6 +62,9 @@ public class LossBillServiceImpl implements LossBillService {
...
@@ -61,6 +62,9 @@ public class LossBillServiceImpl implements LossBillService {
@Autowired
@Autowired
DeviceLogService
deviceLogService
;
DeviceLogService
deviceLogService
;
@Autowired
MessageService
messageService
;
@Override
@Override
public
void
initiateLoss
(
DeviceLoss
deviceLoss
,
SecurityUser
securityUser
)
{
public
void
initiateLoss
(
DeviceLoss
deviceLoss
,
SecurityUser
securityUser
)
{
deviceLibraryService
.
isInStockOrWaitRetired
(
deviceLoss
.
getDevIdsList
());
deviceLibraryService
.
isInStockOrWaitRetired
(
deviceLoss
.
getDevIdsList
());
...
@@ -90,12 +94,16 @@ public class LossBillServiceImpl implements LossBillService {
...
@@ -90,12 +94,16 @@ public class LossBillServiceImpl implements LossBillService {
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
TaskBto
taskBto
=
taskService
.
get
(
lossAuditvo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
lossAuditvo
.
getTaskId
());
DeviceLoss
deviceLoss
=
deviceLossService
.
findByDeviceLoss
(
taskBto
.
getBillId
());
DeviceLoss
deviceLoss
=
deviceLossService
.
findByDeviceLoss
(
taskBto
.
getBillId
());
if
(
units
.
getLevel
()==
1
){
if
(
units
.
getLevel
()==
1
){
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
LOSS1301
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
LOSS1301
);
deviceLoss
.
setProvinceUnitName
(
units
.
getName
());
deviceLoss
.
setProvinceUnitName
(
units
.
getName
());
deviceLoss
.
setProvinceDes
(
lossAuditvo
.
getDes
());
deviceLoss
.
setProvinceDes
(
lossAuditvo
.
getDes
());
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveToEnd
(
taskBto
);
}
else
{
}
else
{
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
LOSS1300
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
LOSS1300
);
Units
parentUnits
=
unitsService
.
findUnitAreaId
(
area
.
getFatherId
());
Units
parentUnits
=
unitsService
.
findUnitAreaId
(
area
.
getFatherId
());
deviceLoss
.
setCityUnitName
(
units
.
getName
());
deviceLoss
.
setCityUnitName
(
units
.
getName
());
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
6d3dfc57
...
@@ -60,16 +60,6 @@ public enum StatusEnum {
...
@@ -60,16 +60,6 @@ public enum StatusEnum {
/**
/**
* 清退任务
* 清退任务
*/
*/
//以下为stat状态
// SEND_BACK_1200(1200, "省市清退查看"),
// SEND_BACK_1201(1201, "统计数据等待办结"),
// SEND_BACK_1202(1202, "出库待审核"),
// SEND_BACK_1203(1203, "出库待校验"),
// SEND_BACK_1204(1204, "入库待审核"),
// SEND_BACK_1205(1205, "异常装备待描述"),
// SEND_BACK_1206(1206, "入库待校验"),
// SEND_BACK_1207(1207, "异常装备确认"),
SEND_BACK_1200
(
1200
,
"省清退任务待各市提交"
),
SEND_BACK_1200
(
1200
,
"省清退任务待各市提交"
),
SEND_BACK_1201
(
1201
,
"市清退任务待执行"
),
SEND_BACK_1201
(
1201
,
"市清退任务待执行"
),
SEND_BACK_1202
(
1202
,
"省直属装备待清退"
),
SEND_BACK_1202
(
1202
,
"省直属装备待清退"
),
...
@@ -86,6 +76,7 @@ public enum StatusEnum {
...
@@ -86,6 +76,7 @@ public enum StatusEnum {
SEND_BACK_1213
(
1213
,
"省直属清退任务待上传单据"
),
SEND_BACK_1213
(
1213
,
"省直属清退任务待上传单据"
),
SEND_BACK_1214
(
1214
,
"清退出库等待上传回执单"
),
SEND_BACK_1214
(
1214
,
"清退出库等待上传回执单"
),
SEND_BACK_1215
(
1215
,
"清退出库接收方单据待补充"
),
SEND_BACK_1215
(
1215
,
"清退出库接收方单据待补充"
),
SEND_BACK_1216
(
1216
,
"市本级装备待清退"
),
...
@@ -131,12 +122,6 @@ public enum StatusEnum {
...
@@ -131,12 +122,6 @@ public enum StatusEnum {
TRAIN1010
(
1010
,
"待培训"
),
TRAIN1010
(
1010
,
"待培训"
),
WORKHANDOVER1011
(
1011
,
"待上传签字单"
),
WORKHANDOVER1011
(
1011
,
"待上传签字单"
),
//
// TRAIN1011(1011,""),
//
// TRAIN1012(1012,""),
//
// TRAIN1013(1013,""),
/**
/**
* 业务封存
* 业务封存
...
...
dev-scrap/src/main/java/com/tykj/dev/device/scrap/service/impl/ScrapBusinessServiceImpl.java
浏览文件 @
6d3dfc57
package
com
.
tykj
.
dev
.
device
.
scrap
.
service
.
impl
;
package
com
.
tykj
.
dev
.
device
.
scrap
.
service
.
impl
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
...
@@ -7,6 +8,7 @@ import com.tykj.dev.device.library.service.DeviceLogService;
...
@@ -7,6 +8,7 @@ import com.tykj.dev.device.library.service.DeviceLogService;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.scrap.service.ScrapBusinessService
;
import
com.tykj.dev.device.scrap.service.ScrapBusinessService
;
import
com.tykj.dev.device.scrap.service.ScrapService
;
import
com.tykj.dev.device.scrap.service.ScrapService
;
import
com.tykj.dev.device.scrap.subject.domin.Scrap
;
import
com.tykj.dev.device.scrap.subject.domin.Scrap
;
...
@@ -22,6 +24,7 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
...
@@ -22,6 +24,7 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
...
@@ -43,6 +46,7 @@ import java.util.stream.Collectors;
...
@@ -43,6 +46,7 @@ import java.util.stream.Collectors;
* @createTime 2021年03月31日 13:16:00
* @createTime 2021年03月31日 13:16:00
*/
*/
@Service
@Service
@SuppressWarnings
(
"ALL"
)
public
class
ScrapBusinessServiceImpl
implements
ScrapBusinessService
{
public
class
ScrapBusinessServiceImpl
implements
ScrapBusinessService
{
@Autowired
@Autowired
UserService
userService
;
UserService
userService
;
...
@@ -79,13 +83,23 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
...
@@ -79,13 +83,23 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
List
<
DeviceLibrary
>
deviceLibraries
=
findInvoleDevice
(
scrap
.
getDeviceIds
());
List
<
DeviceLibrary
>
deviceLibraries
=
findInvoleDevice
(
scrap
.
getDeviceIds
());
scrap
.
setDeviceLibraryEntities
(
findInvoleDevice
(
scrap
.
getDeviceIds
()));
scrap
.
setDeviceLibraryEntities
(
findInvoleDevice
(
scrap
.
getDeviceIds
()));
scrapService
.
saveScrap
(
scrap
);
scrapService
.
saveScrap
(
scrap
);
deviceLibraryDao
.
upDateLeftStatus
(
DeviceLifeStatus
.
RETIRED
.
id
,
scrapOrderOutData
.
getDevIds
());
List
<
ScriptSaveVo
>
scriptSaveVos
=
scrapOrderOutData
.
getScriptSaveVos
();
List
<
String
>
seqNumbers
=
new
ArrayList
<>();
scriptSaveVos
.
forEach
(
scriptSaveVo
->
{
if
(
scriptSaveVo
.
getSeqNumber
()!=
null
){
seqNumbers
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
scriptSaveVo
.
getSeqNumber
()));
}
}
);
deviceLibraryDao
.
upDateSeqNumbersLeftStatus
(
DeviceLifeStatus
.
RETIRED
.
id
,
seqNumbers
);
devLogAdd
(
deviceLibraries
,
"发起了报废任务"
,
userId
);
devLogAdd
(
deviceLibraries
,
"发起了报废任务"
,
userId
);
TaskBto
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
scrap
.
getId
(),
userId
);
TaskBto
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
scrap
.
getId
(),
userId
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起退役任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起退役任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
return
scrap
;
return
scrap
;
}
}
@Override
@Override
public
void
receiptSingle
(
Integer
taskId
,
StorageScrap
storageScrap
)
{
public
void
receiptSingle
(
Integer
taskId
,
StorageScrap
storageScrap
)
{
User
user
=
userService
.
findByUser
(
storageScrap
.
getUserId
());
User
user
=
userService
.
findByUser
(
storageScrap
.
getUserId
());
...
@@ -108,7 +122,16 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
...
@@ -108,7 +122,16 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
scrap
.
setReceiveUserA
(
storageScrap
.
getUserAName
());
scrap
.
setReceiveUserA
(
storageScrap
.
getUserAName
());
}
}
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveToEnd
(
taskBto
);
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
RETIRE
.
id
,
scrap
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
scrap
.
getDeviceIds
()));
List
<
String
>
seqNumbers
=
new
ArrayList
<>();
JacksonUtil
.
readValue
(
scrap
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{}).
forEach
(
scriptSaveVo
->
{
if
(
scriptSaveVo
.
getSeqNumber
()!=
null
){
seqNumbers
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
scriptSaveVo
.
getSeqNumber
()));
}
}
);
deviceLibraryDao
.
upDateSeqNumbersLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
RETIRE
.
id
,
scrap
.
getReceiveUnit
(),
0
,
seqNumbers
);
scrapService
.
saveScrap
(
scrap
);
scrapService
.
saveScrap
(
scrap
);
devLogAdd
(
findInvoleDevice
(
scrap
.
getDeviceIds
()),
"上传了报废单据,装备状态-》已报废"
,
storageScrap
.
getUserId
());
devLogAdd
(
findInvoleDevice
(
scrap
.
getDeviceIds
()),
"上传了报废单据,装备状态-》已报废"
,
storageScrap
.
getUserId
());
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"退役任务回执单据上传成功任务结束"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"退役任务回执单据上传成功任务结束"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/DeviceRepel.java
浏览文件 @
6d3dfc57
...
@@ -103,6 +103,18 @@ public class DeviceRepel extends BaseEntity {
...
@@ -103,6 +103,18 @@ public class DeviceRepel extends BaseEntity {
*/
*/
private
Integer
unitId
;
private
Integer
unitId
;
/**
* 装备序列号
*/
@Column
(
name
=
"seq_numbers"
,
columnDefinition
=
"TEXT"
)
private
String
seqNumbers
;
/**
* type为123时使用
*/
@Column
(
name
=
"equipment_involving_unit"
,
columnDefinition
=
"TEXT"
)
private
String
equipmentInvolvingUnit
;
/**
/**
* 类型集合多个列装id
* 类型集合多个列装id
* 页面类型
* 页面类型
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/SupervisorVo.java
0 → 100644
浏览文件 @
6d3dfc57
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName SupervisorVo.java
* @Description TODO
* @createTime 2021年04月07日 10:31:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
SupervisorVo
{
private
String
unitName
;
private
Integer
unitid
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelBusinessService.java
浏览文件 @
6d3dfc57
...
@@ -62,6 +62,10 @@ public interface RepelBusinessService {
...
@@ -62,6 +62,10 @@ public interface RepelBusinessService {
*/
*/
DeviceRepelDetail
sendBackOutCheck
(
Integer
taskId
,
Integer
userId
,
OrderOutData
orderOutData
);
DeviceRepelDetail
sendBackOutCheck
(
Integer
taskId
,
Integer
userId
,
OrderOutData
orderOutData
);
// void SealOfAudit()
/**
/**
* 上级清退装备入库
* 上级清退装备入库
*/
*/
...
@@ -73,6 +77,7 @@ public interface RepelBusinessService {
...
@@ -73,6 +77,7 @@ public interface RepelBusinessService {
*/
*/
void
oneselfRepel
(
Integer
taskId
,
StorageDeviceRepel
storageDeviceRepel
,
Integer
userId
);
void
oneselfRepel
(
Integer
taskId
,
StorageDeviceRepel
storageDeviceRepel
,
Integer
userId
);
/**
/**
* 省直属任务等待上传 (需要根据主业务的type 给涉及的装备装备给不同的状态)
* 省直属任务等待上传 (需要根据主业务的type 给涉及的装备装备给不同的状态)
*/
*/
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
6d3dfc57
...
@@ -35,11 +35,14 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
...
@@ -35,11 +35,14 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -61,6 +64,7 @@ import java.util.stream.Collectors;
...
@@ -61,6 +64,7 @@ import java.util.stream.Collectors;
public
class
RepelBusinessServiceImpl
implements
RepelBusinessService
{
public
class
RepelBusinessServiceImpl
implements
RepelBusinessService
{
@Autowired
@Autowired
TaskService
taskService
;
TaskService
taskService
;
@Autowired
@Autowired
DeviceLogService
deviceLogService
;
DeviceLogService
deviceLogService
;
...
@@ -103,17 +107,19 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -103,17 +107,19 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
@Autowired
@Autowired
PdfService
pdfService
;
PdfService
pdfService
;
/**
* 发起申请后清退任务
* @param deviceRepel
* @param userId
*/
@Override
@Override
public
void
initiateRepel
(
DeviceRepel
deviceRepel
,
Integer
userId
)
{
public
void
initiateRepel
(
DeviceRepel
deviceRepel
,
Integer
userId
)
{
//生成一个清退任务 省清退任务 类型为 清退统计 17 16清退
//生成一个清退任务 省清退任务 类型为 清退统计 17 16清退
//参照选择的范围给单位都发送 市清退任务待执行
//参照选择的范围给单位都发送 市清退任务待执行
//如果省本身有需要清退的型号,给省自己发起一个代办任务 本级装备待清退
//如果省本身有需要清退的型号,给省自己发起一个代办任务 本级装备待清退
//生成的任务放入统计表中 关联信息
//生成的任务放入统计表中 关联信息
//把清退账单存储到数据表中
//把清退账单存储到数据表中
//写入业务日志
//写入业务日志
User
user
=
userService
.
findByUser
(
userId
);
User
user
=
userService
.
findByUser
(
userId
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
...
@@ -130,6 +136,58 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -130,6 +136,58 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepel
.
setFielding
(
StringUtils
.
ListToString
(
deviceRepel
.
getFieldingIds
()));
deviceRepel
.
setFielding
(
StringUtils
.
ListToString
(
deviceRepel
.
getFieldingIds
()));
deviceRepel
.
setTaskScope
(
StringUtils
.
ListToString
(
deviceRepel
.
getTaskScopes
()));
deviceRepel
.
setTaskScope
(
StringUtils
.
ListToString
(
deviceRepel
.
getTaskScopes
()));
deviceRepel
.
setFiles
(
FilesUtil
.
stringFileToList
(
deviceRepel
.
getFileRets
()));
deviceRepel
.
setFiles
(
FilesUtil
.
stringFileToList
(
deviceRepel
.
getFileRets
()));
Map
<
String
,
Integer
>
unitNameMap
=
new
HashMap
<>();
List
<
Integer
>
ids
=
new
ArrayList
<>();
List
<
String
>
seqNumbers
=
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
());
if
(
seqNumbers
.
size
()!=
0
){
log
.
info
(
"申请任务触发清退任务"
);
deviceLibraryService
.
findAllBySeqNumber
(
seqNumbers
).
forEach
(
deviceLibrary
->
{
if
(!
unitNameMap
.
containsKey
(
deviceLibrary
.
getOwnUnit
())){
unitNameMap
.
put
(
deviceLibrary
.
getOwnUnit
(),
0
);
}
}
);
List
<
SupervisorVo
>
supervisorVoList
=
new
ArrayList
<>();
//市区关系信息
Map
<
Integer
,
List
<
SupervisorVo
>>
supervisorMap
=
new
HashMap
<>();
//省本级
SupervisorVo
corresponding
=
null
;
//省直属 待考虑
unitNameMap
.
forEach
((
k
,
v
)->{
Units
units1
=
unitsService
.
findbyName
(
k
);
//区
if
(
units1
.
getLevel
()
==
3
)
{
Area
area1
=
areaService
.
findByid
(
units1
.
getAreaId
());
Units
father
=
unitsService
.
findUnitAreaId
(
area1
.
getFatherId
());
if
(
supervisorMap
.
containsKey
(
father
.
getUnitId
()))
{
List
<
SupervisorVo
>
supervisorVoList1
=
supervisorMap
.
get
(
father
.
getUnitId
());
supervisorVoList1
.
add
(
new
SupervisorVo
(
units1
.
getName
(),
units1
.
getUnitId
()));
supervisorMap
.
put
(
father
.
getUnitId
(),
supervisorVoList1
);
}
else
{
supervisorVoList
.
add
(
new
SupervisorVo
(
units1
.
getName
(),
units1
.
getUnitId
()));
supervisorMap
.
put
(
father
.
getUnitId
(),
supervisorVoList
);
}
}
else
{
if
(
supervisorMap
.
containsKey
(
units1
.
getUnitId
()))
{
List
<
SupervisorVo
>
supervisorVoList1
=
supervisorMap
.
get
(
units1
.
getUnitId
());
supervisorMap
.
put
(
units1
.
getUnitId
(),
supervisorVoList1
);
}
else
{
supervisorVoList
.
add
(
new
SupervisorVo
(
units1
.
getName
(),
units1
.
getUnitId
()));
supervisorMap
.
put
(
units1
.
getUnitId
(),
supervisorVoList
);
}
}
});
List
<
Integer
>
unitList
=
new
ArrayList
<>();
unitList
.
addAll
(
supervisorMap
.
keySet
());
deviceRepel
.
setTaskScopes
(
unitList
);
deviceRepel
.
setEquipmentInvolvingUnit
(
JacksonUtil
.
toJSon
(
supervisorMap
));
}
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
deviceRepelDetail
.
setRepelId
(
deviceRepel1
.
getId
());
deviceRepelDetail
.
setRepelId
(
deviceRepel1
.
getId
());
...
@@ -138,10 +196,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -138,10 +196,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
//给本单位其他专管员阅知
//给本单位其他专管员阅知
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
user
.
getName
()+
"发起清退任务["
+
deviceRepel1
.
getTitle
()+
"]"
,
gainThisUser
(
userId
,
units
.
getUnitId
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
user
.
getName
()+
"发起清退任务["
+
deviceRepel1
.
getTitle
()+
"]"
,
gainThisUser
(
userId
,
units
.
getUnitId
())));
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
deviceRepel
.
getTaskScopes
().
forEach
(
deviceRepel
.
getTaskScopes
().
forEach
(
unisId
->
{
unisId
->
{
Units
units1
=
unitsService
.
findById
(
unisId
);
if
(
unisId
!=
units
.
getUnitId
())
{
if
(
unisId
!=
units
.
getUnitId
())
{
Units
units1
=
unitsService
.
findById
(
unisId
);
if
(
units1
.
getType
()
==
2
)
{
if
(
units1
.
getType
()
==
2
)
{
directlUnderUnit
.
set
(
true
);
directlUnderUnit
.
set
(
true
);
directlUnderUnitNames
.
add
(
units1
.
getName
());
directlUnderUnitNames
.
add
(
units1
.
getName
());
...
@@ -150,9 +209,12 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -150,9 +209,12 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setId
(
null
);
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
())))
{
long
time
=
System
.
currentTimeMillis
();
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
seqNumbers
,
lifeStatus
);
log
.
info
(
"count 时间:{}"
,
System
.
currentTimeMillis
()-
time
);
if
(
count
!=
0
)
{
TaskBto
taskBto1
=
cityRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
TaskBto
taskBto1
=
cityRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
deviceLibraryDao
.
countAllByPackingIdInAndOwnUnitInAndLifeStatusIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
lifeStatus
)
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
count
,
""
));
}
}
}
}
}
else
{
}
else
{
...
@@ -163,17 +225,19 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -163,17 +225,19 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setSendUnitId
(
units
.
getUnitId
());
deviceRepelDetail
.
setSendUnitId
(
units
.
getUnitId
());
deviceRepelDetail
.
setSendUnit
(
units
.
getName
());
deviceRepelDetail
.
setSendUnit
(
units
.
getName
());
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setId
(
null
);
if
(
directlUnderUnit
.
get
()&&
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
directlUnderUnitNames
)){
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
directlUnderUnitNames
,
seqNumbers
,
lifeStatus
);
if
(
directlUnderUnit
.
get
()&&
count
!=
0
){
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
());
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto2
.
getId
(),
0
,
"省直属"
,
deviceLibraryDao
.
countAllByPackingIdInAndOwnUnitInAndLifeStatusIn
(
deviceRepel
.
getFieldingIds
(),
directlUnderUnitNames
,
lifeStatus
)
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto2
.
getId
(),
0
,
"省直属"
,
count
,
""
));
}
}
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setId
(
null
);
List
<
String
>
strings
=
new
ArrayList
<>();
List
<
String
>
strings
=
new
ArrayList
<>();
strings
.
add
(
units
.
getName
());
strings
.
add
(
units
.
getName
());
if
(
correspondingLevel
.
get
()&&
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
strings
)){
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
strings
,
seqNumbers
,
lifeStatus
);
if
(
correspondingLevel
.
get
()&&
count
!=
0
){
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
());
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省本级"
,
deviceLibraryDao
.
countAllByPackingIdInAndOwnUnitInAndLifeStatusIn
(
deviceRepel
.
getFieldingIds
(),
strings
,
lifeStatus
)
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省本级"
,
count
,
""
));
}
}
if
(
list
==
null
||
list
.
size
()==
0
){
if
(
list
==
null
||
list
.
size
()==
0
){
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1212
,
userId
);
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1212
,
userId
);
...
@@ -201,18 +265,29 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -201,18 +265,29 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepel
.
setFielding
(
StringUtils
.
ListToString
(
deviceRepel
.
getFieldingIds
()));
deviceRepel
.
setFielding
(
StringUtils
.
ListToString
(
deviceRepel
.
getFieldingIds
()));
deviceRepel
.
setTaskScope
(
StringUtils
.
ListToString
(
deviceRepel
.
getTaskScopes
()));
deviceRepel
.
setTaskScope
(
StringUtils
.
ListToString
(
deviceRepel
.
getTaskScopes
()));
deviceRepel
.
setFiles
(
FilesUtil
.
stringFileToList
(
deviceRepel
.
getFileRets
()));
deviceRepel
.
setFiles
(
FilesUtil
.
stringFileToList
(
deviceRepel
.
getFileRets
()));
//查询上级任务 判断是否为申请后清退
TaskBto
currentTask
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail1
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
currentTask
.
getBillId
());
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
currentTask
.
getId
(),
deviceRepelDetail1
.
getRepelId
());
repelTaskStatistical
.
setTaskStatus
(
5
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
taskService
.
moveToSpecial
(
currentTask
,
StatusEnum
.
SEND_BACK_1206
);
DeviceRepel
deviceRepelCurrent
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail1
.
getRepelId
());
if
(
deviceRepelCurrent
.
getType
()!=
0
){
Map
<
Integer
,
List
<
SupervisorVo
>>
integerListMap
=
JacksonUtil
.
readValue
(
deviceRepelCurrent
.
getEquipmentInvolvingUnit
(),
new
TypeReference
<
Map
<
Integer
,
List
<
SupervisorVo
>>>()
{});
if
(
integerListMap
.
containsKey
(
units
.
getUnitId
())){
deviceRepel
.
setTaskScopes
(
integerListMap
.
get
(
units
.
getUnitId
()).
stream
().
map
(
SupervisorVo:
:
getUnitid
).
collect
(
Collectors
.
toList
()));
}
else
{
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"[申请后清退] 为根据单位ID查询到市分解任务到单位范围:"
+
currentTask
.
getId
()));
}
}
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
deviceRepelDetail
.
setRepelId
(
deviceRepel1
.
getId
());
deviceRepelDetail
.
setRepelId
(
deviceRepel1
.
getId
());
deviceRepelDetail
.
setRepelStatus
(
1
);
deviceRepelDetail
.
setRepelStatus
(
1
);
TaskBto
taskBto
=
cityTotalTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
deviceRepel
.
getTitle
(),
taskId
);
TaskBto
taskBto
=
cityTotalTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
deviceRepel
.
getTitle
(),
taskId
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
user
.
getName
()+
"转发清退任务["
+
deviceRepel1
.
getTitle
()+
"]"
,
gainThisUser
(
userId
,
units
.
getUnitId
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
user
.
getName
()+
"转发清退任务["
+
deviceRepel1
.
getTitle
()+
"]"
,
gainThisUser
(
userId
,
units
.
getUnitId
())));
Set
<
ModelCount
>
modelCounts
=
new
HashSet
<>();
deviceRepel
.
getModels
().
forEach
(
i
->{
modelCounts
.
add
(
new
ModelCount
(
i
,
0
));
});
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
deviceRepel
.
getTaskScopes
().
forEach
(
deviceRepel
.
getTaskScopes
().
forEach
(
unisId
->
{
unisId
->
{
...
@@ -223,15 +298,25 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -223,15 +298,25 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
List
<
String
>
unitNames
=
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
());
List
<
String
>
unitNames
=
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
());
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitNames
))
{
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
()),
lifeStatus
);
if
(
count
!=
0
)
{
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
deviceLibraryDao
.
countAllByPackingIdInAndOwnUnitInAndLifeStatusIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
lifeStatus
)
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
count
,
""
));
}
}
}
else
{
}
else
{
//添加本级清退任务
//添加本级清退任务
//后面和区县的一起提交给省
//后面和区县的一起提交给省
}
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setSendUnit
(
units
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units
.
getUnitId
());
List
<
String
>
unitNames
=
new
ArrayList
<>();
unitNames
.
add
(
units
.
getName
());
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
unitNames
,
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
()),
lifeStatus
);
if
(
count
!=
0
)
{
TaskBto
taskBto1
=
cityDeclaredTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
units
.
getName
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省本级"
,
count
,
""
));
}
}
}
}
);
);
if
(
list
==
null
||
list
.
size
()==
0
){
if
(
list
==
null
||
list
.
size
()==
0
){
...
@@ -239,12 +324,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -239,12 +324,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
}
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
TaskBto
currentTask
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail1
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
currentTask
.
getBillId
());
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
currentTask
.
getId
(),
deviceRepelDetail1
.
getRepelId
());
repelTaskStatistical
.
setTaskStatus
(
5
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
taskService
.
moveToSpecial
(
currentTask
,
StatusEnum
.
SEND_BACK_1206
);
}
}
...
@@ -296,9 +375,10 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -296,9 +375,10 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setId
(
null
);
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnit
(
units1
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
unisId
)))
{
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
()),
lifeStatus
);
if
(
count
!=
0
)
{
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
deviceLibraryDao
.
countAllByPackingIdInAndOwnUnitInAndLifeStatusIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
lifeStatus
)
,
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
count
,
""
));
}
}
}
else
{
}
else
{
...
@@ -380,10 +460,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -380,10 +460,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
repelTaskStatistical
.
setCount
(
resolveConfirm
.
getDevIds
().
size
());
repelTaskStatistical
.
setCount
(
resolveConfirm
.
getDevIds
().
size
());
repelTaskStatistical
.
setDes
(
resolveConfirm
.
getDes
());
repelTaskStatistical
.
setDes
(
resolveConfirm
.
getDes
());
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
//装备状态改为锁定
//装备状态改为锁定
deviceLibraryDao
.
upDateLeftStatusAndLockStatus
(
2
,
1
,
resolveConfirm
.
getDevIds
());
deviceLibraryDao
.
upDateLeftStatusAndLockStatus
(
2
,
1
,
resolveConfirm
.
getDevIds
());
deviceRepelDetail
.
setDeviceIds
(
StringUtils
.
ListToString
(
resolveConfirm
.
getDevIds
()));
deviceRepelDetail
.
setDeviceIds
(
StringUtils
.
ListToString
(
resolveConfirm
.
getDevIds
()));
deviceRepelDetail
.
setSubmitDescription
(
resolveConfirm
.
getDes
());
deviceRepelDetail
.
setSubmitDescription
(
resolveConfirm
.
getDes
());
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
...
@@ -429,7 +507,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -429,7 +507,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
statusEnums
.
add
(
StatusEnum
.
SEND_BACK_1206
);
statusEnums
.
add
(
StatusEnum
.
SEND_BACK_1206
);
statusEnums
.
add
(
StatusEnum
.
SEND_BACK_1208
);
statusEnums
.
add
(
StatusEnum
.
SEND_BACK_1208
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
statusEnums
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
statusEnums
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepelDetail
orderOutDataRepelDetail
=
orderOutData
.
toTrainDetailsVo
();
DeviceRepelDetail
orderOutDataRepelDetail
=
orderOutData
.
toTrainDetailsVo
();
orderOutDataRepelDetail
.
setId
(
deviceRepelDetail
.
getId
());
orderOutDataRepelDetail
.
setId
(
deviceRepelDetail
.
getId
());
...
@@ -451,7 +528,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -451,7 +528,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
waitingReceiptsTask
(
orderOutData
.
getSendUnitId
(),
deviceRepelDetail
.
getId
(),
taskBto
.
getId
(),
"清退装备出库等待上传回执单"
);
waitingReceiptsTask
(
orderOutData
.
getSendUnitId
(),
deviceRepelDetail
.
getId
(),
taskBto
.
getId
(),
"清退装备出库等待上传回执单"
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"根据["
+
deviceRepel
.
getTitle
()+
"]任务,已完成退回出库"
,
gainThisUser
(
userId
,
user
.
getUnitsId
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"根据["
+
deviceRepel
.
getTitle
()+
"]任务,已完成退回出库"
,
gainThisUser
(
userId
,
user
.
getUnitsId
())));
devLogAdd
(
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()),
deviceRepelDetail
.
getSendUnit
()+
"装备清退出库"
+
",等待"
+
deviceRepelDetail
.
getReceiveUnit
()+
"接收"
,
userId
);
devLogAdd
(
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()),
deviceRepelDetail
.
getSendUnit
()+
"装备清退出库"
+
",等待"
+
deviceRepelDetail
.
getReceiveUnit
()+
"接收"
,
userId
);
orderOutDataRepelDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()));
orderOutDataRepelDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()));
//把一些字段填写到对象中,保存入库
//把一些字段填写到对象中,保存入库
...
@@ -466,31 +542,26 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -466,31 +542,26 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
//否 状态改为入库待补充文件
//否 状态改为入库待补充文件
//修改统计表中的数据信息 状态
//修改统计表中的数据信息 状态
User
user
=
userService
.
findByUser
(
storageDeviceRepel
.
getUserId
());
User
user
=
userService
.
findByUser
(
storageDeviceRepel
.
getUserId
());
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
List
<
RepelDeviceUnit
>
list
=
new
ArrayList
<>();
List
<
RepelDeviceUnit
>
list
=
new
ArrayList
<>();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
if
(
storageDeviceRepel
.
getUserBName
()!=
null
)
{
if
(
storageDeviceRepel
.
getUserBName
()!=
null
)
{
deviceRepelDetail
.
setReceiveUserB
(
storageDeviceRepel
.
getUserBName
());
deviceRepelDetail
.
setReceiveUserB
(
storageDeviceRepel
.
getUserBName
());
}
}
if
(
storageDeviceRepel
.
getUserB
()!=
null
){
if
(
storageDeviceRepel
.
getUserB
()!=
null
){
deviceRepelDetail
.
setReceiveUserbId
(
storageDeviceRepel
.
getUserB
());
deviceRepelDetail
.
setReceiveUserbId
(
storageDeviceRepel
.
getUserB
());
}
}
if
(
storageDeviceRepel
.
getUserA
()!=
null
){
if
(
storageDeviceRepel
.
getUserA
()!=
null
){
deviceRepelDetail
.
setReceiveUseraId
(
storageDeviceRepel
.
getUserA
());
deviceRepelDetail
.
setReceiveUseraId
(
storageDeviceRepel
.
getUserA
());
}
}
if
(
storageDeviceRepel
.
getUserAName
()!=
null
)
{
if
(
storageDeviceRepel
.
getUserAName
()!=
null
)
{
deviceRepelDetail
.
setReceiveUserA
(
storageDeviceRepel
.
getUserAName
());
deviceRepelDetail
.
setReceiveUserA
(
storageDeviceRepel
.
getUserAName
());
}
}
if
(
storageDeviceRepel
.
getSenderId
()!=
null
)
{
deviceRepelDetail
.
setSendUserbId
(
storageDeviceRepel
.
getSenderId
());
if
(
storageDeviceRepel
.
getSenderId
()!=
null
)
{
}
deviceRepelDetail
.
setSendUserbId
(
storageDeviceRepel
.
getSenderId
());
}
if
(
storageDeviceRepel
.
getSenderName
()!=
null
)
{
if
(
storageDeviceRepel
.
getSenderName
()!=
null
)
{
deviceRepelDetail
.
setSenderUserB
(
storageDeviceRepel
.
getSenderName
());
deviceRepelDetail
.
setSenderUserB
(
storageDeviceRepel
.
getSenderName
());
...
@@ -595,9 +666,12 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -595,9 +666,12 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
log
.
info
(
"更新数据装备以及所属单位-{}"
,
libraries
.
size
());
log
.
info
(
"更新数据装备以及所属单位-{}"
,
libraries
.
size
());
long
time
=
System
.
currentTimeMillis
();
long
time
=
System
.
currentTimeMillis
();
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
filterTypeReturnLeftStatus
(
deviceRepel
.
getType
()),
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
if
(
units
.
getLevel
()==
2
){
log
.
info
(
"更新数据装备以及所属单位{}"
,
System
.
currentTimeMillis
()-
time
);
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
SEND_BACK
.
id
,
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
}
else
{
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
filterTypeReturnLeftStatus
(
deviceRepel
.
getType
()),
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
log
.
info
(
"更新数据装备以及所属单位{}"
,
System
.
currentTimeMillis
()
-
time
);
}
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
repelTaskStatistical
.
setTaskStatus
(
1
);
repelTaskStatistical
.
setTaskStatus
(
1
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
...
@@ -639,7 +713,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -639,7 +713,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
taskService
.
moveToEnd
(
taskService
.
get
(
taskId
));
taskService
.
moveToEnd
(
taskService
.
get
(
taskId
));
}
}
@Override
@Override
public
void
receipts
(
StorageDeviceRepel
storageDeviceRepel
)
{
public
void
receipts
(
StorageDeviceRepel
storageDeviceRepel
)
{
TaskBto
taskBto
=
taskService
.
get
(
storageDeviceRepel
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
storageDeviceRepel
.
getTaskId
());
...
@@ -674,6 +747,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -674,6 +747,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
}
}
@Override
@Override
public
void
addSendBUser
(
StorageDeviceRepel
storageDeviceRepel
)
{
public
void
addSendBUser
(
StorageDeviceRepel
storageDeviceRepel
)
{
TaskBto
taskBto
=
taskService
.
get
(
storageDeviceRepel
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
storageDeviceRepel
.
getTaskId
());
...
@@ -681,7 +755,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -681,7 +755,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
deviceRepelDetail
.
setSenderUserB
(
storageDeviceRepel
.
getUserBName
());
deviceRepelDetail
.
setSenderUserB
(
storageDeviceRepel
.
getUserBName
());
deviceRepelDetail
.
setSendUserbId
(
storageDeviceRepel
.
getUserB
());
deviceRepelDetail
.
setSendUserbId
(
storageDeviceRepel
.
getUserB
());
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"选择了你为签发人请阅知"
,
new
ArrayList
<>(
storageDeviceRepel
.
getUserB
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"选择了你为签发人请阅知"
,
new
ArrayList
<>(
storageDeviceRepel
.
getUserB
())));
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
}
}
...
@@ -831,6 +904,19 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -831,6 +904,19 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1203
.
id
,
title
+
"省本级"
,
parentTaskId
,
"."
,
repelDetailId
,
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
0
,
""
,
list
));
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1203
.
id
,
title
+
"省本级"
,
parentTaskId
,
"."
,
repelDetailId
,
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
0
,
""
,
list
));
}
}
/**
* 市本级任务 16
* @param unitId
* @param repelDetailId
* @param parentTaskId
* @return
*/
private
TaskBto
cityDeclaredTask
(
Integer
unitId
,
Integer
repelDetailId
,
Integer
parentTaskId
,
String
title
){
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
0
);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1216
.
id
,
title
+
"市本级清退任务"
,
parentTaskId
,
"."
,
repelDetailId
,
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
0
,
""
,
list
));
}
/**
/**
* 省出库中办 16
* 省出库中办 16
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
6d3dfc57
...
@@ -19,6 +19,7 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
...
@@ -19,6 +19,7 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.DeviceLifeStatus
;
import
com.tykj.dev.misc.base.DeviceLifeStatus
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -77,7 +78,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -77,7 +78,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
@Override
@Override
public
DeviceRepel
findDeviceRepel
(
Integer
taskId
)
{
public
DeviceRepel
findDeviceRepel
(
Integer
taskId
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
if
(
taskBto
.
getBusinessType
()==
18
){
if
(
taskBto
.
getBusinessType
()==
BusinessEnum
.
SEND_BACK_STATISTICAL
.
id
){
return
deviceRepelService
.
findDeviceRepel
(
taskBto
.
getBillId
());
return
deviceRepelService
.
findDeviceRepel
(
taskBto
.
getBillId
());
}
}
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetailNoDev
(
taskBto
.
getBillId
());
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetailNoDev
(
taskBto
.
getBillId
());
...
@@ -89,26 +90,53 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -89,26 +90,53 @@ public class RepelQueryServiceImpl implements RepelQueryService {
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibrariesAbnormal
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibrariesAbnormal
=
new
ArrayList
<>();
Units
units
=
unitsService
.
findById
(
unitId
);
Units
units
=
unitsService
.
findById
(
unitId
);
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
fielding
,
units
.
getName
()).
stream
()
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetail
(
taskService
.
get
(
taskId
).
getBillId
());
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPEL
.
id
)
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
if
(
deviceRepel
.
getType
()==
0
)
{
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
fielding
,
units
.
getName
()).
stream
()
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPEL
.
id
)
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
deviceLibrary
->
{
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
())){
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
if
(
deviceLibrary
.
getLifeStatus
()==
2
||
deviceLibrary
.
getLifeStatus
()==
15
||
deviceLibrary
.
getLifeStatus
()==
14
||
deviceLibrary
.
getLifeStatus
()==
6
)
{
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
deviceLibraries
.
add
(
deviceLibrary
);
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
}
else
{
deviceLibrary
->
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
15
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
deviceLibraries
.
add
(
deviceLibrary
);
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
}
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
}
}
}
}
else
{
);
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
}
else
{
}
deviceLibraryDao
.
findAllBySeqNumberIn
(
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
())).
stream
()
}
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
);
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPEL
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
.
filter
(
deviceLibrary
->
deviceLibrary
.
getOwnUnit
().
equals
(
units
.
getName
()))
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
deviceLibrary
->
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
15
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
deviceLibraries
.
add
(
deviceLibrary
);
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
}
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
}
}
);
}
int
isNotSub
=
1
;
int
isNotSub
=
1
;
if
(
units
.
getLevel
()==
2
)
{
if
(
units
.
getLevel
()==
2
)
{
TaskBto
taskBto
=
taskService
.
findFatherIdAndCustomInfo
(
taskId
);
TaskBto
taskBto
=
taskService
.
findFatherIdAndCustomInfo
(
taskId
);
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/controller/UserController.java
浏览文件 @
6d3dfc57
...
@@ -122,22 +122,12 @@ public class UserController {
...
@@ -122,22 +122,12 @@ public class UserController {
@GetMapping
(
value
=
"/findAll"
)
@GetMapping
(
value
=
"/findAll"
)
@ApiOperation
(
value
=
"所有用户查询接口"
,
notes
=
"成功返回用户对象集合"
)
@ApiOperation
(
value
=
"所有用户查询接口"
,
notes
=
"成功返回用户对象集合"
)
public
ResponseEntity
findAllUser
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
public
ResponseEntity
findAllUser
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
// log.info("当前登入对象:{}",securityUser.getCurrentUserInfo().getUsername());
return
ResponseEntity
.
ok
(
userService
.
findAll
());
return
ResponseEntity
.
ok
(
userService
.
findAll
());
}
}
// @GetMapping(value = "/findAll/{userId}")
// @ApiOperation(value = "根据用户id查询同级用户信息", notes = "成功返回用户对象集合")
// public ResponseEntity findAll(@ApiIgnore @AuthenticationPrincipal SecurityUser securityUser, @PathVariable Integer userId){
//// log.info("当前登入对象:{}",securityUser.getCurrentUserInfo().getUsername());
// return ResponseEntity.ok(userService.findByUserId(userId));
// }
@GetMapping
(
value
=
"/findAll/{unitsId}"
)
@GetMapping
(
value
=
"/findAll/{unitsId}"
)
@ApiOperation
(
value
=
"根据单位查询用户(下拉)"
,
notes
=
"成功返回用户对象集合"
)
@ApiOperation
(
value
=
"根据单位查询用户(下拉)"
,
notes
=
"成功返回用户对象集合"
)
public
ResponseEntity
findAll2
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
,
@PathVariable
Integer
unitsId
)
{
public
ResponseEntity
findAll2
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
,
@PathVariable
Integer
unitsId
)
{
// log.info("当前登入对象:{}",securityUser.getCurrentUserInfo().getUsername());
return
ResponseEntity
.
ok
(
userService
.
findByUniteId
(
unitsId
));
return
ResponseEntity
.
ok
(
userService
.
findByUniteId
(
unitsId
));
}
}
...
@@ -154,7 +144,6 @@ public class UserController {
...
@@ -154,7 +144,6 @@ public class UserController {
return
ResponseEntity
.
ok
(
userService
.
findByUserId
(
userId
));
return
ResponseEntity
.
ok
(
userService
.
findByUserId
(
userId
));
}
}
@PostMapping
(
value
=
"/archives/update/password"
)
@PostMapping
(
value
=
"/archives/update/password"
)
@ApiOperation
(
value
=
"修改用户密码"
,
notes
=
"返回修改结果"
)
@ApiOperation
(
value
=
"修改用户密码"
,
notes
=
"返回修改结果"
)
public
ResponseEntity
updatePassword
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
,
@RequestBody
UserUpdatePw
userUpdatePw
)
{
public
ResponseEntity
updatePassword
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
,
@RequestBody
UserUpdatePw
userUpdatePw
)
{
...
@@ -169,13 +158,6 @@ public class UserController {
...
@@ -169,13 +158,6 @@ public class UserController {
return
ResponseEntity
.
ok
(
"修改密码成功"
);
return
ResponseEntity
.
ok
(
"修改密码成功"
);
}
}
// @GetMapping(value = "/get/train/{userId}")
// @ApiOperation(value = "根据用户id查询下级用户列表", notes = "成功返回UserTrainVo对象集合")
// public ResponseEntity getFind(@ApiIgnore @AuthenticationPrincipal SecurityUser securityUser, @PathVariable Integer userId) {
//
// return ResponseEntity.ok(userService.findByIdUserTarinVo(userId));
// }
@GetMapping
(
value
=
"/get/trainUnits/{userId}"
)
@GetMapping
(
value
=
"/get/trainUnits/{userId}"
)
@ApiOperation
(
value
=
"根据用户id查询下级单位列表"
,
notes
=
"成功返回UnitsTrainVo对象集合"
)
@ApiOperation
(
value
=
"根据用户id查询下级单位列表"
,
notes
=
"成功返回UnitsTrainVo对象集合"
)
public
ResponseEntity
getFindTrainVo
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
,
@PathVariable
Integer
userId
)
{
public
ResponseEntity
getFindTrainVo
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
,
@PathVariable
Integer
userId
)
{
...
@@ -190,13 +172,6 @@ public class UserController {
...
@@ -190,13 +172,6 @@ public class UserController {
return
ResponseEntity
.
ok
(
userService
.
findById
(
userId
));
return
ResponseEntity
.
ok
(
userService
.
findById
(
userId
));
}
}
// @PostMapping(value = "/update")
// @ApiOperation(value = "修改用户信息", notes = "成功返回UnitsTrainVo对象集合")
// public ResponseEntity getFindMemberThatVo(@ApiIgnore @AuthenticationPrincipal SecurityUser securityUser, @RequestBody MemberThat memberThat){
// userService.update(memberThat.toUserVo());
// return ResponseEntity.ok(memberThat);
// }
@GetMapping
(
"/findAll/superiorList"
)
@GetMapping
(
"/findAll/superiorList"
)
@ApiOperation
(
value
=
"根据用户ID查询上级单位用户"
,
notes
=
"List<UserSuperiorVo>"
)
@ApiOperation
(
value
=
"根据用户ID查询上级单位用户"
,
notes
=
"List<UserSuperiorVo>"
)
public
ResponseEntity
getFindMemberThatVo
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
public
ResponseEntity
getFindMemberThatVo
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
...
@@ -250,7 +225,6 @@ public class UserController {
...
@@ -250,7 +225,6 @@ public class UserController {
@PostMapping
(
"/list/unitName"
)
@PostMapping
(
"/list/unitName"
)
@ApiOperation
(
value
=
"根据单位名称查询单位用户"
)
@ApiOperation
(
value
=
"根据单位名称查询单位用户"
)
public
ResponseEntity
findUnitName
(
@RequestBody
UnitNameVo
unitNameVo
){
public
ResponseEntity
findUnitName
(
@RequestBody
UnitNameVo
unitNameVo
){
return
ResponseEntity
.
ok
(
userService
.
findUnitNameListUser
(
unitNameVo
));
return
ResponseEntity
.
ok
(
userService
.
findUnitNameListUser
(
unitNameVo
));
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论