|
@@ -26,6 +26,7 @@ import com.sckw.stream.enums.MessageEnum;
|
|
|
import com.sckw.stream.model.SckwMessage;
|
|
import com.sckw.stream.model.SckwMessage;
|
|
|
import com.sckw.stream.model.UserInfo;
|
|
import com.sckw.stream.model.UserInfo;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
|
|
+import com.sckw.system.api.RemoteUserService;
|
|
|
import com.sckw.system.api.model.dto.res.AreaTreeFrontResDto;
|
|
import com.sckw.system.api.model.dto.res.AreaTreeFrontResDto;
|
|
|
import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
|
import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
@@ -99,6 +100,8 @@ public class KwtWaybillOrderV1Service {
|
|
|
private StreamBridge streamBridge;
|
|
private StreamBridge streamBridge;
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
private RemoteSystemService remoteSystemService;
|
|
private RemoteSystemService remoteSystemService;
|
|
|
|
|
+ @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 6000)
|
|
|
|
|
+ private RemoteUserService remoteUserService;
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
private RemoteFleetService remoteFleetService;
|
|
private RemoteFleetService remoteFleetService;
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
@@ -148,12 +151,12 @@ public class KwtWaybillOrderV1Service {
|
|
|
* @author zk
|
|
* @author zk
|
|
|
* @date 2024/3/8
|
|
* @date 2024/3/8
|
|
|
**/
|
|
**/
|
|
|
- public PageResult findListPage(WaybillOrderQueryDto params){
|
|
|
|
|
- params.setEntId(LoginUserHolder.getEntId());
|
|
|
|
|
- // 设置分页参数
|
|
|
|
|
- PageHelper.startPage(params.getPage(), params.getPageSize());
|
|
|
|
|
|
|
+ public List<WaybillOrderSelectVo> findListPage(WaybillOrderQueryDto params){
|
|
|
params.setQueryWstatus(CarWaybillTableTopEnum.getValue(params.getStatus()));
|
|
params.setQueryWstatus(CarWaybillTableTopEnum.getValue(params.getStatus()));
|
|
|
List<WaybillOrderSelectVo> list = waybillOrderV1Dao.findListPage(params);
|
|
List<WaybillOrderSelectVo> list = waybillOrderV1Dao.findListPage(params);
|
|
|
|
|
+ if (CollectionUtils.isEmpty(list)) {
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
//单位
|
|
//单位
|
|
|
Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.UNIT_TYPE.getType()));
|
|
Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.UNIT_TYPE.getType()));
|
|
@@ -164,7 +167,7 @@ public class KwtWaybillOrderV1Service {
|
|
|
findListPageHandle(waybillOrder, unitMap);
|
|
findListPageHandle(waybillOrder, unitMap);
|
|
|
waybillOrder.setStatusLabel(CarWaybillEnum.getName(waybillOrder.getStatus()));
|
|
waybillOrder.setStatusLabel(CarWaybillEnum.getName(waybillOrder.getStatus()));
|
|
|
}
|
|
}
|
|
|
- return PageHelperUtil.getPageResult(new PageInfo<>(list));
|
|
|
|
|
|
|
+ return list;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -201,6 +204,41 @@ public class KwtWaybillOrderV1Service {
|
|
|
return PageHelperUtil.getPageResult(new PageInfo<>(data));
|
|
return PageHelperUtil.getPageResult(new PageInfo<>(data));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param params {page:页数、pageSize:每页条数、。。。}
|
|
|
|
|
+ * @desc 分页查询-运营端
|
|
|
|
|
+ * @author zk
|
|
|
|
|
+ * @date 2024/3/8
|
|
|
|
|
+ **/
|
|
|
|
|
+ public List<WaybillOrderSelectVo> findListPageManagement(WaybillOrderQueryDto params) {
|
|
|
|
|
+ //客户经理权限过滤
|
|
|
|
|
+ List<Long> authEntIdList = LoginUserHolder.getAuthEntIdList();
|
|
|
|
|
+ if (CollectionUtils.isEmpty(authEntIdList)) {
|
|
|
|
|
+ List<Long> ids = remoteUserService.findEnterpriseIdsByUserIdIsMain(LoginUserHolder.getUserId());
|
|
|
|
|
+ if (CollectionUtils.isEmpty(ids)){
|
|
|
|
|
+ return new ArrayList<>();
|
|
|
|
|
+ }
|
|
|
|
|
+ authEntIdList.addAll(ids);
|
|
|
|
|
+ }
|
|
|
|
|
+ params.setEntIds(authEntIdList);
|
|
|
|
|
+ params.setQueryWstatus(CarWaybillTableTopEnum.getValue(params.getStatus()));
|
|
|
|
|
+ List<WaybillOrderSelectVo> list = waybillOrderV1Dao.findListPage(params);
|
|
|
|
|
+ if (CollectionUtils.isEmpty(list)) {
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //单位
|
|
|
|
|
+ Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.UNIT_TYPE.getType()));
|
|
|
|
|
+ Map<String, String> unitMap = CollectionUtils.isNotEmpty(dict) ? dict.get(DictTypeEnum.UNIT_TYPE.getType()) : new HashMap<>(NumberConstant.SIXTEEN);
|
|
|
|
|
+
|
|
|
|
|
+ //数据处理
|
|
|
|
|
+ for (WaybillOrderSelectVo waybillOrder:list) {
|
|
|
|
|
+ findListPageHandle(waybillOrder, unitMap);
|
|
|
|
|
+ waybillOrder.setStatusLabel(CarWaybillEnum.getName(waybillOrder.getStatus()));
|
|
|
|
|
+ }
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @param wOrderId 运单ID
|
|
* @param wOrderId 运单ID
|
|
|
* @desc 运单详情
|
|
* @desc 运单详情
|
|
@@ -2236,7 +2274,6 @@ public class KwtWaybillOrderV1Service {
|
|
|
result.put("driverName", waybillOrder.getDriverName());
|
|
result.put("driverName", waybillOrder.getDriverName());
|
|
|
result.put("driverPhone", waybillOrder.getDriverPhone());
|
|
result.put("driverPhone", waybillOrder.getDriverPhone());
|
|
|
result.put("driverIdcard", waybillOrder.getDriverIdcard());
|
|
result.put("driverIdcard", waybillOrder.getDriverIdcard());
|
|
|
-
|
|
|
|
|
result.put("wTicketId", ticket != null ? ticket.getId() : null);
|
|
result.put("wTicketId", ticket != null ? ticket.getId() : null);
|
|
|
result.put("wSubtaskId", subtask.getId());
|
|
result.put("wSubtaskId", subtask.getId());
|
|
|
result.put("wAddressId", address.getId());
|
|
result.put("wAddressId", address.getId());
|
|
@@ -2318,7 +2355,7 @@ public class KwtWaybillOrderV1Service {
|
|
|
//状态记录
|
|
//状态记录
|
|
|
KwtWaybillOrderTrack track = waybillOrderTrackDao.findWaybillOrderTrack(wOrderId, subtask.getId(), address.getId(), status);
|
|
KwtWaybillOrderTrack track = waybillOrderTrackDao.findWaybillOrderTrack(wOrderId, subtask.getId(), address.getId(), status);
|
|
|
//辅助单位
|
|
//辅助单位
|
|
|
- List<WaybillOrderLoadingVO> loading = waybillOrderTicketService.agreementV1(subtask, track.getWAddressId());
|
|
|
|
|
|
|
+ List<WaybillOrderLoadingVO> loading = track != null ? waybillOrderTicketService.agreementV1(subtask, track.getWAddressId()) : null;
|
|
|
//辅助单位
|
|
//辅助单位
|
|
|
List<GoodsUnitVo> assistUnit = kwtLogisticsOrderGoodsService.assistUnit(subtask.getLOrderId());
|
|
List<GoodsUnitVo> assistUnit = kwtLogisticsOrderGoodsService.assistUnit(subtask.getLOrderId());
|
|
|
Map<String, Object> trackData = new HashMap<>(NumberConstant.SIXTEEN);
|
|
Map<String, Object> trackData = new HashMap<>(NumberConstant.SIXTEEN);
|