提交 58f0759a authored 作者: 马路路's avatar 马路路

Merge branch 'v29.6_ultimate_interaction_20241017' into test_jdk17

......@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
......@@ -205,8 +206,13 @@ public class CollectDriverTransportIntentionServiceImpl implements CollectDriver
Map<Integer, List<CarrierDriverCollectTransportIntentionRecordVO>> recordVoMap =
recordVOList.stream().collect(Collectors
.groupingBy(CarrierDriverCollectTransportIntentionRecordVO::getCollectDriverTransportIntentionId));
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime currentTime = LocalDateTime.now();
// 遍历主编数据,构建子表数据
for (CarrierDriverCollectTransportIntentionVO vo : listVO) {
// 赋值系统时间
vo.setCurrentTime(formatter.format(currentTime));
if (recordVoMap.containsKey(vo.getId())) {
vo.setCollectIntentionRecordList(recordVoMap.get(vo.getId()));
}
......
......@@ -23,6 +23,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
......@@ -49,7 +50,7 @@ public class DriverTransportIntentionInfoServiceImpl implements DriverTransportI
throw new ServiceSystemException(PerformanceResultEnum.DATA_NOT_FIND);
}
if (this.existUpdateChange()) {
if (this.existUpdateChange(param.getCurrentTime())) {
log.info("driverTransportIntentionInfoServiceImpl saveCheckedList existUpdateChange");
// 返回异常错误码
throw new ServiceSystemException(PerformanceResultEnum.DRIVER_TRANSPORT_INTENTION_HAPPEN_CHANGE_ERROR_MSG);
......@@ -66,7 +67,7 @@ public class DriverTransportIntentionInfoServiceImpl implements DriverTransportI
DriverTransportIntentionInfo driverTransportIntentionInfo = new DriverTransportIntentionInfo();
driverTransportIntentionInfo.setCollectTransportIntentionId(saveParam.getId());
driverTransportIntentionInfo.setCollectTransportIntentionName(saveParam.getCollectName());
driverTransportIntentionInfo.setCollectTransportIntentionRecordId(saveParam.getId());
driverTransportIntentionInfo.setCollectTransportIntentionRecordId(collectChildParam.getCollectRecordId());
driverTransportIntentionInfo.setCollectTransportIntentionRecordName(collectChildParam.getCollectRecordName());
driverTransportIntentionInfo.setCreateUserNo(TokenUtil.getLoginUserInfo().getUserNo());
driverTransportIntentionInfo.setCreateUserName(TokenUtil.getLoginUserInfo().getUserName());
......@@ -120,9 +121,10 @@ public class DriverTransportIntentionInfoServiceImpl implements DriverTransportI
return intentionVOList;
}
public boolean existUpdateChange() {
public boolean existUpdateChange(String currentTime) {
// 获取当前时间
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter ftf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime now = LocalDateTime.parse(currentTime, ftf);
// 获取主表最新一次更新时间
LocalDateTime intentionLastUpdateTime =collectDriverTransportIntentionDao.getLastUpdateTime();
// 获取子表最新一次更新时间
......
......@@ -12,6 +12,9 @@ import java.util.List;
@NoArgsConstructor
public class AppCarrierDriverCollectSaveParam {
@Schema(description = "获取Web端已配置的拉运意愿列表--CurrentTime")
private String currentTime;
@Schema(description="拉运货物意愿")
List<AppCarrierDriverCollectMainParam> paramList;
}
......@@ -50,6 +50,9 @@ public class CarrierDriverCollectTransportIntentionVO {
@Schema(description="修改时间")
private String modifiedTime;
@Schema(description = "当前系统时间")
private String currentTime;
@Schema(description = "收集司机拉运意向选项")
private List<CarrierDriverCollectTransportIntentionRecordVO> collectIntentionRecordList;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论