提交 9276e8c2 authored 作者: 邓砥奕's avatar 邓砥奕

修改bug

上级 f93d7bd7
...@@ -27,7 +27,6 @@ public class PackingLibraryUpdateVo { ...@@ -27,7 +27,6 @@ public class PackingLibraryUpdateVo {
@ApiModelProperty(value = "名称", example = "测试名称") @ApiModelProperty(value = "名称", example = "测试名称")
private String name; private String name;
@NotNull(message = "applyType不能为空")
@ApiModelProperty(value = "应用类型", example = "1") @ApiModelProperty(value = "应用类型", example = "1")
private Integer applyType; private Integer applyType;
...@@ -35,7 +34,6 @@ public class PackingLibraryUpdateVo { ...@@ -35,7 +34,6 @@ public class PackingLibraryUpdateVo {
@ApiModelProperty(value = "密级", example = "1") @ApiModelProperty(value = "密级", example = "1")
private Integer secretLevel; private Integer secretLevel;
@NotNull(message = "matchingRange不能为空")
@ApiModelProperty(value = "配用范围", example = "1") @ApiModelProperty(value = "配用范围", example = "1")
private Integer matchingRange; private Integer matchingRange;
...@@ -55,15 +53,12 @@ public class PackingLibraryUpdateVo { ...@@ -55,15 +53,12 @@ public class PackingLibraryUpdateVo {
@ApiModelProperty(value = "列装状态", example = "1") @ApiModelProperty(value = "列装状态", example = "1")
private Integer status; private Integer status;
@NotNull(message = "nature不能为空")
@ApiModelProperty(value = "列装性质", example = "1") @ApiModelProperty(value = "列装性质", example = "1")
private Integer nature; private Integer nature;
@NotNull(message = "prodUnit不能为空")
@ApiModelProperty(value = "生产单位", example = "测试型号") @ApiModelProperty(value = "生产单位", example = "测试型号")
private String prodUnit; private String prodUnit;
@NotNull(message = "createUnit不能为空")
@ApiModelProperty(value = "创建单位", example = "测试创建单位") @ApiModelProperty(value = "创建单位", example = "测试创建单位")
private String createUnit; private String createUnit;
...@@ -71,19 +66,15 @@ public class PackingLibraryUpdateVo { ...@@ -71,19 +66,15 @@ public class PackingLibraryUpdateVo {
@ApiModelProperty(value = "价格", example = "2.000.000") @ApiModelProperty(value = "价格", example = "2.000.000")
private String price; private String price;
@NotNull(message = "imageName不能为空")
@ApiModelProperty(value = "照片名称", example = "没有先填一个空格") @ApiModelProperty(value = "照片名称", example = "没有先填一个空格")
private String imageName; private String imageName;
@NotNull(message = "imageUrl不能为空")
@ApiModelProperty(value = "照片路径", example = "没有先填一个空格") @ApiModelProperty(value = "照片路径", example = "没有先填一个空格")
private String imageUrl; private String imageUrl;
@NotNull(message = "fileName不能为空")
@ApiModelProperty(value = "附件名称", example = "没有先填一个空格") @ApiModelProperty(value = "附件名称", example = "没有先填一个空格")
private String fileName; private String fileName;
@NotNull(message = "fileUrl不能为空")
@ApiModelProperty(value = "附件路径", example = "没有先填一个空格") @ApiModelProperty(value = "附件路径", example = "没有先填一个空格")
private String fileUrl; private String fileUrl;
......
...@@ -2,6 +2,7 @@ package com.tykj.dev.device.task.service; ...@@ -2,6 +2,7 @@ package com.tykj.dev.device.task.service;
import com.tykj.dev.device.task.subject.bto.TaskLogBto; import com.tykj.dev.device.task.subject.bto.TaskLogBto;
import com.tykj.dev.device.task.subject.vo.TaskLogSelectVo;
import com.tykj.dev.device.task.subject.vo.TaskLogUserVo; import com.tykj.dev.device.task.subject.vo.TaskLogUserVo;
import java.util.List; import java.util.List;
...@@ -23,4 +24,10 @@ public interface TaskLogService { ...@@ -23,4 +24,10 @@ public interface TaskLogService {
* 获取业务日志 * 获取业务日志
*/ */
List<TaskLogUserVo> getByTaskId(Integer taskId); List<TaskLogUserVo> getByTaskId(Integer taskId);
/**
* @param taskLogSelectVo 查询vo
* 获取所有业务操作日志
*/
List<TaskLogUserVo> getAllByTime(TaskLogSelectVo taskLogSelectVo);
} }
...@@ -4,6 +4,7 @@ import com.tykj.dev.device.task.repository.TaskLogDao; ...@@ -4,6 +4,7 @@ import com.tykj.dev.device.task.repository.TaskLogDao;
import com.tykj.dev.device.task.service.TaskLogService; import com.tykj.dev.device.task.service.TaskLogService;
import com.tykj.dev.device.task.subject.bto.TaskLogBto; import com.tykj.dev.device.task.subject.bto.TaskLogBto;
import com.tykj.dev.device.task.subject.domin.TaskLog; import com.tykj.dev.device.task.subject.domin.TaskLog;
import com.tykj.dev.device.task.subject.vo.TaskLogSelectVo;
import com.tykj.dev.device.task.subject.vo.TaskLogUserVo; import com.tykj.dev.device.task.subject.vo.TaskLogUserVo;
import com.tykj.dev.device.task.utils.TaskUtils; import com.tykj.dev.device.task.utils.TaskUtils;
import com.tykj.dev.misc.exception.ApiException; import com.tykj.dev.misc.exception.ApiException;
...@@ -11,6 +12,7 @@ import com.tykj.dev.misc.utils.ResultUtil; ...@@ -11,6 +12,7 @@ import com.tykj.dev.misc.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -54,4 +56,24 @@ public class TaskLogServiceImpl implements TaskLogService { ...@@ -54,4 +56,24 @@ public class TaskLogServiceImpl implements TaskLogService {
return taskLogs.stream().map(TaskLog::parse2bto).map(TaskLogBto::toVo).collect(Collectors.toList()); return taskLogs.stream().map(TaskLog::parse2bto).map(TaskLogBto::toVo).collect(Collectors.toList());
} }
/**
* @param taskLogSelectVo 查询vo
* 获取所有业务操作日志
*/
@Override
public List<TaskLogUserVo> getAllByTime(TaskLogSelectVo taskLogSelectVo) {
List<TaskLogUserVo> taskLogUserVos = taskLogDao.findAll().stream().map(TaskLog::parse2bto).map(TaskLogBto::toVo).collect(Collectors.toList());
if (taskLogSelectVo!=null&&taskLogSelectVo.getStartTime()!=null&&taskLogSelectVo.getEndTime()!=null){
return taskLogUserVos.stream()
.filter(taskLogUserVo -> taskLogUserVo.getCreateTime().after(taskLogSelectVo.getStartTime())&&taskLogUserVo.getCreateTime().before(taskLogSelectVo.getEndTime()))
.sorted(Comparator.comparing(TaskLogUserVo::getCreateTime).reversed())
.collect(Collectors.toList());
}
else {
return taskLogUserVos.stream()
.sorted(Comparator.comparing(TaskLogUserVo::getCreateTime).reversed())
.collect(Collectors.toList());
}
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论