From da7a4d799034ca244467665827bae91ca3c0252c Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期五, 16 八月 2024 10:31:55 +0800
Subject: [PATCH] feat:数据中心展示
---
ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java
index 020946c..b2fbbba 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java
@@ -105,6 +105,8 @@
errorType = errorType + "," + workOrder.getErrorType();
databaseWorkOrder.setErrorType(errorType);
databaseWorkOrder.setStatus(WorkOrderStatusEnum.DISTRIBUTED);
+ Date now = new Date();
+ databaseWorkOrder.setUpdateTime(now);
baseMapper.updateById(databaseWorkOrder);
updateNum++;
// 鍚屾椂鏂板涓�涓繍缁村鐞嗕俊鎭紝琛ㄦ槑姝ゅ伐鍗曡璋冩暣 TODO
@@ -153,6 +155,9 @@
workOrderDistributeRecord.setWorkOrderId(item.getId());
workOrderDistributeRecord.setDistributeWay(WorkOrderDistributeWayEnum.DIRECT_DISTRIBUTE);
workOrderDistributeRecord.setUserId(1L);
+ Date now = new Date();
+ workOrderDistributeRecord.setCreateTime(now);
+ workOrderDistributeRecord.setUpdateTime(now);
return workOrderDistributeRecord;
}).collect(Collectors.toList());
workOrderDistributeRecordMapper.insertBatch(distributedRecordList);
@@ -172,6 +177,9 @@
entity.setWorkOrderNo(IdUtils.timeAddRandomNO(5));
entity.setCreateTime(DateUtils.getNowDate());
entity.setStatus(WorkOrderStatusEnum.WAIT_DISTRIBUTE);
+ Date now = new Date();
+ entity.setCreateTime(now);
+ entity.setUpdateTime(now);
if(baseMapper.insert(entity) > 0) {
return Result.ok("娣诲姞鎴愬姛");
}
@@ -187,10 +195,11 @@
public Result update(WorkOrderForm form) {
WorkOrder entity = baseMapper.selectById(form.getId());
-
// 涓虹┖鎶汭llegalArgumentException锛屽仛鍏ㄥ眬寮傚父澶勭悊
Assert.notNull(entity, "璁板綍涓嶅瓨鍦�");
BeanUtils.copyProperties(form, entity);
+ Date now = new Date();
+ entity.setUpdateTime(now);
if (baseMapper.updateById(entity) > 0) {
return Result.ok("淇敼鎴愬姛");
}
--
Gitblit v1.8.0