提交 6357ce6d authored 作者: 133's avatar 133

t

上级 ea9ff455
......@@ -2,6 +2,9 @@ package com.tykj.dev.device.library.service;
import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
import com.tykj.dev.device.library.subject.domin.DeviceLog;
import java.util.List;
/**
* @author dengdiyi
......@@ -15,4 +18,6 @@ public interface DeviceLogService {
DeviceLogDto getOne(Integer id);
void saveAllLog(List<DeviceLog> deviceLogList);
}
......@@ -12,6 +12,7 @@ import com.tykj.dev.misc.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
......@@ -47,4 +48,9 @@ public class DeviceLogServiceImpl implements DeviceLogService {
}
}
@Override
public void saveAllLog(List<DeviceLog> deviceLoList) {
deviceLogDao.saveAll(deviceLoList);
}
}
......@@ -4,8 +4,12 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.tykj.dev.config.GlobalMap;
import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.service.DeviceLogService;
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.DeviceLog;
import com.tykj.dev.device.packing.repository.PackingLibraryDao;
import com.tykj.dev.device.packing.subject.vo.AddModel;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepel;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail;
import com.tykj.dev.device.sendback.entity.domain.RepelDeviceUnit;
......@@ -48,6 +52,8 @@ import java.util.stream.Collectors;
public class RepelBusinessServiceImpl implements RepelBusinessService {
@Autowired
TaskService taskService;
@Autowired
DeviceLogService deviceLogService;
@Autowired
DeviceRepelService deviceRepelService;
......@@ -376,6 +382,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetailService.saveDeviceRepelDetail(orderOutDataRepelDetail);
taskBto.setOwnUnit(orderOutData.getReceiveUnitId());
taskService.moveToSpecial(taskBto,StatusEnum.SEND_BACK_1209,0);
devLogAdd(findInvoleDevice(deviceRepelDetail.getDeviceIds()),deviceRepelDetail.getSendUnit()+"装备清退出库"+",等待"+deviceRepelDetail.getReceiveUnit()+"接收");
//把一些字段填写到对象中,保存入库
//把任务状态修改为 清退提交装备待接收
}
......@@ -412,6 +419,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
repelTaskStatisticalService.saveRepelTaskStatistical(repelTaskStatistical);
deviceRepelDetailService.saveDeviceRepelDetail(deviceRepelDetail);
isEnd(taskBto,deviceRepelDetail.getRepelId());
devLogAdd(findInvoleDevice(deviceRepelDetail.getDeviceIds()),deviceRepelDetail.getReceiveUnit()+"接收"+deviceRepelDetail.getSendUnit()+"装备清退装备,任务完成");
//完结当前任务
//把任务状态修改为 清退提交装备已完成
//修改统计表中的数据信息 状态
......@@ -444,6 +452,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
repelDeviceUnitService.saveAllRepelDeviceUnit(list);
deviceRepelDetailService.saveDeviceRepelDetail(deviceRepelDetail);
isEnd(taskBto,deviceRepelDetail.getRepelId());
devLogAdd(libraries,"省本级清退,把装备转变为待清退");
//完结当前任务
//修改统计表中的数据信息 状态
//把装备的状态都修改为待清退。
......@@ -646,4 +655,16 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
}
public void devLogAdd(List<DeviceLibrary> deviceLibraries,String remark){
List<DeviceLog> logDtos=new ArrayList<>();
deviceLibraries.forEach(
deviceLibrary -> {
logDtos.add(new DeviceLogDto(deviceLibrary.getId(),remark,null).toDo());
}
);
deviceLogService.saveAllLog(logDtos);
}
}
......@@ -527,7 +527,7 @@ public class SendBackServiceImpl implements SendBackService {
sendBackBillDetailEntity.setFileName(sendBackOut.getFileName());
sendBackBillDetailEntity.setFileUrl(sendBackOut.getUrl());
sendBackBillDetailEntity.setDeleteTag(0);
List<Integer> ids= sendBackOut.getDeviceLibraryEntities().stream().map(DeviceLibrary::getId).collect(Collectors.toList());
List<Integer> ids= sendBackOut.getDeviceLibraryEntities().stream().map(DeviceLibrary::getId).collect(Collectors.toList());
sendBackBillDetailEntity.setDeviceIds(JacksonUtil.toJSon(ids));
sendBackBillDetailEntity.setApplyNumber("");
sendBackBillDetailEntity.setReplayNumber("");
......
......@@ -260,10 +260,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论