|
@@ -22,6 +22,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -112,6 +114,12 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
|
|
|
* 联锁管理——编辑联锁
|
|
|
*/
|
|
|
public void editLS(InterlockAddDTO interlockAddDTO){
|
|
|
+ // 获取当前日期时间
|
|
|
+ LocalDateTime currentDateTime = LocalDateTime.now();
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String formattedDateTime = currentDateTime.format(formatter);
|
|
|
+ interlockAddDTO.setTagTime(formattedDateTime);
|
|
|
+
|
|
|
String summaryId = interlockAddDTO.getId();
|
|
|
|
|
|
List<InterlockDetailAddDTO> interlockDetailAddDTOList = interlockAddDTO.getInterlockDetailAddDTOList();
|
|
@@ -168,7 +176,7 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
|
|
|
controlSystemStatus = "1";
|
|
|
} else dto.setControlSystemStatus("0");
|
|
|
|
|
|
- InterlockDetail detail = InterlockDetailConvert.INSTANCE.toEntity(dto, interlockAddDTO.getInterlockName());
|
|
|
+ InterlockDetail detail = InterlockDetailConvert.INSTANCE.toEntity(dto, interlockAddDTO.getInterlockName(),formattedDateTime);
|
|
|
|
|
|
//新增联锁详细信息表数据
|
|
|
interlockDetailMapper.insert(detail);
|
|
@@ -194,6 +202,11 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
|
|
|
* 联锁管理——新增联锁
|
|
|
*/
|
|
|
public void addLS(InterlockAddDTO interlockAddDTO){
|
|
|
+ // 获取当前日期时间
|
|
|
+ LocalDateTime currentDateTime = LocalDateTime.now();
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String formattedDateTime = currentDateTime.format(formatter);
|
|
|
+ interlockAddDTO.setTagTime(formattedDateTime);
|
|
|
|
|
|
List<InterlockDetailAddDTO> interlockDetailAddDTOList = interlockAddDTO.getInterlockDetailAddDTOList();
|
|
|
|
|
@@ -244,7 +257,7 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
|
|
|
controlSystemStatus = "1";
|
|
|
} else dto.setControlSystemStatus("0");
|
|
|
|
|
|
- InterlockDetail detail = InterlockDetailConvert.INSTANCE.toEntity(dto,interlockAddDTO.getInterlockName());
|
|
|
+ InterlockDetail detail = InterlockDetailConvert.INSTANCE.toEntity(dto,interlockAddDTO.getInterlockName(), formattedDateTime);
|
|
|
//新增联锁详细信息表数据
|
|
|
interlockDetailMapper.insert(detail);
|
|
|
|