|
@@ -29,6 +29,7 @@ import com.persagy.proxy.adm.utils.AdmQueryCriteriaHelper;
|
|
|
import com.persagy.proxy.adm.utils.ObjectNameUtil;
|
|
|
import com.persagy.proxy.common.entity.RelationDTO;
|
|
|
import com.persagy.proxy.object.model.*;
|
|
|
+import com.persagy.proxy.object.service.IAdmEquipmentService;
|
|
|
import com.persagy.proxy.object.service.IAdmProjectService;
|
|
|
import com.persagy.proxy.object.service.IAdmSystemService;
|
|
|
import com.persagy.proxy.report.model.SystemPointExcel;
|
|
@@ -62,6 +63,8 @@ public class AdmSystemController {
|
|
|
private IAdmRelationService relationService;
|
|
|
@Autowired
|
|
|
private IAdmProjectService projectService;
|
|
|
+ @Autowired
|
|
|
+ private IAdmEquipmentService equipmentService;
|
|
|
|
|
|
/**
|
|
|
* 统计
|
|
@@ -270,18 +273,10 @@ public class AdmSystemController {
|
|
|
*/
|
|
|
@PostMapping("/un-sys-equip")
|
|
|
public AdmResponse queryUnEquip( @NotNull @QueryParam("sysId") String sysId,
|
|
|
- @RequestBody AdmQueryCriteria request) throws Exception {
|
|
|
- //AdmResponse admResponse = queryObjectByType(sysId,request,"Sy2Eq","MechSubset", AdmEquipment.OBJ_TYPE);
|
|
|
- ObjectNode relationTo = JsonNodeFactory.instance.objectNode();
|
|
|
- relationTo.put("objFrom", sysId);
|
|
|
- relationTo.put("relCode", "Sy2Eq");
|
|
|
- relationTo.put("graphCode", "MechSubset");
|
|
|
- relationTo.put("$bindFlag", false);
|
|
|
- request.setRelationTo(relationTo);
|
|
|
+ @RequestBody AdmQueryCriteria request) {
|
|
|
request.setName(AdmEquipment.OBJ_TYPE);
|
|
|
- QueryCriteria queryCriteriaObj = AdmQueryCriteriaHelper.toDmpCriteria(request);
|
|
|
- List<ObjectNode> obj = DigitalObjectFacade.query(AdmContextUtil.toDmpContext().getGroupCode(),AdmContextUtil.toDmpContext().getProjectId(), AdmContextUtil.toDmpContext().getAppId(), null, queryCriteriaObj);
|
|
|
- return AdmResponse.success(obj,request);
|
|
|
+ request.resetRelationCond(false, "MechSubset", "Sy2Eq", sysId, false);
|
|
|
+ return equipmentService.doQuery(AdmContextUtil.toDmpContext(), request, AdmEquipment.class);
|
|
|
}
|
|
|
|
|
|
|