Merge branch 'develop_3' into 'develop_master'
Develop 3 See merge request LiuChao/foton-slrs-system-rest!393
This commit is contained in:
@@ -110,8 +110,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
addInterceptor.excludePathPatterns("/api/lawss/activiti/loginMobile");
|
||||
|
||||
|
||||
// //测试接口使用
|
||||
addInterceptor.excludePathPatterns("/api/**");
|
||||
//// //测试接口使用
|
||||
// addInterceptor.excludePathPatterns("/api/**");
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -269,7 +269,7 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
List<Map<String, String>> arr = dicTypeList.stream()
|
||||
.map(item -> {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("lable", item.getLabel());
|
||||
map.put("label", item.getLabel());
|
||||
map.put("value", item.getValue());
|
||||
return map;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
+13
@@ -44,6 +44,19 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("查询父所有资源")
|
||||
@GetMapping("/listByType")
|
||||
public ResponseMessage<List<SarModelTree>> getAllByType(String type){
|
||||
// List<SarModuleTree> tsResources = iSarModuleTreeService.getAll(null);
|
||||
SarModelTree rootData = new SarModelTree();
|
||||
rootData.setModelType(type);
|
||||
rootData.setDelFlag("1");
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.getAll(rootData);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("根据父ID查询子所有资源")
|
||||
@GetMapping("/childByList")
|
||||
public ResponseMessage<List<SarModelTree>> childByList(SarModelTree parentTree){
|
||||
|
||||
@@ -73,5 +73,25 @@ public class SarModelTree extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private boolean leaf;
|
||||
|
||||
/**
|
||||
* 模块类型
|
||||
* TRUCK 卡车类
|
||||
* CAR 乘用车类
|
||||
*/
|
||||
@TableField("MODEL_TYPE")
|
||||
private String modelType;
|
||||
|
||||
/**
|
||||
* 模块层级父级ID
|
||||
* 为兼容之前的树结构逻辑,此处单独新增父级ID关联关系
|
||||
*/
|
||||
@TableField("MODEL_PID")
|
||||
private String modelPid;
|
||||
|
||||
/**
|
||||
* 模块数据层级关系
|
||||
*/
|
||||
@TableField("MODEL_LEVEL")
|
||||
private int modelLevel;
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarModelTree.dao.SarModelTreeDao;
|
||||
import com.adc.da.slrs.sarModelTree.service.ISarModelTreeService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -30,6 +31,10 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
|
||||
public List<SarModelTree> getAll(SarModelTree sarModelTree) {
|
||||
QueryWrapper<SarModelTree> tsResourceQueryWrapper=new QueryWrapper<>();
|
||||
tsResourceQueryWrapper.isNull("PID");
|
||||
if(sarModelTree!=null && StringUtils.isNotBlank(sarModelTree.getModelType())){
|
||||
tsResourceQueryWrapper.eq("MODEL_TYPE",sarModelTree.getModelType());
|
||||
}
|
||||
tsResourceQueryWrapper.eq("DEL_FLAG","1");
|
||||
List<SarModelTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
|
||||
// for(SarModelTree tree:list){
|
||||
// tree.setChildren(recursionGetChildren((tree)));
|
||||
@@ -59,6 +64,10 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
// sarMenuQueryWrapper.in("PID",parent.getId());
|
||||
sarMenuQueryWrapper.eq("PID",parent.getId());
|
||||
if(parent!=null && StringUtils.isNotBlank(parent.getModelType())){
|
||||
sarMenuQueryWrapper.eq("MODEL_TYPE",parent.getModelType());
|
||||
}
|
||||
sarMenuQueryWrapper.eq("DEL_FLAG","1");
|
||||
List<SarModelTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
// for(SarModelTree sarMenu:children){
|
||||
// sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
@@ -65,7 +65,7 @@ public class TsResource extends BaseEntity {
|
||||
@ApiModelProperty(value = "排序序号")
|
||||
@TableField("DISPLAY_SEQ")
|
||||
private Integer displaySeq;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
@@ -100,4 +100,7 @@ public class TsResource extends BaseEntity {
|
||||
@TableField(exist=false)
|
||||
private String userId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String isFlow;
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -224,6 +224,15 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
|
||||
/**
|
||||
* 入库流程去除我的收藏 flow
|
||||
*/
|
||||
if ( tsResource.getIsFlow()!=null && "flow".equals(tsResource.getIsFlow())){
|
||||
children=children.stream()
|
||||
.filter(item->!"我的收藏".equals(item.getMenuName()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
resource.setChildren(recursionGetListChildrenStand((resource),(children)));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE `sar_model_tree`
|
||||
ADD COLUMN `MODEL_TYPE` varchar(20) NULL COMMENT '模块数据类型(CAR:乘用车;TRUCK:卡车)' AFTER `HAS_CHILDREN`,
|
||||
ADD COLUMN `MODEL_PID` varchar(100) NULL COMMENT '模块父级ID' AFTER `MODEL_TYPE`,
|
||||
ADD COLUMN `MODEL_LEVEL` int(2) NULL COMMENT '模块层级' AFTER `MODEL_PID`;;
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user