|
@@ -228,14 +228,6 @@ public class IotOperationPlanJob implements JobHandler {
|
|
|
iotOpeationFillOrderMapper.insertBatch(orderList1);
|
|
|
|
|
|
|
|
|
- Set<Long> pdeptList = new HashSet<>();
|
|
|
- pdeptList = deptService.getChildDeptIdListFromCache(plan.getDeptId());
|
|
|
- pdeptList.add(plan.getDeptId());
|
|
|
-
|
|
|
- //查询日报计划
|
|
|
- List<IotOperationPlanDO> rpList = planMapper.getReportPlan(pdeptList);
|
|
|
- List<Long> rpdList = rpList.stream().map(IotOperationPlanDO::getDeptId).collect(Collectors.toList());
|
|
|
-
|
|
|
|
|
|
Set<Long> rdIdList = new HashSet<>();
|
|
|
rdIdList = deptService.getChildDeptIdListFromCache(163L);
|
|
@@ -249,18 +241,31 @@ public class IotOperationPlanJob implements JobHandler {
|
|
|
boolean exist = rdIdList.contains(plan.getDeptId());
|
|
|
|
|
|
if(!exist){
|
|
|
- //1、有指定队伍插入指定队伍日报设备
|
|
|
|
|
|
- if(rpList.size()>0){
|
|
|
+
|
|
|
+ //瑞鹰SCP项目部50010队伍临时创建
|
|
|
+ if(plan.getDeptId()==287){
|
|
|
//筛选日报工单
|
|
|
- List<IotOpeationFillOrderDO> virOrderList = orderList1.stream().filter(e->rpdList.contains(e.getDeptId())).collect(Collectors.toList());
|
|
|
- if(virOrderList.size()>0){
|
|
|
- //创建日报设备
|
|
|
- List <IotOpeationFillDO> devList = opeationFillService.reportMethod(virOrderList);
|
|
|
- //插入日报设备
|
|
|
- iotOpeationFillMapper.insertFill(devList);
|
|
|
+ List<IotOpeationFillOrderDO> virOrderList = new ArrayList<>();
|
|
|
+
|
|
|
+ IotOpeationFillOrderDO fillDO = new IotOpeationFillOrderDO();
|
|
|
+
|
|
|
+ fillDO.setOrderName("50010队"+"/"+LocalDate.now()+"运行记录填报");
|
|
|
+ fillDO.setDeptId(293L);
|
|
|
+ fillDO.setOrderStatus(0);
|
|
|
+ fillDO.setCreateTime(LocalDateTime.now());
|
|
|
+ fillDO.setUserName("李小虎");
|
|
|
+ fillDO.setUserId(486);
|
|
|
+ fillDO.setMobile(String.valueOf(17723897643L));
|
|
|
+ virOrderList.add(fillDO);
|
|
|
+
|
|
|
+ orderList1.addAll(virOrderList);
|
|
|
+ iotOpeationFillOrderMapper.insertBatch(virOrderList);
|
|
|
+ //创建日报设备
|
|
|
+ List <IotOpeationFillDO> devList = opeationFillService.reportMethod(virOrderList);
|
|
|
+ //插入日报设备
|
|
|
+ iotOpeationFillMapper.insertFill(devList);
|
|
|
|
|
|
- }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -323,7 +328,7 @@ public class IotOperationPlanJob implements JobHandler {
|
|
|
|
|
|
|
|
|
|
|
|
- /*//发送钉钉通知
|
|
|
+ //发送钉钉通知
|
|
|
pmsThreadPoolTaskExecutor.execute(()->{
|
|
|
try{
|
|
|
for (IotOpeationFillOrderDO order:orderList1) {
|
|
@@ -332,7 +337,7 @@ public class IotOperationPlanJob implements JobHandler {
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- });*/
|
|
|
+ });
|
|
|
|
|
|
|
|
|
//正常工单设备
|