|
@@ -8,14 +8,11 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.http.client.utils.DateUtils;
|
|
|
import org.springblade.business.entity.*;
|
|
|
import org.springblade.business.feign.TaskClient;
|
|
|
-import org.springblade.business.service.IFirstInformationService;
|
|
|
-import org.springblade.business.service.IInformationQueryFileService;
|
|
|
-import org.springblade.business.service.ITaskParallelService;
|
|
|
+import org.springblade.business.service.*;
|
|
|
import org.springblade.business.utils.FileUtils;
|
|
|
import org.springblade.business.vo.FileUserVO;
|
|
|
import org.springblade.business.vo.InformationQueryVO;
|
|
|
import org.springblade.business.mapper.InformationQueryMapper;
|
|
|
-import org.springblade.business.service.IInformationQueryService;
|
|
|
import org.springblade.business.vo.QueryProcessDataVO;
|
|
|
import org.springblade.common.constant.CommonConstant;
|
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
@@ -24,6 +21,7 @@ import org.springblade.core.oss.model.BladeFile;
|
|
|
import org.springblade.core.secure.BladeUser;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.utils.DateUtil;
|
|
|
+import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.manager.entity.WbsTreeContract;
|
|
|
import org.springblade.manager.feign.WbsTreeContractClient;
|
|
|
import org.springblade.manager.vo.WbsTreeContractTreeVOS;
|
|
@@ -61,21 +59,32 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
|
|
|
|
|
|
private final IInformationQueryFileService informationQueryFileService;
|
|
|
|
|
|
+ private final IContractLogService contractLogService;
|
|
|
+
|
|
|
@Override
|
|
|
public List<String> queryBusinessTableData(String formDataId) {
|
|
|
//获取具体业务数据
|
|
|
InformationQuery query = this.getById(formDataId);
|
|
|
|
|
|
//查询这个业务数据绑定的表格,需要区分监理和施工
|
|
|
- WbsTreeContract tree = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(query.getWbsId());
|
|
|
- List<WbsTreeContract> tableList = this.wbsTreeContractClient.queryChildByParentId(tree, "queryTable", String.valueOf(query.getClassify()));
|
|
|
- if(tableList != null && tableList.size() > 0){
|
|
|
- //删除掉无法溯源的数据
|
|
|
- tableList.removeIf(node -> node.getIsTypePrivatePid() == null || node.getIsTypePrivatePid() <= 0 || StringUtils.isEmpty(node.getIsTypePrivatePid().toString()));
|
|
|
+ if(query != null){
|
|
|
+ WbsTreeContract tree = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(query.getWbsId());
|
|
|
+ List<WbsTreeContract> tableList = this.wbsTreeContractClient.queryChildByParentId(tree, "queryTable", String.valueOf(query.getClassify()));
|
|
|
+ if(tableList != null && tableList.size() > 0){
|
|
|
+ //删除掉无法溯源的数据
|
|
|
+ tableList.removeIf(node -> node.getIsTypePrivatePid() == null || node.getIsTypePrivatePid() <= 0 || StringUtils.isEmpty(node.getIsTypePrivatePid().toString()));
|
|
|
|
|
|
- List<Long> privatePIdList = tableList.stream().map(WbsTreeContract::getIsTypePrivatePid).distinct().collect(Collectors.toList());
|
|
|
+ List<Long> privatePIdList = tableList.stream().map(WbsTreeContract::getIsTypePrivatePid).distinct().collect(Collectors.toList());
|
|
|
|
|
|
- return JSONArray.parseArray(JSONObject.toJSONString(privatePIdList), String.class);
|
|
|
+ return JSONArray.parseArray(JSONObject.toJSONString(privatePIdList), String.class);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //那么就可能是日志,检查是不是日志
|
|
|
+ ContractLog log = this.contractLogService.getById(formDataId);
|
|
|
+ if(log != null){
|
|
|
+ //说明是日志,日志的绑定节点在wbs_tree_private表中,所以这个节点ID就是要找的ID
|
|
|
+ return Func.toStrList(String.valueOf(log.getWbsNodeId()));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return null;
|