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

修改配套

上级 18c4d60d
...@@ -20,6 +20,7 @@ import com.tykj.dev.device.matching.subject.vo.*; ...@@ -20,6 +20,7 @@ import com.tykj.dev.device.matching.subject.vo.*;
import com.tykj.dev.device.task.service.TaskLogService; 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.bto.TaskLogBto;
import com.tykj.dev.device.user.util.UserUtils; import com.tykj.dev.device.user.util.UserUtils;
import com.tykj.dev.misc.base.BusinessEnum; import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.StatusEnum; import com.tykj.dev.misc.base.StatusEnum;
...@@ -94,12 +95,15 @@ public class MatchingDeviceController { ...@@ -94,12 +95,15 @@ public class MatchingDeviceController {
//发起任务 //发起任务
List<Integer> userIds = new ArrayList<>(); List<Integer> userIds = new ArrayList<>();
userIds.add(userId); userIds.add(userId);
userIds.add(matchingDeviceBillSaveVo.getUserbId()); // userIds.add(matchingDeviceBillSaveVo.getUserbId());
TaskBto taskBto = new TaskBto(StatusEnum.ADD_MATCHING_DEVICE_CONFIRM.id, "新增配套", null, ".", m.getId(), 19, userUtils.getCurrentUnitId(), 1, null, userIds); TaskBto taskBto = new TaskBto(StatusEnum.END.id, "新增配套", null, ".", m.getId(), 19, userUtils.getCurrentUnitId(), 0, null, userIds);
taskService.start(taskBto); TaskBto taskBto1 = taskService.start(taskBto);
//日志文件 //日志文件
List<FileVo> fileVoList = new ArrayList<>(); List<FileVo> fileVoList = new ArrayList<>();
fileVoList.add(new FileVo("新增确认单", matchingDeviceBillEntity.getFileName(), matchingDeviceBillEntity.getFileUrl())); fileVoList.add(new FileVo("新增确认单", matchingDeviceBillEntity.getFileName(), matchingDeviceBillEntity.getFileUrl()));
//添加业务日志
TaskLogBto taskLogBto2 = new TaskLogBto(taskBto1.getId(), "发起新增配套", fileVoList);
taskLogService.addLog(taskLogBto2);
for (MatchingDeviceSaveVo matchingDeviceSaveVo : matchingDeviceBillSaveVo.getMatchingDeviceSaveVoList()) { for (MatchingDeviceSaveVo matchingDeviceSaveVo : matchingDeviceBillSaveVo.getMatchingDeviceSaveVoList()) {
MatchingDeviceLibrary matchingDeviceLibraryEntity = matchingDeviceSaveVo.toDo(); MatchingDeviceLibrary matchingDeviceLibraryEntity = matchingDeviceSaveVo.toDo();
MatchingDeviceLibrary saveEntity = matchingDeviceLibraryService.addEntity(matchingDeviceLibraryEntity); MatchingDeviceLibrary saveEntity = matchingDeviceLibraryService.addEntity(matchingDeviceLibraryEntity);
......
...@@ -32,8 +32,8 @@ public class MatchingDeviceBillSaveVo { ...@@ -32,8 +32,8 @@ public class MatchingDeviceBillSaveVo {
@ApiModelProperty(value = "发起人id") @ApiModelProperty(value = "发起人id")
private Integer useraId; private Integer useraId;
@NotNull(message = "userbId不能为空") // @NotNull(message = "userbId不能为空")
@Min(value = 1,message = "userbId不能小于1") // @Min(value = 1,message = "userbId不能小于1")
@ApiModelProperty(value = "审核人id") @ApiModelProperty(value = "审核人id")
private Integer userbId; private Integer userbId;
...@@ -45,7 +45,7 @@ public class MatchingDeviceBillSaveVo { ...@@ -45,7 +45,7 @@ public class MatchingDeviceBillSaveVo {
public MatchingDeviceBill toDo() { public MatchingDeviceBill toDo() {
MatchingDeviceBill matchingDeviceBillEntity = new MatchingDeviceBill(); MatchingDeviceBill matchingDeviceBillEntity = new MatchingDeviceBill();
BeanUtils.copyProperties(this, matchingDeviceBillEntity); BeanUtils.copyProperties(this, matchingDeviceBillEntity);
matchingDeviceBillEntity.setBillStatus(0); matchingDeviceBillEntity.setBillStatus(2);
matchingDeviceBillEntity.setDeviceDetail("x"); matchingDeviceBillEntity.setDeviceDetail("x");
return matchingDeviceBillEntity; return matchingDeviceBillEntity;
} }
......
...@@ -46,7 +46,7 @@ public class MatchingDeviceSaveVo { ...@@ -46,7 +46,7 @@ public class MatchingDeviceSaveVo {
public MatchingDeviceLibrary toDo() { public MatchingDeviceLibrary toDo() {
MatchingDeviceLibrary matchingDeviceLibraryEntity = new MatchingDeviceLibrary(); MatchingDeviceLibrary matchingDeviceLibraryEntity = new MatchingDeviceLibrary();
BeanUtils.copyProperties(this, matchingDeviceLibraryEntity); BeanUtils.copyProperties(this, matchingDeviceLibraryEntity);
matchingDeviceLibraryEntity.setLifeStatus(0); matchingDeviceLibraryEntity.setLifeStatus(2);
matchingDeviceLibraryEntity.setDeviceId(0); matchingDeviceLibraryEntity.setDeviceId(0);
return matchingDeviceLibraryEntity; return matchingDeviceLibraryEntity;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论