|
|
@@ -110,24 +110,28 @@ public class ProduceOrderController extends CommonController{
|
|
|
String endDate = getPara("enddate");
|
|
|
|
|
|
if(!WxUtil.isNull(OrderNo)){
|
|
|
- whereSql += " and OrderNo = '"+OrderNo+"' ";
|
|
|
+ whereSql += " and a.OrderNo = '"+OrderNo+"' ";
|
|
|
}
|
|
|
|
|
|
if(!WxUtil.isNull(LicensePlate)){
|
|
|
- whereSql += " and LicensePlate = '"+LicensePlate+"' ";
|
|
|
+ whereSql += " and a.LicensePlate = '"+LicensePlate+"' ";
|
|
|
}
|
|
|
|
|
|
if(!WxUtil.isNull(endDate)){
|
|
|
- whereSql += " and DeliveryTime <= '"+endDate+"' ";
|
|
|
+ endDate = endDate+ " 23:59:59";
|
|
|
+ whereSql += " and a.DeliveryTime <= '"+endDate+"' ";
|
|
|
}
|
|
|
|
|
|
if(!WxUtil.isNull(startdate)){
|
|
|
- whereSql += " and DeliveryTime >= '"+startdate+"' ";
|
|
|
+ startdate = startdate+ " 00:00:00";
|
|
|
+ whereSql += " and a.DeliveryTime >= '"+startdate+"' ";
|
|
|
}
|
|
|
|
|
|
Long total = Db.queryLong("select count(*) from deliveryorders");
|
|
|
-
|
|
|
- List<Record> find = Db.find("select * from deliveryorders "+whereSql+" order by DeliveryTime desc limit "+pageStart+","+pageSize);
|
|
|
+
|
|
|
+ String columns = " b.pinxiang AS ProductName, a.LicensePlate AS LicensePlate, a.CaseCode AS CaseCode, a.OrderNo AS OrderNo, a.SKUNo AS SKUNo, a.WarehouseID AS WarehouseID, a.CustomerNo AS CustomerNo, a.OperateUser AS OperateUser, a.DeliveryTime AS DeliveryTime, a.PalletCode AS PalletCode, a.ProductNo AS ProductNo, a.OutWarehouseNo AS OutWarehouseNo, a.OutWarehouse AS OutWarehouse, a.id AS id, a.CustomerName AS CustomerName, b.sku AS SKU";
|
|
|
+
|
|
|
+ List<Record> find = Db.find("select "+columns+" from deliveryorders a left join jinzai_upload_master b on a.CaseCode = b.id "+whereSql+" order by a.DeliveryTime desc limit "+pageStart+","+pageSize);
|
|
|
|
|
|
Record r = new Record();
|
|
|
r.set("rows", find);
|