|
|
@@ -14,6 +14,8 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.orcas.common.sso.model.ExtInfo;
|
|
|
import com.orcas.iso.config.common.user.CurrentUserHolder;
|
|
|
@@ -217,6 +219,20 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
|
|
|
this.bCourseInfoMapper.insert(po);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 路线变更状态
|
|
|
+ *
|
|
|
+ * @param id
|
|
|
+ * @param status
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void updateStatus(Long id, String status) {
|
|
|
+ LambdaUpdateWrapper<BCourseInfoPo> updateWrapper = Wrappers.lambdaUpdate();
|
|
|
+ updateWrapper.eq(BCourseInfoPo::getId, id);
|
|
|
+ updateWrapper.set(BCourseInfoPo::getStatus, status);
|
|
|
+ bCourseInfoMapper.update(null, updateWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 列表
|
|
|
* @param dto
|
|
|
@@ -536,7 +552,7 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
|
|
|
@Override
|
|
|
public List<BCourseTrackTreeDto> getTreeList() {
|
|
|
List<BCourseInfoPo> list = this.bCourseInfoMapper.selectList((Wrapper)((QueryWrapper)(new QueryWrapper()).eq("is_delete", 0)).orderByDesc("status"));
|
|
|
- Map<String, List<BCourseInfoPo>> busGroups = (Map)list.stream().collect(Collectors.groupingBy(BCourseInfoPo::getStatus, Collectors.toList()));
|
|
|
+ Map<String, List<BCourseInfoPo>> busGroups = list.stream().collect(Collectors.groupingBy(BCourseInfoPo::getStatus, Collectors.toList()));
|
|
|
List<BCourseTrackTreeDto> treeList = new ArrayList();
|
|
|
busGroups.forEach((status, buses) -> {
|
|
|
BCourseTrackTreeDto statusNode = new BCourseTrackTreeDto();
|