修改订单查询
parent
70ebb733d7
commit
1c52eefe3b
|
|
@ -25,4 +25,6 @@ public interface SupervisionStatisticsMapper {
|
||||||
|
|
||||||
List<Order> getOrders();
|
List<Order> getOrders();
|
||||||
|
|
||||||
|
List<Project> getProjects();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,173 +5,27 @@ import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class Order {
|
public class Order {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
private String realname;
|
||||||
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 mobile;
|
private String mobile;
|
||||||
|
private String goodsCategoryName;
|
||||||
private Integer klUid;
|
private String createTime;
|
||||||
|
private String orderStatus;
|
||||||
private String klNote;
|
private String carNumber;
|
||||||
|
private String driverName;
|
||||||
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 goodsName;
|
private String goodsName;
|
||||||
|
private String company;
|
||||||
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 address;
|
private String address;
|
||||||
|
private String lon;
|
||||||
private BigDecimal lon;
|
private String lat;
|
||||||
|
private String km;
|
||||||
private BigDecimal lat;
|
private Integer finish;
|
||||||
|
private Integer carStatus;
|
||||||
private BigDecimal km;
|
private Integer status;
|
||||||
|
|
||||||
private Integer transportUid;
|
|
||||||
|
|
||||||
private Integer driverUid;
|
|
||||||
|
|
||||||
|
|
||||||
private Long dispatchTime;
|
|
||||||
|
|
||||||
|
|
||||||
private Long workTime;
|
|
||||||
|
|
||||||
private Integer projectId;
|
|
||||||
|
|
||||||
private Integer communityId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -31,6 +31,7 @@ public class SupervisionStatisticsService {
|
||||||
List<CompanySummary> companySummary = supervisionStatisticsMapper.getCompanySummary();
|
List<CompanySummary> companySummary = supervisionStatisticsMapper.getCompanySummary();
|
||||||
List<StationInfo> stationInfo = supervisionStatisticsMapper.getStationInfo();
|
List<StationInfo> stationInfo = supervisionStatisticsMapper.getStationInfo();
|
||||||
List<Order> orders = supervisionStatisticsMapper.getOrders();
|
List<Order> orders = supervisionStatisticsMapper.getOrders();
|
||||||
|
List<Project> projects = supervisionStatisticsMapper.getProjects();
|
||||||
|
|
||||||
return MapUtil.<String, Object>builder()
|
return MapUtil.<String, Object>builder()
|
||||||
.put("dispatchSummary", dispatchSummary == null ? new DispatchSummary() : dispatchSummary)
|
.put("dispatchSummary", dispatchSummary == null ? new DispatchSummary() : dispatchSummary)
|
||||||
|
|
@ -42,6 +43,7 @@ public class SupervisionStatisticsService {
|
||||||
.put("companySummary", companySummary == null ? new ArrayList<>() : companySummary)
|
.put("companySummary", companySummary == null ? new ArrayList<>() : companySummary)
|
||||||
.put("stationInfo", stationInfo == null ? new ArrayList<>() : stationInfo)
|
.put("stationInfo", stationInfo == null ? new ArrayList<>() : stationInfo)
|
||||||
.put("orders", orders == null ? new ArrayList<>() : orders)
|
.put("orders", orders == null ? new ArrayList<>() : orders)
|
||||||
|
.put("projects", projects == null ? new ArrayList<>() : projects)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,86 +103,56 @@
|
||||||
|
|
||||||
<select id="getOrders" resultType="com.njzscloud.supervisory.statistics.pojo.Order">
|
<select id="getOrders" resultType="com.njzscloud.supervisory.statistics.pojo.Order">
|
||||||
SELECT a.order_no,
|
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.car_number,
|
||||||
a.goods_category_id,
|
f.realname driver_name,
|
||||||
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,
|
|
||||||
a.goods_name,
|
a.goods_name,
|
||||||
a.company_name,
|
c.company,
|
||||||
a.transfer_sid,
|
|
||||||
a.transfer_type,
|
|
||||||
a.quality_price,
|
|
||||||
a.elastic_price,
|
|
||||||
a.use_role,
|
|
||||||
a.`cube`,
|
|
||||||
a.transfer_uid,
|
|
||||||
a.points,
|
|
||||||
|
|
||||||
b.address,
|
b.address,
|
||||||
b.lon,
|
b.lon,
|
||||||
b.lat,
|
b.lat,
|
||||||
b.km,
|
b.km,
|
||||||
b.transport_uid,
|
a.finish,
|
||||||
b.driver_uid,
|
a.car_status,
|
||||||
b.dispatch_time,
|
a.status
|
||||||
b.fare,
|
|
||||||
b.work_time,
|
|
||||||
b.project_id,
|
|
||||||
b.community_id
|
|
||||||
FROM ba_order a
|
FROM ba_order a
|
||||||
INNER JOIN ba_order_dispatch b ON b.order_no = a.order_no
|
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
|
ORDER BY a.create_time DESC
|
||||||
LIMIT 50
|
LIMIT 50
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue