Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
1aa93a7f
提交
1aa93a7f
authored
12月 10, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(配发模块,用户使用报告,维修模块): 修改省的判断条件
修改省的判断条件
上级
d86f1bba
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
42 行增加
和
15 行删除
+42
-15
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+10
-1
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+10
-1
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+18
-11
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+4
-2
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
1aa93a7f
...
@@ -24,9 +24,11 @@ import com.tykj.dev.device.task.service.TaskLogService;
...
@@ -24,9 +24,11 @@ import com.tykj.dev.device.task.service.TaskLogService;
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.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.AreaService
;
import
com.tykj.dev.device.user.subject.service.AreaService
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
...
@@ -128,6 +130,9 @@ public class AllotBillController {
...
@@ -128,6 +130,9 @@ public class AllotBillController {
@Autowired
@Autowired
private
PackingController
packingController
;
private
PackingController
packingController
;
@Autowired
private
UnitsCache
unitsCache
;
@ApiOperation
(
value
=
"导入二维码获取配发装备"
,
notes
=
"可以通过这个接口导入二维码获取配发装备"
)
@ApiOperation
(
value
=
"导入二维码获取配发装备"
,
notes
=
"可以通过这个接口导入二维码获取配发装备"
)
@PostMapping
(
value
=
"/load"
)
@PostMapping
(
value
=
"/load"
)
public
ResponseEntity
loadDevice
(
@RequestBody
RfidVo
rfidVo
)
{
public
ResponseEntity
loadDevice
(
@RequestBody
RfidVo
rfidVo
)
{
...
@@ -298,7 +303,11 @@ public class AllotBillController {
...
@@ -298,7 +303,11 @@ public class AllotBillController {
Map
<
Integer
,
Integer
>
changeMap
=
new
HashMap
<>();
Map
<
Integer
,
Integer
>
changeMap
=
new
HashMap
<>();
Map
<
String
,
PackingLibrary
>
packingLibraryHashMap
=
new
HashMap
<>();
Map
<
String
,
PackingLibrary
>
packingLibraryHashMap
=
new
HashMap
<>();
if
(
unitsService
.
findbyName
(
allotBillSaveVo
.
getSendUnit
()).
getLevel
()
==
1
)
{
// if (unitsService.findbyName(allotBillSaveVo.getSendUnit()).getLevel() == 1) {
// createPacking(strings, allotBillSaveVo, packingLibraryHashMap);
// }
Units
units
=
unitsCache
.
findById
(
allotBillSaveVo
.
getSendUnitId
());
if
(
units
.
getLevel
()
==
1
&&
units
.
getType
()
==
1
)
{
createPacking
(
strings
,
allotBillSaveVo
,
packingLibraryHashMap
);
createPacking
(
strings
,
allotBillSaveVo
,
packingLibraryHashMap
);
}
}
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
1aa93a7f
...
@@ -25,9 +25,12 @@ import com.tykj.dev.device.task.service.TaskService;
...
@@ -25,9 +25,12 @@ 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.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.cache.UserCache
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
...
@@ -121,6 +124,9 @@ public class DeviceApplyController {
...
@@ -121,6 +124,9 @@ public class DeviceApplyController {
@Qualifier
(
"taskExecutor"
)
@Qualifier
(
"taskExecutor"
)
private
Executor
executor
;
private
Executor
executor
;
@Autowired
private
UnitsCache
unitsCache
;
// @Autowired
// @Autowired
// private DeviceLibraryDao deviceLibraryDao;
// private DeviceLibraryDao deviceLibraryDao;
...
@@ -160,7 +166,10 @@ public class DeviceApplyController {
...
@@ -160,7 +166,10 @@ public class DeviceApplyController {
default
:
default
:
title
=
"装备申请"
;
title
=
"装备申请"
;
}
}
if
(
userUtils
.
getCurrentUnitLevel
()==
1
){
// if (userUtils.getCurrentUnitLevel()==1){
Integer
currentUnitLevel
=
userUtils
.
getCurrentUnitLevel
();
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
if
(
units
.
getLevel
()==
1
&&
units
.
getType
()
==
1
){
//如果是省 等待中办 设置状态为3
//如果是省 等待中办 设置状态为3
deviceApplyBillEntity
.
setApplyStatus
(
3
);
deviceApplyBillEntity
.
setApplyStatus
(
3
);
deviceApplyBillService
.
update
(
deviceApplyBillEntity
);
deviceApplyBillService
.
update
(
deviceApplyBillEntity
);
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
1aa93a7f
...
@@ -193,6 +193,7 @@ public class RepairController {
...
@@ -193,6 +193,7 @@ public class RepairController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
saveRepairBill
(
@RequestBody
RepairBillSaveVo
repairBillSaveVo
)
{
public
ResponseEntity
saveRepairBill
(
@RequestBody
RepairBillSaveVo
repairBillSaveVo
)
{
Integer
currentUnitLevel
=
userUtils
.
getCurrentUnitLevel
();
Integer
currentUnitLevel
=
userUtils
.
getCurrentUnitLevel
();
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
//判断装备的状态是否在库或维修中
//判断装备的状态是否在库或维修中
deviceLibraryService
.
isInStockOrRepairing
(
StringSplitUtil
.
split
(
repairBillSaveVo
.
getRepairDeviceCheckDetail
()));
deviceLibraryService
.
isInStockOrRepairing
(
StringSplitUtil
.
split
(
repairBillSaveVo
.
getRepairDeviceCheckDetail
()));
//第一次保存
//第一次保存
...
@@ -232,7 +233,7 @@ public class RepairController {
...
@@ -232,7 +233,7 @@ public class RepairController {
// TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_SEND_DRAFT.id, "["+repairBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(repairBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "共有" + repairBillSaveVo.getSendingCount() + "件",null, ".", repairBill1.getId(), 5, userUtils.getCurrentUnitId(), 0, null, userIds);
// TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_SEND_DRAFT.id, "["+repairBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(repairBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "共有" + repairBillSaveVo.getSendingCount() + "件",null, ".", repairBill1.getId(), 5, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
REPAIR_SEND_DRAFT
.
id
,
"["
+
DeviceModelSort
.
unitNameToDisName
(
repairBillSaveVo
.
getReceiveUnit
())
+
"]型号"
+
StringSplitUtil
.
stringListToString
(
repairBillSaveVo
.
getScriptSaveVos
().
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))
+
"共有"
+
repairBillSaveVo
.
getSendingCount
()
+
"件"
,
null
,
"."
,
repairBill1
.
getId
(),
5
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
REPAIR_SEND_DRAFT
.
id
,
"["
+
DeviceModelSort
.
unitNameToDisName
(
repairBillSaveVo
.
getReceiveUnit
())
+
"]型号"
+
StringSplitUtil
.
stringListToString
(
repairBillSaveVo
.
getScriptSaveVos
().
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))
+
"共有"
+
repairBillSaveVo
.
getSendingCount
()
+
"件"
,
null
,
"."
,
repairBill1
.
getId
(),
5
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
//如果是省发起的维修
//如果是省发起的维修
if
(
currentUnitLevel
==
1
){
if
(
currentUnitLevel
==
1
&&
units
.
getType
()
==
1
){
taskBto
.
setCustomInfo
(
"country"
);
taskBto
.
setCustomInfo
(
"country"
);
}
}
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
...
@@ -340,6 +341,7 @@ public class RepairController {
...
@@ -340,6 +341,7 @@ public class RepairController {
}
}
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
//添加维修单和送修单
//添加维修单和送修单
RepairBill
repairBill
;
RepairBill
repairBill
;
RepairSendBill
deviceRepairSendBillEntity
;
RepairSendBill
deviceRepairSendBillEntity
;
...
@@ -362,7 +364,7 @@ public class RepairController {
...
@@ -362,7 +364,7 @@ public class RepairController {
deviceRepairSendBillEntity
.
setScriptJson
(
JacksonUtil
.
toJSon
(
repairBillSaveVo
.
getScriptSaveVos
()));
deviceRepairSendBillEntity
.
setScriptJson
(
JacksonUtil
.
toJSon
(
repairBillSaveVo
.
getScriptSaveVos
()));
}
}
//如果当前为省向国家发起的
//如果当前为省向国家发起的
if
(
level
==
1
)
{
if
(
level
==
1
&&
units
.
getType
()
==
1
)
{
repairBill
.
setRepairStatus
(
4
);
//维修中
repairBill
.
setRepairStatus
(
4
);
//维修中
deviceRepairSendBillEntity
.
setRepairStatus
(
5
);
//维修中
deviceRepairSendBillEntity
.
setRepairStatus
(
5
);
//维修中
}
else
{
}
else
{
...
@@ -967,6 +969,7 @@ public class RepairController {
...
@@ -967,6 +969,7 @@ public class RepairController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
saveRepairBackBill
(
@RequestBody
RepairBackBillSaveVo
repairBackBillSaveVo
)
{
public
ResponseEntity
saveRepairBackBill
(
@RequestBody
RepairBackBillSaveVo
repairBackBillSaveVo
)
{
Integer
currentUnitLevel
=
userUtils
.
getCurrentUnitLevel
();
Integer
currentUnitLevel
=
userUtils
.
getCurrentUnitLevel
();
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
//第一次保存
//第一次保存
if
(
repairBackBillSaveVo
.
getTaskId
()
==
null
)
{
if
(
repairBackBillSaveVo
.
getTaskId
()
==
null
)
{
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
...
@@ -988,7 +991,7 @@ public class RepairController {
...
@@ -988,7 +991,7 @@ public class RepairController {
//发起任务
//发起任务
// TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_BACK_DRAFT.id, "["+repairBackBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + repairBackBillSaveVo.getScriptSaveVos().get(0).getModel() + "共有" + repairBackBillSaveVo.getSendingCount() + "件至", null, ".", repairBackBill1.getId(), BusinessEnum.REPAIR_BACK.id, userUtils.getCurrentUnitId(), 0, null, userIds);
// TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_BACK_DRAFT.id, "["+repairBackBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + repairBackBillSaveVo.getScriptSaveVos().get(0).getModel() + "共有" + repairBackBillSaveVo.getSendingCount() + "件至", null, ".", repairBackBill1.getId(), BusinessEnum.REPAIR_BACK.id, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
REPAIR_BACK_DRAFT
.
id
,
"["
+
DeviceModelSort
.
unitNameToDisName
(
repairBackBillSaveVo
.
getReceiveUnit
())
+
"]型号"
+
repairBackBillSaveVo
.
getScriptSaveVos
().
get
(
0
).
getModel
()
+
"共有"
+
repairBackBillSaveVo
.
getSendingCount
()
+
"件至"
,
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
REPAIR_BACK_DRAFT
.
id
,
"["
+
DeviceModelSort
.
unitNameToDisName
(
repairBackBillSaveVo
.
getReceiveUnit
())
+
"]型号"
+
repairBackBillSaveVo
.
getScriptSaveVos
().
get
(
0
).
getModel
()
+
"共有"
+
repairBackBillSaveVo
.
getSendingCount
()
+
"件至"
,
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
if
(
currentUnitLevel
==
1
){
if
(
currentUnitLevel
==
1
&&
units
.
getType
()
==
1
){
taskBto
.
setCustomInfo
(
"country"
);
taskBto
.
setCustomInfo
(
"country"
);
}
}
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
...
@@ -1973,9 +1976,9 @@ public class RepairController {
...
@@ -1973,9 +1976,9 @@ public class RepairController {
//已领取装备
//已领取装备
else
if
(
type
==
4
)
{
else
if
(
type
==
4
)
{
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
String
currentUserUnitName
=
userUtils
.
getCurrentUserUnitName
(
);
Units
units1
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
()
);
List
<
RepairDetail
>
repairDetails
;
List
<
RepairDetail
>
repairDetails
;
if
(
level
==
1
)
{
if
(
level
==
1
&&
units1
.
getType
()
==
1
)
{
repairDetails
=
repairDetailDao
.
findAllByRepairStatus
(
5
,
repairTaskSelectVo
.
getPageable
().
getSort
());
repairDetails
=
repairDetailDao
.
findAllByRepairStatus
(
5
,
repairTaskSelectVo
.
getPageable
().
getSort
());
}
else
if
(
level
==
2
)
{
}
else
if
(
level
==
2
)
{
...
@@ -2035,8 +2038,9 @@ public class RepairController {
...
@@ -2035,8 +2038,9 @@ public class RepairController {
//已报废装备
//已报废装备
else
if
(
type
==
5
)
{
else
if
(
type
==
5
)
{
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
List
<
RepairDetail
>
repairDetails
;
List
<
RepairDetail
>
repairDetails
;
if
(
level
==
1
)
{
if
(
level
==
1
&&
units
.
getType
()
==
1
)
{
repairDetails
=
repairDetailDao
.
findAllByRepairStatus
(
4
,
repairTaskSelectVo
.
getPageable
().
getSort
());
repairDetails
=
repairDetailDao
.
findAllByRepairStatus
(
4
,
repairTaskSelectVo
.
getPageable
().
getSort
());
}
else
{
}
else
{
throw
new
ApiException
(
"区县没有维修完成列表"
);
throw
new
ApiException
(
"区县没有维修完成列表"
);
...
@@ -2116,9 +2120,10 @@ public class RepairController {
...
@@ -2116,9 +2120,10 @@ public class RepairController {
@PostMapping
(
value
=
"/uploadRecord"
)
@PostMapping
(
value
=
"/uploadRecord"
)
public
ResponseEntity
uploadRecord
(
@RequestBody
RepairRecord
repairRecord
)
{
public
ResponseEntity
uploadRecord
(
@RequestBody
RepairRecord
repairRecord
)
{
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
// RepairDetail repairDetail = deviceRepairDetailService.getOne(repairRecord.getId());
// RepairDetail repairDetail = deviceRepairDetailService.getOne(repairRecord.getId());
//省市县三种备注
//省市县三种备注
if
(
level
==
1
)
{
if
(
level
==
1
&&
units
.
getType
()
==
2
)
{
// repairDetail.setRecord(repairRecord.getRecord());
// repairDetail.setRecord(repairRecord.getRecord());
repairDetailDao
.
updateRecord
(
repairRecord
.
getRecord
(),
repairRecord
.
getId
());
repairDetailDao
.
updateRecord
(
repairRecord
.
getRecord
(),
repairRecord
.
getId
());
}
else
if
(
level
==
2
)
{
}
else
if
(
level
==
2
)
{
...
@@ -2829,6 +2834,7 @@ public class RepairController {
...
@@ -2829,6 +2834,7 @@ public class RepairController {
}
}
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Integer
level
=
userUtils
.
getCurrentUnitLevel
();
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
//添加维修单和送修单
//添加维修单和送修单
RepairBill
repairBill
=
null
;
RepairBill
repairBill
=
null
;
RepairSendBill
deviceRepairSendBillEntity
=
null
;
RepairSendBill
deviceRepairSendBillEntity
=
null
;
...
@@ -2959,7 +2965,7 @@ public class RepairController {
...
@@ -2959,7 +2965,7 @@ public class RepairController {
//当前单位其他专管员id集合
//当前单位其他专管员id集合
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
//省向国家发起的
//省向国家发起的
if
(
level
==
1
)
{
if
(
level
==
1
&&
units
.
getType
()
==
1
)
{
ownUnit
=
userUtils
.
getCurrentUnitId
();
ownUnit
=
userUtils
.
getCurrentUnitId
();
//直接发起的
//直接发起的
if
(
repairBillSaveVo
.
getTaskId
()
==
null
)
{
if
(
repairBillSaveVo
.
getTaskId
()
==
null
)
{
...
@@ -3026,7 +3032,7 @@ public class RepairController {
...
@@ -3026,7 +3032,7 @@ public class RepairController {
deviceRepairDetailService
.
save
(
repairDetail
);
deviceRepairDetailService
.
save
(
repairDetail
);
}
}
//如果当前为省像国家发起的
//如果当前为省像国家发起的
if
(
level
==
1
)
{
if
(
level
==
1
&&
units
.
getType
()
==
2
)
{
deviceLibraryEntity
.
setLifeStatus
(
4
);
deviceLibraryEntity
.
setLifeStatus
(
4
);
deviceLibraryEntity
.
setLocationUnit
(
repairBillSaveVo
.
getReceiveUnit
());
deviceLibraryEntity
.
setLocationUnit
(
repairBillSaveVo
.
getReceiveUnit
());
}
}
...
@@ -3041,7 +3047,7 @@ public class RepairController {
...
@@ -3041,7 +3047,7 @@ public class RepairController {
String
deviceIdDetail
=
deviceRepairSendBillEntity
.
getRepairDeviceCheckDetail
();
String
deviceIdDetail
=
deviceRepairSendBillEntity
.
getRepairDeviceCheckDetail
();
List
<
Integer
>
idList
=
StringSplitUtil
.
split
(
deviceIdDetail
);
List
<
Integer
>
idList
=
StringSplitUtil
.
split
(
deviceIdDetail
);
//如果当前为省,改变装备的所在为中办
//如果当前为省,改变装备的所在为中办
if
(
level
==
1
)
{
if
(
level
==
1
&&
units
.
getType
()
==
1
)
{
//获取当前业务维修详情 记录
//获取当前业务维修详情 记录
List
<
RepairDetail
>
repairDetailEntities
=
deviceRepairDetailService
.
findByBillId
(
repairBill
.
getId
());
List
<
RepairDetail
>
repairDetailEntities
=
deviceRepairDetailService
.
findByBillId
(
repairBill
.
getId
());
//改变维修详情装备所在单位为中办,状态为维修中
//改变维修详情装备所在单位为中办,状态为维修中
...
@@ -3205,6 +3211,7 @@ public class RepairController {
...
@@ -3205,6 +3211,7 @@ public class RepairController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
saveRepairUnderBill
(
@RequestBody
RepairBillSaveVo
repairBillSaveVo
)
{
public
ResponseEntity
saveRepairUnderBill
(
@RequestBody
RepairBillSaveVo
repairBillSaveVo
)
{
Integer
currentUnitLevel
=
userUtils
.
getCurrentUnitLevel
();
Integer
currentUnitLevel
=
userUtils
.
getCurrentUnitLevel
();
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
//判断装备的状态是否在库或维修中
//判断装备的状态是否在库或维修中
deviceLibraryService
.
isInStockOrRepairing
(
StringSplitUtil
.
split
(
repairBillSaveVo
.
getRepairDeviceCheckDetail
()));
deviceLibraryService
.
isInStockOrRepairing
(
StringSplitUtil
.
split
(
repairBillSaveVo
.
getRepairDeviceCheckDetail
()));
//第一次保存
//第一次保存
...
@@ -3255,7 +3262,7 @@ public class RepairController {
...
@@ -3255,7 +3262,7 @@ public class RepairController {
+
"共有"
+
repairBillSaveVo
.
getSendingCount
()
+
"件"
,
null
,
"."
,
+
"共有"
+
repairBillSaveVo
.
getSendingCount
()
+
"件"
,
null
,
"."
,
repairBill1
.
getId
(),
5
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
repairBill1
.
getId
(),
5
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
//如果是省发起的维修
//如果是省发起的维修
if
(
currentUnitLevel
==
1
){
if
(
currentUnitLevel
==
1
&&
units
.
getType
()
==
1
){
taskBto
.
setCustomInfo
(
"country1"
);
taskBto
.
setCustomInfo
(
"country1"
);
}
}
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
1aa93a7f
...
@@ -28,6 +28,7 @@ import com.tykj.dev.device.sendback.service.RepelQueryService;
...
@@ -28,6 +28,7 @@ import com.tykj.dev.device.sendback.service.RepelQueryService;
import
com.tykj.dev.device.storage.repository.StorageBillDao
;
import
com.tykj.dev.device.storage.repository.StorageBillDao
;
import
com.tykj.dev.device.storage.subject.domin.StorageBill
;
import
com.tykj.dev.device.storage.subject.domin.StorageBill
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
...
@@ -351,6 +352,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -351,6 +352,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
int
decommissioningStatisticsNum
=
0
;
//退役
int
decommissioningStatisticsNum
=
0
;
//退役
int
toRepairBackNum
=
0
;
//向下级进行维修退回
int
toRepairBackNum
=
0
;
//向下级进行维修退回
int
toRepairNum
=
0
;
// 接收下级单位维修
int
toRepairNum
=
0
;
// 接收下级单位维修
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
());
//筛选出日期范围内所有入库账单
//筛选出日期范围内所有入库账单
List
<
StorageBill
>
storageBillEntities
=
storageBillDao
.
findAll
().
stream
()
List
<
StorageBill
>
storageBillEntities
=
storageBillDao
.
findAll
().
stream
()
.
filter
(
storageBillEntity
->
storageBillEntity
.
getStorageStatus
()
==
2
&&
userUtils
.
getCurrentUserUnitName
().
equals
(
userPublicService
.
findUnitsNameByUserId
(
storageBillEntity
.
getReceiveUseraId
()))
&&
storageBillEntity
.
getUpdateTime
().
after
(
date
)
&&
storageBillEntity
.
getUpdateTime
().
before
(
date2
))
.
filter
(
storageBillEntity
->
storageBillEntity
.
getStorageStatus
()
==
2
&&
userUtils
.
getCurrentUserUnitName
().
equals
(
userPublicService
.
findUnitsNameByUserId
(
storageBillEntity
.
getReceiveUseraId
()))
&&
storageBillEntity
.
getUpdateTime
().
after
(
date
)
&&
storageBillEntity
.
getUpdateTime
().
before
(
date2
))
...
@@ -419,7 +421,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -419,7 +421,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
}
}
}
}
//筛选出配接收退回的账单 接收退回
//筛选出配接收退回的账单 接收退回
if
(
userUtils
.
getCurrentUnitLevel
()
!=
1
){
if
(
userUtils
.
getCurrentUnitLevel
()
!=
1
&&
units
.
getType
()
==
1
){
//发起退回
//发起退回
// List<AllotBackBill> sendAllotBackBills = allotBackBillDao.findAll().stream()
// List<AllotBackBill> sendAllotBackBills = allotBackBillDao.findAll().stream()
// .filter(allotBackBill -> allotStatusBackList.contains(allotBackBill.getBackStatus()) && userUtils.getCurrentUserUnitName().equals(allotBackBill.getSendUnit()) && allotBackBill.getSendTime().after(date) && allotBackBill.getSendTime().before(date2))
// .filter(allotBackBill -> allotStatusBackList.contains(allotBackBill.getBackStatus()) && userUtils.getCurrentUserUnitName().equals(allotBackBill.getSendUnit()) && allotBackBill.getSendTime().after(date) && allotBackBill.getSendTime().before(date2))
...
@@ -441,7 +443,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -441,7 +443,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
}
}
//省级才能销毁,列装,退装 退役 报废
//省级才能销毁,列装,退装 退役 报废
if
(
userUtils
.
getCurrentUnitLevel
()
==
1
)
{
if
(
userUtils
.
getCurrentUnitLevel
()
==
1
&&
units
.
getType
()
==
1
)
{
//报废
//报废
int
scrapStatisticsCount
=
this
.
getScrapStatisticsCount
(
date
,
date2
);
int
scrapStatisticsCount
=
this
.
getScrapStatisticsCount
(
date
,
date2
);
scrapStatisticsNum
=
scrapStatisticsCount
;
scrapStatisticsNum
=
scrapStatisticsCount
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论