|
|
|
@ -208,10 +208,24 @@ public class ShopOrderController extends AbstractController { |
|
|
|
public Object searchProductionDispatchList(@RequestBody SearchProductionDispatchListData indata) { |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
try { |
|
|
|
// 计算OFFSET值(页码从1开始,OFFSET从0开始) |
|
|
|
if (indata.getPage() != null && indata.getLimit() != null) { |
|
|
|
indata.setPage((indata.getPage() - 1) * indata.getLimit()); |
|
|
|
} |
|
|
|
|
|
|
|
List<SearchProductionDispatchListData> result = shopOrderService.searchProductionDispatchList(indata); |
|
|
|
|
|
|
|
// 获取总记录数(从第一条记录中获取) |
|
|
|
int total = 0; |
|
|
|
if (result != null && !result.isEmpty() && result.get(0).getTotalCount() != null) { |
|
|
|
total = result.get(0).getTotalCount(); |
|
|
|
} else if (result != null) { |
|
|
|
total = result.size(); |
|
|
|
} |
|
|
|
|
|
|
|
map.put("success", true); |
|
|
|
map.put("rows", result); |
|
|
|
map.put("total", result.size()); |
|
|
|
map.put("total", total); |
|
|
|
} catch (Exception e) { |
|
|
|
map.put("success", false); |
|
|
|
map.put("msg", e.getMessage()); |
|
|
|
|