localizer
parent
206d713b42
commit
d5e2678e95
|
|
@ -1,6 +1,8 @@
|
|||
package com.njzscloud.supervisory.order.controller;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.njzscloud.common.core.ex.Exceptions;
|
||||
import com.njzscloud.common.core.utils.R;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
|
|
@ -161,6 +163,9 @@ public class OrderInfoController {
|
|||
*/
|
||||
@PostMapping("/start_trans")
|
||||
public R<?> startTrans(@RequestBody StartTransportOrderParam startTransportOrderParam) {
|
||||
List<String> cargoPhoto = startTransportOrderParam.getCargoPhoto();
|
||||
Assert.notEmpty(cargoPhoto, () -> Exceptions.clierr("装车照片不能为空"));
|
||||
Assert.isFalse(cargoPhoto.stream().anyMatch(StrUtil::isBlank), () -> Exceptions.clierr("装车照片不能为空"));
|
||||
orderInfoService.startTrans(startTransportOrderParam);
|
||||
return R.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ import com.njzscloud.supervisory.order.mapper.OrderInfoMapper;
|
|||
import com.njzscloud.supervisory.order.pojo.entity.*;
|
||||
import com.njzscloud.supervisory.order.pojo.param.*;
|
||||
import com.njzscloud.supervisory.order.pojo.result.*;
|
||||
import com.njzscloud.supervisory.station.pojo.entity.StationManageEntity;
|
||||
import com.njzscloud.supervisory.station.service.StationManageService;
|
||||
import com.njzscloud.supervisory.sys.auth.pojo.result.MyResult;
|
||||
import com.njzscloud.supervisory.sys.stationletter.constant.WarnCategory;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -77,6 +79,7 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
|||
private final TruckLocationTrackService truckLocationTrackService;
|
||||
private final BizWarnService bizWarnService;
|
||||
private final AppProperties appProperties;
|
||||
private final StationManageService stationManageService;
|
||||
|
||||
private static void stopTuqiangTrack(String gpsId) {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
|
|
@ -388,21 +391,31 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
|||
BizObj bizObj = userDetail.getBizObj();
|
||||
if (BizObj.isSiBang(bizObj)) {
|
||||
CheckStatus checkStatus = orderPagingSearchParam.getCheckStatus();
|
||||
List<StationManageEntity> stationManageEntityList = stationManageService.list(Wrappers.lambdaQuery(StationManageEntity.class)
|
||||
.eq(StationManageEntity::getUserId, userDetail.getUserId()));
|
||||
if (CollUtil.isEmpty(stationManageEntityList)) {
|
||||
throw Exceptions.clierr("当前用户不是站点管理员");
|
||||
}
|
||||
List<Long> collect = stationManageEntityList.stream().map(StationManageEntity::getStationId).collect(Collectors.toList());
|
||||
if (checkStatus == CheckStatus.YiKanLiao) {
|
||||
ew
|
||||
.eq("a.check_status", checkStatus)
|
||||
.in("a.order_status", OrderStatus.YiJinChang, OrderStatus.YiChuChang, OrderStatus.YiWanCheng)
|
||||
.in("a.station_id", collect)
|
||||
|
||||
;
|
||||
} else if (checkStatus == CheckStatus.WeiKanLiao) {
|
||||
ew
|
||||
.eq("a.check_status", checkStatus)
|
||||
.in("a.order_status", OrderStatus.YiJinChang)
|
||||
.in("a.station_id", collect)
|
||||
|
||||
;
|
||||
} else {
|
||||
ew
|
||||
.in("a.order_status", OrderStatus.QingYunZhong);
|
||||
.in("a.order_status", OrderStatus.QingYunZhong)
|
||||
.in("a.station_id", collect)
|
||||
;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue