修改订单查询

master
lzq 2025-09-02 02:12:27 +08:00
parent 70ebb733d7
commit 1c52eefe3b
5 changed files with 80 additions and 230 deletions

View File

@ -25,4 +25,6 @@ public interface SupervisionStatisticsMapper {
List<Order> getOrders();
List<Project> getProjects();
}

View File

@ -5,173 +5,27 @@ import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class Order {
private static final long serialVersionUID = 1L;
private Integer id;
private String orderNo;
private Integer userId;
private String carNumber;
private Integer goodsCategoryId;
private Integer goodsId;
private Byte unit;
private Integer tare;
private Integer weightRough;
private Integer weight;
private Integer deduct;
private Integer priceUnit;
private Integer priceTotal;
private Integer priceFix;
private Integer priceDiscount;
private Integer price;
private Byte status;
private Byte carStatus;
private Long carUpdated;
private String carInFront;
private String carInBody;
private String carOutFront;
private String carOutBody;
private Integer feeOil;
private String remark;
private Byte feeType;
private Byte whoPay;
private Byte type;
private Integer vipUser;
private Long createTime;
private Long updateTime;
private String laneId;
private Byte adminStatus;
private Long adminTime;
private Long payTime;
private Integer amountRefund;
private Byte vipCheck;
private Byte payType;
private String realname;
private String mobile;
private Integer klUid;
private String klNote;
private Integer payAmount;
private Byte doType;
private Byte finish;
private Byte ownerPay;
private Long inTime;
private Long outTime;
private Integer suffixNo;
private Integer companyId;
private String noteBf;
private String noteCw;
private Integer amount;
private Integer fare;
private Integer fareUnit;
private Byte fareType;
private Integer stationId;
private Byte weightCheck;
private String goodsCategoryName;
private String createTime;
private String orderStatus;
private String carNumber;
private String driverName;
private String goodsName;
private String companyName;
private Integer transferSid;
private Byte transferType;
private Integer qualityPrice;
private Integer elasticPrice;
private Byte useRole;
private Integer cube;
private Integer transferUid;
private Integer points;
private String tspPhotos;
private String zcPhotos;
private String company;
private String address;
private BigDecimal lon;
private BigDecimal lat;
private BigDecimal km;
private Integer transportUid;
private Integer driverUid;
private Long dispatchTime;
private Long workTime;
private Integer projectId;
private Integer communityId;
private String lon;
private String lat;
private String km;
private Integer finish;
private Integer carStatus;
private Integer status;
}

View File

@ -0,0 +1,22 @@
package com.njzscloud.supervisory.statistics.pojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class Project {
private String projectName;
private String area;
private String street;
private String address;
private String km;
private String realname;
private String mobile;
private Integer estimate;
private String projectStatus;
}

View File

@ -31,6 +31,7 @@ public class SupervisionStatisticsService {
List<CompanySummary> companySummary = supervisionStatisticsMapper.getCompanySummary();
List<StationInfo> stationInfo = supervisionStatisticsMapper.getStationInfo();
List<Order> orders = supervisionStatisticsMapper.getOrders();
List<Project> projects = supervisionStatisticsMapper.getProjects();
return MapUtil.<String, Object>builder()
.put("dispatchSummary", dispatchSummary == null ? new DispatchSummary() : dispatchSummary)
@ -42,6 +43,7 @@ public class SupervisionStatisticsService {
.put("companySummary", companySummary == null ? new ArrayList<>() : companySummary)
.put("stationInfo", stationInfo == null ? new ArrayList<>() : stationInfo)
.put("orders", orders == null ? new ArrayList<>() : orders)
.put("projects", projects == null ? new ArrayList<>() : projects)
.build();
}

View File

@ -103,86 +103,56 @@
<select id="getOrders" resultType="com.njzscloud.supervisory.statistics.pojo.Order">
SELECT a.order_no,
a.user_id,
d.realname,
d.mobile,
e.name goods_category_name,
FROM_UNIXTIME(a.create_time, '%Y-%m-%d %H:%i:%s') create_time,
IF(a.type = 5 AND a.finish = 0 AND a.car_number = '', '待派车',
IF(b.status = 1 AND a.status NOT IN (1, 4, 5), '未接单', IF(b.status = 2 AND a.status NOT IN (1, 4, 5), '运输中', IF(b.status = 3, '已完成',
CASE a.status
WHEN '0' THEN '待授权'
WHEN '1' THEN '已完成'
WHEN '2' THEN '待支付'
WHEN '3' THEN '待结算'
WHEN '4' THEN '已取消'
WHEN '5' THEN '已退款'
ELSE '未知'
END
)))) order_status,
a.car_number,
a.goods_category_id,
a.goods_id,
a.unit,
a.tare,
a.weight_rough,
a.weight,
a.deduct,
a.price_unit,
a.price_total,
a.price_fix,
a.price_discount,
a.price,
a.status,
a.car_status,
a.car_updated,
a.car_in_front,
a.car_in_body,
a.car_out_front,
a.car_out_body,
a.fee_oil,
a.remark,
a.fee_type,
a.who_pay,
a.type,
a.vip_user,
a.create_time,
a.update_time,
a.lane_id,
a.admin_status,
a.admin_time,
a.pay_time,
a.amount_refund,
a.vip_check,
a.pay_type,
a.mobile,
a.kl_uid,
a.kl_note,
a.pay_amount,
a.do_type,
a.finish,
a.owner_pay,
a.in_time,
a.out_time,
a.suffix_no,
a.company_id,
a.note_bf,
a.note_cw,
a.amount,
a.fare,
a.fare_unit,
a.fare_type,
a.station_id,
a.weight_check,
f.realname driver_name,
a.goods_name,
a.company_name,
a.transfer_sid,
a.transfer_type,
a.quality_price,
a.elastic_price,
a.use_role,
a.`cube`,
a.transfer_uid,
a.points,
c.company,
b.address,
b.lon,
b.lat,
b.km,
b.transport_uid,
b.driver_uid,
b.dispatch_time,
b.fare,
b.work_time,
b.project_id,
b.community_id
a.finish,
a.car_status,
a.status
FROM ba_order a
INNER JOIN ba_order_dispatch b ON b.order_no = a.order_no
LEFT JOIN ba_user c ON c.id = b.transport_uid
LEFT JOIN ba_user d ON d.id = a.user_id
LEFT JOIN ba_user f ON f.id = b.driver_uid
LEFT JOIN ba_goods_category e ON e.id = a.goods_category_id
WHERE a.status IN (0, 1, 2, 3)
ORDER BY a.create_time DESC
LIMIT 50
</select>
<select id="getProjects" resultType="com.njzscloud.supervisory.statistics.pojo.Project">
SELECT g.name project_name,
g.area,
g.street,
g.address,
g.km,
g.estimate,
c.realname,
c.mobile
FROM ba_project g
LEFT JOIN ba_user c ON c.id = g.user_id
ORDER BY g.create_time DESC
LIMIT 10
</select>
</mapper>