|
@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -169,12 +170,22 @@ public class InvoiceInfoController {
|
|
|
}
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
- sortList.add(new Sort("id_","asc"));
|
|
|
+ sortList.add(new Sort("order_number","asc"));
|
|
|
+ sortList.add(new Sort("bar_code","asc"));
|
|
|
|
|
|
+ BigDecimal total = new BigDecimal(0);
|
|
|
Page<InvoiceInfo> page = invoiceInfoService.pageSearch(searchParams,1,1000,false,sortList);
|
|
|
+ for(InvoiceInfo info : page.getResult()) {
|
|
|
+ total = total.add(info.getGrossWeight());
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("total",total);
|
|
|
+ map.put("count",page.size());
|
|
|
+ map.put("list",page.getResult());
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
- msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+ msgResult.setData(map);
|
|
|
|
|
|
return msgResult;
|
|
|
}
|