|
|
@@ -20,6 +20,7 @@ import org.springblade.business.feign.ContractLogClient;
|
|
|
import org.springblade.business.feign.EntrustInfoServiceClient;
|
|
|
import org.springblade.business.feign.InformationQueryClient;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
|
+import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.manager.util.DataStructureFormatUtils;
|
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
|
import org.springblade.core.oss.model.BladeFile;
|
|
|
@@ -476,8 +477,21 @@ public class ExcelTabClientImpl implements ExcelTabClient {
|
|
|
if(!map.containsKey("contractId")){
|
|
|
map.put("contractId",dto.getContractId());
|
|
|
}
|
|
|
+ // 合同段信息
|
|
|
+ ContractInfo contractInfo = contractInfoService.getById(dto.getContractId());
|
|
|
+ if (contractInfo == null) {
|
|
|
+ throw new ServiceException("合同段信息为null");
|
|
|
+ }
|
|
|
+ String pkeyId = "";
|
|
|
+ if (contractInfo.getContractType() == 2) { //3 监理
|
|
|
+ pkeyId = wbsTreePrivate.getJlerTreeId() + "";
|
|
|
+ } else if (contractInfo.getContractType() == 3 || contractInfo.getContractType() == 8) { //业主
|
|
|
+ pkeyId = wbsTreePrivate.getYzerTreeId() + "";
|
|
|
+ } else {
|
|
|
+ return R.fail("该合同段没有委托单权限业务");
|
|
|
+ }
|
|
|
if(!map.containsKey("nodeErTreeId")){
|
|
|
- map.put("nodeErTreeId",wbsTreePrivate.getJlerTreeId());
|
|
|
+ map.put("nodeErTreeId",pkeyId);
|
|
|
}
|
|
|
if(!map.containsKey("nodeId")){
|
|
|
map.put("nodeId",dto.getNodeId());
|