|
@@ -36,10 +36,10 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
Integer pageSize = pageDomain.getPageSize();
|
|
|
String condition = "";
|
|
|
if (!ObjectUtils.isEmpty(order.getOrderNum())) {
|
|
|
- condition += "and find_in_set(fo.order_num ,'" + order.getOrderNum() + "')";
|
|
|
+ condition += "and fo.order_num like '%" + order.getOrderNum() + "%'";
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(order.getOrderName())) {
|
|
|
- condition += "and find_in_set(fo.order_name , '" + order.getOrderName() + "')";
|
|
|
+ condition += "and fo.order_name like '%" + order.getOrderName() + "%'";
|
|
|
}
|
|
|
if ("已逾期".equals(order.getStatus())) {
|
|
|
condition += "and fo.overdue like '%逾期%'";
|
|
@@ -88,7 +88,9 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
item.setStatus("已逾期");
|
|
|
}
|
|
|
}
|
|
|
- count = template.queryForObject("SELECT count(*) FROM t_factory_order;" , Integer.class);
|
|
|
+ count = template.queryForObject("SELECT count(fo.id) FROM t_factory_order fo " +
|
|
|
+ "left join t_transport_order tto on fo.order_num = tto.order_num " +
|
|
|
+ "where 1=1 " + (ObjectUtils.isEmpty(condition) ? "" : condition)+";" , Integer.class);
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e.getMessage());
|
|
|
}
|
|
@@ -139,13 +141,13 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
Integer pageSize = pageDomain.getPageSize();
|
|
|
String condition = "";
|
|
|
if (!ObjectUtils.isEmpty(device.getEquipmentName())) {
|
|
|
- condition += "and find_in_set(equipment_name ,'" + device.getEquipmentName() + "')";
|
|
|
+ condition += "and equipment_name like '%" + device.getEquipmentName() + "%'";
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(device.getEquipmentCode())) {
|
|
|
- condition += "and find_in_set(equipment_code , '" + device.getEquipmentCode() + "')";
|
|
|
+ condition += "and equipment_code like '%" + device.getEquipmentCode() + "%'";
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(device.getModel())) {
|
|
|
- condition += "and find_in_set(equipment_code , '" + device.getModel() + "')";
|
|
|
+ condition += "and equipment_code like '%" + device.getModel() + "%'";
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(device.getEnterpriseName())) {
|
|
|
condition += "and order_status = " + device.getEnterpriseName();
|
|
@@ -181,11 +183,6 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult deviceDetails(Device device) {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
public AjaxResult accounting() {
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
try {
|
|
@@ -195,6 +192,8 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
dataSource.setUsername("db_cdyq6tkqn1ioja179i8b");
|
|
|
dataSource.setPassword("By@#5c9i75sgtx3b620g6m6e");
|
|
|
JdbcTemplate template = new JdbcTemplate(dataSource);
|
|
|
+ int count0 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
|
|
|
+ "left join t_transport_order tto on fo.order_num = tto.order_num ;" , Integer.class);
|
|
|
int count1 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
|
|
|
"left join t_transport_order tto on fo.order_num = tto.order_num where fo.overdue like '%逾期%' ;" , Integer.class);
|
|
|
int count2 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
|
|
@@ -203,6 +202,7 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
"left join t_transport_order tto on fo.order_num = tto.order_num where tto.shipping_status = 1 ;" , Integer.class);
|
|
|
int count4 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
|
|
|
"left join t_transport_order tto on fo.order_num = tto.order_num where tto.shipping_status = 2 ;" , Integer.class);
|
|
|
+ map.put("count0" , count0 + "");
|
|
|
map.put("count1" , count1 + "");
|
|
|
map.put("count2" , count2 + "");
|
|
|
map.put("count3" , count3 + "");
|
|
@@ -212,4 +212,10 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
}
|
|
|
return AjaxResult.success(map);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public AjaxResult deviceDetails(Device device) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
}
|