Commit 478d294012490a411abf0aa81b78a4d498cc0e1e

Authored by 王富生
1 parent 15545517

api提供

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/MaintainPlanSaveReqVO.java
... ... @@ -14,7 +14,6 @@ import jakarta.validation.constraints.*;
14 14 public class MaintainPlanSaveReqVO {
15 15  
16 16 @Schema(description = "计划名称后缀", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "张三")
17   - @Max(value = 15)
18 17 private String planNameSuffix;
19 18  
20 19 @Schema(description = "业务线: yl-园林;wy-物业:sz-市政", requiredMode = Schema.RequiredMode.REQUIRED)
... ... @@ -33,16 +32,12 @@ public class MaintainPlanSaveReqVO {
33 32 @NotNull(message = "归属(一级部门id)不能为空")
34 33 private Long companyId;
35 34  
36   - @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "12055")
37   - @NotNull(message = "部门ID(道路负责部门id)不能为空")
38   - private Long deptId;
39   -
40   - @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19114")
41   - @NotNull(message = "道路ID不能为空")
42   - private Long roadId;
  35 + @Schema(description = "道路信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "[{\"deptId\":11,\"roadId\":1,\"roadName\":\"测试\"}]")
  36 + @NotNull
  37 + @Size(min = 1)
  38 + @Valid
  39 + private List<MaintainPlanRoadReqVO> roadListReqVO;
43 40  
44   - @Schema(description = "道路名称", example = "王五")
45   - private String roadName;
46 41  
47 42 @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", requiredMode = Schema.RequiredMode.REQUIRED, example = "16420")
48 43 @NotNull(message = "养护级别: 10:特级;11:一级:12:二级;13:三级不能为空")
... ... @@ -56,12 +51,6 @@ public class MaintainPlanSaveReqVO {
56 51 @NotNull(message = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次不能为空")
57 52 private Integer cycleId;
58 53  
59   - @Schema(description = "道路信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "[{\"deptId\":11,\"roadId\":1,\"roadName\":\"测试\"}]")
60   - @NotNull
61   - @Size(min = 1)
62   - @Valid
63   - private List<MaintainPlanRoadReqVO> roadListReqVO;
64   -
65 54 @Schema(description = "开始时间")
66 55 private LocalDate beginTime;
67 56  
... ... @@ -69,7 +58,6 @@ public class MaintainPlanSaveReqVO {
69 58 private LocalDate endTime;
70 59  
71 60 @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
72   - @NotEmpty(message = "备注不能为空")
73 61 private String remark;
74 62  
75 63 @NotNull(message = "角色Ids不能为空")
... ...
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/api/dept/DeptApi.java
... ... @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.system.api.dept;
2 2  
3 3 import com.zteits.urbanops.framework.common.util.collection.CollectionUtils;
4 4 import com.zteits.urbanops.module.system.api.dept.dto.DeptRespDTO;
  5 +import com.zteits.urbanops.module.system.controller.admin.dept.vo.dept.DeptRespVO;
  6 +import com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO;
5 7  
6 8 import java.util.Collection;
7 9 import java.util.List;
... ... @@ -51,7 +53,7 @@ public interface DeptApi {
51 53 }
52 54  
53 55 /**
54   - * 获得指定部门的所有子部门
  56 + * 获得指定部门的所有子部门()
55 57 *
56 58 * @param id 部门编号
57 59 * @return 子部门列表
... ... @@ -65,4 +67,17 @@ public interface DeptApi {
65 67 */
66 68 List<DeptRespDTO> getSubDeptList();
67 69  
  70 + /**
  71 + * 获取公司列表
  72 + * @return 公司
  73 + */
  74 + List<DeptRespVO> getCompanyList();
  75 +
  76 + /**
  77 + * 获取班组列表
  78 + * @param id 公司ID
  79 + * @return 班组列表
  80 + */
  81 + List<DeptRespVO> getLastDeptList(Long id);
  82 +
68 83 }
... ...
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/api/dept/DeptApiImpl.java
1 1 package com.zteits.urbanops.module.system.api.dept;
2 2  
  3 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3 4 import com.zteits.urbanops.framework.common.util.object.BeanUtils;
4 5 import com.zteits.urbanops.module.system.api.dept.dto.DeptRespDTO;
5 6 import com.zteits.urbanops.module.system.controller.admin.dept.vo.dept.DeptRespVO;
6 7 import com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO;
7 8 import com.zteits.urbanops.module.system.service.dept.DeptService;
  9 +import com.zteits.urbanops.module.system.util.DeptTreeUtil;
8 10 import org.springframework.stereotype.Service;
9 11  
10 12 import jakarta.annotation.Resource;
... ... @@ -53,4 +55,16 @@ public class DeptApiImpl implements DeptApi {
53 55 return BeanUtils.toBean(list, DeptRespDTO.class);
54 56 }
55 57  
  58 + @Override
  59 + public List<DeptRespVO> getCompanyList() {
  60 + List<DeptDO> list = deptService.getSubDeptList();
  61 + return BeanUtils.toBean(list, DeptRespVO.class);
  62 + }
  63 +
  64 + @Override
  65 + public List<DeptRespVO> getLastDeptList(Long id) {
  66 + List<DeptDO> list = deptService.getLastDeptList(id);
  67 + return BeanUtils.toBean(list, DeptRespVO.class);
  68 + }
  69 +
56 70 }
... ...
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/api/permission/RoleApi.java
1 1 package com.zteits.urbanops.module.system.api.permission;
2 2  
  3 +import com.zteits.urbanops.module.system.controller.admin.permission.vo.role.RoleRespVO;
3 4 import com.zteits.urbanops.module.system.dal.dataobject.permission.RoleDO;
4 5  
5 6 import java.util.Collection;
... ... @@ -28,4 +29,11 @@ public interface RoleApi {
28 29 * @return 角色列表
29 30 */
30 31 List<RoleDO> getRoleList(Collection<Long> ids);
  32 +
  33 + /**
  34 + * 通过业务线查询角色列表
  35 + * @param busiLine 业务线
  36 + * @return
  37 + */
  38 + List<RoleRespVO> getRoleListByBusiLine(String busiLine);
31 39 }
... ...
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/api/permission/RoleApiImpl.java
1 1 package com.zteits.urbanops.module.system.api.permission;
2 2  
  3 +import com.zteits.urbanops.module.system.controller.admin.permission.vo.role.RoleRespVO;
3 4 import com.zteits.urbanops.module.system.dal.dataobject.permission.RoleDO;
4 5 import com.zteits.urbanops.module.system.service.permission.RoleService;
5 6 import org.springframework.stereotype.Service;
... ... @@ -28,4 +29,9 @@ public class RoleApiImpl implements RoleApi {
28 29 public List<RoleDO> getRoleList(Collection<Long> ids) {
29 30 return roleService.getRoleList(ids);
30 31 }
  32 +
  33 + @Override
  34 + public List<RoleRespVO> getRoleListByBusiLine(String busiLine) {
  35 + return roleService.getRoleListByBusiLine(busiLine);
  36 + }
31 37 }
... ...