|
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.mixsmart.utils.StringUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import org.springblade.common.constant.CommonConstant;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.manager.entity.ContractInfo;
|
|
@@ -18,6 +19,7 @@ import org.springblade.manager.service.IWbsTreeContractService;
|
|
|
import org.springblade.manager.vo.WbsTreeContractTreeVO;
|
|
|
import org.springblade.manager.vo.WbsTreeContractTreeVO3;
|
|
|
import org.springblade.manager.vo.WbsTreeContractTreeVOS;
|
|
|
+import org.springblade.system.cache.ParamCache;
|
|
|
import org.springblade.system.entity.DictBiz;
|
|
|
import org.springblade.system.feign.IDictBizClient;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -193,25 +195,19 @@ public class WbsTreeContractClientImpl implements WbsTreeContractClient {
|
|
|
List<WbsTreeContract> result = this.wbsTreeContractService.queryCurrentContractLogList(contract.getPId());
|
|
|
if (result != null && result.size() != 0) {
|
|
|
List<WbsTreeContractTreeVOS> vosResult = new ArrayList<>();
|
|
|
+
|
|
|
+ //获取施工配置,如果未找到配置则使用默认判断
|
|
|
+ String sgTheLog = StringUtils.isNotEmpty(ParamCache.getValue(CommonConstant.SG_THE_LOG)) ? ParamCache.getValue(CommonConstant.SG_THE_LOG) : "7,9,13";
|
|
|
+ //获取监理配置,如果未找到配置则使用默认判断
|
|
|
+ String jlTheLOg = StringUtils.isNotEmpty(ParamCache.getValue(CommonConstant.JL_THE_LOG)) ? ParamCache.getValue(CommonConstant.JL_THE_LOG) : "8,10,11,12";
|
|
|
+
|
|
|
result.forEach(node -> {
|
|
|
- if(new Integer("2").equals(contract.getContractType()) && Arrays.asList("8,10,11,12".split(",")).contains(node.getNodeType().toString())){
|
|
|
+ if(new Integer("2").equals(contract.getContractType()) && Arrays.asList(jlTheLOg.split(",")).contains(node.getNodeType().toString())){
|
|
|
//转换
|
|
|
- WbsTreeContractTreeVOS vos = new WbsTreeContractTreeVOS();
|
|
|
- vos.setNodeType(node.getNodeType());
|
|
|
- vos.setPrimaryKeyId(String.valueOf(node.getPKeyId()));
|
|
|
- vos.setTitle(StringUtils.isNotEmpty(node.getFullName()) ? node.getFullName() : node.getNodeName());
|
|
|
- vos.setExcelId(node.getExcelId());
|
|
|
- //最终返回集合
|
|
|
- vosResult.add(vos);
|
|
|
- } else if(new Integer("1").equals(contract.getContractType()) && Arrays.asList("7,9,13".split(",")).contains(node.getNodeType().toString())){
|
|
|
+ this.setWbsTreeContractTreeVOS(node, vosResult);
|
|
|
+ } else if(new Integer("1").equals(contract.getContractType()) && Arrays.asList(sgTheLog.split(",")).contains(node.getNodeType().toString())){
|
|
|
//转换
|
|
|
- WbsTreeContractTreeVOS vos = new WbsTreeContractTreeVOS();
|
|
|
- vos.setNodeType(node.getNodeType());
|
|
|
- vos.setPrimaryKeyId(String.valueOf(node.getPKeyId()));
|
|
|
- vos.setTitle(StringUtils.isNotEmpty(node.getFullName()) ? node.getFullName() : node.getNodeName());
|
|
|
- vos.setExcelId(node.getExcelId());
|
|
|
- //最终返回集合
|
|
|
- vosResult.add(vos);
|
|
|
+ this.setWbsTreeContractTreeVOS(node, vosResult);
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -273,4 +269,15 @@ public class WbsTreeContractClientImpl implements WbsTreeContractClient {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ private void setWbsTreeContractTreeVOS(WbsTreeContract node, List<WbsTreeContractTreeVOS> vosResult){
|
|
|
+ WbsTreeContractTreeVOS vos = new WbsTreeContractTreeVOS();
|
|
|
+ vos.setNodeType(node.getNodeType());
|
|
|
+ vos.setPrimaryKeyId(String.valueOf(node.getPKeyId()));
|
|
|
+ vos.setTitle(StringUtils.isNotEmpty(node.getFullName()) ? node.getFullName() : node.getNodeName());
|
|
|
+ vos.setExcelId(node.getExcelId());
|
|
|
+ //最终返回集合
|
|
|
+ vosResult.add(vos);
|
|
|
+ }
|
|
|
+
|
|
|
}
|