|
@@ -16,6 +16,7 @@ import org.springblade.business.vo.QueryProcessDataVO;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
+import org.springblade.manager.entity.ContractInfo;
|
|
|
import org.springblade.manager.entity.WbsTreeContract;
|
|
|
import org.springblade.manager.feign.ContractClient;
|
|
|
import org.springblade.manager.feign.WbsTreeContractClient;
|
|
@@ -52,8 +53,14 @@ public class NeiYeController {
|
|
|
//生成列表
|
|
|
List<NeiYeLedgerVO> neiYeLedgerVOList = new ArrayList<>();
|
|
|
|
|
|
+ ContractInfo contract = this.contractClient.getContractById(Long.parseLong(queryVO.getContractId()));
|
|
|
+ String contractId = contract.getId().toString();
|
|
|
+ if(!new Integer("1").equals(contract.getContractType())){
|
|
|
+ contractId = queryVO.getContractIdRelation();
|
|
|
+ }
|
|
|
+
|
|
|
//获取当前合同段所有划分情况
|
|
|
- List<WbsTreeContractTreeVOS> contractNodeLIst = this.wbsTreeContractClient.queryContractWbsTreeAll(queryVO.getContractId(), 1, "");
|
|
|
+ List<WbsTreeContractTreeVOS> contractNodeLIst = this.wbsTreeContractClient.queryContractWbsTreeAll(contractId, 1, "");
|
|
|
//设置map
|
|
|
Map<String, WbsTreeContractTreeVOS> idToNodeMap = new HashMap<>();
|
|
|
contractNodeLIst.forEach(vos -> idToNodeMap.put(vos.getId().toString(), vos));
|
|
@@ -62,16 +69,16 @@ public class NeiYeController {
|
|
|
WbsTreeContract node = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(queryVO.getWbsIds().get(0));
|
|
|
if(node == null){
|
|
|
//这一步主要是为了兼容监理合同段
|
|
|
- node = this.wbsTreeContractClient.getContractWbsTreeByContractIdAndId(Long.parseLong(queryVO.getWbsIds().get(0)), Long.parseLong(queryVO.getContractId()));
|
|
|
+ node = this.wbsTreeContractClient.getContractWbsTreeByContractIdAndId(Long.parseLong(queryVO.getWbsIds().get(0)), Long.parseLong(contractId));
|
|
|
}
|
|
|
//不是工序,则查询当前节点下的所有填报节点
|
|
|
List<QueryProcessDataVO> queryDataResult;
|
|
|
if(!new Integer("6").equals(node.getDeptCategory()) && !Arrays.asList("1,2,3,4".split(",")).contains(node.getMajorDataType().toString())){
|
|
|
//非填报节点
|
|
|
- queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), 1, queryVO.getContractId());
|
|
|
+ queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), contract.getContractType(), contractId);
|
|
|
} else {
|
|
|
//填报节点
|
|
|
- queryDataResult = this.informationQueryService.queryProcessDataByPrimaryKeyIdAndClassify(node.getPKeyId().toString(), 1);
|
|
|
+ queryDataResult = this.informationQueryService.queryProcessDataByPrimaryKeyIdAndClassify(node.getPKeyId().toString(), contract.getContractType());
|
|
|
}
|
|
|
|
|
|
if (queryDataResult != null && queryDataResult.size() > 0) {
|
|
@@ -87,7 +94,7 @@ public class NeiYeController {
|
|
|
|
|
|
//处理父节点信息
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
- this.foreachGetParent(map, idToNodeMap, vo.getParentId(), queryVO.getContractId());
|
|
|
+ this.foreachGetParent(map, idToNodeMap, vo.getParentId(), contractId);
|
|
|
|
|
|
//获取当前工序的施工台账信息
|
|
|
if (ledgers != null && ledgers.size() > 0) {
|