|
@@ -27,13 +27,16 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
+import io.swagger.models.auth.In;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
+import org.springblade.business.entity.InformationQuery;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
+import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.manager.entity.WbsTreeContract;
|
|
|
import org.springblade.manager.service.IExcelTabService;
|
|
@@ -287,12 +290,26 @@ public class NodeBaseInfoController extends BladeController {
|
|
|
@GetMapping("/getNodeData")
|
|
|
@ApiOperationSupport(order = 9)
|
|
|
@ApiOperation(value = "获取节点基础数据", notes = "获取节点基础数据")
|
|
|
- public R getNodeData(@RequestParam Long pKeyId){
|
|
|
+ public R getNodeData(@RequestParam Long pKeyId, Integer classify){
|
|
|
NodeBaseInfo nodeBaseInfo = nodeBaseInfoService.getBaseMapper().selectOne(new QueryWrapper<NodeBaseInfo>().eq("node_id", pKeyId));
|
|
|
+ String sql="select * from u_information_query where wbs_id="+pKeyId+" and classify="+classify+" and is_deleted=0";
|
|
|
+ List<InformationQuery> query = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(InformationQuery.class));
|
|
|
+ NodeBaseInfoVO baseInfoVO=new NodeBaseInfoVO();
|
|
|
+ BeanUtil.copy(nodeBaseInfo, baseInfoVO);
|
|
|
+ if(!query.isEmpty()){
|
|
|
+ InformationQuery informationQuery = query.get(0);
|
|
|
+ if(informationQuery!=null&&(informationQuery.getStatus()!=0||informationQuery.getStatus()!=3)){
|
|
|
+ baseInfoVO.setIsDisable(1);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ baseInfoVO.setIsDisable(0);
|
|
|
+ }
|
|
|
if(nodeBaseInfo!=null){
|
|
|
- return R.data(nodeBaseInfo);
|
|
|
+ return R.data(baseInfoVO);
|
|
|
}else {
|
|
|
- return R.data(nodeBaseInfoService.getOrSaveNodeBaseInfo(pKeyId));
|
|
|
+ NodeBaseInfo info = nodeBaseInfoService.getOrSaveNodeBaseInfo(pKeyId);
|
|
|
+ BeanUtil.copy(info, NodeBaseInfoVO.class);
|
|
|
+ return R.data(baseInfoVO);
|
|
|
}
|
|
|
}
|
|
|
|