|
@@ -68,13 +68,33 @@ public class ReportService {
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @desc : 销售汇总表
|
|
|
|
|
|
|
+ * @desc : 销售汇总表
|
|
|
* @author : 王英杰
|
|
* @author : 王英杰
|
|
|
- * @date : 2024/4/26 16:43
|
|
|
|
|
|
|
+ * @date : 2024/4/26 16:43
|
|
|
*/
|
|
*/
|
|
|
- public List<Map<String, Object>> getSalesumReport(int param1, int param2, int param3, String startDate, String endDate) {
|
|
|
|
|
- String sql = "SELECT * FROM dkic_b.f_get_order_summary(?, ?, ?, ?, ?)";
|
|
|
|
|
- return jdbcTemplate.queryForList(sql, param1, param2, param3, startDate, endDate);
|
|
|
|
|
|
|
+ public ResponseResultVO<Map<String, Object>> getOrderSummary(Map<String, Object> param) {
|
|
|
|
|
+ if (param.get("querys") != null) {
|
|
|
|
|
+ JSONObject querys = JSONObject.parseObject(param.get("querys").toString());
|
|
|
|
|
+ param.put("querys", querys);
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<String, Object> m = reportMapper.getOrderSummary(param);
|
|
|
|
|
+ JSONObject jObject = JSONObject.parseObject(m.get("f_get_order_summary").toString());
|
|
|
|
|
+ return ResponseResultUtil.success(jObject);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 销售汇总表明细
|
|
|
|
|
+ * @author : 付斌
|
|
|
|
|
+ * @date : 2024/4/26 16:43
|
|
|
|
|
+ */
|
|
|
|
|
+ public ResponseResultVO<Map<String, Object>> getOrderSummaryItem(Map<String, Object> param) {
|
|
|
|
|
+ if (param.get("querys") != null) {
|
|
|
|
|
+ JSONObject querys = JSONObject.parseObject(param.get("querys").toString());
|
|
|
|
|
+ param.put("querys", querys);
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<String, Object> m = reportMapper.getOrderSummaryItem(param);
|
|
|
|
|
+ JSONObject jObject = JSONObject.parseObject(m.get("f_get_order_summary_item").toString());
|
|
|
|
|
+ return ResponseResultUtil.success(jObject);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -778,8 +798,8 @@ public class ReportService {
|
|
|
// map.put("item", userArrearsItem);
|
|
// map.put("item", userArrearsItem);
|
|
|
map.put("arrears", total);
|
|
map.put("arrears", total);
|
|
|
}
|
|
}
|
|
|
- if(params.get("sort") != null) {
|
|
|
|
|
- switch (String.valueOf(params.get("sort"))){
|
|
|
|
|
|
|
+ if (params.get("sort") != null) {
|
|
|
|
|
+ switch (String.valueOf(params.get("sort"))) {
|
|
|
case "order":
|
|
case "order":
|
|
|
arrears = arrears.stream()
|
|
arrears = arrears.stream()
|
|
|
.sorted(Comparator.comparingDouble((Map map) -> Double.valueOf(String.valueOf(map.get("arrears")))))
|
|
.sorted(Comparator.comparingDouble((Map map) -> Double.valueOf(String.valueOf(map.get("arrears")))))
|
|
@@ -812,7 +832,7 @@ public class ReportService {
|
|
|
overviewList.add(debt);
|
|
overviewList.add(debt);
|
|
|
overviewList.addAll(arrears);
|
|
overviewList.addAll(arrears);
|
|
|
return ResponseResultUtil.success(overviewList);
|
|
return ResponseResultUtil.success(overviewList);
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
return ResponseResultUtil.success(arrears);
|
|
return ResponseResultUtil.success(arrears);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -997,9 +1017,9 @@ public class ReportService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @desc : 查询销售利润
|
|
|
|
|
|
|
+ * @desc : 查询销售利润
|
|
|
* @author : 洪旭东
|
|
* @author : 洪旭东
|
|
|
- * @date : 2024-06-07 16:48
|
|
|
|
|
|
|
+ * @date : 2024-06-07 16:48
|
|
|
*/
|
|
*/
|
|
|
public ResponseResultVO<Map<String, Object>> getSaleProfit(Map<String, Object> param) {
|
|
public ResponseResultVO<Map<String, Object>> getSaleProfit(Map<String, Object> param) {
|
|
|
Map<String, Object> res = new HashMap<>();
|
|
Map<String, Object> res = new HashMap<>();
|
|
@@ -1022,9 +1042,9 @@ public class ReportService {
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @desc : 查询部门利润
|
|
|
|
|
|
|
+ * @desc : 查询部门利润
|
|
|
* @author : 洪旭东
|
|
* @author : 洪旭东
|
|
|
- * @date : 2024-06-07 16:48
|
|
|
|
|
|
|
+ * @date : 2024-06-07 16:48
|
|
|
*/
|
|
*/
|
|
|
public ResponseResultVO<Map<String, Object>> getSaleProfitGroupByOrg(Map<String, Object> param) {
|
|
public ResponseResultVO<Map<String, Object>> getSaleProfitGroupByOrg(Map<String, Object> param) {
|
|
|
Map<String, Object> res = new HashMap<>();
|
|
Map<String, Object> res = new HashMap<>();
|
|
@@ -1034,9 +1054,9 @@ public class ReportService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @desc : 查询业务员利润
|
|
|
|
|
|
|
+ * @desc : 查询业务员利润
|
|
|
* @author : 洪旭东
|
|
* @author : 洪旭东
|
|
|
- * @date : 2024-06-07 16:48
|
|
|
|
|
|
|
+ * @date : 2024-06-07 16:48
|
|
|
*/
|
|
*/
|
|
|
public ResponseResultVO<Map<String, Object>> getSaleProfitGroupByStaff(Map<String, Object> param) {
|
|
public ResponseResultVO<Map<String, Object>> getSaleProfitGroupByStaff(Map<String, Object> param) {
|
|
|
Map<String, Object> res = new HashMap<>();
|
|
Map<String, Object> res = new HashMap<>();
|
|
@@ -1046,9 +1066,9 @@ public class ReportService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @desc : 查询商品利润
|
|
|
|
|
|
|
+ * @desc : 查询商品利润
|
|
|
* @author : 洪旭东
|
|
* @author : 洪旭东
|
|
|
- * @date : 2024-06-07 16:48
|
|
|
|
|
|
|
+ * @date : 2024-06-07 16:48
|
|
|
*/
|
|
*/
|
|
|
public ResponseResultVO<Map<String, Object>> getSaleProfitGroupBySku(Map<String, Object> param) {
|
|
public ResponseResultVO<Map<String, Object>> getSaleProfitGroupBySku(Map<String, Object> param) {
|
|
|
Map<String, Object> res = new HashMap<>();
|
|
Map<String, Object> res = new HashMap<>();
|
|
@@ -1058,9 +1078,9 @@ public class ReportService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @desc : 经营概况
|
|
|
|
|
|
|
+ * @desc : 经营概况
|
|
|
* @author : 常皓宁
|
|
* @author : 常皓宁
|
|
|
- * @date : 2024/7/2 8:55
|
|
|
|
|
|
|
+ * @date : 2024/7/2 8:55
|
|
|
*/
|
|
*/
|
|
|
public ResponseResultVO<Map<String, Object>> getBusinessOverview(Map<String, Object> param) {
|
|
public ResponseResultVO<Map<String, Object>> getBusinessOverview(Map<String, Object> param) {
|
|
|
if (param.get("querys") != null) {
|
|
if (param.get("querys") != null) {
|