commit
This commit is contained in:
@@ -126,6 +126,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object queryUserByIds(String[] ids) {
|
||||
Sql sql = Sqls.create("select id,loginname,username,unitname,unionname,sex,mobile from user where id in (@id)");
|
||||
sql.setParam("id", ids);
|
||||
@@ -140,6 +141,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object queryUserById(String id) {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
@@ -171,6 +173,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getCampus() {
|
||||
return sysUnitService.list(Sqls.create("""
|
||||
SELECT
|
||||
@@ -189,6 +192,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object dictOptions(String code) {
|
||||
return sysDictService.getSubListByCode(code);
|
||||
}
|
||||
@@ -200,6 +204,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getSystemNameByDict() {
|
||||
return sysDictService.query(Cnd.where("parentId", "=", DICT_SYSTEM_ID).and("disabled", "=", false).asc("location"));
|
||||
}
|
||||
@@ -211,6 +216,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getJcByDict() {
|
||||
return sysDictService.query(Cnd.where("parentId", "=", DICT_JC_ID).and("disabled", "=", false).asc("location"));
|
||||
}
|
||||
@@ -222,6 +228,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getFileTypeByDict() {
|
||||
return sysDictService.query(Cnd.where("parentId", "=", DICT_FILETYPE_ID).and("disabled", "=", false).asc("location"));
|
||||
}
|
||||
@@ -233,6 +240,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getJcgbJsByDict() {
|
||||
return sysDictService.list(Sqls.create("SELECT\n" +
|
||||
"\tdict.id,\n" +
|
||||
@@ -256,6 +264,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getSpyJsByDict() {
|
||||
return sysDictService.list(Sqls.create("SELECT\n" +
|
||||
"\tdict.id,\n" +
|
||||
@@ -278,6 +287,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object welfareUnits() {
|
||||
return sysWelfareUnitService.query(Cnd.orderBy().asc("welfare_unit_code"));
|
||||
}
|
||||
@@ -302,6 +312,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getDbt(String jdhId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -327,6 +338,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object unions(@Param(value = "delegationId", required = false) String delegationId, boolean isPermission) {
|
||||
if (Strings.isBlank(delegationId)) {
|
||||
Cnd cndX = Cnd.NEW();
|
||||
@@ -349,6 +361,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object unionList(@Param(value = "unionId", required = false) String unionId) {
|
||||
if (Strings.isBlank(unionId)) {
|
||||
return sysUnionService.query(Cnd.orderBy().asc("unioncode"));
|
||||
@@ -380,12 +393,14 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object clubs() {
|
||||
return sysClubService.query(Cnd.where("state", "=", 930).asc("code"));
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getGroup(@Param(value = "jdhId", required = false) String jdhId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -402,6 +417,7 @@ public class ViCommonCon {
|
||||
}
|
||||
|
||||
@At
|
||||
@RequiresAuthentication
|
||||
public Object getUnit(String unionid) {
|
||||
try {
|
||||
if (Strings.isBlank(unionid)) {
|
||||
@@ -422,6 +438,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getClubsByRole() {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -457,6 +474,7 @@ public class ViCommonCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getClubsByUser() {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -484,6 +502,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getClubTypeByDict() {
|
||||
return sysDictService.query(Cnd.where("parentId", "=", DICT_CLUBTYPE_ID).and("disabled", "=", false).asc("location"));
|
||||
}
|
||||
@@ -494,6 +513,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object units(@Param(value = "unionId", required = false) String unionId) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("unitlevel", "=", 2);
|
||||
@@ -519,6 +539,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getUnitsByUnions(@Param(value = "unionId", required = false) String[] unionId) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("unitlevel", "=", 2);
|
||||
@@ -544,6 +565,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object threeUnitsByUnionGroupOrUnitId(@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "groupId", required = false) String groupId) {
|
||||
if (Strings.isNotBlank(groupId)) {
|
||||
@@ -561,6 +583,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getThreeUnitsByUnionGroupsOrUnitIds(@Param(value = "unitId", required = false) String[] unitId,
|
||||
@Param(value = "groupId", required = false) String[] groupId) {
|
||||
if (groupId != null && groupId.length > 0) {
|
||||
@@ -577,6 +600,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object unionGroupsByUnionId(@Param(value = "unionId", required = false) String unionId) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,SchoolUnionAdmin,flwyh01,H04")) {
|
||||
List<Sys_user_role> userRole = sysUserService.dao().query(Sys_user_role.class, Cnd.where("roleId", "=", Roles.ghxzzz)
|
||||
@@ -599,6 +623,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getUnionGroupsByUnions(@Param(value = "unionId", required = false) String[] unionId) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,SchoolUnionAdmin,flwyh01,H04")) {
|
||||
List<Sys_user_role> userRole = sysUserService.dao().query(Sys_user_role.class, Cnd.where("roleId", "=", Roles.ghxzzz)
|
||||
@@ -619,6 +644,7 @@ public class ViCommonCon {
|
||||
//协会负责人登录获取成员所在的单位
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getClubUnits() {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
@@ -637,6 +663,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object unionUnits() {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("unitlevel", "=", 2);
|
||||
@@ -660,6 +687,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object searchUser(@Param(value = "query", required = false) String query,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@@ -696,7 +724,7 @@ public class ViCommonCon {
|
||||
cnd.andEX("unit.unionid", "=", unionId);
|
||||
cnd.andEX("u.unitid", "=", unitId);
|
||||
cnd.andEX("u.sex", "=", sex);
|
||||
if (member) {
|
||||
if (member != null && member) {
|
||||
cnd.and("u.member", "=", member);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
@@ -711,6 +739,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getGdh(Boolean open) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("startState", "=", open).desc("year");
|
||||
@@ -726,12 +755,14 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object dictState(String code) {
|
||||
return baseService.dao().fetch("sys_dict", Cnd.where("code", "=", code));
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getActivityUnions() {
|
||||
return sysUnionService.query();
|
||||
}
|
||||
@@ -739,6 +770,7 @@ public class ViCommonCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getActivityUnits(@Param(value = "unionId", required = false) String unionId) {
|
||||
if (Strings.isBlank(unionId)) {
|
||||
return sysUnitService.dao().query(ActivityBasicUnit.class, Cnd.where("unitlevel", "=", 2).asc("id"));
|
||||
@@ -747,6 +779,7 @@ public class ViCommonCon {
|
||||
}
|
||||
|
||||
@At
|
||||
@RequiresAuthentication
|
||||
public Object getUnion() {
|
||||
try {
|
||||
List<Record> unionList;
|
||||
@@ -799,6 +832,7 @@ public class ViCommonCon {
|
||||
*/
|
||||
@At(value = "/platform/basics/downloadTemplate", top = true)
|
||||
@Ok("void")
|
||||
@RequiresAuthentication
|
||||
public void downloadTemplate(String filePath, String fileName, HttpServletResponse response) {
|
||||
String TEMPLATE_PATH = "templates";
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user