20251030 sql提交
This commit is contained in:
@@ -216,6 +216,7 @@ public class FrameWorkAdapter implements IJeeLowCodeAdapter {
|
||||
public List<JeeLowCodeDept> getDeptList(JeeLowCodeDeptParam param) {
|
||||
|
||||
String deptName = param.getDeptName();//部门名称搜索
|
||||
int outCondition=-1;
|
||||
String type = Func.isEmpty(param.getType()) ? "all" : param.getType();
|
||||
List<Long> deptIdList = new ArrayList<>();//部门id列表,为空则查所有
|
||||
if (Func.equals(type, "now")) {//本级
|
||||
@@ -226,15 +227,22 @@ public class FrameWorkAdapter implements IJeeLowCodeAdapter {
|
||||
deptIdList = this.getChildDeptIdList(this.getOnlineUserDeptId(),false);
|
||||
} else if (Func.equals(type, "direct_sub")) {//直接下级
|
||||
deptIdList = this.getDirectChildDeptIdList(this.getOnlineUserDeptId());
|
||||
}else if (Func.equals(type, "out")) {//外协单位
|
||||
// 外协单位:IS_INTERNAL=0
|
||||
// 当选择为外协单位时 条件为不等于1
|
||||
// 当没有选择 外协单位时 条件为不等于-1
|
||||
outCondition=1;
|
||||
}
|
||||
|
||||
List<Long> finalDeptIdList = deptIdList;
|
||||
int finalOutCondition = outCondition;
|
||||
SqlInfoQueryWrapper.Wrapper wrapper = SqlHelper.getQueryWrapper()
|
||||
.select("id", "parent_id", "name")
|
||||
.setTableName("system_dept")
|
||||
.setWhere(where -> {
|
||||
where.in(Func.isNotEmpty(finalDeptIdList), "id", finalDeptIdList);
|
||||
where.like(FuncBase.isNotEmpty(deptName), "name", deptName);
|
||||
where.ne("IS_INTERNAL", finalOutCondition);
|
||||
where.eq("deleted", 0);
|
||||
})
|
||||
.orderByAsc("sort")
|
||||
|
||||
@@ -620,7 +620,7 @@ public class FrameServiceImpl implements IFrameService {
|
||||
handleResult = "FAIL";
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
errorReason = "数据格式有误";
|
||||
errorReason = "数据格式有误"+e.toString();
|
||||
handleResult = "FAIL";
|
||||
}
|
||||
String redisKeyData = "excel:import_data:task_" + fieldId + ":" + handleResult + ":" + entity.getId();
|
||||
|
||||
Reference in New Issue
Block a user