Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
02f56769
提交
02f56769
authored
9月 10, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(维修模块,退回模块,装备模块,日志模块,任务模块): 维修新增省直属发起维修,维修草稿,维修撤回,退回模块新增省直属发起退回,草稿,以及撤回
维修新增省直属发起维修,维修草稿,维修撤回,退回模块新增省直属发起退回,草稿,以及撤回 ,修改装备的所属所在,新增状态
上级
5b77f4e9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
192 行增加
和
18 行删除
+192
-18
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+0
-0
AllotBillSaveVo.java
...com/tykj/dev/device/allot/subject/vo/AllotBillSaveVo.java
+7
-1
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+3
-2
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+0
-0
DeviceLibraryDao.java
.../tykj/dev/device/library/repository/DeviceLibraryDao.java
+5
-0
DeviceLibraryService.java
...tykj/dev/device/library/service/DeviceLibraryService.java
+5
-0
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+5
-0
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+3
-1
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+0
-0
RepairDetailService.java
...m/tykj/dev/device/repair/service/RepairDetailService.java
+6
-0
RepairDetailServiceImpl.java
...v/device/repair/service/impl/RepairDetailServiceImpl.java
+92
-12
ClearRepairVo.java
.../com/tykj/dev/device/repair/subject/vo/ClearRepairVo.java
+24
-0
RepairBillSaveVo.java
...m/tykj/dev/device/repair/subject/vo/RepairBillSaveVo.java
+5
-2
RevokeUnderTask.java
...om/tykj/dev/device/repair/subject/vo/RevokeUnderTask.java
+25
-0
TaskService.java
...in/java/com/tykj/dev/device/task/service/TaskService.java
+7
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+5
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
02f56769
差异被折叠。
点击展开。
dev-allot/src/main/java/com/tykj/dev/device/allot/subject/vo/AllotBillSaveVo.java
浏览文件 @
02f56769
...
@@ -51,14 +51,20 @@ public class AllotBillSaveVo {
...
@@ -51,14 +51,20 @@ public class AllotBillSaveVo {
@ApiModelProperty
(
value
=
"发件方(B岗位)"
)
@ApiModelProperty
(
value
=
"发件方(B岗位)"
)
private
Integer
sendUserbId
;
private
Integer
sendUserbId
;
@ApiModelProperty
(
value
=
"发件经办人id(A岗位)"
)
private
Integer
sendUseraId
;
// @ApiModelProperty(value = "签章审核方")
// @ApiModelProperty(value = "签章审核方")
// private Integer confirmUserId;
// private Integer confirmUserId;
// @NotNull(message = "receiveUseraId不能为空")
// @NotNull(message = "receiveUseraId不能为空")
@Min
(
value
=
1
,
message
=
"receiveUseraId不能小于1"
)
//
@Min(value = 1,message = "receiveUseraId不能小于1")
@ApiModelProperty
(
value
=
"收件方(A岗位)"
)
@ApiModelProperty
(
value
=
"收件方(A岗位)"
)
private
Integer
receiveUseraId
;
private
Integer
receiveUseraId
;
@ApiModelProperty
(
value
=
"收件方审核人id(B岗位)"
)
private
Integer
receiveUserbId
;
// @NotNull(message = "fileName不能为空")
// @NotNull(message = "fileName不能为空")
@ApiModelProperty
(
value
=
"账单文件名"
)
@ApiModelProperty
(
value
=
"账单文件名"
)
private
String
fileName
;
private
String
fileName
;
...
...
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
02f56769
...
@@ -328,6 +328,7 @@ public enum LogType {
...
@@ -328,6 +328,7 @@ public enum LogType {
REPAIR_SEND_19
(
129
,
REPAIR
.
id
,
REPAIR_SEND_WAIT_SIGN
.
id
,
END
.
id
,
"上传相关单据,业务办结"
),
REPAIR_SEND_19
(
129
,
REPAIR
.
id
,
REPAIR_SEND_WAIT_SIGN
.
id
,
END
.
id
,
"上传相关单据,业务办结"
),
REPAIR_SEND_20
(
130
,
REPAIR
.
id
,
REPAIR_SEND_WAIT_SIGN
.
id
,
WAIT_UPLOAD_FILE
.
id
,
"盖电子签章并入库"
),
REPAIR_SEND_20
(
130
,
REPAIR
.
id
,
REPAIR_SEND_WAIT_SIGN
.
id
,
WAIT_UPLOAD_FILE
.
id
,
"盖电子签章并入库"
),
REPAIR_SEND_21
(
131
,
REPAIR
.
id
,
REPAIR_SEND_SIGN_WAIT_CONFIRM
.
id
,
WAIT_RECEIVE
.
id
,
"拒绝电子签章申请"
),
REPAIR_SEND_21
(
131
,
REPAIR
.
id
,
REPAIR_SEND_SIGN_WAIT_CONFIRM
.
id
,
WAIT_RECEIVE
.
id
,
"拒绝电子签章申请"
),
// REPAIR_SEND_22(131,REPAIR.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, WAIT_RECEIVE.id, "拒绝电子签章申请"),
REPAIR_BACK_14
(
132
,
REPAIR
.
id
,
ORIGIN_STATUS
.
id
,
REPAIR_BACK_SIGN_WAIT_CONFIRM
.
id
,
"申请电子签章"
),
REPAIR_BACK_14
(
132
,
REPAIR
.
id
,
ORIGIN_STATUS
.
id
,
REPAIR_BACK_SIGN_WAIT_CONFIRM
.
id
,
"申请电子签章"
),
REPAIR_BACK_16
(
134
,
REPAIR
.
id
,
REPAIR_BACK_SIGN_WAIT_CONFIRM
.
id
,
REPAIR_BACK_DRAFT
.
id
,
"拒绝电子签章申请"
),
REPAIR_BACK_16
(
134
,
REPAIR
.
id
,
REPAIR_BACK_SIGN_WAIT_CONFIRM
.
id
,
REPAIR_BACK_DRAFT
.
id
,
"拒绝电子签章申请"
),
...
@@ -337,7 +338,6 @@ public enum LogType {
...
@@ -337,7 +338,6 @@ public enum LogType {
REPAIR_BACK_19
(
137
,
REPAIR
.
id
,
REPAIR_BACK_WAIT_SIGN
.
id
,
END
.
id
,
"盖电子签章并出库"
),
REPAIR_BACK_19
(
137
,
REPAIR
.
id
,
REPAIR_BACK_WAIT_SIGN
.
id
,
END
.
id
,
"盖电子签章并出库"
),
// REPAIR_BACK_20(138,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_UPLOAD_BACK_FILE.id, "盖电子签章并入库"),
// REPAIR_BACK_20(138,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_UPLOAD_BACK_FILE.id, "盖电子签章并入库"),
REPAIR_BACK_20
(
138
,
REPAIR
.
id
,
REPAIR_BACK_WAIT_SIGN
.
id
,
WAIT_UPLOAD_BACK_FILE
.
id
,
"上传签收单"
),
REPAIR_BACK_20
(
138
,
REPAIR
.
id
,
REPAIR_BACK_WAIT_SIGN
.
id
,
WAIT_UPLOAD_BACK_FILE
.
id
,
"上传签收单"
),
REPAIR_BACK_21
(
139
,
REPAIR
.
id
,
REPAIR_BACK_SIGN_WAIT_CONFIRM
.
id
,
WAIT_BACK_RECEIVE
.
id
,
"拒绝电子签章申请"
),
APPLY_7
(
140
,
APPLY
.
id
,
WAIT_APPLY_FILE
.
id
,
END
.
id
,
"申请不同意,业务办结"
),
APPLY_7
(
140
,
APPLY
.
id
,
WAIT_APPLY_FILE
.
id
,
END
.
id
,
"申请不同意,业务办结"
),
// ALLOT_BACK_16(141,ALLOT_BACK.id, BACK_DRAFT.id, ALLOT_BACKING.id, "从草稿发起退回"),
// ALLOT_BACK_16(141,ALLOT_BACK.id, BACK_DRAFT.id, ALLOT_BACKING.id, "从草稿发起退回"),
...
@@ -372,7 +372,8 @@ public enum LogType {
...
@@ -372,7 +372,8 @@ public enum LogType {
SELF_CHECK_7
(
169
,
SELF_CHECK
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_SELF_CHECK
.
id
,
"待自查任务"
),
SELF_CHECK_7
(
169
,
SELF_CHECK
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_SELF_CHECK
.
id
,
"待自查任务"
),
//[业务操作日志]存储失败:找不到业务类型为+4,旧状态为400,新状态为8888的日志模板
//[业务操作日志]存储失败:找不到业务类型为+4,旧状态为400,新状态为8888的日志模板
SELF_CHECK_8
(
170
,
SELF_CHECK
.
id
,
WAIT_SELF_CHECK
.
id
,
ARCHIVE
.
id
,
"核查结束,系统发起的自查自动结束"
),
SELF_CHECK_8
(
170
,
SELF_CHECK
.
id
,
WAIT_SELF_CHECK
.
id
,
ARCHIVE
.
id
,
"核查结束,系统发起的自查自动结束"
),
;
REPAIR_BACK_21
(
171
,
REPAIR
.
id
,
ORIGIN_STATUS
.
id
,
REPAIR_SEND_UNDER_DRAFT
.
id
,
"省直属等待出库"
),
ALLOT_BACK_21
(
172
,
ALLOT_BACK
.
id
,
ORIGIN_STATUS
.
id
,
BACK_UNDER_DRAFT
.
id
,
"省直属等待出库"
);
public
Integer
id
;
public
Integer
id
;
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
02f56769
差异被折叠。
点击展开。
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryDao.java
浏览文件 @
02f56769
...
@@ -174,5 +174,10 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
...
@@ -174,5 +174,10 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
@Modifying
@Modifying
@Query
(
"update DeviceLibrary d set d.ownUnit = d.locationUnit ,d.lifeStatus = 2 where d.id in :deviceIds"
)
@Query
(
"update DeviceLibrary d set d.ownUnit = d.locationUnit ,d.lifeStatus = 2 where d.id in :deviceIds"
)
int
updateDevicesOwnUnit
(
@Param
(
"deviceIds"
)
List
<
Integer
>
deviceIds
);
int
updateDevicesOwnUnit
(
@Param
(
"deviceIds"
)
List
<
Integer
>
deviceIds
);
@Transactional
@Modifying
@Query
(
"update DeviceLibrary d set d.ownUnit = :ownUnit,d.locationUnit = :ownUnit,d.lifeStatus = 2 where d.id in :deviceIds"
)
int
updateDevicesOwnUnit
(
@Param
(
"ownUnit"
)
String
ownUnit
,
@Param
(
"deviceIds"
)
List
<
Integer
>
deviceIds
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryService.java
浏览文件 @
02f56769
...
@@ -241,4 +241,9 @@ public interface DeviceLibraryService {
...
@@ -241,4 +241,9 @@ public interface DeviceLibraryService {
* @param deviceIds 装备id
* @param deviceIds 装备id
*/
*/
void
updateDevicesOwnUnit
(
List
<
Integer
>
deviceIds
);
void
updateDevicesOwnUnit
(
List
<
Integer
>
deviceIds
);
/**
* @param
*/
void
updateLocalAndOwn
(
String
localUnit
,
List
<
Integer
>
deviceIds
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
02f56769
...
@@ -735,6 +735,11 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -735,6 +735,11 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
deviceLibraryDao
.
updateDevicesOwnUnit
(
deviceIds
);
deviceLibraryDao
.
updateDevicesOwnUnit
(
deviceIds
);
}
}
@Override
public
void
updateLocalAndOwn
(
String
localUnit
,
List
<
Integer
>
deviceIds
)
{
deviceLibraryDao
.
updateDevicesOwnUnit
(
localUnit
,
deviceIds
);
}
@Override
@Override
public
DeviceLibrary
update
(
DeviceLibrary
deviceLibraryEntity
)
{
public
DeviceLibrary
update
(
DeviceLibrary
deviceLibraryEntity
)
{
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
02f56769
...
@@ -272,6 +272,7 @@ public enum StatusEnum {
...
@@ -272,6 +272,7 @@ public enum StatusEnum {
REPAIR_SEND_DRAFT
(
788
,
"等待出库"
),
REPAIR_SEND_DRAFT
(
788
,
"等待出库"
),
REPAIR_SEND_SIGN_WAIT_CONFIRM
(
790
,
"申请签章待审核"
),
REPAIR_SEND_SIGN_WAIT_CONFIRM
(
790
,
"申请签章待审核"
),
REPAIR_SEND_WAIT_SIGN
(
791
,
"等待盖章"
),
REPAIR_SEND_WAIT_SIGN
(
791
,
"等待盖章"
),
REPAIR_SEND_UNDER_DRAFT
(
799
,
"省直属等待出库"
),
/**
/**
* 维修完成退回状态
* 维修完成退回状态
*/
*/
...
@@ -283,6 +284,7 @@ public enum StatusEnum {
...
@@ -283,6 +284,7 @@ public enum StatusEnum {
REPAIR_BACK_SIGN_WAIT_CONFIRM
(
820
,
"申请签章待审核"
),
REPAIR_BACK_SIGN_WAIT_CONFIRM
(
820
,
"申请签章待审核"
),
REPAIR_BACK_WAIT_SIGN
(
821
,
"等待盖章"
),
REPAIR_BACK_WAIT_SIGN
(
821
,
"等待盖章"
),
REPAIR_BACK_DRAFT
(
888
,
"等待出库"
),
REPAIR_BACK_DRAFT
(
888
,
"等待出库"
),
REPAIR_BACK_UNDER_DRAFT
(
889
,
"省直属等待出库"
),
/**
/**
* 配发退回状态
* 配发退回状态
...
@@ -294,7 +296,7 @@ public enum StatusEnum {
...
@@ -294,7 +296,7 @@ public enum StatusEnum {
BACK_DRAFT
(
922
,
"草稿"
),
BACK_DRAFT
(
922
,
"草稿"
),
BACK_SIGN_WAIT_CONFIRM
(
930
,
"申请签章待审核"
),
BACK_SIGN_WAIT_CONFIRM
(
930
,
"申请签章待审核"
),
BACK_WAIT_SIGN
(
931
,
"等待盖章"
),
BACK_WAIT_SIGN
(
931
,
"等待盖章"
),
BACK_UNDER_DRAFT
(
932
,
"等待省直属退回"
),
/**
/**
* 报废状态
* 报废状态
*/
*/
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
02f56769
差异被折叠。
点击展开。
dev-repair/src/main/java/com/tykj/dev/device/repair/service/RepairDetailService.java
浏览文件 @
02f56769
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.repair.service;
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.repair.service;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.vo.BillVo
;
import
com.tykj.dev.device.repair.subject.vo.BillVo
;
import
com.tykj.dev.device.repair.subject.vo.ClearRepairVo
;
import
com.tykj.dev.device.repair.subject.vo.ClearTaskVo
;
import
com.tykj.dev.device.repair.subject.vo.ClearTaskVo
;
import
com.tykj.dev.device.repair.subject.vo.SetDevicesOwnUnit
;
import
com.tykj.dev.device.repair.subject.vo.SetDevicesOwnUnit
;
...
@@ -57,4 +58,9 @@ public interface RepairDetailService extends RepairPublicService<RepairDetail> {
...
@@ -57,4 +58,9 @@ public interface RepairDetailService extends RepairPublicService<RepairDetail> {
*/
*/
void
setDevicesOwnUnit
(
List
<
BillVo
>
billVos
);
void
setDevicesOwnUnit
(
List
<
BillVo
>
billVos
);
/**
* @param deviceIds 装备id
*/
ClearRepairVo
underRepair
(
List
<
Integer
>
deviceIds
);
}
}
dev-repair/src/main/java/com/tykj/dev/device/repair/service/impl/RepairDetailServiceImpl.java
浏览文件 @
02f56769
...
@@ -14,6 +14,7 @@ import com.tykj.dev.device.repair.subject.domin.RepairBill;
...
@@ -14,6 +14,7 @@ import com.tykj.dev.device.repair.subject.domin.RepairBill;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.repair.subject.vo.BillVo
;
import
com.tykj.dev.device.repair.subject.vo.BillVo
;
import
com.tykj.dev.device.repair.subject.vo.ClearRepairVo
;
import
com.tykj.dev.device.repair.subject.vo.ClearTaskVo
;
import
com.tykj.dev.device.repair.subject.vo.ClearTaskVo
;
import
com.tykj.dev.device.repair.subject.vo.SetDevicesOwnUnit
;
import
com.tykj.dev.device.repair.subject.vo.SetDevicesOwnUnit
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
...
@@ -22,6 +23,7 @@ import com.tykj.dev.device.task.subject.domin.Task;
...
@@ -22,6 +23,7 @@ import com.tykj.dev.device.task.subject.domin.Task;
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.entity.User
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.RepairStatusEnum
;
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.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
...
@@ -30,6 +32,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -30,6 +32,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
...
@@ -137,25 +140,80 @@ public class RepairDetailServiceImpl implements RepairDetailService {
...
@@ -137,25 +140,80 @@ public class RepairDetailServiceImpl implements RepairDetailService {
});
});
}
}
// @Override
// public Map<Integer, ClearTaskVo> getClearTaskVo(List<Integer> deviceIds) {
// List<ClearTaskVo> clearTaskVos = new ArrayList<>();
// Map<Integer,ClearTaskVo> map1 = new HashMap<>();
// //通过装备id查询出账单id (送修单repairBill)
// List<RepairDetail> repairDetails = deviceRepairDetailDao.findAllByDeviceIdIn(deviceIds);
// //取出装备id相同的最新时间
// Map<Integer,RepairDetail> map =new HashMap<>();
// repairDetails.sort(Comparator.comparing(RepairDetail::getCreateTime));
// repairDetails.forEach(
// repairDetail -> {
// if (!map.containsKey(repairDetail.getDeviceId())){
// map.put(repairDetail.getDeviceId(),repairDetail);
// }
// }
// );
// List<BillVo> billVos = new ArrayList<>();
// map.forEach(
// (k,v)->{
// BillVo billVo = new BillVo();
// billVo.setRepairBillId(v.getDeviceRepairBillId());
// billVo.setDevicesId(v.getDeviceId());
// billVo.setRepairDetailId(v.getId());
// billVos.add(billVo);
// //根据装备id查询装备
// DeviceLibrary library = deviceLibraryService.getOne(v.getDeviceId());
// DeviceLibrary deviceLibrary = library.setConfigName();
// BeanUtils.copyProperties(deviceLibrary,billVo);
// //通过账单id和businessType查询task对象
// //过滤出状态是 StatusEnum.REVOKEALLOTTASK.id
// List<Task> taskList = taskService.findByBillIdAndBusinessType(v.getDeviceRepairBillId(), BusinessEnum.REPAIR.id);
// List<Task> tasks = taskList.stream().filter(task -> task.getParentTaskId() == null).collect(Collectors.toList());
// ClearTaskVo clearTaskVo = new ClearTaskVo();
// clearTaskVo.setTaskId(tasks.get(0).getId());
// clearTaskVo.setBusinessType(BusinessEnum.REPAIR.id);
// clearTaskVo.setBillVos(billVos);
// clearTaskVos.add(clearTaskVo);
// }
// );
// clearTaskVos.forEach(
// clearTaskVo -> {
// if (!map1.containsKey(clearTaskVo.getTaskId())){
// map1.put(clearTaskVo.getTaskId(),clearTaskVo);
// }else {
// ClearTaskVo clearTaskVo1 = map1.get(clearTaskVo.getTaskId());
// List<BillVo> billVos1 = clearTaskVo1.getBillVos();
// billVos1.addAll(clearTaskVo.getBillVos());
// clearTaskVo1.setBillVos(billVos1);
// map1.put(clearTaskVo.getTaskId(),clearTaskVo1);
// }
// }
// );
// return map1;
// }
@Override
@Override
public
Map
<
Integer
,
ClearTaskVo
>
getClearTaskVo
(
List
<
Integer
>
deviceIds
)
{
public
Map
<
Integer
,
ClearTaskVo
>
getClearTaskVo
(
List
<
Integer
>
deviceIds
)
{
List
<
ClearTaskVo
>
clearTaskVos
=
new
ArrayList
<>();
List
<
ClearTaskVo
>
clearTaskVos
=
new
ArrayList
<>();
Map
<
Integer
,
ClearTaskVo
>
map1
=
new
HashMap
<>();
Map
<
Integer
,
ClearTaskVo
>
map1
=
new
HashMap
<>();
//通过装备id查询出账单id (送修单repairBill)
//通过装备id查询出账单id (送修单repairBill)
List
<
RepairDetail
>
repairDetails
=
deviceRepairDetailDao
.
findAllByDeviceIdIn
(
deviceIds
);
ClearRepairVo
clearRepairVo
=
underRepair
(
deviceIds
);
List
<
RepairDetail
>
endRepairList
=
clearRepairVo
.
getEndRepairList
();
//取出装备id相同的最新时间
//取出装备id相同的最新时间
Map
<
Integer
,
RepairDetail
>
map
=
new
HashMap
<>();
Map
<
Integer
,
RepairDetail
>
map
=
new
HashMap
<>();
repairDetails
.
sort
(
Comparator
.
comparing
(
RepairDetail:
:
getCreateTime
));
endRepairList
.
forEach
(
repairDetails
.
forEach
(
repairDetail
->
{
repairDetail
->
{
if
(!
map
.
containsKey
(
repairDetail
.
getDeviceId
())){
if
(!
map
.
containsKey
(
repairDetail
.
getDeviceId
()))
{
map
.
put
(
repairDetail
.
getDeviceId
(),
repairDetail
);
map
.
put
(
repairDetail
.
getDeviceId
(),
repairDetail
);
}
}
}
}
);
);
List
<
BillVo
>
billVos
=
new
ArrayList
<>();
List
<
BillVo
>
billVos
=
new
ArrayList
<>();
map
.
forEach
(
map
.
forEach
(
(
k
,
v
)->
{
(
k
,
v
)
->
{
BillVo
billVo
=
new
BillVo
();
BillVo
billVo
=
new
BillVo
();
billVo
.
setRepairBillId
(
v
.
getDeviceRepairBillId
());
billVo
.
setRepairBillId
(
v
.
getDeviceRepairBillId
());
billVo
.
setDevicesId
(
v
.
getDeviceId
());
billVo
.
setDevicesId
(
v
.
getDeviceId
());
...
@@ -164,7 +222,7 @@ public class RepairDetailServiceImpl implements RepairDetailService {
...
@@ -164,7 +222,7 @@ public class RepairDetailServiceImpl implements RepairDetailService {
//根据装备id查询装备
//根据装备id查询装备
DeviceLibrary
library
=
deviceLibraryService
.
getOne
(
v
.
getDeviceId
());
DeviceLibrary
library
=
deviceLibraryService
.
getOne
(
v
.
getDeviceId
());
DeviceLibrary
deviceLibrary
=
library
.
setConfigName
();
DeviceLibrary
deviceLibrary
=
library
.
setConfigName
();
BeanUtils
.
copyProperties
(
deviceLibrary
,
billVo
);
BeanUtils
.
copyProperties
(
deviceLibrary
,
billVo
);
//通过账单id和businessType查询task对象
//通过账单id和businessType查询task对象
//过滤出状态是 StatusEnum.REVOKEALLOTTASK.id
//过滤出状态是 StatusEnum.REVOKEALLOTTASK.id
List
<
Task
>
taskList
=
taskService
.
findByBillIdAndBusinessType
(
v
.
getDeviceRepairBillId
(),
BusinessEnum
.
REPAIR
.
id
);
List
<
Task
>
taskList
=
taskService
.
findByBillIdAndBusinessType
(
v
.
getDeviceRepairBillId
(),
BusinessEnum
.
REPAIR
.
id
);
...
@@ -178,22 +236,26 @@ public class RepairDetailServiceImpl implements RepairDetailService {
...
@@ -178,22 +236,26 @@ public class RepairDetailServiceImpl implements RepairDetailService {
);
);
clearTaskVos
.
forEach
(
clearTaskVos
.
forEach
(
clearTaskVo
->
{
clearTaskVo
->
{
if
(!
map1
.
containsKey
(
clearTaskVo
.
getTaskId
())){
if
(!
map1
.
containsKey
(
clearTaskVo
.
getTaskId
()))
{
map1
.
put
(
clearTaskVo
.
getTaskId
(),
clearTaskVo
);
map1
.
put
(
clearTaskVo
.
getTaskId
(),
clearTaskVo
);
}
else
{
}
else
{
ClearTaskVo
clearTaskVo1
=
map1
.
get
(
clearTaskVo
.
getTaskId
());
ClearTaskVo
clearTaskVo1
=
map1
.
get
(
clearTaskVo
.
getTaskId
());
List
<
BillVo
>
billVos1
=
clearTaskVo1
.
getBillVos
();
List
<
BillVo
>
billVos1
=
clearTaskVo1
.
getBillVos
();
billVos1
.
addAll
(
clearTaskVo
.
getBillVos
());
billVos1
.
addAll
(
clearTaskVo
.
getBillVos
());
clearTaskVo1
.
setBillVos
(
billVos1
);
clearTaskVo1
.
setBillVos
(
billVos1
);
map1
.
put
(
clearTaskVo
.
getTaskId
(),
clearTaskVo1
);
map1
.
put
(
clearTaskVo
.
getTaskId
(),
clearTaskVo1
);
}
}
}
}
);
);
return
map1
;
return
map1
;
}
}
@Override
@Override
public
void
setDevicesOwnUnit
(
List
<
BillVo
>
billVos
)
{
public
void
setDevicesOwnUnit
(
List
<
BillVo
>
billVos
)
{
//待维修:
//1.下级送修,本级未入库,则需要先将入库任务完成则变成待维修 入库任务完成后则可以将装备的所属改为自己的 装备状态为在库
//2.本级的待维修 直接修改装备为在库
//修改装备的所属以及备注
//修改装备的所属以及备注
//1 通过装备id修改装备的所属
//1 通过装备id修改装备的所属
//1.2 获取装备的id
//1.2 获取装备的id
...
@@ -222,4 +284,22 @@ public class RepairDetailServiceImpl implements RepairDetailService {
...
@@ -222,4 +284,22 @@ public class RepairDetailServiceImpl implements RepairDetailService {
});
});
}
}
/**
* 查询哪些装备正在运输中(出库方已发起,但是入库方未入库)
*/
@Override
public
ClearRepairVo
underRepair
(
List
<
Integer
>
deviceIds
){
ClearRepairVo
clearRepairVo
=
new
ClearRepairVo
();
//通过装备id查询出账单id (送修单repairBill)
List
<
RepairDetail
>
repairDetails
=
deviceRepairDetailDao
.
findAllByDeviceIdIn
(
deviceIds
);
//维修未入库
List
<
RepairDetail
>
repairIngList
=
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getRepairStatus
()
==
RepairStatusEnum
.
WAIT_REPAIR
.
id
).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getCreateTime
)).
collect
(
Collectors
.
toList
());
//维修已入库
List
<
Integer
>
repairStatus
=
new
ArrayList
<>(
Arrays
.
asList
(
RepairStatusEnum
.
REPAIRING
.
id
,
RepairStatusEnum
.
WAIT_SEND
.
id
));
List
<
RepairDetail
>
endRepairList
=
repairDetails
.
stream
().
filter
(
repairDetail
->
repairStatus
.
contains
(
repairDetail
.
getRepairStatus
())).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getCreateTime
)).
collect
(
Collectors
.
toList
());
clearRepairVo
.
setRepairingList
(
repairIngList
);
clearRepairVo
.
setEndRepairList
(
endRepairList
);
return
clearRepairVo
;
}
}
}
dev-repair/src/main/java/com/tykj/dev/device/repair/subject/vo/ClearRepairVo.java
0 → 100644
浏览文件 @
02f56769
package
com
.
tykj
.
dev
.
device
.
repair
.
subject
.
vo
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@ApiModel
(
"返回清退任务"
)
@AllArgsConstructor
@NoArgsConstructor
public
class
ClearRepairVo
{
@ApiModelProperty
(
value
=
"正在维修中维修详情列表"
)
private
List
<
RepairDetail
>
repairingList
;
@ApiModelProperty
(
value
=
"已入库的维修详情列表"
)
private
List
<
RepairDetail
>
endRepairList
;
}
dev-repair/src/main/java/com/tykj/dev/device/repair/subject/vo/RepairBillSaveVo.java
浏览文件 @
02f56769
...
@@ -72,11 +72,11 @@ public class RepairBillSaveVo {
...
@@ -72,11 +72,11 @@ public class RepairBillSaveVo {
@ApiModelProperty
(
value
=
"已出库装备数量"
)
@ApiModelProperty
(
value
=
"已出库装备数量"
)
private
Integer
sendedCount
;
private
Integer
sendedCount
;
@NotNull
(
message
=
"repairDeviceCheckDetail不能为空"
)
//
@NotNull(message = "repairDeviceCheckDetail不能为空")
@ApiModelProperty
(
value
=
"送修装备出库详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增"
)
@ApiModelProperty
(
value
=
"送修装备出库详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增"
)
private
String
repairDeviceCheckDetail
;
private
String
repairDeviceCheckDetail
;
@NotNull
(
message
=
"repairDeviceCheckResult不能为空"
)
//
@NotNull(message = "repairDeviceCheckResult不能为空")
@ApiModelProperty
(
value
=
"送修装备出库检查结果"
)
@ApiModelProperty
(
value
=
"送修装备出库检查结果"
)
private
String
repairDeviceCheckResult
;
private
String
repairDeviceCheckResult
;
...
@@ -95,6 +95,9 @@ public class RepairBillSaveVo {
...
@@ -95,6 +95,9 @@ public class RepairBillSaveVo {
@ApiModelProperty
(
value
=
"发送方附件"
)
@ApiModelProperty
(
value
=
"发送方附件"
)
private
List
<
FileRet
>
sendFileList
;
private
List
<
FileRet
>
sendFileList
;
@ApiModelProperty
(
value
=
"收件方附件"
)
private
List
<
FileRet
>
receiveFileList
;
@ApiModelProperty
(
value
=
"单据保存vo"
)
@ApiModelProperty
(
value
=
"单据保存vo"
)
private
List
<
ScriptSaveVo
>
scriptSaveVos
;
private
List
<
ScriptSaveVo
>
scriptSaveVos
;
}
}
dev-repair/src/main/java/com/tykj/dev/device/repair/subject/vo/RevokeUnderTask.java
0 → 100644
浏览文件 @
02f56769
package
com
.
tykj
.
dev
.
device
.
repair
.
subject
.
vo
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@ApiModel
(
"省直属任务撤回"
)
@AllArgsConstructor
@NoArgsConstructor
public
class
RevokeUnderTask
{
@ApiModelProperty
(
value
=
"维修的装备"
)
private
List
<
DeviceDetailVo
>
deviceDetailVos
;
@ApiModelProperty
(
value
=
"任务id"
)
private
Integer
taskId
;
}
dev-task/src/main/java/com/tykj/dev/device/task/service/TaskService.java
浏览文件 @
02f56769
...
@@ -257,4 +257,11 @@ public interface TaskService {
...
@@ -257,4 +257,11 @@ public interface TaskService {
* 根据billId和businessType获得Task
* 根据billId和businessType获得Task
*/
*/
List
<
Task
>
findByBillIdAndBusinessType
(
Integer
billId
,
Integer
businessType
);
List
<
Task
>
findByBillIdAndBusinessType
(
Integer
billId
,
Integer
businessType
);
/**
* 根据taskId删除task
* @param taskId 任务id
*/
void
deleteById
(
Integer
taskId
);
}
}
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
02f56769
...
@@ -1181,6 +1181,11 @@ public class TaskServiceImpl implements TaskService {
...
@@ -1181,6 +1181,11 @@ public class TaskServiceImpl implements TaskService {
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
}
}
@Override
public
void
deleteById
(
Integer
taskId
)
{
taskDao
.
deleteById
(
taskId
);
}
@Override
@Override
public
void
moveAllSonNodeToEnd
(
Integer
taaskId
)
{
public
void
moveAllSonNodeToEnd
(
Integer
taaskId
)
{
List
<
Task
>
tasks
=
taskDao
.
findAllByParentTaskId
(
taaskId
);
List
<
Task
>
tasks
=
taskDao
.
findAllByParentTaskId
(
taaskId
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论