|
@@ -34,6 +34,23 @@ public class CwReimbursementTypeForTreeDataService extends TreeService<CwReimbur
|
|
|
*/
|
|
|
public List<CwReimbursementTypeInfo> treeDataForType(String extId, String type) throws Exception{
|
|
|
//获取所有的业务类型为1的数据
|
|
|
+// List<CwReimbursementTypeInfo> allList = typeMapper.getAllList("1");
|
|
|
+ List<CwReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <CwReimbursementTypeInfo>) entityClass ).orderByAsc ( CwReimbursementTypeInfo::getSort ));
|
|
|
+ CwReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
|
|
|
+ root.setId ( TreeDTO.getRootId () );
|
|
|
+ List <CwReimbursementTypeInfo> rootTree = this.formatListToTreeForType ( root, allList, extId, type );
|
|
|
+ return rootTree;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取JSON树形数据。
|
|
|
+ *
|
|
|
+ * @param extId 排除的ID
|
|
|
+ * @param type 禁选类型
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<CwReimbursementTypeInfo> treeDataForType1(String extId, String type) throws Exception{
|
|
|
+ //获取所有的业务类型为1的数据
|
|
|
List<CwReimbursementTypeInfo> allList = typeMapper.getAllList("1");
|
|
|
// List<CwReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <CwReimbursementTypeInfo>) entityClass ).orderByAsc ( CwReimbursementTypeInfo::getSort ));
|
|
|
CwReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
|