diff --git a/policeSecurityServer/src/main/java/com/changhu/common/annotation/CheckUserType.java b/policeSecurityServer/src/main/java/com/changhu/common/annotation/CheckUserType.java index 0af45e3..532de26 100644 --- a/policeSecurityServer/src/main/java/com/changhu/common/annotation/CheckUserType.java +++ b/policeSecurityServer/src/main/java/com/changhu/common/annotation/CheckUserType.java @@ -1,7 +1,6 @@ package com.changhu.common.annotation; import com.changhu.common.db.enums.UserType; -import org.springframework.web.bind.annotation.RestController; import java.lang.annotation.*; @@ -13,7 +12,6 @@ import java.lang.annotation.*; @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented -@RestController public @interface CheckUserType { /** diff --git a/policeSecurityServer/src/main/java/com/changhu/common/annotation/IsExtData.java b/policeSecurityServer/src/main/java/com/changhu/common/annotation/IsExtData.java index 0a2f145..9276b63 100644 --- a/policeSecurityServer/src/main/java/com/changhu/common/annotation/IsExtData.java +++ b/policeSecurityServer/src/main/java/com/changhu/common/annotation/IsExtData.java @@ -4,7 +4,7 @@ import java.lang.annotation.*; /** * author: luozhun - * desc: 是拓展属性 + * desc: 标注是拓展属性 * createTime: 2023/11/1 17:25 */ @Documented diff --git a/policeSecurityServer/src/main/java/com/changhu/common/annotation/IsWhiteList.java b/policeSecurityServer/src/main/java/com/changhu/common/annotation/IsWhiteList.java new file mode 100644 index 0000000..a213a64 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/common/annotation/IsWhiteList.java @@ -0,0 +1,14 @@ +package com.changhu.common.annotation; + +import java.lang.annotation.*; + +/** + * @author 20252 + * @createTime 2024/11/21 下午3:34 + * @desc IsWhiteList... + */ +@Documented +@Retention(value = RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.TYPE}) +public @interface IsWhiteList { +} diff --git a/policeSecurityServer/src/main/java/com/changhu/common/annotation/JsonBody.java b/policeSecurityServer/src/main/java/com/changhu/common/annotation/JsonBody.java index c53df87..26f7149 100644 --- a/policeSecurityServer/src/main/java/com/changhu/common/annotation/JsonBody.java +++ b/policeSecurityServer/src/main/java/com/changhu/common/annotation/JsonBody.java @@ -1,7 +1,5 @@ package com.changhu.common.annotation; -import org.springframework.web.bind.annotation.RestController; - import java.lang.annotation.*; /** @@ -12,7 +10,6 @@ import java.lang.annotation.*; @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented -@RestController public @interface JsonBody { boolean value() default true; } diff --git a/policeSecurityServer/src/main/java/com/changhu/config/WebConfig.java b/policeSecurityServer/src/main/java/com/changhu/config/WebConfig.java index 11f4a19..d958102 100644 --- a/policeSecurityServer/src/main/java/com/changhu/config/WebConfig.java +++ b/policeSecurityServer/src/main/java/com/changhu/config/WebConfig.java @@ -2,38 +2,121 @@ package com.changhu.config; import cn.dev33.satoken.interceptor.SaInterceptor; import cn.dev33.satoken.stp.StpUtil; -import com.changhu.support.filter.BodyWrapperFilter; -import com.changhu.support.interceptor.JsonBodyInterceptor; -import com.changhu.support.interceptor.SignInterceptor; -import com.changhu.support.interceptor.UserTypeInterceptor; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ClassUtil; +import com.changhu.common.annotation.IsWhiteList; +import com.changhu.common.annotation.JsonBody; +import com.changhu.filter.BodyWrapperFilter; +import com.changhu.interceptor.JsonBodyInterceptor; +import com.changhu.interceptor.OpenApiAuthInterceptor; +import com.changhu.interceptor.UserTypeInterceptor; +import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.annotation.AnnotatedElementUtils; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import java.util.ArrayList; -import java.util.List; +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.util.*; +import java.util.stream.Collectors; /** * author: luozhun * desc: WebConfig * createTime: 2023/8/18 10:56 */ +@Slf4j @Configuration public class WebConfig implements WebMvcConfigurer { private final List whiteList = new ArrayList<>(); + /** + * 扫描所有Controller + */ + private static Set> scanRestController() { + //需要过滤出JsonBody + Set> classes = ClassUtil.scanPackage("com.changhu", clazz -> !JsonBody.class.equals(clazz)); + return classes.stream().filter(aClass -> { + //判断类上是否有Controller注解 + if (aClass.isAnnotationPresent(Controller.class) || aClass.isAnnotationPresent(RestController.class)) { + return true; + } + Annotation[] annotations = aClass.getAnnotations(); + for (Annotation annotation : annotations) { + if (annotation.annotationType().isAnnotationPresent(Controller.class) || annotation.annotationType().isAnnotationPresent(RestController.class)) { + return true; + } + } + return false; + }).collect(Collectors.toSet()); + } + public WebConfig() { - whiteList.add("/common/**"); - whiteList.add("/open/**"); - whiteList.add("/test/**"); - whiteList.add("/login"); - whiteList.add("/logout"); + Set w = new HashSet<>(); + for (Class clazz : scanRestController()) { + //类上的注解 + RequestMapping classRequestMapping = AnnotatedElementUtils.findMergedAnnotation(clazz, RequestMapping.class); + IsWhiteList clazzIsWhiteList = clazz.getAnnotation(IsWhiteList.class); + if (classRequestMapping != null && clazzIsWhiteList != null) { + //直接放行当前控制器的所有方法 + w.addAll(Arrays.stream(classRequestMapping.value()).map(path -> { + if (!path.startsWith("/")) { + path = "/" + path; + } + if (!path.endsWith("/")) { + path = path + "/"; + } + return path + "**"; + }).toList()); + continue; + } + //看方法上是否有白名单注解 + Method[] methods = clazz.getDeclaredMethods(); + for (Method method : methods) { + IsWhiteList methodIsWhiteList = method.getAnnotation(IsWhiteList.class); + RequestMapping methodRequestMapping = AnnotatedElementUtils.findMergedAnnotation(method, RequestMapping.class); + if (methodRequestMapping != null && methodIsWhiteList != null) { + List> list1 = Arrays.stream(methodRequestMapping.value()).map(path -> { + if (!path.startsWith("/")) { + path = "/" + path; + } + if (path.endsWith("/")) { + path = path.substring(0, path.length() - 1); + } + List list = new ArrayList<>(); + if (classRequestMapping != null && CollUtil.isNotEmpty(Arrays.asList(classRequestMapping.value()))) { + for (String p : classRequestMapping.value()) { + if (!p.startsWith("/")) { + p = "/" + p; + } + if (p.endsWith("/")) { + p = p.substring(0, p.length() - 1); + } + list.add(p + path); + } + } else { + list.add(path); + } + return list; + }).toList(); + w.addAll(list1.stream().flatMap(List::stream).toList()); + } + } + } + log.info("加载路由白名单:{}", w); + whiteList.addAll(w); + + //网站图标 whiteList.add("/favicon.ico"); //druid console whiteList.add("/druid/**"); @@ -43,12 +126,6 @@ public class WebConfig implements WebMvcConfigurer { whiteList.add("/swagger-resources"); whiteList.add("/**webjars/**"); whiteList.add("/v3/**"); - //获取企业注册审核状态 - whiteList.add("/management/getCheckStatus"); - //微信小程序注册 - whiteList.add("/miniProgramUser/register"); - //二维码表单录入保安人员 - whiteList.add("/miniProgramUser/qrCodeFormInputSecurityUser"); } @Override @@ -57,12 +134,12 @@ public class WebConfig implements WebMvcConfigurer { registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin())) .addPathPatterns("/**") .excludePathPatterns(whiteList); - // 注册jsonBody 拦截器 用于标识是否需要JsonResult返回 + // 注册jsonBody拦截器 用于标识是否需要JsonResult返回 registry.addInterceptor(new JsonBodyInterceptor()); - // 注册clientType 拦截器 用于校验当前用户是否匹配操作客户端 + // 注册用户类型拦截器 用于校验当前用户是否匹配操作客户端 registry.addInterceptor(new UserTypeInterceptor()); - // 注册开放接口 拦截器 用于校验第三方是否携带指定apiKey - registry.addInterceptor(new SignInterceptor()) + // 注册开放接口认证拦截器 用于校验第三方是否授权 + registry.addInterceptor(new OpenApiAuthInterceptor()) .addPathPatterns("/open/**"); } diff --git a/policeSecurityServer/src/main/java/com/changhu/controller/CommonController.java b/policeSecurityServer/src/main/java/com/changhu/controller/CommonController.java index ed3ed63..8523678 100644 --- a/policeSecurityServer/src/main/java/com/changhu/controller/CommonController.java +++ b/policeSecurityServer/src/main/java/com/changhu/controller/CommonController.java @@ -1,5 +1,6 @@ package com.changhu.controller; +import com.changhu.common.annotation.IsWhiteList; import com.changhu.common.annotation.JsonBody; import com.changhu.common.cache.GlobalCacheManager; import com.changhu.common.pojo.model.JsonResult; @@ -31,6 +32,8 @@ import java.util.Map; @Tag(name = "公共接口") @RequestMapping("/common") @JsonBody +@IsWhiteList +@RestController public class CommonController { @Autowired diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java b/policeSecurityServer/src/main/java/com/changhu/controller/EnterprisesUnitController.java similarity index 81% rename from policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java rename to policeSecurityServer/src/main/java/com/changhu/controller/EnterprisesUnitController.java index 0159312..dc8336b 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java +++ b/policeSecurityServer/src/main/java/com/changhu/controller/EnterprisesUnitController.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.controller; +package com.changhu.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.changhu.common.annotation.CheckUserType; @@ -6,10 +6,10 @@ import com.changhu.common.annotation.JsonBody; import com.changhu.common.db.enums.UserType; import com.changhu.common.exception.MessageException; import com.changhu.common.pojo.vo.SelectNodeVo; -import com.changhu.module.management.pojo.params.EnterprisesUnitSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.EnterprisesUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.EnterprisesUnitPagerVo; -import com.changhu.module.management.service.EnterprisesUnitService; +import com.changhu.pojo.params.EnterprisesUnitSaveOrUpdateParams; +import com.changhu.pojo.queryParams.EnterprisesUnitPagerQueryParams; +import com.changhu.pojo.vo.EnterprisesUnitPagerVo; +import com.changhu.service.EnterprisesUnitService; import com.changhu.support.mybatisplus.pojo.params.PageParams; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Schema; @@ -27,7 +27,8 @@ import java.util.List; */ @Tag(name = "企事业单位") @JsonBody -@RequestMapping("/enterprisesUnit") +@RequestMapping("/eu") +@RestController public class EnterprisesUnitController { @Autowired @@ -41,14 +42,14 @@ public class EnterprisesUnitController { } @Operation(summary = "新增或保存") - @PostMapping("/saveOrUpdate") + @PostMapping("/add_upd") @CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SUPER}) public void saveOrUpdate(@RequestBody @Valid EnterprisesUnitSaveOrUpdateParams params) { enterprisesUnitService.saveOrUpdate(params); } @Operation(summary = "根据id删除") - @DeleteMapping("/deleteById") + @DeleteMapping("/del_id") @CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SUPER}) public void deleteById(@RequestParam @Schema(description = "企事业单位id") Long enterprisesUnitId) { boolean b = enterprisesUnitService.removeById(enterprisesUnitId); @@ -58,7 +59,7 @@ public class EnterprisesUnitController { } @Operation(summary = "根据行政区划编码查询下面的企事业单位") - @PostMapping("/queryListByAdministrativeDivisionCodes") + @PostMapping("/list_ad_codes") public List> queryListByAdministrativeDivisionCodes(@RequestBody @Schema(description = "行政区划编码") List administrativeDivisionCodes) { return enterprisesUnitService.queryListByAdministrativeDivisionCodes(administrativeDivisionCodes); } diff --git a/policeSecurityServer/src/main/java/com/changhu/controller/LoginController.java b/policeSecurityServer/src/main/java/com/changhu/controller/LoginController.java index 3694b31..852b527 100644 --- a/policeSecurityServer/src/main/java/com/changhu/controller/LoginController.java +++ b/policeSecurityServer/src/main/java/com/changhu/controller/LoginController.java @@ -1,5 +1,6 @@ package com.changhu.controller; +import com.changhu.common.annotation.IsWhiteList; import com.changhu.common.annotation.JsonBody; import com.changhu.common.pojo.vo.TokenInfo; import com.changhu.pojo.params.LoginParams; @@ -10,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; /** * @author 20252 @@ -18,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody; */ @Tag(name = "登录相关") @JsonBody +@RestController public class LoginController { @Autowired @@ -25,12 +28,14 @@ public class LoginController { @Operation(summary = "登录") @PostMapping("/login") + @IsWhiteList public TokenInfo login(@RequestBody LoginParams loginParams) { return loginService.login(loginParams); } @Operation(summary = "登出") @GetMapping("/logout") + @IsWhiteList public void logout() { loginService.logout(); } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/ManagementController.java b/policeSecurityServer/src/main/java/com/changhu/controller/ManagementController.java similarity index 60% rename from policeSecurityServer/src/main/java/com/changhu/module/management/controller/ManagementController.java rename to policeSecurityServer/src/main/java/com/changhu/controller/ManagementController.java index c04c24b..12e9ad6 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/ManagementController.java +++ b/policeSecurityServer/src/main/java/com/changhu/controller/ManagementController.java @@ -1,16 +1,16 @@ -package com.changhu.module.management.controller; +package com.changhu.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.changhu.common.annotation.CheckUserType; +import com.changhu.common.annotation.IsWhiteList; import com.changhu.common.annotation.JsonBody; import com.changhu.common.db.enums.UserType; -import com.changhu.module.management.pojo.params.IndexCheckPassParams; -import com.changhu.module.management.pojo.params.IndexCheckStatusParams; -import com.changhu.module.management.pojo.params.IndexDisableOrEnableParams; -import com.changhu.module.management.pojo.queryParams.UnitMiniProgramUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.UnitCheckStatusVo; -import com.changhu.module.management.pojo.vo.UnitMiniProgramUserPagerVo; -import com.changhu.module.management.service.ManagementService; +import com.changhu.pojo.params.CheckStatusParams; +import com.changhu.pojo.params.UnitDisableOrEnableParams; +import com.changhu.pojo.vo.UnitCheckStatusVo; +import com.changhu.pojo.vo.UnitMiniProgramUserPagerQueryParams; +import com.changhu.pojo.vo.UnitMiniProgramUserPagerVo; +import com.changhu.service.ManagementService; import com.changhu.support.mybatisplus.pojo.params.PageParams; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -19,40 +19,28 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * @author 20252 - * @createTime 2024/9/2 上午9:48 - * @desc IndexController... + * @createTime 2024/11/22 上午9:03 + * @desc ManagementController... */ @Tag(name = "后台-通用接口") @JsonBody @RequestMapping("/management") +@RestController public class ManagementController { - @Autowired private ManagementService managementService; - @Operation(summary = "审核通过") - @PostMapping("/checkPass") - @CheckUserType(userTypes = UserType.MANAGEMENT_SUPER) - public void checkPass(@RequestBody @Valid IndexCheckPassParams params) { - managementService.checkPass(params); - } - @Operation(summary = "获取审核状态") @PostMapping("/getCheckStatus") - public UnitCheckStatusVo getCheckStatus(@RequestBody @Valid IndexCheckStatusParams params) { + @IsWhiteList + public UnitCheckStatusVo getCheckStatus(@RequestBody @Valid CheckStatusParams params) { return managementService.getCheckStatus(params); } - @Operation(summary = "启用或禁用状态") - @PostMapping("/disableOrEnable") - @CheckUserType(userTypes = UserType.MANAGEMENT_SUPER) - public void disableOrEnable(@RequestBody @Valid IndexDisableOrEnableParams params) { - managementService.disableOrEnable(params); - } - @Operation(summary = "查询单位下的小程序用户") @PostMapping("/miniProgramUserPager") @CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SECURITY}) @@ -63,14 +51,14 @@ public class ManagementController { @Operation(summary = "审核通过小程序用户") @PostMapping("/passMiniProgramUser") @CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SECURITY}) - public void passMiniProgramUser(@RequestBody @Valid IndexDisableOrEnableParams params) { + public void passMiniProgramUser(@RequestBody @Valid UnitDisableOrEnableParams params) { managementService.passMiniProgramUser(params); } @Operation(summary = "禁用或启用小程序用户") @PostMapping("/disableOrEnableMiniProgramUser") @CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SECURITY}) - public void disableOrEnableMiniProgramUser(@RequestBody @Valid IndexDisableOrEnableParams params) { + public void disableOrEnableMiniProgramUser(@RequestBody @Valid UnitDisableOrEnableParams params) { managementService.disableOrEnableMiniProgramUser(params); } } diff --git a/policeSecurityServer/src/main/java/com/changhu/controller/OpenController.java b/policeSecurityServer/src/main/java/com/changhu/controller/OpenController.java index fc81c3a..9deb25a 100644 --- a/policeSecurityServer/src/main/java/com/changhu/controller/OpenController.java +++ b/policeSecurityServer/src/main/java/com/changhu/controller/OpenController.java @@ -1,5 +1,6 @@ package com.changhu.controller; +import com.changhu.common.annotation.IsWhiteList; import com.changhu.common.annotation.JsonBody; import com.changhu.common.pojo.vo.SelectNodeVo; import com.changhu.pojo.dto.DataViewDTO; @@ -15,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import java.util.List; @@ -26,6 +28,8 @@ import java.util.List; @Tag(name = "开放接口") @JsonBody @RequestMapping("/open") +@IsWhiteList +@RestController public class OpenController { @Autowired diff --git a/policeSecurityServer/src/main/java/com/changhu/controller/WeChatController.java b/policeSecurityServer/src/main/java/com/changhu/controller/WeChatController.java new file mode 100644 index 0000000..7c419ae --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/controller/WeChatController.java @@ -0,0 +1,36 @@ +package com.changhu.controller; + +import com.changhu.common.annotation.JsonBody; +import com.changhu.service.WxService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.Resource; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * @author 20252 + * @createTime 2024/11/22 上午11:42 + * @desc WeChatController... + */ +@Tag(name = "微信相关") +@Controller +@RequestMapping("/wx") +public class WeChatController { + + @Autowired + private WxService wxService; + + @JsonBody(value = false) + @Operation(summary = "获取小程序页面二维码") + @GetMapping(value = "/qrCode") + public ResponseEntity qrCode(@Schema(description = "要生成的路径") @RequestParam String path, + @Schema(description = "生成二维码的宽度") @RequestParam(defaultValue = "430") Integer width) { + return wxService.qrCode(path, width); + } +} diff --git a/policeSecurityServer/src/main/java/com/changhu/support/filter/BodyWrapperFilter.java b/policeSecurityServer/src/main/java/com/changhu/filter/BodyWrapperFilter.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/support/filter/BodyWrapperFilter.java rename to policeSecurityServer/src/main/java/com/changhu/filter/BodyWrapperFilter.java index 8cf8a4c..f88a6ee 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/filter/BodyWrapperFilter.java +++ b/policeSecurityServer/src/main/java/com/changhu/filter/BodyWrapperFilter.java @@ -1,4 +1,4 @@ -package com.changhu.support.filter; +package com.changhu.filter; import jakarta.servlet.*; import jakarta.servlet.http.HttpServletRequest; diff --git a/policeSecurityServer/src/main/java/com/changhu/support/filter/CustomHttpServletRequestWrapper.java b/policeSecurityServer/src/main/java/com/changhu/filter/CustomHttpServletRequestWrapper.java similarity index 98% rename from policeSecurityServer/src/main/java/com/changhu/support/filter/CustomHttpServletRequestWrapper.java rename to policeSecurityServer/src/main/java/com/changhu/filter/CustomHttpServletRequestWrapper.java index a4c11ba..6bcd244 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/filter/CustomHttpServletRequestWrapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/filter/CustomHttpServletRequestWrapper.java @@ -1,4 +1,4 @@ -package com.changhu.support.filter; +package com.changhu.filter; import jakarta.servlet.ReadListener; import jakarta.servlet.ServletInputStream; diff --git a/policeSecurityServer/src/main/java/com/changhu/support/handler/GlobalExceptionHandler.java b/policeSecurityServer/src/main/java/com/changhu/handler/GlobalExceptionHandler.java similarity index 99% rename from policeSecurityServer/src/main/java/com/changhu/support/handler/GlobalExceptionHandler.java rename to policeSecurityServer/src/main/java/com/changhu/handler/GlobalExceptionHandler.java index 05ba1d5..b9c2b76 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/handler/GlobalExceptionHandler.java +++ b/policeSecurityServer/src/main/java/com/changhu/handler/GlobalExceptionHandler.java @@ -1,4 +1,4 @@ -package com.changhu.support.handler; +package com.changhu.handler; import cn.dev33.satoken.exception.NotLoginException; import cn.hutool.core.exceptions.ExceptionUtil; diff --git a/policeSecurityServer/src/main/java/com/changhu/support/handler/JsonBodyHandler.java b/policeSecurityServer/src/main/java/com/changhu/handler/JsonBodyHandler.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/support/handler/JsonBodyHandler.java rename to policeSecurityServer/src/main/java/com/changhu/handler/JsonBodyHandler.java index 550cf15..4c712cf 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/handler/JsonBodyHandler.java +++ b/policeSecurityServer/src/main/java/com/changhu/handler/JsonBodyHandler.java @@ -1,7 +1,7 @@ -package com.changhu.support.handler; +package com.changhu.handler; import com.changhu.common.pojo.model.JsonResult; -import com.changhu.support.interceptor.JsonBodyInterceptor; +import com.changhu.interceptor.JsonBodyInterceptor; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; diff --git a/policeSecurityServer/src/main/java/com/changhu/support/interceptor/JsonBodyInterceptor.java b/policeSecurityServer/src/main/java/com/changhu/interceptor/JsonBodyInterceptor.java similarity index 98% rename from policeSecurityServer/src/main/java/com/changhu/support/interceptor/JsonBodyInterceptor.java rename to policeSecurityServer/src/main/java/com/changhu/interceptor/JsonBodyInterceptor.java index 64449a2..530b9e6 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/interceptor/JsonBodyInterceptor.java +++ b/policeSecurityServer/src/main/java/com/changhu/interceptor/JsonBodyInterceptor.java @@ -1,4 +1,4 @@ -package com.changhu.support.interceptor; +package com.changhu.interceptor; import cn.hutool.core.collection.ConcurrentHashSet; import com.changhu.common.annotation.JsonBody; diff --git a/policeSecurityServer/src/main/java/com/changhu/support/interceptor/SignInterceptor.java b/policeSecurityServer/src/main/java/com/changhu/interceptor/OpenApiAuthInterceptor.java similarity index 95% rename from policeSecurityServer/src/main/java/com/changhu/support/interceptor/SignInterceptor.java rename to policeSecurityServer/src/main/java/com/changhu/interceptor/OpenApiAuthInterceptor.java index ec6be4b..c80858d 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/interceptor/SignInterceptor.java +++ b/policeSecurityServer/src/main/java/com/changhu/interceptor/OpenApiAuthInterceptor.java @@ -1,4 +1,4 @@ -package com.changhu.support.interceptor; +package com.changhu.interceptor; import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.URLUtil; @@ -9,8 +9,8 @@ import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.db.enums.IsEnable; import com.changhu.common.exception.MessageException; import com.changhu.common.utils.IpUtil; +import com.changhu.filter.CustomHttpServletRequestWrapper; import com.changhu.pojo.entity.AccessKeys; -import com.changhu.support.filter.CustomHttpServletRequestWrapper; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; @@ -26,10 +26,10 @@ import java.util.stream.Collectors; /** * @author 20252 * @createTime 2024/11/19 下午1:58 - * @desc SignInterceptor... + * @desc 开放接口认证拦截器 */ @Slf4j -public class SignInterceptor implements HandlerInterceptor { +public class OpenApiAuthInterceptor implements HandlerInterceptor { private static final String ACCESS_KEY = "Access-Key";//调用者身份唯一标识 private static final String TIMESTAMP = "Time-Stamp";//时间戳 diff --git a/policeSecurityServer/src/main/java/com/changhu/support/interceptor/UserTypeInterceptor.java b/policeSecurityServer/src/main/java/com/changhu/interceptor/UserTypeInterceptor.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/support/interceptor/UserTypeInterceptor.java rename to policeSecurityServer/src/main/java/com/changhu/interceptor/UserTypeInterceptor.java index fd54d67..07032d2 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/interceptor/UserTypeInterceptor.java +++ b/policeSecurityServer/src/main/java/com/changhu/interceptor/UserTypeInterceptor.java @@ -1,4 +1,4 @@ -package com.changhu.support.interceptor; +package com.changhu.interceptor; import cn.hutool.core.util.ArrayUtil; import com.changhu.common.annotation.CheckUserType; @@ -14,7 +14,7 @@ import org.springframework.web.servlet.HandlerInterceptor; /** * @author 20252 * @createTime 2024/9/4 下午4:00 - * @desc UserTypeInterceptor... + * @desc 用户类型校验拦截器 */ public class UserTypeInterceptor implements HandlerInterceptor { diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkAssessmentRecordDetailsMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/CkAssessmentRecordDetailsMapper.java similarity index 71% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkAssessmentRecordDetailsMapper.java rename to policeSecurityServer/src/main/java/com/changhu/mapper/CkAssessmentRecordDetailsMapper.java index a3d91bc..7c16064 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkAssessmentRecordDetailsMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/CkAssessmentRecordDetailsMapper.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.mapper; +package com.changhu.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkAssessmentRecordDetails; +import com.changhu.pojo.entity.CkAssessmentRecordDetails; import org.apache.ibatis.annotations.Mapper; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/CkAssessmentRecordMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/CkAssessmentRecordMapper.java new file mode 100644 index 0000000..cd25384 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/CkAssessmentRecordMapper.java @@ -0,0 +1,15 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.changhu.pojo.entity.CkAssessmentRecord; +import org.apache.ibatis.annotations.Mapper; + +/** + * ck_assessment_record (考核记录) 固化类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Mapper +public interface CkAssessmentRecordMapper extends BaseMapper { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkGroupMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/CkGroupMapper.java similarity index 69% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkGroupMapper.java rename to policeSecurityServer/src/main/java/com/changhu/mapper/CkGroupMapper.java index eb83633..3cf0d22 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkGroupMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/CkGroupMapper.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.mapper; +package com.changhu.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkGroup; +import com.changhu.pojo.entity.CkGroup; import org.apache.ibatis.annotations.Mapper; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkItemMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/CkItemMapper.java similarity index 70% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkItemMapper.java rename to policeSecurityServer/src/main/java/com/changhu/mapper/CkItemMapper.java index 027c61d..a58cfd8 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkItemMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/CkItemMapper.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.mapper; +package com.changhu.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkItem; +import com.changhu.pojo.entity.CkItem; import org.apache.ibatis.annotations.Mapper; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/CkProjectMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/CkProjectMapper.java new file mode 100644 index 0000000..416aac1 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/CkProjectMapper.java @@ -0,0 +1,15 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.changhu.pojo.entity.CkProject; +import org.apache.ibatis.annotations.Mapper; + +/** + * ck_project (考核项目) 固化类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Mapper +public interface CkProjectMapper extends BaseMapper { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkStandardMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/CkStandardMapper.java similarity index 69% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkStandardMapper.java rename to policeSecurityServer/src/main/java/com/changhu/mapper/CkStandardMapper.java index fa97775..c1d94a1 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkStandardMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/CkStandardMapper.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.mapper; +package com.changhu.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkStandard; +import com.changhu.pojo.entity.CkStandard; import org.apache.ibatis.annotations.Mapper; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/EnterprisesUnitMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/EnterprisesUnitMapper.java similarity index 74% rename from policeSecurityServer/src/main/java/com/changhu/module/management/mapper/EnterprisesUnitMapper.java rename to policeSecurityServer/src/main/java/com/changhu/mapper/EnterprisesUnitMapper.java index 9d9104d..17ab57f 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/EnterprisesUnitMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/EnterprisesUnitMapper.java @@ -1,10 +1,10 @@ -package com.changhu.module.management.mapper; +package com.changhu.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.entity.EnterprisesUnit; -import com.changhu.module.management.pojo.queryParams.EnterprisesUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.EnterprisesUnitPagerVo; +import com.changhu.pojo.entity.EnterprisesUnit; +import com.changhu.pojo.queryParams.EnterprisesUnitPagerQueryParams; +import com.changhu.pojo.vo.EnterprisesUnitPagerVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementMapper.java new file mode 100644 index 0000000..c14645a --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementMapper.java @@ -0,0 +1,28 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.common.db.enums.MiniProgramUserIdentity; +import com.changhu.pojo.vo.UnitMiniProgramUserPagerQueryParams; +import com.changhu.pojo.vo.UnitMiniProgramUserPagerVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author 20252 + * @createTime 2024/11/22 上午9:05 + * @desc ManagementMapper... + */ +@Mapper +public interface ManagementMapper { + /** + * 分页查询 + * + * @param page 分页参数 + * @param params 查询参数 + * @param identity 用户身份 + * @return 结果 + */ + Page miniProgramUserPager(@Param("page") Page page, + @Param("params") UnitMiniProgramUserPagerQueryParams params, + @Param("identity") MiniProgramUserIdentity identity); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementPoliceUnitUserMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementPoliceUnitUserMapper.java new file mode 100644 index 0000000..fe27829 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementPoliceUnitUserMapper.java @@ -0,0 +1,15 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.changhu.pojo.entity.ManagementPoliceUnitUser; +import org.apache.ibatis.annotations.Mapper; + +/** + * management_police_user (后台-公安单位用户表) 固化类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Mapper +public interface ManagementPoliceUnitUserMapper extends BaseMapper { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementSecurityUnitUserMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementSecurityUnitUserMapper.java new file mode 100644 index 0000000..6fb9b37 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementSecurityUnitUserMapper.java @@ -0,0 +1,15 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.changhu.pojo.entity.ManagementSecurityUnitUser; +import org.apache.ibatis.annotations.Mapper; + +/** + * management_security_unit_user (后台-保安单位用户表) 固化类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Mapper +public interface ManagementSecurityUnitUserMapper extends BaseMapper { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementSuperUserMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementSuperUserMapper.java similarity index 73% rename from policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementSuperUserMapper.java rename to policeSecurityServer/src/main/java/com/changhu/mapper/ManagementSuperUserMapper.java index bf086ea..cc8588b 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementSuperUserMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/ManagementSuperUserMapper.java @@ -1,7 +1,7 @@ -package com.changhu.module.management.mapper; +package com.changhu.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.changhu.module.management.pojo.entity.ManagementSuperUser; +import com.changhu.pojo.entity.ManagementSuperUser; import org.apache.ibatis.annotations.Mapper; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/MiniProgramUserMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/MiniProgramUserMapper.java new file mode 100644 index 0000000..4dc4bf0 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/MiniProgramUserMapper.java @@ -0,0 +1,14 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.changhu.pojo.entity.MiniProgramUser; +import org.apache.ibatis.annotations.Mapper; + +/** + * mini_program_user (小程序用户) 固化类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Mapper +public interface MiniProgramUserMapper extends BaseMapper { +} diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/OpenApiMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/OpenApiMapper.java index 6ea93e8..863abb5 100644 --- a/policeSecurityServer/src/main/java/com/changhu/mapper/OpenApiMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/OpenApiMapper.java @@ -3,6 +3,7 @@ package com.changhu.mapper; import com.changhu.common.pojo.vo.SelectNodeVo; import com.changhu.pojo.dto.SecurityUnitUseStatisticsDTO; import com.changhu.pojo.dto.SecurityUserRosterDTO; +import com.changhu.pojo.dto.ServiceProjectDTO; import com.changhu.pojo.params.EnterprisesUnitOrServiceProjectType; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -27,6 +28,14 @@ public interface OpenApiMapper { List> getEnterprisesUnit(@Param("code") String code, @Param("level") Integer level); + /** + * 获取企事业单位下的服务项目 + * + * @param enterprisesUnitId 企事业单位id + * @return 服务项目列表 + */ + List getServiceProjectByEnterprisesUnitId(@Param("enterprisesUnitId") Long enterprisesUnitId); + /** * 保安单位使用情况统计 * diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/PoliceUnitMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/PoliceUnitMapper.java new file mode 100644 index 0000000..d40a66b --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/PoliceUnitMapper.java @@ -0,0 +1,15 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.changhu.pojo.entity.PoliceUnit; +import org.apache.ibatis.annotations.Mapper; + +/** + * police_unit (公安单位) 固化类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Mapper +public interface PoliceUnitMapper extends BaseMapper { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/SecurityUnitMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/SecurityUnitMapper.java new file mode 100644 index 0000000..94de684 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/SecurityUnitMapper.java @@ -0,0 +1,15 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.changhu.pojo.entity.SecurityUnit; +import org.apache.ibatis.annotations.Mapper; + +/** + * security_unit (保安单位) 固化类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Mapper +public interface SecurityUnitMapper extends BaseMapper { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/mapper/SecurityUserMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/SecurityUserMapper.java similarity index 89% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/mapper/SecurityUserMapper.java rename to policeSecurityServer/src/main/java/com/changhu/mapper/SecurityUserMapper.java index 52472a8..d016312 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/mapper/SecurityUserMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/SecurityUserMapper.java @@ -1,10 +1,10 @@ -package com.changhu.module.miniProgram.mapper; +package com.changhu.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.miniProgram.pojo.entity.SecurityUser; import com.changhu.module.miniProgram.pojo.queryParams.ServiceProjectSecurityUserPagerQueryParams; import com.changhu.module.miniProgram.pojo.vo.ServiceProjectSecurityUserPagerVo; +import com.changhu.pojo.entity.SecurityUser; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/policeSecurityServer/src/main/java/com/changhu/mapper/ServiceProjectMapper.java b/policeSecurityServer/src/main/java/com/changhu/mapper/ServiceProjectMapper.java new file mode 100644 index 0000000..3c11a7e --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/mapper/ServiceProjectMapper.java @@ -0,0 +1,27 @@ +package com.changhu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.changhu.module.miniProgram.pojo.vo.IndexServiceProjectListVo; +import com.changhu.pojo.entity.ServiceProject; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * service_project (服务项目) 固化类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Mapper +public interface ServiceProjectMapper extends BaseMapper { + + /** + * 获取服务项目 + * + * @return 服务项目列表 + */ + List getServiceProjectList(@Param("policeUnitId") Long policeUnitId, + @Param("projectManagerMiniProgramUserId") Long projectManagerMiniProgramUserId); + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkProjectMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkProjectMapper.java deleted file mode 100644 index 0827f55..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkProjectMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.changhu.module.assessmentCriteria.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.assessmentCriteria.pojo.entity.CkProject; -import com.changhu.module.assessmentCriteria.pojo.queryParams.CkProjectPagerQueryParams; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectDetailTableVo; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectPagerVo; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * ck_project (考核项目) 固化类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Mapper -public interface CkProjectMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页参数 - * @param params 查询参数 - * @return 分页数据 - */ - Page pager(@Param("page") Page page, - @Param("params") CkProjectPagerQueryParams params); - - /** - * 考核项目详情 - * - * @param ckProjectId 考核项目id - * @return 详情 - */ - List ckProjectDetail(@Param("ckProjectId") Long ckProjectId); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkAssessmentRecordService.java b/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkAssessmentRecordService.java deleted file mode 100644 index d2418bf..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkAssessmentRecordService.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.changhu.module.assessmentCriteria.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.assessmentCriteria.pojo.entity.CkAssessmentRecord; -import com.changhu.module.assessmentCriteria.pojo.queryParams.AssessmentRecordPagerQueryParams; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordDetailVo; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordPagerVo; -import com.changhu.support.mybatisplus.pojo.params.PageParams; - -import java.util.List; - -/** - * ck_assessment_record (考核记录) 服务类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -public interface CkAssessmentRecordService extends IService { - - /** - * 分页查询 - * - * @param queryParams 查询参数 - * @return 结果 - */ - Page pager(PageParams queryParams); - - /** - * 扣分详情 - * - * @param assessmentRecordId 考核记录id - * @return 结果 - */ - List deductedDetail(Long assessmentRecordId); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/PoliceController.java b/policeSecurityServer/src/main/java/com/changhu/module/management/controller/PoliceController.java deleted file mode 100644 index 578b327..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/PoliceController.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.changhu.module.management.controller; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.common.annotation.CheckUserType; -import com.changhu.common.annotation.JsonBody; -import com.changhu.common.db.enums.UserType; -import com.changhu.module.management.pojo.params.ManagementPoliceUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ManagementPoliceUnitUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.ManagementPoliceUnitUserPagerVo; -import com.changhu.module.management.service.PoliceService; -import com.changhu.support.mybatisplus.pojo.params.PageParams; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.Valid; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * @author 20252 - * @createTime 2024/9/11 上午9:39 - * @desc PoliceController... - */ -@Tag(name = "后台-公安") -@JsonBody -@RequestMapping("/management/police") -@CheckUserType(userTypes = UserType.MANAGEMENT_POLICE) -public class PoliceController { - - @Autowired - private PoliceService policeService; - - @Operation(summary = "新增或保存后台用户") - @PostMapping("/user/saveOrUpdate") - public void userSaveOrUpdate(@RequestBody @Valid ManagementPoliceUserSaveOrUpdateParams params) { - policeService.userSaveOrUpdate(params); - } - - @Operation(summary = "分页查询后台用户") - @PostMapping("/user/pager") - public Page userPager(@RequestBody PageParams queryParams) { - return policeService.userPager(queryParams); - } - - @Operation(summary = "根据id删除后台用户") - @DeleteMapping("/user/deleteById") - public void userDeleteById(@RequestParam @Schema(description = "后台公安用户id") Long managementPoliceUnitUserId) { - policeService.userDeleteById(managementPoliceUnitUserId); - } - -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/SecurityController.java b/policeSecurityServer/src/main/java/com/changhu/module/management/controller/SecurityController.java deleted file mode 100644 index 9b8470f..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/SecurityController.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.changhu.module.management.controller; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.common.annotation.CheckUserType; -import com.changhu.common.annotation.JsonBody; -import com.changhu.common.db.enums.UserType; -import com.changhu.common.pojo.vo.SelectNodeVo; -import com.changhu.module.management.pojo.params.ManagementSecurityUnitUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ManagementSecurityUnitUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.ManagementSecurityUnitUserPagerVo; -import com.changhu.module.management.service.SecurityService; -import com.changhu.support.mybatisplus.pojo.params.PageParams; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.Valid; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * @author 20252 - * @createTime 2024/9/11 上午9:39 - * @desc SecurityController... - */ -@Tag(name = "后台-保安") -@JsonBody -@RequestMapping("/management/security") -@CheckUserType(userTypes = UserType.MANAGEMENT_SECURITY) -public class SecurityController { - - @Autowired - private SecurityService securityService; - - @Operation(summary = "新增或修改后台用户") - @PostMapping("/user/saveOrUpdate") - public void userSaveOrUpdate(@RequestBody @Valid ManagementSecurityUnitUserSaveOrUpdateParams saveOrUpdateParams) { - securityService.userSaveOrUpdate(saveOrUpdateParams); - } - - @Operation(summary = "分页查询后台用户") - @PostMapping("/user/pager") - public Page userPager(@RequestBody PageParams queryParams) { - return securityService.userPager(queryParams); - } - - @Operation(summary = "根据id删除后台用户") - @DeleteMapping("/user/deleteById") - public void userDeleteById(@RequestParam @Schema(description = "后台保安用户id") Long managementSecurityUnitUserId) { - securityService.userDeleteById(managementSecurityUnitUserId); - } - - @Operation(summary = "查询单位下的项目经理") - @GetMapping("/listProjectManager") - public List> listProjectManager() { - return securityService.listProjectManager(); - } -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/SuperController.java b/policeSecurityServer/src/main/java/com/changhu/module/management/controller/SuperController.java deleted file mode 100644 index cbc7440..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/SuperController.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.changhu.module.management.controller; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.common.annotation.CheckUserType; -import com.changhu.common.annotation.JsonBody; -import com.changhu.common.db.enums.UserType; -import com.changhu.module.management.pojo.params.ManagementSuperUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.PoliceUnitPagerQueryParams; -import com.changhu.module.management.pojo.queryParams.SecurityUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.PoliceUnitPagerVo; -import com.changhu.module.management.pojo.vo.SecurityUnitPagerVo; -import com.changhu.module.management.service.SuperService; -import com.changhu.support.mybatisplus.pojo.params.PageParams; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.Valid; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; - -/** - * @author 20252 - * @createTime 2024/9/11 上午9:38 - * @desc ManagementSuperController... - */ -@Tag(name = "超级后台") -@JsonBody -@RequestMapping("/management/super") -@CheckUserType(userTypes = UserType.MANAGEMENT_SUPER) -public class SuperController { - - @Autowired - private SuperService superService; - - @Operation(summary = "新增或保存后台用户") - @PostMapping("/saveOrUpdateUser") - public void saveOrUpdateUser(@RequestBody @Valid ManagementSuperUserSaveOrUpdateParams params) { - superService.saveOrUpdateUser(params); - } - - @Operation(summary = "公安单位分页查询") - @PostMapping("/policeUnit/pager") - public Page policeUnitPager(@RequestBody PageParams queryParams) { - return superService.policeUnitPager(queryParams); - } - - @Operation(summary = "保安单位分页查询") - @PostMapping("/securityUnit/pager") - public Page securityUnitPager(@RequestBody PageParams queryParams) { - return superService.securityUnitPager(queryParams); - } - -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementPoliceUnitUserMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementPoliceUnitUserMapper.java deleted file mode 100644 index 0c60b83..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementPoliceUnitUserMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.changhu.module.management.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.entity.ManagementPoliceUnitUser; -import com.changhu.module.management.pojo.queryParams.ManagementPoliceUnitUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.ManagementPoliceUnitUserPagerVo; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -/** - * management_police_user (后台-公安单位用户表) 固化类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Mapper -public interface ManagementPoliceUnitUserMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页参数 - * @param params 查询参数 - * @return 结果 - */ - Page pager(@Param("page") Page page, - @Param("params") ManagementPoliceUnitUserPagerQueryParams params); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementSecurityUnitUserMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementSecurityUnitUserMapper.java deleted file mode 100644 index d87e762..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ManagementSecurityUnitUserMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.changhu.module.management.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.entity.ManagementSecurityUnitUser; -import com.changhu.module.management.pojo.queryParams.ManagementSecurityUnitUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.ManagementSecurityUnitUserPagerVo; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -/** - * management_security_unit_user (后台-保安单位用户表) 固化类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Mapper -public interface ManagementSecurityUnitUserMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页参数 - * @param params 查询参数 - * @return 结果 - */ - Page pager(@Param("page") Page page, - @Param("params") ManagementSecurityUnitUserPagerQueryParams params); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/PoliceUnitMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/PoliceUnitMapper.java deleted file mode 100644 index 7626c2c..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/PoliceUnitMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.changhu.module.management.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.entity.PoliceUnit; -import com.changhu.module.management.pojo.queryParams.PoliceUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.PoliceUnitPagerVo; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -/** - * police_unit (公安单位) 固化类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Mapper -public interface PoliceUnitMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页参数 - * @param params 查询参数 - * @return 结果 - */ - Page pager(@Param("page") Page page, - @Param("params") PoliceUnitPagerQueryParams params); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/SecurityUnitMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/SecurityUnitMapper.java deleted file mode 100644 index cf0e1fe..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/SecurityUnitMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.changhu.module.management.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.entity.SecurityUnit; -import com.changhu.module.management.pojo.queryParams.SecurityUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.SecurityUnitPagerVo; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -/** - * security_unit (保安单位) 固化类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Mapper -public interface SecurityUnitMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param params 查询参数 - * @return 结果 - */ - Page pager(@Param("page") Page page, - @Param("params") SecurityUnitPagerQueryParams params); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ServiceProjectMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ServiceProjectMapper.java deleted file mode 100644 index 9850bf1..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/mapper/ServiceProjectMapper.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.changhu.module.management.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.entity.ServiceProject; -import com.changhu.module.management.pojo.queryParams.ServiceProjectPagerQueryParams; -import com.changhu.module.management.pojo.vo.ServiceProjectPagerVo; -import com.changhu.module.miniProgram.pojo.vo.IndexServiceProjectListVo; -import com.changhu.pojo.dto.ServiceProjectDTO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * service_project (服务项目) 固化类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Mapper -public interface ServiceProjectMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param params 查询参数 - * @return 结果 - */ - Page pager(@Param("page") Page page, - @Param("params") ServiceProjectPagerQueryParams params); - - /** - * 获取服务项目 - * - * @return 服务项目列表 - */ - List getServiceProjectList(@Param("policeUnitId") Long policeUnitId, - @Param("projectManagerMiniProgramUserId") Long projectManagerMiniProgramUserId); - - /** - * 获取企事业单位下的服务项目 - * - * @param enterprisesUnitId 企事业单位id - * @return 服务项目列表 - */ - List getServiceProjectByEnterprisesUnitId(@Param("enterprisesUnitId") Long enterprisesUnitId); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementService.java b/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementService.java deleted file mode 100644 index 9fd2787..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.changhu.module.management.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.params.IndexCheckPassParams; -import com.changhu.module.management.pojo.params.IndexCheckStatusParams; -import com.changhu.module.management.pojo.params.IndexDisableOrEnableParams; -import com.changhu.module.management.pojo.queryParams.UnitMiniProgramUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.UnitCheckStatusVo; -import com.changhu.module.management.pojo.vo.UnitMiniProgramUserPagerVo; -import com.changhu.support.mybatisplus.pojo.params.PageParams; - -/** - * @author 20252 - * @createTime 2024/9/2 上午9:49 - * @desc IndexService... - */ -public interface ManagementService { - - /** - * 审核通过 - * - * @param params 审核参数 - */ - void checkPass(IndexCheckPassParams params); - - /** - * 获取审核状态 - * - * @param params 参数 - * @return 结果 - */ - UnitCheckStatusVo getCheckStatus(IndexCheckStatusParams params); - - /** - * 启用或者禁用单位 - * - * @param params 参数 - */ - void disableOrEnable(IndexDisableOrEnableParams params); - - /** - * 查询单位下的小程序用户 - * - * @param queryParams 查询参数 - * @return 结果 - */ - Page miniProgramUserPager(PageParams queryParams); - - /** - * 审核通过小程序用户 - * - * @param params 参数 - */ - void passMiniProgramUser(IndexDisableOrEnableParams params); - - /** - * 禁用或启用小程序用户 - * - * @param params 参数 - */ - void disableOrEnableMiniProgramUser(IndexDisableOrEnableParams params); - -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/PoliceService.java b/policeSecurityServer/src/main/java/com/changhu/module/management/service/PoliceService.java deleted file mode 100644 index 2f129f8..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/PoliceService.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.changhu.module.management.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.params.ManagementPoliceUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ManagementPoliceUnitUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.ManagementPoliceUnitUserPagerVo; -import com.changhu.support.mybatisplus.pojo.params.PageParams; - -/** - * @author 20252 - * @createTime 2024/9/11 上午9:59 - * @desc MPoliceService... - */ -public interface PoliceService { - /** - * 新增或保存后台用户 - * - * @param params 参数 - */ - void userSaveOrUpdate(ManagementPoliceUserSaveOrUpdateParams params); - - /** - * 后台用户分页查询 - * - * @param queryParams 查询参数 - * @return 结果 - */ - Page userPager(PageParams queryParams); - - /** - * 根据id删除后台用户 - * - * @param managementPoliceUnitUserId 后台用户id - */ - void userDeleteById(Long managementPoliceUnitUserId); - -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/SecurityService.java b/policeSecurityServer/src/main/java/com/changhu/module/management/service/SecurityService.java deleted file mode 100644 index fde7bda..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/SecurityService.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.changhu.module.management.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.common.pojo.vo.SelectNodeVo; -import com.changhu.module.management.pojo.params.ManagementSecurityUnitUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ManagementSecurityUnitUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.ManagementSecurityUnitUserPagerVo; -import com.changhu.support.mybatisplus.pojo.params.PageParams; - -import java.util.List; - -/** - * @author 20252 - * @createTime 2024/9/11 上午10:17 - * @desc SecurityService... - */ -public interface SecurityService { - /** - * 新增或修改后台用户 - * - * @param saveOrUpdateParams 参数 - */ - void userSaveOrUpdate(ManagementSecurityUnitUserSaveOrUpdateParams saveOrUpdateParams); - - /** - * 分页查询后台用户 - * - * @param queryParams 分页查询后台用户 - * @return 结果 - */ - Page userPager(PageParams queryParams); - - /** - * 根据id删除后台用户 - * - * @param managementSecurityUnitUserId 用户id - */ - void userDeleteById(Long managementSecurityUnitUserId); - - /** - * 查询单位下的项目经理 - * - * @return 项目经理 - */ - List> listProjectManager(); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ServiceProjectService.java b/policeSecurityServer/src/main/java/com/changhu/module/management/service/ServiceProjectService.java deleted file mode 100644 index 8f8d735..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ServiceProjectService.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.changhu.module.management.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.management.pojo.entity.ServiceProject; -import com.changhu.module.management.pojo.params.ServiceProjectSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ServiceProjectPagerQueryParams; -import com.changhu.module.management.pojo.vo.ServiceProjectPagerVo; -import com.changhu.pojo.dto.ServiceProjectDTO; -import com.changhu.support.mybatisplus.pojo.params.PageParams; - -import java.util.List; - -/** - * service_project (服务项目) 服务类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -public interface ServiceProjectService extends IService { - - /** - * 分页查询 - * - * @param queryParams 查询参数 - * @return 结果 - */ - Page pager(PageParams queryParams); - - /** - * 新增或者修改 - * - * @param params 参数 - */ - void saveOrUpdate(ServiceProjectSaveOrUpdateParams params); - - /** - * 获取企事业单位下的服务项目 - * - * @param enterprisesUnitId 企事业单位id - * @return 服务项目列表 - */ - List getServiceProjectByEnterprisesUnitId(Long enterprisesUnitId); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/SuperService.java b/policeSecurityServer/src/main/java/com/changhu/module/management/service/SuperService.java deleted file mode 100644 index abf8694..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/SuperService.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.changhu.module.management.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.management.pojo.params.ManagementSuperUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.PoliceUnitPagerQueryParams; -import com.changhu.module.management.pojo.queryParams.SecurityUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.PoliceUnitPagerVo; -import com.changhu.module.management.pojo.vo.SecurityUnitPagerVo; -import com.changhu.support.mybatisplus.pojo.params.PageParams; -import org.apache.ibatis.annotations.Param; - -/** - * @author 20252 - * @createTime 2024/9/11 上午9:52 - * @desc SuperService... - */ -public interface SuperService { - /** - * 新增或保存后台用户 - * - * @param params 参数 - */ - void saveOrUpdateUser(ManagementSuperUserSaveOrUpdateParams params); - - /** - * 公安单位分页查询 - * - * @param queryParams 查询参数 - * @return 结果 - */ - Page policeUnitPager(@Param("queryParams") PageParams queryParams); - - /** - * 保安单位分页查询 - * - * @param queryParams 查询参数 - * @return 结果 - */ - Page securityUnitPager(PageParams queryParams); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ServiceProjectServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ServiceProjectServiceImpl.java deleted file mode 100644 index 15453f5..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ServiceProjectServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.changhu.module.management.service.impl; - -import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.common.exception.MessageException; -import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.mapper.ServiceProjectMapper; -import com.changhu.module.management.pojo.entity.ServiceProject; -import com.changhu.module.management.pojo.params.ServiceProjectSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ServiceProjectPagerQueryParams; -import com.changhu.module.management.pojo.vo.ServiceProjectPagerVo; -import com.changhu.module.management.service.ServiceProjectService; -import com.changhu.pojo.dto.ServiceProjectDTO; -import com.changhu.support.mybatisplus.pojo.params.PageParams; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * service_project (服务项目) 服务实现类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Service -public class ServiceProjectServiceImpl extends ServiceImpl implements ServiceProjectService { - - @Override - public Page pager(PageParams queryParams) { - return baseMapper.pager(queryParams.getPage(), queryParams.getParams()); - } - - @Override - public void saveOrUpdate(ServiceProjectSaveOrUpdateParams params) { - ServiceProject serviceProject = BeanUtil.copyProperties(params, ServiceProject.class); - serviceProject.setSecurityUnitId(UserUtil.getUnitId()); - boolean b = this.saveOrUpdate(serviceProject); - if (!b) { - throw new MessageException(); - } - } - - @Override - public List getServiceProjectByEnterprisesUnitId(Long enterprisesUnitId) { - return baseMapper.getServiceProjectByEnterprisesUnitId(enterprisesUnitId); - } -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/MiniProgramUserController.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/MiniProgramUserController.java deleted file mode 100644 index 467439a..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/MiniProgramUserController.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.changhu.module.miniProgram.controller; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.common.annotation.JsonBody; -import com.changhu.module.miniProgram.pojo.params.MiniProgramUserRegisterParams; -import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams; -import com.changhu.module.miniProgram.pojo.queryParams.ServiceProjectSecurityUserPagerQueryParams; -import com.changhu.module.miniProgram.pojo.vo.ServiceProjectSecurityUserPagerVo; -import com.changhu.module.miniProgram.service.MiniProgramUserService; -import com.changhu.support.mybatisplus.pojo.params.PageParams; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.Valid; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; - -/** - * @author 20252 - * @createTime 2024/9/6 上午10:42 - * @desc MiniProgramUserController... - */ -@Tag(name = "小程序用户接口") -@JsonBody -@RequestMapping("/miniProgramUser") -public class MiniProgramUserController { - - @Autowired - private MiniProgramUserService miniProgramUserService; - - @Operation(summary = "注册") - @PostMapping("/register") - public void register(@RequestBody @Valid MiniProgramUserRegisterParams params) { - miniProgramUserService.register(params); - } - - @Operation(summary = "二维码表单录入保安人员") - @PostMapping("/qrCodeFormInputSecurityUser") - public void qrCodeFormInputSecurityUser(@RequestBody @Valid SaveOrUpdateSecurityUserParams params) { - miniProgramUserService.qrCodeFormInputSecurityUser(params); - } - - @Operation(summary = "服务项目保安人员分页") - @PostMapping("/securityUserPager") - public Page securityUserPager(@RequestBody PageParams queryParams) { - return miniProgramUserService.securityUserPager(queryParams); - } -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/PoliceIndexController.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/PoliceIndexController.java index bde2ec2..fb6af13 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/PoliceIndexController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/PoliceIndexController.java @@ -6,12 +6,13 @@ import com.changhu.common.db.enums.UserType; import com.changhu.common.pojo.vo.SelectNodeVo; import com.changhu.module.miniProgram.pojo.vo.IndexDataStatisticsVo; import com.changhu.module.miniProgram.pojo.vo.IndexServiceProjectListVo; -import com.changhu.module.miniProgram.service.MPoliceService; +import com.changhu.module.miniProgram.service.PoliceIndexService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import java.util.List; @@ -20,13 +21,14 @@ import java.util.List; * @createTime 2024/9/11 上午10:44 * @desc PoliceIndexController... */ -@Tag(name = "公安人员首页") +@Tag(name = "微信小程序-首页-公安") @JsonBody @RequestMapping("/policeIndex") +@RestController public class PoliceIndexController { @Autowired - private MPoliceService policeIndexService; + private PoliceIndexService policeIndexService; @Operation(summary = "首页数据统计") @GetMapping("/dataStatistics") diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/ProjectManageIndexController.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/ProjectManageIndexController.java index 1c3ee25..6a9ecf0 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/ProjectManageIndexController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/ProjectManageIndexController.java @@ -3,17 +3,14 @@ package com.changhu.module.miniProgram.controller; import com.changhu.common.annotation.CheckUserType; import com.changhu.common.annotation.JsonBody; import com.changhu.common.db.enums.UserType; -import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams; import com.changhu.module.miniProgram.pojo.vo.IndexServiceProjectListVo; import com.changhu.module.miniProgram.service.ProjectManageIndexService; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.Resource; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import java.util.List; @@ -22,38 +19,20 @@ import java.util.List; * @createTime 2024/9/10 下午3:48 * @desc 项目经理首页控制器 */ -@Tag(name = "项目经理首页") +@Tag(name = "微信小程序-首页-项目经理") @JsonBody -@RequestMapping("/projectManageIndex") +@RequestMapping("/mp/pmi") +@RestController public class ProjectManageIndexController { @Autowired private ProjectManageIndexService projectManageIndexService; @Operation(summary = "获取我的服务项目") - @GetMapping("/getMyServiceProject") + @GetMapping("/get_my_sp") @CheckUserType(userTypes = UserType.MINI_PROGRAM_PROJECT_MANAGE) public List getMyServiceProjectList() { return projectManageIndexService.getMyServiceProjectList(); } - @Operation(summary = "根据id删除保安人员") - @DeleteMapping("/deleteSecurityUserByServiceProjectId") - public void deleteSecurityUserById(@RequestParam @Schema(description = "保安人员id") Long securityUserId) { - projectManageIndexService.deleteSecurityUserByServiceProjectId(securityUserId); - } - - @Operation(summary = "保存或更新保安人员") - @PostMapping("/saveOrUpdateSecurityUser") - public void saveOrUpdateSecurityUser(@RequestBody @Valid SaveOrUpdateSecurityUserParams params) { - projectManageIndexService.saveOrUpdateSecurityUser(params); - } - - @JsonBody(value = false) - @Operation(summary = "获取表单分享二维码") - @GetMapping(value = "/shareForm_QR_Code") - public ResponseEntity shareForm_QR_Code(@Schema(description = "要生成的路径") @RequestParam String path, - @Schema(description = "生成二维码的宽度") @RequestParam(defaultValue = "430") Integer width) { - return projectManageIndexService.shareForm_QR_Code(path, width); - } } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/SupervisionAssessmentController.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/SupervisionAssessmentController.java new file mode 100644 index 0000000..ccf8365 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/SupervisionAssessmentController.java @@ -0,0 +1,51 @@ +package com.changhu.module.miniProgram.controller; + +import com.changhu.common.annotation.CheckUserType; +import com.changhu.common.annotation.JsonBody; +import com.changhu.common.db.enums.EnterprisesUnitType; +import com.changhu.common.db.enums.UserType; +import com.changhu.common.pojo.vo.SelectNodeVo; +import com.changhu.module.miniProgram.pojo.params.AssessmentRecordParams; +import com.changhu.module.miniProgram.pojo.vo.AssessmentCriteriaRuleVo; +import com.changhu.module.miniProgram.service.SupervisionAssessmentService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author 20252 + * @createTime 2024/11/22 下午2:47 + * @desc SupervisionAssessmentController... + */ +@Tag(name = "微信小程序-监督考核") +@JsonBody +@RequestMapping("/mp/sa") +@CheckUserType(userTypes = UserType.MINI_PROGRAM_POLICE) +@RestController +public class SupervisionAssessmentController { + + @Autowired + private SupervisionAssessmentService supervisionAssessmentService; + + @Operation(summary = "根据类型获取考核项目列表") + @GetMapping("/ckProjectListByType") + public List> ckProjectListByType(@RequestParam EnterprisesUnitType type) { + return supervisionAssessmentService.assessmentCriteriaListByType(type); + } + + @Operation(summary = "根据考核项目获取考核规则") + @GetMapping("/assessmentCriteriaRulesByCkProjectId") + public List assessmentCriteriaRulesByCkProjectId(@RequestParam Long ckProjectId) { + return supervisionAssessmentService.assessmentCriteriaRulesByCkProjectId(ckProjectId); + } + + @Operation(summary = "提交考核记录") + @PostMapping("/submitAssessmentRecord") + public void submitAssessmentRecord(@Validated @RequestBody AssessmentRecordParams params) { + supervisionAssessmentService.submitAssessmentRecord(params); + } +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/UserController.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/UserController.java new file mode 100644 index 0000000..92263cf --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/controller/UserController.java @@ -0,0 +1,64 @@ +package com.changhu.module.miniProgram.controller; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.common.annotation.IsWhiteList; +import com.changhu.common.annotation.JsonBody; +import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams; +import com.changhu.module.miniProgram.pojo.params.UserRegisterParams; +import com.changhu.module.miniProgram.pojo.queryParams.ServiceProjectSecurityUserPagerQueryParams; +import com.changhu.module.miniProgram.pojo.vo.ServiceProjectSecurityUserPagerVo; +import com.changhu.module.miniProgram.service.UserService; +import com.changhu.support.mybatisplus.pojo.params.PageParams; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author 20252 + * @createTime 2024/9/6 上午10:42 + * @desc UserController... + */ +@Tag(name = "微信小程序-用户相关") +@JsonBody +@RequestMapping("/mp/user") +@RestController("miniProgramUserController") +public class UserController { + + @Autowired + private UserService userService; + + @Operation(summary = "注册小程序用户") + @PostMapping("/register") + @IsWhiteList + public void register(@RequestBody @Valid UserRegisterParams params) { + userService.register(params); + } + + @Operation(summary = "保存或更新保安人员") + @PostMapping("/add_security_user_upd") + public void saveOrUpdateSecurityUser(@RequestBody @Valid SaveOrUpdateSecurityUserParams params) { + userService.saveOrUpdateSecurityUser(params); + } + + @Operation(summary = "根据id删除保安人员") + @DeleteMapping("/del_security_user_id") + public void deleteSecurityUserById(@RequestParam @Schema(description = "保安人员id") Long securityUserId) { + userService.deleteSecurityUserByServiceProjectId(securityUserId); + } + + @Operation(summary = "二维码表单录入保安人员") + @PostMapping("/qrCodeFormInputSecurityUser") + @IsWhiteList + public void qrCodeFormInputSecurityUser(@RequestBody @Valid SaveOrUpdateSecurityUserParams params) { + userService.qrCodeFormInputSecurityUser(params); + } + + @Operation(summary = "服务项目保安人员分页") + @PostMapping("/securityUserPager") + public Page securityUserPager(@RequestBody PageParams queryParams) { + return userService.securityUserPager(queryParams); + } +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/mapper/MiniProgramUserMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/mapper/MiniProgramUserMapper.java deleted file mode 100644 index 4ae4e0c..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/mapper/MiniProgramUserMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.changhu.module.miniProgram.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.common.db.enums.MiniProgramUserIdentity; -import com.changhu.module.management.pojo.queryParams.UnitMiniProgramUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.UnitMiniProgramUserPagerVo; -import com.changhu.module.miniProgram.pojo.entity.MiniProgramUser; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -/** - * mini_program_user (小程序用户) 固化类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Mapper -public interface MiniProgramUserMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页参数 - * @param params 查询参数 - * @param identity 用户身份 - * @return 结果 - */ - Page pager(@Param("page") Page page, - @Param("params") UnitMiniProgramUserPagerQueryParams params, - @Param("identity") MiniProgramUserIdentity identity); -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/AssessmentRecordParams.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/AssessmentRecordParams.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/AssessmentRecordParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/AssessmentRecordParams.java index af66d88..e766774 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/AssessmentRecordParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/AssessmentRecordParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.params; +package com.changhu.module.miniProgram.pojo.params; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/MiniProgramUserRegisterParams.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/UserRegisterParams.java similarity index 92% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/MiniProgramUserRegisterParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/UserRegisterParams.java index 39a67e2..e50c3c9 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/MiniProgramUserRegisterParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/params/UserRegisterParams.java @@ -10,10 +10,10 @@ import lombok.Data; /** * @author 20252 * @createTime 2024/9/6 上午10:47 - * @desc MiniProgramUserRegisterParams... + * @desc UserRegisterParams... */ @Data -public class MiniProgramUserRegisterParams { +public class UserRegisterParams { @Schema(description = "微信code") @NotBlank(message = "code不能为空") private String code; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentCriteriaRuleVo.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/vo/AssessmentCriteriaRuleVo.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentCriteriaRuleVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/vo/AssessmentCriteriaRuleVo.java index 8295151..22be2a8 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentCriteriaRuleVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/vo/AssessmentCriteriaRuleVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.vo; +package com.changhu.module.miniProgram.pojo.vo; import com.changhu.common.db.enums.SelectType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/vo/IndexServiceProjectListVo.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/vo/IndexServiceProjectListVo.java index 4de970d..36fa61f 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/vo/IndexServiceProjectListVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/vo/IndexServiceProjectListVo.java @@ -3,7 +3,7 @@ package com.changhu.module.miniProgram.pojo.vo; import cn.hutool.core.lang.Dict; import com.changhu.common.db.enums.EnterprisesUnitType; import com.changhu.common.db.enums.ServiceProjectType; -import com.changhu.module.management.pojo.model.ContactPersonInfo; +import com.changhu.pojo.model.ContactPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/MPoliceService.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/PoliceIndexService.java similarity index 95% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/MPoliceService.java rename to policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/PoliceIndexService.java index 43ed4ac..9f3d243 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/MPoliceService.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/PoliceIndexService.java @@ -11,7 +11,7 @@ import java.util.List; * @createTime 2024/9/11 上午10:52 * @desc MPoliceService... */ -public interface MPoliceService { +public interface PoliceIndexService { /** * 首页数据统计 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/ProjectManageIndexService.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/ProjectManageIndexService.java index a1c7cd8..bb0bd99 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/ProjectManageIndexService.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/ProjectManageIndexService.java @@ -1,9 +1,6 @@ package com.changhu.module.miniProgram.service; -import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams; import com.changhu.module.miniProgram.pojo.vo.IndexServiceProjectListVo; -import org.springframework.core.io.Resource; -import org.springframework.http.ResponseEntity; import java.util.List; @@ -20,22 +17,4 @@ public interface ProjectManageIndexService { */ List getMyServiceProjectList(); - /** - * 根据id删除保安人员 - * - * @param securityUserId 保安人员id - */ - void deleteSecurityUserByServiceProjectId(Long securityUserId); - - /** - * 保存或更新保安人员 - * - * @param params 保安人员参数 - */ - void saveOrUpdateSecurityUser(SaveOrUpdateSecurityUserParams params); - - /** - * 分享表单录入的二维码 - */ - ResponseEntity shareForm_QR_Code(String path, Integer width); } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/SupervisionAssessmentService.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/SupervisionAssessmentService.java new file mode 100644 index 0000000..b20d84f --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/SupervisionAssessmentService.java @@ -0,0 +1,38 @@ +package com.changhu.module.miniProgram.service; + +import com.changhu.common.db.enums.EnterprisesUnitType; +import com.changhu.common.pojo.vo.SelectNodeVo; +import com.changhu.module.miniProgram.pojo.params.AssessmentRecordParams; +import com.changhu.module.miniProgram.pojo.vo.AssessmentCriteriaRuleVo; + +import java.util.List; + +/** + * @author 20252 + * @createTime 2024/11/22 下午2:48 + * @desc SupervisionAssessmentService... + */ +public interface SupervisionAssessmentService { + /** + * 根据类型获取考核标准列表 + * + * @param type 类型 + * @return 结果 + */ + List> assessmentCriteriaListByType(EnterprisesUnitType type); + + /** + * 根据考核项目获取考核规则 + * + * @param ckProjectId 考核项目id + * @return 结果 + */ + List assessmentCriteriaRulesByCkProjectId(Long ckProjectId); + + /** + * 提交考核记录 + * + * @param params 参数 + */ + void submitAssessmentRecord(AssessmentRecordParams params); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/MiniProgramUserService.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/UserService.java similarity index 63% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/MiniProgramUserService.java rename to policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/UserService.java index 543e642..e5a2080 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/MiniProgramUserService.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/UserService.java @@ -1,27 +1,38 @@ package com.changhu.module.miniProgram.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.miniProgram.pojo.entity.MiniProgramUser; -import com.changhu.module.miniProgram.pojo.params.MiniProgramUserRegisterParams; import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams; +import com.changhu.module.miniProgram.pojo.params.UserRegisterParams; import com.changhu.module.miniProgram.pojo.queryParams.ServiceProjectSecurityUserPagerQueryParams; import com.changhu.module.miniProgram.pojo.vo.ServiceProjectSecurityUserPagerVo; import com.changhu.support.mybatisplus.pojo.params.PageParams; /** - * mini_program_user (小程序用户) 服务类 - * author: luozhun - * desc 由groovy脚本自动生成 + * @author 20252 + * @createTime 2024/11/22 下午4:14 + * @desc UserService... */ -public interface MiniProgramUserService extends IService { - +public interface UserService { /** * 注册 * * @param params 参数 */ - void register(MiniProgramUserRegisterParams params); + void register(UserRegisterParams params); + + /** + * 保存或更新保安人员 + * + * @param params 保安人员参数 + */ + void saveOrUpdateSecurityUser(SaveOrUpdateSecurityUserParams params); + + /** + * 根据id删除保安人员 + * + * @param securityUserId 保安人员id + */ + void deleteSecurityUserByServiceProjectId(Long securityUserId); /** * 服务项目内的保安人员分页 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/MiniProgramUserServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/MiniProgramUserServiceImpl.java deleted file mode 100644 index be7f6e2..0000000 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/MiniProgramUserServiceImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.changhu.module.miniProgram.service.impl; - -import cn.binarywang.wx.miniapp.api.WxMaService; -import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; -import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.common.exception.MessageException; -import com.changhu.common.utils.SnowFlakeIdUtil; -import com.changhu.module.miniProgram.mapper.MiniProgramUserMapper; -import com.changhu.module.miniProgram.mapper.SecurityUserMapper; -import com.changhu.module.miniProgram.pojo.entity.MiniProgramUser; -import com.changhu.module.miniProgram.pojo.params.MiniProgramUserRegisterParams; -import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams; -import com.changhu.module.miniProgram.pojo.queryParams.ServiceProjectSecurityUserPagerQueryParams; -import com.changhu.module.miniProgram.pojo.vo.ServiceProjectSecurityUserPagerVo; -import com.changhu.module.miniProgram.service.MiniProgramUserService; -import com.changhu.module.miniProgram.service.ProjectManageIndexService; -import com.changhu.support.mybatisplus.pojo.params.PageParams; -import me.chanjar.weixin.common.error.WxErrorException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * mini_program_user (小程序用户) 服务实现类 - * author: luozhun - * desc 由groovy脚本自动生成 - */ -@Service -public class MiniProgramUserServiceImpl extends ServiceImpl implements MiniProgramUserService { - - @Autowired - private WxMaService wxMaService; - - @Autowired - private SecurityUserMapper securityUserMapper; - - @Autowired - private ProjectManageIndexService projectManageIndexService; - - @Override - public void register(MiniProgramUserRegisterParams params) { - MiniProgramUser miniProgramUser = BeanUtil.copyProperties(params, MiniProgramUser.class); - try { - WxMaJscode2SessionResult sessionInfo = wxMaService.getUserService().getSessionInfo(params.getCode()); - miniProgramUser.setOpenId(sessionInfo.getOpenid()); - miniProgramUser.setSessionKey(sessionInfo.getSessionKey()); - } catch (WxErrorException e) { - throw new MessageException(e.getMessage()); - } - boolean exists = baseMapper.exists(Wrappers.lambdaQuery().eq(MiniProgramUser::getOpenId, miniProgramUser.getOpenId())); - if (exists) { - throw new MessageException("该用户已存在,请勿重复注册!"); - } - long userId = SnowFlakeIdUtil.snowflakeId(); - miniProgramUser.setSnowFlakeId(userId); - boolean save = this.save(miniProgramUser); - if (!save) { - throw new MessageException(); - } - } - - @Override - public Page securityUserPager(PageParams queryParams) { - return securityUserMapper.securityUserPager(queryParams.getPage(), queryParams.getParams()); - } - - @Override - public void qrCodeFormInputSecurityUser(SaveOrUpdateSecurityUserParams params) { - projectManageIndexService.saveOrUpdateSecurityUser(params); - } -} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/MPoliceServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/PoliceIndexServiceImpl.java similarity index 89% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/MPoliceServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/PoliceIndexServiceImpl.java index 1877493..de7952c 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/MPoliceServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/PoliceIndexServiceImpl.java @@ -5,13 +5,13 @@ import cn.hutool.core.lang.func.LambdaUtil; import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.pojo.vo.SelectNodeVo; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.mapper.ServiceProjectMapper; -import com.changhu.module.management.pojo.entity.EnterprisesUnit; -import com.changhu.module.management.pojo.entity.ServiceProject; -import com.changhu.module.miniProgram.pojo.entity.SecurityUser; +import com.changhu.mapper.ServiceProjectMapper; import com.changhu.module.miniProgram.pojo.vo.IndexDataStatisticsVo; import com.changhu.module.miniProgram.pojo.vo.IndexServiceProjectListVo; -import com.changhu.module.miniProgram.service.MPoliceService; +import com.changhu.module.miniProgram.service.PoliceIndexService; +import com.changhu.pojo.entity.EnterprisesUnit; +import com.changhu.pojo.entity.SecurityUser; +import com.changhu.pojo.entity.ServiceProject; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,7 +24,7 @@ import java.util.List; * @desc MPoliceServiceImpl... */ @Service -public class MPoliceServiceImpl implements MPoliceService { +public class PoliceIndexServiceImpl implements PoliceIndexService { @Autowired private ServiceProjectMapper serviceProjectMapper; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/ProjectManageIndexServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/ProjectManageIndexServiceImpl.java index ab64842..9eb86f1 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/ProjectManageIndexServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/ProjectManageIndexServiceImpl.java @@ -1,27 +1,13 @@ package com.changhu.module.miniProgram.service.impl; -import cn.binarywang.wx.miniapp.api.WxMaQrcodeService; -import cn.binarywang.wx.miniapp.api.WxMaService; -import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.extension.toolkit.Db; -import com.changhu.common.exception.MessageException; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.mapper.ServiceProjectMapper; -import com.changhu.module.miniProgram.pojo.entity.SecurityUser; -import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams; +import com.changhu.mapper.ServiceProjectMapper; import com.changhu.module.miniProgram.pojo.vo.IndexServiceProjectListVo; import com.changhu.module.miniProgram.service.ProjectManageIndexService; import lombok.extern.slf4j.Slf4j; -import me.chanjar.weixin.common.error.WxErrorException; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.FileSystemResource; -import org.springframework.core.io.Resource; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; -import java.io.File; import java.util.List; /** @@ -36,66 +22,9 @@ public class ProjectManageIndexServiceImpl implements ProjectManageIndexService @Autowired private ServiceProjectMapper serviceProjectMapper; - @Autowired - private WxMaService wxMaService; - @Override public List getMyServiceProjectList() { return serviceProjectMapper.getServiceProjectList(null, UserUtil.getUserId()); } - @Override - public void deleteSecurityUserByServiceProjectId(Long securityUserId) { - boolean b = Db.removeById(securityUserId, SecurityUser.class); - if (!b) { - throw new MessageException(); - } - } - - @Override - public void saveOrUpdateSecurityUser(SaveOrUpdateSecurityUserParams params) { - SecurityUser securityUser = BeanUtil.copyProperties(params, SecurityUser.class); - //新增的情况 - Long snowFlakeId = securityUser.getSnowFlakeId(); - if (snowFlakeId == null) { - //判断是否已经存在 - boolean exists = Db.lambdaQuery(SecurityUser.class) - .eq(SecurityUser::getServiceProjectId, securityUser.getServiceProjectId()) - .eq(SecurityUser::getIdCard, securityUser.getIdCard()) - .exists(); - if (exists) { - throw new MessageException("服务项目下已经存在该人员"); - } - } else { - //如果修改了身份证 需要查重 - SecurityUser byId = Db.getById(snowFlakeId, SecurityUser.class); - if (!securityUser.getIdCard().equals(byId.getIdCard())) { - boolean exists = Db.lambdaQuery(SecurityUser.class) - .eq(SecurityUser::getServiceProjectId, securityUser.getServiceProjectId()) - .eq(SecurityUser::getIdCard, securityUser.getIdCard()) - .exists(); - if (exists) { - throw new MessageException("服务项目下已经存在该人员"); - } - } - } - boolean b = Db.saveOrUpdate(securityUser); - if (!b) { - throw new MessageException(); - } - } - - @Override - public ResponseEntity shareForm_QR_Code(String path, Integer width) { - WxMaQrcodeService qrcodeService = wxMaService.getQrcodeService(); - try { - File qrcodeFile = qrcodeService.createQrcode(path, width); - return ResponseEntity.ok() - .header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + qrcodeFile.getName()) - .contentType(MediaType.APPLICATION_OCTET_STREAM) - .body(new FileSystemResource(qrcodeFile)); - } catch (WxErrorException e) { - throw new MessageException("生成表单二维码失败:{}", e.getMessage()); - } - } } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/AssessmentCriteriaServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/SupervisionAssessmentServiceImpl.java similarity index 69% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/AssessmentCriteriaServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/SupervisionAssessmentServiceImpl.java index 517e38f..472109d 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/AssessmentCriteriaServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/SupervisionAssessmentServiceImpl.java @@ -1,26 +1,18 @@ -package com.changhu.module.assessmentCriteria.service.impl; +package com.changhu.module.miniProgram.service.impl; -import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Dict; import cn.hutool.core.lang.func.LambdaUtil; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.db.enums.EnterprisesUnitType; import com.changhu.common.exception.MessageException; import com.changhu.common.pojo.vo.SelectNodeVo; import com.changhu.common.utils.SnowFlakeIdUtil; -import com.changhu.module.assessmentCriteria.mapper.CkProjectMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.*; -import com.changhu.module.assessmentCriteria.pojo.params.*; -import com.changhu.module.assessmentCriteria.pojo.queryParams.CkProjectPagerQueryParams; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentCriteriaRuleVo; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectDetailTableVo; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectPagerVo; -import com.changhu.module.assessmentCriteria.service.AssessmentCriteriaService; +import com.changhu.module.miniProgram.pojo.params.AssessmentRecordParams; +import com.changhu.module.miniProgram.pojo.vo.AssessmentCriteriaRuleVo; +import com.changhu.module.miniProgram.service.SupervisionAssessmentService; +import com.changhu.pojo.entity.*; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; -import com.changhu.support.mybatisplus.pojo.params.PageParams; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -30,14 +22,11 @@ import java.util.stream.Collectors; /** * @author 20252 - * @createTime 2024/11/6 上午10:08 - * @desc AssessmentCriteriaServiceImpl... + * @createTime 2024/11/22 下午2:48 + * @desc SupervisionAssessmentServiceImpl... */ @Service -public class AssessmentCriteriaServiceImpl implements AssessmentCriteriaService { - - @Autowired - private CkProjectMapper ckProjectMapper; +public class SupervisionAssessmentServiceImpl implements SupervisionAssessmentService { @Override public List> assessmentCriteriaListByType(EnterprisesUnitType type) { @@ -119,61 +108,6 @@ public class AssessmentCriteriaServiceImpl implements AssessmentCriteriaService return groupList; } - @Override - public Page ckProjectPagerVoPager(PageParams queryParams) { - return ckProjectMapper.pager(queryParams.getPage(), queryParams.getParams()); - } - - @Transactional(rollbackFor = Exception.class) - @Override - public void saveOrUpdateCkProject(CkProjectSaveOrUpdateParams params) { - boolean b = Db.saveOrUpdate(BeanUtil.copyProperties(params, CkProject.class)); - if (!b) { - throw new MessageException(); - } - } - - @Transactional(rollbackFor = Exception.class) - @Override - public void deleteCkProjectById(Long ckProjectId) { - boolean b = Db.removeById(ckProjectId, CkProject.class); - if (!b) { - throw new MessageException(); - } - } - - @Override - public List ckProjectDetail(Long ckProjectId) { - return ckProjectMapper.ckProjectDetail(ckProjectId); - } - - @Transactional(rollbackFor = Exception.class) - @Override - public void saveOrUpdateCkGroup(CkGroupSaveOrUpdateParams params) { - boolean b = Db.saveOrUpdate(BeanUtil.copyProperties(params, CkGroup.class)); - if (!b) { - throw new MessageException(); - } - } - - @Transactional(rollbackFor = Exception.class) - @Override - public void saveOrUpdateCkItem(CkItemSaveOrUpdateParams params) { - boolean b = Db.saveOrUpdate(BeanUtil.copyProperties(params, CkItem.class)); - if (!b) { - throw new MessageException(); - } - } - - @Transactional(rollbackFor = Exception.class) - @Override - public void saveOrUpdateCkStandard(CkStandardSaveOrUpdateParams params) { - boolean b = Db.saveOrUpdate(BeanUtil.copyProperties(params, CkStandard.class)); - if (!b) { - throw new MessageException(); - } - } - @Transactional(rollbackFor = Exception.class) @Override public void submitAssessmentRecord(AssessmentRecordParams params) { diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/UserServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/UserServiceImpl.java new file mode 100644 index 0000000..09f54e1 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/UserServiceImpl.java @@ -0,0 +1,112 @@ +package com.changhu.module.miniProgram.service.impl; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.toolkit.Db; +import com.changhu.common.exception.MessageException; +import com.changhu.common.utils.SnowFlakeIdUtil; +import com.changhu.mapper.SecurityUserMapper; +import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams; +import com.changhu.module.miniProgram.pojo.params.UserRegisterParams; +import com.changhu.module.miniProgram.pojo.queryParams.ServiceProjectSecurityUserPagerQueryParams; +import com.changhu.module.miniProgram.pojo.vo.ServiceProjectSecurityUserPagerVo; +import com.changhu.module.miniProgram.service.ProjectManageIndexService; +import com.changhu.module.miniProgram.service.UserService; +import com.changhu.pojo.entity.MiniProgramUser; +import com.changhu.pojo.entity.SecurityUser; +import com.changhu.support.mybatisplus.pojo.params.PageParams; +import me.chanjar.weixin.common.error.WxErrorException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author 20252 + * @createTime 2024/11/22 下午4:14 + * @desc UserServiceImpl... + */ +@Service("miniProgramUserService") +public class UserServiceImpl implements UserService { + @Autowired + private WxMaService wxMaService; + + @Autowired + private SecurityUserMapper securityUserMapper; + + @Autowired + private ProjectManageIndexService projectManageIndexService; + + @Override + public void register(UserRegisterParams params) { + MiniProgramUser miniProgramUser = BeanUtil.copyProperties(params, MiniProgramUser.class); + try { + WxMaJscode2SessionResult sessionInfo = wxMaService.getUserService().getSessionInfo(params.getCode()); + miniProgramUser.setOpenId(sessionInfo.getOpenid()); + miniProgramUser.setSessionKey(sessionInfo.getSessionKey()); + } catch (WxErrorException e) { + throw new MessageException(e.getMessage()); + } + boolean exists = Db.lambdaQuery(MiniProgramUser.class).eq(MiniProgramUser::getOpenId, miniProgramUser.getOpenId()).exists(); + if (exists) { + throw new MessageException("该用户已存在,请勿重复注册!"); + } + long userId = SnowFlakeIdUtil.snowflakeId(); + miniProgramUser.setSnowFlakeId(userId); + boolean save = Db.save(miniProgramUser); + if (!save) { + throw new MessageException(); + } + } + + @Override + public Page securityUserPager(PageParams queryParams) { + return securityUserMapper.securityUserPager(queryParams.getPage(), queryParams.getParams()); + } + + @Override + public void qrCodeFormInputSecurityUser(SaveOrUpdateSecurityUserParams params) { + this.saveOrUpdateSecurityUser(params); + } + + @Override + public void saveOrUpdateSecurityUser(SaveOrUpdateSecurityUserParams params) { + SecurityUser securityUser = BeanUtil.copyProperties(params, SecurityUser.class); + //新增的情况 + Long snowFlakeId = securityUser.getSnowFlakeId(); + if (snowFlakeId == null) { + //判断是否已经存在 + boolean exists = Db.lambdaQuery(SecurityUser.class) + .eq(SecurityUser::getServiceProjectId, securityUser.getServiceProjectId()) + .eq(SecurityUser::getIdCard, securityUser.getIdCard()) + .exists(); + if (exists) { + throw new MessageException("服务项目下已经存在该人员"); + } + } else { + //如果修改了身份证 需要查重 + SecurityUser byId = Db.getById(snowFlakeId, SecurityUser.class); + if (!securityUser.getIdCard().equals(byId.getIdCard())) { + boolean exists = Db.lambdaQuery(SecurityUser.class) + .eq(SecurityUser::getServiceProjectId, securityUser.getServiceProjectId()) + .eq(SecurityUser::getIdCard, securityUser.getIdCard()) + .exists(); + if (exists) { + throw new MessageException("服务项目下已经存在该人员"); + } + } + } + boolean b = Db.saveOrUpdate(securityUser); + if (!b) { + throw new MessageException(); + } + } + + @Override + public void deleteSecurityUserByServiceProjectId(Long securityUserId) { + boolean b = Db.removeById(securityUserId, SecurityUser.class); + if (!b) { + throw new MessageException(); + } + } +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/controller/UserController.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/controller/UserController.java new file mode 100644 index 0000000..7ee87d3 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/controller/UserController.java @@ -0,0 +1,51 @@ +package com.changhu.module.policeManagement.controller; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.common.annotation.CheckUserType; +import com.changhu.common.annotation.JsonBody; +import com.changhu.common.db.enums.UserType; +import com.changhu.module.policeManagement.pojo.params.UserSaveOrUpdateParams; +import com.changhu.module.policeManagement.pojo.queryParams.UserPagerQueryParams; +import com.changhu.module.policeManagement.pojo.vo.UserPagerVo; +import com.changhu.module.policeManagement.service.UserService; +import com.changhu.support.mybatisplus.pojo.params.PageParams; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author 20252 + * @createTime 2024/11/22 上午9:26 + * @desc UserController... + */ +@Tag(name = "公安后台-用户管理") +@JsonBody +@RequestMapping("/m2/user") +@RestController("policeUserManagement") +@CheckUserType(userTypes = UserType.MANAGEMENT_POLICE) +public class UserController { + @Autowired + private UserService userService; + + @Operation(summary = "新增或保存后台用户") + @PostMapping("/add_upd") + public void userSaveOrUpdate(@RequestBody @Valid UserSaveOrUpdateParams params) { + userService.saveOrUpdate(params); + } + + @Operation(summary = "分页查询后台用户") + @PostMapping("/pager") + public Page userPager(@RequestBody PageParams queryParams) { + return userService.pager(queryParams); + } + + @Operation(summary = "根据id删除后台用户") + @DeleteMapping("/del_id") + public void userDeleteById(@RequestParam @Schema(description = "后台公安用户id") Long managementPoliceUnitUserId) { + userService.deleteById(managementPoliceUnitUserId); + } + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/mapper/UserMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/mapper/UserMapper.java new file mode 100644 index 0000000..ca41f6a --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/mapper/UserMapper.java @@ -0,0 +1,27 @@ +package com.changhu.module.policeManagement.mapper; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.policeManagement.pojo.queryParams.UserPagerQueryParams; +import com.changhu.module.policeManagement.pojo.vo.UserPagerVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +/** + * @author 20252 + * @createTime 2024/11/22 上午9:34 + * @desc UserMapper... + */ +@Mapper +@Repository("policeManagementUserMapper") +public interface UserMapper { + /** + * 分页查询用户 + * + * @param page 分页参数 + * @param params 查询参数 + * @return 用户 + */ + Page pager(@Param("page") Page page, + @Param("params") UserPagerQueryParams params); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementPoliceUserSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/params/UserSaveOrUpdateParams.java similarity index 85% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementPoliceUserSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/params/UserSaveOrUpdateParams.java index 13a1e2a..67289f0 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementPoliceUserSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/params/UserSaveOrUpdateParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.params; +package com.changhu.module.policeManagement.pojo.params; import com.changhu.common.db.enums.IsEnable; import com.changhu.common.db.enums.Sex; @@ -11,10 +11,10 @@ import lombok.Data; /** * @author 20252 * @createTime 2024/9/4 下午3:04 - * @desc ManagementPoliceUserSaveOrUpdateParams... + * @desc UserSaveOrUpdateParams... */ @Data -public class ManagementPoliceUserSaveOrUpdateParams { +public class UserSaveOrUpdateParams { @Schema(description = "id") private Long snowFlakeId; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ManagementPoliceUnitUserPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/queryParams/UserPagerQueryParams.java similarity index 74% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ManagementPoliceUnitUserPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/queryParams/UserPagerQueryParams.java index 815a0ab..a064350 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ManagementPoliceUnitUserPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/queryParams/UserPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.queryParams; +package com.changhu.module.policeManagement.pojo.queryParams; import com.changhu.common.db.enums.IsEnable; import com.changhu.common.db.enums.Sex; @@ -8,10 +8,10 @@ import lombok.Data; /** * @author 20252 * @createTime 2024/9/4 下午3:22 - * @desc ManagementPoliceUnitUserPagerQueryParams... + * @desc UserPagerQueryParams... */ @Data -public class ManagementPoliceUnitUserPagerQueryParams { +public class UserPagerQueryParams { @Schema(description = "名字") private String name; @Schema(description = "手机号") diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ManagementPoliceUnitUserPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/vo/UserPagerVo.java similarity index 86% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ManagementPoliceUnitUserPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/vo/UserPagerVo.java index 8866963..1a09318 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ManagementPoliceUnitUserPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/vo/UserPagerVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.vo; +package com.changhu.module.policeManagement.pojo.vo; import com.changhu.common.db.enums.IsEnable; import com.changhu.common.db.enums.IsOrNot; @@ -11,10 +11,10 @@ import java.time.LocalDateTime; /** * @author 20252 * @createTime 2024/9/3 上午10:59 - * @desc ManagementSecurityUnitUserPagerVo... + * @desc UserPagerVo... */ @Data -public class ManagementPoliceUnitUserPagerVo { +public class UserPagerVo { @Schema(description = "id") private Long snowFlakeId; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/service/UserService.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/service/UserService.java new file mode 100644 index 0000000..66ec0b5 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/service/UserService.java @@ -0,0 +1,36 @@ +package com.changhu.module.policeManagement.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.policeManagement.pojo.params.UserSaveOrUpdateParams; +import com.changhu.module.policeManagement.pojo.queryParams.UserPagerQueryParams; +import com.changhu.module.policeManagement.pojo.vo.UserPagerVo; +import com.changhu.support.mybatisplus.pojo.params.PageParams; + +/** + * @author 20252 + * @createTime 2024/11/22 上午9:30 + * @desc UserService... + */ +public interface UserService { + /** + * 新增或保存用户 + * + * @param params 参数 + */ + void saveOrUpdate(UserSaveOrUpdateParams params); + + /** + * 分页查询用户 + * + * @param queryParams 查询参数 + * @return 结果 + */ + Page pager(PageParams queryParams); + + /** + * 根据id删除用户 + * + * @param managementPoliceUnitUserId 公安单位用户id + */ + void deleteById(Long managementPoliceUnitUserId); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/PoliceServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/service/impl/UserServiceImpl.java similarity index 70% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/PoliceServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/module/policeManagement/service/impl/UserServiceImpl.java index 685d9ae..c81944e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/PoliceServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/service/impl/UserServiceImpl.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.service.impl; +package com.changhu.module.policeManagement.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.RandomUtil; @@ -8,13 +8,12 @@ import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.enums.ResultCode; import com.changhu.common.exception.MessageException; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.mapper.EnterprisesUnitMapper; -import com.changhu.module.management.mapper.ManagementPoliceUnitUserMapper; -import com.changhu.module.management.pojo.entity.ManagementPoliceUnitUser; -import com.changhu.module.management.pojo.params.ManagementPoliceUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ManagementPoliceUnitUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.ManagementPoliceUnitUserPagerVo; -import com.changhu.module.management.service.PoliceService; +import com.changhu.module.policeManagement.mapper.UserMapper; +import com.changhu.module.policeManagement.pojo.params.UserSaveOrUpdateParams; +import com.changhu.module.policeManagement.pojo.queryParams.UserPagerQueryParams; +import com.changhu.module.policeManagement.pojo.vo.UserPagerVo; +import com.changhu.module.policeManagement.service.UserService; +import com.changhu.pojo.entity.ManagementPoliceUnitUser; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import com.changhu.support.mybatisplus.pojo.params.PageParams; import org.springframework.beans.factory.annotation.Autowired; @@ -25,21 +24,18 @@ import java.util.List; /** * @author 20252 - * @createTime 2024/9/11 上午9:59 - * @desc MPoliceServiceImpl... + * @createTime 2024/11/22 上午9:30 + * @desc UserServiceImpl... */ -@Service -public class PoliceServiceImpl implements PoliceService { +@Service("policeManagementUserService") +public class UserServiceImpl implements UserService { @Autowired - private ManagementPoliceUnitUserMapper managementPoliceUnitUserMapper; - - @Autowired - private EnterprisesUnitMapper enterprisesUnitMapper; + private UserMapper userMapper; @Transactional(rollbackFor = Exception.class) @Override - public void userSaveOrUpdate(ManagementPoliceUserSaveOrUpdateParams params) { + public void saveOrUpdate(UserSaveOrUpdateParams params) { //查看手机号是否存在 boolean exists = Db.lambdaQuery(ManagementPoliceUnitUser.class) .ne(params.getSnowFlakeId() != null, BaseEntity::getSnowFlakeId, params.getSnowFlakeId()) @@ -70,12 +66,12 @@ public class PoliceServiceImpl implements PoliceService { } @Override - public Page userPager(PageParams queryParams) { - return managementPoliceUnitUserMapper.pager(queryParams.getPage(), queryParams.getParams()); + public Page pager(PageParams queryParams) { + return userMapper.pager(queryParams.getPage(), queryParams.getParams()); } @Override - public void userDeleteById(Long managementPoliceUnitUserId) { + public void deleteById(Long managementPoliceUnitUserId) { Long unitId = UserUtil.getUnitId(); Long l = Db.lambdaQuery(ManagementPoliceUnitUser.class) .eq(BaseEntity::getSnowFlakeId, managementPoliceUnitUserId) @@ -90,5 +86,4 @@ public class PoliceServiceImpl implements PoliceService { throw new MessageException(); } } - } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/SecurityController.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/SecurityController.java new file mode 100644 index 0000000..c3c4703 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/SecurityController.java @@ -0,0 +1,55 @@ +package com.changhu.module.securityManagement.controller; + +import cn.hutool.core.lang.Dict; +import cn.hutool.core.lang.func.LambdaUtil; +import com.baomidou.mybatisplus.extension.toolkit.Db; +import com.changhu.common.annotation.CheckUserType; +import com.changhu.common.annotation.JsonBody; +import com.changhu.common.db.enums.IsEnable; +import com.changhu.common.db.enums.MiniProgramUserIdentity; +import com.changhu.common.db.enums.UserType; +import com.changhu.common.pojo.vo.SelectNodeVo; +import com.changhu.common.utils.UserUtil; +import com.changhu.pojo.entity.MiniProgramUser; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author 20252 + * @createTime 2024/11/22 上午10:16 + * @desc SecurityController... + */ +@Tag(name = "保安后台-通用接口") +@JsonBody +@RequestMapping("/m3") +@CheckUserType(userTypes = UserType.MANAGEMENT_SECURITY) +@RestController +public class SecurityController { + + @Operation(summary = "查询单位下的项目经理") + @GetMapping("/list_p_m") + public List> listProjectManager() { + String tel = LambdaUtil.getFieldName(MiniProgramUser::getTelephone); + String sex = LambdaUtil.getFieldName(MiniProgramUser::getSex); + return Db.lambdaQuery(MiniProgramUser.class) + .eq(MiniProgramUser::getIsEnable, IsEnable.TRUE) + .eq(MiniProgramUser::getIdentity, MiniProgramUserIdentity.PROJECT_MANAGER) + .eq(MiniProgramUser::getUnitId, UserUtil.getUnitId()) + .list() + .stream() + .map(item -> SelectNodeVo.builder() + .value(item.getSnowFlakeId()) + .label(item.getName()) + .extData(Dict.of( + tel, item.getTelephone(), + sex, item.getSex() + )) + .build()) + .toList(); + } +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/ServiceProjectController.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/ServiceProjectController.java similarity index 56% rename from policeSecurityServer/src/main/java/com/changhu/module/management/controller/ServiceProjectController.java rename to policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/ServiceProjectController.java index 9e495a4..f652613 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/ServiceProjectController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/ServiceProjectController.java @@ -1,14 +1,16 @@ -package com.changhu.module.management.controller; +package com.changhu.module.securityManagement.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.annotation.CheckUserType; import com.changhu.common.annotation.JsonBody; import com.changhu.common.db.enums.UserType; import com.changhu.common.exception.MessageException; -import com.changhu.module.management.pojo.params.ServiceProjectSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ServiceProjectPagerQueryParams; -import com.changhu.module.management.pojo.vo.ServiceProjectPagerVo; -import com.changhu.module.management.service.ServiceProjectService; +import com.changhu.module.securityManagement.pojo.params.ServiceProjectSaveOrUpdateParams; +import com.changhu.module.securityManagement.pojo.queryParams.ServiceProjectPagerQueryParams; +import com.changhu.module.securityManagement.pojo.vo.ServiceProjectPagerVo; +import com.changhu.module.securityManagement.service.Service_ProjectService; +import com.changhu.pojo.entity.ServiceProject; import com.changhu.support.mybatisplus.pojo.params.PageParams; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -17,34 +19,35 @@ import org.springframework.web.bind.annotation.*; /** * @author 20252 - * @createTime 2024/9/5 上午11:09 + * @createTime 2024/11/22 上午10:19 * @desc ServiceProjectController... */ -@Tag(name = "服务项目") +@Tag(name = "保安后台-服务项目管理") @JsonBody -@RequestMapping("/serviceProject") +@RequestMapping("/m3/sp") +@RestController("securityServiceProjectManagement") @CheckUserType(userTypes = UserType.MANAGEMENT_SECURITY) public class ServiceProjectController { @Autowired - private ServiceProjectService serviceProjectService; + private Service_ProjectService service_projectService; @Operation(summary = "分页查询") @PostMapping("/pager") public Page pager(@RequestBody PageParams queryParams) { - return serviceProjectService.pager(queryParams); + return service_projectService.pager(queryParams); } @Operation(summary = "新增或者保存") - @PostMapping("/saveOrUpdate") + @PostMapping("/add_upd") public void saveOrUpdate(@RequestBody ServiceProjectSaveOrUpdateParams params) { - serviceProjectService.saveOrUpdate(params); + service_projectService.saveOrUpdate(params); } @Operation(summary = "根据id删除") - @DeleteMapping("/deleteById") + @DeleteMapping("/del_id") public void deleteById(@RequestParam Long serviceProjectId) { - boolean b = serviceProjectService.removeById(serviceProjectId); + boolean b = Db.removeById(serviceProjectId, ServiceProject.class); if (!b) { throw new MessageException(); } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/UserController.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/UserController.java new file mode 100644 index 0000000..eaa62de --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/controller/UserController.java @@ -0,0 +1,52 @@ +package com.changhu.module.securityManagement.controller; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.common.annotation.CheckUserType; +import com.changhu.common.annotation.JsonBody; +import com.changhu.common.db.enums.UserType; +import com.changhu.module.securityManagement.pojo.params.UserSaveOrUpdateParams; +import com.changhu.module.securityManagement.pojo.queryParams.UserPagerQueryParams; +import com.changhu.module.securityManagement.pojo.vo.UserPagerVo; +import com.changhu.module.securityManagement.service.UserService; +import com.changhu.support.mybatisplus.pojo.params.PageParams; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author 20252 + * @createTime 2024/11/22 上午9:46 + * @desc UserController... + */ +@Tag(name = "保安后台-用户管理") +@JsonBody +@RequestMapping("/m3/user") +@RestController("securityUserManagement") +@CheckUserType(userTypes = UserType.MANAGEMENT_SECURITY) +public class UserController { + + @Autowired + private UserService userService; + + @Operation(summary = "新增或修改后台用户") + @PostMapping("/add_upd") + public void userSaveOrUpdate(@RequestBody @Valid UserSaveOrUpdateParams saveOrUpdateParams) { + userService.saveOrUpdate(saveOrUpdateParams); + } + + @Operation(summary = "分页查询后台用户") + @PostMapping("/pager") + public Page userPager(@RequestBody PageParams queryParams) { + return userService.pager(queryParams); + } + + @Operation(summary = "根据id删除后台用户") + @DeleteMapping("/del_id") + public void userDeleteById(@RequestParam @Schema(description = "后台保安用户id") Long managementSecurityUnitUserId) { + userService.deleteById(managementSecurityUnitUserId); + } + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/mapper/Service_ProjectMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/mapper/Service_ProjectMapper.java new file mode 100644 index 0000000..9475334 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/mapper/Service_ProjectMapper.java @@ -0,0 +1,23 @@ +package com.changhu.module.securityManagement.mapper; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.securityManagement.pojo.queryParams.ServiceProjectPagerQueryParams; +import com.changhu.module.securityManagement.pojo.vo.ServiceProjectPagerVo; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author 20252 + * @createTime 2024/11/22 上午10:25 + * @desc Service_ProjectMapper... + */ +@Mapper +public interface Service_ProjectMapper { + /** + * 分页查询 + * + * @param page 分页参数 + * @param params 查询参数 + * @return 结果 + */ + Page pager(Page page, ServiceProjectPagerQueryParams params); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/mapper/UserMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/mapper/UserMapper.java new file mode 100644 index 0000000..58c0ff9 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/mapper/UserMapper.java @@ -0,0 +1,27 @@ +package com.changhu.module.securityManagement.mapper; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.securityManagement.pojo.queryParams.UserPagerQueryParams; +import com.changhu.module.securityManagement.pojo.vo.UserPagerVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +/** + * @author 20252 + * @createTime 2024/11/22 上午9:53 + * @desc UserMapper... + */ +@Mapper +@Repository("securityManagementUserMapper") +public interface UserMapper { + /** + * 分页查询 + * + * @param page 分页参数 + * @param params 查询参数 + * @return 结果 + */ + Page pager(@Param("page") Page page, + @Param("params") UserPagerQueryParams params); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ServiceProjectSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ServiceProjectSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java index 4b130e0..d20f9b5 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ServiceProjectSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.params; +package com.changhu.module.securityManagement.pojo.params; import com.changhu.common.db.enums.IsOrNot; import com.changhu.common.db.enums.ServiceProjectTwoType; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementSecurityUnitUserSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/UserSaveOrUpdateParams.java similarity index 84% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementSecurityUnitUserSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/UserSaveOrUpdateParams.java index 9e35740..b392891 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementSecurityUnitUserSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/UserSaveOrUpdateParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.params; +package com.changhu.module.securityManagement.pojo.params; import com.changhu.common.db.enums.IsEnable; import com.changhu.common.db.enums.Sex; @@ -11,10 +11,10 @@ import lombok.Data; /** * @author 20252 * @createTime 2024/9/3 上午10:26 - * @desc ManagementSecurityUnitUserSaveOrUpdateParams... + * @desc UserSaveOrUpdateParams... */ @Data -public class ManagementSecurityUnitUserSaveOrUpdateParams { +public class UserSaveOrUpdateParams { @Schema(description = "id") private Long snowFlakeId; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ServiceProjectPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/queryParams/ServiceProjectPagerQueryParams.java similarity index 90% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ServiceProjectPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/queryParams/ServiceProjectPagerQueryParams.java index 545ef53..9391c8a 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ServiceProjectPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/queryParams/ServiceProjectPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.queryParams; +package com.changhu.module.securityManagement.pojo.queryParams; import com.changhu.common.db.enums.ServiceProjectType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ManagementSecurityUnitUserPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/queryParams/UserPagerQueryParams.java similarity index 68% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ManagementSecurityUnitUserPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/queryParams/UserPagerQueryParams.java index 4d7b2cd..2134e3c 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/ManagementSecurityUnitUserPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/queryParams/UserPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.queryParams; +package com.changhu.module.securityManagement.pojo.queryParams; import com.changhu.common.db.enums.Sex; import io.swagger.v3.oas.annotations.media.Schema; @@ -7,10 +7,10 @@ import lombok.Data; /** * @author 20252 * @createTime 2024/9/3 上午11:02 - * @desc ManagementSecurityUnitUserPagerQueryParams... + * @desc UserPagerQueryParams... */ @Data -public class ManagementSecurityUnitUserPagerQueryParams { +public class UserPagerQueryParams { @Schema(description = "名字") private String name; @Schema(description = "手机号") diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ServiceProjectPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/ServiceProjectPagerVo.java similarity index 97% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ServiceProjectPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/ServiceProjectPagerVo.java index cc5176b..bb0b5d7 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ServiceProjectPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/ServiceProjectPagerVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.vo; +package com.changhu.module.securityManagement.pojo.vo; import com.changhu.common.db.enums.IsOrNot; import com.changhu.common.db.enums.ServiceProjectTwoType; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ManagementSecurityUnitUserPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/UserPagerVo.java similarity index 87% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ManagementSecurityUnitUserPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/UserPagerVo.java index d62c7af..b64503e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/ManagementSecurityUnitUserPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/UserPagerVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.vo; +package com.changhu.module.securityManagement.pojo.vo; import com.changhu.common.db.enums.IsEnable; import com.changhu.common.db.enums.IsOrNot; @@ -11,10 +11,10 @@ import java.time.LocalDateTime; /** * @author 20252 * @createTime 2024/9/3 上午10:59 - * @desc ManagementSecurityUnitUserPagerVo... + * @desc UserPagerVo... */ @Data -public class ManagementSecurityUnitUserPagerVo { +public class UserPagerVo { @Schema(description = "id") private Long snowFlakeId; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/Service_ProjectService.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/Service_ProjectService.java new file mode 100644 index 0000000..283207f --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/Service_ProjectService.java @@ -0,0 +1,29 @@ +package com.changhu.module.securityManagement.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.securityManagement.pojo.params.ServiceProjectSaveOrUpdateParams; +import com.changhu.module.securityManagement.pojo.queryParams.ServiceProjectPagerQueryParams; +import com.changhu.module.securityManagement.pojo.vo.ServiceProjectPagerVo; +import com.changhu.support.mybatisplus.pojo.params.PageParams; + +/** + * @author 20252 + * @createTime 2024/11/22 上午10:21 + * @desc Service_ProjectService... + */ +public interface Service_ProjectService { + /** + * 分页查询 + * + * @param queryParams 查询参数 + * @return 结果 + */ + Page pager(PageParams queryParams); + + /** + * 新增或者保存 + * + * @param params 参数 + */ + void saveOrUpdate(ServiceProjectSaveOrUpdateParams params); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/UserService.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/UserService.java new file mode 100644 index 0000000..cade79f --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/UserService.java @@ -0,0 +1,36 @@ +package com.changhu.module.securityManagement.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.securityManagement.pojo.params.UserSaveOrUpdateParams; +import com.changhu.module.securityManagement.pojo.queryParams.UserPagerQueryParams; +import com.changhu.module.securityManagement.pojo.vo.UserPagerVo; +import com.changhu.support.mybatisplus.pojo.params.PageParams; + +/** + * @author 20252 + * @createTime 2024/11/22 上午9:49 + * @desc UserService... + */ +public interface UserService { + /** + * 新增或修改 + * + * @param saveOrUpdateParams 参数 + */ + void saveOrUpdate(UserSaveOrUpdateParams saveOrUpdateParams); + + /** + * 分页查询 + * + * @param queryParams 查询参数 + * @return 结果 + */ + Page pager(PageParams queryParams); + + /** + * 根据id删除 + * + * @param managementSecurityUnitUserId 用户id + */ + void deleteById(Long managementSecurityUnitUserId); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/impl/Service_ProjectServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/impl/Service_ProjectServiceImpl.java new file mode 100644 index 0000000..5a22285 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/impl/Service_ProjectServiceImpl.java @@ -0,0 +1,43 @@ +package com.changhu.module.securityManagement.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.toolkit.Db; +import com.changhu.common.exception.MessageException; +import com.changhu.common.utils.UserUtil; +import com.changhu.module.securityManagement.mapper.Service_ProjectMapper; +import com.changhu.module.securityManagement.pojo.params.ServiceProjectSaveOrUpdateParams; +import com.changhu.module.securityManagement.pojo.queryParams.ServiceProjectPagerQueryParams; +import com.changhu.module.securityManagement.pojo.vo.ServiceProjectPagerVo; +import com.changhu.module.securityManagement.service.Service_ProjectService; +import com.changhu.pojo.entity.ServiceProject; +import com.changhu.support.mybatisplus.pojo.params.PageParams; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author 20252 + * @createTime 2024/11/22 上午10:22 + * @desc Service_ProjectServiceImpl... + */ +@Service +public class Service_ProjectServiceImpl implements Service_ProjectService { + + @Autowired + private Service_ProjectMapper service_projectMapper; + + @Override + public Page pager(PageParams queryParams) { + return service_projectMapper.pager(queryParams.getPage(), queryParams.getParams()); + } + + @Override + public void saveOrUpdate(ServiceProjectSaveOrUpdateParams params) { + ServiceProject serviceProject = BeanUtil.copyProperties(params, ServiceProject.class); + serviceProject.setSecurityUnitId(UserUtil.getUnitId()); + boolean b = Db.saveOrUpdate(serviceProject); + if (!b) { + throw new MessageException(); + } + } +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SecurityServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/impl/UserServiceImpl.java similarity index 56% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SecurityServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/impl/UserServiceImpl.java index 573a796..514fa14 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SecurityServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/service/impl/UserServiceImpl.java @@ -1,28 +1,20 @@ -package com.changhu.module.management.service.impl; +package com.changhu.module.securityManagement.service.impl; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.lang.Dict; -import cn.hutool.core.lang.func.LambdaUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.toolkit.Db; -import com.changhu.common.db.enums.IsEnable; -import com.changhu.common.db.enums.MiniProgramUserIdentity; import com.changhu.common.db.enums.UserType; import com.changhu.common.enums.ResultCode; import com.changhu.common.exception.MessageException; -import com.changhu.common.pojo.vo.SelectNodeVo; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.mapper.ManagementSecurityUnitUserMapper; -import com.changhu.module.management.pojo.entity.ManagementSecurityUnitUser; -import com.changhu.module.management.pojo.params.ManagementSecurityUnitUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.ManagementSecurityUnitUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.ManagementSecurityUnitUserPagerVo; -import com.changhu.module.management.service.SecurityService; -import com.changhu.module.miniProgram.mapper.MiniProgramUserMapper; -import com.changhu.module.miniProgram.pojo.entity.MiniProgramUser; +import com.changhu.module.securityManagement.mapper.UserMapper; +import com.changhu.module.securityManagement.pojo.params.UserSaveOrUpdateParams; +import com.changhu.module.securityManagement.pojo.queryParams.UserPagerQueryParams; +import com.changhu.module.securityManagement.pojo.vo.UserPagerVo; +import com.changhu.module.securityManagement.service.UserService; +import com.changhu.pojo.entity.ManagementSecurityUnitUser; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import com.changhu.support.mybatisplus.pojo.params.PageParams; import org.springframework.beans.factory.annotation.Autowired; @@ -33,21 +25,18 @@ import java.util.List; /** * @author 20252 - * @createTime 2024/9/11 上午10:17 - * @desc SecurityServiceImpl... + * @createTime 2024/11/22 上午9:49 + * @desc UserServiceImpl... */ -@Service -public class SecurityServiceImpl implements SecurityService { +@Service("securityManagementUserService") +public class UserServiceImpl implements UserService { @Autowired - private ManagementSecurityUnitUserMapper managementSecurityUnitUserMapper; - - @Autowired - private MiniProgramUserMapper miniProgramUserMapper; + private UserMapper userMapper; @Transactional(rollbackFor = Exception.class) @Override - public void userSaveOrUpdate(ManagementSecurityUnitUserSaveOrUpdateParams saveOrUpdateParams) { + public void saveOrUpdate(UserSaveOrUpdateParams saveOrUpdateParams) { //查看手机号是否已存在 boolean exists = Db.lambdaQuery(ManagementSecurityUnitUser.class) .ne(saveOrUpdateParams.getSnowFlakeId() != null, BaseEntity::getSnowFlakeId, saveOrUpdateParams.getSnowFlakeId()) @@ -84,12 +73,12 @@ public class SecurityServiceImpl implements SecurityService { } @Override - public Page userPager(PageParams queryParams) { - return managementSecurityUnitUserMapper.pager(queryParams.getPage(), queryParams.getParams()); + public Page pager(PageParams queryParams) { + return userMapper.pager(queryParams.getPage(), queryParams.getParams()); } @Override - public void userDeleteById(Long managementSecurityUnitUserId) { + public void deleteById(Long managementSecurityUnitUserId) { Long unitId = UserUtil.getUnitId(); Long l = Db.lambdaQuery(ManagementSecurityUnitUser.class) .eq(BaseEntity::getSnowFlakeId, managementSecurityUnitUserId) @@ -104,24 +93,4 @@ public class SecurityServiceImpl implements SecurityService { throw new MessageException(); } } - - @Override - public List> listProjectManager() { - String tel = LambdaUtil.getFieldName(MiniProgramUser::getTelephone); - String sex = LambdaUtil.getFieldName(MiniProgramUser::getSex); - return miniProgramUserMapper.selectList(Wrappers.lambdaQuery() - .eq(MiniProgramUser::getIsEnable, IsEnable.TRUE) - .eq(MiniProgramUser::getIdentity, MiniProgramUserIdentity.PROJECT_MANAGER) - .eq(MiniProgramUser::getUnitId, UserUtil.getUnitId())) - .stream() - .map(item -> SelectNodeVo.builder() - .value(item.getSnowFlakeId()) - .label(item.getName()) - .extData(Dict.of( - tel, item.getTelephone(), - sex, item.getSex() - )) - .build()) - .toList(); - } } diff --git a/policeSecurityServer/src/main/java/com/changhu/controller/AccessKeysController.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AccessKeysController.java similarity index 85% rename from policeSecurityServer/src/main/java/com/changhu/controller/AccessKeysController.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AccessKeysController.java index f532e46..de3cb99 100644 --- a/policeSecurityServer/src/main/java/com/changhu/controller/AccessKeysController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AccessKeysController.java @@ -1,4 +1,4 @@ -package com.changhu.controller; +package com.changhu.module.superManagement.controller; import cn.hutool.core.annotation.AnnotationUtil; import cn.hutool.core.lang.Dict; @@ -6,17 +6,15 @@ import com.changhu.common.annotation.CheckUserType; import com.changhu.common.annotation.JsonBody; import com.changhu.common.db.enums.UserType; import com.changhu.common.pojo.vo.SelectNodeVo; +import com.changhu.controller.OpenController; +import com.changhu.module.superManagement.pojo.params.GeneratedAccessKeyParams; import com.changhu.pojo.entity.AccessKeys; -import com.changhu.pojo.params.GeneratedAccessKeyParams; import com.changhu.service.AccessKeysService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.annotation.AnnotatedElementUtils; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.*; import java.util.Arrays; import java.util.List; @@ -26,10 +24,11 @@ import java.util.List; * @createTime 2024/11/19 上午10:38 * @desc AccessKeysController... */ -@Tag(name = "开放平台") -@RequestMapping("/accessKeys") +@Tag(name = "超级后台-开放平台") +@RequestMapping("/m1/accessKeys") @JsonBody @CheckUserType(userTypes = UserType.MANAGEMENT_SUPER) +@RestController public class AccessKeysController { @Autowired diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/controller/AssessmentCriteriaController.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AssessmentCriteriaController.java similarity index 62% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/controller/AssessmentCriteriaController.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AssessmentCriteriaController.java index 4165e9d..dc619d9 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/controller/AssessmentCriteriaController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AssessmentCriteriaController.java @@ -1,67 +1,43 @@ -package com.changhu.module.assessmentCriteria.controller; +package com.changhu.module.superManagement.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.toolkit.Db; -import com.changhu.common.annotation.CheckUserType; import com.changhu.common.annotation.JsonBody; -import com.changhu.common.db.enums.EnterprisesUnitType; -import com.changhu.common.db.enums.UserType; import com.changhu.common.exception.MessageException; -import com.changhu.common.pojo.vo.SelectNodeVo; -import com.changhu.module.assessmentCriteria.pojo.entity.CkGroup; -import com.changhu.module.assessmentCriteria.pojo.entity.CkItem; -import com.changhu.module.assessmentCriteria.pojo.entity.CkStandard; -import com.changhu.module.assessmentCriteria.pojo.params.*; -import com.changhu.module.assessmentCriteria.pojo.queryParams.CkProjectPagerQueryParams; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentCriteriaRuleVo; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectDetailTableVo; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectPagerVo; -import com.changhu.module.assessmentCriteria.service.AssessmentCriteriaService; +import com.changhu.module.superManagement.pojo.params.CkGroupSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkItemSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkProjectSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkStandardSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.queryParams.CkProjectPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.CkProjectDetailTableVo; +import com.changhu.module.superManagement.pojo.vo.CkProjectPagerVo; +import com.changhu.module.superManagement.service.AssessmentCriteriaService; +import com.changhu.pojo.entity.CkGroup; +import com.changhu.pojo.entity.CkItem; +import com.changhu.pojo.entity.CkStandard; import com.changhu.support.mybatisplus.pojo.params.PageParams; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @author 20252 - * @createTime 2024/11/6 上午10:02 + * @createTime 2024/11/22 下午2:36 * @desc AssessmentCriteriaController... */ -@Tag(name = "考核标准") +@Tag(name = "超级后台-考核标准") @JsonBody -@RequestMapping("/assessmentCriteria") -@CheckUserType(userTypes = UserType.MANAGEMENT_SUPER) +@RequestMapping("/m1/ac") +@RestController public class AssessmentCriteriaController { @Autowired private AssessmentCriteriaService assessmentCriteriaService; - @Operation(summary = "根据类型获取考核项目列表") - @GetMapping("/ckProjectListByType") - @CheckUserType(value = false) - public List> ckProjectListByType(@RequestParam EnterprisesUnitType type) { - return assessmentCriteriaService.assessmentCriteriaListByType(type); - } - - @Operation(summary = "根据考核项目获取考核规则") - @GetMapping("/assessmentCriteriaRulesByCkProjectId") - @CheckUserType(value = false) - public List assessmentCriteriaRulesByCkProjectId(@RequestParam Long ckProjectId) { - return assessmentCriteriaService.assessmentCriteriaRulesByCkProjectId(ckProjectId); - } - - @Operation(summary = "提交考核记录") - @PostMapping("/submitAssessmentRecord") - @CheckUserType(value = false) - public void submitAssessmentRecord(@Validated @RequestBody AssessmentRecordParams params) { - assessmentCriteriaService.submitAssessmentRecord(params); - } - @Operation(summary = "考核项目分页查询") @PostMapping("/ckProjectPagerVoPager") public Page ckProjectPagerVoPager(@RequestBody PageParams queryParams) { @@ -130,5 +106,4 @@ public class AssessmentCriteriaController { throw new MessageException(); } } - } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/controller/AssessmentRecordController.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AssessmentRecordController.java similarity index 63% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/controller/AssessmentRecordController.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AssessmentRecordController.java index c8111d8..8434d15 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/controller/AssessmentRecordController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/AssessmentRecordController.java @@ -1,13 +1,13 @@ -package com.changhu.module.assessmentCriteria.controller; +package com.changhu.module.superManagement.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.changhu.common.annotation.CheckUserType; import com.changhu.common.annotation.JsonBody; import com.changhu.common.db.enums.UserType; -import com.changhu.module.assessmentCriteria.pojo.queryParams.AssessmentRecordPagerQueryParams; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordDetailVo; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordPagerVo; -import com.changhu.module.assessmentCriteria.service.CkAssessmentRecordService; +import com.changhu.module.superManagement.pojo.queryParams.AssessmentRecordPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.AssessmentRecordDetailVo; +import com.changhu.module.superManagement.pojo.vo.AssessmentRecordPagerVo; +import com.changhu.module.superManagement.service.AssessmentRecordService; import com.changhu.support.mybatisplus.pojo.params.PageParams; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -21,24 +21,24 @@ import java.util.List; * @createTime 2024/11/8 下午3:51 * @desc AssessmentRecordController... */ -@Tag(name = "考核记录详情") +@Tag(name = "超级后台-考核记录") @JsonBody -@RequestMapping("/assessmentRecord") +@RequestMapping("/m1/ar") +@CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SUPER}) +@RestController public class AssessmentRecordController { @Autowired - private CkAssessmentRecordService assessmentRecordService; + private AssessmentRecordService assessmentRecordService; @Operation(summary = "考核记录分页") @PostMapping("/pager") - @CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SUPER}) public Page pager(@RequestBody PageParams queryParams) { return assessmentRecordService.pager(queryParams); } @Operation(summary = "扣分详情") @GetMapping("/deductedDetail") - @CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SUPER}) public List deductedDetail(@RequestParam Long assessmentRecordId) { return assessmentRecordService.deductedDetail(assessmentRecordId); } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperIndexController.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperIndexController.java index 46193f1..920ab84 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperIndexController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperIndexController.java @@ -2,13 +2,15 @@ package com.changhu.module.superManagement.controller; import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.annotation.JsonBody; -import com.changhu.module.management.pojo.entity.EnterprisesUnit; +import com.changhu.module.superManagement.pojo.vo.EnterprisesUnitServiceProjectSecurityUserTotalVo; import com.changhu.module.superManagement.service.SuperIndexService; +import com.changhu.pojo.entity.EnterprisesUnit; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import java.util.List; @@ -18,17 +20,24 @@ import java.util.List; * @desc SuperIndexController... */ @JsonBody -@Tag(name = "超级后台首页") -@RequestMapping("/super/index") +@Tag(name = "超级后台-首页") +@RequestMapping("/m1/index") +@RestController public class SuperIndexController { @Autowired private SuperIndexService superIndexService; @Operation(summary = "企事业单位地图点位") - @GetMapping("/mapPoint") - public List mapPoint() { + @GetMapping("/points") + public List points() { return Db.lambdaQuery(EnterprisesUnit.class).list(); } + @Operation(summary = "统计事业单位 服务项目及保安人数") + @GetMapping("/statistics") + public EnterprisesUnitServiceProjectSecurityUserTotalVo statistics() { + return superIndexService.statistics(); + } + } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperUnitController.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperUnitController.java new file mode 100644 index 0000000..0b98661 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperUnitController.java @@ -0,0 +1,70 @@ +package com.changhu.module.superManagement.controller; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.common.annotation.CheckUserType; +import com.changhu.common.annotation.JsonBody; +import com.changhu.common.db.enums.UserType; +import com.changhu.module.superManagement.pojo.params.ManagementSuperUserSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.UnitCheckPassParams; +import com.changhu.module.superManagement.pojo.queryParams.PoliceUnitPagerQueryParams; +import com.changhu.module.superManagement.pojo.queryParams.SecurityUnitPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.PoliceUnitPagerVo; +import com.changhu.module.superManagement.pojo.vo.SecurityUnitPagerVo; +import com.changhu.module.superManagement.service.SuperUnitService; +import com.changhu.pojo.params.UnitDisableOrEnableParams; +import com.changhu.support.mybatisplus.pojo.params.PageParams; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author 20252 + * @createTime 2024/9/11 上午9:38 + * @desc ManagementSuperController... + */ +@Tag(name = "超级后台-单位管理") +@JsonBody +@RequestMapping("/m1/unit") +@CheckUserType(userTypes = UserType.MANAGEMENT_SUPER) +@RestController +public class SuperUnitController { + + @Autowired + private SuperUnitService superUnitService; + + @Operation(summary = "新增或保存后台用户") + @PostMapping("/add_upd/user") + public void saveOrUpdateUser(@RequestBody @Valid ManagementSuperUserSaveOrUpdateParams params) { + superUnitService.saveOrUpdateUser(params); + } + + @Operation(summary = "公安单位分页查询") + @PostMapping("/police/pager") + public Page policeUnitPager(@RequestBody PageParams queryParams) { + return superUnitService.policeUnitPager(queryParams); + } + + @Operation(summary = "保安单位分页查询") + @PostMapping("/security/pager") + public Page securityUnitPager(@RequestBody PageParams queryParams) { + return superUnitService.securityUnitPager(queryParams); + } + + @Operation(summary = "审核通过") + @PostMapping("/check_pass") + public void checkPass(@RequestBody @Valid UnitCheckPassParams params) { + superUnitService.checkPass(params); + } + + @Operation(summary = "启用或禁用状态") + @PostMapping("/disable_enable") + public void disableOrEnable(@RequestBody @Valid UnitDisableOrEnableParams params) { + superUnitService.disableOrEnable(params); + } + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/AssessmentCriteriaMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/AssessmentCriteriaMapper.java new file mode 100644 index 0000000..0bfd096 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/AssessmentCriteriaMapper.java @@ -0,0 +1,36 @@ +package com.changhu.module.superManagement.mapper; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.superManagement.pojo.queryParams.CkProjectPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.CkProjectDetailTableVo; +import com.changhu.module.superManagement.pojo.vo.CkProjectPagerVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author 20252 + * @createTime 2024/11/22 下午2:42 + * @desc AssessmentCriteriaMapper... + */ +@Mapper +public interface AssessmentCriteriaMapper { + /** + * 分页查询 + * + * @param page 分页参数 + * @param params 查询参数 + * @return 分页数据 + */ + Page ckProjectPager(@Param("page") Page page, + @Param("params") CkProjectPagerQueryParams params); + + /** + * 考核项目详情 + * + * @param ckProjectId 考核项目id + * @return 详情 + */ + List ckProjectDetail(@Param("ckProjectId") Long ckProjectId); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkAssessmentRecordMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/AssessmentRecordMapper.java similarity index 53% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkAssessmentRecordMapper.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/AssessmentRecordMapper.java index 3d77347..8a42eac 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/mapper/CkAssessmentRecordMapper.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/AssessmentRecordMapper.java @@ -1,21 +1,18 @@ -package com.changhu.module.assessmentCriteria.mapper; +package com.changhu.module.superManagement.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.module.assessmentCriteria.pojo.entity.CkAssessmentRecord; -import com.changhu.module.assessmentCriteria.pojo.queryParams.AssessmentRecordPagerQueryParams; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordPagerVo; +import com.changhu.module.superManagement.pojo.queryParams.AssessmentRecordPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.AssessmentRecordPagerVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; /** - * ck_assessment_record (考核记录) 固化类 - * author: luozhun - * desc 由groovy脚本自动生成 + * @author 20252 + * @createTime 2024/11/22 下午3:05 + * @desc AssessmentRecordMapper... */ @Mapper -public interface CkAssessmentRecordMapper extends BaseMapper { - +public interface AssessmentRecordMapper { /** * 分页查询 * diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/SuperUnitMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/SuperUnitMapper.java new file mode 100644 index 0000000..f5a7c48 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/SuperUnitMapper.java @@ -0,0 +1,37 @@ +package com.changhu.module.superManagement.mapper; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.superManagement.pojo.queryParams.PoliceUnitPagerQueryParams; +import com.changhu.module.superManagement.pojo.queryParams.SecurityUnitPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.PoliceUnitPagerVo; +import com.changhu.module.superManagement.pojo.vo.SecurityUnitPagerVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author 20252 + * @createTime 2024/11/21 下午3:15 + * @desc SuperUnitMapper... + */ +@Mapper +public interface SuperUnitMapper { + /** + * 分页查询 + * + * @param page 分页参数 + * @param params 查询参数 + * @return 结果 + */ + Page policeUnitPager(@Param("page") Page page, + @Param("params") PoliceUnitPagerQueryParams params); + + /** + * 分页查询 + * + * @param page 分页对象 + * @param params 查询参数 + * @return 结果 + */ + Page securityUnitPager(@Param("page") Page page, + @Param("params") SecurityUnitPagerQueryParams params); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkGroupSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkGroupSaveOrUpdateParams.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkGroupSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkGroupSaveOrUpdateParams.java index 66560c5..f7fa1a6 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkGroupSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkGroupSaveOrUpdateParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.params; +package com.changhu.module.superManagement.pojo.params; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkItemSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkItemSaveOrUpdateParams.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkItemSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkItemSaveOrUpdateParams.java index 9f9868e..48948f7 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkItemSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkItemSaveOrUpdateParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.params; +package com.changhu.module.superManagement.pojo.params; import com.changhu.common.db.enums.SelectType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkProjectSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkProjectSaveOrUpdateParams.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkProjectSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkProjectSaveOrUpdateParams.java index 1c3d654..4dc8df9 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkProjectSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkProjectSaveOrUpdateParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.params; +package com.changhu.module.superManagement.pojo.params; import com.changhu.common.db.enums.EnterprisesUnitType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkStandardSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkStandardSaveOrUpdateParams.java similarity index 92% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkStandardSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkStandardSaveOrUpdateParams.java index f03d7c6..55578d9 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/params/CkStandardSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/CkStandardSaveOrUpdateParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.params; +package com.changhu.module.superManagement.pojo.params; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/params/GeneratedAccessKeyParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/GeneratedAccessKeyParams.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/pojo/params/GeneratedAccessKeyParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/GeneratedAccessKeyParams.java index 67bad79..2aaee34 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/params/GeneratedAccessKeyParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/GeneratedAccessKeyParams.java @@ -1,4 +1,4 @@ -package com.changhu.pojo.params; +package com.changhu.module.superManagement.pojo.params; import com.changhu.common.db.enums.IsEnable; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementSuperUserSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/ManagementSuperUserSaveOrUpdateParams.java similarity index 91% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementSuperUserSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/ManagementSuperUserSaveOrUpdateParams.java index 3668686..ab54a9a 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/ManagementSuperUserSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/ManagementSuperUserSaveOrUpdateParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.params; +package com.changhu.module.superManagement.pojo.params; import com.changhu.common.validator.annotation.IsMobile; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexCheckPassParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/UnitCheckPassParams.java similarity index 71% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexCheckPassParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/UnitCheckPassParams.java index adb448b..f9dd25a 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexCheckPassParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/params/UnitCheckPassParams.java @@ -1,6 +1,6 @@ -package com.changhu.module.management.pojo.params; +package com.changhu.module.superManagement.pojo.params; -import com.changhu.module.management.enums.UnitOptType; +import com.changhu.strategy.UnitOptType; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -8,10 +8,10 @@ import lombok.Data; /** * @author 20252 * @createTime 2024/9/2 上午9:59 - * @desc IndexCheckPassParams... + * @desc UnitCheckPassParams... */ @Data -public class IndexCheckPassParams { +public class UnitCheckPassParams { @Schema(description = "审核数据的id") @NotNull(message = "审核数据的id不能为空") private Long checkDataId; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/queryParams/AssessmentRecordPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/AssessmentRecordPagerQueryParams.java similarity index 90% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/queryParams/AssessmentRecordPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/AssessmentRecordPagerQueryParams.java index ef5a4ed..6c243f7 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/queryParams/AssessmentRecordPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/AssessmentRecordPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.queryParams; +package com.changhu.module.superManagement.pojo.queryParams; import com.changhu.common.db.enums.EnterprisesUnitType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/queryParams/CkProjectPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/CkProjectPagerQueryParams.java similarity index 81% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/queryParams/CkProjectPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/CkProjectPagerQueryParams.java index 30b42d7..5b8910e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/queryParams/CkProjectPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/CkProjectPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.queryParams; +package com.changhu.module.superManagement.pojo.queryParams; import com.changhu.common.db.enums.EnterprisesUnitType; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/PoliceUnitPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/PoliceUnitPagerQueryParams.java similarity index 92% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/PoliceUnitPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/PoliceUnitPagerQueryParams.java index 178e81f..71971cc 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/PoliceUnitPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/PoliceUnitPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.queryParams; +package com.changhu.module.superManagement.pojo.queryParams; import com.changhu.common.db.enums.CheckStatus; import com.changhu.common.db.enums.IsEnable; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/SecurityUnitPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/SecurityUnitPagerQueryParams.java similarity index 92% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/SecurityUnitPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/SecurityUnitPagerQueryParams.java index 253c23b..7e92d29 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/SecurityUnitPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/queryParams/SecurityUnitPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.queryParams; +package com.changhu.module.superManagement.pojo.queryParams; import com.changhu.common.db.enums.CheckStatus; import com.changhu.common.db.enums.IsEnable; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentRecordDetailVo.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/AssessmentRecordDetailVo.java similarity index 95% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentRecordDetailVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/AssessmentRecordDetailVo.java index 6630a70..53e8328 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentRecordDetailVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/AssessmentRecordDetailVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.vo; +package com.changhu.module.superManagement.pojo.vo; import com.changhu.common.db.enums.SelectType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentRecordPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/AssessmentRecordPagerVo.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentRecordPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/AssessmentRecordPagerVo.java index ce1159f..40b2442 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/AssessmentRecordPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/AssessmentRecordPagerVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.vo; +package com.changhu.module.superManagement.pojo.vo; import com.changhu.common.db.enums.EnterprisesUnitType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/CkProjectDetailTableVo.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/CkProjectDetailTableVo.java similarity index 95% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/CkProjectDetailTableVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/CkProjectDetailTableVo.java index c8d9514..b5166c0 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/CkProjectDetailTableVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/CkProjectDetailTableVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.vo; +package com.changhu.module.superManagement.pojo.vo; import com.changhu.common.db.enums.SelectType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/CkProjectPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/CkProjectPagerVo.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/CkProjectPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/CkProjectPagerVo.java index 43589d1..1fb78eb 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/vo/CkProjectPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/CkProjectPagerVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.vo; +package com.changhu.module.superManagement.pojo.vo; import com.changhu.common.db.enums.EnterprisesUnitType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/EnterprisesUnitServiceProjectSecurityUserTotalVo.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/EnterprisesUnitServiceProjectSecurityUserTotalVo.java new file mode 100644 index 0000000..78382f1 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/EnterprisesUnitServiceProjectSecurityUserTotalVo.java @@ -0,0 +1,19 @@ +package com.changhu.module.superManagement.pojo.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * @author 20252 + * @createTime 2024/11/21 下午2:32 + * @desc EnterprisesUnitServiceProjectSecurityUserTotalVo... + */ +@Data +public class EnterprisesUnitServiceProjectSecurityUserTotalVo { + @Schema(description = "企事业单位数量") + private Integer enterprisesUnitTotal = 0; + @Schema(description = "服务项目总数") + private Integer serviceProjectTotal = 0; + @Schema(description = "保安人员总数") + private Integer securityUserTotal = 0; +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/PoliceUnitPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/PoliceUnitPagerVo.java similarity index 92% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/PoliceUnitPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/PoliceUnitPagerVo.java index e78fd8c..1a494f2 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/PoliceUnitPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/PoliceUnitPagerVo.java @@ -1,8 +1,8 @@ -package com.changhu.module.management.pojo.vo; +package com.changhu.module.superManagement.pojo.vo; import com.changhu.common.db.enums.CheckStatus; import com.changhu.common.db.enums.IsEnable; -import com.changhu.module.management.pojo.model.ContactPersonInfo; +import com.changhu.pojo.model.ContactPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/SecurityUnitPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/SecurityUnitPagerVo.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/SecurityUnitPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/SecurityUnitPagerVo.java index 57a09f3..bd4fd68 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/SecurityUnitPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/pojo/vo/SecurityUnitPagerVo.java @@ -1,8 +1,8 @@ -package com.changhu.module.management.pojo.vo; +package com.changhu.module.superManagement.pojo.vo; import com.changhu.common.db.enums.CheckStatus; import com.changhu.common.db.enums.IsEnable; -import com.changhu.module.management.pojo.model.LegalPersonInfo; +import com.changhu.pojo.model.LegalPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/AssessmentCriteriaService.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/AssessmentCriteriaService.java similarity index 55% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/AssessmentCriteriaService.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/AssessmentCriteriaService.java index d752efa..362aa58 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/AssessmentCriteriaService.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/AssessmentCriteriaService.java @@ -1,40 +1,24 @@ -package com.changhu.module.assessmentCriteria.service; +package com.changhu.module.superManagement.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.changhu.common.db.enums.EnterprisesUnitType; -import com.changhu.common.pojo.vo.SelectNodeVo; -import com.changhu.module.assessmentCriteria.pojo.params.*; -import com.changhu.module.assessmentCriteria.pojo.queryParams.CkProjectPagerQueryParams; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentCriteriaRuleVo; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectDetailTableVo; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectPagerVo; +import com.changhu.module.superManagement.pojo.params.CkGroupSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkItemSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkProjectSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkStandardSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.queryParams.CkProjectPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.CkProjectDetailTableVo; +import com.changhu.module.superManagement.pojo.vo.CkProjectPagerVo; import com.changhu.support.mybatisplus.pojo.params.PageParams; import java.util.List; /** * @author 20252 - * @createTime 2024/11/6 上午10:07 + * @createTime 2024/11/22 下午2:38 * @desc AssessmentCriteriaService... */ public interface AssessmentCriteriaService { - /** - * 根据类型获取考核标准列表 - * - * @param type 类型 - * @return 结果 - */ - List> assessmentCriteriaListByType(EnterprisesUnitType type); - - /** - * 根据考核项目获取考核规则 - * - * @param ckProjectId 考核项目id - * @return 结果 - */ - List assessmentCriteriaRulesByCkProjectId(Long ckProjectId); - /** * 考核项目分页查询 * @@ -86,10 +70,4 @@ public interface AssessmentCriteriaService { */ void saveOrUpdateCkStandard(CkStandardSaveOrUpdateParams params); - /** - * 提交考核记录 - * - * @param params 参数 - */ - void submitAssessmentRecord(AssessmentRecordParams params); } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/AssessmentRecordService.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/AssessmentRecordService.java new file mode 100644 index 0000000..6de529e --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/AssessmentRecordService.java @@ -0,0 +1,32 @@ +package com.changhu.module.superManagement.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.superManagement.pojo.queryParams.AssessmentRecordPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.AssessmentRecordDetailVo; +import com.changhu.module.superManagement.pojo.vo.AssessmentRecordPagerVo; +import com.changhu.support.mybatisplus.pojo.params.PageParams; + +import java.util.List; + +/** + * @author 20252 + * @createTime 2024/11/22 下午3:05 + * @desc AssessmentRecordService... + */ +public interface AssessmentRecordService { + /** + * 分页查询 + * + * @param queryParams 查询参数 + * @return 结果 + */ + Page pager(PageParams queryParams); + + /** + * 扣分详情 + * + * @param assessmentRecordId 考核记录id + * @return 结果 + */ + List deductedDetail(Long assessmentRecordId); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperIndexService.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperIndexService.java index acd631a..8fa7ff7 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperIndexService.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperIndexService.java @@ -1,9 +1,17 @@ package com.changhu.module.superManagement.service; +import com.changhu.module.superManagement.pojo.vo.EnterprisesUnitServiceProjectSecurityUserTotalVo; + /** * @author 20252 * @createTime 2024/11/21 上午11:31 * @desc SuperIndexService... */ public interface SuperIndexService { + /** + * 统计事业单位 服务项目及保安人数 + * + * @return 结构 + */ + EnterprisesUnitServiceProjectSecurityUserTotalVo statistics(); } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperUnitService.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperUnitService.java new file mode 100644 index 0000000..8eb2eb2 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperUnitService.java @@ -0,0 +1,56 @@ +package com.changhu.module.superManagement.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.module.superManagement.pojo.params.ManagementSuperUserSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.UnitCheckPassParams; +import com.changhu.module.superManagement.pojo.queryParams.PoliceUnitPagerQueryParams; +import com.changhu.module.superManagement.pojo.queryParams.SecurityUnitPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.PoliceUnitPagerVo; +import com.changhu.module.superManagement.pojo.vo.SecurityUnitPagerVo; +import com.changhu.pojo.params.UnitDisableOrEnableParams; +import com.changhu.support.mybatisplus.pojo.params.PageParams; +import org.apache.ibatis.annotations.Param; + +/** + * @author 20252 + * @createTime 2024/11/21 下午3:11 + * @desc SuperUnitService... + */ +public interface SuperUnitService { + /** + * 新增或保存后台用户 + * + * @param params 参数 + */ + void saveOrUpdateUser(ManagementSuperUserSaveOrUpdateParams params); + + /** + * 公安单位分页查询 + * + * @param queryParams 查询参数 + * @return 结果 + */ + Page policeUnitPager(@Param("queryParams") PageParams queryParams); + + /** + * 保安单位分页查询 + * + * @param queryParams 查询参数 + * @return 结果 + */ + Page securityUnitPager(PageParams queryParams); + + /** + * 审核通过 + * + * @param params 审核参数 + */ + void checkPass(UnitCheckPassParams params); + + /** + * 启用或者禁用单位 + * + * @param params 参数 + */ + void disableOrEnable(UnitDisableOrEnableParams params); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/AssessmentCriteriaServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/AssessmentCriteriaServiceImpl.java new file mode 100644 index 0000000..41baa75 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/AssessmentCriteriaServiceImpl.java @@ -0,0 +1,93 @@ +package com.changhu.module.superManagement.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.toolkit.Db; +import com.changhu.common.exception.MessageException; +import com.changhu.module.superManagement.mapper.AssessmentCriteriaMapper; +import com.changhu.module.superManagement.pojo.params.CkGroupSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkItemSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkProjectSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.CkStandardSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.queryParams.CkProjectPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.CkProjectDetailTableVo; +import com.changhu.module.superManagement.pojo.vo.CkProjectPagerVo; +import com.changhu.module.superManagement.service.AssessmentCriteriaService; +import com.changhu.pojo.entity.CkGroup; +import com.changhu.pojo.entity.CkItem; +import com.changhu.pojo.entity.CkProject; +import com.changhu.pojo.entity.CkStandard; +import com.changhu.support.mybatisplus.pojo.params.PageParams; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * @author 20252 + * @createTime 2024/11/22 下午2:38 + * @desc AssessmentCriteriaServiceImpl... + */ +@Service("superManagementAssessmentCriteriaService") +public class AssessmentCriteriaServiceImpl implements AssessmentCriteriaService { + + @Autowired + private AssessmentCriteriaMapper assessmentCriteriaMapper; + + @Override + public Page ckProjectPagerVoPager(PageParams queryParams) { + return assessmentCriteriaMapper.ckProjectPager(queryParams.getPage(), queryParams.getParams()); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void saveOrUpdateCkProject(CkProjectSaveOrUpdateParams params) { + boolean b = Db.saveOrUpdate(BeanUtil.copyProperties(params, CkProject.class)); + if (!b) { + throw new MessageException(); + } + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void deleteCkProjectById(Long ckProjectId) { + boolean b = Db.removeById(ckProjectId, CkProject.class); + if (!b) { + throw new MessageException(); + } + } + + @Override + public List ckProjectDetail(Long ckProjectId) { + return assessmentCriteriaMapper.ckProjectDetail(ckProjectId); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void saveOrUpdateCkGroup(CkGroupSaveOrUpdateParams params) { + boolean b = Db.saveOrUpdate(BeanUtil.copyProperties(params, CkGroup.class)); + if (!b) { + throw new MessageException(); + } + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void saveOrUpdateCkItem(CkItemSaveOrUpdateParams params) { + boolean b = Db.saveOrUpdate(BeanUtil.copyProperties(params, CkItem.class)); + if (!b) { + throw new MessageException(); + } + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void saveOrUpdateCkStandard(CkStandardSaveOrUpdateParams params) { + boolean b = Db.saveOrUpdate(BeanUtil.copyProperties(params, CkStandard.class)); + if (!b) { + throw new MessageException(); + } + } + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkAssessmentRecordServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/AssessmentRecordServiceImpl.java similarity index 59% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkAssessmentRecordServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/AssessmentRecordServiceImpl.java index 1e4fd22..1c7ece2 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkAssessmentRecordServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/AssessmentRecordServiceImpl.java @@ -1,22 +1,21 @@ -package com.changhu.module.assessmentCriteria.service.impl; +package com.changhu.module.superManagement.service.impl; import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.db.enums.UserType; import com.changhu.common.enums.ResultCode; import com.changhu.common.exception.MessageException; import com.changhu.common.utils.UserUtil; -import com.changhu.module.assessmentCriteria.mapper.CkAssessmentRecordMapper; -import com.changhu.module.assessmentCriteria.mapper.CkProjectMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkAssessmentRecord; -import com.changhu.module.assessmentCriteria.pojo.entity.CkAssessmentRecordDetails; -import com.changhu.module.assessmentCriteria.pojo.queryParams.AssessmentRecordPagerQueryParams; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordDetailVo; -import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordPagerVo; -import com.changhu.module.assessmentCriteria.pojo.vo.CkProjectDetailTableVo; -import com.changhu.module.assessmentCriteria.service.CkAssessmentRecordService; +import com.changhu.module.superManagement.mapper.AssessmentCriteriaMapper; +import com.changhu.module.superManagement.mapper.AssessmentRecordMapper; +import com.changhu.module.superManagement.pojo.queryParams.AssessmentRecordPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.AssessmentRecordDetailVo; +import com.changhu.module.superManagement.pojo.vo.AssessmentRecordPagerVo; +import com.changhu.module.superManagement.pojo.vo.CkProjectDetailTableVo; +import com.changhu.module.superManagement.service.AssessmentRecordService; +import com.changhu.pojo.entity.CkAssessmentRecord; +import com.changhu.pojo.entity.CkAssessmentRecordDetails; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import com.changhu.support.mybatisplus.pojo.params.PageParams; import org.springframework.beans.factory.annotation.Autowired; @@ -25,22 +24,25 @@ import org.springframework.stereotype.Service; import java.util.List; /** - * ck_assessment_record (考核记录) 服务实现类 - * author: luozhun - * desc 由groovy脚本自动生成 + * @author 20252 + * @createTime 2024/11/22 下午3:05 + * @desc AssessmentRecordServiceImpl... */ @Service -public class CkAssessmentRecordServiceImpl extends ServiceImpl implements CkAssessmentRecordService { +public class AssessmentRecordServiceImpl implements AssessmentRecordService { @Autowired - private CkProjectMapper ckProjectMapper; + private AssessmentCriteriaMapper assessmentCriteriaMapper; + + @Autowired + private AssessmentRecordMapper assessmentRecordMapper; @Override public Page pager(PageParams queryParams) { if (UserType.MANAGEMENT_POLICE.equals(UserUtil.getUserType())) { - return baseMapper.pager(queryParams.getPage(), UserUtil.getUnitId(), queryParams.getParams()); + return assessmentRecordMapper.pager(queryParams.getPage(), UserUtil.getUnitId(), queryParams.getParams()); } - return baseMapper.pager(queryParams.getPage(), null, queryParams.getParams()); + return assessmentRecordMapper.pager(queryParams.getPage(), null, queryParams.getParams()); } @Override @@ -50,7 +52,7 @@ public class CkAssessmentRecordServiceImpl extends ServiceImpl new MessageException(ResultCode.DATA_NOT_FOUND)); - List ckProjectDetailTableVos = ckProjectMapper.ckProjectDetail(ckAssessmentRecord.getCkProjectId()); + List ckProjectDetailTableVos = assessmentCriteriaMapper.ckProjectDetail(ckAssessmentRecord.getCkProjectId()); List assessmentRecordDetailCkStandardIds = Db.lambdaQuery(CkAssessmentRecordDetails.class) .select(CkAssessmentRecordDetails::getCkStandardId) diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperIndexServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperIndexServiceImpl.java index ba7c7b4..3bd2997 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperIndexServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperIndexServiceImpl.java @@ -1,8 +1,18 @@ package com.changhu.module.superManagement.service.impl; +import com.baomidou.mybatisplus.extension.toolkit.Db; +import com.changhu.module.superManagement.pojo.vo.EnterprisesUnitServiceProjectSecurityUserTotalVo; import com.changhu.module.superManagement.service.SuperIndexService; +import com.changhu.pojo.entity.EnterprisesUnit; +import com.changhu.pojo.entity.SecurityUser; +import com.changhu.pojo.entity.ServiceProject; +import lombok.SneakyThrows; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Service; +import java.util.concurrent.CountDownLatch; + /** * @author 20252 * @createTime 2024/11/21 上午11:31 @@ -10,4 +20,39 @@ import org.springframework.stereotype.Service; */ @Service public class SuperIndexServiceImpl implements SuperIndexService { + + @Autowired + private ThreadPoolTaskExecutor threadPoolTaskExecutor; + + @SneakyThrows + @Override + public EnterprisesUnitServiceProjectSecurityUserTotalVo statistics() { + CountDownLatch countDownLatch = new CountDownLatch(3); + EnterprisesUnitServiceProjectSecurityUserTotalVo result = new EnterprisesUnitServiceProjectSecurityUserTotalVo(); + threadPoolTaskExecutor.execute(() -> { + try { + result.setEnterprisesUnitTotal(Db.lambdaQuery(EnterprisesUnit.class).count().intValue()); + } finally { + countDownLatch.countDown(); + } + }); + threadPoolTaskExecutor.execute(() -> { + try { + result.setServiceProjectTotal(Db.lambdaQuery(ServiceProject.class).count().intValue()); + } finally { + countDownLatch.countDown(); + } + }); + + threadPoolTaskExecutor.execute(() -> { + try { + result.setSecurityUserTotal(Db.lambdaQuery(SecurityUser.class).count().intValue()); + } finally { + countDownLatch.countDown(); + } + }); + + countDownLatch.await(); + return result; + } } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SuperServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperUnitServiceImpl.java similarity index 59% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SuperServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperUnitServiceImpl.java index 37395fb..4536ccb 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SuperServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperUnitServiceImpl.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.service.impl; +package com.changhu.module.superManagement.service.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; @@ -7,15 +7,16 @@ import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.enums.ResultCode; import com.changhu.common.exception.MessageException; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.mapper.PoliceUnitMapper; -import com.changhu.module.management.mapper.SecurityUnitMapper; -import com.changhu.module.management.pojo.entity.ManagementSuperUser; -import com.changhu.module.management.pojo.params.ManagementSuperUserSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.PoliceUnitPagerQueryParams; -import com.changhu.module.management.pojo.queryParams.SecurityUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.PoliceUnitPagerVo; -import com.changhu.module.management.pojo.vo.SecurityUnitPagerVo; -import com.changhu.module.management.service.SuperService; +import com.changhu.module.superManagement.mapper.SuperUnitMapper; +import com.changhu.module.superManagement.pojo.params.ManagementSuperUserSaveOrUpdateParams; +import com.changhu.module.superManagement.pojo.params.UnitCheckPassParams; +import com.changhu.module.superManagement.pojo.queryParams.PoliceUnitPagerQueryParams; +import com.changhu.module.superManagement.pojo.queryParams.SecurityUnitPagerQueryParams; +import com.changhu.module.superManagement.pojo.vo.PoliceUnitPagerVo; +import com.changhu.module.superManagement.pojo.vo.SecurityUnitPagerVo; +import com.changhu.module.superManagement.service.SuperUnitService; +import com.changhu.pojo.entity.ManagementSuperUser; +import com.changhu.pojo.params.UnitDisableOrEnableParams; import com.changhu.support.mybatisplus.pojo.params.PageParams; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,17 +25,14 @@ import java.util.List; /** * @author 20252 - * @createTime 2024/9/11 上午9:52 - * @desc SuperServiceImpl... + * @createTime 2024/11/21 下午3:11 + * @desc SuperUnitServiceImpl... */ @Service -public class SuperServiceImpl implements SuperService { +public class SuperUnitServiceImpl implements SuperUnitService { @Autowired - private PoliceUnitMapper policeUnitMapper; - - @Autowired - private SecurityUnitMapper securityUnitMapper; + private SuperUnitMapper superUnitMapper; @Override public void saveOrUpdateUser(ManagementSuperUserSaveOrUpdateParams params) { @@ -71,11 +69,25 @@ public class SuperServiceImpl implements SuperService { @Override public Page policeUnitPager(PageParams queryParams) { - return policeUnitMapper.pager(queryParams.getPage(), queryParams.getParams()); + return superUnitMapper.policeUnitPager(queryParams.getPage(), queryParams.getParams()); } @Override public Page securityUnitPager(PageParams queryParams) { - return securityUnitMapper.pager(queryParams.getPage(), queryParams.getParams()); + return superUnitMapper.securityUnitPager(queryParams.getPage(), queryParams.getParams()); + } + + @Override + public void checkPass(UnitCheckPassParams params) { + params.getUnitOptType() + .getHandler() + .pass(params.getCheckDataId()); + } + + @Override + public void disableOrEnable(UnitDisableOrEnableParams params) { + params.getUnitOptType() + .getHandler() + .disableOrEnable(params.getDataId()); } } diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/EnterprisesUnitDetailDTO.java b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/EnterprisesUnitDetailDTO.java index 12fb4f7..24c4778 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/EnterprisesUnitDetailDTO.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/EnterprisesUnitDetailDTO.java @@ -1,7 +1,7 @@ package com.changhu.pojo.dto; import com.changhu.common.db.enums.EnterprisesUnitType; -import com.changhu.module.management.pojo.model.ContactPersonInfo; +import com.changhu.pojo.model.ContactPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java index edea21e..8183797 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java @@ -3,7 +3,7 @@ package com.changhu.pojo.dto; import com.changhu.common.db.enums.IsOrNot; import com.changhu.common.db.enums.ServiceProjectTwoType; import com.changhu.common.db.enums.ServiceProjectType; -import com.changhu.module.management.pojo.model.LegalPersonInfo; +import com.changhu.pojo.model.LegalPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/ServiceProjectDTO.java b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/ServiceProjectDTO.java index 3b274e9..504fd30 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/ServiceProjectDTO.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/ServiceProjectDTO.java @@ -3,7 +3,7 @@ package com.changhu.pojo.dto; import com.alibaba.fastjson2.annotation.JSONField; import com.changhu.common.db.enums.ServiceProjectType; import com.changhu.common.db.enums.Sex; -import com.changhu.module.management.pojo.model.LegalPersonInfo; +import com.changhu.pojo.model.LegalPersonInfo; import com.changhu.support.fastjson2.serializer.MinioPrefixSerializer; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkAssessmentRecord.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkAssessmentRecord.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkAssessmentRecord.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkAssessmentRecord.java index e3113b2..2bb7eca 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkAssessmentRecord.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkAssessmentRecord.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkAssessmentRecordDetails.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkAssessmentRecordDetails.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkAssessmentRecordDetails.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkAssessmentRecordDetails.java index cc758cb..1ba6f5a 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkAssessmentRecordDetails.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkAssessmentRecordDetails.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkGroup.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkGroup.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkGroup.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkGroup.java index 454b0bd..db0bc8f 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkGroup.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkGroup.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkItem.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkItem.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkItem.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkItem.java index 53710ae..2875820 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkItem.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkItem.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.common.db.enums.SelectType; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkProject.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkProject.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkProject.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkProject.java index 56467bd..1d1f0cc 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkProject.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkProject.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.common.db.enums.EnterprisesUnitType; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkStandard.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkStandard.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkStandard.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkStandard.java index e4b6848..0afc3dc 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/pojo/entity/CkStandard.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/CkStandard.java @@ -1,4 +1,4 @@ -package com.changhu.module.assessmentCriteria.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/EnterprisesUnit.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/EnterprisesUnit.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/EnterprisesUnit.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/EnterprisesUnit.java index 9b3fc65..5dba466 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/EnterprisesUnit.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/EnterprisesUnit.java @@ -1,10 +1,10 @@ -package com.changhu.module.management.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler; import com.changhu.common.db.enums.EnterprisesUnitType; -import com.changhu.module.management.pojo.model.ContactPersonInfo; +import com.changhu.pojo.model.ContactPersonInfo; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementPoliceUnitUser.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementPoliceUnitUser.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementPoliceUnitUser.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementPoliceUnitUser.java index a43b52b..9eed248 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementPoliceUnitUser.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementPoliceUnitUser.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.common.db.enums.IsEnable; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementSecurityUnitUser.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementSecurityUnitUser.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementSecurityUnitUser.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementSecurityUnitUser.java index 4619b82..6acf5d8 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementSecurityUnitUser.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementSecurityUnitUser.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.common.db.enums.IsEnable; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementSuperUser.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementSuperUser.java similarity index 95% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementSuperUser.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementSuperUser.java index a2a4e1e..eae6b0f 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ManagementSuperUser.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ManagementSuperUser.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.common.db.enums.IsEnable; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/entity/MiniProgramUser.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/MiniProgramUser.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/entity/MiniProgramUser.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/MiniProgramUser.java index d2d2944..7ae40c4 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/entity/MiniProgramUser.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/MiniProgramUser.java @@ -1,4 +1,4 @@ -package com.changhu.module.miniProgram.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.common.db.enums.CheckStatus; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/PoliceUnit.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/PoliceUnit.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/PoliceUnit.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/PoliceUnit.java index 6598f97..2838358 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/PoliceUnit.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/PoliceUnit.java @@ -1,11 +1,11 @@ -package com.changhu.module.management.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler; import com.changhu.common.db.enums.CheckStatus; import com.changhu.common.db.enums.IsEnable; -import com.changhu.module.management.pojo.model.ContactPersonInfo; +import com.changhu.pojo.model.ContactPersonInfo; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/SecurityUnit.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUnit.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/SecurityUnit.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUnit.java index ae2445b..cbd6080 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/SecurityUnit.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUnit.java @@ -1,11 +1,11 @@ -package com.changhu.module.management.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler; import com.changhu.common.db.enums.CheckStatus; import com.changhu.common.db.enums.IsEnable; -import com.changhu.module.management.pojo.model.LegalPersonInfo; +import com.changhu.pojo.model.LegalPersonInfo; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/entity/SecurityUser.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUser.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/entity/SecurityUser.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUser.java index fb8a58c..6874347 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/pojo/entity/SecurityUser.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUser.java @@ -1,4 +1,4 @@ -package com.changhu.module.miniProgram.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.common.db.enums.Sex; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ServiceProject.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ServiceProject.java similarity index 97% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ServiceProject.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/entity/ServiceProject.java index 388b969..ac678a2 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/entity/ServiceProject.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ServiceProject.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.entity; +package com.changhu.pojo.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.changhu.common.db.enums.IsOrNot; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/model/ContactPersonInfo.java b/policeSecurityServer/src/main/java/com/changhu/pojo/model/ContactPersonInfo.java similarity index 90% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/model/ContactPersonInfo.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/model/ContactPersonInfo.java index 28ef868..ae0915e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/model/ContactPersonInfo.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/model/ContactPersonInfo.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.model; +package com.changhu.pojo.model; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/model/LegalPersonInfo.java b/policeSecurityServer/src/main/java/com/changhu/pojo/model/LegalPersonInfo.java similarity index 86% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/model/LegalPersonInfo.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/model/LegalPersonInfo.java index df816c3..9e2644e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/model/LegalPersonInfo.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/model/LegalPersonInfo.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.model; +package com.changhu.pojo.model; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexCheckStatusParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/params/CheckStatusParams.java similarity index 71% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexCheckStatusParams.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/params/CheckStatusParams.java index 7cce7c9..55082cd 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexCheckStatusParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/params/CheckStatusParams.java @@ -1,6 +1,6 @@ -package com.changhu.module.management.pojo.params; +package com.changhu.pojo.params; -import com.changhu.module.management.enums.UnitOptType; +import com.changhu.strategy.UnitOptType; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -8,10 +8,10 @@ import lombok.Data; /** * @author 20252 * @createTime 2024/9/2 上午10:51 - * @desc IndexCheckStatusParams... + * @desc CheckStatusParams... */ @Data -public class IndexCheckStatusParams { +public class CheckStatusParams { @Schema(description = "审核数据的唯一标识") @NotNull(message = "唯一标识不能为空") diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/EnterprisesUnitSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/params/EnterprisesUnitSaveOrUpdateParams.java similarity index 91% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/EnterprisesUnitSaveOrUpdateParams.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/params/EnterprisesUnitSaveOrUpdateParams.java index f27bd6a..b04457e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/EnterprisesUnitSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/params/EnterprisesUnitSaveOrUpdateParams.java @@ -1,7 +1,7 @@ -package com.changhu.module.management.pojo.params; +package com.changhu.pojo.params; import com.changhu.common.db.enums.EnterprisesUnitType; -import com.changhu.module.management.pojo.model.ContactPersonInfo; +import com.changhu.pojo.model.ContactPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotEmpty; diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/params/LoginParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/params/LoginParams.java index 717aa1b..c8ac338 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/params/LoginParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/params/LoginParams.java @@ -1,7 +1,7 @@ package com.changhu.pojo.params; import com.alibaba.fastjson2.JSONObject; -import com.changhu.enums.ClientType; +import com.changhu.strategy.ClientType; import lombok.Data; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/params/PoliceUnitRegisterParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/params/PoliceUnitRegisterParams.java index a0ca769..bddca4e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/params/PoliceUnitRegisterParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/params/PoliceUnitRegisterParams.java @@ -1,6 +1,6 @@ package com.changhu.pojo.params; -import com.changhu.module.management.pojo.model.ContactPersonInfo; +import com.changhu.pojo.model.ContactPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotEmpty; diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/params/SecurityUnitRegisterParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/params/SecurityUnitRegisterParams.java index 0947412..9e32de5 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/params/SecurityUnitRegisterParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/params/SecurityUnitRegisterParams.java @@ -1,6 +1,6 @@ package com.changhu.pojo.params; -import com.changhu.module.management.pojo.model.LegalPersonInfo; +import com.changhu.pojo.model.LegalPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotEmpty; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexDisableOrEnableParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/params/UnitDisableOrEnableParams.java similarity index 69% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexDisableOrEnableParams.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/params/UnitDisableOrEnableParams.java index f00c4ef..68bdd17 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/params/IndexDisableOrEnableParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/params/UnitDisableOrEnableParams.java @@ -1,6 +1,6 @@ -package com.changhu.module.management.pojo.params; +package com.changhu.pojo.params; -import com.changhu.module.management.enums.UnitOptType; +import com.changhu.strategy.UnitOptType; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -8,10 +8,10 @@ import lombok.Data; /** * @author 20252 * @createTime 2024/9/3 上午9:28 - * @desc IndexDisableOrEnableParams... + * @desc UnitDisableOrEnableParams... */ @Data -public class IndexDisableOrEnableParams { +public class UnitDisableOrEnableParams { @Schema(description = "数据id") @NotNull(message = "数据id不能为空") private Long dataId; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/EnterprisesUnitPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/queryParams/EnterprisesUnitPagerQueryParams.java similarity index 89% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/EnterprisesUnitPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/queryParams/EnterprisesUnitPagerQueryParams.java index 67d2138..9e91578 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/EnterprisesUnitPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/queryParams/EnterprisesUnitPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.queryParams; +package com.changhu.pojo.queryParams; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/EnterprisesUnitPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/pojo/vo/EnterprisesUnitPagerVo.java similarity index 93% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/EnterprisesUnitPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/vo/EnterprisesUnitPagerVo.java index 11c2e6e..b706c01 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/EnterprisesUnitPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/vo/EnterprisesUnitPagerVo.java @@ -1,8 +1,8 @@ -package com.changhu.module.management.pojo.vo; +package com.changhu.pojo.vo; import com.changhu.common.db.enums.EnterprisesUnitType; import com.changhu.common.pojo.vo.CreateOrUpdateUser; -import com.changhu.module.management.pojo.model.ContactPersonInfo; +import com.changhu.pojo.model.ContactPersonInfo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.locationtech.jts.geom.Point; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/UnitCheckStatusVo.java b/policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitCheckStatusVo.java similarity index 63% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/UnitCheckStatusVo.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitCheckStatusVo.java index de656c9..c709fe5 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/UnitCheckStatusVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitCheckStatusVo.java @@ -1,7 +1,8 @@ -package com.changhu.module.management.pojo.vo; +package com.changhu.pojo.vo; import com.changhu.common.db.enums.CheckStatus; import com.changhu.common.utils.UserUtil; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; /** @@ -12,11 +13,12 @@ import lombok.Data; @Data public class UnitCheckStatusVo { + @Schema(description = "审核状态") private CheckStatus checkStatus; - + @Schema(description = "备注") private String remark; - + @Schema(description = "账号") private String account; - + @Schema(description = "密码") private String password = UserUtil.DEFAULT_PASSWORD; } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/UnitMiniProgramUserPagerQueryParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitMiniProgramUserPagerQueryParams.java similarity index 91% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/UnitMiniProgramUserPagerQueryParams.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitMiniProgramUserPagerQueryParams.java index e01b151..e261800 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/queryParams/UnitMiniProgramUserPagerQueryParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitMiniProgramUserPagerQueryParams.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.queryParams; +package com.changhu.pojo.vo; import com.changhu.common.db.enums.IsEnable; import com.changhu.common.db.enums.Sex; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/UnitMiniProgramUserPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitMiniProgramUserPagerVo.java similarity index 95% rename from policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/UnitMiniProgramUserPagerVo.java rename to policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitMiniProgramUserPagerVo.java index 9511ae7..92a9fbf 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/pojo/vo/UnitMiniProgramUserPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/vo/UnitMiniProgramUserPagerVo.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.pojo.vo; +package com.changhu.pojo.vo; import com.changhu.common.db.enums.CheckStatus; import com.changhu.common.db.enums.IsEnable; diff --git a/policeSecurityServer/src/main/java/com/changhu/service/AccessKeysService.java b/policeSecurityServer/src/main/java/com/changhu/service/AccessKeysService.java index 0c02a1b..b268f1d 100644 --- a/policeSecurityServer/src/main/java/com/changhu/service/AccessKeysService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/AccessKeysService.java @@ -1,8 +1,8 @@ package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.changhu.module.superManagement.pojo.params.GeneratedAccessKeyParams; import com.changhu.pojo.entity.AccessKeys; -import com.changhu.pojo.params.GeneratedAccessKeyParams; /** * access_keys (开放接口的授权) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkAssessmentRecordDetailsService.java b/policeSecurityServer/src/main/java/com/changhu/service/CkAssessmentRecordDetailsService.java similarity index 67% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkAssessmentRecordDetailsService.java rename to policeSecurityServer/src/main/java/com/changhu/service/CkAssessmentRecordDetailsService.java index 03e198c..89d1682 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkAssessmentRecordDetailsService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/CkAssessmentRecordDetailsService.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.assessmentCriteria.pojo.entity.CkAssessmentRecordDetails; +import com.changhu.pojo.entity.CkAssessmentRecordDetails; /** * ck_assessment_record_details (考核记录明细) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/service/CkAssessmentRecordService.java b/policeSecurityServer/src/main/java/com/changhu/service/CkAssessmentRecordService.java new file mode 100644 index 0000000..216e4a9 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/CkAssessmentRecordService.java @@ -0,0 +1,13 @@ +package com.changhu.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.changhu.pojo.entity.CkAssessmentRecord; + +/** + * ck_assessment_record (考核记录) 服务类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +public interface CkAssessmentRecordService extends IService { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkGroupService.java b/policeSecurityServer/src/main/java/com/changhu/service/CkGroupService.java similarity index 64% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkGroupService.java rename to policeSecurityServer/src/main/java/com/changhu/service/CkGroupService.java index db87089..9660dc0 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkGroupService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/CkGroupService.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.assessmentCriteria.pojo.entity.CkGroup; +import com.changhu.pojo.entity.CkGroup; /** * ck_group (考核组) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkItemService.java b/policeSecurityServer/src/main/java/com/changhu/service/CkItemService.java similarity index 65% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkItemService.java rename to policeSecurityServer/src/main/java/com/changhu/service/CkItemService.java index 4cc3fba..958ac74 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkItemService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/CkItemService.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.assessmentCriteria.pojo.entity.CkItem; +import com.changhu.pojo.entity.CkItem; /** * ck_item (分组内的考核项) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkProjectService.java b/policeSecurityServer/src/main/java/com/changhu/service/CkProjectService.java similarity index 65% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkProjectService.java rename to policeSecurityServer/src/main/java/com/changhu/service/CkProjectService.java index 0357d50..67eb524 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkProjectService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/CkProjectService.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.assessmentCriteria.pojo.entity.CkProject; +import com.changhu.pojo.entity.CkProject; /** * ck_project (考核项目) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkStandardService.java b/policeSecurityServer/src/main/java/com/changhu/service/CkStandardService.java similarity index 65% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkStandardService.java rename to policeSecurityServer/src/main/java/com/changhu/service/CkStandardService.java index 12559a6..48c524d 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/CkStandardService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/CkStandardService.java @@ -1,7 +1,7 @@ -package com.changhu.module.assessmentCriteria.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.assessmentCriteria.pojo.entity.CkStandard; +import com.changhu.pojo.entity.CkStandard; /** * ck_standard (扣分标准) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/EnterprisesUnitService.java b/policeSecurityServer/src/main/java/com/changhu/service/EnterprisesUnitService.java similarity index 75% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/EnterprisesUnitService.java rename to policeSecurityServer/src/main/java/com/changhu/service/EnterprisesUnitService.java index 5a8524c..f36ad8b 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/EnterprisesUnitService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/EnterprisesUnitService.java @@ -1,12 +1,12 @@ -package com.changhu.module.management.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.changhu.common.pojo.vo.SelectNodeVo; -import com.changhu.module.management.pojo.entity.EnterprisesUnit; -import com.changhu.module.management.pojo.params.EnterprisesUnitSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.EnterprisesUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.EnterprisesUnitPagerVo; +import com.changhu.pojo.entity.EnterprisesUnit; +import com.changhu.pojo.params.EnterprisesUnitSaveOrUpdateParams; +import com.changhu.pojo.queryParams.EnterprisesUnitPagerQueryParams; +import com.changhu.pojo.vo.EnterprisesUnitPagerVo; import com.changhu.support.mybatisplus.pojo.params.PageParams; import java.util.List; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementPoliceUnitUserService.java b/policeSecurityServer/src/main/java/com/changhu/service/ManagementPoliceUnitUserService.java similarity index 70% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementPoliceUnitUserService.java rename to policeSecurityServer/src/main/java/com/changhu/service/ManagementPoliceUnitUserService.java index d70efca..56e9f21 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementPoliceUnitUserService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/ManagementPoliceUnitUserService.java @@ -1,7 +1,7 @@ -package com.changhu.module.management.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.management.pojo.entity.ManagementPoliceUnitUser; +import com.changhu.pojo.entity.ManagementPoliceUnitUser; /** * management_police_user (后台-公安单位用户表) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementSecurityUnitUserService.java b/policeSecurityServer/src/main/java/com/changhu/service/ManagementSecurityUnitUserService.java similarity index 70% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementSecurityUnitUserService.java rename to policeSecurityServer/src/main/java/com/changhu/service/ManagementSecurityUnitUserService.java index bcee24a..d7bc58b 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementSecurityUnitUserService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/ManagementSecurityUnitUserService.java @@ -1,7 +1,7 @@ -package com.changhu.module.management.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.management.pojo.entity.ManagementSecurityUnitUser; +import com.changhu.pojo.entity.ManagementSecurityUnitUser; /** * management_security_unit_user (后台-保安单位用户表) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/service/ManagementService.java b/policeSecurityServer/src/main/java/com/changhu/service/ManagementService.java new file mode 100644 index 0000000..44fce48 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/ManagementService.java @@ -0,0 +1,48 @@ +package com.changhu.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.changhu.pojo.params.CheckStatusParams; +import com.changhu.pojo.params.UnitDisableOrEnableParams; +import com.changhu.pojo.vo.UnitCheckStatusVo; +import com.changhu.pojo.vo.UnitMiniProgramUserPagerQueryParams; +import com.changhu.pojo.vo.UnitMiniProgramUserPagerVo; +import com.changhu.support.mybatisplus.pojo.params.PageParams; + +/** + * @author 20252 + * @createTime 2024/9/2 上午9:49 + * @desc IndexService... + */ +public interface ManagementService { + + /** + * 获取审核状态 + * + * @param params 参数 + * @return 结果 + */ + UnitCheckStatusVo getCheckStatus(CheckStatusParams params); + + /** + * 查询单位下的小程序用户 + * + * @param queryParams 查询参数 + * @return 结果 + */ + Page miniProgramUserPager(PageParams queryParams); + + /** + * 审核通过小程序用户 + * + * @param params 参数 + */ + void passMiniProgramUser(UnitDisableOrEnableParams params); + + /** + * 禁用或启用小程序用户 + * + * @param params 参数 + */ + void disableOrEnableMiniProgramUser(UnitDisableOrEnableParams params); + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementSuperUserService.java b/policeSecurityServer/src/main/java/com/changhu/service/ManagementSuperUserService.java similarity index 69% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementSuperUserService.java rename to policeSecurityServer/src/main/java/com/changhu/service/ManagementSuperUserService.java index 90d8e43..de0e7ca 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/ManagementSuperUserService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/ManagementSuperUserService.java @@ -1,7 +1,7 @@ -package com.changhu.module.management.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.management.pojo.entity.ManagementSuperUser; +import com.changhu.pojo.entity.ManagementSuperUser; /** * management_super_user (后台-超级后台) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/service/MiniProgramUserService.java b/policeSecurityServer/src/main/java/com/changhu/service/MiniProgramUserService.java new file mode 100644 index 0000000..e49a72c --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/MiniProgramUserService.java @@ -0,0 +1,13 @@ +package com.changhu.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.changhu.pojo.entity.MiniProgramUser; + +/** + * mini_program_user (小程序用户) 服务类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +public interface MiniProgramUserService extends IService { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/PoliceUnitService.java b/policeSecurityServer/src/main/java/com/changhu/service/PoliceUnitService.java similarity index 68% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/PoliceUnitService.java rename to policeSecurityServer/src/main/java/com/changhu/service/PoliceUnitService.java index 5ebe889..784f3fa 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/PoliceUnitService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/PoliceUnitService.java @@ -1,7 +1,7 @@ -package com.changhu.module.management.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.management.pojo.entity.PoliceUnit; +import com.changhu.pojo.entity.PoliceUnit; /** * police_unit (公安单位) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/SecurityUnitService.java b/policeSecurityServer/src/main/java/com/changhu/service/SecurityUnitService.java similarity index 68% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/SecurityUnitService.java rename to policeSecurityServer/src/main/java/com/changhu/service/SecurityUnitService.java index cc3b160..0f18889 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/SecurityUnitService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/SecurityUnitService.java @@ -1,7 +1,7 @@ -package com.changhu.module.management.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.management.pojo.entity.SecurityUnit; +import com.changhu.pojo.entity.SecurityUnit; /** * security_unit (保安单位) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/SecurityUserService.java b/policeSecurityServer/src/main/java/com/changhu/service/SecurityUserService.java similarity index 68% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/SecurityUserService.java rename to policeSecurityServer/src/main/java/com/changhu/service/SecurityUserService.java index 208698b..83bfe36 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/SecurityUserService.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/SecurityUserService.java @@ -1,7 +1,7 @@ -package com.changhu.module.miniProgram.service; +package com.changhu.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.changhu.module.miniProgram.pojo.entity.SecurityUser; +import com.changhu.pojo.entity.SecurityUser; /** * security_user (保安人员) 服务类 diff --git a/policeSecurityServer/src/main/java/com/changhu/service/ServiceProjectService.java b/policeSecurityServer/src/main/java/com/changhu/service/ServiceProjectService.java new file mode 100644 index 0000000..54ec302 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/ServiceProjectService.java @@ -0,0 +1,13 @@ +package com.changhu.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.changhu.pojo.entity.ServiceProject; + +/** + * service_project (服务项目) 服务类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +public interface ServiceProjectService extends IService { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/service/WxService.java b/policeSecurityServer/src/main/java/com/changhu/service/WxService.java new file mode 100644 index 0000000..e25345e --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/WxService.java @@ -0,0 +1,20 @@ +package com.changhu.service; + +import org.springframework.core.io.Resource; +import org.springframework.http.ResponseEntity; + +/** + * @author 20252 + * @createTime 2024/11/22 上午11:48 + * @desc WxService... + */ +public interface WxService { + /** + * 获取小程序页面二维码 + * + * @param path 路径 + * @param width 宽度 + * @return 二维码 + */ + ResponseEntity qrCode(String path, Integer width); +} diff --git a/policeSecurityServer/src/main/java/com/changhu/service/impl/AccessKeysServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/AccessKeysServiceImpl.java index 15caea6..9957eec 100644 --- a/policeSecurityServer/src/main/java/com/changhu/service/impl/AccessKeysServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/AccessKeysServiceImpl.java @@ -5,8 +5,8 @@ import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.RandomUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.changhu.mapper.AccessKeysMapper; +import com.changhu.module.superManagement.pojo.params.GeneratedAccessKeyParams; import com.changhu.pojo.entity.AccessKeys; -import com.changhu.pojo.params.GeneratedAccessKeyParams; import com.changhu.service.AccessKeysService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkAssessmentRecordDetailsServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkAssessmentRecordDetailsServiceImpl.java similarity index 58% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkAssessmentRecordDetailsServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/CkAssessmentRecordDetailsServiceImpl.java index 5b8e36a..9b6c357 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkAssessmentRecordDetailsServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkAssessmentRecordDetailsServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.assessmentCriteria.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.assessmentCriteria.mapper.CkAssessmentRecordDetailsMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkAssessmentRecordDetails; -import com.changhu.module.assessmentCriteria.service.CkAssessmentRecordDetailsService; +import com.changhu.mapper.CkAssessmentRecordDetailsMapper; +import com.changhu.pojo.entity.CkAssessmentRecordDetails; +import com.changhu.service.CkAssessmentRecordDetailsService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/service/impl/CkAssessmentRecordServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkAssessmentRecordServiceImpl.java new file mode 100644 index 0000000..254ecdf --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkAssessmentRecordServiceImpl.java @@ -0,0 +1,17 @@ +package com.changhu.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.changhu.mapper.CkAssessmentRecordMapper; +import com.changhu.pojo.entity.CkAssessmentRecord; +import com.changhu.service.CkAssessmentRecordService; +import org.springframework.stereotype.Service; + +/** + * ck_assessment_record (考核记录) 服务实现类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Service +public class CkAssessmentRecordServiceImpl extends ServiceImpl implements CkAssessmentRecordService { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkGroupServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkGroupServiceImpl.java similarity index 56% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkGroupServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/CkGroupServiceImpl.java index fb5e43b..81573d4 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkGroupServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkGroupServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.assessmentCriteria.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.assessmentCriteria.mapper.CkGroupMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkGroup; -import com.changhu.module.assessmentCriteria.service.CkGroupService; +import com.changhu.mapper.CkGroupMapper; +import com.changhu.pojo.entity.CkGroup; +import com.changhu.service.CkGroupService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkItemServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkItemServiceImpl.java similarity index 57% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkItemServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/CkItemServiceImpl.java index f89df12..94fd396 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkItemServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkItemServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.assessmentCriteria.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.assessmentCriteria.mapper.CkItemMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkItem; -import com.changhu.module.assessmentCriteria.service.CkItemService; +import com.changhu.mapper.CkItemMapper; +import com.changhu.pojo.entity.CkItem; +import com.changhu.service.CkItemService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkProjectServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkProjectServiceImpl.java similarity index 56% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkProjectServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/CkProjectServiceImpl.java index 660fc01..3eddb9c 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkProjectServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkProjectServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.assessmentCriteria.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.assessmentCriteria.mapper.CkProjectMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkProject; -import com.changhu.module.assessmentCriteria.service.CkProjectService; +import com.changhu.mapper.CkProjectMapper; +import com.changhu.pojo.entity.CkProject; +import com.changhu.service.CkProjectService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkStandardServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkStandardServiceImpl.java similarity index 56% rename from policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkStandardServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/CkStandardServiceImpl.java index 16d8dc1..ff3b38c 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/assessmentCriteria/service/impl/CkStandardServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/CkStandardServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.assessmentCriteria.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.assessmentCriteria.mapper.CkStandardMapper; -import com.changhu.module.assessmentCriteria.pojo.entity.CkStandard; -import com.changhu.module.assessmentCriteria.service.CkStandardService; +import com.changhu.mapper.CkStandardMapper; +import com.changhu.pojo.entity.CkStandard; +import com.changhu.service.CkStandardService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/service/impl/CommonServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/CommonServiceImpl.java index cc6d256..1ed2b22 100644 --- a/policeSecurityServer/src/main/java/com/changhu/service/impl/CommonServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/CommonServiceImpl.java @@ -8,10 +8,10 @@ import com.changhu.common.enums.ResultCode; import com.changhu.common.exception.MessageException; import com.changhu.common.pojo.model.JsonResult; import com.changhu.common.pojo.vo.SelectNodeVo; -import com.changhu.module.management.mapper.PoliceUnitMapper; -import com.changhu.module.management.mapper.SecurityUnitMapper; -import com.changhu.module.management.pojo.entity.PoliceUnit; -import com.changhu.module.management.pojo.entity.SecurityUnit; +import com.changhu.mapper.PoliceUnitMapper; +import com.changhu.mapper.SecurityUnitMapper; +import com.changhu.pojo.entity.PoliceUnit; +import com.changhu.pojo.entity.SecurityUnit; import com.changhu.pojo.params.PoliceUnitRegisterParams; import com.changhu.pojo.params.SecurityUnitRegisterParams; import com.changhu.pojo.queryParams.QueryUnitListByIdentityQueryParams; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/EnterprisesUnitServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/EnterprisesUnitServiceImpl.java similarity index 88% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/EnterprisesUnitServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/EnterprisesUnitServiceImpl.java index c291287..8e921f6 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/EnterprisesUnitServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/EnterprisesUnitServiceImpl.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.service.impl; +package com.changhu.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.lang.Dict; @@ -9,12 +9,12 @@ import com.changhu.common.db.enums.UserType; import com.changhu.common.exception.MessageException; import com.changhu.common.pojo.vo.SelectNodeVo; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.mapper.EnterprisesUnitMapper; -import com.changhu.module.management.pojo.entity.EnterprisesUnit; -import com.changhu.module.management.pojo.params.EnterprisesUnitSaveOrUpdateParams; -import com.changhu.module.management.pojo.queryParams.EnterprisesUnitPagerQueryParams; -import com.changhu.module.management.pojo.vo.EnterprisesUnitPagerVo; -import com.changhu.module.management.service.EnterprisesUnitService; +import com.changhu.mapper.EnterprisesUnitMapper; +import com.changhu.pojo.entity.EnterprisesUnit; +import com.changhu.pojo.params.EnterprisesUnitSaveOrUpdateParams; +import com.changhu.pojo.queryParams.EnterprisesUnitPagerQueryParams; +import com.changhu.pojo.vo.EnterprisesUnitPagerVo; +import com.changhu.service.EnterprisesUnitService; import com.changhu.support.mybatisplus.pojo.params.PageParams; import org.springframework.stereotype.Service; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementPoliceUnitUserServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementPoliceUnitUserServiceImpl.java similarity index 60% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementPoliceUnitUserServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementPoliceUnitUserServiceImpl.java index 3d6d0e5..b8d51a4 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementPoliceUnitUserServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementPoliceUnitUserServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.management.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.management.mapper.ManagementPoliceUnitUserMapper; -import com.changhu.module.management.pojo.entity.ManagementPoliceUnitUser; -import com.changhu.module.management.service.ManagementPoliceUnitUserService; +import com.changhu.mapper.ManagementPoliceUnitUserMapper; +import com.changhu.pojo.entity.ManagementPoliceUnitUser; +import com.changhu.service.ManagementPoliceUnitUserService; import org.springframework.stereotype.Service; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementSecurityUnitUserServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementSecurityUnitUserServiceImpl.java similarity index 61% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementSecurityUnitUserServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementSecurityUnitUserServiceImpl.java index 38a4fc6..01efa26 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementSecurityUnitUserServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementSecurityUnitUserServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.management.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.management.mapper.ManagementSecurityUnitUserMapper; -import com.changhu.module.management.pojo.entity.ManagementSecurityUnitUser; -import com.changhu.module.management.service.ManagementSecurityUnitUserService; +import com.changhu.mapper.ManagementSecurityUnitUserMapper; +import com.changhu.pojo.entity.ManagementSecurityUnitUser; +import com.changhu.service.ManagementSecurityUnitUserService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementServiceImpl.java similarity index 50% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementServiceImpl.java index 48a7fad..a0c74a4 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementServiceImpl.java @@ -1,20 +1,19 @@ -package com.changhu.module.management.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.changhu.common.db.enums.MiniProgramUserIdentity; import com.changhu.common.db.enums.UserType; import com.changhu.common.exception.MessageException; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.pojo.params.IndexCheckPassParams; -import com.changhu.module.management.pojo.params.IndexCheckStatusParams; -import com.changhu.module.management.pojo.params.IndexDisableOrEnableParams; -import com.changhu.module.management.pojo.queryParams.UnitMiniProgramUserPagerQueryParams; -import com.changhu.module.management.pojo.vo.UnitCheckStatusVo; -import com.changhu.module.management.pojo.vo.UnitMiniProgramUserPagerVo; -import com.changhu.module.management.service.ManagementService; -import com.changhu.module.miniProgram.mapper.MiniProgramUserMapper; +import com.changhu.mapper.ManagementMapper; +import com.changhu.pojo.params.CheckStatusParams; +import com.changhu.pojo.params.UnitDisableOrEnableParams; +import com.changhu.pojo.vo.UnitCheckStatusVo; +import com.changhu.pojo.vo.UnitMiniProgramUserPagerQueryParams; +import com.changhu.pojo.vo.UnitMiniProgramUserPagerVo; +import com.changhu.service.ManagementService; import com.changhu.support.mybatisplus.pojo.params.PageParams; -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; /** @@ -25,30 +24,16 @@ import org.springframework.stereotype.Service; @Service public class ManagementServiceImpl implements ManagementService { - @Autowired - private MiniProgramUserMapper miniProgramUserMapper; + @Resource + private ManagementMapper managementMapper; @Override - public void checkPass(IndexCheckPassParams params) { - params.getUnitOptType() - .getHandler() - .pass(params.getCheckDataId()); - } - - @Override - public UnitCheckStatusVo getCheckStatus(IndexCheckStatusParams params) { + public UnitCheckStatusVo getCheckStatus(CheckStatusParams params) { return params.getUnitOptType() .getHandler() .getCheckStatus(params.getOnlyCode()); } - @Override - public void disableOrEnable(IndexDisableOrEnableParams params) { - params.getUnitOptType() - .getHandler() - .disableOrEnable(params.getDataId()); - } - @Override public Page miniProgramUserPager(PageParams queryParams) { UserType userType = UserUtil.getUserType(); @@ -57,18 +42,18 @@ public class ManagementServiceImpl implements ManagementService { case MANAGEMENT_SECURITY -> MiniProgramUserIdentity.PROJECT_MANAGER; default -> throw new MessageException("用户类型不匹配"); }; - return miniProgramUserMapper.pager(queryParams.getPage(), queryParams.getParams(), identity); + return managementMapper.miniProgramUserPager(queryParams.getPage(), queryParams.getParams(), identity); } @Override - public void passMiniProgramUser(IndexDisableOrEnableParams params) { + public void passMiniProgramUser(UnitDisableOrEnableParams params) { params.getUnitOptType() .getHandler() .passMiniProgramUser(params.getDataId()); } @Override - public void disableOrEnableMiniProgramUser(IndexDisableOrEnableParams params) { + public void disableOrEnableMiniProgramUser(UnitDisableOrEnableParams params) { params.getUnitOptType() .getHandler() .disableOrEnableMiniProgramUser(params.getDataId()); diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementSuperUserServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementSuperUserServiceImpl.java similarity index 60% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementSuperUserServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementSuperUserServiceImpl.java index 501cab0..cc22c5e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/ManagementSuperUserServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/ManagementSuperUserServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.management.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.management.mapper.ManagementSuperUserMapper; -import com.changhu.module.management.pojo.entity.ManagementSuperUser; -import com.changhu.module.management.service.ManagementSuperUserService; +import com.changhu.mapper.ManagementSuperUserMapper; +import com.changhu.pojo.entity.ManagementSuperUser; +import com.changhu.service.ManagementSuperUserService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/service/impl/MiniProgramUserServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/MiniProgramUserServiceImpl.java new file mode 100644 index 0000000..dd15c05 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/MiniProgramUserServiceImpl.java @@ -0,0 +1,17 @@ +package com.changhu.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.changhu.mapper.MiniProgramUserMapper; +import com.changhu.pojo.entity.MiniProgramUser; +import com.changhu.service.MiniProgramUserService; +import org.springframework.stereotype.Service; + +/** + * mini_program_user (小程序用户) 服务实现类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Service +public class MiniProgramUserServiceImpl extends ServiceImpl implements MiniProgramUserService { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/service/impl/OpenApiServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/OpenApiServiceImpl.java index 6f18a87..83663cb 100644 --- a/policeSecurityServer/src/main/java/com/changhu/service/impl/OpenApiServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/OpenApiServiceImpl.java @@ -4,20 +4,21 @@ import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.exception.MessageException; import com.changhu.common.pojo.vo.SelectNodeVo; import com.changhu.mapper.OpenApiMapper; -import com.changhu.module.management.pojo.entity.EnterprisesUnit; -import com.changhu.module.management.pojo.entity.PoliceUnit; -import com.changhu.module.management.pojo.entity.SecurityUnit; -import com.changhu.module.management.service.ServiceProjectService; -import com.changhu.module.miniProgram.pojo.entity.SecurityUser; import com.changhu.pojo.dto.DataViewDTO; import com.changhu.pojo.dto.EnterprisesUnitDetailDTO; import com.changhu.pojo.dto.SecurityUnitUseStatisticsDTO; import com.changhu.pojo.dto.SecurityUserRosterDTO; +import com.changhu.pojo.entity.EnterprisesUnit; +import com.changhu.pojo.entity.PoliceUnit; +import com.changhu.pojo.entity.SecurityUnit; +import com.changhu.pojo.entity.SecurityUser; import com.changhu.pojo.params.EnterprisesUnitOrServiceProjectType; import com.changhu.service.OpenApiService; +import com.changhu.service.ServiceProjectService; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import lombok.SneakyThrows; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Service; import java.util.List; @@ -37,6 +38,9 @@ public class OpenApiServiceImpl implements OpenApiService { @Autowired private OpenApiMapper openApiMapper; + @Autowired + private ThreadPoolTaskExecutor threadPoolTaskExecutor; + @Override public List> getEnterprisesUnit(String code, Integer level) { return openApiMapper.getEnterprisesUnit(code, level); @@ -54,7 +58,7 @@ public class OpenApiServiceImpl implements OpenApiService { .address(item.getAddress()) .contactPersonInfo(item.getContactPersonInfo()) .remark(item.getRemark()) - .serviceProjectList(serviceProjectService.getServiceProjectByEnterprisesUnitId(item.getSnowFlakeId())) + .serviceProjectList(openApiMapper.getServiceProjectByEnterprisesUnitId(item.getSnowFlakeId())) .createTime(item.getCreateTime()) .build()) .orElseThrow(() -> new MessageException("企事业单位不存在")); @@ -65,35 +69,47 @@ public class OpenApiServiceImpl implements OpenApiService { public DataViewDTO dataView() { DataViewDTO dataViewDTO = new DataViewDTO(); CountDownLatch countDownLatch = new CountDownLatch(5); - try { - dataViewDTO.setPoliceUnitCount(Db.lambdaQuery(PoliceUnit.class).count().intValue()); - } finally { - countDownLatch.countDown(); - } - try { - dataViewDTO.setSecurityUnitCount(Db.lambdaQuery(SecurityUnit.class).count().intValue()); - } finally { - countDownLatch.countDown(); - } - try { - dataViewDTO.setEnterprisesUnitCount(Db.lambdaQuery(EnterprisesUnit.class).count().intValue()); - } finally { - countDownLatch.countDown(); - } - try { - dataViewDTO.setSecurityUserTotal(Db.lambdaQuery(SecurityUser.class).count().intValue()); - } finally { - countDownLatch.countDown(); - } - try { - dataViewDTO.setNoCardSecurityUserCount(Db.lambdaQuery(SecurityUser.class) - .isNull(SecurityUser::getSecurityNumber) - .or() - .eq(SecurityUser::getSecurityNumber, "") - .count().intValue()); - } finally { - countDownLatch.countDown(); - } + threadPoolTaskExecutor.execute(() -> { + try { + dataViewDTO.setPoliceUnitCount(Db.lambdaQuery(PoliceUnit.class).count().intValue()); + } finally { + countDownLatch.countDown(); + } + }); + + threadPoolTaskExecutor.execute(() -> { + try { + dataViewDTO.setSecurityUnitCount(Db.lambdaQuery(SecurityUnit.class).count().intValue()); + } finally { + countDownLatch.countDown(); + } + }); + threadPoolTaskExecutor.execute(() -> { + try { + dataViewDTO.setEnterprisesUnitCount(Db.lambdaQuery(EnterprisesUnit.class).count().intValue()); + } finally { + countDownLatch.countDown(); + } + }); + threadPoolTaskExecutor.execute(() -> { + try { + dataViewDTO.setSecurityUserTotal(Db.lambdaQuery(SecurityUser.class).count().intValue()); + } finally { + countDownLatch.countDown(); + } + }); + threadPoolTaskExecutor.execute(() -> { + try { + dataViewDTO.setNoCardSecurityUserCount(Db.lambdaQuery(SecurityUser.class) + .isNull(SecurityUser::getSecurityNumber) + .or() + .eq(SecurityUser::getSecurityNumber, "") + .count().intValue()); + } finally { + countDownLatch.countDown(); + } + }); + countDownLatch.await(); return dataViewDTO; } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/PoliceUnitServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/PoliceUnitServiceImpl.java similarity index 59% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/PoliceUnitServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/PoliceUnitServiceImpl.java index 32716b8..546835f 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/PoliceUnitServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/PoliceUnitServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.management.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.management.mapper.PoliceUnitMapper; -import com.changhu.module.management.pojo.entity.PoliceUnit; -import com.changhu.module.management.service.PoliceUnitService; +import com.changhu.mapper.PoliceUnitMapper; +import com.changhu.pojo.entity.PoliceUnit; +import com.changhu.service.PoliceUnitService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SecurityUnitServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/SecurityUnitServiceImpl.java similarity index 59% rename from policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SecurityUnitServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/SecurityUnitServiceImpl.java index a5d45a0..07fc336 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/service/impl/SecurityUnitServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/SecurityUnitServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.management.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.management.mapper.SecurityUnitMapper; -import com.changhu.module.management.pojo.entity.SecurityUnit; -import com.changhu.module.management.service.SecurityUnitService; +import com.changhu.mapper.SecurityUnitMapper; +import com.changhu.pojo.entity.SecurityUnit; +import com.changhu.service.SecurityUnitService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/SecurityUserServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/SecurityUserServiceImpl.java similarity index 59% rename from policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/SecurityUserServiceImpl.java rename to policeSecurityServer/src/main/java/com/changhu/service/impl/SecurityUserServiceImpl.java index e7c7be0..62eefff 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/miniProgram/service/impl/SecurityUserServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/SecurityUserServiceImpl.java @@ -1,9 +1,9 @@ -package com.changhu.module.miniProgram.service.impl; +package com.changhu.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.changhu.module.miniProgram.mapper.SecurityUserMapper; -import com.changhu.module.miniProgram.pojo.entity.SecurityUser; -import com.changhu.module.miniProgram.service.SecurityUserService; +import com.changhu.mapper.SecurityUserMapper; +import com.changhu.pojo.entity.SecurityUser; +import com.changhu.service.SecurityUserService; import org.springframework.stereotype.Service; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/service/impl/ServiceProjectServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/ServiceProjectServiceImpl.java new file mode 100644 index 0000000..dc73b85 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/ServiceProjectServiceImpl.java @@ -0,0 +1,17 @@ +package com.changhu.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.changhu.mapper.ServiceProjectMapper; +import com.changhu.pojo.entity.ServiceProject; +import com.changhu.service.ServiceProjectService; +import org.springframework.stereotype.Service; + +/** + * service_project (服务项目) 服务实现类 + * author: luozhun + * desc 由groovy脚本自动生成 + */ +@Service +public class ServiceProjectServiceImpl extends ServiceImpl implements ServiceProjectService { + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/service/impl/WxServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/service/impl/WxServiceImpl.java new file mode 100644 index 0000000..21952a9 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/service/impl/WxServiceImpl.java @@ -0,0 +1,42 @@ +package com.changhu.service.impl; + +import cn.binarywang.wx.miniapp.api.WxMaQrcodeService; +import cn.binarywang.wx.miniapp.api.WxMaService; +import com.changhu.common.exception.MessageException; +import com.changhu.service.WxService; +import me.chanjar.weixin.common.error.WxErrorException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.Resource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; + +import java.io.File; + +/** + * @author 20252 + * @createTime 2024/11/22 上午11:48 + * @desc WxServiceImpl... + */ +@Service +public class WxServiceImpl implements WxService { + + @Autowired + private WxMaService wxMaService; + + @Override + public ResponseEntity qrCode(String path, Integer width) { + WxMaQrcodeService qrcodeService = wxMaService.getQrcodeService(); + try { + File qrcodeFile = qrcodeService.createQrcode(path, width); + return ResponseEntity.ok() + .header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + qrcodeFile.getName()) + .contentType(MediaType.APPLICATION_OCTET_STREAM) + .body(new FileSystemResource(qrcodeFile)); + } catch (WxErrorException e) { + throw new MessageException("生成表单二维码失败:{}", e.getMessage()); + } + } +} diff --git a/policeSecurityServer/src/main/java/com/changhu/enums/ClientType.java b/policeSecurityServer/src/main/java/com/changhu/strategy/ClientType.java similarity index 87% rename from policeSecurityServer/src/main/java/com/changhu/enums/ClientType.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/ClientType.java index bfdf768..6bc0757 100644 --- a/policeSecurityServer/src/main/java/com/changhu/enums/ClientType.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/ClientType.java @@ -1,6 +1,6 @@ -package com.changhu.enums; +package com.changhu.strategy; -import com.changhu.enums.handler.*; +import com.changhu.strategy.handler.clientType.*; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/enums/UnitOptType.java b/policeSecurityServer/src/main/java/com/changhu/strategy/UnitOptType.java similarity index 56% rename from policeSecurityServer/src/main/java/com/changhu/module/management/enums/UnitOptType.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/UnitOptType.java index d6116e2..c78d98a 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/enums/UnitOptType.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/UnitOptType.java @@ -1,8 +1,8 @@ -package com.changhu.module.management.enums; +package com.changhu.strategy; -import com.changhu.module.management.enums.handler.AbstractUnitTypeHandler; -import com.changhu.module.management.enums.handler.PoliceUnitTypeHandler; -import com.changhu.module.management.enums.handler.SecurityUnitTypeHandler; +import com.changhu.strategy.handler.unitOptType.AbstractUnitTypeHandler; +import com.changhu.strategy.handler.unitOptType.PoliceUnitTypeHandler; +import com.changhu.strategy.handler.unitOptType.SecurityUnitTypeHandler; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/policeSecurityServer/src/main/java/com/changhu/enums/handler/AbstractLoginHandler.java b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/AbstractLoginHandler.java similarity index 89% rename from policeSecurityServer/src/main/java/com/changhu/enums/handler/AbstractLoginHandler.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/AbstractLoginHandler.java index 4341284..d33091b 100644 --- a/policeSecurityServer/src/main/java/com/changhu/enums/handler/AbstractLoginHandler.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/AbstractLoginHandler.java @@ -1,4 +1,4 @@ -package com.changhu.enums.handler; +package com.changhu.strategy.handler.clientType; import com.alibaba.fastjson2.JSONObject; import com.changhu.common.pojo.vo.TokenInfo; diff --git a/policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementPoliceUnitLogin.java b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementPoliceUnitLogin.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementPoliceUnitLogin.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementPoliceUnitLogin.java index 3b49c5f..a132105 100644 --- a/policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementPoliceUnitLogin.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementPoliceUnitLogin.java @@ -1,4 +1,4 @@ -package com.changhu.enums.handler; +package com.changhu.strategy.handler.clientType; import cn.dev33.satoken.stp.SaTokenInfo; import com.alibaba.fastjson2.JSONObject; @@ -11,8 +11,8 @@ import com.changhu.common.pojo.vo.TokenInfo; import com.changhu.common.utils.RsaUtil; import com.changhu.common.utils.UserUtil; import com.changhu.common.utils.ValidatorUtil; -import com.changhu.module.management.pojo.entity.ManagementPoliceUnitUser; -import com.changhu.module.management.pojo.entity.PoliceUnit; +import com.changhu.pojo.entity.ManagementPoliceUnitUser; +import com.changhu.pojo.entity.PoliceUnit; import com.changhu.pojo.params.ManagementPoliceUnitLoginParams; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; diff --git a/policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementSecurityUnitLogin.java b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementSecurityUnitLogin.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementSecurityUnitLogin.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementSecurityUnitLogin.java index 8390ba4..b9043d0 100644 --- a/policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementSecurityUnitLogin.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementSecurityUnitLogin.java @@ -1,4 +1,4 @@ -package com.changhu.enums.handler; +package com.changhu.strategy.handler.clientType; import cn.dev33.satoken.stp.SaTokenInfo; import com.alibaba.fastjson2.JSONObject; @@ -11,8 +11,8 @@ import com.changhu.common.pojo.vo.TokenInfo; import com.changhu.common.utils.RsaUtil; import com.changhu.common.utils.UserUtil; import com.changhu.common.utils.ValidatorUtil; -import com.changhu.module.management.pojo.entity.ManagementSecurityUnitUser; -import com.changhu.module.management.pojo.entity.SecurityUnit; +import com.changhu.pojo.entity.ManagementSecurityUnitUser; +import com.changhu.pojo.entity.SecurityUnit; import com.changhu.pojo.params.ManagementSecurityUnitLoginParams; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; diff --git a/policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementSuperLogin.java b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementSuperLogin.java similarity index 94% rename from policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementSuperLogin.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementSuperLogin.java index a1acfd7..3695a6f 100644 --- a/policeSecurityServer/src/main/java/com/changhu/enums/handler/ManagementSuperLogin.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/ManagementSuperLogin.java @@ -1,4 +1,4 @@ -package com.changhu.enums.handler; +package com.changhu.strategy.handler.clientType; import cn.dev33.satoken.stp.SaTokenInfo; import com.alibaba.fastjson2.JSONObject; @@ -10,7 +10,7 @@ import com.changhu.common.pojo.vo.TokenInfo; import com.changhu.common.utils.RsaUtil; import com.changhu.common.utils.UserUtil; import com.changhu.common.utils.ValidatorUtil; -import com.changhu.module.management.pojo.entity.ManagementSuperUser; +import com.changhu.pojo.entity.ManagementSuperUser; import com.changhu.pojo.params.ManagementSuperLoginParams; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/enums/handler/MiniProgramUserLogin.java b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/MiniProgramUserLogin.java similarity index 96% rename from policeSecurityServer/src/main/java/com/changhu/enums/handler/MiniProgramUserLogin.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/MiniProgramUserLogin.java index f3bdf79..8dea4d9 100644 --- a/policeSecurityServer/src/main/java/com/changhu/enums/handler/MiniProgramUserLogin.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/clientType/MiniProgramUserLogin.java @@ -1,4 +1,4 @@ -package com.changhu.enums.handler; +package com.changhu.strategy.handler.clientType; import cn.binarywang.wx.miniapp.api.WxMaService; import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; @@ -16,7 +16,7 @@ import com.changhu.common.exception.MessageException; import com.changhu.common.pojo.vo.TokenInfo; import com.changhu.common.utils.UserUtil; import com.changhu.common.utils.ValidatorUtil; -import com.changhu.module.miniProgram.pojo.entity.MiniProgramUser; +import com.changhu.pojo.entity.MiniProgramUser; import com.changhu.pojo.params.MiniProgramUserLoginParams; import me.chanjar.weixin.common.error.WxErrorException; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/AbstractUnitTypeHandler.java b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/AbstractUnitTypeHandler.java similarity index 90% rename from policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/AbstractUnitTypeHandler.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/AbstractUnitTypeHandler.java index 8413f1e..6d579dc 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/AbstractUnitTypeHandler.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/AbstractUnitTypeHandler.java @@ -1,7 +1,7 @@ -package com.changhu.module.management.enums.handler; +package com.changhu.strategy.handler.unitOptType; import cn.hutool.extra.spring.SpringUtil; -import com.changhu.module.management.pojo.vo.UnitCheckStatusVo; +import com.changhu.pojo.vo.UnitCheckStatusVo; import org.springframework.transaction.PlatformTransactionManager; /** diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/PoliceUnitTypeHandler.java b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/PoliceUnitTypeHandler.java similarity index 92% rename from policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/PoliceUnitTypeHandler.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/PoliceUnitTypeHandler.java index 0f1c7df..0ab2545 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/PoliceUnitTypeHandler.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/PoliceUnitTypeHandler.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.enums.handler; +package com.changhu.strategy.handler.unitOptType; import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; @@ -7,13 +7,13 @@ import com.changhu.common.db.enums.*; import com.changhu.common.enums.ResultCode; import com.changhu.common.exception.MessageException; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.pojo.entity.ManagementPoliceUnitUser; -import com.changhu.module.management.pojo.entity.PoliceUnit; -import com.changhu.module.management.pojo.vo.UnitCheckStatusVo; -import com.changhu.module.management.service.ManagementPoliceUnitUserService; -import com.changhu.module.management.service.PoliceUnitService; -import com.changhu.module.miniProgram.pojo.entity.MiniProgramUser; -import com.changhu.module.miniProgram.service.MiniProgramUserService; +import com.changhu.pojo.entity.ManagementPoliceUnitUser; +import com.changhu.pojo.entity.MiniProgramUser; +import com.changhu.pojo.entity.PoliceUnit; +import com.changhu.pojo.vo.UnitCheckStatusVo; +import com.changhu.service.ManagementPoliceUnitUserService; +import com.changhu.service.MiniProgramUserService; +import com.changhu.service.PoliceUnitService; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import lombok.extern.slf4j.Slf4j; import org.springframework.transaction.TransactionStatus; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/SecurityUnitTypeHandler.java b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/SecurityUnitTypeHandler.java similarity index 92% rename from policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/SecurityUnitTypeHandler.java rename to policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/SecurityUnitTypeHandler.java index dd5aac8..f5f87ae 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/enums/handler/SecurityUnitTypeHandler.java +++ b/policeSecurityServer/src/main/java/com/changhu/strategy/handler/unitOptType/SecurityUnitTypeHandler.java @@ -1,4 +1,4 @@ -package com.changhu.module.management.enums.handler; +package com.changhu.strategy.handler.unitOptType; import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; @@ -7,13 +7,13 @@ import com.changhu.common.db.enums.*; import com.changhu.common.enums.ResultCode; import com.changhu.common.exception.MessageException; import com.changhu.common.utils.UserUtil; -import com.changhu.module.management.pojo.entity.ManagementSecurityUnitUser; -import com.changhu.module.management.pojo.entity.SecurityUnit; -import com.changhu.module.management.pojo.vo.UnitCheckStatusVo; -import com.changhu.module.management.service.ManagementSecurityUnitUserService; -import com.changhu.module.management.service.SecurityUnitService; -import com.changhu.module.miniProgram.pojo.entity.MiniProgramUser; -import com.changhu.module.miniProgram.service.MiniProgramUserService; +import com.changhu.pojo.entity.ManagementSecurityUnitUser; +import com.changhu.pojo.entity.MiniProgramUser; +import com.changhu.pojo.entity.SecurityUnit; +import com.changhu.pojo.vo.UnitCheckStatusVo; +import com.changhu.service.ManagementSecurityUnitUserService; +import com.changhu.service.MiniProgramUserService; +import com.changhu.service.SecurityUnitService; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import lombok.extern.slf4j.Slf4j; import org.springframework.transaction.TransactionStatus; diff --git a/policeSecurityServer/src/main/resources/conf/log4j2.xml b/policeSecurityServer/src/main/resources/conf/log4j2.xml index 4b6a1a2..3572226 100644 --- a/policeSecurityServer/src/main/resources/conf/log4j2.xml +++ b/policeSecurityServer/src/main/resources/conf/log4j2.xml @@ -125,13 +125,16 @@ - - - - + + + + + + + diff --git a/policeSecurityServer/src/main/resources/env/dev/application.yml b/policeSecurityServer/src/main/resources/env/dev/application.yml index b638e99..71a856a 100644 --- a/policeSecurityServer/src/main/resources/env/dev/application.yml +++ b/policeSecurityServer/src/main/resources/env/dev/application.yml @@ -110,7 +110,7 @@ mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl type-handlers-package: com.changhu.support.mybatisplus.handler.global - mapper-locations: classpath*:/mapper/*.xml + mapper-locations: classpath*:/mapper/**/*.xml logging: config: classpath:conf/log4j2.xml diff --git a/policeSecurityServer/src/main/resources/env/prod/application.yml b/policeSecurityServer/src/main/resources/env/prod/application.yml index ea1f45f..63d39fb 100644 --- a/policeSecurityServer/src/main/resources/env/prod/application.yml +++ b/policeSecurityServer/src/main/resources/env/prod/application.yml @@ -110,7 +110,7 @@ mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl type-handlers-package: com.changhu.support.mybatisplus.handler.global - mapper-locations: classpath*:/mapper/*.xml + mapper-locations: classpath*:/mapper/**/*.xml logging: config: classpath:conf/log4j2.xml diff --git a/policeSecurityServer/src/main/resources/mapper/CkAssessmentRecordMapper.xml b/policeSecurityServer/src/main/resources/mapper/CkAssessmentRecordMapper.xml index a15893a..5288099 100644 --- a/policeSecurityServer/src/main/resources/mapper/CkAssessmentRecordMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/CkAssessmentRecordMapper.xml @@ -1,40 +1,4 @@ - - + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/CkProjectMapper.xml b/policeSecurityServer/src/main/resources/mapper/CkProjectMapper.xml index cce7070..cce1fa9 100644 --- a/policeSecurityServer/src/main/resources/mapper/CkProjectMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/CkProjectMapper.xml @@ -1,38 +1,4 @@ - - - + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/EnterprisesUnitMapper.xml b/policeSecurityServer/src/main/resources/mapper/EnterprisesUnitMapper.xml index 881217a..7b98c4a 100644 --- a/policeSecurityServer/src/main/resources/mapper/EnterprisesUnitMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/EnterprisesUnitMapper.xml @@ -1,7 +1,7 @@ - - + + + + + + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/ManagementPoliceUnitUserMapper.xml b/policeSecurityServer/src/main/resources/mapper/ManagementPoliceUnitUserMapper.xml index ceddf6b..29692b0 100644 --- a/policeSecurityServer/src/main/resources/mapper/ManagementPoliceUnitUserMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/ManagementPoliceUnitUserMapper.xml @@ -1,27 +1,4 @@ - - + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/ManagementSecurityUnitUserMapper.xml b/policeSecurityServer/src/main/resources/mapper/ManagementSecurityUnitUserMapper.xml index a34f53a..9beff40 100644 --- a/policeSecurityServer/src/main/resources/mapper/ManagementSecurityUnitUserMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/ManagementSecurityUnitUserMapper.xml @@ -1,24 +1,4 @@ - - + diff --git a/policeSecurityServer/src/main/resources/mapper/MiniProgramUserMapper.xml b/policeSecurityServer/src/main/resources/mapper/MiniProgramUserMapper.xml index 021a877..a0ef657 100644 --- a/policeSecurityServer/src/main/resources/mapper/MiniProgramUserMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/MiniProgramUserMapper.xml @@ -1,26 +1,4 @@ - - + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml index 4cfb5da..96b6cba 100644 --- a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml @@ -28,6 +28,58 @@ order by eu.create_time desc + + + + + + - - - - - + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/SecurityUnitMapper.xml b/policeSecurityServer/src/main/resources/mapper/SecurityUnitMapper.xml index 4a936cd..b80a273 100644 --- a/policeSecurityServer/src/main/resources/mapper/SecurityUnitMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/SecurityUnitMapper.xml @@ -1,50 +1,5 @@ - - - - - + + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/SecurityUserMapper.xml b/policeSecurityServer/src/main/resources/mapper/SecurityUserMapper.xml index 81f0f8e..c5b0887 100644 --- a/policeSecurityServer/src/main/resources/mapper/SecurityUserMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/SecurityUserMapper.xml @@ -1,6 +1,6 @@ - + - select - sp.*, - JSON_ARRAY(eu.province,eu.city,eu.districts,eu.street) as 'enterprisesUnitAdministrativeDivisionCodes', - eu.name as 'enterprisesUnitName', - mpu.name as 'projectManagerMiniProgramUserName', - msuu.name as 'createUserName' - from service_project sp - left join enterprises_unit eu on sp.enterprises_unit_id = eu.snow_flake_id - left join mini_program_user mpu on sp.project_manager_mini_program_user_id = mpu.snow_flake_id - left join management_security_unit_user msuu on sp.create_by = msuu.snow_flake_id - where sp.delete_flag = 0 - and sp.security_unit_id = ${@com.changhu.common.utils.UserUtil@getUnitId()} - - and sp.name like concat('%',#{params.name},'%') - - - and sp.type = #{params.type.value} - - - and sp.remark like concat('%',#{params.remark},'%') - - - and mpu.name like concat('%',#{params.projectManagerMiniProgramUserName},'%') - - order by sp.create_time desc - + - - - - - - diff --git a/policeSecurityServer/src/main/resources/mapper/policeManagement/UserMapper.xml b/policeSecurityServer/src/main/resources/mapper/policeManagement/UserMapper.xml new file mode 100644 index 0000000..fb4c4f1 --- /dev/null +++ b/policeSecurityServer/src/main/resources/mapper/policeManagement/UserMapper.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/securityManagement/Service_ProjectMapper.xml b/policeSecurityServer/src/main/resources/mapper/securityManagement/Service_ProjectMapper.xml new file mode 100644 index 0000000..cb556e2 --- /dev/null +++ b/policeSecurityServer/src/main/resources/mapper/securityManagement/Service_ProjectMapper.xml @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/securityManagement/UserMapper.xml b/policeSecurityServer/src/main/resources/mapper/securityManagement/UserMapper.xml new file mode 100644 index 0000000..f3605ba --- /dev/null +++ b/policeSecurityServer/src/main/resources/mapper/securityManagement/UserMapper.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/superManagement/AssessmentCriteriaMapper.xml b/policeSecurityServer/src/main/resources/mapper/superManagement/AssessmentCriteriaMapper.xml new file mode 100644 index 0000000..0611254 --- /dev/null +++ b/policeSecurityServer/src/main/resources/mapper/superManagement/AssessmentCriteriaMapper.xml @@ -0,0 +1,38 @@ + + + + + + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/superManagement/AssessmentRecordMapper.xml b/policeSecurityServer/src/main/resources/mapper/superManagement/AssessmentRecordMapper.xml new file mode 100644 index 0000000..d726e16 --- /dev/null +++ b/policeSecurityServer/src/main/resources/mapper/superManagement/AssessmentRecordMapper.xml @@ -0,0 +1,41 @@ + + + + + \ No newline at end of file diff --git a/policeSecurityServer/src/main/resources/mapper/superManagement/SuperUnitMapper.xml b/policeSecurityServer/src/main/resources/mapper/superManagement/SuperUnitMapper.xml new file mode 100644 index 0000000..610bc68 --- /dev/null +++ b/policeSecurityServer/src/main/resources/mapper/superManagement/SuperUnitMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/policeSecurityServer/src/test/java/com/changhu/SuperUserInitTest.java b/policeSecurityServer/src/test/java/com/changhu/SuperUserInitTest.java index e0b2a66..f6d903a 100644 --- a/policeSecurityServer/src/test/java/com/changhu/SuperUserInitTest.java +++ b/policeSecurityServer/src/test/java/com/changhu/SuperUserInitTest.java @@ -1,9 +1,5 @@ package com.changhu; -import com.changhu.module.management.pojo.params.ManagementSuperUserSaveOrUpdateParams; -import com.changhu.module.management.service.SuperService; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; /** @@ -14,15 +10,4 @@ import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest public class SuperUserInitTest { - @Autowired - private SuperService superService; - - @Test - public void initAdmin() { - ManagementSuperUserSaveOrUpdateParams params = new ManagementSuperUserSaveOrUpdateParams(); - params.setName("超级管理员"); - params.setTelephone("15576404472"); - superService.saveOrUpdateUser(params); - - } } diff --git a/superManagement/src/types/views/index.ts b/superManagement/src/types/views/index.ts index 0c26468..3a041bd 100644 --- a/superManagement/src/types/views/index.ts +++ b/superManagement/src/types/views/index.ts @@ -26,3 +26,9 @@ export interface EnterprisesUnit { /** remark **/ remark?: string; } + +export interface StatisticsVo { + enterprisesUnitTotal: number; + serviceProjectTotal: number; + securityUserTotal: number; +} diff --git a/superManagement/src/views/index.vue b/superManagement/src/views/index.vue index db20aa5..0bbf206 100644 --- a/superManagement/src/views/index.vue +++ b/superManagement/src/views/index.vue @@ -18,18 +18,18 @@