Commit a98a12ad by wangli

修改

1 parent 10996125
......@@ -102,13 +102,13 @@ public class WorkbenchServiceImpl implements WorkbenchService {
private List<Map<String, Object>> queryCountByOrderStatus(String levelType, String levelValue, LocalDate dt) {
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
wrapper.select("appointment_status, COUNT(*) as count")
wrapper.select("service_status, COUNT(*) as count")
.lambda()
.eq(OrderInfo::getDt, dt)
.eq(levelType.equals("cluster"), OrderInfo::getOrgClusterId, levelValue)
.eq(levelType.equals("branch"), OrderInfo::getOrgBranchId, levelValue)
.eq(levelType.equals("group"), OrderInfo::getOrgGroupId, levelValue)
.groupBy(OrderInfo::getAppointmentStatus);
.groupBy(OrderInfo::getServiceStatus);
return orderInfoMPDao.selectMaps(wrapper);
}
......@@ -147,7 +147,7 @@ public class WorkbenchServiceImpl implements WorkbenchService {
HashMap<String, Long> map = new HashMap<>();
for (Map<String, Object> result : results) {
String status = (String) result.get("appointment_status");
String status = (String) result.get("service_status");
Long count = (long) result.get("count");
map.put(status, count);
}
......@@ -164,7 +164,7 @@ public class WorkbenchServiceImpl implements WorkbenchService {
Long autoTotal = summary.getOrDefault("autoTotal", 0L);
Long total = summary.getOrDefault("total", 0L);
HashMap<String, List<String>> p = this.packParams("appointmentStatus", "NOT_ASSIGNED");
HashMap<String, List<String>> p = this.packParams("appointmentStatus", "INIT");
HashMap<String, List<String>> p1 = this.packParams("appointmentType", "MANUAL");
p1.putAll(p);
......@@ -182,20 +182,19 @@ public class WorkbenchServiceImpl implements WorkbenchService {
List<WorkbenchSummaryResp.ValueDTO> items = new ArrayList<>();
String urlName = ""; // 不返回,前端就不跳转了
Long assigned = summary.getOrDefault("ASSIGNED", 0L);
Long contacted = summary.getOrDefault("CONTACTED", 0L);
Long departed = summary.getOrDefault("DEPARTED", 0L);
Long dealing = assigned + contacted + departed;
Long assigned = summary.getOrDefault("INIT", 0L);
Long pending = summary.getOrDefault("PENDING", 0L);
Long dealing = assigned + pending;
Long started = summary.getOrDefault("STARTED", 0L);
Long cancel = summary.getOrDefault("CANCELED", 0L);
Long finished = summary.getOrDefault("FINISHED", 0L);
Long finished = summary.getOrDefault("FINISHED", 0L) + summary.getOrDefault("UNFINISHED", 0L);
Long cancel = 0L;
HashMap<String, List<String>> p1 = this.packParams("appointmentStatus", "ASSIGNED", "CONTACTED", "DEPARTED");
items.add(new WorkbenchSummaryResp.ValueDTO("待上门", dealing.toString(), null, "#469967", urlName, p1));
HashMap<String, List<String>> p2 = this.packParams("appointmentStatus", "STARTED");
items.add(new WorkbenchSummaryResp.ValueDTO("服务中", started.toString(), null, "#016FFF", urlName, p2));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!