|
@@ -8,14 +8,16 @@ import com.persagy.proxy.adm.constant.AdmCommonConstant;
|
|
|
import com.persagy.proxy.adm.constant.AdmObjectType;
|
|
|
import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
|
|
|
import com.persagy.proxy.adm.constant.SpaceTypeEnum;
|
|
|
-import com.persagy.proxy.object.model.AdmEquipment;
|
|
|
import com.persagy.proxy.adm.request.AdmCountResponse;
|
|
|
import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
|
-import com.persagy.proxy.object.service.IAdmEquipmentService;
|
|
|
-import com.persagy.proxy.report.service.IRelationReportService;
|
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
|
import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
|
+import com.persagy.proxy.object.model.AdmEquipment;
|
|
|
+import com.persagy.proxy.object.model.AdmShaft;
|
|
|
+import com.persagy.proxy.object.service.IAdmEquipmentService;
|
|
|
+import com.persagy.proxy.object.service.IAdmShaftService;
|
|
|
+import com.persagy.proxy.report.service.IRelationReportService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -40,6 +42,8 @@ public class ComponentStatisticsController {
|
|
|
|
|
|
@Autowired
|
|
|
private IRelationReportService relationReportService;
|
|
|
+ @Autowired
|
|
|
+ private IAdmShaftService shaftService;
|
|
|
|
|
|
/**
|
|
|
* 台账中待删除的对象
|
|
@@ -149,17 +153,16 @@ public class ComponentStatisticsController {
|
|
|
|
|
|
/**
|
|
|
* 竖井-关联业务空间完成度
|
|
|
- * @param request
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/shaft2sp-count")
|
|
|
- public AdmCountResponse shaft2spCount(HttpServletRequest request) {
|
|
|
- String groupCode = request.getHeader(AdmCommonConstant.GROUP_CODE_HEADER);
|
|
|
- String projectId = request.getHeader(AdmCommonConstant.PROJECT_ID_HEADER);
|
|
|
-
|
|
|
- long count = this.relationReportService.countRelationObject(groupCode, projectId, AdmRelationTypeEnum.SH2SP.getGraphCode(),
|
|
|
+ public AdmResponse shaft2spCount() {
|
|
|
+ AdmQueryCriteria request = new AdmQueryCriteria();
|
|
|
+ request.setName("shaft");
|
|
|
+ request.setOnlyCount(true);
|
|
|
+ request.resetRelationCond(true, AdmRelationTypeEnum.SH2SP.getGraphCode(),
|
|
|
AdmRelationTypeEnum.SH2SP.getRelCode(), null);
|
|
|
- return AdmCountResponse.success(count);
|
|
|
+ return shaftService.doQuery(AdmContextUtil.toDmpContext(), request, AdmShaft.class);
|
|
|
}
|
|
|
|
|
|
/**
|