日明细表客户快捷选择组件选择父节点问题
parent
2f8c9df763
commit
d5dcd9c38b
|
|
@ -743,5 +743,28 @@ public abstract class BaseTransport<M extends BaseTransport<M>> extends BaseMode
|
||||||
return getInt("state");
|
return getInt("state");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* name: flag
|
||||||
|
* type: SMALLINT(2)
|
||||||
|
* isNullable: NO
|
||||||
|
* isPrimaryKey: NO
|
||||||
|
* defaultValue: 0
|
||||||
|
*
|
||||||
|
* @param flag 0:正常,1:取消出厂
|
||||||
|
*/
|
||||||
|
@JSONField(name = "flag")
|
||||||
|
public void setFlag(Integer flag) {
|
||||||
|
set("flag", flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return flag 0:正常,1:取消出厂
|
||||||
|
*/
|
||||||
|
@JSONField(name = "flag")
|
||||||
|
public Integer getFlag() {
|
||||||
|
return getInt("flag");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,8 @@ public class OrderStatService {
|
||||||
String truck_license,
|
String truck_license,
|
||||||
Integer isprepaid,
|
Integer isprepaid,
|
||||||
Integer product_id,
|
Integer product_id,
|
||||||
String sn
|
String sn,
|
||||||
|
Integer customer_type_id
|
||||||
) {
|
) {
|
||||||
String temp_sql = " select\n" +
|
String temp_sql = " select\n" +
|
||||||
" t.sn\n" +
|
" t.sn\n" +
|
||||||
|
|
@ -66,9 +67,10 @@ public class OrderStatService {
|
||||||
" , t.create_time \n" +
|
" , t.create_time \n" +
|
||||||
" , t.product_id \n" +
|
" , t.product_id \n" +
|
||||||
" , t.product_name \n" +
|
" , t.product_name \n" +
|
||||||
" , p.in_time, p.out_time, p.first_weight, p.second_weight \n" +
|
" , p.in_time, p.out_time, p.first_weight, p.second_weight, c.customer_type_id \n" +
|
||||||
" from order_temp t\n" +
|
" from order_temp t\n" +
|
||||||
" left join transport p on p.order_sn = t.sn \n" +
|
" left join transport p on p.order_sn = t.sn \n" +
|
||||||
|
" left join customer c on c.id = t.customer_id \n" +
|
||||||
" where t.state = ? \n" +
|
" where t.state = ? \n" +
|
||||||
" and t.create_time like ? \n";
|
" and t.create_time like ? \n";
|
||||||
|
|
||||||
|
|
@ -94,6 +96,16 @@ public class OrderStatService {
|
||||||
if (customer_id != null && customer_id > 0) {
|
if (customer_id != null && customer_id > 0) {
|
||||||
temp_sql += " and t.customer_id = ? \n";
|
temp_sql += " and t.customer_id = ? \n";
|
||||||
paraTempList.add(customer_id);
|
paraTempList.add(customer_id);
|
||||||
|
} else {
|
||||||
|
if (customer_type_id != null && customer_type_id > 0 && customer_type_id != 99) {
|
||||||
|
temp_sql += " and c.customer_type_id = ? \n";
|
||||||
|
paraTempList.add(customer_type_id);
|
||||||
|
} else if(customer_type_id != null && customer_type_id == 99) {
|
||||||
|
temp_sql += " and t.customer_id is null \n";
|
||||||
|
} else if (StrKit.notBlank(customer_name) && customer_type_id == null) {
|
||||||
|
temp_sql += " and t.customer_name like ? \n";
|
||||||
|
paraTempList.add("%" + customer_name.trim() + "%");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (product_id != null && product_id > 0) {
|
if (product_id != null && product_id > 0) {
|
||||||
|
|
@ -101,11 +113,6 @@ public class OrderStatService {
|
||||||
paraTempList.add(product_id);
|
paraTempList.add(product_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrKit.notBlank(customer_name)) {
|
|
||||||
temp_sql += " and t.customer_name like ? \n";
|
|
||||||
paraTempList.add("%" + customer_name.trim() + "%");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StrKit.notBlank(truck_license)) {
|
if (StrKit.notBlank(truck_license)) {
|
||||||
temp_sql += " and t.truck_license like ? \n";
|
temp_sql += " and t.truck_license like ? \n";
|
||||||
paraTempList.add("%" + truck_license.trim() + "%");
|
paraTempList.add("%" + truck_license.trim() + "%");
|
||||||
|
|
@ -136,7 +143,7 @@ public class OrderStatService {
|
||||||
" , a.isprepaid\n" +
|
" , a.isprepaid\n" +
|
||||||
" , a.product_id \n" +
|
" , a.product_id \n" +
|
||||||
" , a.product_name \n" +
|
" , a.product_name \n" +
|
||||||
" , a.in_time, a.out_time, a.first_weight, a.second_weight \n" +
|
" , a.in_time, a.out_time, a.first_weight, a.second_weight, a.customer_type_id \n" +
|
||||||
" from( \n";
|
" from( \n";
|
||||||
|
|
||||||
if (null == type) {
|
if (null == type) {
|
||||||
|
|
@ -163,7 +170,8 @@ public class OrderStatService {
|
||||||
String truck_license,
|
String truck_license,
|
||||||
Integer isprepaid,
|
Integer isprepaid,
|
||||||
Integer product_id,
|
Integer product_id,
|
||||||
String sn
|
String sn,
|
||||||
|
Integer customer_type_id
|
||||||
) {
|
) {
|
||||||
List<Record> list = daydetail(tm,
|
List<Record> list = daydetail(tm,
|
||||||
supermarket_id,
|
supermarket_id,
|
||||||
|
|
@ -174,7 +182,9 @@ public class OrderStatService {
|
||||||
truck_license,
|
truck_license,
|
||||||
isprepaid,
|
isprepaid,
|
||||||
product_id,
|
product_id,
|
||||||
sn);
|
sn,
|
||||||
|
customer_type_id
|
||||||
|
);
|
||||||
|
|
||||||
list.sort(new Comparator<Record>() {
|
list.sort(new Comparator<Record>() {
|
||||||
public int compare(Record o1, Record o2) {
|
public int compare(Record o1, Record o2) {
|
||||||
|
|
@ -1741,7 +1751,7 @@ public class OrderStatService {
|
||||||
" left join prepay_customer p on p.customer_id = a.id", paramsArray.toArray());
|
" left join prepay_customer p on p.customer_id = a.id", paramsArray.toArray());
|
||||||
}else {
|
}else {
|
||||||
list = Db.find("select c.id, ifnull(c.name, '零散') name, a.*, p.surplus total_surplus from (\n" +
|
list = Db.find("select c.id, ifnull(c.name, '零散') name, a.*, p.surplus total_surplus from (\n" +
|
||||||
" select ifnull(t.customer_id, -1) id,, count(t.sn) cnt, sum(t.total_price) total_price, sum(weight) total_weight from order_temp t\n" +
|
" select ifnull(t.customer_id, -1) id, count(t.sn) cnt, sum(t.total_price) total_price, sum(weight) total_weight from order_temp t\n" +
|
||||||
" where t.state = 5\n" +
|
" where t.state = 5\n" +
|
||||||
" and t.create_time >= ? \n" +
|
" and t.create_time >= ? \n" +
|
||||||
" and t.create_time <= ? \n" +
|
" and t.create_time <= ? \n" +
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ public class OrderStatController extends BaseController {
|
||||||
Integer type = getInt("type");
|
Integer type = getInt("type");
|
||||||
Integer isprepaid = getInt("isprepaid");
|
Integer isprepaid = getInt("isprepaid");
|
||||||
Integer product_id = getInt("product_id");
|
Integer product_id = getInt("product_id");
|
||||||
|
Integer customer_type_id = getInt("customer_type_id");
|
||||||
|
|
||||||
int export = getInt("export", 0); // 是否导出为exce 0 不导出,1 导出
|
int export = getInt("export", 0); // 是否导出为exce 0 不导出,1 导出
|
||||||
|
|
||||||
|
|
@ -41,7 +42,8 @@ public class OrderStatController extends BaseController {
|
||||||
truck_license,
|
truck_license,
|
||||||
isprepaid,
|
isprepaid,
|
||||||
product_id,
|
product_id,
|
||||||
sn
|
sn,
|
||||||
|
customer_type_id
|
||||||
)));
|
)));
|
||||||
} else {
|
} else {
|
||||||
Workbook wb = OrderStatService.me.daydetailExport(
|
Workbook wb = OrderStatService.me.daydetailExport(
|
||||||
|
|
@ -54,7 +56,8 @@ public class OrderStatController extends BaseController {
|
||||||
truck_license,
|
truck_license,
|
||||||
isprepaid,
|
isprepaid,
|
||||||
product_id,
|
product_id,
|
||||||
sn
|
sn,
|
||||||
|
customer_type_id
|
||||||
);
|
);
|
||||||
render(new ExcelRender(tm + "_日销售明细_" + System.currentTimeMillis() + ".xlsx", wb));
|
render(new ExcelRender(tm + "_日销售明细_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ public class OrderStatController extends BaseController {
|
||||||
Integer type = getInt("type");
|
Integer type = getInt("type");
|
||||||
Integer isprepaid = getInt("isprepaid");
|
Integer isprepaid = getInt("isprepaid");
|
||||||
Integer product_id = getInt("product_id");
|
Integer product_id = getInt("product_id");
|
||||||
|
Integer customer_type_id = getInt("customer_type_id");
|
||||||
|
|
||||||
int export = getInt("export", 0); // 是否导出为exce 0 不导出,1 导出
|
int export = getInt("export", 0); // 是否导出为exce 0 不导出,1 导出
|
||||||
|
|
||||||
|
|
@ -58,7 +59,8 @@ public class OrderStatController extends BaseController {
|
||||||
truck_license,
|
truck_license,
|
||||||
isprepaid,
|
isprepaid,
|
||||||
product_id,
|
product_id,
|
||||||
sn
|
sn,
|
||||||
|
customer_type_id
|
||||||
)));
|
)));
|
||||||
} else {
|
} else {
|
||||||
Workbook wb = OrderStatService.me.daydetailExport(
|
Workbook wb = OrderStatService.me.daydetailExport(
|
||||||
|
|
@ -71,7 +73,8 @@ public class OrderStatController extends BaseController {
|
||||||
truck_license,
|
truck_license,
|
||||||
isprepaid,
|
isprepaid,
|
||||||
product_id,
|
product_id,
|
||||||
sn
|
sn,
|
||||||
|
customer_type_id
|
||||||
);
|
);
|
||||||
render(new ExcelRender(tm + "_日销售明细_" + System.currentTimeMillis() + ".xlsx", wb));
|
render(new ExcelRender(tm + "_日销售明细_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue