|
|
|
@ -0,0 +1,62 @@ |
|
|
|
package com.xujie.sys.modules.sift.adapter; |
|
|
|
|
|
|
|
import com.xujie.sys.common.utils.PageUtils; |
|
|
|
import com.xujie.sys.modules.longchuang.data.ProductionPlanOrderQueryData; |
|
|
|
import com.xujie.sys.modules.longchuang.service.ProductionPlanService; |
|
|
|
import com.xujie.sys.modules.sift.vo.QuerySavedVo; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
@Component |
|
|
|
public class LongChuangElevatorCountAdapter extends AbstractMenuUrlQueryAdapter { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ProductionPlanService productionPlanService; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected Set<String> supportMenuUrls() { |
|
|
|
Set<String> set = new HashSet<>(); |
|
|
|
set.add("longchuang/production-plan-home-order"); |
|
|
|
set.add("longchuang/production-plan-cable-cop-task"); |
|
|
|
set.add("longchuang/production-plan-renovation-order"); |
|
|
|
set.add("longchuang/production-work-report"); |
|
|
|
set.add("production-plan-home-order"); |
|
|
|
set.add("production-plan-cable-cop-task"); |
|
|
|
set.add("production-plan-renovation-order"); |
|
|
|
set.add("production-work-report"); |
|
|
|
return set; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public long countBySavedVo(QuerySavedVo querySavedVo) { |
|
|
|
ProductionPlanOrderQueryData data = new ProductionPlanOrderQueryData(); |
|
|
|
data.setPage(1); |
|
|
|
data.setLimit(1); |
|
|
|
Map<String, String> valueMap = resolveConditionFormulaMap(querySavedVo); |
|
|
|
applyConditionValues(data, valueMap); |
|
|
|
|
|
|
|
String menuUrl = normalizeMenuUrl(getMenuUrl(querySavedVo.getMenuId())); |
|
|
|
PageUtils page; |
|
|
|
if (menuUrl.endsWith("production-plan-home-order")) { |
|
|
|
page = productionPlanService.queryHomeLiftOrderPage(data); |
|
|
|
return page == null ? 0L : page.getTotalCount(); |
|
|
|
} |
|
|
|
if (menuUrl.endsWith("production-plan-cable-cop-task")) { |
|
|
|
page = productionPlanService.queryCableCopTaskPage(data); |
|
|
|
return page == null ? 0L : page.getTotalCount(); |
|
|
|
} |
|
|
|
if (menuUrl.endsWith("production-plan-renovation-order")) { |
|
|
|
page = productionPlanService.queryRenovationOrderPage(data); |
|
|
|
return page == null ? 0L : page.getTotalCount(); |
|
|
|
} |
|
|
|
if (menuUrl.endsWith("production-work-report")) { |
|
|
|
page = productionPlanService.queryWorkReportOrderPage(data); |
|
|
|
return page == null ? 0L : page.getTotalCount(); |
|
|
|
} |
|
|
|
return 0L; |
|
|
|
} |
|
|
|
} |