运输记录
parent
747bd4e56f
commit
dde0c2c067
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderTransEntity;
|
import com.njzscloud.dispose.cst.order.pojo.entity.OrderTransEntity;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.result.SearchOrderTransResult;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.result.TransResult;
|
import com.njzscloud.dispose.cst.order.pojo.result.TransResult;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
@ -33,4 +34,5 @@ public interface OrderTransMapper extends BaseMapper<OrderTransEntity> {
|
||||||
|
|
||||||
List<TransResult> getTransResultByOrderId(@Param("orderId") Long orderId);
|
List<TransResult> getTransResultByOrderId(@Param("orderId") Long orderId);
|
||||||
|
|
||||||
|
List<SearchOrderTransResult> listTransRecode(@Param("ew") QueryWrapper<?> ew);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,8 @@ public class SearchOrderResult {
|
||||||
* 司机所属用户 Id
|
* 司机所属用户 Id
|
||||||
*/
|
*/
|
||||||
private Long driverUserId;
|
private Long driverUserId;
|
||||||
|
private String driverName;
|
||||||
|
private String driverPhone;
|
||||||
/**
|
/**
|
||||||
* 归属客户 Id;cst_customer.id
|
* 归属客户 Id;cst_customer.id
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,188 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.pojo.result;
|
||||||
|
|
||||||
|
import com.njzscloud.dispose.cst.order.constant.CheckStatus;
|
||||||
|
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输信息
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SearchOrderTransResult {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车次
|
||||||
|
*/
|
||||||
|
private Integer trainNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单 Id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输状态;字典代码:trans_status,DaiPaiDan-->待派单、DaiJieDan-->待接单、YiJieDan-->已接单、YunShuZhong-->运输中、YiJinChang-->已进场、YiChuChang-->已出场、YiWanCheng-->已完成、YiQuXiao-->已取消
|
||||||
|
*/
|
||||||
|
private TransStatus transStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车道名称
|
||||||
|
*/
|
||||||
|
private String lane;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派司机时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime assignmentDriverTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机确认接单时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime driverConfirmTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始运输时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime transTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完结时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime finishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 看料员 Id;sys_user.id
|
||||||
|
*/
|
||||||
|
private Long checkerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料状态;字典代码:check_status,Wu-->无需勘料、YiKanLiao-->已勘料、WeiKanLiao-->未勘料
|
||||||
|
*/
|
||||||
|
private CheckStatus checkStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime checkTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料照片
|
||||||
|
*/
|
||||||
|
private List<String> checkPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料员备注
|
||||||
|
*/
|
||||||
|
private String checkerMemo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机 Id
|
||||||
|
*/
|
||||||
|
private Long driverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机所属客户 Id;cst_customer.id
|
||||||
|
*/
|
||||||
|
private Long driverCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机所属用户 Id
|
||||||
|
*/
|
||||||
|
private Long driverUserId;
|
||||||
|
private String driverName;
|
||||||
|
private String driverPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归属客户 Id;cst_customer.id
|
||||||
|
*/
|
||||||
|
private Long truckCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归属组织
|
||||||
|
*/
|
||||||
|
private Long truckOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆 Id
|
||||||
|
*/
|
||||||
|
private Long truckId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String truckLicensePlate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史皮重
|
||||||
|
*/
|
||||||
|
private Integer historyTareWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毛重;单位:千克
|
||||||
|
*/
|
||||||
|
private Integer roughWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 皮重;单位:千克
|
||||||
|
*/
|
||||||
|
private Integer tareWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 净重;单位:千克
|
||||||
|
*/
|
||||||
|
private Integer settleWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运距;单位:米
|
||||||
|
*/
|
||||||
|
private Integer transDistance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进场车头照片
|
||||||
|
*/
|
||||||
|
private String inFrontPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进场车斗照片
|
||||||
|
*/
|
||||||
|
private String inBodyPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出场车头照片
|
||||||
|
*/
|
||||||
|
private String outFrontPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出场车斗照片
|
||||||
|
*/
|
||||||
|
private String outBodyPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进场时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime inTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出场时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime outTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -179,12 +179,12 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
if (detail == null) return null;
|
if (detail == null) return null;
|
||||||
Long orderId = detail.getId();
|
Long orderId = detail.getId();
|
||||||
Long projectId = detail.getProjectId();
|
Long projectId = detail.getProjectId();
|
||||||
List<SearchOrderResult.TransRecode> transRecodeList = orderTransMapper.selectList(Wrappers.lambdaQuery(OrderTransEntity.class)
|
List<SearchOrderResult.TransRecode> transRecodeList = orderTransMapper.listTransRecode(Wrappers.query()
|
||||||
.eq(OrderTransEntity::getOrderId, orderId)
|
.eq("a.order_id", orderId)
|
||||||
.in("YuYue".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.DaiPaiDan, TransStatus.DaiJieDan)
|
.in("YuYue".equals(orderType), "a.trans_status", TransStatus.DaiPaiDan, TransStatus.DaiJieDan)
|
||||||
.in("ShiShi".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiJieDan, TransStatus.YunShuZhong, TransStatus.YiJinChang, TransStatus.YiChuChang)
|
.in("ShiShi".equals(orderType), "a.trans_status", TransStatus.YiJieDan, TransStatus.YunShuZhong, TransStatus.YiJinChang, TransStatus.YiChuChang)
|
||||||
.eq("LiShi".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiWanCheng)
|
.eq("LiShi".equals(orderType), "a.trans_status", TransStatus.YiWanCheng)
|
||||||
.eq("QuXiao".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiQuXiao)
|
.eq("QuXiao".equals(orderType), "a.trans_status", TransStatus.YiQuXiao)
|
||||||
)
|
)
|
||||||
.stream()
|
.stream()
|
||||||
.map(it -> BeanUtil.copyProperties(it, SearchOrderResult.TransRecode.class))
|
.map(it -> BeanUtil.copyProperties(it, SearchOrderResult.TransRecode.class))
|
||||||
|
|
@ -261,12 +261,12 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
if (results.isEmpty()) return PageResult.of(resultPage);
|
if (results.isEmpty()) return PageResult.of(resultPage);
|
||||||
List<Long> orderIdList = results.stream().map(SearchOrderResult::getId).toList();
|
List<Long> orderIdList = results.stream().map(SearchOrderResult::getId).toList();
|
||||||
List<Long> projectIdList = results.stream().map(SearchOrderResult::getProjectId).filter(Objects::nonNull).toList();
|
List<Long> projectIdList = results.stream().map(SearchOrderResult::getProjectId).filter(Objects::nonNull).toList();
|
||||||
List<SearchOrderResult.TransRecode> transRecodes = orderTransMapper.selectList(Wrappers.lambdaQuery(OrderTransEntity.class)
|
List<SearchOrderResult.TransRecode> transRecodes = orderTransMapper.listTransRecode(Wrappers.query()
|
||||||
.in(OrderTransEntity::getOrderId, orderIdList)
|
.in("a.order_id", orderIdList)
|
||||||
.in("YuYue".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.DaiPaiDan, TransStatus.DaiJieDan)
|
.in("YuYue".equals(orderType), "a.trans_status", TransStatus.DaiPaiDan, TransStatus.DaiJieDan)
|
||||||
.in("ShiShi".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiJieDan, TransStatus.YunShuZhong, TransStatus.YiJinChang, TransStatus.YiChuChang)
|
.in("ShiShi".equals(orderType), "a.trans_status", TransStatus.YiJieDan, TransStatus.YunShuZhong, TransStatus.YiJinChang, TransStatus.YiChuChang)
|
||||||
.eq("LiShi".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiWanCheng)
|
.eq("LiShi".equals(orderType), "a.trans_status", TransStatus.YiWanCheng)
|
||||||
.eq("QuXiao".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiQuXiao)
|
.eq("QuXiao".equals(orderType), "a.trans_status", TransStatus.YiQuXiao)
|
||||||
)
|
)
|
||||||
.stream()
|
.stream()
|
||||||
.map(it -> BeanUtil.copyProperties(it, SearchOrderResult.TransRecode.class))
|
.map(it -> BeanUtil.copyProperties(it, SearchOrderResult.TransRecode.class))
|
||||||
|
|
|
||||||
|
|
@ -153,5 +153,48 @@
|
||||||
LEFT JOIN cst_driver cd ON cd.id = cot.driver_id
|
LEFT JOIN cst_driver cd ON cd.id = cot.driver_id
|
||||||
WHERE cot.order_id = #{orderId}
|
WHERE cot.order_id = #{orderId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="listTransRecode"
|
||||||
|
resultType="com.njzscloud.dispose.cst.order.pojo.result.SearchOrderTransResult">
|
||||||
|
SELECT
|
||||||
|
a.id,
|
||||||
|
a.train_num,
|
||||||
|
a.order_id,
|
||||||
|
a.trans_status,
|
||||||
|
a.lane,
|
||||||
|
a.assignment_driver_time,
|
||||||
|
a.driver_confirm_time,
|
||||||
|
a.trans_time,
|
||||||
|
a.finish_time,
|
||||||
|
a.checker_id,
|
||||||
|
a.check_status,
|
||||||
|
a.check_time,
|
||||||
|
a.check_photo,
|
||||||
|
a.checker_memo,
|
||||||
|
a.driver_id,
|
||||||
|
a.driver_customer_id,
|
||||||
|
a.driver_user_id,
|
||||||
|
a.truck_customer_id,
|
||||||
|
a.truck_org_id,
|
||||||
|
a.truck_id,
|
||||||
|
a.truck_license_plate,
|
||||||
|
a.history_tare_weight,
|
||||||
|
a.rough_weight,
|
||||||
|
a.tare_weight,
|
||||||
|
a.settle_weight,
|
||||||
|
a.trans_distance,
|
||||||
|
a.in_front_photo,
|
||||||
|
a.in_body_photo,
|
||||||
|
a.out_front_photo,
|
||||||
|
a.out_body_photo,
|
||||||
|
a.in_time,
|
||||||
|
a.out_time,
|
||||||
|
b.driver_name,
|
||||||
|
b.phone driver_phone
|
||||||
|
FROM cst_order_trans a
|
||||||
|
LEFT JOIN cst_driver b ON b.id = a.driver_id
|
||||||
|
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue