1
This commit is contained in:
@@ -82,7 +82,10 @@ public class SysUnitController {
|
||||
// cnd.and("unitTypeCode", "=", "1");
|
||||
cnd.asc("unitcode");
|
||||
cnd.and(Cnd.likeEX("name", unitName));
|
||||
|
||||
SqlExpressionGroup group = Cnd.NEW().where();
|
||||
group.and("delFlag", "=", false);
|
||||
group.orIsNull("delFlag");
|
||||
cnd.and(group);
|
||||
Pagination<Sys_unit> listPage = sysUnitService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), Sys_unit.class, cnd);
|
||||
return Result.success(listPage);
|
||||
}
|
||||
@@ -201,12 +204,22 @@ public class SysUnitController {
|
||||
} else {
|
||||
cnd.and("parentId", "=", pid);
|
||||
}
|
||||
SqlExpressionGroup group = Cnd.NEW().where();
|
||||
group.and("delFlag", "=", false);
|
||||
group.orIsNull("delFlag");
|
||||
cnd.and(group);
|
||||
cnd.asc("location").asc("path");
|
||||
list = sysUnitService.query(cnd);
|
||||
} else {
|
||||
Sys_user user = sysUserService.getUserById(SecurityUtil.getUserId());
|
||||
if (user != null && Strings.isBlank(pid)) {
|
||||
list = sysUnitService.query(Cnd.where("id", "=", user.getUnitId()).asc("path"));
|
||||
Cnd cnd = Cnd.where("id", "=", user.getUnitId());
|
||||
SqlExpressionGroup group = Cnd.NEW().where();
|
||||
group.and("delFlag", "=", false);
|
||||
group.orIsNull("delFlag");
|
||||
cnd.and(group);
|
||||
cnd.asc("path");
|
||||
list = sysUnitService.query(cnd);
|
||||
} else {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Strings.isBlank(pid)) {
|
||||
@@ -214,6 +227,10 @@ public class SysUnitController {
|
||||
} else {
|
||||
cnd.and("parentId", "=", pid);
|
||||
}
|
||||
SqlExpressionGroup group = Cnd.NEW().where();
|
||||
group.and("delFlag", "=", false);
|
||||
group.orIsNull("delFlag");
|
||||
cnd.and(group);
|
||||
cnd.asc("location").asc("path");
|
||||
list = sysUnitService.query(cnd);
|
||||
}
|
||||
@@ -285,6 +302,10 @@ public class SysUnitController {
|
||||
try {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("id", "=", pid);
|
||||
SqlExpressionGroup group = Cnd.NEW().where();
|
||||
group.and("delFlag", "=", false);
|
||||
group.orIsNull("delFlag");
|
||||
cnd.and(group);
|
||||
cnd.asc("unitcode");
|
||||
List<Sys_unit> list = sysUnitService.query(cnd);
|
||||
|
||||
|
||||
@@ -99,9 +99,9 @@ public class SysDataUnitPullServiceImpl extends BaseServiceImpl<Sys_unit> implem
|
||||
|
||||
if (StringUtils.isNotBlank(unit.getDelFlagStr())) {
|
||||
if (unit.getDelFlagStr().equals("1")) {
|
||||
unit.setDelFlag(true);
|
||||
} else {
|
||||
unit.setDelFlag(false);
|
||||
} else {
|
||||
unit.setDelFlag(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,7 @@ public class CommonController {
|
||||
cnd.andEX("unit.unionId", "=", unionId);
|
||||
cnd.and("unit.unitTypeCode", "=", "1");
|
||||
cnd.asc("unit.unitcode");
|
||||
cnd.and("unit.delFlag", "=", false);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> unitList = sysUserService.listMap(sql);
|
||||
return Result.success(unitList);
|
||||
|
||||
Reference in New Issue
Block a user